From 670c71f1c73893357ccd5f7f6375e2801525d51f Mon Sep 17 00:00:00 2001 From: andreaonofrei01 Date: Mon, 9 Mar 2026 13:29:08 +0100 Subject: [PATCH 01/82] chore: consolidate v1-to-v2 migration guide (#404) * chore: consolidate v1-to-v2 migration guide * chore: add v0-to-v1 section back * Update MIGRATION.md --- MIGRATION.md | 216 ++++++++++++++++++--------------------------------- 1 file changed, 74 insertions(+), 142 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index 2fc3d13d..220908ce 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,30 +1,8 @@ -# Migration Guide +# Migration Guide: v1.x to v2.x -This guide covers migrating between major versions of the Mistral Python SDK. +## Import Changes ---- - -## Migrating from v1.x to v2.x - -Version 2.0 updates the import paths from `mistralai` to `mistralai.client`. - -### Import Changes - -All imports move from `mistralai` to `mistralai.client`: - -```python -# v1 -from mistralai import Mistral -from mistralai.models import UserMessage, AssistantMessage -from mistralai.types import BaseModel - -# v2 -from mistralai.client import Mistral -from mistralai.client.models import UserMessage, AssistantMessage -from mistralai.client.types import BaseModel -``` - -### Quick Reference +All SDK imports move from `mistralai` to `mistralai.client`: | v1 | v2 | |---|---| @@ -33,9 +11,11 @@ from mistralai.client.types import BaseModel | `from mistralai.types import ...` | `from mistralai.client.types import ...` | | `from mistralai.utils import ...` | `from mistralai.client.utils import ...` | -### Azure & GCP Import Changes +`mistralai.extra` is unchanged (`RunContext`, `MCPClientSTDIO`, `MCPClientSSE`, `response_format_from_pydantic_model`, etc. stay at `mistralai.extra`). + +## Azure & GCP -Azure and GCP SDKs now live under the `mistralai` namespace as separate distributions: +Azure and GCP are now namespace sub-packages under `mistralai`, no longer separate top-level packages. | v1 | v2 | |---|---| @@ -43,38 +23,84 @@ Azure and GCP SDKs now live under the `mistralai` namespace as separate distribu | `from mistralai_azure.models import ...` | `from mistralai.azure.client.models import ...` | | `from mistralai_gcp import MistralGoogleCloud` | `from mistralai.gcp.client import MistralGCP` | | `from mistralai_gcp.models import ...` | `from mistralai.gcp.client.models import ...` | +GCP class renamed `MistralGoogleCloud` -> `MistralGCP`. -#### Installation Changes +## Type Renames -For GCP authentication dependencies, use `pip install "mistralai[gcp]"`. +42 request/response types renamed to follow `{Verb}{Entity}Request` / `{Verb}{Entity}Response` / `{Entity}` conventions. Core types (`Mistral`, `UserMessage`, `AssistantMessage`, `File`, `FunctionTool`, `ResponseFormat`, etc.) keep the same name — just different import path. -### What Stays the Same +Only one user-facing type rename: `Tools` -> `ConversationRequestTool`. -- The `Mistral` client API is unchanged -- All models (`UserMessage`, `AssistantMessage`, etc.) work the same way +
+Full rename table (42 schemas) -### Enums - -Enums now accept unknown values for forward compatibility with API changes. +| v1 | v2 | +|---|---| +| `AgentCreationRequest` | `CreateAgentRequest` | +| `AgentUpdateRequest` | `UpdateAgentRequest` | +| `ArchiveFTModelOut` | `ArchiveModelResponse` | +| `BatchJobIn` | `CreateBatchJobRequest` | +| `BatchJobOut` | `BatchJob` | +| `BatchJobsOut` | `ListBatchJobsResponse` | +| `CheckpointOut` | `Checkpoint` | +| `ClassifierDetailedJobOut` | `ClassifierFineTuningJobDetails` | +| `ClassifierFTModelOut` | `ClassifierFineTunedModel` | +| `ClassifierJobOut` | `ClassifierFineTuningJob` | +| `ClassifierTargetIn` | `ClassifierTarget` | +| `ClassifierTargetOut` | `ClassifierTargetResult` | +| `ClassifierTrainingParametersIn` | `ClassifierTrainingParameters` | +| `CompletionDetailedJobOut` | `CompletionFineTuningJobDetails` | +| `CompletionFTModelOut` | `CompletionFineTunedModel` | +| `CompletionJobOut` | `CompletionFineTuningJob` | +| `CompletionTrainingParametersIn` | `CompletionTrainingParameters` | +| `ConversationAppendRequestBase` | `AppendConversationRequest` | +| `ConversationRestartRequestBase` | `RestartConversationRequest` | +| `DeleteFileOut` | `DeleteFileResponse` | +| `DocumentOut` | `Document` | +| `DocumentUpdateIn` | `UpdateDocumentRequest` | +| `EventOut` | `Event` | +| `FTModelCapabilitiesOut` | `FineTunedModelCapabilities` | +| `FileSignedURL` | `GetSignedUrlResponse` | +| `GithubRepositoryOut` | `GithubRepository` | +| `JobIn` | `CreateFineTuningJobRequest` | +| `JobMetadataOut` | `JobMetadata` | +| `JobsOut` | `ListFineTuningJobsResponse` | +| `LegacyJobMetadataOut` | `LegacyJobMetadata` | +| `LibraryIn` | `CreateLibraryRequest` | +| `LibraryInUpdate` | `UpdateLibraryRequest` | +| `LibraryOut` | `Library` | +| `ListDocumentOut` | `ListDocumentsResponse` | +| `ListFilesOut` | `ListFilesResponse` | +| `ListLibraryOut` | `ListLibrariesResponse` | +| `MetricOut` | `Metric` | +| `RetrieveFileOut` | `RetrieveFileResponse` | +| `UnarchiveFTModelOut` | `UnarchiveModelResponse` | +| `UpdateFTModelIn` | `UpdateModelRequest` | +| `UploadFileOut` | `UploadFileResponse` | +| `WandbIntegrationOut` | `WandbIntegrationResult` | + +
+ +## Other Changes + +- `FunctionTool.type` changed from `Optional[FunctionToolType]` to `Literal["function"]` (functionally equivalent if you omit `type`) +- Enums now accept unknown values for forward compatibility with API changes +- Forward-compatible unions: discriminated unions get an `Unknown` variant + +## What Did NOT Change + +- All method names (`chat.complete`, `chat.stream`, `embeddings.create`, `fim.complete`, `files.upload`, `models.list`, `fine_tuning.jobs.create`, etc.) +- Zero endpoints added/removed, zero path changes +- Python minimum `>=3.10` +- Installation: `pip install mistralai` --- ## Migrating from v0.x to v1.x -Version 1.0 introduced significant changes to improve usability and consistency. - -> **Note:** The v1.x examples below use v1-style imports (e.g., `from mistralai import Mistral`). If you're on v2.x, combine these API changes with the [v1 to v2 import changes](#migrating-from-v1x-to-v2x) above. - -### Major Changes +> **Note:** The v1.x examples below use v1-style imports (e.g., `from mistralai import Mistral`). If you're on v2.x, combine these API changes with the [v1 to v2 import changes](#migration-guide-v1x-to-v2x) above. -1. **Unified Client Class**: `MistralClient` and `MistralAsyncClient` consolidated into a single `Mistral` class -2. **Method Structure**: Methods reorganized into resource-based groups (e.g., `client.chat.complete()`) -3. **Message Classes**: `ChatMessage` replaced with typed classes (`UserMessage`, `AssistantMessage`, etc.) -4. **Streaming Response**: Stream chunks now accessed via `chunk.data.choices[0].delta.content` - -### Method Mapping - -#### Sync Methods +`MistralClient`/`MistralAsyncClient` consolidated into `Mistral`. `ChatMessage` replaced with `UserMessage`, `AssistantMessage`, etc. Streaming chunks now at `chunk.data.choices[0].delta.content`. | v0.x | v1.x | |---|---| @@ -91,97 +117,3 @@ Version 1.0 introduced significant changes to improve usability and consistency. | `client.jobs.list` | `client.fine_tuning.jobs.list` | | `client.jobs.retrieve` | `client.fine_tuning.jobs.get` | | `client.jobs.cancel` | `client.fine_tuning.jobs.cancel` | - -#### Async Methods - -| v0.x | v1.x | -|---|---| -| `MistralAsyncClient` | `Mistral` | -| `async_client.chat` | `client.chat.complete_async` | -| `async_client.chat_stream` | `client.chat.stream_async` | -| `async_client.completions` | `client.fim.complete_async` | -| `async_client.completions_stream` | `client.fim.stream_async` | -| `async_client.embeddings` | `client.embeddings.create_async` | -| `async_client.list_models` | `client.models.list_async` | -| `async_client.files.create` | `client.files.upload_async` | -| `async_client.jobs.create` | `client.fine_tuning.jobs.create_async` | -| `async_client.jobs.list` | `client.fine_tuning.jobs.list_async` | -| `async_client.jobs.retrieve` | `client.fine_tuning.jobs.get_async` | -| `async_client.jobs.cancel` | `client.fine_tuning.jobs.cancel_async` | - -### Example: Non-Streaming Chat - -**v0.x:** -```python -from mistralai.client import MistralClient -from mistralai.models.chat_completion import ChatMessage - -client = MistralClient(api_key=api_key) - -messages = [ChatMessage(role="user", content="What is the best French cheese?")] -response = client.chat(model="mistral-large-latest", messages=messages) - -print(response.choices[0].message.content) -``` - -**v1.x:** -```python -from mistralai import Mistral, UserMessage - -client = Mistral(api_key=api_key) - -messages = [UserMessage(content="What is the best French cheese?")] -response = client.chat.complete(model="mistral-large-latest", messages=messages) - -print(response.choices[0].message.content) -``` - -### Example: Streaming Chat - -**v0.x:** -```python -from mistralai.client import MistralClient -from mistralai.models.chat_completion import ChatMessage - -client = MistralClient(api_key=api_key) -messages = [ChatMessage(role="user", content="What is the best French cheese?")] - -for chunk in client.chat_stream(model="mistral-large-latest", messages=messages): - print(chunk.choices[0].delta.content) -``` - -**v1.x:** -```python -from mistralai import Mistral, UserMessage - -client = Mistral(api_key=api_key) -messages = [UserMessage(content="What is the best French cheese?")] - -for chunk in client.chat.stream(model="mistral-large-latest", messages=messages): - print(chunk.data.choices[0].delta.content) # Note: chunk.data -``` - -### Example: Async Streaming - -**v0.x:** -```python -from mistralai.async_client import MistralAsyncClient -from mistralai.models.chat_completion import ChatMessage - -client = MistralAsyncClient(api_key=api_key) -messages = [ChatMessage(role="user", content="What is the best French cheese?")] - -async for chunk in client.chat_stream(model="mistral-large-latest", messages=messages): - print(chunk.choices[0].delta.content) -``` - -**v1.x:** -```python -from mistralai import Mistral, UserMessage - -client = Mistral(api_key=api_key) -messages = [UserMessage(content="What is the best French cheese?")] - -async for chunk in await client.chat.stream_async(model="mistral-large-latest", messages=messages): - print(chunk.data.choices[0].delta.content) -``` From 1ec7e90a8c918a6aa576d1a48990ee0de8243e4c Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Mon, 9 Mar 2026 19:06:57 +0100 Subject: [PATCH 02/82] chore: remove unnecessary opentelemetry-sdk and exporter dependencies (#406) --- pyproject.toml | 2 - src/mistralai/extra/observability/otel.py | 6 -- uv.lock | 87 ----------------------- 3 files changed, 95 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 56d23bb8..94572c05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,9 +13,7 @@ dependencies = [ "typing-inspection >=0.4.0", "pyyaml (>=6.0.2,<7.0.0)", "invoke (>=2.2.0,<3.0.0)", - "opentelemetry-sdk (>=1.33.1,<2.0.0)", "opentelemetry-api (>=1.33.1,<2.0.0)", - "opentelemetry-exporter-otlp-proto-http (>=1.37.0,<2.0.0)", "opentelemetry-semantic-conventions (>=0.59b0,<0.61)", ] diff --git a/src/mistralai/extra/observability/otel.py b/src/mistralai/extra/observability/otel.py index 4a8808ce..1f7e2c2f 100644 --- a/src/mistralai/extra/observability/otel.py +++ b/src/mistralai/extra/observability/otel.py @@ -11,7 +11,6 @@ import opentelemetry.semconv._incubating.attributes.http_attributes as http_attributes import opentelemetry.semconv.attributes.server_attributes as server_attributes from opentelemetry import propagate, trace -from opentelemetry.sdk.trace import SpanProcessor from opentelemetry.trace import Span, Status, StatusCode, Tracer, set_span_in_context logger = logging.getLogger(__name__) @@ -201,11 +200,6 @@ def enrich_span_from_response(tracer: trace.Tracer, span: Span, operation_id: st span.set_attributes(ocr_attributes) -class GenAISpanProcessor(SpanProcessor): - def on_start(self, span, parent_context = None): - span.set_attributes({"agent.trace.public": ""}) - - def get_or_create_otel_tracer() -> tuple[bool, Tracer]: """ Get a tracer from the current TracerProvider. diff --git a/uv.lock b/uv.lock index 7139deab..d10bd5b1 100644 --- a/uv.lock +++ b/uv.lock @@ -382,18 +382,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c6/97/451d55e05487a5cd6279a01a7e34921858b16f7dc8aa38a2c684743cd2b3/google_auth-2.45.0-py2.py3-none-any.whl", hash = "sha256:82344e86dc00410ef5382d99be677c6043d72e502b625aa4f4afa0bdacca0f36", size = 233312, upload-time = "2025-12-15T22:58:40.777Z" }, ] -[[package]] -name = "googleapis-common-protos" -version = "1.72.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "protobuf" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e5/7b/adfd75544c415c487b33061fe7ae526165241c1ea133f9a9125a56b39fd8/googleapis_common_protos-1.72.0.tar.gz", hash = "sha256:e55a601c1b32b52d7a3e65f43563e2aa61bcd737998ee672ac9b951cd49319f5", size = 147433, upload-time = "2025-11-06T18:29:24.087Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c4/ab/09169d5a4612a5f92490806649ac8d41e3ec9129c636754575b3553f4ea4/googleapis_common_protos-1.72.0-py3-none-any.whl", hash = "sha256:4299c5a82d5ae1a9702ada957347726b167f9f8d1fc352477702a1e851ff4038", size = 297515, upload-time = "2025-11-06T18:29:13.14Z" }, -] - [[package]] name = "griffe" version = "1.15.0" @@ -570,8 +558,6 @@ dependencies = [ { name = "httpx" }, { name = "invoke" }, { name = "opentelemetry-api" }, - { name = "opentelemetry-exporter-otlp-proto-http" }, - { name = "opentelemetry-sdk" }, { name = "opentelemetry-semantic-conventions" }, { name = "pydantic" }, { name = "python-dateutil" }, @@ -623,8 +609,6 @@ requires-dist = [ { name = "invoke", specifier = ">=2.2.0,<3.0.0" }, { name = "mcp", marker = "extra == 'agents'", specifier = ">=1.0,<2.0" }, { name = "opentelemetry-api", specifier = ">=1.33.1,<2.0.0" }, - { name = "opentelemetry-exporter-otlp-proto-http", specifier = ">=1.37.0,<2.0.0" }, - { name = "opentelemetry-sdk", specifier = ">=1.33.1,<2.0.0" }, { name = "opentelemetry-semantic-conventions", specifier = ">=0.59b0,<0.61" }, { name = "pydantic", specifier = ">=2.11.2" }, { name = "python-dateutil", specifier = ">=2.8.2" }, @@ -724,62 +708,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ae/a2/d86e01c28300bd41bab8f18afd613676e2bd63515417b77636fc1add426f/opentelemetry_api-1.38.0-py3-none-any.whl", hash = "sha256:2891b0197f47124454ab9f0cf58f3be33faca394457ac3e09daba13ff50aa582", size = 65947, upload-time = "2025-10-16T08:35:30.23Z" }, ] -[[package]] -name = "opentelemetry-exporter-otlp-proto-common" -version = "1.38.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "opentelemetry-proto" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/19/83/dd4660f2956ff88ed071e9e0e36e830df14b8c5dc06722dbde1841accbe8/opentelemetry_exporter_otlp_proto_common-1.38.0.tar.gz", hash = "sha256:e333278afab4695aa8114eeb7bf4e44e65c6607d54968271a249c180b2cb605c", size = 20431, upload-time = "2025-10-16T08:35:53.285Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a7/9e/55a41c9601191e8cd8eb626b54ee6827b9c9d4a46d736f32abc80d8039fc/opentelemetry_exporter_otlp_proto_common-1.38.0-py3-none-any.whl", hash = "sha256:03cb76ab213300fe4f4c62b7d8f17d97fcfd21b89f0b5ce38ea156327ddda74a", size = 18359, upload-time = "2025-10-16T08:35:34.099Z" }, -] - -[[package]] -name = "opentelemetry-exporter-otlp-proto-http" -version = "1.38.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "googleapis-common-protos" }, - { name = "opentelemetry-api" }, - { name = "opentelemetry-exporter-otlp-proto-common" }, - { name = "opentelemetry-proto" }, - { name = "opentelemetry-sdk" }, - { name = "requests" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/81/0a/debcdfb029fbd1ccd1563f7c287b89a6f7bef3b2902ade56797bfd020854/opentelemetry_exporter_otlp_proto_http-1.38.0.tar.gz", hash = "sha256:f16bd44baf15cbe07633c5112ffc68229d0edbeac7b37610be0b2def4e21e90b", size = 17282, upload-time = "2025-10-16T08:35:54.422Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e5/77/154004c99fb9f291f74aa0822a2f5bbf565a72d8126b3a1b63ed8e5f83c7/opentelemetry_exporter_otlp_proto_http-1.38.0-py3-none-any.whl", hash = "sha256:84b937305edfc563f08ec69b9cb2298be8188371217e867c1854d77198d0825b", size = 19579, upload-time = "2025-10-16T08:35:36.269Z" }, -] - -[[package]] -name = "opentelemetry-proto" -version = "1.38.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "protobuf" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/51/14/f0c4f0f6371b9cb7f9fa9ee8918bfd59ac7040c7791f1e6da32a1839780d/opentelemetry_proto-1.38.0.tar.gz", hash = "sha256:88b161e89d9d372ce723da289b7da74c3a8354a8e5359992be813942969ed468", size = 46152, upload-time = "2025-10-16T08:36:01.612Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b6/6a/82b68b14efca5150b2632f3692d627afa76b77378c4999f2648979409528/opentelemetry_proto-1.38.0-py3-none-any.whl", hash = "sha256:b6ebe54d3217c42e45462e2a1ae28c3e2bf2ec5a5645236a490f55f45f1a0a18", size = 72535, upload-time = "2025-10-16T08:35:45.749Z" }, -] - -[[package]] -name = "opentelemetry-sdk" -version = "1.38.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "opentelemetry-api" }, - { name = "opentelemetry-semantic-conventions" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/85/cb/f0eee1445161faf4c9af3ba7b848cc22a50a3d3e2515051ad8628c35ff80/opentelemetry_sdk-1.38.0.tar.gz", hash = "sha256:93df5d4d871ed09cb4272305be4d996236eedb232253e3ab864c8620f051cebe", size = 171942, upload-time = "2025-10-16T08:36:02.257Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2f/2e/e93777a95d7d9c40d270a371392b6d6f1ff170c2a3cb32d6176741b5b723/opentelemetry_sdk-1.38.0-py3-none-any.whl", hash = "sha256:1c66af6564ecc1553d72d811a01df063ff097cdc82ce188da9951f93b8d10f6b", size = 132349, upload-time = "2025-10-16T08:35:46.995Z" }, -] - [[package]] name = "opentelemetry-semantic-conventions" version = "0.59b0" @@ -820,21 +748,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] -[[package]] -name = "protobuf" -version = "6.33.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/34/44/e49ecff446afeec9d1a66d6bbf9adc21e3c7cea7803a920ca3773379d4f6/protobuf-6.33.2.tar.gz", hash = "sha256:56dc370c91fbb8ac85bc13582c9e373569668a290aa2e66a590c2a0d35ddb9e4", size = 444296, upload-time = "2025-12-06T00:17:53.311Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/bc/91/1e3a34881a88697a7354ffd177e8746e97a722e5e8db101544b47e84afb1/protobuf-6.33.2-cp310-abi3-win32.whl", hash = "sha256:87eb388bd2d0f78febd8f4c8779c79247b26a5befad525008e49a6955787ff3d", size = 425603, upload-time = "2025-12-06T00:17:41.114Z" }, - { url = "https://files.pythonhosted.org/packages/64/20/4d50191997e917ae13ad0a235c8b42d8c1ab9c3e6fd455ca16d416944355/protobuf-6.33.2-cp310-abi3-win_amd64.whl", hash = "sha256:fc2a0e8b05b180e5fc0dd1559fe8ebdae21a27e81ac77728fb6c42b12c7419b4", size = 436930, upload-time = "2025-12-06T00:17:43.278Z" }, - { url = "https://files.pythonhosted.org/packages/b2/ca/7e485da88ba45c920fb3f50ae78de29ab925d9e54ef0de678306abfbb497/protobuf-6.33.2-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d9b19771ca75935b3a4422957bc518b0cecb978b31d1dd12037b088f6bcc0e43", size = 427621, upload-time = "2025-12-06T00:17:44.445Z" }, - { url = "https://files.pythonhosted.org/packages/7d/4f/f743761e41d3b2b2566748eb76bbff2b43e14d5fcab694f494a16458b05f/protobuf-6.33.2-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:b5d3b5625192214066d99b2b605f5783483575656784de223f00a8d00754fc0e", size = 324460, upload-time = "2025-12-06T00:17:45.678Z" }, - { url = "https://files.pythonhosted.org/packages/b1/fa/26468d00a92824020f6f2090d827078c09c9c587e34cbfd2d0c7911221f8/protobuf-6.33.2-cp39-abi3-manylinux2014_s390x.whl", hash = "sha256:8cd7640aee0b7828b6d03ae518b5b4806fdfc1afe8de82f79c3454f8aef29872", size = 339168, upload-time = "2025-12-06T00:17:46.813Z" }, - { url = "https://files.pythonhosted.org/packages/56/13/333b8f421738f149d4fe5e49553bc2a2ab75235486259f689b4b91f96cec/protobuf-6.33.2-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:1f8017c48c07ec5859106533b682260ba3d7c5567b1ca1f24297ce03384d1b4f", size = 323270, upload-time = "2025-12-06T00:17:48.253Z" }, - { url = "https://files.pythonhosted.org/packages/0e/15/4f02896cc3df04fc465010a4c6a0cd89810f54617a32a70ef531ed75d61c/protobuf-6.33.2-py3-none-any.whl", hash = "sha256:7636aad9bb01768870266de5dc009de2d1b936771b38a793f73cbbf279c91c5c", size = 170501, upload-time = "2025-12-06T00:17:52.211Z" }, -] - [[package]] name = "pyasn1" version = "0.6.1" From 7a6c9274fa9b0c903b5fb1da6e99497127c3f2fc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:27:37 +0100 Subject: [PATCH 03/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.0.0=20(#409)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.conversations.start()`: * `request` **Changed** (Breaking ⚠️) * `response` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.conversations.append()`: * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️) * `response` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.conversations.get_history()`: * `response.entries[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.conversations.get_messages()`: * `response.messages[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.conversations.restart()`: * `request` **Changed** (Breaking ⚠️) * `response` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.agents.stream()`: * `request.messages[].union(tool).content.union(Array)[]` **Changed** * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.agents.complete()`: * `request.messages[]` **Changed** * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.fim.stream()`: * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.fim.complete()`: * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.chat.stream()`: * `request.messages[]` **Changed** * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.chat.complete()`: * `request.messages[].union(tool).content.union(Array)[]` **Changed** * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.conversations.restart_stream()`: * `request` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.conversations.append_stream()`: * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.conversations.start_stream()`: * `request` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️) * `error.detail[]` **Changed** * `mistral.beta.connectors.delete()`: **Added** * `mistral.beta.conversations.delete()`: `error.detail[]` **Changed** * `mistral.beta.observability.judges.delete()`: **Added** * `mistral.beta.observability.judges.update()`: **Added** * `mistral.beta.observability.campaigns.create()`: **Added** * `mistral.beta.observability.campaigns.list()`: **Added** * `mistral.beta.observability.campaigns.fetch()`: **Added** * `mistral.beta.observability.campaigns.delete()`: **Added** * `mistral.beta.observability.campaigns.fetch_status()`: **Added** * `mistral.beta.observability.campaigns.list_events()`: **Added** * `mistral.beta.observability.datasets.create()`: **Added** * `mistral.beta.observability.datasets.list()`: **Added** * `mistral.beta.observability.datasets.fetch()`: **Added** * `mistral.beta.observability.datasets.delete()`: **Added** * `mistral.beta.observability.datasets.update()`: **Added** * `mistral.beta.observability.datasets.list_records()`: **Added** * `mistral.beta.observability.datasets.create_record()`: **Added** * `mistral.beta.observability.datasets.import_from_campaign()`: **Added** * `mistral.beta.observability.datasets.import_from_explorer()`: **Added** * `mistral.beta.observability.datasets.import_from_file()`: **Added** * `mistral.beta.observability.datasets.import_from_playground()`: **Added** * `mistral.beta.observability.datasets.import_from_dataset_records()`: **Added** * `mistral.beta.observability.datasets.export_to_jsonl()`: **Added** * `mistral.beta.observability.datasets.fetch_task()`: **Added** * `mistral.beta.observability.datasets.list_tasks()`: **Added** * `mistral.beta.observability.datasets.records.fetch()`: **Added** * `mistral.beta.observability.datasets.records.delete()`: **Added** * `mistral.beta.observability.datasets.records.bulk_delete()`: **Added** * `mistral.beta.observability.datasets.records.judge()`: **Added** * `mistral.beta.observability.datasets.records.update_payload()`: **Added** * `mistral.beta.observability.datasets.records.update_properties()`: **Added** * `mistral.beta.connectors.create()`: **Added** * `mistral.beta.connectors.list()`: **Added** * `mistral.beta.connectors.call_tool()`: **Added** * `mistral.beta.connectors.get()`: **Added** * `mistral.beta.connectors.update()`: **Added** * `mistral.beta.observability.judges.list()`: **Added** * `mistral.models.list()`: * `request` **Changed** * `error.status[422]` **Added** * `mistral.models.retrieve()`: `error.detail[]` **Changed** * `mistral.beta.observability.judges.create()`: **Added** * `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: **Added** * `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: **Added** * `mistral.models.delete()`: `error.detail[]` **Changed** * `mistral.beta.conversations.list()`: * `response.[].union(ModelConversation).guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.conversations.get()`: * `response.union(ModelConversation).guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.observability.judges.fetch()`: **Added** * `mistral.beta.agents.create()`: * `request.guardrails` **Added** * `response.guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.agents.list()`: * `response.[].guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.agents.get()`: * `response.guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.agents.update()`: * `request.guardrails` **Added** * `response.guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.agents.delete()`: `error.detail[]` **Changed** * `mistral.beta.agents.update_version()`: * `response.guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.agents.list_versions()`: * `response.[].guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.agents.get_version()`: * `response.guardrails` **Added** * `error.detail[]` **Changed** * `mistral.beta.agents.create_version_alias()`: `error.detail[]` **Changed** * `mistral.beta.agents.list_version_aliases()`: `error.detail[]` **Changed** * `mistral.beta.agents.delete_version_alias()`: `error.detail[]` **Changed** * `mistral.beta.libraries.create()`: `error.detail[]` **Changed** * `mistral.beta.libraries.get()`: `error.detail[]` **Changed** * `mistral.beta.libraries.delete()`: `error.detail[]` **Changed** * `mistral.beta.libraries.update()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.list()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.upload()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.get()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.update()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.delete()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.text_content()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.status()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.get_signed_url()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.extracted_text_signed_url()`: `error.detail[]` **Changed** * `mistral.beta.libraries.documents.reprocess()`: `error.detail[]` **Changed** * `mistral.beta.libraries.accesses.list()`: `error.detail[]` **Changed** * `mistral.beta.libraries.accesses.update_or_create()`: `error.detail[]` **Changed** * `mistral.beta.libraries.accesses.delete()`: `error.detail[]` **Changed** * `mistral.files.upload()`: * `request` **Changed** * `response` **Changed** * `mistral.files.list()`: `response.data[]` **Changed** * `mistral.files.retrieve()`: `response` **Changed** * `mistral.beta.observability.chat_completion_events.fields.list()`: **Added** * `mistral.beta.observability.chat_completion_events.judge()`: **Added** * `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: **Added** * `mistral.beta.observability.chat_completion_events.fetch()`: **Added** * `mistral.beta.observability.chat_completion_events.search_ids()`: **Added** * `mistral.beta.observability.chat_completion_events.search()`: **Added** * `mistral.embeddings.create()`: `error.detail[]` **Changed** * `mistral.classifiers.moderate()`: `error.detail[]` **Changed** * `mistral.classifiers.moderate_chat()`: * `request.inputs.union(Array<>)[]` **Changed** * `error.detail[]` **Changed** * `mistral.classifiers.classify()`: `error.detail[]` **Changed** * `mistral.classifiers.classify_chat()`: * `request.input.union(Array)[].messages[].union(tool).content.union(Array)[]` **Changed** * `error.detail[]` **Changed** * `mistral.ocr.process()`: `error.detail[]` **Changed** * chore: align pyproject.toml and uv.lock to version 2.0.0 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 2109 ++++++++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- README.md | 78 +- RELEASES.md | 12 +- USAGE.md | 4 +- docs/errors/observabilityerror.md | 8 + docs/models/agent.md | 1 + docs/models/and_.md | 17 + docs/models/annotations.md | 10 + docs/models/answer.md | 17 + docs/models/audience.md | 9 + docs/models/audiocontent.md | 15 + docs/models/audiourl.md | 13 + docs/models/audiourlchunk.md | 15 + docs/models/audiourlunion.md | 17 + docs/models/authdata.md | 9 + docs/models/basefielddefinition.md | 12 + docs/models/basetaskstatus.md | 15 + docs/models/blobresourcecontents.md | 14 + docs/models/campaign.md | 18 + docs/models/chatcompletionevent.md | 18 + docs/models/chatcompletioneventextrafields.md | 41 + docs/models/chatcompletioneventpreview.md | 13 + .../chatcompletioneventpreviewextrafields.md | 41 + docs/models/chattranscriptionevent.md | 10 + docs/models/connector.md | 15 + docs/models/connectorcalltoolrequest.md | 10 + docs/models/connectorcalltoolv1request.md | 10 + docs/models/connectordeletev1request.md | 8 + docs/models/connectorgetv1request.md | 10 + docs/models/connectorlistv1request.md | 10 + docs/models/connectorsqueryfilters.md | 9 + docs/models/connectortool.md | 18 + docs/models/connectortoolcallmetadata.md | 14 + docs/models/connectortoolcallresponse.md | 18 + .../connectortoolcallresponsecontent.md | 35 + docs/models/connectortoollocale.md | 10 + docs/models/connectortoolresultmetadata.md | 13 + docs/models/connectorupdatev1request.md | 9 + docs/models/contentchunk.md | 6 + docs/models/context.md | 7 + docs/models/conversationpayload.md | 9 + docs/models/conversationrequest.md | 1 + docs/models/conversationresponse.md | 13 +- ...utput.md => conversationresponseoutput.md} | 2 +- docs/models/conversationrestartrequest.md | 1 + .../conversationrestartstreamrequest.md | 1 + docs/models/conversationsource.md | 11 + docs/models/conversationstreamrequest.md | 1 + docs/models/createagentrequest.md | 1 + docs/models/createcampaignrequest.md | 12 + docs/models/createconnectorrequest.md | 15 + docs/models/createdatasetrecordrequest.md | 9 + ...litydatasetsdatasetidrecordspostrequest.md | 9 + docs/models/createdatasetrequest.md | 9 + docs/models/createfileresponse.md | 28 +- .../createfinetuningjobrequestrepository.md | 4 +- ...in.md => creategithubrepositoryrequest.md} | 2 +- docs/models/createjudgerequest.md | 13 + docs/models/createjudgerequestoutput.md | 17 + docs/models/dataset.md | 15 + docs/models/datasetimporttask.md | 17 + docs/models/datasetpreview.md | 15 + docs/models/datasetrecord.md | 15 + ...abilitycampaignscampaigniddeleterequest.md | 8 + docs/models/deletedatasetrecordsrequest.md | 8 + ...asetrecordsdatasetrecordiddeleterequest.md | 8 + ...rvabilitydatasetsdatasetiddeleterequest.md | 8 + ...observabilityjudgesjudgeiddeleterequest.md | 8 + ...letemodelout.md => deletemodelresponse.md} | 2 +- docs/models/embeddedresource.md | 17 + docs/models/executionconfig.md | 13 + docs/models/exportdatasetresponse.md | 8 + ...tasetsdatasetidexportstojsonlgetrequest.md | 8 + .../feedresultchatcompletioneventpreview.md | 10 + docs/models/fetchcampaignstatusresponse.md | 8 + ...fetchchatcompletionfieldoptionsresponse.md | 8 + docs/models/fetchfieldoptioncountsrequest.md | 8 + docs/models/fetchfieldoptioncountsresponse.md | 8 + docs/models/fieldgroup.md | 9 + docs/models/fieldoptioncountitem.md | 9 + .../filesapiroutesuploadfilefilevisibility.md | 9 + docs/models/fileschema.md | 28 +- docs/models/filevisibility.md | 9 + docs/models/filtercondition.md | 10 + docs/models/filtergroup.md | 9 + docs/models/filterpayload.md | 8 + docs/models/filters.md | 17 + ...ervabilitycampaignscampaignidgetrequest.md | 8 + ...aignscampaignidselectedeventsgetrequest.md | 10 + ...litycampaignscampaignidstatusgetrequest.md | 8 + ...aignsv1observabilitycampaignsgetrequest.md | 10 + ...ychatcompletioneventssearchpostrequest.md} | 8 +- ...tychatcompletioneventseventidgetrequest.md | 8 + ...fieldsfieldnameoptionscountspostrequest.md | 9 + ...pletionfieldsfieldnameoptionsgetrequest.md | 9 + ...bservabilitydatasetsdatasetidgetrequest.md | 8 + ...abilitydatasetsdatasetidtasksgetrequest.md | 10 + ...ydatasetsdatasetidtaskstaskidgetrequest.md | 9 + ...ilitydatasetsdatasetidrecordsgetrequest.md | 10 + ...datasetrecordsdatasetrecordidgetrequest.md | 8 + ...tasetsv1observabilitydatasetsgetrequest.md | 10 + docs/models/getfileresponse.md | 30 +- ...dv1observabilityjudgesjudgeidgetrequest.md | 8 + ...etjudgesv1observabilityjudgesgetrequest.md | 12 + ...ioneventseventidsimilareventsgetrequest.md | 8 + docs/models/guardrail.md | 7 + docs/models/guardrailconfig.md | 9 + docs/models/imagecontent.md | 15 + .../importdatasetfromcampaignrequest.md | 8 + .../models/importdatasetfromdatasetrequest.md | 8 + .../importdatasetfromexplorerrequest.md | 8 + docs/models/importdatasetfromfilerequest.md | 8 + .../importdatasetfromplaygroundrequest.md | 8 + docs/models/judge.md | 22 + .../models/judgechatcompletioneventrequest.md | 8 + ...tioneventseventidlivejudgingpostrequest.md | 9 + docs/models/judgeclassificationoutput.md | 9 + .../models/judgeclassificationoutputoption.md | 9 + docs/models/judgedatasetrecordrequest.md | 8 + ...dsdatasetrecordidlivejudgingpostrequest.md | 9 + docs/models/judgeoutput.md | 9 + docs/models/judgeoutputtype.md | 9 + docs/models/judgeoutputunion.md | 17 + docs/models/judgeregressionoutput.md | 12 + docs/models/librariessharecreatev1request.md | 8 +- .../listcampaignselectedeventsresponse.md | 8 + docs/models/listcampaignsresponse.md | 8 + .../listchatcompletionfieldsresponse.md | 9 + docs/models/listdatasetimporttasksresponse.md | 8 + docs/models/listdatasetrecordsresponse.md | 8 + docs/models/listdatasetsresponse.md | 8 + docs/models/listjudgesresponse.md | 8 + docs/models/listmodelsv1modelsgetrequest.md | 9 + docs/models/listsharingresponse.md | 8 + docs/models/mcpservericon.md | 13 + docs/models/messageinputcontentchunks.md | 4 +- docs/models/messageoutputcontentchunks.md | 4 +- docs/models/messageresponse.md | 8 + docs/models/modelconversation.md | 1 + docs/models/moderationllmv1action.md | 9 + .../moderationllmv1categorythresholds.md | 16 + docs/models/moderationllmv1config.md | 11 + docs/models/multipartbodyparams.md | 2 + docs/models/observabilityerrorcode.md | 50 + docs/models/observabilityerrordetail.md | 9 + docs/models/op.md | 26 + docs/models/operator.md | 28 + docs/models/option.md | 17 + docs/models/or_.md | 17 + docs/models/outputcontentchunks.md | 4 +- docs/models/paginatedconnectors.md | 9 + docs/models/paginatedresultcampaignpreview.md | 11 + ...ginatedresultchatcompletioneventpreview.md | 11 + .../paginatedresultdatasetimporttask.md | 11 + docs/models/paginatedresultdatasetpreview.md | 11 + docs/models/paginatedresultdatasetrecord.md | 11 + docs/models/paginatedresultjudgepreview.md | 11 + docs/models/paginationresponse.md | 9 + ...datasetidimportsfromcampaignpostrequest.md | 9 + ...sdatasetidimportsfromdatasetpostrequest.md | 9 + ...datasetidimportsfromexplorerpostrequest.md | 9 + ...setsdatasetidimportsfromfilepostrequest.md | 9 + ...tasetidimportsfromplaygroundpostrequest.md | 9 + ...essingstatusout.md => processingstatus.md} | 2 +- docs/models/resource.md | 17 + docs/models/resourcelink.md | 22 + docs/models/resourcevisibility.md | 11 + .../searchchatcompletioneventidsrequest.md | 9 + .../searchchatcompletioneventidsresponse.md | 8 + ...d => searchchatcompletioneventsrequest.md} | 5 +- .../searchchatcompletioneventsresponse.md | 8 + docs/models/{sharingout.md => sharing.md} | 2 +- .../{sharingin.md => sharingrequest.md} | 2 +- docs/models/supportedoperator.md | 26 + docs/models/textcontent.md | 14 + docs/models/textresourcecontents.md | 14 + docs/models/thinkchunk.md | 4 +- docs/models/thinkchunkthinking.md | 17 - ...ationthinkchunkthinking.md => thinking.md} | 8 +- docs/models/typeenum.md | 14 + docs/models/updateagentrequest.md | 1 + docs/models/updateconnectorrequest.md | 16 + .../updatedatasetrecordpayloadrequest.md | 8 + ...recordsdatasetrecordidpayloadputrequest.md | 9 + .../updatedatasetrecordpropertiesrequest.md | 8 + ...ordsdatasetrecordidpropertiesputrequest.md | 9 + docs/models/updatedatasetrequest.md | 9 + ...ervabilitydatasetsdatasetidpatchrequest.md | 9 + docs/models/updatejudgerequest.md | 13 + docs/models/updatejudgerequestoutput.md | 17 + ...ev1observabilityjudgesjudgeidputrequest.md | 9 + docs/models/validationerror.md | 12 +- docs/sdks/accesses/README.md | 6 +- docs/sdks/betaagents/README.md | 2 + docs/sdks/campaigns/README.md | 267 ++ docs/sdks/chatcompletionevents/README.md | 244 ++ docs/sdks/connectors/README.md | 282 ++ docs/sdks/conversations/README.md | 4 + docs/sdks/datasets/README.md | 669 ++++ docs/sdks/documents/README.md | 2 +- docs/sdks/fields/README.md | 133 + docs/sdks/files/README.md | 4 +- docs/sdks/judges/README.md | 236 ++ docs/sdks/models/README.md | 11 +- docs/sdks/records/README.md | 277 ++ pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/accesses.py | 32 +- src/mistralai/client/beta.py | 9 + src/mistralai/client/beta_agents.py | 28 + src/mistralai/client/campaigns.py | 1150 +++++++ .../client/chat_completion_events.py | 1030 ++++++ src/mistralai/client/connectors.py | 1292 +++++++ src/mistralai/client/conversations.py | 56 + src/mistralai/client/datasets.py | 2972 +++++++++++++++++ src/mistralai/client/documents.py | 8 +- src/mistralai/client/errors/__init__.py | 5 + .../client/errors/observabilityerror.py | 32 + src/mistralai/client/fields.py | 588 ++++ src/mistralai/client/files.py | 16 + src/mistralai/client/judges.py | 1038 ++++++ src/mistralai/client/models/__init__.py | 1188 ++++++- src/mistralai/client/models/agent.py | 14 +- src/mistralai/client/models/annotations.py | 77 + src/mistralai/client/models/audiocontent.py | 94 + src/mistralai/client/models/audiourl.py | 26 + src/mistralai/client/models/audiourlchunk.py | 53 + src/mistralai/client/models/authdata.py | 17 + .../client/models/basefielddefinition.py | 100 + src/mistralai/client/models/basetaskstatus.py | 21 + .../client/models/blobresourcecontents.py | 87 + src/mistralai/client/models/campaign.py | 62 + .../client/models/chatcompletionevent.py | 61 + .../models/chatcompletioneventpreview.py | 43 + .../client/models/chattranscriptionevent.py | 21 + src/mistralai/client/models/connector.py | 70 + .../client/models/connector_call_tool_v1op.py | 32 + .../client/models/connector_delete_v1op.py | 17 + .../client/models/connector_get_v1op.py | 51 + .../client/models/connector_list_v1op.py | 67 + .../client/models/connector_update_v1op.py | 27 + .../client/models/connectorcalltoolrequest.py | 36 + .../client/models/connectorsqueryfilters.py | 57 + src/mistralai/client/models/connectortool.py | 83 + .../models/connectortoolcallmetadata.py | 80 + .../models/connectortoolcallresponse.py | 149 + .../client/models/connectortoollocale.py | 21 + .../models/connectortoolresultmetadata.py | 84 + src/mistralai/client/models/contentchunk.py | 4 + .../client/models/conversationpayload.py | 30 + .../client/models/conversationrequest.py | 6 + .../client/models/conversationresponse.py | 46 +- .../models/conversationrestartrequest.py | 9 +- .../conversationrestartstreamrequest.py | 9 +- .../client/models/conversationsource.py | 17 + .../models/conversationstreamrequest.py | 6 + .../client/models/conversationthinkchunk.py | 65 - ...lity_datasets_dataset_id_records_postop.py | 29 + .../client/models/createagentrequest.py | 14 +- .../client/models/createcampaignrequest.py | 27 + .../client/models/createconnectorrequest.py | 86 + .../models/createdatasetrecordrequest.py | 19 + .../client/models/createdatasetrequest.py | 17 + .../client/models/createfileresponse.py | 15 +- .../models/createfinetuningjobrequest.py | 9 +- ...in.py => creategithubrepositoryrequest.py} | 8 +- .../client/models/createjudgerequest.py | 47 + src/mistralai/client/models/dataset.py | 51 + .../client/models/datasetimporttask.py | 75 + src/mistralai/client/models/datasetpreview.py | 51 + src/mistralai/client/models/datasetrecord.py | 54 + ...vability_campaigns_campaign_id_deleteop.py | 17 + ...aset_records_dataset_record_id_deleteop.py | 21 + ...ervability_datasets_dataset_id_deleteop.py | 17 + ..._observability_judges_judge_id_deleteop.py | 17 + .../models/deletedatasetrecordsrequest.py | 15 + ...letemodelout.py => deletemodelresponse.py} | 6 +- .../client/models/embeddedresource.py | 110 + .../client/models/executionconfig.py | 40 + ...asets_dataset_id_exports_to_jsonl_getop.py | 21 + .../client/models/exportdatasetresponse.py | 14 + .../feedresultchatcompletioneventpreview.py | 57 + .../models/fetchcampaignstatusresponse.py | 15 + ...fetchchatcompletionfieldoptionsresponse.py | 53 + .../models/fetchfieldoptioncountsrequest.py | 47 + .../models/fetchfieldoptioncountsresponse.py | 16 + src/mistralai/client/models/fieldgroup.py | 17 + .../client/models/fieldoptioncountitem.py | 17 + .../models/files_api_routes_upload_fileop.py | 37 +- src/mistralai/client/models/fileschema.py | 15 +- src/mistralai/client/models/filevisibility.py | 15 + .../client/models/filtercondition.py | 47 + src/mistralai/client/models/filtergroup.py | 74 + src/mistralai/client/models/filterpayload.py | 40 + ...servability_campaigns_campaign_id_getop.py | 17 + ...aigns_campaign_id_selected_events_getop.py | 51 + ...lity_campaigns_campaign_id_status_getop.py | 21 + ...paigns_v1_observability_campaigns_getop.py | 63 + ...y_chat_completion_events_event_id_getop.py | 21 + ...ty_chat_completion_events_search_postop.py | 71 + ...fields_field_name_options_counts_postop.py | 31 + ...pletion_fields_field_name_options_getop.py | 53 + ...observability_datasets_dataset_id_getop.py | 17 + ...datasets_dataset_id_tasks_task_id_getop.py | 26 + ...ability_datasets_dataset_id_tasks_getop.py | 49 + ...dataset_records_dataset_record_id_getop.py | 19 + ...ility_datasets_dataset_id_records_getop.py | 49 + ...atasets_v1_observability_datasets_getop.py | 63 + ..._v1_observability_judges_judge_id_getop.py | 17 + ...et_judges_v1_observability_judges_getop.py | 80 + ...on_events_event_id_similar_events_getop.py | 21 + .../client/models/getfileresponse.py | 15 +- .../client/models/guardrailconfig.py | 47 + src/mistralai/client/models/imagecontent.py | 94 + .../importdatasetfromcampaignrequest.py | 14 + .../models/importdatasetfromdatasetrequest.py | 15 + .../importdatasetfromexplorerrequest.py | 15 + .../models/importdatasetfromfilerequest.py | 14 + .../importdatasetfromplaygroundrequest.py | 15 + src/mistralai/client/models/judge.py | 136 + ...ion_events_event_id_live_judging_postop.py | 31 + ...s_dataset_record_id_live_judging_postop.py | 31 + .../models/judgechatcompletioneventrequest.py | 15 + .../models/judgeclassificationoutput.py | 36 + .../models/judgeclassificationoutputoption.py | 17 + .../models/judgedatasetrecordrequest.py | 15 + src/mistralai/client/models/judgeoutput.py | 24 + .../client/models/judgeoutputtype.py | 11 + .../client/models/judgeregressionoutput.py | 56 + .../models/libraries_share_create_v1op.py | 9 +- .../models/list_models_v1_models_getop.py | 56 + .../listcampaignselectedeventsresponse.py | 18 + .../client/models/listcampaignsresponse.py | 18 + .../listchatcompletionfieldsresponse.py | 20 + .../models/listdatasetimporttasksresponse.py | 18 + .../models/listdatasetrecordsresponse.py | 18 + .../client/models/listdatasetsresponse.py | 18 + .../client/models/listjudgesresponse.py | 18 + src/mistralai/client/models/listsharingout.py | 16 - .../client/models/listsharingresponse.py | 16 + src/mistralai/client/models/mcpservericon.py | 82 + .../models/messageinputcontentchunks.py | 15 +- .../models/messageoutputcontentchunks.py | 9 +- .../client/models/messageresponse.py | 14 + .../client/models/modelconversation.py | 9 +- .../client/models/moderationllmv1action.py | 15 + .../moderationllmv1categorythresholds.py | 94 + .../client/models/moderationllmv1config.py | 78 + .../client/models/observabilityerrorcode.py | 56 + .../client/models/observabilityerrordetail.py | 33 + .../client/models/outputcontentchunks.py | 9 +- .../client/models/paginatedconnectors.py | 20 + .../models/paginatedresultcampaignpreview.py | 57 + ...ginatedresultchatcompletioneventpreview.py | 60 + .../paginatedresultdatasetimporttask.py | 57 + .../models/paginatedresultdatasetpreview.py | 57 + .../models/paginatedresultdatasetrecord.py | 57 + .../models/paginatedresultjudgepreview.py | 57 + .../client/models/paginationresponse.py | 49 + ...dataset_id_imports_from_campaign_postop.py | 31 + ..._dataset_id_imports_from_dataset_postop.py | 31 + ...dataset_id_imports_from_explorer_postop.py | 31 + ...ets_dataset_id_imports_from_file_postop.py | 31 + ...taset_id_imports_from_playground_postop.py | 31 + ...essingstatusout.py => processingstatus.py} | 6 +- src/mistralai/client/models/resourcelink.py | 140 + .../client/models/resourcevisibility.py | 17 + .../searchchatcompletioneventidsrequest.py | 51 + .../searchchatcompletioneventidsresponse.py | 15 + .../searchchatcompletioneventsrequest.py | 51 + .../searchchatcompletioneventsresponse.py | 18 + .../models/{sharingout.py => sharing.py} | 6 +- .../{sharingin.py => sharingrequest.py} | 6 +- src/mistralai/client/models/textcontent.py | 91 + .../client/models/textresourcecontents.py | 87 + src/mistralai/client/models/thinkchunk.py | 20 +- ...records_dataset_record_id_payload_putop.py | 31 + ...ords_dataset_record_id_properties_putop.py | 33 + ...servability_datasets_dataset_id_patchop.py | 24 + ..._v1_observability_judges_judge_id_putop.py | 24 + .../client/models/updateagentrequest.py | 6 + .../client/models/updateconnectorrequest.py | 114 + .../updatedatasetrecordpayloadrequest.py | 15 + .../updatedatasetrecordpropertiesrequest.py | 15 + .../client/models/updatedatasetrequest.py | 49 + .../client/models/updatejudgerequest.py | 47 + .../client/models/validationerror.py | 37 +- src/mistralai/client/models_.py | 48 +- src/mistralai/client/observability.py | 32 + src/mistralai/client/records.py | 1178 +++++++ uv.lock | 2 +- 393 files changed, 22821 insertions(+), 577 deletions(-) create mode 100644 docs/errors/observabilityerror.md create mode 100644 docs/models/and_.md create mode 100644 docs/models/annotations.md create mode 100644 docs/models/answer.md create mode 100644 docs/models/audience.md create mode 100644 docs/models/audiocontent.md create mode 100644 docs/models/audiourl.md create mode 100644 docs/models/audiourlchunk.md create mode 100644 docs/models/audiourlunion.md create mode 100644 docs/models/authdata.md create mode 100644 docs/models/basefielddefinition.md create mode 100644 docs/models/basetaskstatus.md create mode 100644 docs/models/blobresourcecontents.md create mode 100644 docs/models/campaign.md create mode 100644 docs/models/chatcompletionevent.md create mode 100644 docs/models/chatcompletioneventextrafields.md create mode 100644 docs/models/chatcompletioneventpreview.md create mode 100644 docs/models/chatcompletioneventpreviewextrafields.md create mode 100644 docs/models/chattranscriptionevent.md create mode 100644 docs/models/connector.md create mode 100644 docs/models/connectorcalltoolrequest.md create mode 100644 docs/models/connectorcalltoolv1request.md create mode 100644 docs/models/connectordeletev1request.md create mode 100644 docs/models/connectorgetv1request.md create mode 100644 docs/models/connectorlistv1request.md create mode 100644 docs/models/connectorsqueryfilters.md create mode 100644 docs/models/connectortool.md create mode 100644 docs/models/connectortoolcallmetadata.md create mode 100644 docs/models/connectortoolcallresponse.md create mode 100644 docs/models/connectortoolcallresponsecontent.md create mode 100644 docs/models/connectortoollocale.md create mode 100644 docs/models/connectortoolresultmetadata.md create mode 100644 docs/models/connectorupdatev1request.md create mode 100644 docs/models/context.md create mode 100644 docs/models/conversationpayload.md rename docs/models/{output.md => conversationresponseoutput.md} (93%) create mode 100644 docs/models/conversationsource.md create mode 100644 docs/models/createcampaignrequest.md create mode 100644 docs/models/createconnectorrequest.md create mode 100644 docs/models/createdatasetrecordrequest.md create mode 100644 docs/models/createdatasetrecordv1observabilitydatasetsdatasetidrecordspostrequest.md create mode 100644 docs/models/createdatasetrequest.md rename docs/models/{githubrepositoryin.md => creategithubrepositoryrequest.md} (96%) create mode 100644 docs/models/createjudgerequest.md create mode 100644 docs/models/createjudgerequestoutput.md create mode 100644 docs/models/dataset.md create mode 100644 docs/models/datasetimporttask.md create mode 100644 docs/models/datasetpreview.md create mode 100644 docs/models/datasetrecord.md create mode 100644 docs/models/deletecampaignv1observabilitycampaignscampaigniddeleterequest.md create mode 100644 docs/models/deletedatasetrecordsrequest.md create mode 100644 docs/models/deletedatasetrecordv1observabilitydatasetrecordsdatasetrecordiddeleterequest.md create mode 100644 docs/models/deletedatasetv1observabilitydatasetsdatasetiddeleterequest.md create mode 100644 docs/models/deletejudgev1observabilityjudgesjudgeiddeleterequest.md rename docs/models/{deletemodelout.md => deletemodelresponse.md} (98%) create mode 100644 docs/models/embeddedresource.md create mode 100644 docs/models/executionconfig.md create mode 100644 docs/models/exportdatasetresponse.md create mode 100644 docs/models/exportdatasettojsonlv1observabilitydatasetsdatasetidexportstojsonlgetrequest.md create mode 100644 docs/models/feedresultchatcompletioneventpreview.md create mode 100644 docs/models/fetchcampaignstatusresponse.md create mode 100644 docs/models/fetchchatcompletionfieldoptionsresponse.md create mode 100644 docs/models/fetchfieldoptioncountsrequest.md create mode 100644 docs/models/fetchfieldoptioncountsresponse.md create mode 100644 docs/models/fieldgroup.md create mode 100644 docs/models/fieldoptioncountitem.md create mode 100644 docs/models/filesapiroutesuploadfilefilevisibility.md create mode 100644 docs/models/filevisibility.md create mode 100644 docs/models/filtercondition.md create mode 100644 docs/models/filtergroup.md create mode 100644 docs/models/filterpayload.md create mode 100644 docs/models/filters.md create mode 100644 docs/models/getcampaignbyidv1observabilitycampaignscampaignidgetrequest.md create mode 100644 docs/models/getcampaignselectedeventsv1observabilitycampaignscampaignidselectedeventsgetrequest.md create mode 100644 docs/models/getcampaignstatusbyidv1observabilitycampaignscampaignidstatusgetrequest.md create mode 100644 docs/models/getcampaignsv1observabilitycampaignsgetrequest.md rename docs/models/{conversationthinkchunk.md => getchatcompletioneventsv1observabilitychatcompletioneventssearchpostrequest.md} (73%) create mode 100644 docs/models/getchatcompletioneventv1observabilitychatcompletioneventseventidgetrequest.md create mode 100644 docs/models/getchatcompletionfieldoptionscountsv1observabilitychatcompletionfieldsfieldnameoptionscountspostrequest.md create mode 100644 docs/models/getchatcompletionfieldoptionsv1observabilitychatcompletionfieldsfieldnameoptionsgetrequest.md create mode 100644 docs/models/getdatasetbyidv1observabilitydatasetsdatasetidgetrequest.md create mode 100644 docs/models/getdatasetimporttasksv1observabilitydatasetsdatasetidtasksgetrequest.md create mode 100644 docs/models/getdatasetimporttaskv1observabilitydatasetsdatasetidtaskstaskidgetrequest.md create mode 100644 docs/models/getdatasetrecordsv1observabilitydatasetsdatasetidrecordsgetrequest.md create mode 100644 docs/models/getdatasetrecordv1observabilitydatasetrecordsdatasetrecordidgetrequest.md create mode 100644 docs/models/getdatasetsv1observabilitydatasetsgetrequest.md create mode 100644 docs/models/getjudgebyidv1observabilityjudgesjudgeidgetrequest.md create mode 100644 docs/models/getjudgesv1observabilityjudgesgetrequest.md create mode 100644 docs/models/getsimilarchatcompletioneventsv1observabilitychatcompletioneventseventidsimilareventsgetrequest.md create mode 100644 docs/models/guardrail.md create mode 100644 docs/models/guardrailconfig.md create mode 100644 docs/models/imagecontent.md create mode 100644 docs/models/importdatasetfromcampaignrequest.md create mode 100644 docs/models/importdatasetfromdatasetrequest.md create mode 100644 docs/models/importdatasetfromexplorerrequest.md create mode 100644 docs/models/importdatasetfromfilerequest.md create mode 100644 docs/models/importdatasetfromplaygroundrequest.md create mode 100644 docs/models/judge.md create mode 100644 docs/models/judgechatcompletioneventrequest.md create mode 100644 docs/models/judgechatcompletioneventv1observabilitychatcompletioneventseventidlivejudgingpostrequest.md create mode 100644 docs/models/judgeclassificationoutput.md create mode 100644 docs/models/judgeclassificationoutputoption.md create mode 100644 docs/models/judgedatasetrecordrequest.md create mode 100644 docs/models/judgedatasetrecordv1observabilitydatasetrecordsdatasetrecordidlivejudgingpostrequest.md create mode 100644 docs/models/judgeoutput.md create mode 100644 docs/models/judgeoutputtype.md create mode 100644 docs/models/judgeoutputunion.md create mode 100644 docs/models/judgeregressionoutput.md create mode 100644 docs/models/listcampaignselectedeventsresponse.md create mode 100644 docs/models/listcampaignsresponse.md create mode 100644 docs/models/listchatcompletionfieldsresponse.md create mode 100644 docs/models/listdatasetimporttasksresponse.md create mode 100644 docs/models/listdatasetrecordsresponse.md create mode 100644 docs/models/listdatasetsresponse.md create mode 100644 docs/models/listjudgesresponse.md create mode 100644 docs/models/listmodelsv1modelsgetrequest.md create mode 100644 docs/models/listsharingresponse.md create mode 100644 docs/models/mcpservericon.md create mode 100644 docs/models/messageresponse.md create mode 100644 docs/models/moderationllmv1action.md create mode 100644 docs/models/moderationllmv1categorythresholds.md create mode 100644 docs/models/moderationllmv1config.md create mode 100644 docs/models/observabilityerrorcode.md create mode 100644 docs/models/observabilityerrordetail.md create mode 100644 docs/models/op.md create mode 100644 docs/models/operator.md create mode 100644 docs/models/option.md create mode 100644 docs/models/or_.md create mode 100644 docs/models/paginatedconnectors.md create mode 100644 docs/models/paginatedresultcampaignpreview.md create mode 100644 docs/models/paginatedresultchatcompletioneventpreview.md create mode 100644 docs/models/paginatedresultdatasetimporttask.md create mode 100644 docs/models/paginatedresultdatasetpreview.md create mode 100644 docs/models/paginatedresultdatasetrecord.md create mode 100644 docs/models/paginatedresultjudgepreview.md create mode 100644 docs/models/paginationresponse.md create mode 100644 docs/models/postdatasetrecordsfromcampaignv1observabilitydatasetsdatasetidimportsfromcampaignpostrequest.md create mode 100644 docs/models/postdatasetrecordsfromdatasetv1observabilitydatasetsdatasetidimportsfromdatasetpostrequest.md create mode 100644 docs/models/postdatasetrecordsfromexplorerv1observabilitydatasetsdatasetidimportsfromexplorerpostrequest.md create mode 100644 docs/models/postdatasetrecordsfromfilev1observabilitydatasetsdatasetidimportsfromfilepostrequest.md create mode 100644 docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md rename docs/models/{processingstatusout.md => processingstatus.md} (98%) create mode 100644 docs/models/resource.md create mode 100644 docs/models/resourcelink.md create mode 100644 docs/models/resourcevisibility.md create mode 100644 docs/models/searchchatcompletioneventidsrequest.md create mode 100644 docs/models/searchchatcompletioneventidsresponse.md rename docs/models/{listsharingout.md => searchchatcompletioneventsrequest.md} (58%) create mode 100644 docs/models/searchchatcompletioneventsresponse.md rename docs/models/{sharingout.md => sharing.md} (98%) rename docs/models/{sharingin.md => sharingrequest.md} (99%) create mode 100644 docs/models/supportedoperator.md create mode 100644 docs/models/textcontent.md create mode 100644 docs/models/textresourcecontents.md delete mode 100644 docs/models/thinkchunkthinking.md rename docs/models/{conversationthinkchunkthinking.md => thinking.md} (66%) create mode 100644 docs/models/typeenum.md create mode 100644 docs/models/updateconnectorrequest.md create mode 100644 docs/models/updatedatasetrecordpayloadrequest.md create mode 100644 docs/models/updatedatasetrecordpayloadv1observabilitydatasetrecordsdatasetrecordidpayloadputrequest.md create mode 100644 docs/models/updatedatasetrecordpropertiesrequest.md create mode 100644 docs/models/updatedatasetrecordpropertiesv1observabilitydatasetrecordsdatasetrecordidpropertiesputrequest.md create mode 100644 docs/models/updatedatasetrequest.md create mode 100644 docs/models/updatedatasetv1observabilitydatasetsdatasetidpatchrequest.md create mode 100644 docs/models/updatejudgerequest.md create mode 100644 docs/models/updatejudgerequestoutput.md create mode 100644 docs/models/updatejudgev1observabilityjudgesjudgeidputrequest.md create mode 100644 docs/sdks/campaigns/README.md create mode 100644 docs/sdks/chatcompletionevents/README.md create mode 100644 docs/sdks/connectors/README.md create mode 100644 docs/sdks/datasets/README.md create mode 100644 docs/sdks/fields/README.md create mode 100644 docs/sdks/judges/README.md create mode 100644 docs/sdks/records/README.md create mode 100644 src/mistralai/client/campaigns.py create mode 100644 src/mistralai/client/chat_completion_events.py create mode 100644 src/mistralai/client/connectors.py create mode 100644 src/mistralai/client/datasets.py create mode 100644 src/mistralai/client/errors/observabilityerror.py create mode 100644 src/mistralai/client/fields.py create mode 100644 src/mistralai/client/judges.py create mode 100644 src/mistralai/client/models/annotations.py create mode 100644 src/mistralai/client/models/audiocontent.py create mode 100644 src/mistralai/client/models/audiourl.py create mode 100644 src/mistralai/client/models/audiourlchunk.py create mode 100644 src/mistralai/client/models/authdata.py create mode 100644 src/mistralai/client/models/basefielddefinition.py create mode 100644 src/mistralai/client/models/basetaskstatus.py create mode 100644 src/mistralai/client/models/blobresourcecontents.py create mode 100644 src/mistralai/client/models/campaign.py create mode 100644 src/mistralai/client/models/chatcompletionevent.py create mode 100644 src/mistralai/client/models/chatcompletioneventpreview.py create mode 100644 src/mistralai/client/models/chattranscriptionevent.py create mode 100644 src/mistralai/client/models/connector.py create mode 100644 src/mistralai/client/models/connector_call_tool_v1op.py create mode 100644 src/mistralai/client/models/connector_delete_v1op.py create mode 100644 src/mistralai/client/models/connector_get_v1op.py create mode 100644 src/mistralai/client/models/connector_list_v1op.py create mode 100644 src/mistralai/client/models/connector_update_v1op.py create mode 100644 src/mistralai/client/models/connectorcalltoolrequest.py create mode 100644 src/mistralai/client/models/connectorsqueryfilters.py create mode 100644 src/mistralai/client/models/connectortool.py create mode 100644 src/mistralai/client/models/connectortoolcallmetadata.py create mode 100644 src/mistralai/client/models/connectortoolcallresponse.py create mode 100644 src/mistralai/client/models/connectortoollocale.py create mode 100644 src/mistralai/client/models/connectortoolresultmetadata.py create mode 100644 src/mistralai/client/models/conversationpayload.py create mode 100644 src/mistralai/client/models/conversationsource.py delete mode 100644 src/mistralai/client/models/conversationthinkchunk.py create mode 100644 src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py create mode 100644 src/mistralai/client/models/createcampaignrequest.py create mode 100644 src/mistralai/client/models/createconnectorrequest.py create mode 100644 src/mistralai/client/models/createdatasetrecordrequest.py create mode 100644 src/mistralai/client/models/createdatasetrequest.py rename src/mistralai/client/models/{githubrepositoryin.py => creategithubrepositoryrequest.py} (90%) create mode 100644 src/mistralai/client/models/createjudgerequest.py create mode 100644 src/mistralai/client/models/dataset.py create mode 100644 src/mistralai/client/models/datasetimporttask.py create mode 100644 src/mistralai/client/models/datasetpreview.py create mode 100644 src/mistralai/client/models/datasetrecord.py create mode 100644 src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py create mode 100644 src/mistralai/client/models/delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop.py create mode 100644 src/mistralai/client/models/delete_dataset_v1_observability_datasets_dataset_id_deleteop.py create mode 100644 src/mistralai/client/models/delete_judge_v1_observability_judges_judge_id_deleteop.py create mode 100644 src/mistralai/client/models/deletedatasetrecordsrequest.py rename src/mistralai/client/models/{deletemodelout.py => deletemodelresponse.py} (90%) create mode 100644 src/mistralai/client/models/embeddedresource.py create mode 100644 src/mistralai/client/models/executionconfig.py create mode 100644 src/mistralai/client/models/export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop.py create mode 100644 src/mistralai/client/models/exportdatasetresponse.py create mode 100644 src/mistralai/client/models/feedresultchatcompletioneventpreview.py create mode 100644 src/mistralai/client/models/fetchcampaignstatusresponse.py create mode 100644 src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py create mode 100644 src/mistralai/client/models/fetchfieldoptioncountsrequest.py create mode 100644 src/mistralai/client/models/fetchfieldoptioncountsresponse.py create mode 100644 src/mistralai/client/models/fieldgroup.py create mode 100644 src/mistralai/client/models/fieldoptioncountitem.py create mode 100644 src/mistralai/client/models/filevisibility.py create mode 100644 src/mistralai/client/models/filtercondition.py create mode 100644 src/mistralai/client/models/filtergroup.py create mode 100644 src/mistralai/client/models/filterpayload.py create mode 100644 src/mistralai/client/models/get_campaign_by_id_v1_observability_campaigns_campaign_id_getop.py create mode 100644 src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py create mode 100644 src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py create mode 100644 src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py create mode 100644 src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py create mode 100644 src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py create mode 100644 src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py create mode 100644 src/mistralai/client/models/get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop.py create mode 100644 src/mistralai/client/models/get_dataset_by_id_v1_observability_datasets_dataset_id_getop.py create mode 100644 src/mistralai/client/models/get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop.py create mode 100644 src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py create mode 100644 src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py create mode 100644 src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py create mode 100644 src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py create mode 100644 src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py create mode 100644 src/mistralai/client/models/get_judges_v1_observability_judges_getop.py create mode 100644 src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py create mode 100644 src/mistralai/client/models/guardrailconfig.py create mode 100644 src/mistralai/client/models/imagecontent.py create mode 100644 src/mistralai/client/models/importdatasetfromcampaignrequest.py create mode 100644 src/mistralai/client/models/importdatasetfromdatasetrequest.py create mode 100644 src/mistralai/client/models/importdatasetfromexplorerrequest.py create mode 100644 src/mistralai/client/models/importdatasetfromfilerequest.py create mode 100644 src/mistralai/client/models/importdatasetfromplaygroundrequest.py create mode 100644 src/mistralai/client/models/judge.py create mode 100644 src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py create mode 100644 src/mistralai/client/models/judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop.py create mode 100644 src/mistralai/client/models/judgechatcompletioneventrequest.py create mode 100644 src/mistralai/client/models/judgeclassificationoutput.py create mode 100644 src/mistralai/client/models/judgeclassificationoutputoption.py create mode 100644 src/mistralai/client/models/judgedatasetrecordrequest.py create mode 100644 src/mistralai/client/models/judgeoutput.py create mode 100644 src/mistralai/client/models/judgeoutputtype.py create mode 100644 src/mistralai/client/models/judgeregressionoutput.py create mode 100644 src/mistralai/client/models/list_models_v1_models_getop.py create mode 100644 src/mistralai/client/models/listcampaignselectedeventsresponse.py create mode 100644 src/mistralai/client/models/listcampaignsresponse.py create mode 100644 src/mistralai/client/models/listchatcompletionfieldsresponse.py create mode 100644 src/mistralai/client/models/listdatasetimporttasksresponse.py create mode 100644 src/mistralai/client/models/listdatasetrecordsresponse.py create mode 100644 src/mistralai/client/models/listdatasetsresponse.py create mode 100644 src/mistralai/client/models/listjudgesresponse.py delete mode 100644 src/mistralai/client/models/listsharingout.py create mode 100644 src/mistralai/client/models/listsharingresponse.py create mode 100644 src/mistralai/client/models/mcpservericon.py create mode 100644 src/mistralai/client/models/messageresponse.py create mode 100644 src/mistralai/client/models/moderationllmv1action.py create mode 100644 src/mistralai/client/models/moderationllmv1categorythresholds.py create mode 100644 src/mistralai/client/models/moderationllmv1config.py create mode 100644 src/mistralai/client/models/observabilityerrorcode.py create mode 100644 src/mistralai/client/models/observabilityerrordetail.py create mode 100644 src/mistralai/client/models/paginatedconnectors.py create mode 100644 src/mistralai/client/models/paginatedresultcampaignpreview.py create mode 100644 src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py create mode 100644 src/mistralai/client/models/paginatedresultdatasetimporttask.py create mode 100644 src/mistralai/client/models/paginatedresultdatasetpreview.py create mode 100644 src/mistralai/client/models/paginatedresultdatasetrecord.py create mode 100644 src/mistralai/client/models/paginatedresultjudgepreview.py create mode 100644 src/mistralai/client/models/paginationresponse.py create mode 100644 src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py create mode 100644 src/mistralai/client/models/post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop.py create mode 100644 src/mistralai/client/models/post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop.py create mode 100644 src/mistralai/client/models/post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop.py create mode 100644 src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py rename src/mistralai/client/models/{processingstatusout.py => processingstatus.py} (77%) create mode 100644 src/mistralai/client/models/resourcelink.py create mode 100644 src/mistralai/client/models/resourcevisibility.py create mode 100644 src/mistralai/client/models/searchchatcompletioneventidsrequest.py create mode 100644 src/mistralai/client/models/searchchatcompletioneventidsresponse.py create mode 100644 src/mistralai/client/models/searchchatcompletioneventsrequest.py create mode 100644 src/mistralai/client/models/searchchatcompletioneventsresponse.py rename src/mistralai/client/models/{sharingout.py => sharing.py} (93%) rename src/mistralai/client/models/{sharingin.py => sharingrequest.py} (94%) create mode 100644 src/mistralai/client/models/textcontent.py create mode 100644 src/mistralai/client/models/textresourcecontents.py create mode 100644 src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py create mode 100644 src/mistralai/client/models/update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop.py create mode 100644 src/mistralai/client/models/update_dataset_v1_observability_datasets_dataset_id_patchop.py create mode 100644 src/mistralai/client/models/update_judge_v1_observability_judges_judge_id_putop.py create mode 100644 src/mistralai/client/models/updateconnectorrequest.py create mode 100644 src/mistralai/client/models/updatedatasetrecordpayloadrequest.py create mode 100644 src/mistralai/client/models/updatedatasetrecordpropertiesrequest.py create mode 100644 src/mistralai/client/models/updatedatasetrequest.py create mode 100644 src/mistralai/client/models/updatejudgerequest.py create mode 100644 src/mistralai/client/observability.py create mode 100644 src/mistralai/client/records.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8e89c12b..dd18eda6 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 9ea68a20ee2ef4565df16947f204034b + docChecksum: ae098de142fd81aa02c9a5a26a6591b8 docVersion: 1.0.0 speakeasyVersion: 1.729.0 generationVersion: 2.841.0 - releaseVersion: 2.0.0rc1 - configChecksum: ba30d47e402a93dc30b5001c33116a3d + releaseVersion: 2.0.0 + configChecksum: 60e6aae39454140823667a495d507fca repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 92ab8a00-49e7-471b-bca6-d18f761863df - pristine_commit_hash: 5eb9662433e80c22603fb3a3bf921f6b285fa2d4 - pristine_tree_hash: 9e781b9b07960a689815c5fa6008765ae4a60716 + generation_id: 1fa80ee6-4130-423f-9d6e-8b865b18cc7f + pristine_commit_hash: f2c5b1b11c5e7496fda888469f22e3dd22af1603 + pristine_tree_hash: 4bf96963cbd890c55a9d591243f7aea7311db58b features: python: additionalDependencies: 1.0.0 @@ -26,6 +26,7 @@ features: downloadStreams: 1.0.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 + errors: 3.3.5 examples: 3.0.2 flatRequests: 1.0.1 flattening: 3.1.1 @@ -59,16 +60,20 @@ trackedFiles: deleted: true USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:50cc0351d6145a805d1d5ae8be4dfce58178e648 - pristine_git_object: f71bbabc223b8cef8d923816fce8d572f3901884 + last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f + pristine_git_object: 9d32240a60c8885479c95388bb81c8024b5604ff docs/errors/httpvalidationerror.md: id: 7fe2e5327e07 last_write_checksum: sha1:277a46811144643262651853dc6176d21b33573e pristine_git_object: 712a148c3e2305dca4c702851865f9f8c8e674cc + docs/errors/observabilityerror.md: + id: 750ead4ce7ee + last_write_checksum: sha1:a3fa64f01329ca02fdd8d7a6470c3d2f051985e5 + pristine_git_object: 615552c32013c702b3e7476b1691952b0a4a65df docs/models/agent.md: id: ffdbb4c53c87 - last_write_checksum: sha1:c87b05a17785cd83fdfc58cb2d55b6d77d3bc23e - pristine_git_object: 4de5a901d120b85ba5940490a2ec3fd4f1a91136 + last_write_checksum: sha1:a4438b1b0db1d00df3aacfc432acc523a3ca57da + pristine_git_object: 94e8b035a5a9f61d3a0e345daf977a83e352ba07 docs/models/agentaliasresponse.md: id: 5ac4721d8947 last_write_checksum: sha1:15dcc6820e89d2c6bb799e331463419ce29ec167 @@ -213,6 +218,18 @@ trackedFiles: id: 513b8b7bc0b7 last_write_checksum: sha1:9154d0ac6b0ab8970a10a8ad7716009d62e80ce7 pristine_git_object: 022f7e10edb22cb1b1d741c13ac586bd136d03b5 + docs/models/and_.md: + id: a4692aa4d8e7 + last_write_checksum: sha1:86773c7178b6c04a7adc487d860c39a51116b0cb + pristine_git_object: 591b7bb362df8c1544b51c935c78be2111c0e18a + docs/models/annotations.md: + id: f3368d2e0511 + last_write_checksum: sha1:2ffa9e219b9cf7b28e8591ddbc7c27d92d07022e + pristine_git_object: 2a23157c270b9f7a5fa4872aae5b541a3fa25051 + docs/models/answer.md: + id: 9ac735faad2d + last_write_checksum: sha1:4364632d9aad9c1a5ff2dfb7381d2b0db01efbb9 + pristine_git_object: 324a8e4e8656b3eef77355cc24c70ac0a2e1aa9c docs/models/apiendpoint.md: id: be613fd9b947 last_write_checksum: sha1:4d984c11248f7da42c949164e69b53995d5942c4 @@ -237,10 +254,18 @@ trackedFiles: id: ececf40457de last_write_checksum: sha1:9f23adf16a682cc43346d157f7e971c596b416ef pristine_git_object: 147708d9238e40e1cdb222beee15fbe8c1603050 + docs/models/audience.md: + id: 6a718c512c7f + last_write_checksum: sha1:9d46fde31c3f8f43af7288359d6de60bfa8dfe6c + pristine_git_object: ac325076feae9be8b54492d4bd85cb5c52828bc0 docs/models/audiochunk.md: id: 88315a758fd4 last_write_checksum: sha1:b47b295122cea28d66212d75a1f0eccd70a248cc pristine_git_object: 1ba8b0f578fa94b4f8dddf559798e033a1704e7b + docs/models/audiocontent.md: + id: f0b2c5004edf + last_write_checksum: sha1:ce23944b8c8556d20c1b3a9b7a7715dea232e124 + pristine_git_object: 64ab6d26b5561e15722cab1eab3134c5a0688a91 docs/models/audioencoding.md: id: 1e0dfee9c2a0 last_write_checksum: sha1:5d47cfaca916d7a47adbea71748595b3ab69a478 @@ -257,10 +282,34 @@ trackedFiles: id: 79b5f721b753 last_write_checksum: sha1:df6825c05b5a02dcf904ebaa40fb97e9186248cc pristine_git_object: 5d64964d1a635da912f2553c306fb8654ebfca2e + docs/models/audiourl.md: + id: 5cf317caac89 + last_write_checksum: sha1:2ab877ab65fd947d3d3833266d64167a78f83350 + pristine_git_object: 45ad74938a74eeed51440b4b62db941cac19e095 + docs/models/audiourlchunk.md: + id: dc995cbb4163 + last_write_checksum: sha1:f85ceef0dd3cf36caf7889eaf645c5fc6a329baf + pristine_git_object: 56af9df98b9d948575f733b88bfaf6c9202832b3 + docs/models/audiourlunion.md: + id: fe1a2fe0351a + last_write_checksum: sha1:9d271e3711f30e7715720e1d68b7b5d2a6a74cc1 + pristine_git_object: 9666906674288fa3e251549d6edb355eabbce1d9 + docs/models/authdata.md: + id: e510ac107a56 + last_write_checksum: sha1:1cfbc35a6112a6eca7b4199c37959a0fef390ca8 + pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 + docs/models/basefielddefinition.md: + id: f9e0bbae859b + last_write_checksum: sha1:28a4d2774231873af97debedcf2fba4f49e83bf2 + pristine_git_object: 3f7abea981c142e1fb1ba993a10dbd0e347b2df2 docs/models/basemodelcard.md: id: 2f62bfbd650e last_write_checksum: sha1:4b29e0d24060b6724e82aeee05befe1cddb316f4 pristine_git_object: 0f42504fd6446c0baf4686bfbb8481658b6789cd + docs/models/basetaskstatus.md: + id: b709621d5c71 + last_write_checksum: sha1:3f78b970cb0c8ba22f100af3b8b6e1730a4f86f7 + pristine_git_object: 8fad1e10f1b631d75303dbd8a977f37cacd26a33 docs/models/batcherror.md: id: 8053e29a3f26 last_write_checksum: sha1:23a12dc2e95f92a7a3691bd65a1b05012c669f0f @@ -277,10 +326,18 @@ trackedFiles: id: b113ca846594 last_write_checksum: sha1:f9dc702c27b8257e008390519df744290e09c4b4 pristine_git_object: 6ee3b394a8b1125769a355359b5a44bc7c3224ea + docs/models/blobresourcecontents.md: + id: 19b9f897373e + last_write_checksum: sha1:0a40334024da0f41ccab87e10add590ea87a8b01 + pristine_git_object: c862e53730393d65a061ed63a96640859fe74adc docs/models/builtinconnectors.md: id: 9d14e972f08a last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 + docs/models/campaign.md: + id: cc1272bc909c + last_write_checksum: sha1:291f6152431f3f14c16df9005a4392907dbf03e2 + pristine_git_object: 1f2a7a365ac4a3811ccf9760e56eabbf9106638d docs/models/chatclassificationrequest.md: id: 57b86771c870 last_write_checksum: sha1:bfd2fb8e2c83578ca0cea5209ea3f18c3bcd2ae5 @@ -293,6 +350,22 @@ trackedFiles: id: 225764da91d3 last_write_checksum: sha1:b894d3408cb801e072c3c302a5676ff939d59284 pristine_git_object: b2f15ecbe88328de95b4961ddb3940fd8a6ee64b + docs/models/chatcompletionevent.md: + id: fc1097c5bfe2 + last_write_checksum: sha1:ef1f417581e943503acb38b503aedde3e157d934 + pristine_git_object: 500192f661b0657f594f85da4d38896954426db5 + docs/models/chatcompletioneventextrafields.md: + id: 686e5af33206 + last_write_checksum: sha1:1f9951574bf3f554beb8b1273af5fa7cf3c6381e + pristine_git_object: c2b7f855e76a35a3f61d7f11c7488245d8d99707 + docs/models/chatcompletioneventpreview.md: + id: 89dcfcc3bd32 + last_write_checksum: sha1:ea5a4776fd299a1c8208392e54061615ddb19ad2 + pristine_git_object: 855e8ab0ccf2851aad23067cc6386211bd1e80f0 + docs/models/chatcompletioneventpreviewextrafields.md: + id: 6562107fac56 + last_write_checksum: sha1:5bd3841a27c41dcc345a216e36b2bd1f90596d24 + pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 last_write_checksum: sha1:4980b698006c641b1c84495c5b601cc8662b05f6 @@ -345,6 +418,10 @@ trackedFiles: id: aec173bca43b last_write_checksum: sha1:14ce49ace5845bc467fe1559b12374bfd36bc9a7 pristine_git_object: ff1c6ea32233d5c5e8d6292c62f9e8eacd3340c3 + docs/models/chattranscriptionevent.md: + id: 3932410b4664 + last_write_checksum: sha1:db91f483894b9dadc0baa66358c3b81874fea59c + pristine_git_object: c2a38ed5a167c698a22b332bca4bf3dc3b69f204 docs/models/checkpoint.md: id: 9c97119961cf last_write_checksum: sha1:0e7732d9c30f67d59fe4d9ad1d165ad0cd80c790 @@ -477,10 +554,70 @@ trackedFiles: id: 19b9e48a3c2e last_write_checksum: sha1:eb6494cb19f23c6df62afb009cc88ce38d24af86 pristine_git_object: fd6e6aaa58cabba0cdec1b76ac50fb6e46f91b07 + docs/models/connector.md: + id: cbf7c2c53983 + last_write_checksum: sha1:477e81b9e908f8c40e22cffcf4e7cd6ae38fe34e + pristine_git_object: a5d6073ea8da1284bea490d74fec8e6224fc3910 + docs/models/connectorcalltoolrequest.md: + id: d0f10cee6826 + last_write_checksum: sha1:81fa16df68355ba258c66189a2c9b6d0cdb2dfb8 + pristine_git_object: 9ef7a35154327673593f323a142fe63ec706e799 + docs/models/connectorcalltoolv1request.md: + id: a7a294c4280c + last_write_checksum: sha1:296a9c31a7b9dc7621b871000f17f6ced3d3a288 + pristine_git_object: cdda08cf9a0c30e7b2e8e1017cd633472ea398c7 + docs/models/connectordeletev1request.md: + id: 8d5621ba6395 + last_write_checksum: sha1:881b88b2e0788f7c16938115a6cada5f0ebe144b + pristine_git_object: e50c7296f28bbf48daf724af3c848a50e8424ad7 + docs/models/connectorgetv1request.md: + id: 844c1f489684 + last_write_checksum: sha1:e36ac8ff28ee258340868f8aa4f3172ed3b82ef3 + pristine_git_object: c45148b97aad128744e0e6ccebb00bf22d400eff + docs/models/connectorlistv1request.md: + id: 68b7a11faff6 + last_write_checksum: sha1:e08effc0f17a95383c3ba96b06b1dba80f4dc767 + pristine_git_object: 6b9a287ead2996c402ade5c18368eaff92c76b2a + docs/models/connectorsqueryfilters.md: + id: d6fb981cad1e + last_write_checksum: sha1:3a33088e1e9332318aff437fba7d01239d417d84 + pristine_git_object: aea47e14f02b61dbbd726bc11f6197b6854bb358 + docs/models/connectortool.md: + id: 1c640bab9aeb + last_write_checksum: sha1:ab4ad137330bda6699043da2337aea477c33241e + pristine_git_object: af5cc03b98b973030b6e037165ce725d25293284 + docs/models/connectortoolcallmetadata.md: + id: 9ce26ae7e772 + last_write_checksum: sha1:e43e147bd2729139d6186ade29b851570797c9c0 + pristine_git_object: 4d44a2d0a8d1d4ffa8f66075391e514623c55278 + docs/models/connectortoolcallresponse.md: + id: 7d00da4bf949 + last_write_checksum: sha1:3bbbeffaba03f8eaf98725c7cd8e1d20ff1f3de6 + pristine_git_object: 1c51b9ac1fed0e1993f9d794fe07784d898ccf27 + docs/models/connectortoolcallresponsecontent.md: + id: 0bfb1af7b63a + last_write_checksum: sha1:d1d7453c72a0eb79ccb8e2b36e0963067ce13487 + pristine_git_object: d7f93edac88369164136b3eeb3a707adda9489bd + docs/models/connectortoollocale.md: + id: 44c1e21a5647 + last_write_checksum: sha1:7901679d8cc601169927e1b7e5808456149145de + pristine_git_object: b882c419a94971d7b8c8041ffca4a6b640b06751 + docs/models/connectortoolresultmetadata.md: + id: 18ff112e8af2 + last_write_checksum: sha1:f4d7703c0a1ce40ebd8434e96f1758a5c0b24b45 + pristine_git_object: 77a327dc7782d538c467095c9e15fdcf575334ad + docs/models/connectorupdatev1request.md: + id: fdbeb5fee83e + last_write_checksum: sha1:9082d8f0cfe9f950d129971b152d37f936f7aaea + pristine_git_object: db9cc9b4c4379865ad15292c5385dce864b5935b docs/models/contentchunk.md: id: d2d3a32080cd - last_write_checksum: sha1:b253e4b802adb5b66d896bfc6245ac4d21a0c67c - pristine_git_object: cb7e51d3a6e05f197fceff4a4999594f3e340dac + last_write_checksum: sha1:26f4ec3431c023af6ef3da732f753b66a52bdeac + pristine_git_object: 5a8ef58c968cd6d4e29a8c6c02fbc5e8bacd6839 + docs/models/context.md: + id: e8f2f9e54b8e + last_write_checksum: sha1:4c14b386f9f89d98f4dd9487ab030f10478c0e63 + pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 docs/models/conversationappendrequest.md: id: 722746e5065c last_write_checksum: sha1:c8a4a49f0a1fe5cdd2ef6264ef9c600cfc8f7beb @@ -517,10 +654,14 @@ trackedFiles: id: 46684ffdf874 last_write_checksum: sha1:5b10a9f3f19591a2675979c21dd8383d5249d728 pristine_git_object: 8fa51571697ee375bfbc708de854bc0b1129eec7 + docs/models/conversationpayload.md: + id: df641edf7b7e + last_write_checksum: sha1:ffb2c51b5e7d06dcffd41cede9fd24b6aee34518 + pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:e4da423f9eb7a8a5d0c21948b50e8df08a63552c - pristine_git_object: bd7823a88a07d4bc8fe1da82e51f843e70480ee1 + last_write_checksum: sha1:093de161c340171af6f89228f7e248668e09b3a1 + pristine_git_object: 9aabc52a331b638ce4633834328fe50ffb8d09eb docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 @@ -535,12 +676,16 @@ trackedFiles: pristine_git_object: 2e4e8d01b5482c4e0644be52e55bf6912aeff69e docs/models/conversationresponse.md: id: 2eccf42d48af - last_write_checksum: sha1:8a86a4d0df6d13b121d5e41a8ee45555b69bf927 - pristine_git_object: 2732f785cdd706274ec5ff383f25fc201e6d0f78 + last_write_checksum: sha1:55493c0b639cb8bda3b5f3bca57a7eec6060b148 + pristine_git_object: 3f0340ba8f382754589a29758d06e7822446488f + docs/models/conversationresponseoutput.md: + id: b4663dc32fc3 + last_write_checksum: sha1:5f188564b4b1fd9460a5155bc433c9adf7df031a + pristine_git_object: fe8ad1b5f8f3a48b48b9e2d09814af7df0ed3788 docs/models/conversationrestartrequest.md: id: 558e9daa00bd - last_write_checksum: sha1:434e6c94b5d6c37b9026d536308cd1d3ff56e8d6 - pristine_git_object: ad3ff3624f533e4d4f751264d9bc6dd1849b3b69 + last_write_checksum: sha1:40ca7ee3ad13bf14f19816a6f54e44a4088f8317 + pristine_git_object: 08f47bba0663f5d7ea4d9c8d604814de095c1c87 docs/models/conversationrestartrequestagentversion.md: id: e6ea289c6b23 last_write_checksum: sha1:a5abf95a81b7e080bd3cadf65c2db38ca458573f @@ -551,8 +696,8 @@ trackedFiles: pristine_git_object: 5790624b82ce47ea99e5c25c825fbc25145bfb8e docs/models/conversationrestartstreamrequest.md: id: 01b92ab1b56d - last_write_checksum: sha1:e9755598b5be197a938f1f74aa77ac24ccac8457 - pristine_git_object: 865a1e8f666d7f6878c40eb70fe5ab1c63da3066 + last_write_checksum: sha1:4f1ed18522112ed6b2c2f5def38b418d0c04dab3 + pristine_git_object: 3ad739aa8d254dba746590245e8490268c71dc51 docs/models/conversationrestartstreamrequestagentversion.md: id: 395265f34ff6 last_write_checksum: sha1:ebf4e89a478ab40e1f8cd3f9a000e179426bda47 @@ -561,10 +706,14 @@ trackedFiles: id: 3e9c4a9ab94d last_write_checksum: sha1:300e197f11ad5efc654b51198b75049890258eef pristine_git_object: 97266b43444f5ed50eeedf574abd99cb201199fd + docs/models/conversationsource.md: + id: b50fdc875f45 + last_write_checksum: sha1:7a3fd66a8fa02456465f6218559a73bf9ae5413e + pristine_git_object: 12bf7c1fa98223675c6b27f6010d05c9b78e7017 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:5cb58852d393eb6cc504b45d8b238fc2f3eecd2a - pristine_git_object: 8b74f9e7cdea83a5622df2c3b79debe3c4427288 + last_write_checksum: sha1:19602f1f58e594960340559d57733bc11223c494 + pristine_git_object: f792c26369b64508b8aa6b5032cedcd16aa556e9 docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 @@ -577,22 +726,14 @@ trackedFiles: id: 71df6212ff44 last_write_checksum: sha1:f2882742a74dd2b4f74383efa444c7ab968249dc pristine_git_object: 0f75f82b38f224340bed468ceecfe622066740ba - docs/models/conversationthinkchunk.md: - id: b9a8324da8f1 - last_write_checksum: sha1:80aed188198434ceca134e7aa7351ddba82c92c9 - pristine_git_object: 1fb16bd99f2b6277f87cd40d5c1eca389819d725 - docs/models/conversationthinkchunkthinking.md: - id: 477db2d543bd - last_write_checksum: sha1:d9f8c37fe933a3e52e2adb3ffe283d79c187cd36 - pristine_git_object: 84b800188b248166aac0043994fa27d4d79aad9d docs/models/conversationusageinfo.md: id: 57ef89d3ab83 last_write_checksum: sha1:d92408ad37d7261b0f83588e6216871074a50225 pristine_git_object: 57e260335959c605a0b9b4eaa8bf1f8272f73ae0 docs/models/createagentrequest.md: id: 9484bab389c1 - last_write_checksum: sha1:b3228a622081b6f4b2a8bdaa60ca16049517d819 - pristine_git_object: cca3a079c532d3426f65a15bb0affdd34fd1d3ac + last_write_checksum: sha1:5c24b11438c77dbbdb3a6e5275952889e4da7cb9 + pristine_git_object: e9665545ae14415bb0c61dc0312136dd2930ee13 docs/models/createagentrequesttool.md: id: 72e5f99878c5 last_write_checksum: sha1:a90ad01c15da321f0c8ec700ba359a5371c5dcbb @@ -601,10 +742,30 @@ trackedFiles: id: e79afe8f495c last_write_checksum: sha1:6cedce49f3108b9d5bc80e6d11712c594f2d9e50 pristine_git_object: d094e2d518b31ada68c282241af3aa1483e98ff6 + docs/models/createcampaignrequest.md: + id: fe54d07fe49b + last_write_checksum: sha1:fa1ea12391459548b455fb5ad22c4704415d6e5c + pristine_git_object: 2e81d26d19950ef6c1bc7186b8497e1f739e8f0b + docs/models/createconnectorrequest.md: + id: 7a0ef9d82658 + last_write_checksum: sha1:f536d97ffe5535b0d43f3390d4e90fe0ea74b1e1 + pristine_git_object: 4668e1a61f0b140599e283bf1144b29591df760c + docs/models/createdatasetrecordrequest.md: + id: e2c8a858a8e6 + last_write_checksum: sha1:6848c7398d763f7a046dbb41cda8bc33cbb98230 + pristine_git_object: 3ea0d68db2cc15e0dcdb51ca77a90823557604f2 + docs/models/createdatasetrecordv1observabilitydatasetsdatasetidrecordspostrequest.md: + id: 599b04b8f392 + last_write_checksum: sha1:022456acf96559cefa8cdec2c006e13107241261 + pristine_git_object: 7fe42faac9ff2f46fb8e7c0a62068cd2e8f674eb + docs/models/createdatasetrequest.md: + id: ff55db5edd8c + last_write_checksum: sha1:840cddba3faaee46a0a65a92e3f09b6079ac410d + pristine_git_object: d4c166436a4d3cdafcc5990215b0ee2ea2ff9571 docs/models/createfileresponse.md: id: ea1396cebae8 - last_write_checksum: sha1:7b26d0a466004aca5cefaeb29f84dafc405c51ff - pristine_git_object: 8152922b0d4ce199e269df955e5a25d4acf71e28 + last_write_checksum: sha1:cdda40f3d8165c27ac40a0548b79a9ffafaef4e0 + pristine_git_object: 84be4dc64637998c25005d98ef335576a3db7f00 docs/models/createfinetuningjobrequest.md: id: 36824ba035ff last_write_checksum: sha1:78f019530e9f5deace91c454c91ec6c4d0d23a20 @@ -615,20 +776,68 @@ trackedFiles: pristine_git_object: 0054a4a683a88fe67f92c1659bcb8c792ca8d286 docs/models/createfinetuningjobrequestrepository.md: id: e113eb1929b5 - last_write_checksum: sha1:6bd504d3ecb219f3245a83d306c1792133b96769 - pristine_git_object: 32be1b6dc3fcf7f6ee1a1d71abee4c81493655c2 + last_write_checksum: sha1:41eee36f6a027638e2c2cf087734d4dd91ac3839 + pristine_git_object: 42b6c6cab36dc523926e319cdfbb3937bfdbd3f6 + docs/models/creategithubrepositoryrequest.md: + id: c12cba110d76 + last_write_checksum: sha1:38c125d3aff11137dbab5b6b1c430c892ff897cb + pristine_git_object: 502afa7b708f40698f443dc76e504cc6324916a9 + docs/models/createjudgerequest.md: + id: 13683829ce5d + last_write_checksum: sha1:84122cf178b65c87a11a9c012d8d066441e2401d + pristine_git_object: ccb1119a99d87cc229681d75fde017e8917642a3 + docs/models/createjudgerequestoutput.md: + id: afddf2bb224f + last_write_checksum: sha1:64b6a44de253d40c4e3f0e133b31b4c5a9cd13a5 + pristine_git_object: a72676719b90a7b840a2b21d043c61bdf83ce294 docs/models/createlibraryrequest.md: id: 8935b2ed9d13 last_write_checksum: sha1:c00abfe1abb0f0323e434b084dafa0d451eb3e51 pristine_git_object: 71562806dbec6444dcdd0a19852a31ca00b6229a + docs/models/dataset.md: + id: 31af4d237e19 + last_write_checksum: sha1:073fa9a0b7891ccd9b6ae64ba960d74eeb5c9007 + pristine_git_object: 9d235433850f4024ea920e85567d5c2d6df13fb0 + docs/models/datasetimporttask.md: + id: 32402ad24d69 + last_write_checksum: sha1:8a41338cc24d1a48d4495e1be3124960bad09fef + pristine_git_object: 21e6130fcd7d2e1e4c303b4bc4292491fcd9ce81 + docs/models/datasetpreview.md: + id: 5e080239e3e1 + last_write_checksum: sha1:5914284c85165976de7d53ac06fd30ebdc5a8c15 + pristine_git_object: f729908d470767dd2bde499fcfb198e5587c7d40 + docs/models/datasetrecord.md: + id: 449ed69d3872 + last_write_checksum: sha1:55a649fc627e297da420482599680da87989c297 + pristine_git_object: dbc7c3d0046af0423eebab4d0d982e55a3ed1d38 + docs/models/deletecampaignv1observabilitycampaignscampaigniddeleterequest.md: + id: "853118278484" + last_write_checksum: sha1:b8dc39c31de60ed218a063efd7e8f07fcbb1c63f + pristine_git_object: 4114509d79e30e560f0fe2fb02bb37742bf68acd + docs/models/deletedatasetrecordsrequest.md: + id: eb3d7e70be8c + last_write_checksum: sha1:71a7cbb957cf75206f4e5783bf7b2ff11294d5c2 + pristine_git_object: 1afc46d6a9ff00ff2f002a1671809bbe9a677280 + docs/models/deletedatasetrecordv1observabilitydatasetrecordsdatasetrecordiddeleterequest.md: + id: 6ec026edf3f3 + last_write_checksum: sha1:c23fce1ecb41e7d523b9ad2d9145d72c6ae94ff2 + pristine_git_object: b2425068d8d53047c0f74b316ad456dfdcb5b18c + docs/models/deletedatasetv1observabilitydatasetsdatasetiddeleterequest.md: + id: 1324ff11f62a + last_write_checksum: sha1:b4e444986d7185513653466f232ce378a45ea98e + pristine_git_object: 4557d3c603d6a0b6ae2873e2ac11cca58604849b docs/models/deletefileresponse.md: id: ab3aa44589a0 last_write_checksum: sha1:47ebc2474e4725e9ecb0f0d5940c604d9a82a4df pristine_git_object: 188e2504606b051674352339c6aa999116a43b61 - docs/models/deletemodelout.md: - id: 5643e76768d5 - last_write_checksum: sha1:1593c64f7673e59b7ef1f4ae9f5f6b556dd6a269 - pristine_git_object: 5fd4df7a7013dcd4f6489ad29cdc664714d32efd + docs/models/deletejudgev1observabilityjudgesjudgeiddeleterequest.md: + id: 9031fd7f46f4 + last_write_checksum: sha1:6879788359096a08d1adc32320e63f3657f1a2dd + pristine_git_object: 44042efca294d38b53502e18fc574cf5dc67ab8a + docs/models/deletemodelresponse.md: + id: a5a703ee49a7 + last_write_checksum: sha1:cb8ef720c216ec0f9ae5a8663052e0602d3a2536 + pristine_git_object: d8bd2f32f83840769942c8c27dd9401b34515ea8 docs/models/deletemodelv1modelsmodeliddeleterequest.md: id: c838cee0f093 last_write_checksum: sha1:e5b6d18b4f8ab91630ae34a4f50f01e536e08d99 @@ -665,6 +874,10 @@ trackedFiles: id: 48437d297408 last_write_checksum: sha1:5f9294355929d66834c52c67990ba36a7f81387d pristine_git_object: 9dbfbe5074de81b9fcf6f5bae8a0423fb2c82f71 + docs/models/embeddedresource.md: + id: f7ea3888f520 + last_write_checksum: sha1:8f0869b4403767c45c464cdd7b6c640994c65ab9 + pristine_git_object: 102fca261d4ada514a7df14415383c1da9e59782 docs/models/embeddingdtype.md: id: 22786e732e28 last_write_checksum: sha1:dbd16968cdecf706c890769d8d1557298f41ef71 @@ -701,6 +914,46 @@ trackedFiles: id: 311c22a8574a last_write_checksum: sha1:627793d6aed5e378e3f2eeb4087808eb50e948d5 pristine_git_object: 3eebffca874b8614a5be3d75be3cb7b0e52c2339 + docs/models/executionconfig.md: + id: c96b31c33dcd + last_write_checksum: sha1:971187596dde6a53f9e7f4c26cb0f37d5cbafb40 + pristine_git_object: 1033b7ea323917f0ffadb8cb3854426a1956f904 + docs/models/exportdatasetresponse.md: + id: f4594898de85 + last_write_checksum: sha1:2e68bd840ee44b5b61aac0945d608060bd6506f4 + pristine_git_object: 7187ee5c0121f42e1ebbb490563e7e11afb1f812 + docs/models/exportdatasettojsonlv1observabilitydatasetsdatasetidexportstojsonlgetrequest.md: + id: 16660f92d7d1 + last_write_checksum: sha1:fa22e53a929291e6b057283482ca7871fb6d2062 + pristine_git_object: efe4bbb058c168ad531be27cc135f09464d0da13 + docs/models/feedresultchatcompletioneventpreview.md: + id: 5ed9f0e8db01 + last_write_checksum: sha1:c5950602d174d49f293cb85047d871d360e6af16 + pristine_git_object: 08a6e2f837872ee058b2c73089cf151fa944ff90 + docs/models/fetchcampaignstatusresponse.md: + id: 175907eb768d + last_write_checksum: sha1:537f33701542d6cbab3d9bb9fc661339a9e9c748 + pristine_git_object: 7aac0f2537d4282f9a75ece71e57f2a71ce66af3 + docs/models/fetchchatcompletionfieldoptionsresponse.md: + id: f8cabbbafbbe + last_write_checksum: sha1:5e7731de2cc4fa729599a77809970675697d2823 + pristine_git_object: 86beebc1aedaa03019136eeb8842ec31354f32ac + docs/models/fetchfieldoptioncountsrequest.md: + id: 88e23bf278ee + last_write_checksum: sha1:019472cecf84c50fb2a23ff25598dfb075b4505c + pristine_git_object: b13f6312e98e8a2e59b9c0890880a06cf496ea9d + docs/models/fetchfieldoptioncountsresponse.md: + id: 0de8d989349c + last_write_checksum: sha1:800612d664838b6cc7330f5c1430a4b8a83bf830 + pristine_git_object: dabf6b5ebfe86b50a80f4986efb05fea6256bc6b + docs/models/fieldgroup.md: + id: 792d72891fc5 + last_write_checksum: sha1:599b1c695c4a0d4be6a090f06ded45be41392bc7 + pristine_git_object: 8fff281d48e4ccc4b870adb66a4b63dcac1aa853 + docs/models/fieldoptioncountitem.md: + id: "945553556487" + last_write_checksum: sha1:b18c6c530c025bebd9fa0ecb121cf34c3f2b714d + pristine_git_object: 92bc971fc5a0244482ca6107e3751dd75f923ea7 docs/models/file.md: id: 4ad31355bd1c last_write_checksum: sha1:ade4d3c908c664a07a3c333cc24bc1bfb43ab88b @@ -733,10 +986,34 @@ trackedFiles: id: 2783bfd9c4b9 last_write_checksum: sha1:a1249ef0aedb3056e613078488832c96b91f8cab pristine_git_object: 961bae1f51a4ae9df21b28fd7a5ca91dc7b3888b + docs/models/filesapiroutesuploadfilefilevisibility.md: + id: 7b934c9d9d25 + last_write_checksum: sha1:10c16a937f01a3eaa6b508ef2b8b4c99d968ed9e + pristine_git_object: 055f071b90f9a9d0e744f4fe1b4bead3e4647bf2 docs/models/fileschema.md: id: 9a05a660399d - last_write_checksum: sha1:97987d64285ff3092635754c78ad7b68d863e197 - pristine_git_object: 4f3e72dba17a964155007755ad9d69f0304b2adb + last_write_checksum: sha1:e69c38d738bfba7e1d7cb5938c17fcbc56fecf4c + pristine_git_object: 154548404d257f0b7339e2e3e74d2dcc23a98a4d + docs/models/filevisibility.md: + id: 2cdcd7761007 + last_write_checksum: sha1:61af0b14a6b504e9383cd7d68ad66eb0abc84e5f + pristine_git_object: 4ed11692a8773cb06edbfcd0b4afb14766d6807a + docs/models/filtercondition.md: + id: dd561c647715 + last_write_checksum: sha1:5ead258c0e3905e8a10b16e4e5b9b267e3a12747 + pristine_git_object: ba2eea6046e66d6d8101917120aef5e966aa40bd + docs/models/filtergroup.md: + id: abf06b0bda42 + last_write_checksum: sha1:a1bfdc1c9127d8cd3474ec1fccd60fe5cfaac79f + pristine_git_object: 974c724cdf274a3ba70fb7dc140395e24dd0572c + docs/models/filterpayload.md: + id: 770a71875018 + last_write_checksum: sha1:f8328419c79b46907206e7c810ad192f6dfc9154 + pristine_git_object: 49f273c0b46c968ce7097611001b097d383c52a7 + docs/models/filters.md: + id: 1370bfdd2199 + last_write_checksum: sha1:684f242882f17c17766db11e5a21bae1b5c74dcd + pristine_git_object: 4595b82b40fe37dc093bee73a4ffa9c8ac61d77d docs/models/fimcompletionrequest.md: id: b44677ecc293 last_write_checksum: sha1:24bcb54d39b3fabd487549a27b4c0a65dd5ffe50 @@ -817,26 +1094,102 @@ trackedFiles: id: 5fb499088cdf last_write_checksum: sha1:a9a3b6530b1c48a8575402b48cde7b65efb33a7d pristine_git_object: 0226b7045c9d82186e1111bb2025e96a4de90bd6 + docs/models/getcampaignbyidv1observabilitycampaignscampaignidgetrequest.md: + id: 159acf508d84 + last_write_checksum: sha1:e26a519f087140a799466e9fb530d1d37211dd7e + pristine_git_object: 9e781961e6894d501e781e829291b8b60c780555 + docs/models/getcampaignselectedeventsv1observabilitycampaignscampaignidselectedeventsgetrequest.md: + id: 81929b823585 + last_write_checksum: sha1:b21949b1919bd150dba84dd40ef9162014edc7d5 + pristine_git_object: 18de3f10971bf6a9e9232d357a8217cb64306ec5 + docs/models/getcampaignstatusbyidv1observabilitycampaignscampaignidstatusgetrequest.md: + id: cc2d0a9ea54a + last_write_checksum: sha1:a84735430e0c59c05cc729442a035e8f13b4223c + pristine_git_object: 947c4d64a47021cebd5daafd00e6686e890431d2 + docs/models/getcampaignsv1observabilitycampaignsgetrequest.md: + id: 58b33ee9275c + last_write_checksum: sha1:d2bba9d68540a37ee5f29843d74ba0a54f3d1503 + pristine_git_object: f83c3b64f5d8086e0c718c49d1c82481143810cb + docs/models/getchatcompletioneventsv1observabilitychatcompletioneventssearchpostrequest.md: + id: 20e3ca9fea94 + last_write_checksum: sha1:b845ba4a23ca227905dd67d7c29dec16085093c0 + pristine_git_object: b7b92279a6210655a82d5e4c773c3577a151c22c + docs/models/getchatcompletioneventv1observabilitychatcompletioneventseventidgetrequest.md: + id: 85fe583b6dfe + last_write_checksum: sha1:a186d8c7c77536e9df6bbb851497fbab0de86578 + pristine_git_object: 8fe18c47ee45a040a6118da180ea580ae1edef94 + docs/models/getchatcompletionfieldoptionscountsv1observabilitychatcompletionfieldsfieldnameoptionscountspostrequest.md: + id: d76d58e32375 + last_write_checksum: sha1:b878094387e88d9ec1d5916e3eb373e92bc8d956 + pristine_git_object: 339a1de84030de59425436a670578e3713d5a9d5 + docs/models/getchatcompletionfieldoptionsv1observabilitychatcompletionfieldsfieldnameoptionsgetrequest.md: + id: 38d3a71b425c + last_write_checksum: sha1:f8bd7fc9913588f4883cb6ecad475fcbaaa467f9 + pristine_git_object: 973a1a4bbb1502b566ff2edd221dfa24e309257f + docs/models/getdatasetbyidv1observabilitydatasetsdatasetidgetrequest.md: + id: a5811667ed1e + last_write_checksum: sha1:91f96f1449ad0adf83fccf11fdf270682a3e3cb4 + pristine_git_object: 60f2d162d96fe498dc01d844973236130d5eead1 + docs/models/getdatasetimporttasksv1observabilitydatasetsdatasetidtasksgetrequest.md: + id: d02f57214a55 + last_write_checksum: sha1:0e9ee3c15dba7d6e2081f75174ff6bdac73cbc67 + pristine_git_object: d4226eca158b7d346e49c1982a200c7fb65a35c8 + docs/models/getdatasetimporttaskv1observabilitydatasetsdatasetidtaskstaskidgetrequest.md: + id: 04bc3bb2be8f + last_write_checksum: sha1:6400ca140ed4d79169abdae516fb82423f83f018 + pristine_git_object: 98ffc3c62fa10a89ab5fbd7fad53d11dc489b13d + docs/models/getdatasetrecordsv1observabilitydatasetsdatasetidrecordsgetrequest.md: + id: 544765ca9499 + last_write_checksum: sha1:030efa16a9ec71b6adf325d8a7e083611e345e43 + pristine_git_object: 82453f0c4169758ccb48c465bf95677f712dc257 + docs/models/getdatasetrecordv1observabilitydatasetrecordsdatasetrecordidgetrequest.md: + id: fedf1584cb11 + last_write_checksum: sha1:1f6ad7fd1efccb3bdef3748bec748d23d00e3821 + pristine_git_object: 6b9eb3bc4793595d73416994c3537bfad4d7ab70 + docs/models/getdatasetsv1observabilitydatasetsgetrequest.md: + id: c8c1559b454f + last_write_checksum: sha1:98b580deaae5c4720cf905907db49e966b5e294a + pristine_git_object: 073ab76999d4f1b8b0b6b89feacc5137b156c4e5 docs/models/getfileresponse.md: id: a983b3c8acd6 - last_write_checksum: sha1:5ca732ae5b384937473c04de6736fbab34deca24 - pristine_git_object: 0edd13e0818fc70c9c4db1e08b1490c1e146ea63 + last_write_checksum: sha1:643a3c92ce26f21a915bd485fc4af7817e79f864 + pristine_git_object: 38ad49438c06b48ed8eeecf773d4bed51cdb1c9d + docs/models/getjudgebyidv1observabilityjudgesjudgeidgetrequest.md: + id: 06b097dd2a61 + last_write_checksum: sha1:089d9b646a90f2180dbfc85271804e0857204b34 + pristine_git_object: f9f1a2487032af6a3b9a0f7a4d7d4da61a4b854d + docs/models/getjudgesv1observabilityjudgesgetrequest.md: + id: 5a7a03200f1f + last_write_checksum: sha1:f9bbebd7b36957b6d9807063f2926b4a37c73a7e + pristine_git_object: 154ece82c1932053d4764d7d8fb2ab0f394027b2 docs/models/getsignedurlresponse.md: id: 5539e5d7c3d4 last_write_checksum: sha1:7198474f48bfba6d47326cd436e4a00a8ba70ce3 pristine_git_object: bde693236406fe092f48c315e3b68a2fbbe6f9a4 + docs/models/getsimilarchatcompletioneventsv1observabilitychatcompletioneventseventidsimilareventsgetrequest.md: + id: 38d58bb7d102 + last_write_checksum: sha1:63b80dff98aa4fc959f71d1e41faa0eeec4801aa + pristine_git_object: cf276b5e4297eec4d5d4c6996fde7144d54dd8c0 docs/models/githubrepository.md: id: 66c120df624b last_write_checksum: sha1:045e538dd7faffc1c6c6e6816563c5c8e776a276 pristine_git_object: 827b6f34ae68ace7b8b4811764f59de2e0fcdd22 - docs/models/githubrepositoryin.md: - id: b42209ef8423 - last_write_checksum: sha1:5ab33fc1b0b5513086b1cae07f416d502441db23 - pristine_git_object: 241cf584d5e2425e46e065f47a18bea50fa624db + docs/models/guardrail.md: + id: 34d09568ab25 + last_write_checksum: sha1:8c95d17ab908018f763f74cc79e14bd5137f5544 + pristine_git_object: 319e1415d9396412c455056135189d817e2fc473 + docs/models/guardrailconfig.md: + id: f60bf2eefb45 + last_write_checksum: sha1:517e5d142f8e259795cc0083522041ec006baeb7 + pristine_git_object: 235d7204080f3aef0b7910ed32d009cae6d4247c docs/models/hyperparameters.md: id: c167bad5b302 last_write_checksum: sha1:e391cf72690e6cd01a2878081b8d87938e1c6639 pristine_git_object: b6c00c3647d21789c92ad7d32dd29c3089ca134f + docs/models/imagecontent.md: + id: afb5d93d3b4a + last_write_checksum: sha1:bde8cb2d1020d49ef07d97d2b4503add29f8fe2c + pristine_git_object: 5145469e26759e7df9477dce921c800b70af424b docs/models/imagedetail.md: id: f8217529b496 last_write_checksum: sha1:fdf19ac9459f64616240955cb81a84ef03e775c8 @@ -857,6 +1210,26 @@ trackedFiles: id: 9d3c691a9db0 last_write_checksum: sha1:4e32bcd7d44746d2ddbfafbef96152bb2bdb2a15 pristine_git_object: db97130f26199dcb354ecb7469d09530b035daa2 + docs/models/importdatasetfromcampaignrequest.md: + id: 11d5444a3e05 + last_write_checksum: sha1:33c9d7848282c89068abc219f1a208f1fa17d4e5 + pristine_git_object: aa1ecc85ed49d1c20391ff4e6c9e98328e64494d + docs/models/importdatasetfromdatasetrequest.md: + id: aae16ea119a6 + last_write_checksum: sha1:5e2ac86cbab1183ef936a75d4c903be1fb227b1d + pristine_git_object: cf8d373fea2e3e0403ba1e048d4466fdd5b36c08 + docs/models/importdatasetfromexplorerrequest.md: + id: b6aefe9a5761 + last_write_checksum: sha1:e49a21dce39376c4ecbf6df8a178f668f26fa7ce + pristine_git_object: 668cdcbf88b1d0d0f506f4166fb97ee97b685527 + docs/models/importdatasetfromfilerequest.md: + id: 72ced1c6e5e8 + last_write_checksum: sha1:8c59196fc4645fbaf5c735f26f2fbb2e1f6109a2 + pristine_git_object: a05e97258f266440456381634538cb6d97ac015f + docs/models/importdatasetfromplaygroundrequest.md: + id: 74bd521abc26 + last_write_checksum: sha1:a4efe4ff8c52137af47d6ab750d1d2f7cba77e7c + pristine_git_object: 72a586bc65f6219abed50105d9df9cb8b6ec8d02 docs/models/inputentries.md: id: a5c647d5ad90 last_write_checksum: sha1:4231bb97837bdcff4515ae1b00ff5e7712256e53 @@ -945,6 +1318,50 @@ trackedFiles: id: a6b15ed6fac8 last_write_checksum: sha1:523465666ad3c292252b3fe60f345c7ffb29053f pristine_git_object: 7ff7c070353c58290416aff5b01d1dfc43905269 + docs/models/judge.md: + id: adc2c7c01fd5 + last_write_checksum: sha1:f248bf99d7d0a2087facec363c59c9d7718b575b + pristine_git_object: 34bcce9ba75ec20bcd3bb990df2a52be55cbbeb8 + docs/models/judgechatcompletioneventrequest.md: + id: dade3360cf3e + last_write_checksum: sha1:22fbf9ccc5ace7a491a119d6db7638a2f642d49c + pristine_git_object: b91a649246eae2ecdc25f30b560d30d20f626eb8 + docs/models/judgechatcompletioneventv1observabilitychatcompletioneventseventidlivejudgingpostrequest.md: + id: 7c7732afc4a2 + last_write_checksum: sha1:c61572bd803bcf7b65858f1e3c45c8896ec8daa0 + pristine_git_object: 6a9d93c95ba59811f58494685090d2f8a0cd37d1 + docs/models/judgeclassificationoutput.md: + id: 387d35df2462 + last_write_checksum: sha1:668c821fa926cef50a53d0de38c281b72040dd88 + pristine_git_object: 44d8462e378bbabea4083bf35631de6985bb8715 + docs/models/judgeclassificationoutputoption.md: + id: 41dde6c5cf31 + last_write_checksum: sha1:25cc262d748a2c9285cccdc8ed6c3d1572016a2b + pristine_git_object: 67e08ed21124756e4fe471bba5deccfc9bc7ebd2 + docs/models/judgedatasetrecordrequest.md: + id: 8b53c13e8af5 + last_write_checksum: sha1:6f636ff57171c21f214b012dbde5400be91057c4 + pristine_git_object: d82aabd9ecf595703eb43679502733483cb1d536 + docs/models/judgedatasetrecordv1observabilitydatasetrecordsdatasetrecordidlivejudgingpostrequest.md: + id: 41e358ee6a41 + last_write_checksum: sha1:cc831164ee1feb176796ca2c8ac54356ec7ed646 + pristine_git_object: 9ce4f011d6ab9f26b7bf3c720fa48ab0ec65dcf7 + docs/models/judgeoutput.md: + id: 7a436a0118b9 + last_write_checksum: sha1:fff6b2d6ce5f958a68bcc75ae19718fef7d5a49e + pristine_git_object: 4abeffa50be5eb60802391062302e9106f1ccfd0 + docs/models/judgeoutputtype.md: + id: 49623b360404 + last_write_checksum: sha1:2bb675f4824785fdce67918e698eeec682a59e5d + pristine_git_object: 6e9dfd7200de7457590b9f68c2e95361e4ebf128 + docs/models/judgeoutputunion.md: + id: 636200cea9aa + last_write_checksum: sha1:382aa75d840423705f9477cb77ca2a5832a1ee69 + pristine_git_object: 618295642a13f3c153084efa1146ddaab9d17e2b + docs/models/judgeregressionoutput.md: + id: fb323d9098ab + last_write_checksum: sha1:e3dc55fef190040b70467ec96c724b9150b41461 + pristine_git_object: 8f020dfba2e068d3b0c3cb7e355f9705a00b0b76 docs/models/legacyjobmetadata.md: id: 50ac14d9b270 last_write_checksum: sha1:ebe37a176ca318e797fee7ebf4eef73fb9938a12 @@ -999,8 +1416,8 @@ trackedFiles: pristine_git_object: 6e1e04c39c15a85d96710f8d3a8ed11a22412816 docs/models/librariessharecreatev1request.md: id: 99e7bb8f7fed - last_write_checksum: sha1:e40d710ad1023768a0574b3283ef35544f6b0088 - pristine_git_object: 4c05241de4ee5a76df335ae9ea71004bd02b8669 + last_write_checksum: sha1:f37578c7882eab83cca3cb2aaf1ac17b9a21934c + pristine_git_object: 8af7cc9dcd387d209343cab071551542a9829ebe docs/models/librariessharedeletev1request.md: id: bc8adba83f39 last_write_checksum: sha1:79fc5a9a3cee5b060f29edd95f00e0fea32579cf @@ -1021,6 +1438,30 @@ trackedFiles: id: e03025d58630 last_write_checksum: sha1:de42c9396546fc8487d0bd6ed15b4076599fa83f pristine_git_object: c23e32201d12a2594f97a493f63b2b7b42b9e337 + docs/models/listcampaignselectedeventsresponse.md: + id: e004d0b21d0d + last_write_checksum: sha1:3ff807be72c465b8de127a031e82c2a0ce03422d + pristine_git_object: eb6ea27f8e2966624da05ebcec56909fd0f0f4b7 + docs/models/listcampaignsresponse.md: + id: b81dfede5d8c + last_write_checksum: sha1:09b8a734298d398cba8be04a544e9f3d20841c40 + pristine_git_object: 2fcc7d194b4a94267dae86380769b76a11834e4d + docs/models/listchatcompletionfieldsresponse.md: + id: 379ca3b00d2d + last_write_checksum: sha1:82d8a580b417766ad34b31f19a47136b38fcb1d6 + pristine_git_object: c552805e2b9d96d202377244e0936e28bbc5ff75 + docs/models/listdatasetimporttasksresponse.md: + id: 8a4a3c88410e + last_write_checksum: sha1:87fba295324e978949ba8f9172662e3610367ec7 + pristine_git_object: ce2e9057176f3054466c9d4fdf2aa5ce0ae3f1a5 + docs/models/listdatasetrecordsresponse.md: + id: ce200ac11b8c + last_write_checksum: sha1:6b55916029922e18bdcc9abb5c1fec188bb8d66b + pristine_git_object: 25d2618ae300874654cb3209117cb1ffb737763d + docs/models/listdatasetsresponse.md: + id: a776dbfbc267 + last_write_checksum: sha1:abba75226b6bc439381777ea05d83bc8e910e53c + pristine_git_object: af046696ebac829f4d7f6333075a4e5b26dd855e docs/models/listdocumentsresponse.md: id: f2091cee0405 last_write_checksum: sha1:335d0ccd3a448e65739d5a0cfa2c67614daec031 @@ -1037,26 +1478,38 @@ trackedFiles: id: 59c80de4086d last_write_checksum: sha1:5a0d91c251b4b9283895d9f19f7b9416f93d4468 pristine_git_object: adb0644475841c6a4686e8c42790dd44eed43dc1 + docs/models/listjudgesresponse.md: + id: dd610841e2f0 + last_write_checksum: sha1:d90e6af66b36c914af2c478b5e3cf7d4fb79e096 + pristine_git_object: 66883d64d0e040f5eef0976a88c1a83b7a3137ed docs/models/listlibrariesresponse.md: id: 87e3bec10745 last_write_checksum: sha1:00522e685ec71a54f5f272d66b82e650848eaf36 pristine_git_object: e21b9ced628f6fd5ae891d4a46666ebc94546859 - docs/models/listsharingout.md: - id: a3249129f37e - last_write_checksum: sha1:4831e4f02e1d5e86f138c7bb6b04d095aa4df30f - pristine_git_object: bcac4834f3bd008868435189f40bbf9e368da0d2 + docs/models/listmodelsv1modelsgetrequest.md: + id: ade37f6d014a + last_write_checksum: sha1:10d4e1242cdac6cdc7597881e0d25ce06760971f + pristine_git_object: 537269f7e774b31c45ac75c82c096530c0bd2b4e + docs/models/listsharingresponse.md: + id: 165871ba2e7d + last_write_checksum: sha1:2c6c18123e297829dde6e877f3df984ce20aeef3 + pristine_git_object: 4c29d4d4fc8087424104ff7d5312177ec4940094 docs/models/loc.md: id: b071d5a509cc last_write_checksum: sha1:09a04749333ab50ae806c3ac6adcaa90d54df0f1 pristine_git_object: d6094ac2c6e0326c039dad2f6b89158694ef6aa7 + docs/models/mcpservericon.md: + id: 0b20f03adab8 + last_write_checksum: sha1:d66113a4b0486f144b1f73f423559360ec751631 + pristine_git_object: b0ae7da069119f7477ffa5ad756f353f56f213f1 docs/models/messageentries.md: id: 9af3a27b862b last_write_checksum: sha1:a3eb6e37b780644313738f84e6c5ac653b4686bc pristine_git_object: 76256fb913376a15d5bcd2531b18f1a78b980c9d docs/models/messageinputcontentchunks.md: id: 34aac9c271db - last_write_checksum: sha1:d8ffdfd8b5458497e2cb6a32f52900c3ca2a6ddf - pristine_git_object: 0561785082c741f39f930ab7ded5b6c6a9ade6ad + last_write_checksum: sha1:641cd1dba3721f85b049c5ee514879f067483949 + pristine_git_object: 4fd18a0dcb4f6af4a9c3956116f8958dc2fa78d1 docs/models/messageinputentry.md: id: eb74af2b9341 last_write_checksum: sha1:c91bfdf9426c51236b6ff33d127dbe62b051a9da @@ -1067,8 +1520,8 @@ trackedFiles: pristine_git_object: 65e55d97606cf6f3119b7b297074587e88d3d01e docs/models/messageoutputcontentchunks.md: id: 802048198dc0 - last_write_checksum: sha1:8cf4e4ea6b6988e22c117d8f689bbfb0869816ad - pristine_git_object: c4a7777e7675ebf2384311ec82b2713da69e5900 + last_write_checksum: sha1:d70a638af21ee46126aa0434bf2d66c8dd8e43ff + pristine_git_object: d9c3d50e295b50618f106ef5f6b40929a28164df docs/models/messageoutputentry.md: id: f969119c8134 last_write_checksum: sha1:f50b955cd622a6160c0ada34b0e14bff612802b7 @@ -1085,6 +1538,10 @@ trackedFiles: id: cecea075d823 last_write_checksum: sha1:16dac25382642cf2614e24cb8dcef6538be34914 pristine_git_object: 16d8d52f6ff9f43798a94e96c5219314731ab5fb + docs/models/messageresponse.md: + id: 3dd409ff05ba + last_write_checksum: sha1:f7dd5b03360f01417c32a33fd8131e6899ec6430 + pristine_git_object: 504aa9de165ea21ffd7178dd092b7532fc3f9e6a docs/models/metric.md: id: a812a3e37338 last_write_checksum: sha1:14016848dcfaba90014b482634ed6d5715caa860 @@ -1099,8 +1556,8 @@ trackedFiles: pristine_git_object: c7dd2710011451c2db15f53ebc659770e786c4ca docs/models/modelconversation.md: id: 497521ee9bd6 - last_write_checksum: sha1:22a8d7502eeaf176fbd1c7b22b512b4f9e4e043f - pristine_git_object: af2e5c6149339a561b03b954cd0e71f9d9aeffd6 + last_write_checksum: sha1:aea6f51b6276c5e36447c828e78a30367f15a978 + pristine_git_object: 190a6f6eb48191b2507a4861525707f041961538 docs/models/modelconversationtool.md: id: 2dd28167bc36 last_write_checksum: sha1:9b33f73330e5ae31de877a904954efe342e99c4f @@ -1113,6 +1570,18 @@ trackedFiles: id: e2eb639c646f last_write_checksum: sha1:7394ba5645f990163c4d777ebbfc71f24c5d3a74 pristine_git_object: b44e84a00d0c54f8df78650d45de0a409c901048 + docs/models/moderationllmv1action.md: + id: ebbde3bb4ffb + last_write_checksum: sha1:4b8a7001254c7c1f56bba10e4aa5445a41def160 + pristine_git_object: e24d6a2296ded90c15dffccf636c6628d0de6c4f + docs/models/moderationllmv1categorythresholds.md: + id: b474ca28a6e7 + last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 + pristine_git_object: 90ae213feda5e63ad71fbd7bb0bfb07ee7b1e2c1 + docs/models/moderationllmv1config.md: + id: e39a45c3e458 + last_write_checksum: sha1:7bc088d2563fa4bb89175423b94908da4aaf7a54 + pristine_git_object: 0c410947c9554348a77fd02d48a1a5d7e40f0abb docs/models/moderationobject.md: id: 4e84364835f5 last_write_checksum: sha1:2831033dcc3d93d32b8813498f6eb3082e2d3c4e @@ -1123,8 +1592,16 @@ trackedFiles: pristine_git_object: 75a5eec74071fdd0d330c9f3e10dac0873077f20 docs/models/multipartbodyparams.md: id: f5be2d861921 - last_write_checksum: sha1:34e68e3795c7987138abd152177fa07198d2f6f6 - pristine_git_object: f14b95737fde09a120b35e2f922568ca31825bd5 + last_write_checksum: sha1:624f30759b7b7de1913b1ef3b8bb2187a95b9570 + pristine_git_object: 9d7a00c44e1507edd12f16fbb6b3864f1c0bbd81 + docs/models/observabilityerrorcode.md: + id: 61d16ff95b87 + last_write_checksum: sha1:cba4ebf5b8b3007046c124504e1472bcd464f109 + pristine_git_object: 0c387f570c7b96c402c0e3d60108ee4cdcb22764 + docs/models/observabilityerrordetail.md: + id: 38061447dfbb + last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd + pristine_git_object: a95e25c91c54edc4948ef82c1626773975190110 docs/models/ocrimageobject.md: id: b72f3c5853b2 last_write_checksum: sha1:90c5158dec6a7b31c858677b6a8efa1e3cabd504 @@ -1153,30 +1630,94 @@ trackedFiles: id: 419abbb8353a last_write_checksum: sha1:6e717a3f3de3c464e8b3237f06867cdfecec339e pristine_git_object: d9d79125cb02bc2b09d8dc543a5e2d4a6c55571c + docs/models/op.md: + id: 4f953e6b890f + last_write_checksum: sha1:ca76665f125d37edbcf87a36a2aaafdb722d03a4 + pristine_git_object: fa3e2f3a9e437f6bd82ad87e1589484392ccb68c + docs/models/operator.md: + id: 1b6d3fc58add + last_write_checksum: sha1:e1008f48087ee8da75dd25be6207f7b2098fe131 + pristine_git_object: ca54debcf338366f66c540fdb2020e85959ef5b9 + docs/models/option.md: + id: b70901c8beab + last_write_checksum: sha1:aeac15a068312b38625c3efcd08f5f179f607f92 + pristine_git_object: 0f600be4b142e088e916a243e196d57ffb3dd76e + docs/models/or_.md: + id: 4062b9894f72 + last_write_checksum: sha1:cbf92175e3a4f829d7ad84da51301a42bbfa80cd + pristine_git_object: 2a2172695146be50782a3ef32815950d4829cf64 docs/models/orderby.md: id: 9e749ed80f72 last_write_checksum: sha1:6ec002e3e59f37002ccb14e347b790ca4daef773 pristine_git_object: bba50df10855a8d6acdf4b061ec2ffeb0279fd7f - docs/models/output.md: - id: 376633b966cd - last_write_checksum: sha1:600058f0b0f589d8688e9589762c45a0dd18cc9b - pristine_git_object: d0ee0db93f56c40f6684fcfdb5873aba586bc876 docs/models/outputcontentchunks.md: id: f7e175c8e002 - last_write_checksum: sha1:5adb0733a8ca9b224155dfef66dfb37b7f416972 - pristine_git_object: e5185014faa41b6e6d1567d713fc390f551fad01 + last_write_checksum: sha1:5094466110028801726cc825e8809f524fe1ee24 + pristine_git_object: c76bc31d4d8791b7bef4dc6cbff6671b38a7927d + docs/models/paginatedconnectors.md: + id: 108e699a33a1 + last_write_checksum: sha1:bbec5d2256b55b26ea1429439ff5d7abe744ab04 + pristine_git_object: 3fff5b95a6ccbed2356e4fbfe907ed2fb8334ea2 + docs/models/paginatedresultcampaignpreview.md: + id: cbc69a4c26bd + last_write_checksum: sha1:032f0179ec659ed0f1401b8fd9bbef10637d8afc + pristine_git_object: 7e8e5715b373b00ac7ea06a568da27dc777173a9 + docs/models/paginatedresultchatcompletioneventpreview.md: + id: bc3919eaf32b + last_write_checksum: sha1:1a537bafaa390ee5e8dd7869c5b8905a35526f29 + pristine_git_object: 96b4b7ae6913846f39be80a3732b85eeddfeb93f + docs/models/paginatedresultdatasetimporttask.md: + id: 461b15377067 + last_write_checksum: sha1:6f916fe2ffc98bfabbc8905a470513016211ba4c + pristine_git_object: ce067d528e53e859577217e60e83b63eb8d5199c + docs/models/paginatedresultdatasetpreview.md: + id: 509ba8c49460 + last_write_checksum: sha1:b3f072c50ace6b4c52d0e8a43a39bc84767391dc + pristine_git_object: f6ca903772591eefbdd02d836fb2227635380858 + docs/models/paginatedresultdatasetrecord.md: + id: 79bed183ed1c + last_write_checksum: sha1:9f3d08b3f0b2618d66047f198121d762e8782a17 + pristine_git_object: 31b086eb6ce8db231af2ca60d07b10d20a99ce9a + docs/models/paginatedresultjudgepreview.md: + id: 90506e511844 + last_write_checksum: sha1:01368f99123b7db0e8dee1f03640f8258f89ea8b + pristine_git_object: 91bf0c35876a6dcc2bf5cd34c8cbf1ade82b4d0c docs/models/paginationinfo.md: id: 3d2b61cbbf88 last_write_checksum: sha1:1da38e172024fe703f3180ea3c6ec91fe3c51ed0 pristine_git_object: ad1fbb86c714c152a5e6e99d8a741e7346884e55 + docs/models/paginationresponse.md: + id: 592cf80526b8 + last_write_checksum: sha1:e72a2238fe984cc4fa0d2522b462aa9ad247af78 + pristine_git_object: 7ed17a697771f10febe2b893f092865b09dc04c7 + docs/models/postdatasetrecordsfromcampaignv1observabilitydatasetsdatasetidimportsfromcampaignpostrequest.md: + id: d5158d7e7b7f + last_write_checksum: sha1:7e425ce967a5d92b14b2efa1b98e9fcf578d9c92 + pristine_git_object: b3bf2a61d1e14f54b53e746326649a51beb3419b + docs/models/postdatasetrecordsfromdatasetv1observabilitydatasetsdatasetidimportsfromdatasetpostrequest.md: + id: 6a1b28e01fd6 + last_write_checksum: sha1:63acf2f14db16c43da0347c0b5547cf90bf91e55 + pristine_git_object: 33dafda2ecabe8d4d92b973ae78932c6037809f5 + docs/models/postdatasetrecordsfromexplorerv1observabilitydatasetsdatasetidimportsfromexplorerpostrequest.md: + id: 92f8f5c18f8e + last_write_checksum: sha1:0de74481df2b1114c0c6e5bae6c8b83e09e65c7d + pristine_git_object: ba25323e33b0ab40287aa944ae77fe79148a9459 + docs/models/postdatasetrecordsfromfilev1observabilitydatasetsdatasetidimportsfromfilepostrequest.md: + id: ffc31f79f514 + last_write_checksum: sha1:f07eefba3eff14afa69786c37beacaac8484a99a + pristine_git_object: 0bff196b59382962b6e49884c547354c2f71af03 + docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md: + id: a3c711a50d05 + last_write_checksum: sha1:130c16a00743f65394279d00af233e6ee4337451 + pristine_git_object: 86ab87b8d016644f31b762a9010b368337c3b141 docs/models/prediction.md: id: 3c70b2262201 last_write_checksum: sha1:ca8a77219e6113f2358a5363e935288d90df0725 pristine_git_object: fae3c1ca4ba2c2ddb3b7de401ecdc8d56dcc7740 - docs/models/processingstatusout.md: - id: 83c8c59c1802 - last_write_checksum: sha1:7dbbfe790616ab4388e532bd78ffc1a5183b332d - pristine_git_object: bc40d3209c4c641dd7416c925b965c1bf7b73b1b + docs/models/processingstatus.md: + id: 06047222d2ff + last_write_checksum: sha1:fd2f5d605c6e5f8aa86461e8442c50db3fbea07d + pristine_git_object: 514caa50e524ae5afab802b8394cb27189b2bfbe docs/models/processstatus.md: id: "336054835357" last_write_checksum: sha1:9b87de1980428307af6c29c2086c0e1f612ebd72 @@ -1233,6 +1774,18 @@ trackedFiles: id: 8857ab6025c4 last_write_checksum: sha1:4b7ecc7c5327c74e46e2b98bd6e3814935cdecdf pristine_git_object: c81c115992439350d56c91d2e3351a13df40676b + docs/models/resource.md: + id: 94a32a903140 + last_write_checksum: sha1:0c141e37497f5b07d2da77a41777617ed3653582 + pristine_git_object: 30d74c40f3add81023ad86271bb02dfe018c1013 + docs/models/resourcelink.md: + id: 1086204e8a19 + last_write_checksum: sha1:f1a1c228a16e8e99cd5ff04622455e080418dd6d + pristine_git_object: 074c573e64e98cbaf177fde279364f26df04a2bf + docs/models/resourcevisibility.md: + id: 891d464e9c47 + last_write_checksum: sha1:acf48cc74f27035f479f976e73897ea02d7eaaa8 + pristine_git_object: 9c06af2d034cb7de730aa39aa3a3188aac4bc764 docs/models/response.md: id: 583c991c7a30 last_write_checksum: sha1:0791cb4aa4045708ab64d42bf67bd6ab74bc7752 @@ -1277,6 +1830,22 @@ trackedFiles: id: 0e09775cd9d3 last_write_checksum: sha1:33cef5c5b097ab7a9cd6232fe3f7bca65cd1187a pristine_git_object: 34a6a012b1daeeb22626417650269e9376cc9170 + docs/models/searchchatcompletioneventidsrequest.md: + id: ace22de1b563 + last_write_checksum: sha1:0368a82e5b6399806252670aec01714e5bb78331 + pristine_git_object: 7d0c4a509c8388cb9762724badd4c20a4494bf6c + docs/models/searchchatcompletioneventidsresponse.md: + id: d35dba44c6e3 + last_write_checksum: sha1:ecaf8fbe6e098c63df02d016fa391320e4bb2f92 + pristine_git_object: 6e429684ac0246438d1b1c5ae799ec499a5bbe64 + docs/models/searchchatcompletioneventsrequest.md: + id: 429f092e3dcb + last_write_checksum: sha1:caacd88fdf6e4c28c0c1a6a33357ab0f728996ef + pristine_git_object: 11bc3ab9d2c7096775e68fed59aecab0c3d25834 + docs/models/searchchatcompletioneventsresponse.md: + id: e7cb0de862bc + last_write_checksum: sha1:d8e860c666fe6b152d3944e9182e90be539c3ce2 + pristine_git_object: 9474c1109d62fc5f7ff0bae32d386d54951d7fa2 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf @@ -1285,18 +1854,18 @@ trackedFiles: id: 53a713500576 last_write_checksum: sha1:9d45d4bd272e6c146c3a8a21fd759acf2ae22148 pristine_git_object: dc5d2b68a810c2983b5a47fbff747dfc2cc17598 + docs/models/sharing.md: + id: 9f1e88417a87 + last_write_checksum: sha1:876fd514d08a6987646bf0fec636bf3fef89155b + pristine_git_object: fc718632594e04c682c6d6a3931a94d8b1fd4059 docs/models/sharingdelete.md: id: 165cac179416 last_write_checksum: sha1:1a0b3c95f4b56173510e234d7a76df85c593f360 pristine_git_object: 1dcec0950c7fcd264ea9369c24244b54ba2bcfbf - docs/models/sharingin.md: - id: 08d396ee70ad - last_write_checksum: sha1:662edfc07a007e94fe1e54a07cf89d7c83c08df5 - pristine_git_object: bac18c8d43f801e8b5cf5b3cd089f9da0ee2281a - docs/models/sharingout.md: - id: 5db4547c7c56 - last_write_checksum: sha1:bd15c318d1a3f5bee7d7104d34cbd8ba6233bbb8 - pristine_git_object: 35aeff43593f3c9067c22a2f8b1468d7faa5af34 + docs/models/sharingrequest.md: + id: cd53ce3913a5 + last_write_checksum: sha1:380d0621a0a8ec9cd4be2b53a6e326b8c9c3d201 + pristine_git_object: 21b8ec1f74c1f903aa087cd3b4d13918c0ea9dad docs/models/source.md: id: 6541ef7b41e7 last_write_checksum: sha1:d0015be42fe759d818ebd75b0cec9f83535a3b89 @@ -1305,6 +1874,10 @@ trackedFiles: id: 6a902241137c last_write_checksum: sha1:567027284c7572c0fa24132cd119e956386ff9d0 pristine_git_object: ae06b5e870d31b10f17224c99af1628a7252bbc3 + docs/models/supportedoperator.md: + id: 000f0770e0f9 + last_write_checksum: sha1:7702df7346f66b739b5a7e1d26b2d5ebc9d19c74 + pristine_git_object: 74cf9b8e6705059a24e7d1d0e311943ed1ce5c40 docs/models/systemmessage.md: id: fdb7963e1cdf last_write_checksum: sha1:c7603c5ce77ba2bcbda9eff65eeafdb1e9ecbec7 @@ -1325,14 +1898,22 @@ trackedFiles: id: 6cd12e0ef110 last_write_checksum: sha1:d9fe94c670c5e0578212752c11a0c405a9da8518 pristine_git_object: df0e61c32bc93ef17dbba50d026edace139fee6a + docs/models/textcontent.md: + id: 82aa22f226fc + last_write_checksum: sha1:b359ace0ab7d8960b9c0a205a788fb26189cc6ac + pristine_git_object: ddd2df027b7f0cca132c69fa47bb76e5e8afdc87 + docs/models/textresourcecontents.md: + id: aa82a3efa4ec + last_write_checksum: sha1:58468c602ae4e85c860b909f39384f49f7471a4b + pristine_git_object: daa531e1bf60f55962069ef586b4f1ae56c32662 docs/models/thinkchunk.md: id: bca24d7153f6 - last_write_checksum: sha1:0f861f1653035dea2018be9a977c15f54add9531 - pristine_git_object: 70c0369f16465e1b1f5f46e8cd799e5db536cdde - docs/models/thinkchunkthinking.md: - id: 22de7b5060fb - last_write_checksum: sha1:5e0722b8d513b38d60fbfe28635bdea40b951593 - pristine_git_object: dd1ecca12b5cda76a51b1e13335f1757a9dd7a68 + last_write_checksum: sha1:7fa91717a3c5678d33bac70c758635c50f72be47 + pristine_git_object: 98603d8f97b3e432014be8e30b0418d1d462c016 + docs/models/thinking.md: + id: 07234f8dd364 + last_write_checksum: sha1:90c0b34284137712678b0671e9f4bfb319548cbf + pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/timestampgranularity.md: id: eb4d5a8e6f08 last_write_checksum: sha1:e256a5e8c6010d500841295b89d88d0eface3b88 @@ -1461,22 +2042,66 @@ trackedFiles: id: 69a13554b554 last_write_checksum: sha1:d969f462034ed356f2c8713b601ee7d873d4ce07 pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d + docs/models/typeenum.md: + id: d306d1d601a4 + last_write_checksum: sha1:506e72f893c4cebf7bbeb59fd05fbe5caafdb68c + pristine_git_object: 80a66af314d5ba9f5a99b07f3db9760849edad53 docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 pristine_git_object: 375962a7110f814288ea9f72323383bd8194e843 docs/models/updateagentrequest.md: id: 371bfedd9f89 - last_write_checksum: sha1:97170995ed40391023f0dce5096cfebe83fa7dc8 - pristine_git_object: d3428d92a8f23670a6b587a6017a353d2c12a815 + last_write_checksum: sha1:73936f78ae35e5f84ebe32aabb150d6792ce40d1 + pristine_git_object: b8aa01f66b13d050839bd0aacf1550f669bc8d13 docs/models/updateagentrequesttool.md: id: bdf961d2c886 last_write_checksum: sha1:5355f8c97b2aef98aebff251e1f4830ddbaa7881 pristine_git_object: e358b1edb9035667104700dde890bb0b43074543 + docs/models/updateconnectorrequest.md: + id: 40e38d9c7c2a + last_write_checksum: sha1:183567baed17e6b95628cfe17455e1861fd48758 + pristine_git_object: d6d76631ab4841a1bd6a75a978f4d3837449d7e9 + docs/models/updatedatasetrecordpayloadrequest.md: + id: ada11a6c544f + last_write_checksum: sha1:220ce1184c9f6b6c6d1e5cdf2dc18197778f7af2 + pristine_git_object: f152d84329ffd358b56392025a69f13f6d2b7546 + docs/models/updatedatasetrecordpayloadv1observabilitydatasetrecordsdatasetrecordidpayloadputrequest.md: + id: abb1793448c5 + last_write_checksum: sha1:4bc30c277c9d2fa5f8fdf8938f65c61e1da8abf8 + pristine_git_object: fbb4b308362ac1f8157554ab6deeae1658231879 + docs/models/updatedatasetrecordpropertiesrequest.md: + id: 8e3f0136f445 + last_write_checksum: sha1:afa0832f5a234c6e7434a4414cb16f9b2c9ae45d + pristine_git_object: 6e98944d42f9adc02dd45c0e152dd28ba7ad6cdf + docs/models/updatedatasetrecordpropertiesv1observabilitydatasetrecordsdatasetrecordidpropertiesputrequest.md: + id: 2f433ceabf6d + last_write_checksum: sha1:18a646d17ae785ab5813eb36c43dfda857429558 + pristine_git_object: 6b09e479247a14a4c4e5d4786c2705a8c01ba5c8 + docs/models/updatedatasetrequest.md: + id: c8f941dea81b + last_write_checksum: sha1:3b4276274ab943411faf51b2a788226f0ac8343d + pristine_git_object: 2a5194e493808629a9031f518a36bbe68d2c04a6 + docs/models/updatedatasetv1observabilitydatasetsdatasetidpatchrequest.md: + id: 4be4c812536f + last_write_checksum: sha1:600212552869daf41c872ff6ec7a4cbff1e00b63 + pristine_git_object: 78eae8fb8193b201064416858d719fc28bb964b1 docs/models/updatedocumentrequest.md: id: ee4e094a6aa7 last_write_checksum: sha1:4c4d774c67449402eb7e1476b9d0fef5b63f2b99 pristine_git_object: 7e0b41b7be9f559b27a3430f46ed53d0453f6e03 + docs/models/updatejudgerequest.md: + id: c220d8a2a289 + last_write_checksum: sha1:7c85b0f8b6ca133ca9e4b435322e50f97afd8fbd + pristine_git_object: bf28ae7acdb67cf7b2beb0bd34403ff33fc7e477 + docs/models/updatejudgerequestoutput.md: + id: 3d8371657f6e + last_write_checksum: sha1:ba478cb39ba8ebc739477e4ac763bbe87b0f0a8e + pristine_git_object: a8db68ab3266b42741f22348e54524a2134f081a + docs/models/updatejudgev1observabilityjudgesjudgeidputrequest.md: + id: e900c1258e5e + last_write_checksum: sha1:4125c640bf8271131c8e57c0c617aa9348f29e67 + pristine_git_object: bfe3648d706b6c1f95b8c5515d4ee999d556fa2d docs/models/updatelibraryrequest.md: id: 2eda82f12f31 last_write_checksum: sha1:436e08988daa8ca04ece36a4790ed84e0629b81a @@ -1503,8 +2128,8 @@ trackedFiles: pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf docs/models/validationerror.md: id: 304bdf06ef8b - last_write_checksum: sha1:1889f608099577e6a116c14b211a6811d6b22786 - pristine_git_object: 7a1654a1a5cfb3ab92360b361e8e962bf2db4582 + last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 + pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a docs/models/wandbintegration.md: id: ba1f7fe1b1a3 last_write_checksum: sha1:ef35648cec304e58ccd804eafaebe9547d78ddcf @@ -1523,8 +2148,8 @@ trackedFiles: pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 docs/sdks/accesses/README.md: id: 2ea167c2eff2 - last_write_checksum: sha1:279d3b3a4f625b89b25e9a2a47886ac6008b3ca0 - pristine_git_object: c50456df9ea2bb71f78a83ad28f90e089d2e2cd7 + last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 + pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 last_write_checksum: sha1:a73ae6719acef32b47be55ea5c5684e91f7eda68 @@ -1535,32 +2160,52 @@ trackedFiles: pristine_git_object: 3633fe4ee136c1ac90f9446425f62a0d68fa4f90 docs/sdks/betaagents/README.md: id: 5df79b1612d8 - last_write_checksum: sha1:9ec1c7a967bc653fe175a7986ddec74d5feb0714 - pristine_git_object: aaa5110e6db30f5450877b67d70d46e53b98996b + last_write_checksum: sha1:6d14ffeace9a068f45ed9c62ee6663dc3768239f + pristine_git_object: b936538c54d38e52a67ffdb8c65ec35999197a3a + docs/sdks/campaigns/README.md: + id: 18dcc3c717ca + last_write_checksum: sha1:758413376668e53883ded94d41b1167cbc00fa04 + pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c last_write_checksum: sha1:5e7a43def5636140d70a7c781ed417e527ce9819 pristine_git_object: 1bf4aeadc762f5d696c278eefaa759f35993e9d5 + docs/sdks/chatcompletionevents/README.md: + id: 6965539e0525 + last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 + pristine_git_object: c3f19868c6707a94f0efaeeb456c09221105ff74 docs/sdks/classifiers/README.md: id: 74eb09b8d620 last_write_checksum: sha1:9f11740f8cf1a3af44fff15b63916305f1882505 pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 + docs/sdks/connectors/README.md: + id: 7633a87d946d + last_write_checksum: sha1:1c6650e6d5511bc5eaafb0d05d78805d333f3704 + pristine_git_object: b8150eb85d182af6e7ed8216cc4b4a535271a53a docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:4c5f8ea93d560956cb23c26e0d5f6d7cbc129e07 - pristine_git_object: e77d329b735dc21f620470bcf82220a79bc34e18 + last_write_checksum: sha1:5c75be39ef1f2a15249e363e33ebf8f3e964301c + pristine_git_object: 083b293d12fd00ba9b74a00666a9f9542cca9f4c + docs/sdks/datasets/README.md: + id: deb5d90f4faf + last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 + pristine_git_object: c04ced0cf5e5f7774ba9b1d25722085b92b8f0c2 docs/sdks/documents/README.md: id: 9758e88a0a9d - last_write_checksum: sha1:ac7ab2598066971e8b371a3e73aa266ec697df1b - pristine_git_object: 9c219b6709d5d5bfa28113efca92012e8c5a5112 + last_write_checksum: sha1:a77fb7acf2be6e18a3017855b30f5ad58576698f + pristine_git_object: 2c9440f93d68a220c2cb2cf03c5cd656eece3be8 docs/sdks/embeddings/README.md: id: 15b5b04486c1 last_write_checksum: sha1:4a279bf9bcd84a9878ef979c78b8b75af3d52f02 pristine_git_object: cb207d8be2ca86b00dc797fc06eabd1498adb770 + docs/sdks/fields/README.md: + id: fdb6c4f3bd69 + last_write_checksum: sha1:ea6dea75f85d25fd0ccdd2c659ecec43d0e5242d + pristine_git_object: 3c8424419bae5c7e6e47b4cb23e35064531a8345 docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:f5861c42227b901742fd8afe7155ed6d634b1b4c - pristine_git_object: 9507326be83eaf750daa12c0b1421d819b72340d + last_write_checksum: sha1:7022f6e63afea7c7988b251351d18361fd1b5e4a + pristine_git_object: 7db76611c5788e2a0440f7c95d07928851e37d6a docs/sdks/fim/README.md: id: 499b227bf6ca last_write_checksum: sha1:5b2ce811df8d867d14fe0126f2c9619cca779f56 @@ -1569,18 +2214,26 @@ trackedFiles: id: 03d609f6ebdd last_write_checksum: sha1:2d7ff255c1462d5f1dff617a1993e730ec3911ea pristine_git_object: 4262b3a9833180ce86da43a26ee7ab27403f2cd0 + docs/sdks/judges/README.md: + id: 330e067ff8b7 + last_write_checksum: sha1:270582ab7a4200c44b0c865afb6b82d6e0c95182 + pristine_git_object: f1187518e46b00d8fb1b2bb0c4c72f51cd828a2b docs/sdks/libraries/README.md: id: df9a982905a3 last_write_checksum: sha1:e3eb0e9efb3f758fdf830aa1752c942d59a4f72b pristine_git_object: 7df1ef4e26449af572412f052ee7ad189039544f docs/sdks/models/README.md: id: b35bdf4bc7ed - last_write_checksum: sha1:2aa91ffe637c049aed0d63d24ac39688b6ecb270 - pristine_git_object: 311a2db6e213902ac5a2c27acf19f856dae2c264 + last_write_checksum: sha1:ca04fe883c5440abf402640cf26a1a0e9799a55f + pristine_git_object: f585dcbeadeb87d5634a505450f3599af21df155 docs/sdks/ocr/README.md: id: 545e35d2613e last_write_checksum: sha1:da377d75b6b7480c335d7f721bb06fe11492be38 pristine_git_object: fde2a82339e10c74aca6d1b4168b62501d7bbf83 + docs/sdks/records/README.md: + id: db86bab024d3 + last_write_checksum: sha1:2ef5b164016e9b40c27d8a4915aeb8d3d2ed42c7 + pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 docs/sdks/transcriptions/README.md: id: 089cf94ecf47 last_write_checksum: sha1:15d118796f147bc5b0bf4146ba39bfa9edfbc996 @@ -1611,12 +2264,12 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:a48c2cc43ac028eb2e31a129a9551ad2fda3d33f - pristine_git_object: 805648e42e48831658907f664d6536e8bdcd98c0 + last_write_checksum: sha1:9ca227af0848f7e58917b55ae2433118ff5f073d + pristine_git_object: c7251c9ce55d10a4ef89ce5ab58a05332b9b21ff src/mistralai/client/accesses.py: id: 76fc53bfcf59 - last_write_checksum: sha1:ed94623aa8a2bd502572a699a2f54c9281ec283e - pristine_git_object: 0761b0bc6080ab0d891be70089a1908d435559fa + last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 + pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 src/mistralai/client/agents.py: id: e946546e3eaa last_write_checksum: sha1:7049cab7c308888c88b0341fb29f0132e154e3cb @@ -1639,36 +2292,52 @@ trackedFiles: pristine_git_object: 0e135b30cd122d1a813ee67bf2f9037953448e73 src/mistralai/client/beta.py: id: 981417f45147 - last_write_checksum: sha1:85f42fc6c2318eef94c90405b985120220c9c617 - pristine_git_object: 65b761d18f7274cc33162a83efa5b33211f78952 + last_write_checksum: sha1:0971bda6a9024dcbdf8b4aaad1086417b01ee40f + pristine_git_object: 83b8fc8792469efbd03f0bab240d4a6dc8135db5 src/mistralai/client/beta_agents.py: id: b64ad29b7174 - last_write_checksum: sha1:7c900a6b1483108a367050440667c069b08fbb92 - pristine_git_object: 157c5de4c66273e6df468f8a12b4399f9efb32fb + last_write_checksum: sha1:b63c905fbf5b8f85379d3df719964fc7c9675a51 + pristine_git_object: 19f8d2b261505870509a5f751988f99980385b5f + src/mistralai/client/campaigns.py: + id: 9e64fcf4e60e + last_write_checksum: sha1:0139096765ca8b44ef209ee0fc62e72040f3a6ff + pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df src/mistralai/client/chat.py: id: 7eba0f088d47 last_write_checksum: sha1:520b0da011d63c60bd0d3a960a410a8f4a6a3e22 pristine_git_object: 13b9c01f035c4fd6f60b78f20a1801bedf3b582b + src/mistralai/client/chat_completion_events.py: + id: 1813f339625b + last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 + pristine_git_object: c060235c2c673b41c5fe0d1c8ac3a5c2a3d44e62 src/mistralai/client/classifiers.py: id: 26e773725732 last_write_checksum: sha1:ee94a4e50cda893f9c19c2304adda8b23fc2de9e pristine_git_object: 67199b601e38dff6fc6a4317eb845fbde6c25de0 + src/mistralai/client/connectors.py: + id: 39da03126050 + last_write_checksum: sha1:e407ace631bdafb1a0e62e292a4c27e5ce00bc38 + pristine_git_object: 37e018330e85109692a83d97d62a5efe7a15ee6f src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:1101b9e374010ba9cb080c30789672cfcfc45c55 - pristine_git_object: ec33b1fb12d1923ef5f686ed09c5fe5ae889e40c + last_write_checksum: sha1:eba234effe5c649b220c370a1c9098ba9a4c686d + pristine_git_object: a4af31f3abe3ece7791a76d20de9146bb83e1fcc + src/mistralai/client/datasets.py: + id: e5a6ae2a2d85 + last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 + pristine_git_object: 48ecbdd8c1b2f42fa77a033aa0e4b4f49d20f088 src/mistralai/client/documents.py: id: bcc17286c31c - last_write_checksum: sha1:37669f51eba1b352a5e3c7f3a17d79c27c7ea772 - pristine_git_object: b3130364c0f3cc90ed1e4407a070bd99e3cce606 + last_write_checksum: sha1:29e7edd6f45d8a1a7ec8e9c9734bebe56ff97e7e + pristine_git_object: 95ea432390fcf4c8c07b3e99c7c1f5776007ce10 src/mistralai/client/embeddings.py: id: f9c17258207e last_write_checksum: sha1:d1610bf12dba8b2f8cb27d2f0aa592594dfe6b3a pristine_git_object: 5d55ffc43c0c98d46e04b238ab23a08d1b9e6a6a src/mistralai/client/errors/__init__.py: id: 0b2db51246df - last_write_checksum: sha1:0befddc505c9c47388683126750c7ad0e3fbef52 - pristine_git_object: 58a591a1cc2896f26df2075ffca378ca6c982d1e + last_write_checksum: sha1:0032f4eb3501c71fafb8f68113a8c80e677311a4 + pristine_git_object: f6fd99a097e71ec901f14f3c726a50f6351939de src/mistralai/client/errors/httpvalidationerror.py: id: ac3de4a52bb6 last_write_checksum: sha1:73251adb99a07d11b56d0bc0399a2362ff9ccdba @@ -1681,6 +2350,10 @@ trackedFiles: id: 8b469ecb0906 last_write_checksum: sha1:0b3fdb1136472c41a4a739a5cbf9e2a4ce0c63a4 pristine_git_object: d71dfa7b24146f1390ac6830e61acf337b99ca83 + src/mistralai/client/errors/observabilityerror.py: + id: 4946ae06717e + last_write_checksum: sha1:dc65670ba779ef19f015f65d133ec595ba002878 + pristine_git_object: a360bac4c0c6620e19d3b27f4de6d722b2d420c2 src/mistralai/client/errors/responsevalidationerror.py: id: 6cfaa3147abe last_write_checksum: sha1:6862d178d4d1964bc03db47b76709aa406546981 @@ -1689,10 +2362,14 @@ trackedFiles: id: c489ffe1e9ca last_write_checksum: sha1:f708168e46c2960dd51896083aee75ccdb36f9dd pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d + src/mistralai/client/fields.py: + id: 862335210b20 + last_write_checksum: sha1:789ac221e3aec61d0d31abd1761e368e383fba88 + pristine_git_object: a5b8003ca5fc766a7db89d6c95b9d0e42952af86 src/mistralai/client/files.py: id: f12df4b2ce43 - last_write_checksum: sha1:a16c8702d15339200b09c62948c06f79e720d79c - pristine_git_object: a5f3adf6dd9b60a202c70edf7d2a148a626ce471 + last_write_checksum: sha1:e60cfc2841ef8888a6a52479adf76ec32ecae6ac + pristine_git_object: a843cb7b2b1b55ba20093c4d43faddb972d8f645 src/mistralai/client/fim.py: id: 217bea5d701d last_write_checksum: sha1:dc427c9e954dfb9a7fe2df8b5c544877a28cdc73 @@ -1709,18 +2386,22 @@ trackedFiles: id: 3e46bde74327 last_write_checksum: sha1:0f4ecc805be1dc3d6e0ca090f0feb7d988f6eb9d pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 + src/mistralai/client/judges.py: + id: b6024a41ecb4 + last_write_checksum: sha1:83cf149e1f7ccd75799da72bcc11f6ec99515c13 + pristine_git_object: e5dacd7fad62473a2b946afc4b05f34e3789c722 src/mistralai/client/libraries.py: id: d43a5f78045f last_write_checksum: sha1:6440b3df71fe557ecba5c23768d115efd4ceb26f pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:0ac0c956f0f87979e871a00c32884ee3102b6d2b - pristine_git_object: 7d2dfd970d48d54d798f1661206abdc697134434 + last_write_checksum: sha1:d776a15e3fa0fd11027c50d0f3c8e77882eb29b5 + pristine_git_object: 741c80f30cdaac0f0f03c440f2436bbb453af2f6 src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:6090ddf2b5b40656dfbf3325f1022a40ae418948 - pristine_git_object: 686a6eb84ecd27e725e3773b3f7773dddac1c10c + last_write_checksum: sha1:7fede9394ca174a3f0ee3d5a01d95ec265783e2c + pristine_git_object: 1fa27f08eaf0a7737a0f505aeae920f598f6968e src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 @@ -1825,6 +2506,10 @@ trackedFiles: id: 1b73f90befc2 last_write_checksum: sha1:b46298a653359bca205b6b1975bcd1909e563dff pristine_git_object: c2cf35522236f29ca1b9f2a438dfc79a59ca3e2a + src/mistralai/client/models/annotations.py: + id: 3ae9e07de11d + last_write_checksum: sha1:a67ea607358e534448fe556c6008105a8cf89a07 + pristine_git_object: ba085e2c7784ca442c4a5da72dddf3561dda0d9d src/mistralai/client/models/apiendpoint.py: id: 00b34ce0a24d last_write_checksum: sha1:733e852bf75956acd2c72a23443627abfa090b7b @@ -1841,6 +2526,10 @@ trackedFiles: id: ce5dce4dced2 last_write_checksum: sha1:d3c2e28583d661a9583c40c237430a1f63ea7631 pristine_git_object: 68866cd2c3c640cf56258f2f98b8a2385ea6fcdb + src/mistralai/client/models/audiocontent.py: + id: 8e39736e73f0 + last_write_checksum: sha1:9f96ac9f1b3035b66f0920df1b46a59df7c6bca8 + pristine_git_object: b0a9505b05c9fc27a5562aca4bf2d1de37eb3100 src/mistralai/client/models/audioencoding.py: id: b14e6a50f730 last_write_checksum: sha1:92ca06dce513cd39b2c7d9e5848cf426b40598ce @@ -1857,10 +2546,30 @@ trackedFiles: id: 33a07317a3b3 last_write_checksum: sha1:6e648ff58a70a0a3bd63a24676122b80eba4baf7 pristine_git_object: 2d1e9269b51d84cd8b21643fe04accd00839b013 + src/mistralai/client/models/audiourl.py: + id: f62d73a27faa + last_write_checksum: sha1:25e4a2f40630d678779befb4802a70b7fea582c1 + pristine_git_object: 98fef9770865c6ead929902a16286e7e697291c0 + src/mistralai/client/models/audiourlchunk.py: + id: f582b26db67b + last_write_checksum: sha1:dbfedb012b00140bc3ea91ac3f7ebf7b2a17ed17 + pristine_git_object: 89ebce795e95ab55e59652468bf55690e980a697 + src/mistralai/client/models/authdata.py: + id: b4d3fb07196e + last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 + pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe + src/mistralai/client/models/basefielddefinition.py: + id: ffa42818fea3 + last_write_checksum: sha1:0cd6a43a558734d38fbc39f1120a54c4cc825fe6 + pristine_git_object: f8b8faf759b795c4a9d072c2e4b50a4d22c80f7c src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 last_write_checksum: sha1:e2c3d1effee5b434fea9b958c0dd54fa96143924 pristine_git_object: 9c9e9a2045a10f4606f11ee5886a19ccf03bbf0e + src/mistralai/client/models/basetaskstatus.py: + id: 7b381554d5c7 + last_write_checksum: sha1:8124cb3871ff7565865cd8b06181b5b0a8eb3428 + pristine_git_object: ff2f1c63a6dceceeabe6b8c6bc8bf1a7c64c70a0 src/mistralai/client/models/batcherror.py: id: 1563e2a576ec last_write_checksum: sha1:51c9e9a4d306c2de45dc0879ade62daed3fc2972 @@ -1877,10 +2586,18 @@ trackedFiles: id: 6f36819eeb46 last_write_checksum: sha1:b2a71163e37a9483e172dc13b6320749bee38f2f pristine_git_object: 911a9a0554b9b8cb6dedcb3a86a06c39890b875e + src/mistralai/client/models/blobresourcecontents.py: + id: fa924bc295ad + last_write_checksum: sha1:2d0d6f84e274e544e2d1535513726f547fc2d1b7 + pristine_git_object: c2a55f95a156006e86f5f945c70bee8025e38fea src/mistralai/client/models/builtinconnectors.py: id: 2d276ce938dc last_write_checksum: sha1:4ceb3182009b6535c07d652ccf46661b553b6272 pristine_git_object: ecf60d3c1a83028d9cf755d4c9d5459f6b56e72a + src/mistralai/client/models/campaign.py: + id: c91d862fb405 + last_write_checksum: sha1:def484a2eefa9be72db2bfa63d93201e2a07f554 + pristine_git_object: a52bfcb90d6d8d29f4e23f71c5e95564bf3c95ec src/mistralai/client/models/chatclassificationrequest.py: id: afd9cdc71834 last_write_checksum: sha1:a29088359142ebd6409f45569168b2096014119e @@ -1889,6 +2606,14 @@ trackedFiles: id: 7e6a512f6a04 last_write_checksum: sha1:de0281a258140f081012b303e3c14e0b42acdf63 pristine_git_object: 2c515f6e9a290ebab43bae41e07493e4b99afe8f + src/mistralai/client/models/chatcompletionevent.py: + id: d85484d0205e + last_write_checksum: sha1:b709e6f710b62fee646eb7d12b24d69125522088 + pristine_git_object: 86253f5d97139c8b9043b9d9f2a71aba53b961c0 + src/mistralai/client/models/chatcompletioneventpreview.py: + id: 1cd843828e99 + last_write_checksum: sha1:f42767c2d344bc9cd9431acd7b911c81cafa9bc7 + pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 last_write_checksum: sha1:1f0390718ab06126a05e06797ef6af310ccab543 @@ -1905,6 +2630,10 @@ trackedFiles: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 pristine_git_object: 228e7d26b8b172c3e11f01d4f260bf6e5195b318 + src/mistralai/client/models/chattranscriptionevent.py: + id: 8ca679b2c39a + last_write_checksum: sha1:b49bd47918ea1f954f3c789c8ea0579ec893c49f + pristine_git_object: b23adf744944631e00f376c3dadf6f17a24a7df0 src/mistralai/client/models/checkpoint.py: id: 1a530d3674d8 last_write_checksum: sha1:418f08c61b64fa7ffb053c6f5912e211acab1330 @@ -1985,10 +2714,62 @@ trackedFiles: id: be202ea0d5a6 last_write_checksum: sha1:1a797019770795edcd911ff5b3580bedb83c05f4 pristine_git_object: ca50a7ad521b46f275dd3a39c98911f13ee527c8 + src/mistralai/client/models/connector.py: + id: 1a4facac922d + last_write_checksum: sha1:4acd40b285482f549ac76ef120aa32cd4ec2f171 + pristine_git_object: 967e454f870a44c9354a8ab1493800daeff35cac + src/mistralai/client/models/connector_call_tool_v1op.py: + id: 7948899b3068 + last_write_checksum: sha1:09dfd8f2d560f33fb12cba74cadcd505831d2389 + pristine_git_object: df5783d0a78128863d32c86230e6413bdf80ead9 + src/mistralai/client/models/connector_delete_v1op.py: + id: a377930b1435 + last_write_checksum: sha1:2c9a501ab2e2b05829f2e3fd838f88a610d56781 + pristine_git_object: 74134361aeeaf83af57d7edc7d9ae26ab09d96fb + src/mistralai/client/models/connector_get_v1op.py: + id: 73ca3a446dcc + last_write_checksum: sha1:f3a7480774e8f826ba8bc509a0dce280a18ee855 + pristine_git_object: 5770ee096fe7924384a8cd31ed1e40a11eff3e35 + src/mistralai/client/models/connector_list_v1op.py: + id: 5ec0889995f5 + last_write_checksum: sha1:4460df62af1ad834656484e9d34dc3f612fa4d84 + pristine_git_object: a89da710092dbcd14522b0190ef9dbefe49ff76a + src/mistralai/client/models/connector_update_v1op.py: + id: 6f884d18ac56 + last_write_checksum: sha1:be8044958ac76ecfc486dc5cb5f0876e595dcc38 + pristine_git_object: 6b00d0b0ca6d83b4ac1fce1ab204ac09ca5ceeb5 + src/mistralai/client/models/connectorcalltoolrequest.py: + id: 7dc7ec295301 + last_write_checksum: sha1:59caca0ee1ec5c43b8191087b1c202ea3ba3e2bc + pristine_git_object: 4e9a4d45dc4eb242ceda1c31736901e451dec862 + src/mistralai/client/models/connectorsqueryfilters.py: + id: 3b9fc81aa726 + last_write_checksum: sha1:dc90b518462978d5bdba53a1cfcea59f8afe8612 + pristine_git_object: 1aea18b01273aa5b1321e138f1b79e5c50edee07 + src/mistralai/client/models/connectortool.py: + id: 41ca596b44f8 + last_write_checksum: sha1:ead8ba36ca4a3b7c0edd06d38aff4a30aaddded2 + pristine_git_object: 26a8b7b75cb8283b00b379902b717c9e7d6e6329 + src/mistralai/client/models/connectortoolcallmetadata.py: + id: 2d27189e58e6 + last_write_checksum: sha1:3faa513be03ab9be9d9081976dab971e0dc2f231 + pristine_git_object: 9f3be6c4e6604f7ed2d2deeaf78569b61697ad45 + src/mistralai/client/models/connectortoolcallresponse.py: + id: c4f7a932bd2e + last_write_checksum: sha1:2666a1fb1c6b6a67f9e3147ab84a0ad7340740fe + pristine_git_object: 47071a944e80a79053a14dc57f7a3dee28a8d173 + src/mistralai/client/models/connectortoollocale.py: + id: 247ebe411537 + last_write_checksum: sha1:e68370e4bcf2a1f5f2f9036416fc889821668244 + pristine_git_object: ec1359c8ccf883bff066fd1500503f5e28913e05 + src/mistralai/client/models/connectortoolresultmetadata.py: + id: 86730e16aa67 + last_write_checksum: sha1:0b49abdb7cfdf461d225387ef03ed5e2413fdb2b + pristine_git_object: 520fb99b6430b317c326bdd9be86b63bd3822bd1 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 - last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea - pristine_git_object: e3de7591a089a3739af17108cecdc2d4240f10bf + last_write_checksum: sha1:872274333d03c88665b115a2eb99c2650ac7e3bb + pristine_git_object: 6d521e1a49c4ed1cdf6a3a3b85bfb17aa631f994 src/mistralai/client/models/conversationappendrequest.py: id: 81ce529e0865 last_write_checksum: sha1:bdae860241893ec3ab3f22bd57c45dede2927da3 @@ -2013,66 +2794,134 @@ trackedFiles: id: 011c39501c26 last_write_checksum: sha1:95e3abe55199f2118e6fb7e5d8520af6a929449a pristine_git_object: 84664b62337dcdc408bb01e0494fa598e6a86832 + src/mistralai/client/models/conversationpayload.py: + id: 4581218c84c1 + last_write_checksum: sha1:51c3787091d7d2a09a0625d854a74db3c46d6a1a + pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:f7a67082e06c1789f4c6a4c56bfef5f21cce5034 - pristine_git_object: 83d599ebf984f1df2390d97dbe651881f7dee0e2 + last_write_checksum: sha1:56e87a8f6e4670392e10f392bec44a923f3e14f8 + pristine_git_object: cb5dc6a5f2d69331263c12870ff5603e703d6060 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf - last_write_checksum: sha1:99148d75abcb18c91ba0a801174461346508f5fb - pristine_git_object: f6c10969a931eaf1a4667b0fcff3765f57658b15 + last_write_checksum: sha1:86c11bbd5003fc1a6838636257e07404da981ca7 + pristine_git_object: 2fc8504dbc7e2157623c0a6077e18ca96a0a0f5c src/mistralai/client/models/conversationrestartrequest.py: id: 681d90d50514 - last_write_checksum: sha1:99123cee7c54f44c02b56111305af399143b4e5a - pristine_git_object: 7ae16aff4de36a91093d3021b66283e657b00897 + last_write_checksum: sha1:9a015a4eb700aa97311231704da0f0eef4b4c7c3 + pristine_git_object: d5079689256f25d2d252aa3ad01ece94994b5abd src/mistralai/client/models/conversationrestartstreamrequest.py: id: 521c2b5bfb2b - last_write_checksum: sha1:abfd14652b4785c36de84a59593b55f7a6a2d613 - pristine_git_object: 0e247261d997ac3d8ff0155ba54cc4cafe9ac65a + last_write_checksum: sha1:42f885e4419853a2d5ee9766147b6c2c80cd1faf + pristine_git_object: 5cea41465634f71912cc2fdf79b63c7221939be0 + src/mistralai/client/models/conversationsource.py: + id: 24d6a0861d4b + last_write_checksum: sha1:e28921788ab1b6d2b6daf08b714bf34b2047eb6c + pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:7dc25a12979f4082ed7d7e37584bb9c30297f196 - pristine_git_object: a20dccae1a60753ed95f59da0df78c204c19d515 - src/mistralai/client/models/conversationthinkchunk.py: - id: 77e59cde5c0f - last_write_checksum: sha1:5db067661a5d4b0c13db92ad93da1aab9e0e7a34 - pristine_git_object: e0e172e3edbe46c000e82e712c135b96a65312e9 + last_write_checksum: sha1:c349ea248a85a9a329fbf878507b32fc761c4639 + pristine_git_object: 2559a8872df6a9bf9dd088f05259c5464df19a7c src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 last_write_checksum: sha1:3e0489836936a7a77fa3b41adde1eb459ecd176d pristine_git_object: 1e80f89ee4f7a3d464df2bf39990b467029e86c1 + src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py: + id: 1ddc53a46c74 + last_write_checksum: sha1:5df5b6676f6c115da0b1c242a6f3cc7f8c077927 + pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:273dde9338cc1eb166ee40f4c6215f90cae908ab - pristine_git_object: 54b09880eefe348d2e003ed1b238b67cb58b8e34 + last_write_checksum: sha1:28dd507f0d965b6e4ede3fb2248681e034b2bb4a + pristine_git_object: 8acbbd1b90bce84275d5e76ca74f2a2105c65f3f src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 last_write_checksum: sha1:e648017622cd6e860cb15e5dd2b29bf9f2a00572 pristine_git_object: 9a901fefee0ea6a825274af6fd0aa5775a61c521 + src/mistralai/client/models/createcampaignrequest.py: + id: 60012b559aee + last_write_checksum: sha1:b45a2ee90bf901bec844aa20e9184ca1afba4172 + pristine_git_object: b3957df9ef369ecc1746ee3efd1b463bc10b4be7 + src/mistralai/client/models/createconnectorrequest.py: + id: 3da192d6491a + last_write_checksum: sha1:c0ea3626315e622bb5ef9207662b2c58c420d9e2 + pristine_git_object: 8fd3d3abfdb32742bc8658b9f36a1463768da16d + src/mistralai/client/models/createdatasetrecordrequest.py: + id: 9455e38a8c31 + last_write_checksum: sha1:df3e8d7425500f23101c25267738e617eeb2d467 + pristine_git_object: 6fd2bf96a28dceb4096d4e9bebe51495ef7a2103 + src/mistralai/client/models/createdatasetrequest.py: + id: 046a094d3ef9 + last_write_checksum: sha1:5c38317b544af6ca66fb895c627634d160bc3975 + pristine_git_object: ecffc52a82e3e0baca00cf94de047ff5124e3a04 src/mistralai/client/models/createfileresponse.py: id: fea5e4832dcc - last_write_checksum: sha1:b7f3ba95a09a3225eae80b53152fe2b7d3806fbe - pristine_git_object: 768212803bc3535ac8a27a9c0d48f147e3d536b7 + last_write_checksum: sha1:934437a8c7b19b2642c1979f876ee49fc23c2529 + pristine_git_object: 1f03b275c79e47051f90b1b4cd471f3d291a714f src/mistralai/client/models/createfinetuningjobrequest.py: id: c60d2a45d66b - last_write_checksum: sha1:2e8e608140860bba9ecfa9498d61cf807f96680a - pristine_git_object: e328d944ce2a71ffbec027965d31075070647dbc + last_write_checksum: sha1:0f1f4f7ad97884415de5e340e8192df9ebd2fd34 + pristine_git_object: be97bd07039197523769ac30de2c42deb8c9a7eb + src/mistralai/client/models/creategithubrepositoryrequest.py: + id: 0814afcf63bb + last_write_checksum: sha1:22826d609c93b24b5088ac945f08f4af2ab9f3ea + pristine_git_object: 61ffde27d5b5dfbbf4c57c6bc8ae825ab866c0df + src/mistralai/client/models/createjudgerequest.py: + id: e606837a626e + last_write_checksum: sha1:d5c16104089075af1b8b2fe922006aea9d74b0e3 + pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 last_write_checksum: sha1:45fa65be82712ce99304027c88f953f0932bdae4 pristine_git_object: 58874e014275b06ce19d145aaa34a48d11ca0950 + src/mistralai/client/models/dataset.py: + id: cbf14670ee00 + last_write_checksum: sha1:4636e54c4ca7825b93d55ef1f69b640557b26467 + pristine_git_object: 2acd911d010b2274f09061fa48c6849d0f5160d2 + src/mistralai/client/models/datasetimporttask.py: + id: c20f7db9633c + last_write_checksum: sha1:b288850d2a124aae3287ede5269d741a8b644d34 + pristine_git_object: 4ef52e9ec7ecd356360035bfcded7fbc9eec4f32 + src/mistralai/client/models/datasetpreview.py: + id: 128c29db3f37 + last_write_checksum: sha1:2e659243a524db189fe496969187c40986b3e87f + pristine_git_object: 55493568244a888f16b1c17dafd5f44f2629ed58 + src/mistralai/client/models/datasetrecord.py: + id: 87ddebf2a0ce + last_write_checksum: sha1:07bbb2c5c2023511cc83ef27edc442300701b790 + pristine_git_object: 9c9f42e55ea1b26071c158b095f33815ac6b55a1 + src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py: + id: 3d1cd35fecc6 + last_write_checksum: sha1:276676f082fa84f14ab74502302d32361277d4c8 + pristine_git_object: f33a3747bcc06b8131e178ea86fa5256e2f156a5 + src/mistralai/client/models/delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop.py: + id: 66b2054bda8c + last_write_checksum: sha1:06f6736ce3d02ea899edc1e90b2f1e6af053a9bf + pristine_git_object: ffeefca659a79f77480655bc960cb8c74dc4899d + src/mistralai/client/models/delete_dataset_v1_observability_datasets_dataset_id_deleteop.py: + id: 446419cd07d2 + last_write_checksum: sha1:fc4e716afa0920b4c07fb9bf90c69c3e50a3f958 + pristine_git_object: af8697706726676862d2b27317b64ebd52510282 + src/mistralai/client/models/delete_judge_v1_observability_judges_judge_id_deleteop.py: + id: 415724e139bd + last_write_checksum: sha1:0fc88a1a4edefd593e8b2d6f18bdd77383142209 + pristine_git_object: c2f7b79701af71ecf95839c1037e50776469ea41 src/mistralai/client/models/delete_model_v1_models_model_id_deleteop.py: id: 767aba526e43 last_write_checksum: sha1:73568f2f450bf9c23aca3649372a92e1b9a2fc54 pristine_git_object: 199614f53501f34088cb112d6fe1114e1e588d8a + src/mistralai/client/models/deletedatasetrecordsrequest.py: + id: e7ef16596e54 + last_write_checksum: sha1:971e81be9064277df5dd656e912b9f319474e742 + pristine_git_object: 8c33a9634f99fcf30475545c9af175434b5f41cf src/mistralai/client/models/deletefileresponse.py: id: 3ee464763a32 last_write_checksum: sha1:2c0df66fc8c4384d50e54ac03577da3da2997cf5 pristine_git_object: ffd0e0d015e38e5f6113da036ebeba98441444f4 - src/mistralai/client/models/deletemodelout.py: - id: ef6a1671c739 - last_write_checksum: sha1:d67ac7c3fa143be40c74455c7206c94bfb5a2134 - pristine_git_object: fa0c20a419c59b8fc168c150b28d703398ea7f40 + src/mistralai/client/models/deletemodelresponse.py: + id: 8957175b7482 + last_write_checksum: sha1:486183140d7fde18c05ae8a6c59303a23bd8627a + pristine_git_object: fac884bc1d833dbaeccc130873f3fea75ef851f5 src/mistralai/client/models/deltamessage.py: id: 68f53d67a140 last_write_checksum: sha1:b18350de03a8685bea5ac52e1441415b5e58bdf4 @@ -2093,6 +2942,10 @@ trackedFiles: id: 4309807f6048 last_write_checksum: sha1:33cdaccb3a4f231730c7fa1db9f338a71e6311b2 pristine_git_object: 43444d98b8b7fb430f9c33562c35072d9c79a263 + src/mistralai/client/models/embeddedresource.py: + id: 94a23f656f72 + last_write_checksum: sha1:7984f6ed695b8df81ad70b72a27d481950453abe + pristine_git_object: 54cb17fdface0703cbe64079543bd399d7abebe0 src/mistralai/client/models/embeddingdtype.py: id: 77f9526a78df last_write_checksum: sha1:a4e2ce6d00e6d1db287a5d9f4254b0947227f337 @@ -2121,6 +2974,46 @@ trackedFiles: id: e5a68ac2dd57 last_write_checksum: sha1:8ed848fe2e74c7f18ee8f4dcba39ad1c951c16d2 pristine_git_object: c40ae2b1a1b8131a90c637e3268872b97b22683e + src/mistralai/client/models/executionconfig.py: + id: 14518c40a13b + last_write_checksum: sha1:351fb4a74622cb70969b728ac65b62ca670fc7e5 + pristine_git_object: 56b58ae369ffb75c9556ef20af79b985fe3db710 + src/mistralai/client/models/export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop.py: + id: 74f5f3183b64 + last_write_checksum: sha1:8d7dde90d9c55b520aa9300a25c843a0b866638b + pristine_git_object: 07b4e58fe2a7065e1f61e571355a7e6997abcb56 + src/mistralai/client/models/exportdatasetresponse.py: + id: 22cc29d258db + last_write_checksum: sha1:83a787b852101f1862f0aabc1638f68753b5d607 + pristine_git_object: f1600cac74e1d50979277d3eb6830ea5e84b69ec + src/mistralai/client/models/feedresultchatcompletioneventpreview.py: + id: 19109368b436 + last_write_checksum: sha1:7ed72c5afeaa35a68bef880405b122db6ca1b57b + pristine_git_object: e87e007e571df43ab2453a5506b19836ed23698a + src/mistralai/client/models/fetchcampaignstatusresponse.py: + id: b74b57603a4c + last_write_checksum: sha1:62b1fd7d42f79518e15abdb07b11cac817837e1e + pristine_git_object: 6004892e377a9852e406bf911bd91afe891ea7b3 + src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py: + id: 2191cab4638b + last_write_checksum: sha1:971b32a645c582a4a2cccb5329481f29ed5e6792 + pristine_git_object: d3cbd653cc62ef4712fc41e2e64d74a12f413d17 + src/mistralai/client/models/fetchfieldoptioncountsrequest.py: + id: 2fd8caa0697d + last_write_checksum: sha1:c3798f54e192e91552d0d8004002ede779899ce9 + pristine_git_object: 19698b9b475bd281ebc5488f8d529b0111afefc3 + src/mistralai/client/models/fetchfieldoptioncountsresponse.py: + id: 16ce9431fc7b + last_write_checksum: sha1:a633398597cb0ccf0c3e36aca8566f679b527850 + pristine_git_object: 4c9f9d0f4027655c4a9e496321314241b6949296 + src/mistralai/client/models/fieldgroup.py: + id: 201353e45f89 + last_write_checksum: sha1:58c9c30558556e8b5f24f8b342d55e998d6154d9 + pristine_git_object: 07f9e7c7bb798338a593e59c737398b3595574e1 + src/mistralai/client/models/fieldoptioncountitem.py: + id: 5b707a343930 + last_write_checksum: sha1:20f2d847c42591c222d06ac5fce04d75ad9d90d8 + pristine_git_object: 0b50c148c524f59fbc02d2b22ee961dc4f7a2d6f src/mistralai/client/models/file.py: id: f972c39edfcf last_write_checksum: sha1:609381a40a4bfdda2e7e750a848cd2bb38d6ac0f @@ -2155,12 +3048,28 @@ trackedFiles: pristine_git_object: 5f8de05f1bba07517dc2ee33a4f05122503b54b5 src/mistralai/client/models/files_api_routes_upload_fileop.py: id: f13b84de6fa7 - last_write_checksum: sha1:d38a86b9e7d338278e14c68756654d85bc330070 - pristine_git_object: 54ff4e4951a58e13993be0f5d2c16b0cb11c0978 + last_write_checksum: sha1:de49ee09350784e9d5c7adcafdfbf86c9ad7d659 + pristine_git_object: b66836391c8bc43e8535688c5829ad9cab04af49 src/mistralai/client/models/fileschema.py: id: 19cde41ca32a - last_write_checksum: sha1:0b3acb889a2c70998da4076e2f4eef3698e8b117 - pristine_git_object: e99066a9eb19daebcf29f356225635a297c444e1 + last_write_checksum: sha1:f65bf25e367c4e9be2be84af9b41e9d9c6719d0e + pristine_git_object: 11caa083108941befa3bc1e499bbcbf578811884 + src/mistralai/client/models/filevisibility.py: + id: 11a670fa3b71 + last_write_checksum: sha1:8d44761845eea1d9bb239864863fc058e7c09bf2 + pristine_git_object: 56cfe8810059e7fcb0eae8f50dcdc1f91e2db157 + src/mistralai/client/models/filtercondition.py: + id: ba62f90873c5 + last_write_checksum: sha1:f8a602ea82374e57ba80e3e1ad1eff572dcf2936 + pristine_git_object: fe62d6ddc1187e1177ac834a85bd4e1b6a86ee52 + src/mistralai/client/models/filtergroup.py: + id: dbc0c34fbc2f + last_write_checksum: sha1:074e2088caee0c3af4698927d840f5b00123074d + pristine_git_object: 06616a010b984e17c2a73aa6164120aa1a2ab5bf + src/mistralai/client/models/filterpayload.py: + id: 56757b849f7a + last_write_checksum: sha1:4ef55aaa20ccfc57cad906558886d0920220ffcd + pristine_git_object: 188375f1070630f46f3950271322fb9bc1b64fed src/mistralai/client/models/fimcompletionrequest.py: id: cf3558adc3ab last_write_checksum: sha1:20bca1f6a0ab6e84f48b6e332f0c3242da84ae45 @@ -2221,10 +3130,78 @@ trackedFiles: id: 2e9ef5800117 last_write_checksum: sha1:bce744d77a3dac92d4776a37be497311674bdc7d pristine_git_object: eae872643c85115a825c2feda11d9a6c12a06b99 + src/mistralai/client/models/get_campaign_by_id_v1_observability_campaigns_campaign_id_getop.py: + id: "288520184035" + last_write_checksum: sha1:ba2f5a6ef8e1f7a2e859f014510ea4fffe4fd7ea + pristine_git_object: a8446737ead106f400900bc6b73d57db306bb47f + src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py: + id: 270800e2c264 + last_write_checksum: sha1:ceea6d622e9c62e38241a4819b771e78bf553b46 + pristine_git_object: e1b04950b7d7d5b738ce0244cbb04261fd7ee4b3 + src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py: + id: 853a43ee6b98 + last_write_checksum: sha1:9e3fd0b27e1ff30e596fb2a81b0770cb6afbcf39 + pristine_git_object: 57ac44905fd7db69e96533092c6d6e8bbe0eb083 + src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py: + id: 598a7340fc98 + last_write_checksum: sha1:ca0f08deb402ee817dafbcd3bf7b05b9d3b7c5a3 + pristine_git_object: a6a329c729b68f11c211f570beaab63c539fc257 + src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py: + id: 98aff68bc7c7 + last_write_checksum: sha1:dcdfebf2d374e5bbaa61e34c985d100b4a736581 + pristine_git_object: f39b0f562ee8a75e611f6ad2929c43c83c230e99 + src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py: + id: 36957d0f73aa + last_write_checksum: sha1:cfd5144c778defd849d029ad13625e4674660a69 + pristine_git_object: 5a8b7450a685ade70cc728dc269a0f2577ba600d + ? src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py + : id: 0b1bd06b24af + last_write_checksum: sha1:e3489181ee8230c478e5785e93c4f5270950fd33 + pristine_git_object: f579260de403280d3768115d185d60090203a721 + ? src/mistralai/client/models/get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop.py + : id: 4fb7f3c0e51b + last_write_checksum: sha1:534ea0a18c71be6c04c64817c4e2029e6a8b83a8 + pristine_git_object: c044bb92fbc871852bb358ade46f1157d01b7e65 + src/mistralai/client/models/get_dataset_by_id_v1_observability_datasets_dataset_id_getop.py: + id: cfd3282e7f33 + last_write_checksum: sha1:5f3de85d18b2cbd085a01946ac1c193d41e1ab71 + pristine_git_object: 0259485d3d2d36f1042d3807abf38f4b122b9b5e + src/mistralai/client/models/get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop.py: + id: b45f77cb328c + last_write_checksum: sha1:70df627813ed0c25aa8d4d2d51a3861b942a014c + pristine_git_object: cf900d0e4ef6eff4114c5e7737d03d0ab0e07d6f + src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py: + id: 07ece48f664d + last_write_checksum: sha1:4cfeaf15f32193c8278759bf0274f5e4426ff057 + pristine_git_object: 43e0dc5b2f37ef1624547cd6bcc63e3780837629 + src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py: + id: 6ea6a0dab32f + last_write_checksum: sha1:8a8027a201a49fa1fe6717a1dbae4a6c242b8dbe + pristine_git_object: 0cb239dfd04d98488b8ce7ee143bb3cc589326e8 + src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py: + id: 77967c965aea + last_write_checksum: sha1:69e3467aa6225ce25c1f008649b683c43f6a34b8 + pristine_git_object: 7617a5d204f4f2fa66610ca711b803b1b5fbc0ad + src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py: + id: 3e4f4e2447ac + last_write_checksum: sha1:dc0305b848582ea310b935c15da10f044a832978 + pristine_git_object: ea52dd5180f5580cc5b94ecdbaa5ef67d89e5621 + src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py: + id: 4201c3c5a891 + last_write_checksum: sha1:44c9a7d21ea727e0f849cfc5dc4a02220bcf6e74 + pristine_git_object: 375db2e9b8ff839f6ec3bdfdf06de9b7a24fbe7c + src/mistralai/client/models/get_judges_v1_observability_judges_getop.py: + id: fa04e3db7781 + last_write_checksum: sha1:bfc31bc3de6ddacf3a01cf3f5a74be3fea83b3a0 + pristine_git_object: 7228cfa13211d7bca8ccbca8f9a3137e7d6689d6 + ? src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py + : id: d651bdc06c1b + last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f + pristine_git_object: 7689415dd70da6eec8d0b416cbf020c4b9adeecf src/mistralai/client/models/getfileresponse.py: id: 81919086e371 - last_write_checksum: sha1:fc0232e54c0de355058c5bd82e424953b1659b56 - pristine_git_object: f625c153799dcd38e4990504d48371112b65cd15 + last_write_checksum: sha1:5a70dc35ee1dc2360eacda5e0dbe08b346f8b480 + pristine_git_object: 82280899020739d61aca44ef731d175e6a66f325 src/mistralai/client/models/getsignedurlresponse.py: id: cee4e4197372 last_write_checksum: sha1:ab9adbc06e7f02e791dc549ad1850ce1b1a250a7 @@ -2233,10 +3210,14 @@ trackedFiles: id: 4bc83ce18378 last_write_checksum: sha1:21aa04bc426158ccbe1ded3bc65b46e6869e897d pristine_git_object: 84b01078c2192de5d6668a6943d416a2ff30db5f - src/mistralai/client/models/githubrepositoryin.py: - id: eef26fbd2876 - last_write_checksum: sha1:18bd07155fff4b99d114353fee95e6bd828aeacd - pristine_git_object: 38bcc2087630f2fd4e9e5fa149449c32e21fdb07 + src/mistralai/client/models/guardrailconfig.py: + id: c72b74412547 + last_write_checksum: sha1:0054fd2ef6b4b169d5eddd9863b893ee160a86e8 + pristine_git_object: 9af986cf73791a19aeecc6d3b9cc28326b7b45f2 + src/mistralai/client/models/imagecontent.py: + id: 3abe7faee278 + last_write_checksum: sha1:22229b74dd00ebe78ea3589964367e0785f8bcf0 + pristine_git_object: 13c3f449b20aff0da0325cb3c955c8e64aec61c6 src/mistralai/client/models/imagedetail.py: id: c1084b549abb last_write_checksum: sha1:375db5c8fa87712dc37e46d0bf72283ae6cd6400 @@ -2253,6 +3234,26 @@ trackedFiles: id: 746fde62f637 last_write_checksum: sha1:0ac388d25cae5348ffb3821706c3a8b64e716ff5 pristine_git_object: 7134b46e7428cee52eda859cb78387c99f7e1f5a + src/mistralai/client/models/importdatasetfromcampaignrequest.py: + id: ee475b85bfc7 + last_write_checksum: sha1:34367bb23d1528b87e67f36d06cc362a05a02c6b + pristine_git_object: 5db45e8ea9a0e431eb1cb28638e2f4c2342a37f6 + src/mistralai/client/models/importdatasetfromdatasetrequest.py: + id: 77aea4882ccb + last_write_checksum: sha1:89fe7ea38a0b073ec539c88dc6b0865f28caeb15 + pristine_git_object: ebf2a649f3b00f4472bd9db0c65cc1a53140cf49 + src/mistralai/client/models/importdatasetfromexplorerrequest.py: + id: 852a3cbc1631 + last_write_checksum: sha1:ee8f1a1d6ebb5b450a00e37724a9d497da22fe10 + pristine_git_object: 85df7af6a855581a03bd745105e8f8134e66aee4 + src/mistralai/client/models/importdatasetfromfilerequest.py: + id: b2882fa57029 + last_write_checksum: sha1:fb867b50ff6d9a8ab14ec32592c951f834854d32 + pristine_git_object: 9a4867765aab522a33f3846a9e2bf0162270c916 + src/mistralai/client/models/importdatasetfromplaygroundrequest.py: + id: 8d809b14b144 + last_write_checksum: sha1:3c858d0475e826d072c96a84d868e97593a399a3 + pristine_git_object: f5bd720db16c37504e1993cc6e651712551d2612 src/mistralai/client/models/inputentries.py: id: 44727997dacb last_write_checksum: sha1:9e2a776be59c5043ea4179a60ac082faf064cc3d @@ -2317,6 +3318,46 @@ trackedFiles: id: e1fc1d8a434a last_write_checksum: sha1:d01507ab0a1f6067cbc65aaba199de340ccc68aa pristine_git_object: dfababa694305c96f98ddebf2f09e448e737c855 + src/mistralai/client/models/judge.py: + id: d6adc687c2d9 + last_write_checksum: sha1:bce628dde18d918345c497037d6f2a9c2e60dda0 + pristine_git_object: 1fb1d3866bb719696e5c95d9cefc834f828c65e9 + src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py: + id: 98c823e7cc1b + last_write_checksum: sha1:74dd8fba663c0338a24c497949572b5e5df7e494 + pristine_git_object: a6b9c969d506481b3c3bf5c86611905f30f6ec88 + src/mistralai/client/models/judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop.py: + id: 4749566fd16d + last_write_checksum: sha1:cc2201d706b884e41bd83333d4db37970cf7bcd5 + pristine_git_object: 4d54fa42aaad05d1deb44b16bd93a0eaa1948a1d + src/mistralai/client/models/judgechatcompletioneventrequest.py: + id: 4fad8a510f7d + last_write_checksum: sha1:eb193a8ee840c016a383eb0c33b569396222e763 + pristine_git_object: 59c68801ce1270a8058a4d775a4aa8f7b8c96e2b + src/mistralai/client/models/judgeclassificationoutput.py: + id: 683ae72d0efa + last_write_checksum: sha1:36cae71fa78777aad28bba3dacbfe931169fc5cc + pristine_git_object: aa799682d6a6cd360856525d174621a88e73f8bd + src/mistralai/client/models/judgeclassificationoutputoption.py: + id: c238f17d786b + last_write_checksum: sha1:1adbac09caf15374b52b61f257d838db2e486690 + pristine_git_object: 64fad49fa2336b0cbaa69dac7493a18593021275 + src/mistralai/client/models/judgedatasetrecordrequest.py: + id: 9ad8915328dd + last_write_checksum: sha1:c37f9c158061e4d3c6c6eda2d7ee8a5d5e7f5afa + pristine_git_object: 11499067e594adae0510334e455b38b23b58ca20 + src/mistralai/client/models/judgeoutput.py: + id: 8c8099403e62 + last_write_checksum: sha1:7eee16a1cbff3978eca638e6d74ada983244d8ec + pristine_git_object: 2224a797049eb11cd05dde1376cab7fbdb779168 + src/mistralai/client/models/judgeoutputtype.py: + id: 3f07e1eb25f9 + last_write_checksum: sha1:35de2d9f5d03caa87d4a19cccf325a9fb67f543c + pristine_git_object: 4fa99498fb6a60e9d4d8358660eb0ecd57d34178 + src/mistralai/client/models/judgeregressionoutput.py: + id: c61d451066dc + last_write_checksum: sha1:0687cabd00d205ec50e238872e57547ee4a3dc3a + pristine_git_object: 63394d8bdc8aa95fa8bfe99b39ae3863aee01ff4 src/mistralai/client/models/legacyjobmetadata.py: id: 0330b8930f65 last_write_checksum: sha1:3c2f669a05cc01227f62d6a8da1840d9c458d52f @@ -2371,8 +3412,8 @@ trackedFiles: pristine_git_object: 7a51d6053aa2cf2e6524a80487fe9549eec3dfa1 src/mistralai/client/models/libraries_share_create_v1op.py: id: feaacfd46dd3 - last_write_checksum: sha1:72e07fb60edbe1989865ba2ac90349edeb183f7e - pristine_git_object: 00ea74824b2efc4150d2e547e2eee416e5f6f2ee + last_write_checksum: sha1:cdb7e60f1aceb2c7aa54fe2b9ba5dafc2bb70995 + pristine_git_object: 9751045c01e389ad5b77891b8a311dc0a9e04e09 src/mistralai/client/models/libraries_share_delete_v1op.py: id: 7f3a679ca384 last_write_checksum: sha1:897857c11cf0c14a0a81ef122dec4395dc16c0ce @@ -2389,10 +3430,38 @@ trackedFiles: id: 028a34b08f9c last_write_checksum: sha1:65f02f963a0540385681b88c7c7fba98d0d704f4 pristine_git_object: 1953b6fbc6d7ad245ccacd9d665fb29853b00af7 + src/mistralai/client/models/list_models_v1_models_getop.py: + id: 1843a7aa68e5 + last_write_checksum: sha1:7058318c4642e630886ba60d3a6dda7ff5dd909b + pristine_git_object: 70b0ab82a26bdbc6c2ea63e6ecb2b3b3046d7eb3 src/mistralai/client/models/listbatchjobsresponse.py: id: 99d94c86a871 last_write_checksum: sha1:7530be5f80a0756527be94758e800e8118e53210 pristine_git_object: 35a348a1160dcf6d82d58c70cea07e11730359fb + src/mistralai/client/models/listcampaignselectedeventsresponse.py: + id: 8e28cb9aff1a + last_write_checksum: sha1:7ada7958f9c87fa6ae7a329fd03cd626a279ca93 + pristine_git_object: a6133eccdfd4de563b829e0e3ce99fee7f38c2c3 + src/mistralai/client/models/listcampaignsresponse.py: + id: 307695cde5c2 + last_write_checksum: sha1:bb03fc71d3c940945c928a9dd150b06edbdd34f6 + pristine_git_object: 741b1b21ee3f6c5a50e7553329d3be021f916c41 + src/mistralai/client/models/listchatcompletionfieldsresponse.py: + id: 2f8837a6a5c3 + last_write_checksum: sha1:49aca9a0bc6779464db07a229253dd505483b639 + pristine_git_object: d260463aad003c4755c3ee9125d05ef3ae5bbd4c + src/mistralai/client/models/listdatasetimporttasksresponse.py: + id: f635c1a3d02b + last_write_checksum: sha1:5df6977a3511d0f03c2a550d266a3ed6115d5a0e + pristine_git_object: 15bea396f3dfea85101efb4b8ef7fa19efbf8770 + src/mistralai/client/models/listdatasetrecordsresponse.py: + id: 13b97e8095c4 + last_write_checksum: sha1:02ed64f409f2d266685baaee0d81fc921a522303 + pristine_git_object: 2341577a0847bd02d2f458db3c47d9502dfbfd0d + src/mistralai/client/models/listdatasetsresponse.py: + id: e18de4849423 + last_write_checksum: sha1:746cbde66531f4ec9f526d28a3e4206016dc795b + pristine_git_object: a35e9a73e4e7c63fd5cbd85cb1c51c4804249254 src/mistralai/client/models/listdocumentsresponse.py: id: f593d8e66833 last_write_checksum: sha1:0d842168856056ff681b2a1c36b87df8e0d96570 @@ -2405,30 +3474,38 @@ trackedFiles: id: 118e05dbfbbd last_write_checksum: sha1:f0582740a6777039e9695d97f072b5a3c34b483e pristine_git_object: 1e434c5986bf577e2b42cca943cc6896a83d1fa2 + src/mistralai/client/models/listjudgesresponse.py: + id: db389a8abc34 + last_write_checksum: sha1:4ba57c7b7966b7eb81472d8ecc0b5ce726458360 + pristine_git_object: 0284cb99375d1205339a5de99a527c212ac2dfbd src/mistralai/client/models/listlibrariesresponse.py: id: df556a618365 last_write_checksum: sha1:55afb46b1fa797bc46574e5256cd063574c6fcbf pristine_git_object: 337fe105731d8f3ced1f8f1299ff4081b9d5bfbe - src/mistralai/client/models/listsharingout.py: - id: ee708a7ccdad - last_write_checksum: sha1:18e6501b00a566121dfd6a1ce7b0e23fef297e45 - pristine_git_object: 443ad0d6a275c1c8bae4adda3e67621b068c0412 + src/mistralai/client/models/listsharingresponse.py: + id: 487c6addf089 + last_write_checksum: sha1:cebb9e6ab7db8c067a3403211765ebfffec0190a + pristine_git_object: f3e6dc8714311989d1e6c7275c8944e228f3f0c5 + src/mistralai/client/models/mcpservericon.py: + id: a5b508a322d7 + last_write_checksum: sha1:090bcf0f2856c453d32f00fd434988300572b811 + pristine_git_object: 6068c1c4b3b205b8e7e7db0c31a9b2dfbfbe1f7e src/mistralai/client/models/messageentries.py: id: e13f9009902b last_write_checksum: sha1:43aebdc9eaecc8341298dc6b281d0d57edf4e9e6 pristine_git_object: a95098e01843fe3b4087319881967dc42c6e4fef src/mistralai/client/models/messageinputcontentchunks.py: id: 01025c12866a - last_write_checksum: sha1:6a0988d4e52aa2e9f7b09ae1e3266ecf9639c22b - pristine_git_object: 1e04ce24d62db6667129b35eb28dabcfd4135ea8 + last_write_checksum: sha1:9eab6d7734dcd4bf9da5222c1927f5f40ef45db0 + pristine_git_object: 63cf14e7fcbc7c3969220b4f07109473b246bf49 src/mistralai/client/models/messageinputentry.py: id: c0a4b5179095 last_write_checksum: sha1:b5bad18b88c0bfbbddfdafa6dc50a09e40a6ebd7 pristine_git_object: c948a13e3cc2071dd1b3d11c419ea61d51470152 src/mistralai/client/models/messageoutputcontentchunks.py: id: 2ed248515035 - last_write_checksum: sha1:dc7456e44084cba9cc6a46553fd64b1eb25f8d77 - pristine_git_object: bf455d17db16e4bc11da0ebb105a9f6ad4d63c01 + last_write_checksum: sha1:df4ef4d17ce48df271ff2b8cab297ae305aa08ec + pristine_git_object: def7a4d27cd3d1479864a1d6af19e89bd57bff70 src/mistralai/client/models/messageoutputentry.py: id: a07577d2268d last_write_checksum: sha1:38ad03422407925087835ab888c0be40bf5fa7fa @@ -2437,6 +3514,10 @@ trackedFiles: id: a2bbf63615c6 last_write_checksum: sha1:c3317ab9279c499dd7fb26f45799ca9369676ac7 pristine_git_object: d765f4fd3c4e43c37063833368e4b21cc0bfbcf2 + src/mistralai/client/models/messageresponse.py: + id: 6b388bc155dd + last_write_checksum: sha1:14ce5842084a2086505dd80eaa6200638a278000 + pristine_git_object: c8fbdff77b3464b630b0cd18f25d9179c5ff9eca src/mistralai/client/models/metric.py: id: c6a65acdd1a2 last_write_checksum: sha1:5ef7c75b278f16b412b42889ff0f2fc19d87cb7d @@ -2451,12 +3532,24 @@ trackedFiles: pristine_git_object: d9293ccc163995cfe0419d05c90fe1ae8e75cf57 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:4c1b31d95351dea877e24bd452b32d8e22edf42e - pristine_git_object: bb33d2e0e047bc075cb7ae284958b80a5b5ee657 + last_write_checksum: sha1:87bcbce66e719b06fa229edd875ff952cadb4ae9 + pristine_git_object: 74e113bf84fff58b037b1140e950c251801e347b src/mistralai/client/models/modellist.py: id: 00693c7eec60 last_write_checksum: sha1:de62fc6787f482e5df0ff0e70415f493f177b9a1 pristine_git_object: 5fd835f24cd1098a153ebfb3e958038a183d28a7 + src/mistralai/client/models/moderationllmv1action.py: + id: c95110c21e79 + last_write_checksum: sha1:53e2b0e06df3890cf9a1822dd19551adcc2f1a22 + pristine_git_object: ae3a6ee957e7e9a7a94e56a48204367e2b776a2d + src/mistralai/client/models/moderationllmv1categorythresholds.py: + id: 0c51d6766440 + last_write_checksum: sha1:17f74a67d19a59214e93c54e5cabc4132bdbee48 + pristine_git_object: 0451ba3afcbff22d1cc41b784c896419bf49e5f5 + src/mistralai/client/models/moderationllmv1config.py: + id: 483378b56394 + last_write_checksum: sha1:be0b266e84480aa46ca1c5048357a6afd22d1ddb + pristine_git_object: b34dbbd34b61990962b67e7d8d8dea18297bd7dc src/mistralai/client/models/moderationobject.py: id: 132faad0549a last_write_checksum: sha1:a8c1454a533e466216ef98dd198ae8959f51fa76 @@ -2465,6 +3558,14 @@ trackedFiles: id: 06bab279cb31 last_write_checksum: sha1:b9158e575276c1e0a510c129347b9a98c5a70567 pristine_git_object: a8a8ec3d8d8a58deb3c1f8358c6dce5a9734f89c + src/mistralai/client/models/observabilityerrorcode.py: + id: ae572b470a30 + last_write_checksum: sha1:f52abcb9e8f504fd9993679611912d3b64270452 + pristine_git_object: 99360d410f7128756a7a7f6be6772238fa15c12f + src/mistralai/client/models/observabilityerrordetail.py: + id: cb6e8a484a38 + last_write_checksum: sha1:c3c57f0c1c7de0a90900ade464caebfc0b78694b + pristine_git_object: a6236b661f20569cba1ee394ebae24219e82f2d7 src/mistralai/client/models/ocrimageobject.py: id: 685faeb41a80 last_write_checksum: sha1:13f4e4d33d8fb5b0ee842695d4cc8329bd7ca382 @@ -2495,20 +3596,72 @@ trackedFiles: pristine_git_object: 2ec1322b29d7fe5246b9ad355a4997222b37970f src/mistralai/client/models/outputcontentchunks.py: id: 9ad9741f4975 - last_write_checksum: sha1:16c43816ac7b7afd134bce1cda5bb44485d9fafe - pristine_git_object: fab7907b105cc9d9c738c5cca9c09eba9d5c4781 + last_write_checksum: sha1:afb76f3af2952c2afab5397e348ddfd6dbb56c4f + pristine_git_object: 1a115fe8b4874a6bd86719d91332cd3db6d95b46 + src/mistralai/client/models/paginatedconnectors.py: + id: 17e125b1022c + last_write_checksum: sha1:b9daf0fd7f3241b03f91e9f7edcb792b91962592 + pristine_git_object: 291da1115294da17b7ca7babc8dc2d7ef672d709 + src/mistralai/client/models/paginatedresultcampaignpreview.py: + id: 6653cba0f982 + last_write_checksum: sha1:8b3d00eec103d4ee7b27cda1e08af9656c2c49c1 + pristine_git_object: d82ee741f4673fd96baaba619f437e348fc02379 + src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py: + id: 8c640682ccf9 + last_write_checksum: sha1:3b7e4de0836bccf0b3247962c17acc55a6caab35 + pristine_git_object: 97bbfea7c0901cf5487cf3a1743417a81232c254 + src/mistralai/client/models/paginatedresultdatasetimporttask.py: + id: 8fd0a8bad4e7 + last_write_checksum: sha1:f16cfea21df8209caea5b9f8e786a8793b2def50 + pristine_git_object: 9d6dcd052bbedb3e8cb618ce28db9bba1da3c54e + src/mistralai/client/models/paginatedresultdatasetpreview.py: + id: bf20489474ce + last_write_checksum: sha1:80544bb270892461e255c9697decace639c1f8ec + pristine_git_object: 51566cc5899b587d7005aadaa05314429285585f + src/mistralai/client/models/paginatedresultdatasetrecord.py: + id: 2556a91b48c4 + last_write_checksum: sha1:3e797b6e84b02e62b7db248cbc605a7c723ed370 + pristine_git_object: 1d6e15c1fb7df86cb66cf4263907b9a5ac19d8b6 + src/mistralai/client/models/paginatedresultjudgepreview.py: + id: 4d5aab2705a0 + last_write_checksum: sha1:77371c66e748507206fe1b00b228ba378e89f387 + pristine_git_object: 57dbc1e5dea2e462036ec2b5f48bf3fa18099edb src/mistralai/client/models/paginationinfo.py: id: 48851e82d67e last_write_checksum: sha1:166961e2c0f573ba0677ee803820bb944a8a5efb pristine_git_object: 2b9dab6258249f7be87e1d4a73a2502e21fe1f0d + src/mistralai/client/models/paginationresponse.py: + id: d64678967bf0 + last_write_checksum: sha1:683972d8248b032e3f30489c8aa3cdcdcc728862 + pristine_git_object: f05ee380b8a7e95f67545a61d333fe28956585ae + ? src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py + : id: 3e8e390b7fa1 + last_write_checksum: sha1:7785e0e41ffed189357a2f5682a0158fbcfe80ca + pristine_git_object: 3d57251729621b291e32ae4055a756583905de38 + ? src/mistralai/client/models/post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop.py + : id: d396e018c804 + last_write_checksum: sha1:6b4a9b21f1443c40be7298058117d589a0ffd8b2 + pristine_git_object: aac48bd62ab8cd7d32caf4ae5fd190159e1c7580 + ? src/mistralai/client/models/post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop.py + : id: 046c79ed47c7 + last_write_checksum: sha1:630755741aac13b4d8fca9028e9e4bb82bfe56da + pristine_git_object: 6524c4d9c34e763fe9c3a186c352a64c51f24dc2 + src/mistralai/client/models/post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop.py: + id: 6e93e5363630 + last_write_checksum: sha1:e7c66567203632bddbd6d50b8f0bbd730180d4e7 + pristine_git_object: 17f90d48656e697e74195236c3a7b295d63c1a81 + ? src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py + : id: 09334d96c26d + last_write_checksum: sha1:db69f60fa1e25cd24b958e997c8b4c635b2202ea + pristine_git_object: 7423375af779911d2842ff9736452fc19a385daf src/mistralai/client/models/prediction.py: id: 1cc842a069a5 last_write_checksum: sha1:3ee24375eb7f00cea0c9db6eebc564ce7067f295 pristine_git_object: 0c6f4182ca8140e595f601b12fbd582034257587 - src/mistralai/client/models/processingstatusout.py: - id: 3df842c4140f - last_write_checksum: sha1:d5acc98adcfc76cdc4fc26e090ecfc4d7835a438 - pristine_git_object: ed2a4f22dcffe787ce69bb9c6011a95216cf3928 + src/mistralai/client/models/processingstatus.py: + id: 28146eaecfcf + last_write_checksum: sha1:a3e3ebeae169441cf430c302c9fe278de79ce215 + pristine_git_object: 7e93308f4cf6af8f968e93f20765c41694b8fad9 src/mistralai/client/models/processstatus.py: id: "0205512146e6" last_write_checksum: sha1:22ad3d5fc80fbf3f83db61512e7bc79295c5fc91 @@ -2561,6 +3714,14 @@ trackedFiles: id: 3f2774d9e609 last_write_checksum: sha1:1ce68530a46793968f1122d29df722f0a5c9d267 pristine_git_object: fc4433cb4e657b06aa6a4c078094c2df342810e2 + src/mistralai/client/models/resourcelink.py: + id: 4251cc3c7797 + last_write_checksum: sha1:f2a70cf2edb98dc0ab7e71fc3bf6f26d28cfbba7 + pristine_git_object: 8ed5613cb6db09f80e7bd0fcb1d8b06c231390ac + src/mistralai/client/models/resourcevisibility.py: + id: b5819dd5f981 + last_write_checksum: sha1:3c7e91baa8c8a0bb2ba55a6b7c14db04350278d7 + pristine_git_object: 56f91f154594a121c988497332e5b978cee4264c src/mistralai/client/models/responsedoneevent.py: id: cf8a686bf82c last_write_checksum: sha1:144a8bf407391948946f3f5362db78a33c45ee6c @@ -2589,6 +3750,22 @@ trackedFiles: id: a9309422fed7 last_write_checksum: sha1:86a61340a647696f6c35a82d945509b1c85aa6f7 pristine_git_object: dfec7cce1e22ab607b6a9e947fa940284426086d + src/mistralai/client/models/searchchatcompletioneventidsrequest.py: + id: cabc8ef82d67 + last_write_checksum: sha1:39384c10e2da9806d984be7176a19eec16ed5482 + pristine_git_object: f84760811493458509eb34462254f6cfd09ac851 + src/mistralai/client/models/searchchatcompletioneventidsresponse.py: + id: a5f0bad3ba10 + last_write_checksum: sha1:a521e3466db8258702fe5c286698d9404cc22b8c + pristine_git_object: f4751159faff30b92a979d6f03ecbfc0f780261e + src/mistralai/client/models/searchchatcompletioneventsrequest.py: + id: a437333780bc + last_write_checksum: sha1:5147c9776bb4d6f18b1af6fd6d4bf584710357e7 + pristine_git_object: 95524c5b6f497e4d2c0c58622661469e88dd550b + src/mistralai/client/models/searchchatcompletioneventsresponse.py: + id: f96acbcd45f7 + last_write_checksum: sha1:539caf622ef9e7579fdc82e7986dcc3a2aedae53 + pristine_git_object: 8b9b10b51fe76de43895168df11e5bbcdfc29a62 src/mistralai/client/models/security.py: id: c2ca0e2a36b7 last_write_checksum: sha1:d74333517caae2a1aa58517e8e935e46913bcc66 @@ -2597,18 +3774,18 @@ trackedFiles: id: a0e2a7a16bf8 last_write_checksum: sha1:15a84d57ceeb74cfb37275f714954e42d8e9b3ba pristine_git_object: 08ffeb7e46fbbc28b7c93ef2aa4a49aff7c0d35e + src/mistralai/client/models/sharing.py: + id: 324f5ac27249 + last_write_checksum: sha1:be77302c873a36d561fb4594fcb7addac923c9c6 + pristine_git_object: d6142e839545fb6be9bbac5d53c34e333112d467 src/mistralai/client/models/sharingdelete.py: id: f5ecce372e06 last_write_checksum: sha1:247d793bd1ddc0ad35d010c17e5b32eba826e3a1 pristine_git_object: 33ccd7e71b8f65d2a9329d8632b5446ca0431d0a - src/mistralai/client/models/sharingin.py: - id: e953dda09c02 - last_write_checksum: sha1:7c2b5333c634ed7889fc907edbf89c6066db5928 - pristine_git_object: 7c1a52b049db4afbd6a06b5f39966dbec4f862ba - src/mistralai/client/models/sharingout.py: - id: 0b8804effb5c - last_write_checksum: sha1:a78e4f6bf2f49ae8250787e1680b5004563b32ac - pristine_git_object: ab3679a4cbcc2826ff2672a09e4eaf4990b5c6a9 + src/mistralai/client/models/sharingrequest.py: + id: 2439b732dfae + last_write_checksum: sha1:bb79913b3b243cd32b13ae012f0fc3fcc1b457d8 + pristine_git_object: 76424b8ee6c9cc0cff7d96649cc7695be6e3ceec src/mistralai/client/models/source.py: id: fcee60a4ea0d last_write_checksum: sha1:4d4277d75f7ce001780a069898b38afa7c8addc0 @@ -2629,10 +3806,18 @@ trackedFiles: id: 9c96fb86a9ab last_write_checksum: sha1:89cbb66753d7a3585ce58c70219a349f770909cc pristine_git_object: ac9f3137dddc15e1cd10aa6385b76510e6c23e33 + src/mistralai/client/models/textcontent.py: + id: 60805b9f7050 + last_write_checksum: sha1:23e396fda502398565dfd996b39107332584f52a + pristine_git_object: 7468b046de5d72085e804e774575519732d60742 + src/mistralai/client/models/textresourcecontents.py: + id: 58fe427f427f + last_write_checksum: sha1:56009344486b16740ba6569103ec8d20a15f9601 + pristine_git_object: c497bb4dc9177047100914169fb0e5358efa2292 src/mistralai/client/models/thinkchunk.py: id: 294bfce193a4 - last_write_checksum: sha1:9126c530e93ae7532235d4bfa3e2b202423a0f24 - pristine_git_object: 5995e6010bfb63d0ab2ded6e0f55b7dca23f769a + last_write_checksum: sha1:9107800bae26e36436296efa317e7b00197f105a + pristine_git_object: 03573f8e1d1a470ba6dc545089beb9b40cebad2a src/mistralai/client/models/timestampgranularity.py: id: 68ddf8d702ea last_write_checksum: sha1:64e7b198a75f026590e26758112651d31984076f @@ -2733,14 +3918,50 @@ trackedFiles: id: 22e2ccbb0c80 last_write_checksum: sha1:a69d8dc8636f3326eb61892b85a9b60044b457fe pristine_git_object: 5c75d30edaade853f085533da0f9f5de221b6e44 + src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py: + id: fa5d55a9d6cf + last_write_checksum: sha1:5cf094a6617b1900745deece2e34edfb1b040905 + pristine_git_object: d5a2bd9dabc6b10c0cfd5ac1aa6ff56b3abf803c + ? src/mistralai/client/models/update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop.py + : id: b0af26e00bfa + last_write_checksum: sha1:5cd8dc574dd7e063fc725ab97185ffce58345087 + pristine_git_object: b828aa80dd6c0293ac783802470fbec1a01560ce + src/mistralai/client/models/update_dataset_v1_observability_datasets_dataset_id_patchop.py: + id: 7bb459765cba + last_write_checksum: sha1:56ae41144cef62f4c6384994f30dbaede3d30925 + pristine_git_object: 5a44056454e368ae54485532875e72750fe82e27 + src/mistralai/client/models/update_judge_v1_observability_judges_judge_id_putop.py: + id: a1bace5342e6 + last_write_checksum: sha1:2fd7c698f8fe16e5df54e49c7aba85e247d3f19b + pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:f37178288254e905ce298befbe801fa6ba63ec0e - pristine_git_object: b751ff74396ca0e74411a7a1549c6e0b4988fc49 + last_write_checksum: sha1:940fbc17f2b76bacbdc38b1ad29abeb5eda33ed9 + pristine_git_object: dbe3499ed323b995453cd06ec54b55f75d2c4241 + src/mistralai/client/models/updateconnectorrequest.py: + id: a761cd154109 + last_write_checksum: sha1:cd461734ab9df9ca0d254c69a552b74b8f63f20e + pristine_git_object: 2fe42ba8b72ab5d851fed49ddbe5d5cfeeb022bd + src/mistralai/client/models/updatedatasetrecordpayloadrequest.py: + id: bd45f357a538 + last_write_checksum: sha1:774ba70d9f417e84b546b9f4c5c85eb2876dd56d + pristine_git_object: 155ea78df17aeda6f1e7f70e4ae6d18dfdae1499 + src/mistralai/client/models/updatedatasetrecordpropertiesrequest.py: + id: c457ead40a69 + last_write_checksum: sha1:ef265db7817eb0f59ee182e327482918aefbf36c + pristine_git_object: ccba4a5c71aa8717c4fcb1af61f4f10c17b84ebd + src/mistralai/client/models/updatedatasetrequest.py: + id: bbb067caa23f + last_write_checksum: sha1:1045b7f77b20e9ede79240467927bac20b9d54f5 + pristine_git_object: 0297408982cd4204c15447204e539cef16b82a01 src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 last_write_checksum: sha1:c644725ae379f22550d00b42baefb511d1cc3667 pristine_git_object: 61e696555c0654208b0d9dcd63fc475ad85297d4 + src/mistralai/client/models/updatejudgerequest.py: + id: f6ad6fb901a0 + last_write_checksum: sha1:0cc5d951aa36d1ba6cf82020d9ade4ac85bc3a94 + pristine_git_object: 04c86ab65599b96478f9b6a0cfa6ce3af1a489bb src/mistralai/client/models/updatelibraryrequest.py: id: 51bc63885337 last_write_checksum: sha1:622d6a7af58d2e86d7d2dd4e312883d11ce5a8a8 @@ -2759,8 +3980,8 @@ trackedFiles: pristine_git_object: 63e7679246a11fe8e7a3db06e382779c05c64366 src/mistralai/client/models/validationerror.py: id: 15df3c7368ab - last_write_checksum: sha1:63df5739d68f984470d4d1b8661a875201cc301d - pristine_git_object: 385714c8cb80a8afbca6d5142a2d378d0d165cf9 + last_write_checksum: sha1:feacaef605de97f7eec36e69c5dda2a10e5b75ac + pristine_git_object: d856e24c3ac25fb6d2802ca7038ab6947ac6a2da src/mistralai/client/models/wandbintegration.py: id: 4823c1e80942 last_write_checksum: sha1:cc0a7ce49756928f4d261375526a3498b9e4f05d @@ -2779,8 +4000,12 @@ trackedFiles: pristine_git_object: 6871080f6279ef42a0525c1e26368baafc98fbb7 src/mistralai/client/models_.py: id: 1d277958a843 - last_write_checksum: sha1:b9ea906a7704aa57efe5d13ac547e502d961d3b5 - pristine_git_object: a287c413ddf48bd5ff7fc0a685e05d4bcdabb6e5 + last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 + pristine_git_object: 7bb6dc1de1309509b5b49e743d5b5ac80cf976f3 + src/mistralai/client/observability.py: + id: 453a1d06d130 + last_write_checksum: sha1:62d4d03a08807271b404a8684b1153a739d70b05 + pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 src/mistralai/client/ocr.py: id: 2f804a12fc62 last_write_checksum: sha1:707d91582149e76a3109df8b1a58bfd44111a93d @@ -2789,6 +4014,10 @@ trackedFiles: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + src/mistralai/client/records.py: + id: 10f90c990bd8 + last_write_checksum: sha1:47018c027eb2c9d9235f399b939073e396bd52ad + pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/sdk.py: id: 48edbcb38d7e last_write_checksum: sha1:365709e35dc4e450a2c4931e75dcbd04568ab361 @@ -3121,7 +4350,7 @@ examples: application/json: {"id": "497f6eca-6276-4993-bfeb-53cbbbba6f09", "object": "file", "bytes": 13000, "created_at": 1716963433, "filename": "files_upload.jsonl", "purpose": "batch", "sample_type": "batch_result", "source": "upload"} userExample: requestBody: - multipart/form-data: {"file": "x-file: example.file"} + multipart/form-data: {"visibility": "workspace", "file": "x-file: example.file"} responses: "200": application/json: {"id": "e85980c9-409e-4a46-9304-36588f6292b0", "object": "file", "bytes": 13000, "created_at": 1759500189, "filename": "example.file.jsonl", "purpose": "fine-tune", "sample_type": "instruct", "num_lines": 2, "mimetype": "application/jsonl", "source": "upload", "signature": "d4821d2de1917341"} @@ -4308,15 +5537,495 @@ examples: responses: "422": application/json: {} + get_chat_completion_events_v1_observability_chat_completion_events_search_post: + speakeasy-default-get-chat-completion-events-v1-observability-chat-completion-events-search-post: + parameters: + query: + page_size: 50 + requestBody: + application/json: {"search_params": {"filters": null}} + responses: + "200": + application/json: {"completion_events": {}} + "400": + application/json: {"detail": {"message": "", "error_code": "AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND"}} + get_chat_completion_event_ids_v1_observability_chat_completion_events_search_ids_post: + speakeasy-default-get-chat-completion-event-ids-v1-observability-chat-completion-events-search-ids-post: + requestBody: + application/json: {"search_params": {"filters": {"field": "", "op": "lt", "value": ""}}} + responses: + "200": + application/json: {"completion_event_ids": [""]} + "400": + application/json: {"detail": {"message": "", "error_code": null}} + get_chat_completion_event_v1_observability_chat_completion_events__event_id__get: + speakeasy-default-get-chat-completion-event-v1-observability-chat-completion-events-event-id-get: + parameters: + path: + event_id: "e79bf81b-b37f-425e-9dff-071a54592e44" + responses: + "200": + application/json: {"event_id": "", "correlation_id": "", "created_at": "2025-08-04T07:31:12.646Z", "extra_fields": {}, "nb_input_tokens": 337803, "nb_output_tokens": 297257, "enabled_tools": [{"key": ""}, {"key": "", "key1": "", "key2": ""}], "request_messages": [{"key": ""}, {"key": "", "key1": "", "key2": ""}], "response_messages": [{"key": "", "key1": "", "key2": ""}], "nb_messages": 229575, "chat_transcription_events": [{"audio_url": "https://considerate-tinderbox.com/", "model": "Cruze", "response_message": {}}]} + "400": + application/json: {"detail": {"message": "", "error_code": "AUTH_FORBIDDEN_ROLE_NOT_FOUND"}} + get_similar_chat_completion_events_v1_observability_chat_completion_events__event_id__similar_events_get: + speakeasy-default-get-similar-chat-completion-events-v1-observability-chat-completion-events-event-id-similar-events-get: + parameters: + path: + event_id: "b7be6e08-d068-45fc-b77a-966232e92fd6" + responses: + "200": + application/json: {"completion_events": {}} + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_RUN_TRANSITION_ERROR"}} + judge_chat_completion_event_v1_observability_chat_completion_events__event_id__live_judging_post: + speakeasy-default-judge-chat-completion-event-v1-observability-chat-completion-events-event-id-live-judging-post: + parameters: + path: + event_id: "dfcd5582-1373-4de5-af51-987464da561c" + requestBody: + application/json: {"judge_definition": {"name": "", "description": "total plain self-confidence candid hungrily partial astride cruelly brr", "model_name": "", "output": {"type": "CLASSIFICATION", "options": [{"value": "", "description": "indeed insolence delightfully following"}]}, "instructions": "", "tools": []}} + responses: + "200": + application/json: {"analysis": "", "answer": ""} + "400": + application/json: {"detail": {"message": "", "error_code": "DATASET_TASK_NOT_FOUND"}} + get_chat_completion_fields_v1_observability_chat_completion_fields_get: + speakeasy-default-get-chat-completion-fields-v1-observability-chat-completion-fields-get: + responses: + "200": + application/json: {"field_definitions": [{"name": "", "label": "", "type": "FLOAT", "supported_operators": []}], "field_groups": []} + "400": + application/json: {"detail": {"message": "", "error_code": "JUDGE_NOT_FOUND"}} + get_chat_completion_field_options_v1_observability_chat_completion_fields__field_name__options_get: + speakeasy-default-get-chat-completion-field-options-v1-observability-chat-completion-fields-field-name-options-get: + parameters: + path: + field_name: "" + query: + operator: "startswith" + responses: + "200": + application/json: {} + "400": + application/json: {"detail": {"message": "", "error_code": "TEMPLATE_SYNTAX_ERROR"}} + get_chat_completion_field_options_counts_v1_observability_chat_completion_fields__field_name__options_counts_post: + ? speakeasy-default-get-chat-completion-field-options-counts-v1-observability-chat-completion-fields-field-name-options-counts-post + : parameters: + path: + field_name: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"counts": []} + "400": + application/json: {"detail": {"message": "", "error_code": "DATASET_RECORD_NOT_FOUND"}} + create_judge_v1_observability_judges_post: + speakeasy-default-create-judge-v1-observability-judges-post: + requestBody: + application/json: {"name": "", "description": "border freely down whenever broadly whenever restructure catalyze after", "model_name": "", "output": {"type": "REGRESSION", "min": 0, "min_description": "", "max": 1, "max_description": ""}, "instructions": "", "tools": ["", ""]} + responses: + "201": + application/json: {"id": "64b223b0-e106-43bb-8cc9-77162463295b", "created_at": "2026-03-11T13:01:21.858Z", "updated_at": "2024-02-24T09:21:22.966Z", "deleted_at": "2026-02-16T14:45:07.865Z", "owner_id": "cf47c12a-77ac-4d6f-aa5e-9c791792f5bb", "workspace_id": "268fd016-1a79-4091-9ec2-104ca1ea5adf", "name": "", "description": "typify intervention seemingly", "model_name": "", "output": {"type": "CLASSIFICATION", "options": [{"value": "", "description": "masquerade readily fen"}]}, "instructions": "", "tools": [""]} + "400": + application/json: {"detail": {"message": "", "error_code": "DATASET_RECORD_NOT_FOUND"}} + get_judges_v1_observability_judges_get: + speakeasy-default-get-judges-v1-observability-judges-get: + parameters: + query: + page_size: 50 + page: 1 + responses: + "200": + application/json: {"judges": {"count": 165283}} + "400": + application/json: {"detail": {"message": "", "error_code": "CAMPAIGN_NOT_FOUND"}} + get_judge_by_id_v1_observability_judges__judge_id__get: + speakeasy-default-get-judge-by-id-v1-observability-judges-judge-id-get: + parameters: + path: + judge_id: "19ae5cf8-2ade-4a40-b9d2-730aaebe8429" + responses: + "200": + application/json: {"id": "88a908a1-116d-4887-b5ba-d57fd96451d3", "created_at": "2026-01-20T19:57:20.448Z", "updated_at": "2025-04-15T17:15:10.529Z", "deleted_at": "2026-05-08T22:17:53.176Z", "owner_id": "0fc619ee-fd86-480d-98da-9dc726fb311a", "workspace_id": "aa9b970b-e897-462a-8a4c-60902a0e81d3", "name": "", "description": "catalyst honestly brr underachieve per until free", "model_name": "", "output": {"type": "CLASSIFICATION", "options": [{"value": "", "description": "irritably for likewise wise linseed unethically handy"}]}, "instructions": "", "tools": ["", ""]} + "400": + application/json: {"detail": {"message": "", "error_code": "SEARCH_FILTER_TO_SQL_CONVERSION_ERROR"}} + delete_judge_v1_observability_judges__judge_id__delete: + speakeasy-default-delete-judge-v1-observability-judges-judge-id-delete: + parameters: + path: + judge_id: "80deecde-e10f-409c-a13a-c242d3760f6e" + responses: + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_RECORD_NOT_FOUND"}} + update_judge_v1_observability_judges__judge_id__put: + speakeasy-default-update-judge-v1-observability-judges-judge-id-put: + parameters: + path: + judge_id: "9f28c7db-1fb7-4e1c-b137-d7039561ddb7" + requestBody: + application/json: {"name": "", "description": "noteworthy and unless", "model_name": "", "output": {"type": "REGRESSION", "min": 0, "min_description": "", "max": 1, "max_description": ""}, "instructions": "", "tools": []} + responses: + "400": + application/json: {"detail": {"message": "", "error_code": "AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND"}} + create_campaign_v1_observability_campaigns_post: + speakeasy-default-create-campaign-v1-observability-campaigns-post: + requestBody: + application/json: {"search_params": {"filters": {"field": "", "op": "lt", "value": ""}}, "judge_id": "9b501b9f-3525-44a7-a51a-5352679be9ed", "name": "", "description": "shakily triangular scotch requirement whether once oh", "max_nb_events": 232889} + responses: + "201": + application/json: {"id": "2c13806e-5da0-449e-aa8c-2efe20d619f9", "created_at": "2026-03-23T12:46:40.529Z", "updated_at": "2024-12-09T10:33:58.511Z", "deleted_at": "2024-03-23T06:04:33.659Z", "name": "", "owner_id": "92d6e73a-fda5-475c-8483-6f2477d27cb8", "workspace_id": "731e5ff9-f8e6-4f2e-9ec8-fa28e59f044e", "description": "artistic closely resolve yet untimely which", "max_nb_events": 562269, "search_params": {"filters": {"field": "", "op": "lt", "value": ""}}, "judge": {"id": "a4291d77-2586-4ec3-874f-fde6b8a25ea6", "created_at": "2024-10-20T09:21:44.933Z", "updated_at": "2026-12-21T16:40:13.059Z", "deleted_at": "2025-11-13T11:08:56.633Z", "owner_id": "f054cff6-2a46-43c8-bf5f-34726c713700", "workspace_id": "5141df7d-8618-4c38-971a-fbae043ac71a", "name": "", "description": "and brr striking save give", "model_name": "", "output": {"type": "CLASSIFICATION", "options": []}, "instructions": "", "tools": [""]}} + "400": + application/json: {"detail": {"message": "", "error_code": "SEARCH_FILTER_TO_SQL_CONVERSION_ERROR"}} + get_campaigns_v1_observability_campaigns_get: + speakeasy-default-get-campaigns-v1-observability-campaigns-get: + parameters: + query: + page_size: 50 + page: 1 + responses: + "200": + application/json: {"campaigns": {"count": 267257}} + "400": + application/json: {"detail": {"message": "", "error_code": "JUDGE_ALREADY_HAS_NEW_VERSION"}} + get_campaign_by_id_v1_observability_campaigns__campaign_id__get: + speakeasy-default-get-campaign-by-id-v1-observability-campaigns-campaign-id-get: + parameters: + path: + campaign_id: "fd7945d6-00e2-4852-9054-bcbb968d7f98" + responses: + "200": + application/json: {"id": "471e682e-fdeb-4e35-9d85-e02663dac589", "created_at": "2024-09-14T10:06:32.327Z", "updated_at": "2025-10-10T18:13:43.173Z", "deleted_at": "2026-05-08T12:03:39.691Z", "name": "", "owner_id": "86cda873-2f96-4f74-bcd0-92e6c505be69", "workspace_id": "4bfb0db9-d23f-432b-a2f3-1e36f1fb077c", "description": "event yet clearly yummy plus institute catalog", "max_nb_events": 567256, "search_params": {"filters": {}}, "judge": {"id": "1242c0b2-6c6b-463c-9e64-53616f48a9cd", "created_at": "2026-06-13T02:11:55.473Z", "updated_at": "2024-12-08T02:12:43.788Z", "deleted_at": "2025-05-03T05:53:54.100Z", "owner_id": "5a2445c5-eb01-490e-8653-b35964e59b07", "workspace_id": "308e0ead-b563-4544-9254-9c9ac1f4f270", "name": "", "description": "regularly carnival besides lone yippee woot softly besides even", "model_name": "", "output": {"type": "REGRESSION", "min": 0, "min_description": "", "max": 1, "max_description": ""}, "instructions": "", "tools": [""]}} + "400": + application/json: {"detail": {"message": "", "error_code": null}} + delete_campaign_v1_observability_campaigns__campaign_id__delete: + speakeasy-default-delete-campaign-v1-observability-campaigns-campaign-id-delete: + parameters: + path: + campaign_id: "90e07b45-8cf7-4081-8558-a786779e039d" + responses: + "400": + application/json: {"detail": {"message": "", "error_code": "JUDGE_MISTRAL_API_TIMEOUT"}} + get_campaign_status_by_id_v1_observability_campaigns__campaign_id__status_get: + speakeasy-default-get-campaign-status-by-id-v1-observability-campaigns-campaign-id-status-get: + parameters: + path: + campaign_id: "4b1dd9a5-8dc9-48e1-bd11-29443e959902" + responses: + "200": + application/json: {"status": "TIMED_OUT"} + "400": + application/json: {"detail": {"message": "", "error_code": "DATABASE_UNAVAILABLE"}} + get_campaign_selected_events_v1_observability_campaigns__campaign_id__selected_events_get: + speakeasy-default-get-campaign-selected-events-v1-observability-campaigns-campaign-id-selected-events-get: + parameters: + path: + campaign_id: "305b5e46-a650-4d8a-8b5b-d23ef90ec831" + query: + page_size: 50 + page: 1 + responses: + "200": + application/json: {"completion_events": {"count": 538671}} + "400": + application/json: {"detail": {"message": "", "error_code": null}} + create_dataset_v1_observability_datasets_post: + speakeasy-default-create-dataset-v1-observability-datasets-post: + requestBody: + application/json: {"name": "", "description": "citizen whoever sustenance necessary vibrant openly"} + responses: + "201": + application/json: {"id": "e86e57b5-7c22-4325-bd9a-1aa080190810", "created_at": "2026-02-21T13:59:16.796Z", "updated_at": "2026-05-02T06:33:42.170Z", "deleted_at": "2024-10-04T09:38:22.311Z", "name": "", "description": "faraway stained despite obtrude er whereas rough", "owner_id": "c9748a93-c271-44dd-8be4-eae95777dcf1", "workspace_id": "1c770558-393b-49ef-a65e-6953eebd09fe"} + "400": + application/json: {"detail": {"message": "", "error_code": "AGENT_MISTRAL_API_ERROR"}} + get_datasets_v1_observability_datasets_get: + speakeasy-default-get-datasets-v1-observability-datasets-get: + parameters: + query: + page_size: 50 + page: 1 + responses: + "200": + application/json: {"datasets": {"count": 734678}} + "400": + application/json: {"detail": {"message": "", "error_code": "DATABASE_TIMEOUT"}} + get_dataset_by_id_v1_observability_datasets__dataset_id__get: + speakeasy-default-get-dataset-by-id-v1-observability-datasets-dataset-id-get: + parameters: + path: + dataset_id: "036fa362-e080-4fa5-beff-a334a70efb58" + responses: + "200": + application/json: {"id": "a4355b62-5f75-44af-86e3-398b02d79718", "created_at": "2024-09-22T05:11:33.455Z", "updated_at": "2024-08-05T11:16:32.114Z", "deleted_at": "2024-11-17T02:39:46.669Z", "name": "", "description": "brr dearly under pish brr however careless ferret", "owner_id": "3500df1e-5139-4573-90c4-c40cc1553997", "workspace_id": "98f44a49-7d9c-44e0-819c-b87b8b697b40"} + "400": + application/json: {"detail": {"message": "", "error_code": "TEMPLATE_SYNTAX_ERROR"}} + delete_dataset_v1_observability_datasets__dataset_id__delete: + speakeasy-default-delete-dataset-v1-observability-datasets-dataset-id-delete: + parameters: + path: + dataset_id: "baf961a3-bb8e-4085-89ef-de9c5d8c4e77" + responses: + "400": + application/json: {"detail": {"message": "", "error_code": "JUDGE_MISTRAL_API_ERROR"}} + update_dataset_v1_observability_datasets__dataset_id__patch: + speakeasy-default-update-dataset-v1-observability-datasets-dataset-id-patch: + parameters: + path: + dataset_id: "95be9afc-fc05-44a6-af9f-2362de1224f9" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "321a1909-2e5b-44a4-9344-3f6730da59f3", "created_at": "2024-02-08T01:14:12.266Z", "updated_at": "2026-01-30T21:57:19.199Z", "deleted_at": "2024-09-01T12:04:00.540Z", "name": "", "description": "hm vivaciously grandiose ditch", "owner_id": "dd537278-359d-4d34-aa69-9fbf9968649e", "workspace_id": "4f07d08f-2c7c-489c-abf9-f4f9c6d4d1b5"} + "400": + application/json: {"detail": {"message": "", "error_code": "FEATURE_NOT_SUPPORTED"}} + get_dataset_records_v1_observability_datasets__dataset_id__records_get: + speakeasy-default-get-dataset-records-v1-observability-datasets-dataset-id-records-get: + parameters: + path: + dataset_id: "444d2a88-e636-4bc0-ab6c-919bedaed112" + query: + page_size: 50 + page: 1 + responses: + "200": + application/json: {"records": {"count": 428843}} + "400": + application/json: {"detail": {"message": "", "error_code": null}} + create_dataset_record_v1_observability_datasets__dataset_id__records_post: + speakeasy-default-create-dataset-record-v1-observability-datasets-dataset-id-records-post: + parameters: + path: + dataset_id: "4c54ed13-1459-44e1-8696-1a6df06f7177" + requestBody: + application/json: {"payload": {"messages": [{"key": ""}, {"key": "", "key1": ""}]}, "properties": {"key": "", "key1": "", "key2": ""}} + responses: + "201": + application/json: {"id": "dd3d2088-f021-41f6-aa26-6b86d0352e3b", "created_at": "2025-08-03T16:57:36.654Z", "updated_at": "2024-08-13T19:23:55.490Z", "deleted_at": "2026-06-12T19:29:36.465Z", "dataset_id": "fa142dc2-521b-4396-b33d-045371fdfec0", "payload": {"messages": [{"key": ""}, {"key": "", "key1": ""}]}, "properties": {"key": "", "key1": "", "key2": ""}, "source": "DIRECT_INPUT"} + "400": + application/json: {"detail": {"message": "", "error_code": "SEARCH_SERVICE_UNAVAILABLE"}} + post_dataset_records_from_campaign_v1_observability_datasets__dataset_id__imports_from_campaign_post: + speakeasy-default-post-dataset-records-from-campaign-v1-observability-datasets-dataset-id-imports-from-campaign-post: + parameters: + path: + dataset_id: "306b5f31-e31c-4e06-9220-e3008c61bf1b" + requestBody: + application/json: {"campaign_id": "71a2e42d-7414-4fe6-89cb-44a2122b6f6b"} + responses: + "202": + application/json: {"id": "db513b3b-341e-4e14-953f-13e588b8c106", "created_at": "2026-07-10T21:30:19.189Z", "updated_at": "2025-08-15T09:09:46.978Z", "deleted_at": "2025-01-04T02:06:39.691Z", "creator_id": "9c74cc15-e7f7-4c15-903f-2485fcc52a87", "dataset_id": "d16b3225-1373-4338-b5d9-032cac7fed30", "workspace_id": "bd24c970-f6df-4a69-9911-63b52ad02f60", "status": "CANCELED"} + "400": + application/json: {"detail": {"message": "", "error_code": "JUDGE_CONVERSATION_FORMAT_ERROR"}} + post_dataset_records_from_explorer_v1_observability_datasets__dataset_id__imports_from_explorer_post: + speakeasy-default-post-dataset-records-from-explorer-v1-observability-datasets-dataset-id-imports-from-explorer-post: + parameters: + path: + dataset_id: "ee1930e9-54f7-4c68-aa8a-40fe5d2a3485" + requestBody: + application/json: {"completion_event_ids": ["", "", ""]} + responses: + "202": + application/json: {"id": "8c71ef83-5f8d-4ee8-8a8d-e4d0c5abc8e2", "created_at": "2026-05-31T08:20:12.578Z", "updated_at": "2025-02-03T03:31:36.033Z", "deleted_at": null, "creator_id": "7c5e163b-8c0d-4f60-9f6d-d44369ad1803", "dataset_id": "78461345-1124-43d7-943b-91676e5fb7a4", "workspace_id": "c97e6603-92cf-4635-95cf-00423feddaff", "status": "TERMINATED"} + "400": + application/json: {"detail": {"message": "", "error_code": "SEARCH_NOT_FOUND"}} + post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post: + speakeasy-default-post-dataset-records-from-file-v1-observability-datasets-dataset-id-imports-from-file-post: + parameters: + path: + dataset_id: "1c96c925-cc58-4529-863d-9fe66a6f1924" + requestBody: + application/json: {"file_id": ""} + responses: + "202": + application/json: {"id": "8654123f-341f-49c3-8447-98828248facd", "created_at": "2026-12-16T17:56:34.179Z", "updated_at": "2026-04-20T22:41:58.691Z", "deleted_at": null, "creator_id": "eabdcb9a-cc81-4a95-a488-996d13c5a3b4", "dataset_id": "6a4ee4af-5d20-4a2a-a33f-1e652ecab674", "workspace_id": "a92c0b3a-fb84-4231-a417-58dd87ad39a2", "status": "COMPLETED"} + "400": + application/json: {"detail": {"message": "", "error_code": "SEARCH_SERVICE_UNAVAILABLE"}} + post_dataset_records_from_playground_v1_observability_datasets__dataset_id__imports_from_playground_post: + speakeasy-default-post-dataset-records-from-playground-v1-observability-datasets-dataset-id-imports-from-playground-post: + parameters: + path: + dataset_id: "5cb42584-5fcf-4837-997a-6a67c5e6900d" + requestBody: + application/json: {"conversation_ids": []} + responses: + "202": + application/json: {"id": "2cf93c3a-cd05-4a36-b3a6-e89bb5c172d6", "created_at": "2026-11-28T19:05:01.247Z", "updated_at": "2024-12-22T22:01:15.271Z", "deleted_at": "2026-09-14T02:10:46.354Z", "creator_id": "1b3ecd64-2756-4a66-9d66-9f22de0766e0", "dataset_id": "efac04d5-91fe-4307-9995-d43f9354c865", "workspace_id": "c838e342-2ead-4e36-82a1-c36678946451", "status": "COMPLETED"} + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_RECORD_NOT_FOUND"}} + post_dataset_records_from_dataset_v1_observability_datasets__dataset_id__imports_from_dataset_post: + speakeasy-default-post-dataset-records-from-dataset-v1-observability-datasets-dataset-id-imports-from-dataset-post: + parameters: + path: + dataset_id: "ada96a08-d724-4e5c-9111-aaf1bdb7d588" + requestBody: + application/json: {"dataset_record_ids": ["58fe798a-537b-4c61-9efc-d1d96d5d264a", "cfa1d197-deda-456e-906b-dd84dccfcd17"]} + responses: + "202": + application/json: {"id": "b97f7456-333f-481a-b1d7-b2fd0cabb81f", "created_at": "2026-07-07T08:57:39.299Z", "updated_at": "2025-04-06T16:16:54.540Z", "deleted_at": "2026-02-08T12:22:57.154Z", "creator_id": "008cae3e-ab6c-440d-a500-e1c0c6bfafea", "dataset_id": "92ce387e-43fe-4327-b337-87400761f84f", "workspace_id": "a231f2e2-3f68-4b37-9675-5bce4be8ce71", "status": "FAILED"} + "400": + application/json: {"detail": {"message": "", "error_code": "DATABASE_UNAVAILABLE"}} + export_dataset_to_jsonl_v1_observability_datasets__dataset_id__exports_to_jsonl_get: + speakeasy-default-export-dataset-to-jsonl-v1-observability-datasets-dataset-id-exports-to-jsonl-get: + parameters: + path: + dataset_id: "d521add6-d909-4a69-a460-cb880d87b773" + responses: + "200": + application/json: {"file_url": "https://indolent-reasoning.net/"} + "400": + application/json: {"detail": {"message": "", "error_code": null}} + get_dataset_import_task_v1_observability_datasets__dataset_id__tasks__task_id__get: + speakeasy-default-get-dataset-import-task-v1-observability-datasets-dataset-id-tasks-task-id-get: + parameters: + path: + dataset_id: "b64b504e-58a2-4d52-979b-e2634b301235" + task_id: "1713cde2-dea1-410d-851e-8cea964ffa14" + responses: + "200": + application/json: {"id": "dc7499d8-7f09-4d2a-8e29-0a4d065145f5", "created_at": "2025-01-07T06:23:24.736Z", "updated_at": "2025-05-24T23:56:27.316Z", "deleted_at": "2026-05-23T10:58:23.820Z", "creator_id": "0e259d11-14ba-43d1-adfe-3d3e8a7b4e8d", "dataset_id": "58388b6a-c7f3-4124-9259-e560e7c0d1ad", "workspace_id": "9c1ec3b6-b03d-421a-824b-b1731697acd3", "status": "RUNNING"} + "400": + application/json: {"detail": {"message": "", "error_code": "DATABASE_ERROR"}} + get_dataset_import_tasks_v1_observability_datasets__dataset_id__tasks_get: + speakeasy-default-get-dataset-import-tasks-v1-observability-datasets-dataset-id-tasks-get: + parameters: + path: + dataset_id: "29903443-7f9c-42a6-9b6b-fc5cbef4191a" + query: + page_size: 50 + page: 1 + responses: + "200": + application/json: {"tasks": {"count": 578476}} + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_RUN_TRANSITION_IS_INVALID"}} + get_dataset_record_v1_observability_dataset_records__dataset_record_id__get: + speakeasy-default-get-dataset-record-v1-observability-dataset-records-dataset-record-id-get: + parameters: + path: + dataset_record_id: "ce995349-abbf-45c0-be75-885fc1c4b4c0" + responses: + "200": + application/json: {"id": "c96bcf85-ee78-44b5-a9dc-d8f146764c9a", "created_at": "2025-01-04T07:24:23.318Z", "updated_at": "2024-05-08T06:55:20.351Z", "deleted_at": null, "dataset_id": "6689327c-88fd-4189-8dcb-00bb54335fe3", "payload": {"messages": []}, "properties": {"key": ""}, "source": "DIRECT_INPUT"} + "400": + application/json: {"detail": {"message": "", "error_code": "DATABASE_ERROR"}} + delete_dataset_record_v1_observability_dataset_records__dataset_record_id__delete: + speakeasy-default-delete-dataset-record-v1-observability-dataset-records-dataset-record-id-delete: + parameters: + path: + dataset_record_id: "799fed99-80b4-4a9a-a15e-05352b811702" + responses: + "400": + application/json: {"detail": {"message": "", "error_code": "FEATURE_NOT_SUPPORTED"}} + delete_dataset_records_v1_observability_dataset_records_bulk_delete_post: + speakeasy-default-delete-dataset-records-v1-observability-dataset-records-bulk-delete-post: + requestBody: + application/json: {"dataset_record_ids": ["22fc78f7-e774-4ab5-b1ea-63852992ef31", "1c533b4f-882e-4bd0-9ef6-9933b825f8b1"]} + responses: + "400": + application/json: {"detail": {"message": "", "error_code": "JUDGE_CONVERSATION_FORMAT_ERROR"}} + judge_dataset_record_v1_observability_dataset_records__dataset_record_id__live_judging_post: + speakeasy-default-judge-dataset-record-v1-observability-dataset-records-dataset-record-id-live-judging-post: + parameters: + path: + dataset_record_id: "9de5d7a1-787a-45dd-b668-9f3407e76d8b" + requestBody: + application/json: {"judge_definition": {"name": "", "description": "wisely railway deceivingly arcade minion back what yowza outrun service", "model_name": "", "output": {"type": "CLASSIFICATION", "options": [{"value": "", "description": "spork excluding without retrospectivity bah next yearly"}]}, "instructions": "", "tools": [""]}} + responses: + "200": + application/json: {"analysis": "", "answer": ""} + "400": + application/json: {"detail": {"message": "", "error_code": "DATASET_TASK_NOT_FOUND"}} + update_dataset_record_payload_v1_observability_dataset_records__dataset_record_id__payload_put: + speakeasy-default-update-dataset-record-payload-v1-observability-dataset-records-dataset-record-id-payload-put: + parameters: + path: + dataset_record_id: "17506b15-748e-4e7c-9737-c97c44d04b0f" + requestBody: + application/json: {"payload": {"messages": [{"key": ""}, {}, {"key": ""}]}} + responses: + "400": + application/json: {"detail": {"message": "", "error_code": "EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY"}} + update_dataset_record_properties_v1_observability_dataset_records__dataset_record_id__properties_put: + speakeasy-default-update-dataset-record-properties-v1-observability-dataset-records-dataset-record-id-properties-put: + parameters: + path: + dataset_record_id: "a4deefc5-0905-427e-ad15-1090ef9e216d" + requestBody: + application/json: {"properties": {"key": "", "key1": "", "key2": ""}} + responses: + "400": + application/json: {"detail": {"message": "", "error_code": null}} + connector_create_v1: + speakeasy-default-connector-create-v1: + requestBody: + application/json: {"name": "", "description": "unibody usually despite slushy wherever reward stingy from", "server": "https://royal-majority.net/"} + responses: + "201": + application/json: {"id": "3633ef72-f5c6-4354-b510-7167244672aa", "name": "", "description": "why yahoo zany potentially", "created_at": "2024-05-03T05:17:01.129Z", "modified_at": "2025-09-26T20:42:01.861Z"} + "422": + application/json: {} + connector_list_v1: + speakeasy-default-connector-list-v1: + parameters: + query: + page_size: 100 + responses: + "200": + application/json: {"items": [], "pagination": {"page_size": 600083}} + "422": + application/json: {} + connector_call_tool_v1: + speakeasy-default-connector-call-tool-v1: + parameters: + path: + tool_name: "" + connector_id_or_name: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"content": [{"type": "resource", "resource": {"uri": "https://good-certification.net", "text": ""}}]} + "422": + application/json: {} + connector_get_v1: + speakeasy-default-connector-get-v1: + parameters: + path: + connector_id_or_name: "" + query: + fetch_customer_data: false + fetch_connection_secrets: false + responses: + "200": + application/json: {"id": "f6d4a827-9530-4a4c-af7f-ac5d6264abbf", "name": "", "description": "diversity nudge pulverize offensively", "created_at": "2024-12-11T18:18:39.930Z", "modified_at": "2026-11-21T21:28:01.899Z"} + "422": + application/json: {} + connector_update_v1: + speakeasy-default-connector-update-v1: + parameters: + path: + connector_id: "81d30634-113f-4dce-a89e-7786be2d8693" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "987e4f32-6930-41a7-8adf-6e893eddc3d9", "name": "", "description": "especially usually collaborate likewise svelte tightly very", "created_at": "2026-09-13T13:33:05.718Z", "modified_at": "2026-06-23T06:11:22.023Z"} + "422": + application/json: {} + connector_delete_v1: + speakeasy-default-connector-delete-v1: + parameters: + path: + connector_id: "5c3269fe-6a18-4216-b1fb-b093005874cd" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.beta.libraries.documents.list()`: `response.data[].process_status` **Added** - * `mistral.beta.libraries.documents.upload()`: `response.process_status` **Added** - * `mistral.beta.libraries.documents.get()`: `response.process_status` **Added** - * `mistral.beta.libraries.documents.update()`: `response.process_status` **Added** - * `mistral.beta.libraries.documents.status()`: `response.process_status` **Added** +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.start()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.append()`: \n * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get_history()`: \n * `response.entries[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get_messages()`: \n * `response.messages[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.restart()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.agents.stream()`: \n * `request.messages[].union(tool).content.union(Array)[]` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.agents.complete()`: \n * `request.messages[]` **Changed**\n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.fim.stream()`: \n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.fim.complete()`: \n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.chat.stream()`: \n * `request.messages[]` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.chat.complete()`: \n * `request.messages[].union(tool).content.union(Array)[]` **Changed**\n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.restart_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.append_stream()`: \n * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.start_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.connectors.delete()`: **Added**\n* `mistral.beta.conversations.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.delete()`: **Added**\n* `mistral.beta.observability.judges.update()`: **Added**\n* `mistral.beta.observability.campaigns.create()`: **Added**\n* `mistral.beta.observability.campaigns.list()`: **Added**\n* `mistral.beta.observability.campaigns.fetch()`: **Added**\n* `mistral.beta.observability.campaigns.delete()`: **Added**\n* `mistral.beta.observability.campaigns.fetch_status()`: **Added**\n* `mistral.beta.observability.campaigns.list_events()`: **Added**\n* `mistral.beta.observability.datasets.create()`: **Added**\n* `mistral.beta.observability.datasets.list()`: **Added**\n* `mistral.beta.observability.datasets.fetch()`: **Added**\n* `mistral.beta.observability.datasets.delete()`: **Added**\n* `mistral.beta.observability.datasets.update()`: **Added**\n* `mistral.beta.observability.datasets.list_records()`: **Added**\n* `mistral.beta.observability.datasets.create_record()`: **Added**\n* `mistral.beta.observability.datasets.import_from_campaign()`: **Added**\n* `mistral.beta.observability.datasets.import_from_explorer()`: **Added**\n* `mistral.beta.observability.datasets.import_from_file()`: **Added**\n* `mistral.beta.observability.datasets.import_from_playground()`: **Added**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: **Added**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: **Added**\n* `mistral.beta.observability.datasets.fetch_task()`: **Added**\n* `mistral.beta.observability.datasets.list_tasks()`: **Added**\n* `mistral.beta.observability.datasets.records.fetch()`: **Added**\n* `mistral.beta.observability.datasets.records.delete()`: **Added**\n* `mistral.beta.observability.datasets.records.bulk_delete()`: **Added**\n* `mistral.beta.observability.datasets.records.judge()`: **Added**\n* `mistral.beta.observability.datasets.records.update_payload()`: **Added**\n* `mistral.beta.observability.datasets.records.update_properties()`: **Added**\n* `mistral.beta.connectors.create()`: **Added**\n* `mistral.beta.connectors.list()`: **Added**\n* `mistral.beta.connectors.call_tool()`: **Added**\n* `mistral.beta.connectors.get()`: **Added**\n* `mistral.beta.connectors.update()`: **Added**\n* `mistral.beta.observability.judges.list()`: **Added**\n* `mistral.models.list()`: \n * `request` **Changed**\n * `error.status[422]` **Added**\n* `mistral.models.retrieve()`: `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.create()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: **Added**\n* `mistral.models.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.conversations.list()`: \n * `response.[].union(ModelConversation).guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get()`: \n * `response.union(ModelConversation).guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.fetch()`: **Added**\n* `mistral.beta.agents.create()`: \n * `request.guardrails` **Added**\n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.list()`: \n * `response.[].guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.get()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.update()`: \n * `request.guardrails` **Added**\n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.update_version()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.list_versions()`: \n * `response.[].guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.get_version()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.create_version_alias()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.list_version_aliases()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.delete_version_alias()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.create()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.get()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.update()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.list()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.upload()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.get()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.update()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.text_content()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.status()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.get_signed_url()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.extracted_text_signed_url()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.reprocess()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.list()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.update_or_create()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.delete()`: `error.detail[]` **Changed**\n* `mistral.files.upload()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.files.list()`: `response.data[]` **Changed**\n* `mistral.files.retrieve()`: `response` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: **Added**\n* `mistral.beta.observability.chat_completion_events.judge()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fetch()`: **Added**\n* `mistral.beta.observability.chat_completion_events.search_ids()`: **Added**\n* `mistral.beta.observability.chat_completion_events.search()`: **Added**\n* `mistral.embeddings.create()`: `error.detail[]` **Changed**\n* `mistral.classifiers.moderate()`: `error.detail[]` **Changed**\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[]` **Changed**\n * `error.detail[]` **Changed**\n* `mistral.classifiers.classify()`: `error.detail[]` **Changed**\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(Array)[].messages[].union(tool).content.union(Array)[]` **Changed**\n * `error.detail[]` **Changed**\n* `mistral.ocr.process()`: `error.detail[]` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1c82d91a..1205fef8 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.0rc1 + version: 2.0.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0e0db8ba..15c359ef 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-sdk-regen-1772455561 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:52cd52dd6272c5afe08072790b36e34de9a65c41357bab87a45cf6635dc30db0 - sourceBlobDigest: sha256:7eb63e6d0b2226456aad34b5ae9edd75cc8e015643d478c09b717852e2852065 + sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53 + sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d tags: - latest - - speakeasy-sdk-regen-1772205200 + - speakeasy-sdk-regen-1773084143 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:52cd52dd6272c5afe08072790b36e34de9a65c41357bab87a45cf6635dc30db0 - sourceBlobDigest: sha256:7eb63e6d0b2226456aad34b5ae9edd75cc8e015643d478c09b717852e2852065 + sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53 + sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:534088a1428d166f80e9669ec6bc67d277e22113c745ef8904789f0c6e6381d9 + codeSamplesRevisionDigest: sha256:57a8f791effc62a15982c2ca9560bddbf4a9d03ae9cb0171f352e73a34e7cf61 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.729.0 diff --git a/README.md b/README.md index dd98b5cc..a2289844 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ with Mistral( res = mistral.files.upload(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }) + }, visibility="workspace") # Handle response print(res) @@ -243,7 +243,7 @@ async def main(): res = await mistral.files.upload_async(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }) + }, visibility="workspace") # Handle response print(res) @@ -498,6 +498,15 @@ print(res.choices[0].message.content) * [list_version_aliases](docs/sdks/betaagents/README.md#list_version_aliases) - List all aliases for an agent. * [delete_version_alias](docs/sdks/betaagents/README.md#delete_version_alias) - Delete an agent version alias. +### [Beta.Connectors](docs/sdks/connectors/README.md) + +* [create](docs/sdks/connectors/README.md#create) - Create a new connector. +* [list](docs/sdks/connectors/README.md#list) - List all connectors. +* [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool +* [get](docs/sdks/connectors/README.md#get) - Get a connector. +* [update](docs/sdks/connectors/README.md#update) - Update a connector. +* [delete](docs/sdks/connectors/README.md#delete) - Delete a connector. + ### [Beta.Conversations](docs/sdks/conversations/README.md) * [start](docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it. @@ -539,6 +548,64 @@ print(res.choices[0].message.content) * [extracted_text_signed_url](docs/sdks/documents/README.md#extracted_text_signed_url) - Retrieve the signed URL of text extracted from a given document. * [reprocess](docs/sdks/documents/README.md#reprocess) - Reprocess a document. +### [Beta.Observability.Campaigns](docs/sdks/campaigns/README.md) + +* [create](docs/sdks/campaigns/README.md#create) - Create and start a new campaign +* [list](docs/sdks/campaigns/README.md#list) - Get all campaigns +* [fetch](docs/sdks/campaigns/README.md#fetch) - Get campaign by id +* [delete](docs/sdks/campaigns/README.md#delete) - Delete a campaign +* [fetch_status](docs/sdks/campaigns/README.md#fetch_status) - Get campaign status by campaign id +* [list_events](docs/sdks/campaigns/README.md#list_events) - Get event ids that were selected by the given campaign + +### [Beta.Observability.ChatCompletionEvents](docs/sdks/chatcompletionevents/README.md) + +* [search](docs/sdks/chatcompletionevents/README.md#search) - Get Chat Completion Events +* [search_ids](docs/sdks/chatcompletionevents/README.md#search_ids) - Alternative to /search that returns only the IDs and that can return many IDs at once +* [fetch](docs/sdks/chatcompletionevents/README.md#fetch) - Get Chat Completion Event +* [fetch_similar_events](docs/sdks/chatcompletionevents/README.md#fetch_similar_events) - Get Similar Chat Completion Events +* [judge](docs/sdks/chatcompletionevents/README.md#judge) - Run Judge on an event based on the given options + +#### [Beta.Observability.ChatCompletionEvents.Fields](docs/sdks/fields/README.md) + +* [list](docs/sdks/fields/README.md#list) - Get Chat Completion Fields +* [fetch_options](docs/sdks/fields/README.md#fetch_options) - Get Chat Completion Field Options +* [fetch_option_counts](docs/sdks/fields/README.md#fetch_option_counts) - Get Chat Completion Field Options Counts + +### [Beta.Observability.Datasets](docs/sdks/datasets/README.md) + +* [create](docs/sdks/datasets/README.md#create) - Create a new empty dataset +* [list](docs/sdks/datasets/README.md#list) - List existing datasets +* [fetch](docs/sdks/datasets/README.md#fetch) - Get dataset by id +* [delete](docs/sdks/datasets/README.md#delete) - Delete a dataset +* [update](docs/sdks/datasets/README.md#update) - Patch dataset +* [list_records](docs/sdks/datasets/README.md#list_records) - List existing records in the dataset +* [create_record](docs/sdks/datasets/README.md#create_record) - Add a conversation to the dataset +* [import_from_campaign](docs/sdks/datasets/README.md#import_from_campaign) - Populate the dataset with a campaign +* [import_from_explorer](docs/sdks/datasets/README.md#import_from_explorer) - Populate the dataset with samples from the explorer +* [import_from_file](docs/sdks/datasets/README.md#import_from_file) - Populate the dataset with samples from an uploaded file +* [import_from_playground](docs/sdks/datasets/README.md#import_from_playground) - Populate the dataset with samples from the playground +* [import_from_dataset_records](docs/sdks/datasets/README.md#import_from_dataset_records) - Populate the dataset with samples from another dataset +* [export_to_jsonl](docs/sdks/datasets/README.md#export_to_jsonl) - Export to the Files API and retrieve presigned URL to download the resulting JSONL file +* [fetch_task](docs/sdks/datasets/README.md#fetch_task) - Get status of a dataset import task +* [list_tasks](docs/sdks/datasets/README.md#list_tasks) - List import tasks for the given dataset + +#### [Beta.Observability.Datasets.Records](docs/sdks/records/README.md) + +* [fetch](docs/sdks/records/README.md#fetch) - Get the content of a given conversation from a dataset +* [delete](docs/sdks/records/README.md#delete) - Delete a record from a dataset +* [bulk_delete](docs/sdks/records/README.md#bulk_delete) - Delete multiple records from datasets +* [judge](docs/sdks/records/README.md#judge) - Run Judge on a dataset record based on the given options +* [update_payload](docs/sdks/records/README.md#update_payload) - Update a dataset record conversation payload +* [update_properties](docs/sdks/records/README.md#update_properties) - Update conversation properties + +### [Beta.Observability.Judges](docs/sdks/judges/README.md) + +* [create](docs/sdks/judges/README.md#create) - Create a new judge +* [list](docs/sdks/judges/README.md#list) - Get judges with optional filtering and search +* [fetch](docs/sdks/judges/README.md#fetch) - Get judge by id +* [delete](docs/sdks/judges/README.md#delete) - Delete a judge +* [update](docs/sdks/judges/README.md#update) - Update a judge + ### [Chat](docs/sdks/chat/README.md) * [complete](docs/sdks/chat/README.md#complete) - Chat Completion @@ -739,7 +806,7 @@ with Mistral( res = None try: - res = mistral.models.retrieve(model_id="ft:open-mistral-7b:587a6b29:20240514:7e773925") + res = mistral.models.list() # Handle response print(res) @@ -762,7 +829,7 @@ with Mistral( **Primary error:** * [`MistralError`](./src/mistralai/client/errors/mistralerror.py): The base class for HTTP error responses. -
Less common errors (6) +
Less common errors (7)
@@ -773,7 +840,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 53 of 75 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 121 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 40 of 121 methods.* * [`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.
diff --git a/RELEASES.md b/RELEASES.md index 1a631692..99c72716 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -388,4 +388,14 @@ Based on: ### Generated - [python v2.0.0rc1] . ### Releases -- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai/2.0.0rc1 - . \ No newline at end of file +- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai/2.0.0rc1 - . + +## 2026-03-09 19:22:03 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.0] . +### Releases +- [PyPI v2.0.0] https://pypi.org/project/mistralai/2.0.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index f71bbabc..9d32240a 100644 --- a/USAGE.md +++ b/USAGE.md @@ -74,7 +74,7 @@ with Mistral( res = mistral.files.upload(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }) + }, visibility="workspace") # Handle response print(res) @@ -99,7 +99,7 @@ async def main(): res = await mistral.files.upload_async(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }) + }, visibility="workspace") # Handle response print(res) diff --git a/docs/errors/observabilityerror.md b/docs/errors/observabilityerror.md new file mode 100644 index 00000000..615552c3 --- /dev/null +++ b/docs/errors/observabilityerror.md @@ -0,0 +1,8 @@ +# ObservabilityError + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `detail` | [models.ObservabilityErrorDetail](../models/observabilityerrordetail.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/agent.md b/docs/models/agent.md index 4de5a901..94e8b035 100644 --- a/docs/models/agent.md +++ b/docs/models/agent.md @@ -8,6 +8,7 @@ | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | Instruction prompt the model will follow during the conversation. | | `tools` | List[[models.AgentTool](../models/agenttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `model` | *str* | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/and_.md b/docs/models/and_.md new file mode 100644 index 00000000..591b7bb3 --- /dev/null +++ b/docs/models/and_.md @@ -0,0 +1,17 @@ +# And + + +## Supported Types + +### `models.FilterGroup` + +```python +value: models.FilterGroup = /* values here */ +``` + +### `models.FilterCondition` + +```python +value: models.FilterCondition = /* values here */ +``` + diff --git a/docs/models/annotations.md b/docs/models/annotations.md new file mode 100644 index 00000000..2a23157c --- /dev/null +++ b/docs/models/annotations.md @@ -0,0 +1,10 @@ +# Annotations + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `audience` | List[[models.Audience](../models/audience.md)] | :heavy_minus_sign: | N/A | +| `priority` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/answer.md b/docs/models/answer.md new file mode 100644 index 00000000..324a8e4e --- /dev/null +++ b/docs/models/answer.md @@ -0,0 +1,17 @@ +# Answer + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + diff --git a/docs/models/audience.md b/docs/models/audience.md new file mode 100644 index 00000000..ac325076 --- /dev/null +++ b/docs/models/audience.md @@ -0,0 +1,9 @@ +# Audience + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `USER` | user | +| `ASSISTANT` | assistant | \ No newline at end of file diff --git a/docs/models/audiocontent.md b/docs/models/audiocontent.md new file mode 100644 index 00000000..64ab6d26 --- /dev/null +++ b/docs/models/audiocontent.md @@ -0,0 +1,15 @@ +# AudioContent + +Audio content for a message. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `type` | *Literal["audio"]* | :heavy_check_mark: | N/A | +| `data` | *str* | :heavy_check_mark: | N/A | +| `mime_type` | *str* | :heavy_check_mark: | N/A | +| `annotations` | [OptionalNullable[models.Annotations]](../models/annotations.md) | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/audiourl.md b/docs/models/audiourl.md new file mode 100644 index 00000000..45ad7493 --- /dev/null +++ b/docs/models/audiourl.md @@ -0,0 +1,13 @@ +# AudioURL + +Audio URL. + +Attributes: + url: The URL of the audio file. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `url` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourlchunk.md b/docs/models/audiourlchunk.md new file mode 100644 index 00000000..56af9df9 --- /dev/null +++ b/docs/models/audiourlchunk.md @@ -0,0 +1,15 @@ +# AudioURLChunk + +Audio URL chunk. + +Attributes: + type: The type of the chunk, which is always `ChunkTypes.audio_url`. + audio_url: The URL of the audio file. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `type` | *Literal["audio_url"]* | :heavy_check_mark: | N/A | +| `audio_url` | [models.AudioURLUnion](../models/audiourlunion.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourlunion.md b/docs/models/audiourlunion.md new file mode 100644 index 00000000..96669066 --- /dev/null +++ b/docs/models/audiourlunion.md @@ -0,0 +1,17 @@ +# AudioURLUnion + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `models.AudioURL` + +```python +value: models.AudioURL = /* values here */ +``` + diff --git a/docs/models/authdata.md b/docs/models/authdata.md new file mode 100644 index 00000000..d0784e66 --- /dev/null +++ b/docs/models/authdata.md @@ -0,0 +1,9 @@ +# AuthData + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `client_id` | *str* | :heavy_check_mark: | N/A | +| `client_secret` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/basefielddefinition.md b/docs/models/basefielddefinition.md new file mode 100644 index 00000000..3f7abea9 --- /dev/null +++ b/docs/models/basefielddefinition.md @@ -0,0 +1,12 @@ +# BaseFieldDefinition + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.TypeEnum](../models/typeenum.md) | :heavy_check_mark: | N/A | +| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/basetaskstatus.md b/docs/models/basetaskstatus.md new file mode 100644 index 00000000..8fad1e10 --- /dev/null +++ b/docs/models/basetaskstatus.md @@ -0,0 +1,15 @@ +# BaseTaskStatus + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `RUNNING` | RUNNING | +| `COMPLETED` | COMPLETED | +| `FAILED` | FAILED | +| `CANCELED` | CANCELED | +| `TERMINATED` | TERMINATED | +| `CONTINUED_AS_NEW` | CONTINUED_AS_NEW | +| `TIMED_OUT` | TIMED_OUT | +| `UNKNOWN` | UNKNOWN | \ No newline at end of file diff --git a/docs/models/blobresourcecontents.md b/docs/models/blobresourcecontents.md new file mode 100644 index 00000000..c862e537 --- /dev/null +++ b/docs/models/blobresourcecontents.md @@ -0,0 +1,14 @@ +# BlobResourceContents + +Binary contents of a resource. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `uri` | *str* | :heavy_check_mark: | N/A | +| `mime_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `blob` | *str* | :heavy_check_mark: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/campaign.md b/docs/models/campaign.md new file mode 100644 index 00000000..1f2a7a36 --- /dev/null +++ b/docs/models/campaign.md @@ -0,0 +1,18 @@ +# Campaign + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `owner_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `max_nb_events` | *int* | :heavy_check_mark: | N/A | +| `search_params` | [models.FilterPayload](../models/filterpayload.md) | :heavy_check_mark: | N/A | +| `judge` | [models.Judge](../models/judge.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletionevent.md b/docs/models/chatcompletionevent.md new file mode 100644 index 00000000..500192f6 --- /dev/null +++ b/docs/models/chatcompletionevent.md @@ -0,0 +1,18 @@ +# ChatCompletionEvent + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `correlation_id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `extra_fields` | Dict[str, [Nullable[models.ChatCompletionEventExtraFields]](../models/chatcompletioneventextrafields.md)] | :heavy_check_mark: | N/A | +| `nb_input_tokens` | *int* | :heavy_check_mark: | N/A | +| `nb_output_tokens` | *int* | :heavy_check_mark: | N/A | +| `enabled_tools` | List[Dict[str, *Any*]] | :heavy_check_mark: | N/A | +| `request_messages` | List[Dict[str, *Any*]] | :heavy_check_mark: | N/A | +| `response_messages` | List[Dict[str, *Any*]] | :heavy_check_mark: | N/A | +| `nb_messages` | *int* | :heavy_check_mark: | N/A | +| `chat_transcription_events` | List[[models.ChatTranscriptionEvent](../models/chattranscriptionevent.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletioneventextrafields.md b/docs/models/chatcompletioneventextrafields.md new file mode 100644 index 00000000..c2b7f855 --- /dev/null +++ b/docs/models/chatcompletioneventextrafields.md @@ -0,0 +1,41 @@ +# ChatCompletionEventExtraFields + + +## Supported Types + +### `bool` + +```python +value: bool = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + +### `datetime` + +```python +value: datetime = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/chatcompletioneventpreview.md b/docs/models/chatcompletioneventpreview.md new file mode 100644 index 00000000..855e8ab0 --- /dev/null +++ b/docs/models/chatcompletioneventpreview.md @@ -0,0 +1,13 @@ +# ChatCompletionEventPreview + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `correlation_id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `extra_fields` | Dict[str, [Nullable[models.ChatCompletionEventPreviewExtraFields]](../models/chatcompletioneventpreviewextrafields.md)] | :heavy_check_mark: | N/A | +| `nb_input_tokens` | *int* | :heavy_check_mark: | N/A | +| `nb_output_tokens` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletioneventpreviewextrafields.md b/docs/models/chatcompletioneventpreviewextrafields.md new file mode 100644 index 00000000..dd213827 --- /dev/null +++ b/docs/models/chatcompletioneventpreviewextrafields.md @@ -0,0 +1,41 @@ +# ChatCompletionEventPreviewExtraFields + + +## Supported Types + +### `bool` + +```python +value: bool = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + +### `datetime` + +```python +value: datetime = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/chattranscriptionevent.md b/docs/models/chattranscriptionevent.md new file mode 100644 index 00000000..c2a38ed5 --- /dev/null +++ b/docs/models/chattranscriptionevent.md @@ -0,0 +1,10 @@ +# ChatTranscriptionEvent + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `audio_url` | *str* | :heavy_check_mark: | N/A | +| `model` | *str* | :heavy_check_mark: | N/A | +| `response_message` | Dict[str, *Any*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connector.md b/docs/models/connector.md new file mode 100644 index 00000000..a5d6073e --- /dev/null +++ b/docs/models/connector.md @@ -0,0 +1,15 @@ +# Connector + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `auth_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `tools` | List[[models.ConnectorTool](../models/connectortool.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcalltoolrequest.md b/docs/models/connectorcalltoolrequest.md new file mode 100644 index 00000000..9ef7a351 --- /dev/null +++ b/docs/models/connectorcalltoolrequest.md @@ -0,0 +1,10 @@ +# ConnectorCallToolRequest + +Request body for calling an MCP tool. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `arguments` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcalltoolv1request.md b/docs/models/connectorcalltoolv1request.md new file mode 100644 index 00000000..cdda08cf --- /dev/null +++ b/docs/models/connectorcalltoolv1request.md @@ -0,0 +1,10 @@ +# ConnectorCallToolV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `tool_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `connector_call_tool_request` | [models.ConnectorCallToolRequest](../models/connectorcalltoolrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeletev1request.md b/docs/models/connectordeletev1request.md new file mode 100644 index 00000000..e50c7296 --- /dev/null +++ b/docs/models/connectordeletev1request.md @@ -0,0 +1,8 @@ +# ConnectorDeleteV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connector_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorgetv1request.md b/docs/models/connectorgetv1request.md new file mode 100644 index 00000000..c45148b9 --- /dev/null +++ b/docs/models/connectorgetv1request.md @@ -0,0 +1,10 @@ +# ConnectorGetV1Request + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `fetch_customer_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the customer data associated with the connector (e.g. customer secrets / config). | +| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch the general connection secrets associated with the connector. | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistv1request.md b/docs/models/connectorlistv1request.md new file mode 100644 index 00000000..6b9a287e --- /dev/null +++ b/docs/models/connectorlistv1request.md @@ -0,0 +1,10 @@ +# ConnectorListV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `query_filters` | [Optional[models.ConnectorsQueryFilters]](../models/connectorsqueryfilters.md) | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorsqueryfilters.md b/docs/models/connectorsqueryfilters.md new file mode 100644 index 00000000..aea47e14 --- /dev/null +++ b/docs/models/connectorsqueryfilters.md @@ -0,0 +1,9 @@ +# ConnectorsQueryFilters + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `active` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter for active connectors for a given user, workspace and organization. | +| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch connection secrets. | \ No newline at end of file diff --git a/docs/models/connectortool.md b/docs/models/connectortool.md new file mode 100644 index 00000000..af5cc03b --- /dev/null +++ b/docs/models/connectortool.md @@ -0,0 +1,18 @@ +# ConnectorTool + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `locale` | [OptionalNullable[models.ConnectorToolLocale]](../models/connectortoollocale.md) | :heavy_minus_sign: | N/A | +| `jsonschema` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `execution_config` | [Nullable[models.ExecutionConfig]](../models/executionconfig.md) | :heavy_check_mark: | N/A | +| `visibility` | [models.ResourceVisibility](../models/resourcevisibility.md) | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `active` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectortoolcallmetadata.md b/docs/models/connectortoolcallmetadata.md new file mode 100644 index 00000000..4d44a2d0 --- /dev/null +++ b/docs/models/connectortoolcallmetadata.md @@ -0,0 +1,14 @@ +# ConnectorToolCallMetadata + +Metadata wrapper for MCP tool call responses. + +Nests MCP-specific fields under `mcp_meta` to avoid collisions with other +metadata keys (e.g. `tool_call_result`) in Harmattan's streaming deltas. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `mcp_meta` | [OptionalNullable[models.ConnectorToolResultMetadata]](../models/connectortoolresultmetadata.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectortoolcallresponse.md b/docs/models/connectortoolcallresponse.md new file mode 100644 index 00000000..1c51b9ac --- /dev/null +++ b/docs/models/connectortoolcallresponse.md @@ -0,0 +1,18 @@ +# ConnectorToolCallResponse + +Response from calling an MCP tool. + +We override mcp_types.CallToolResult because: +- Models only support `content`, not `structuredContent` at top level +- Downstream consumers (le-chat, etc.) need structuredContent/isError/_meta via metadata + +SYNC: Keep in sync with Harmattan (orchestrator) for harmonized tool result processing. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `content` | List[[models.ConnectorToolCallResponseContent](../models/connectortoolcallresponsecontent.md)] | :heavy_check_mark: | N/A | +| `metadata` | [OptionalNullable[models.ConnectorToolCallMetadata]](../models/connectortoolcallmetadata.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectortoolcallresponsecontent.md b/docs/models/connectortoolcallresponsecontent.md new file mode 100644 index 00000000..d7f93eda --- /dev/null +++ b/docs/models/connectortoolcallresponsecontent.md @@ -0,0 +1,35 @@ +# ConnectorToolCallResponseContent + + +## Supported Types + +### `models.TextContent` + +```python +value: models.TextContent = /* values here */ +``` + +### `models.ImageContent` + +```python +value: models.ImageContent = /* values here */ +``` + +### `models.AudioContent` + +```python +value: models.AudioContent = /* values here */ +``` + +### `models.ResourceLink` + +```python +value: models.ResourceLink = /* values here */ +``` + +### `models.EmbeddedResource` + +```python +value: models.EmbeddedResource = /* values here */ +``` + diff --git a/docs/models/connectortoollocale.md b/docs/models/connectortoollocale.md new file mode 100644 index 00000000..b882c419 --- /dev/null +++ b/docs/models/connectortoollocale.md @@ -0,0 +1,10 @@ +# ConnectorToolLocale + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `description` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `usage_sentence` | Dict[str, *str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectortoolresultmetadata.md b/docs/models/connectortoolresultmetadata.md new file mode 100644 index 00000000..77a327dc --- /dev/null +++ b/docs/models/connectortoolresultmetadata.md @@ -0,0 +1,13 @@ +# ConnectorToolResultMetadata + +MCP-specific result metadata (isError, structuredContent, _meta). + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `is_error` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `structured_content` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorupdatev1request.md b/docs/models/connectorupdatev1request.md new file mode 100644 index 00000000..db9cc9b4 --- /dev/null +++ b/docs/models/connectorupdatev1request.md @@ -0,0 +1,9 @@ +# ConnectorUpdateV1Request + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `update_connector_request` | [models.UpdateConnectorRequest](../models/updateconnectorrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/contentchunk.md b/docs/models/contentchunk.md index cb7e51d3..5a8ef58c 100644 --- a/docs/models/contentchunk.md +++ b/docs/models/contentchunk.md @@ -45,3 +45,9 @@ value: models.ThinkChunk = /* values here */ value: models.AudioChunk = /* values here */ ``` +### `models.AudioURLChunk` + +```python +value: models.AudioURLChunk = /* values here */ +``` + diff --git a/docs/models/context.md b/docs/models/context.md new file mode 100644 index 00000000..107f1bd4 --- /dev/null +++ b/docs/models/context.md @@ -0,0 +1,7 @@ +# Context + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/conversationpayload.md b/docs/models/conversationpayload.md new file mode 100644 index 00000000..481f18e6 --- /dev/null +++ b/docs/models/conversationpayload.md @@ -0,0 +1,9 @@ +# ConversationPayload + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `messages` | List[Dict[str, *Any*]] | :heavy_check_mark: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index bd7823a8..9aabc52a 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -12,6 +12,7 @@ | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `tools` | List[[models.ConversationRequestTool](../models/conversationrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | N/A | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationresponse.md b/docs/models/conversationresponse.md index 2732f785..3f0340ba 100644 --- a/docs/models/conversationresponse.md +++ b/docs/models/conversationresponse.md @@ -5,9 +5,10 @@ The response after appending new entries to the conversation. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `object` | *Optional[Literal["conversation.response"]]* | :heavy_minus_sign: | N/A | -| `conversation_id` | *str* | :heavy_check_mark: | N/A | -| `outputs` | List[[models.Output](../models/output.md)] | :heavy_check_mark: | N/A | -| `usage` | [models.ConversationUsageInfo](../models/conversationusageinfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `object` | *Optional[Literal["conversation.response"]]* | :heavy_minus_sign: | N/A | +| `conversation_id` | *str* | :heavy_check_mark: | N/A | +| `outputs` | List[[models.ConversationResponseOutput](../models/conversationresponseoutput.md)] | :heavy_check_mark: | N/A | +| `usage` | [models.ConversationUsageInfo](../models/conversationusageinfo.md) | :heavy_check_mark: | N/A | +| `guardrails` | List[[models.Guardrail](../models/guardrail.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/output.md b/docs/models/conversationresponseoutput.md similarity index 93% rename from docs/models/output.md rename to docs/models/conversationresponseoutput.md index d0ee0db9..fe8ad1b5 100644 --- a/docs/models/output.md +++ b/docs/models/conversationresponseoutput.md @@ -1,4 +1,4 @@ -# Output +# ConversationResponseOutput ## Supported Types diff --git a/docs/models/conversationrestartrequest.md b/docs/models/conversationrestartrequest.md index ad3ff362..08f47bba 100644 --- a/docs/models/conversationrestartrequest.md +++ b/docs/models/conversationrestartrequest.md @@ -12,6 +12,7 @@ Request to restart a new conversation from a given entry in the conversation. | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRestartRequestAgentVersion]](../models/conversationrestartrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | \ No newline at end of file diff --git a/docs/models/conversationrestartstreamrequest.md b/docs/models/conversationrestartstreamrequest.md index 865a1e8f..3ad739aa 100644 --- a/docs/models/conversationrestartstreamrequest.md +++ b/docs/models/conversationrestartstreamrequest.md @@ -12,6 +12,7 @@ Request to restart a new conversation from a given entry in the conversation. | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRestartStreamRequestAgentVersion]](../models/conversationrestartstreamrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | \ No newline at end of file diff --git a/docs/models/conversationsource.md b/docs/models/conversationsource.md new file mode 100644 index 00000000..12bf7c1f --- /dev/null +++ b/docs/models/conversationsource.md @@ -0,0 +1,11 @@ +# ConversationSource + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `EXPLORER` | EXPLORER | +| `UPLOADED_FILE` | UPLOADED_FILE | +| `DIRECT_INPUT` | DIRECT_INPUT | +| `PLAYGROUND` | PLAYGROUND | \ No newline at end of file diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index 8b74f9e7..f792c263 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -12,6 +12,7 @@ | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `tools` | List[[models.ConversationStreamRequestTool](../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | N/A | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | diff --git a/docs/models/createagentrequest.md b/docs/models/createagentrequest.md index cca3a079..e9665545 100644 --- a/docs/models/createagentrequest.md +++ b/docs/models/createagentrequest.md @@ -8,6 +8,7 @@ | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | Instruction prompt the model will follow during the conversation. | | `tools` | List[[models.CreateAgentRequestTool](../models/createagentrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `model` | *str* | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/createcampaignrequest.md b/docs/models/createcampaignrequest.md new file mode 100644 index 00000000..2e81d26d --- /dev/null +++ b/docs/models/createcampaignrequest.md @@ -0,0 +1,12 @@ +# CreateCampaignRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `search_params` | [models.FilterPayload](../models/filterpayload.md) | :heavy_check_mark: | N/A | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `max_nb_events` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createconnectorrequest.md b/docs/models/createconnectorrequest.md new file mode 100644 index 00000000..4668e1a6 --- /dev/null +++ b/docs/models/createconnectorrequest.md @@ -0,0 +1,15 @@ +# CreateConnectorRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. | +| `description` | *str* | :heavy_check_mark: | The description of the connector. | +| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | +| `visibility` | [Optional[models.ResourceVisibility]](../models/resourcevisibility.md) | :heavy_minus_sign: | N/A | +| `server` | *str* | :heavy_check_mark: | The url of the MCP server. | +| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | Optional organization-level headers to be sent with the request to the mcp server. | +| `auth_data` | [OptionalNullable[models.AuthData]](../models/authdata.md) | :heavy_minus_sign: | Optional additional authentication data for the connector. | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | \ No newline at end of file diff --git a/docs/models/createdatasetrecordrequest.md b/docs/models/createdatasetrecordrequest.md new file mode 100644 index 00000000..3ea0d68d --- /dev/null +++ b/docs/models/createdatasetrecordrequest.md @@ -0,0 +1,9 @@ +# CreateDatasetRecordRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `payload` | [models.ConversationPayload](../models/conversationpayload.md) | :heavy_check_mark: | N/A | +| `properties` | Dict[str, *Any*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createdatasetrecordv1observabilitydatasetsdatasetidrecordspostrequest.md b/docs/models/createdatasetrecordv1observabilitydatasetsdatasetidrecordspostrequest.md new file mode 100644 index 00000000..7fe42faa --- /dev/null +++ b/docs/models/createdatasetrecordv1observabilitydatasetsdatasetidrecordspostrequest.md @@ -0,0 +1,9 @@ +# CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `create_dataset_record_request` | [models.CreateDatasetRecordRequest](../models/createdatasetrecordrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createdatasetrequest.md b/docs/models/createdatasetrequest.md new file mode 100644 index 00000000..d4c16643 --- /dev/null +++ b/docs/models/createdatasetrequest.md @@ -0,0 +1,9 @@ +# CreateDatasetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createfileresponse.md b/docs/models/createfileresponse.md index 8152922b..84be4dc6 100644 --- a/docs/models/createfileresponse.md +++ b/docs/models/createfileresponse.md @@ -3,16 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The unique identifier of the file. | 497f6eca-6276-4993-bfeb-53cbbbba6f09 | -| `object` | *str* | :heavy_check_mark: | The object type, which is always "file". | file | -| `size_bytes` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | -| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) of the event. | 1716963433 | -| `filename` | *str* | :heavy_check_mark: | The name of the uploaded file. | files_upload.jsonl | -| `purpose` | [models.FilePurpose](../models/filepurpose.md) | :heavy_check_mark: | N/A | | -| `sample_type` | [models.SampleType](../models/sampletype.md) | :heavy_check_mark: | N/A | | -| `num_lines` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `mimetype` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `source` | [models.Source](../models/source.md) | :heavy_check_mark: | N/A | | -| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The unique identifier of the file. | 497f6eca-6276-4993-bfeb-53cbbbba6f09 | +| `object` | *str* | :heavy_check_mark: | The object type, which is always "file". | file | +| `size_bytes` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | +| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) of the event. | 1716963433 | +| `filename` | *str* | :heavy_check_mark: | The name of the uploaded file. | files_upload.jsonl | +| `purpose` | [models.FilePurpose](../models/filepurpose.md) | :heavy_check_mark: | N/A | | +| `sample_type` | [models.SampleType](../models/sampletype.md) | :heavy_check_mark: | N/A | | +| `num_lines` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `mimetype` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `source` | [models.Source](../models/source.md) | :heavy_check_mark: | N/A | | +| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `expires_at` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `visibility` | [OptionalNullable[models.FileVisibility]](../models/filevisibility.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/createfinetuningjobrequestrepository.md b/docs/models/createfinetuningjobrequestrepository.md index 32be1b6d..42b6c6ca 100644 --- a/docs/models/createfinetuningjobrequestrepository.md +++ b/docs/models/createfinetuningjobrequestrepository.md @@ -3,9 +3,9 @@ ## Supported Types -### `models.GithubRepositoryIn` +### `models.CreateGithubRepositoryRequest` ```python -value: models.GithubRepositoryIn = /* values here */ +value: models.CreateGithubRepositoryRequest = /* values here */ ``` diff --git a/docs/models/githubrepositoryin.md b/docs/models/creategithubrepositoryrequest.md similarity index 96% rename from docs/models/githubrepositoryin.md rename to docs/models/creategithubrepositoryrequest.md index 241cf584..502afa7b 100644 --- a/docs/models/githubrepositoryin.md +++ b/docs/models/creategithubrepositoryrequest.md @@ -1,4 +1,4 @@ -# GithubRepositoryIn +# CreateGithubRepositoryRequest ## Fields diff --git a/docs/models/createjudgerequest.md b/docs/models/createjudgerequest.md new file mode 100644 index 00000000..ccb1119a --- /dev/null +++ b/docs/models/createjudgerequest.md @@ -0,0 +1,13 @@ +# CreateJudgeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `model_name` | *str* | :heavy_check_mark: | N/A | +| `output` | [models.CreateJudgeRequestOutput](../models/createjudgerequestoutput.md) | :heavy_check_mark: | N/A | +| `instructions` | *str* | :heavy_check_mark: | N/A | +| `tools` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createjudgerequestoutput.md b/docs/models/createjudgerequestoutput.md new file mode 100644 index 00000000..a7267671 --- /dev/null +++ b/docs/models/createjudgerequestoutput.md @@ -0,0 +1,17 @@ +# CreateJudgeRequestOutput + + +## Supported Types + +### `models.JudgeClassificationOutput` + +```python +value: models.JudgeClassificationOutput = /* values here */ +``` + +### `models.JudgeRegressionOutput` + +```python +value: models.JudgeRegressionOutput = /* values here */ +``` + diff --git a/docs/models/dataset.md b/docs/models/dataset.md new file mode 100644 index 00000000..9d235433 --- /dev/null +++ b/docs/models/dataset.md @@ -0,0 +1,15 @@ +# Dataset + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `owner_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/datasetimporttask.md b/docs/models/datasetimporttask.md new file mode 100644 index 00000000..21e6130f --- /dev/null +++ b/docs/models/datasetimporttask.md @@ -0,0 +1,17 @@ +# DatasetImportTask + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `creator_id` | *str* | :heavy_check_mark: | N/A | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `status` | [models.BaseTaskStatus](../models/basetaskstatus.md) | :heavy_check_mark: | N/A | +| `progress` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/datasetpreview.md b/docs/models/datasetpreview.md new file mode 100644 index 00000000..f729908d --- /dev/null +++ b/docs/models/datasetpreview.md @@ -0,0 +1,15 @@ +# DatasetPreview + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `owner_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/datasetrecord.md b/docs/models/datasetrecord.md new file mode 100644 index 00000000..dbc7c3d0 --- /dev/null +++ b/docs/models/datasetrecord.md @@ -0,0 +1,15 @@ +# DatasetRecord + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `payload` | [models.ConversationPayload](../models/conversationpayload.md) | :heavy_check_mark: | N/A | +| `properties` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `source` | [models.ConversationSource](../models/conversationsource.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletecampaignv1observabilitycampaignscampaigniddeleterequest.md b/docs/models/deletecampaignv1observabilitycampaignscampaigniddeleterequest.md new file mode 100644 index 00000000..4114509d --- /dev/null +++ b/docs/models/deletecampaignv1observabilitycampaignscampaigniddeleterequest.md @@ -0,0 +1,8 @@ +# DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletedatasetrecordsrequest.md b/docs/models/deletedatasetrecordsrequest.md new file mode 100644 index 00000000..1afc46d6 --- /dev/null +++ b/docs/models/deletedatasetrecordsrequest.md @@ -0,0 +1,8 @@ +# DeleteDatasetRecordsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `dataset_record_ids` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletedatasetrecordv1observabilitydatasetrecordsdatasetrecordiddeleterequest.md b/docs/models/deletedatasetrecordv1observabilitydatasetrecordsdatasetrecordiddeleterequest.md new file mode 100644 index 00000000..b2425068 --- /dev/null +++ b/docs/models/deletedatasetrecordv1observabilitydatasetrecordsdatasetrecordiddeleterequest.md @@ -0,0 +1,8 @@ +# DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletedatasetv1observabilitydatasetsdatasetiddeleterequest.md b/docs/models/deletedatasetv1observabilitydatasetsdatasetiddeleterequest.md new file mode 100644 index 00000000..4557d3c6 --- /dev/null +++ b/docs/models/deletedatasetv1observabilitydatasetsdatasetiddeleterequest.md @@ -0,0 +1,8 @@ +# DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletejudgev1observabilityjudgesjudgeiddeleterequest.md b/docs/models/deletejudgev1observabilityjudgesjudgeiddeleterequest.md new file mode 100644 index 00000000..44042efc --- /dev/null +++ b/docs/models/deletejudgev1observabilityjudgesjudgeiddeleterequest.md @@ -0,0 +1,8 @@ +# DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `judge_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletemodelout.md b/docs/models/deletemodelresponse.md similarity index 98% rename from docs/models/deletemodelout.md rename to docs/models/deletemodelresponse.md index 5fd4df7a..d8bd2f32 100644 --- a/docs/models/deletemodelout.md +++ b/docs/models/deletemodelresponse.md @@ -1,4 +1,4 @@ -# DeleteModelOut +# DeleteModelResponse ## Fields diff --git a/docs/models/embeddedresource.md b/docs/models/embeddedresource.md new file mode 100644 index 00000000..102fca26 --- /dev/null +++ b/docs/models/embeddedresource.md @@ -0,0 +1,17 @@ +# EmbeddedResource + +The contents of a resource, embedded into a prompt or tool call result. + +It is up to the client how best to render embedded resources for the benefit +of the LLM and/or the user. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `type` | *Literal["resource"]* | :heavy_check_mark: | N/A | +| `resource` | [models.Resource](../models/resource.md) | :heavy_check_mark: | N/A | +| `annotations` | [OptionalNullable[models.Annotations]](../models/annotations.md) | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/executionconfig.md b/docs/models/executionconfig.md new file mode 100644 index 00000000..1033b7ea --- /dev/null +++ b/docs/models/executionconfig.md @@ -0,0 +1,13 @@ +# ExecutionConfig + +Not typed since mcp config can changed / not stable +we allow all extra fields and this is a dict +TODO: once mcp is stable, we need to type this + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `type` | *str* | :heavy_check_mark: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/exportdatasetresponse.md b/docs/models/exportdatasetresponse.md new file mode 100644 index 00000000..7187ee5c --- /dev/null +++ b/docs/models/exportdatasetresponse.md @@ -0,0 +1,8 @@ +# ExportDatasetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `file_url` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/exportdatasettojsonlv1observabilitydatasetsdatasetidexportstojsonlgetrequest.md b/docs/models/exportdatasettojsonlv1observabilitydatasetsdatasetidexportstojsonlgetrequest.md new file mode 100644 index 00000000..efe4bbb0 --- /dev/null +++ b/docs/models/exportdatasettojsonlv1observabilitydatasetsdatasetidexportstojsonlgetrequest.md @@ -0,0 +1,8 @@ +# ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/feedresultchatcompletioneventpreview.md b/docs/models/feedresultchatcompletioneventpreview.md new file mode 100644 index 00000000..08a6e2f8 --- /dev/null +++ b/docs/models/feedresultchatcompletioneventpreview.md @@ -0,0 +1,10 @@ +# FeedResultChatCompletionEventPreview + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `results` | List[[models.ChatCompletionEventPreview](../models/chatcompletioneventpreview.md)] | :heavy_minus_sign: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/fetchcampaignstatusresponse.md b/docs/models/fetchcampaignstatusresponse.md new file mode 100644 index 00000000..7aac0f25 --- /dev/null +++ b/docs/models/fetchcampaignstatusresponse.md @@ -0,0 +1,8 @@ +# FetchCampaignStatusResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `status` | [models.BaseTaskStatus](../models/basetaskstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/fetchchatcompletionfieldoptionsresponse.md b/docs/models/fetchchatcompletionfieldoptionsresponse.md new file mode 100644 index 00000000..86beebc1 --- /dev/null +++ b/docs/models/fetchchatcompletionfieldoptionsresponse.md @@ -0,0 +1,8 @@ +# FetchChatCompletionFieldOptionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `options` | List[[Nullable[models.Option]](../models/option.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/fetchfieldoptioncountsrequest.md b/docs/models/fetchfieldoptioncountsrequest.md new file mode 100644 index 00000000..b13f6312 --- /dev/null +++ b/docs/models/fetchfieldoptioncountsrequest.md @@ -0,0 +1,8 @@ +# FetchFieldOptionCountsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `filter_params` | [OptionalNullable[models.FilterPayload]](../models/filterpayload.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/fetchfieldoptioncountsresponse.md b/docs/models/fetchfieldoptioncountsresponse.md new file mode 100644 index 00000000..dabf6b5e --- /dev/null +++ b/docs/models/fetchfieldoptioncountsresponse.md @@ -0,0 +1,8 @@ +# FetchFieldOptionCountsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `counts` | List[[models.FieldOptionCountItem](../models/fieldoptioncountitem.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/fieldgroup.md b/docs/models/fieldgroup.md new file mode 100644 index 00000000..8fff281d --- /dev/null +++ b/docs/models/fieldgroup.md @@ -0,0 +1,9 @@ +# FieldGroup + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/fieldoptioncountitem.md b/docs/models/fieldoptioncountitem.md new file mode 100644 index 00000000..92bc971f --- /dev/null +++ b/docs/models/fieldoptioncountitem.md @@ -0,0 +1,9 @@ +# FieldOptionCountItem + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `value` | *str* | :heavy_check_mark: | N/A | +| `count` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/filesapiroutesuploadfilefilevisibility.md b/docs/models/filesapiroutesuploadfilefilevisibility.md new file mode 100644 index 00000000..055f071b --- /dev/null +++ b/docs/models/filesapiroutesuploadfilefilevisibility.md @@ -0,0 +1,9 @@ +# FilesAPIRoutesUploadFileFileVisibility + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `WORKSPACE` | workspace | +| `USER` | user | \ No newline at end of file diff --git a/docs/models/fileschema.md b/docs/models/fileschema.md index 4f3e72db..15454840 100644 --- a/docs/models/fileschema.md +++ b/docs/models/fileschema.md @@ -3,16 +3,18 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The unique identifier of the file. | 497f6eca-6276-4993-bfeb-53cbbbba6f09 | -| `object` | *str* | :heavy_check_mark: | The object type, which is always "file". | file | -| `size_bytes` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | -| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) of the event. | 1716963433 | -| `filename` | *str* | :heavy_check_mark: | The name of the uploaded file. | files_upload.jsonl | -| `purpose` | [models.FilePurpose](../models/filepurpose.md) | :heavy_check_mark: | N/A | | -| `sample_type` | [models.SampleType](../models/sampletype.md) | :heavy_check_mark: | N/A | | -| `num_lines` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `mimetype` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `source` | [models.Source](../models/source.md) | :heavy_check_mark: | N/A | | -| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The unique identifier of the file. | 497f6eca-6276-4993-bfeb-53cbbbba6f09 | +| `object` | *str* | :heavy_check_mark: | The object type, which is always "file". | file | +| `size_bytes` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | +| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) of the event. | 1716963433 | +| `filename` | *str* | :heavy_check_mark: | The name of the uploaded file. | files_upload.jsonl | +| `purpose` | [models.FilePurpose](../models/filepurpose.md) | :heavy_check_mark: | N/A | | +| `sample_type` | [models.SampleType](../models/sampletype.md) | :heavy_check_mark: | N/A | | +| `num_lines` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `mimetype` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `source` | [models.Source](../models/source.md) | :heavy_check_mark: | N/A | | +| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `expires_at` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `visibility` | [OptionalNullable[models.FileVisibility]](../models/filevisibility.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/filevisibility.md b/docs/models/filevisibility.md new file mode 100644 index 00000000..4ed11692 --- /dev/null +++ b/docs/models/filevisibility.md @@ -0,0 +1,9 @@ +# FileVisibility + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `WORKSPACE` | workspace | +| `USER` | user | \ No newline at end of file diff --git a/docs/models/filtercondition.md b/docs/models/filtercondition.md new file mode 100644 index 00000000..ba2eea60 --- /dev/null +++ b/docs/models/filtercondition.md @@ -0,0 +1,10 @@ +# FilterCondition + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `field` | *str* | :heavy_check_mark: | N/A | +| `op` | [models.Op](../models/op.md) | :heavy_check_mark: | N/A | +| `value` | *Any* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/filtergroup.md b/docs/models/filtergroup.md new file mode 100644 index 00000000..974c724c --- /dev/null +++ b/docs/models/filtergroup.md @@ -0,0 +1,9 @@ +# FilterGroup + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `and_` | List[[models.And](../models/and_.md)] | :heavy_minus_sign: | N/A | +| `or_` | List[[models.Or](../models/or_.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/filterpayload.md b/docs/models/filterpayload.md new file mode 100644 index 00000000..49f273c0 --- /dev/null +++ b/docs/models/filterpayload.md @@ -0,0 +1,8 @@ +# FilterPayload + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `filters` | [Nullable[models.Filters]](../models/filters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/filters.md b/docs/models/filters.md new file mode 100644 index 00000000..4595b82b --- /dev/null +++ b/docs/models/filters.md @@ -0,0 +1,17 @@ +# Filters + + +## Supported Types + +### `models.FilterGroup` + +```python +value: models.FilterGroup = /* values here */ +``` + +### `models.FilterCondition` + +```python +value: models.FilterCondition = /* values here */ +``` + diff --git a/docs/models/getcampaignbyidv1observabilitycampaignscampaignidgetrequest.md b/docs/models/getcampaignbyidv1observabilitycampaignscampaignidgetrequest.md new file mode 100644 index 00000000..9e781961 --- /dev/null +++ b/docs/models/getcampaignbyidv1observabilitycampaignscampaignidgetrequest.md @@ -0,0 +1,8 @@ +# GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getcampaignselectedeventsv1observabilitycampaignscampaignidselectedeventsgetrequest.md b/docs/models/getcampaignselectedeventsv1observabilitycampaignscampaignidselectedeventsgetrequest.md new file mode 100644 index 00000000..18de3f10 --- /dev/null +++ b/docs/models/getcampaignselectedeventsv1observabilitycampaignscampaignidselectedeventsgetrequest.md @@ -0,0 +1,10 @@ +# GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getcampaignstatusbyidv1observabilitycampaignscampaignidstatusgetrequest.md b/docs/models/getcampaignstatusbyidv1observabilitycampaignscampaignidstatusgetrequest.md new file mode 100644 index 00000000..947c4d64 --- /dev/null +++ b/docs/models/getcampaignstatusbyidv1observabilitycampaignscampaignidstatusgetrequest.md @@ -0,0 +1,8 @@ +# GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getcampaignsv1observabilitycampaignsgetrequest.md b/docs/models/getcampaignsv1observabilitycampaignsgetrequest.md new file mode 100644 index 00000000..f83c3b64 --- /dev/null +++ b/docs/models/getcampaignsv1observabilitycampaignsgetrequest.md @@ -0,0 +1,10 @@ +# GetCampaignsV1ObservabilityCampaignsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `q` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/conversationthinkchunk.md b/docs/models/getchatcompletioneventsv1observabilitychatcompletioneventssearchpostrequest.md similarity index 73% rename from docs/models/conversationthinkchunk.md rename to docs/models/getchatcompletioneventsv1observabilitychatcompletioneventssearchpostrequest.md index 1fb16bd9..b7b92279 100644 --- a/docs/models/conversationthinkchunk.md +++ b/docs/models/getchatcompletioneventsv1observabilitychatcompletioneventssearchpostrequest.md @@ -1,10 +1,10 @@ -# ConversationThinkChunk +# GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `type` | *Optional[Literal["thinking"]]* | :heavy_minus_sign: | N/A | -| `thinking` | List[[models.ConversationThinkChunkThinking](../models/conversationthinkchunkthinking.md)] | :heavy_check_mark: | N/A | -| `closed` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `search_chat_completion_events_request` | [models.SearchChatCompletionEventsRequest](../models/searchchatcompletioneventsrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getchatcompletioneventv1observabilitychatcompletioneventseventidgetrequest.md b/docs/models/getchatcompletioneventv1observabilitychatcompletioneventseventidgetrequest.md new file mode 100644 index 00000000..8fe18c47 --- /dev/null +++ b/docs/models/getchatcompletioneventv1observabilitychatcompletioneventseventidgetrequest.md @@ -0,0 +1,8 @@ +# GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `event_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getchatcompletionfieldoptionscountsv1observabilitychatcompletionfieldsfieldnameoptionscountspostrequest.md b/docs/models/getchatcompletionfieldoptionscountsv1observabilitychatcompletionfieldsfieldnameoptionscountspostrequest.md new file mode 100644 index 00000000..339a1de8 --- /dev/null +++ b/docs/models/getchatcompletionfieldoptionscountsv1observabilitychatcompletionfieldsfieldnameoptionscountspostrequest.md @@ -0,0 +1,9 @@ +# GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `fetch_field_option_counts_request` | [models.FetchFieldOptionCountsRequest](../models/fetchfieldoptioncountsrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getchatcompletionfieldoptionsv1observabilitychatcompletionfieldsfieldnameoptionsgetrequest.md b/docs/models/getchatcompletionfieldoptionsv1observabilitychatcompletionfieldsfieldnameoptionsgetrequest.md new file mode 100644 index 00000000..973a1a4b --- /dev/null +++ b/docs/models/getchatcompletionfieldoptionsv1observabilitychatcompletionfieldsfieldnameoptionsgetrequest.md @@ -0,0 +1,9 @@ +# GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `operator` | [models.Operator](../models/operator.md) | :heavy_check_mark: | The operator to use for filtering options | \ No newline at end of file diff --git a/docs/models/getdatasetbyidv1observabilitydatasetsdatasetidgetrequest.md b/docs/models/getdatasetbyidv1observabilitydatasetsdatasetidgetrequest.md new file mode 100644 index 00000000..60f2d162 --- /dev/null +++ b/docs/models/getdatasetbyidv1observabilitydatasetsdatasetidgetrequest.md @@ -0,0 +1,8 @@ +# GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getdatasetimporttasksv1observabilitydatasetsdatasetidtasksgetrequest.md b/docs/models/getdatasetimporttasksv1observabilitydatasetsdatasetidtasksgetrequest.md new file mode 100644 index 00000000..d4226eca --- /dev/null +++ b/docs/models/getdatasetimporttasksv1observabilitydatasetsdatasetidtasksgetrequest.md @@ -0,0 +1,10 @@ +# GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getdatasetimporttaskv1observabilitydatasetsdatasetidtaskstaskidgetrequest.md b/docs/models/getdatasetimporttaskv1observabilitydatasetsdatasetidtaskstaskidgetrequest.md new file mode 100644 index 00000000..98ffc3c6 --- /dev/null +++ b/docs/models/getdatasetimporttaskv1observabilitydatasetsdatasetidtaskstaskidgetrequest.md @@ -0,0 +1,9 @@ +# GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `task_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getdatasetrecordsv1observabilitydatasetsdatasetidrecordsgetrequest.md b/docs/models/getdatasetrecordsv1observabilitydatasetsdatasetidrecordsgetrequest.md new file mode 100644 index 00000000..82453f0c --- /dev/null +++ b/docs/models/getdatasetrecordsv1observabilitydatasetsdatasetidrecordsgetrequest.md @@ -0,0 +1,10 @@ +# GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getdatasetrecordv1observabilitydatasetrecordsdatasetrecordidgetrequest.md b/docs/models/getdatasetrecordv1observabilitydatasetrecordsdatasetrecordidgetrequest.md new file mode 100644 index 00000000..6b9eb3bc --- /dev/null +++ b/docs/models/getdatasetrecordv1observabilitydatasetrecordsdatasetrecordidgetrequest.md @@ -0,0 +1,8 @@ +# GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------- | ------------------- | ------------------- | ------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getdatasetsv1observabilitydatasetsgetrequest.md b/docs/models/getdatasetsv1observabilitydatasetsgetrequest.md new file mode 100644 index 00000000..073ab769 --- /dev/null +++ b/docs/models/getdatasetsv1observabilitydatasetsgetrequest.md @@ -0,0 +1,10 @@ +# GetDatasetsV1ObservabilityDatasetsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `q` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getfileresponse.md b/docs/models/getfileresponse.md index 0edd13e0..38ad4943 100644 --- a/docs/models/getfileresponse.md +++ b/docs/models/getfileresponse.md @@ -3,17 +3,19 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The unique identifier of the file. | 497f6eca-6276-4993-bfeb-53cbbbba6f09 | -| `object` | *str* | :heavy_check_mark: | The object type, which is always "file". | file | -| `size_bytes` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | -| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) of the event. | 1716963433 | -| `filename` | *str* | :heavy_check_mark: | The name of the uploaded file. | files_upload.jsonl | -| `purpose` | [models.FilePurpose](../models/filepurpose.md) | :heavy_check_mark: | N/A | | -| `sample_type` | [models.SampleType](../models/sampletype.md) | :heavy_check_mark: | N/A | | -| `num_lines` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | -| `mimetype` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `source` | [models.Source](../models/source.md) | :heavy_check_mark: | N/A | | -| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | -| `deleted` | *bool* | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The unique identifier of the file. | 497f6eca-6276-4993-bfeb-53cbbbba6f09 | +| `object` | *str* | :heavy_check_mark: | The object type, which is always "file". | file | +| `size_bytes` | *int* | :heavy_check_mark: | The size of the file, in bytes. | 13000 | +| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) of the event. | 1716963433 | +| `filename` | *str* | :heavy_check_mark: | The name of the uploaded file. | files_upload.jsonl | +| `purpose` | [models.FilePurpose](../models/filepurpose.md) | :heavy_check_mark: | N/A | | +| `sample_type` | [models.SampleType](../models/sampletype.md) | :heavy_check_mark: | N/A | | +| `num_lines` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `mimetype` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `source` | [models.Source](../models/source.md) | :heavy_check_mark: | N/A | | +| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | +| `expires_at` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | +| `visibility` | [OptionalNullable[models.FileVisibility]](../models/filevisibility.md) | :heavy_minus_sign: | N/A | | +| `deleted` | *bool* | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/getjudgebyidv1observabilityjudgesjudgeidgetrequest.md b/docs/models/getjudgebyidv1observabilityjudgesjudgeidgetrequest.md new file mode 100644 index 00000000..f9f1a248 --- /dev/null +++ b/docs/models/getjudgebyidv1observabilityjudgesjudgeidgetrequest.md @@ -0,0 +1,8 @@ +# GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `judge_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getjudgesv1observabilityjudgesgetrequest.md b/docs/models/getjudgesv1observabilityjudgesgetrequest.md new file mode 100644 index 00000000..154ece82 --- /dev/null +++ b/docs/models/getjudgesv1observabilityjudgesgetrequest.md @@ -0,0 +1,12 @@ +# GetJudgesV1ObservabilityJudgesGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `type_filter` | List[[models.JudgeOutputType](../models/judgeoutputtype.md)] | :heavy_minus_sign: | Filter by judge output types | +| `model_filter` | List[*str*] | :heavy_minus_sign: | Filter by model names | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `q` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getsimilarchatcompletioneventsv1observabilitychatcompletioneventseventidsimilareventsgetrequest.md b/docs/models/getsimilarchatcompletioneventsv1observabilitychatcompletioneventseventidsimilareventsgetrequest.md new file mode 100644 index 00000000..cf276b5e --- /dev/null +++ b/docs/models/getsimilarchatcompletioneventsv1observabilitychatcompletioneventseventidsimilareventsgetrequest.md @@ -0,0 +1,8 @@ +# GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `event_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/guardrail.md b/docs/models/guardrail.md new file mode 100644 index 00000000..319e1415 --- /dev/null +++ b/docs/models/guardrail.md @@ -0,0 +1,7 @@ +# Guardrail + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/guardrailconfig.md b/docs/models/guardrailconfig.md new file mode 100644 index 00000000..235d7204 --- /dev/null +++ b/docs/models/guardrailconfig.md @@ -0,0 +1,9 @@ +# GuardrailConfig + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `block_on_error` | *Optional[bool]* | :heavy_minus_sign: | If true, return HTTP 403 and block request in the event of a server-side error | +| `moderation_llm_v1` | [Nullable[models.ModerationLlmv1Config]](../models/moderationllmv1config.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/imagecontent.md b/docs/models/imagecontent.md new file mode 100644 index 00000000..5145469e --- /dev/null +++ b/docs/models/imagecontent.md @@ -0,0 +1,15 @@ +# ImageContent + +Image content for a message. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `type` | *Literal["image"]* | :heavy_check_mark: | N/A | +| `data` | *str* | :heavy_check_mark: | N/A | +| `mime_type` | *str* | :heavy_check_mark: | N/A | +| `annotations` | [OptionalNullable[models.Annotations]](../models/annotations.md) | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/importdatasetfromcampaignrequest.md b/docs/models/importdatasetfromcampaignrequest.md new file mode 100644 index 00000000..aa1ecc85 --- /dev/null +++ b/docs/models/importdatasetfromcampaignrequest.md @@ -0,0 +1,8 @@ +# ImportDatasetFromCampaignRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/importdatasetfromdatasetrequest.md b/docs/models/importdatasetfromdatasetrequest.md new file mode 100644 index 00000000..cf8d373f --- /dev/null +++ b/docs/models/importdatasetfromdatasetrequest.md @@ -0,0 +1,8 @@ +# ImportDatasetFromDatasetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `dataset_record_ids` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/importdatasetfromexplorerrequest.md b/docs/models/importdatasetfromexplorerrequest.md new file mode 100644 index 00000000..668cdcbf --- /dev/null +++ b/docs/models/importdatasetfromexplorerrequest.md @@ -0,0 +1,8 @@ +# ImportDatasetFromExplorerRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `completion_event_ids` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/importdatasetfromfilerequest.md b/docs/models/importdatasetfromfilerequest.md new file mode 100644 index 00000000..a05e9725 --- /dev/null +++ b/docs/models/importdatasetfromfilerequest.md @@ -0,0 +1,8 @@ +# ImportDatasetFromFileRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `file_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/importdatasetfromplaygroundrequest.md b/docs/models/importdatasetfromplaygroundrequest.md new file mode 100644 index 00000000..72a586bc --- /dev/null +++ b/docs/models/importdatasetfromplaygroundrequest.md @@ -0,0 +1,8 @@ +# ImportDatasetFromPlaygroundRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `conversation_ids` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judge.md b/docs/models/judge.md new file mode 100644 index 00000000..34bcce9b --- /dev/null +++ b/docs/models/judge.md @@ -0,0 +1,22 @@ +# Judge + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `owner_id` | *str* | :heavy_check_mark: | N/A | +| `workspace_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `model_name` | *str* | :heavy_check_mark: | N/A | +| `output` | [models.JudgeOutputUnion](../models/judgeoutputunion.md) | :heavy_check_mark: | N/A | +| `instructions` | *str* | :heavy_check_mark: | N/A | +| `tools` | List[*str*] | :heavy_check_mark: | N/A | +| `up_revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `down_revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `base_revision` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/judgechatcompletioneventrequest.md b/docs/models/judgechatcompletioneventrequest.md new file mode 100644 index 00000000..b91a6492 --- /dev/null +++ b/docs/models/judgechatcompletioneventrequest.md @@ -0,0 +1,8 @@ +# JudgeChatCompletionEventRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `judge_definition` | [models.CreateJudgeRequest](../models/createjudgerequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgechatcompletioneventv1observabilitychatcompletioneventseventidlivejudgingpostrequest.md b/docs/models/judgechatcompletioneventv1observabilitychatcompletioneventseventidlivejudgingpostrequest.md new file mode 100644 index 00000000..6a9d93c9 --- /dev/null +++ b/docs/models/judgechatcompletioneventv1observabilitychatcompletioneventseventidlivejudgingpostrequest.md @@ -0,0 +1,9 @@ +# JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `judge_chat_completion_event_request` | [models.JudgeChatCompletionEventRequest](../models/judgechatcompletioneventrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgeclassificationoutput.md b/docs/models/judgeclassificationoutput.md new file mode 100644 index 00000000..44d8462e --- /dev/null +++ b/docs/models/judgeclassificationoutput.md @@ -0,0 +1,9 @@ +# JudgeClassificationOutput + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `type` | *Literal["CLASSIFICATION"]* | :heavy_check_mark: | N/A | +| `options` | List[[models.JudgeClassificationOutputOption](../models/judgeclassificationoutputoption.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgeclassificationoutputoption.md b/docs/models/judgeclassificationoutputoption.md new file mode 100644 index 00000000..67e08ed2 --- /dev/null +++ b/docs/models/judgeclassificationoutputoption.md @@ -0,0 +1,9 @@ +# JudgeClassificationOutputOption + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `value` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgedatasetrecordrequest.md b/docs/models/judgedatasetrecordrequest.md new file mode 100644 index 00000000..d82aabd9 --- /dev/null +++ b/docs/models/judgedatasetrecordrequest.md @@ -0,0 +1,8 @@ +# JudgeDatasetRecordRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `judge_definition` | [models.CreateJudgeRequest](../models/createjudgerequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgedatasetrecordv1observabilitydatasetrecordsdatasetrecordidlivejudgingpostrequest.md b/docs/models/judgedatasetrecordv1observabilitydatasetrecordsdatasetrecordidlivejudgingpostrequest.md new file mode 100644 index 00000000..9ce4f011 --- /dev/null +++ b/docs/models/judgedatasetrecordv1observabilitydatasetrecordsdatasetrecordidlivejudgingpostrequest.md @@ -0,0 +1,9 @@ +# JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `judge_dataset_record_request` | [models.JudgeDatasetRecordRequest](../models/judgedatasetrecordrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgeoutput.md b/docs/models/judgeoutput.md new file mode 100644 index 00000000..4abeffa5 --- /dev/null +++ b/docs/models/judgeoutput.md @@ -0,0 +1,9 @@ +# JudgeOutput + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `analysis` | *str* | :heavy_check_mark: | N/A | +| `answer` | [models.Answer](../models/answer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgeoutputtype.md b/docs/models/judgeoutputtype.md new file mode 100644 index 00000000..6e9dfd72 --- /dev/null +++ b/docs/models/judgeoutputtype.md @@ -0,0 +1,9 @@ +# JudgeOutputType + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `REGRESSION` | REGRESSION | +| `CLASSIFICATION` | CLASSIFICATION | \ No newline at end of file diff --git a/docs/models/judgeoutputunion.md b/docs/models/judgeoutputunion.md new file mode 100644 index 00000000..61829564 --- /dev/null +++ b/docs/models/judgeoutputunion.md @@ -0,0 +1,17 @@ +# JudgeOutputUnion + + +## Supported Types + +### `models.JudgeClassificationOutput` + +```python +value: models.JudgeClassificationOutput = /* values here */ +``` + +### `models.JudgeRegressionOutput` + +```python +value: models.JudgeRegressionOutput = /* values here */ +``` + diff --git a/docs/models/judgeregressionoutput.md b/docs/models/judgeregressionoutput.md new file mode 100644 index 00000000..8f020dfb --- /dev/null +++ b/docs/models/judgeregressionoutput.md @@ -0,0 +1,12 @@ +# JudgeRegressionOutput + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `type` | *Literal["REGRESSION"]* | :heavy_check_mark: | N/A | +| `min` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `min_description` | *str* | :heavy_check_mark: | N/A | +| `max` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `max_description` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/librariessharecreatev1request.md b/docs/models/librariessharecreatev1request.md index 4c05241d..8af7cc9d 100644 --- a/docs/models/librariessharecreatev1request.md +++ b/docs/models/librariessharecreatev1request.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `sharing_in` | [models.SharingIn](../models/sharingin.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `sharing_request` | [models.SharingRequest](../models/sharingrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listcampaignselectedeventsresponse.md b/docs/models/listcampaignselectedeventsresponse.md new file mode 100644 index 00000000..eb6ea27f --- /dev/null +++ b/docs/models/listcampaignselectedeventsresponse.md @@ -0,0 +1,8 @@ +# ListCampaignSelectedEventsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `completion_events` | [models.PaginatedResultChatCompletionEventPreview](../models/paginatedresultchatcompletioneventpreview.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listcampaignsresponse.md b/docs/models/listcampaignsresponse.md new file mode 100644 index 00000000..2fcc7d19 --- /dev/null +++ b/docs/models/listcampaignsresponse.md @@ -0,0 +1,8 @@ +# ListCampaignsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `campaigns` | [models.PaginatedResultCampaignPreview](../models/paginatedresultcampaignpreview.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listchatcompletionfieldsresponse.md b/docs/models/listchatcompletionfieldsresponse.md new file mode 100644 index 00000000..c552805e --- /dev/null +++ b/docs/models/listchatcompletionfieldsresponse.md @@ -0,0 +1,9 @@ +# ListChatCompletionFieldsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `field_definitions` | List[[models.BaseFieldDefinition](../models/basefielddefinition.md)] | :heavy_check_mark: | N/A | +| `field_groups` | List[[models.FieldGroup](../models/fieldgroup.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listdatasetimporttasksresponse.md b/docs/models/listdatasetimporttasksresponse.md new file mode 100644 index 00000000..ce2e9057 --- /dev/null +++ b/docs/models/listdatasetimporttasksresponse.md @@ -0,0 +1,8 @@ +# ListDatasetImportTasksResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `tasks` | [models.PaginatedResultDatasetImportTask](../models/paginatedresultdatasetimporttask.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listdatasetrecordsresponse.md b/docs/models/listdatasetrecordsresponse.md new file mode 100644 index 00000000..25d2618a --- /dev/null +++ b/docs/models/listdatasetrecordsresponse.md @@ -0,0 +1,8 @@ +# ListDatasetRecordsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `records` | [models.PaginatedResultDatasetRecord](../models/paginatedresultdatasetrecord.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listdatasetsresponse.md b/docs/models/listdatasetsresponse.md new file mode 100644 index 00000000..af046696 --- /dev/null +++ b/docs/models/listdatasetsresponse.md @@ -0,0 +1,8 @@ +# ListDatasetsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `datasets` | [models.PaginatedResultDatasetPreview](../models/paginatedresultdatasetpreview.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listjudgesresponse.md b/docs/models/listjudgesresponse.md new file mode 100644 index 00000000..66883d64 --- /dev/null +++ b/docs/models/listjudgesresponse.md @@ -0,0 +1,8 @@ +# ListJudgesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `judges` | [models.PaginatedResultJudgePreview](../models/paginatedresultjudgepreview.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listmodelsv1modelsgetrequest.md b/docs/models/listmodelsv1modelsgetrequest.md new file mode 100644 index 00000000..537269f7 --- /dev/null +++ b/docs/models/listmodelsv1modelsgetrequest.md @@ -0,0 +1,9 @@ +# ListModelsV1ModelsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `provider` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/listsharingresponse.md b/docs/models/listsharingresponse.md new file mode 100644 index 00000000..4c29d4d4 --- /dev/null +++ b/docs/models/listsharingresponse.md @@ -0,0 +1,8 @@ +# ListSharingResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `data` | List[[models.Sharing](../models/sharing.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/mcpservericon.md b/docs/models/mcpservericon.md new file mode 100644 index 00000000..b0ae7da0 --- /dev/null +++ b/docs/models/mcpservericon.md @@ -0,0 +1,13 @@ +# MCPServerIcon + +An icon for display in user interfaces. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `src` | *str* | :heavy_check_mark: | N/A | +| `mime_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `sizes` | List[*str*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/messageinputcontentchunks.md b/docs/models/messageinputcontentchunks.md index 05617850..4fd18a0d 100644 --- a/docs/models/messageinputcontentchunks.md +++ b/docs/models/messageinputcontentchunks.md @@ -27,9 +27,9 @@ value: models.ToolFileChunk = /* values here */ value: models.DocumentURLChunk = /* values here */ ``` -### `models.ConversationThinkChunk` +### `models.ThinkChunk` ```python -value: models.ConversationThinkChunk = /* values here */ +value: models.ThinkChunk = /* values here */ ``` diff --git a/docs/models/messageoutputcontentchunks.md b/docs/models/messageoutputcontentchunks.md index c4a7777e..d9c3d50e 100644 --- a/docs/models/messageoutputcontentchunks.md +++ b/docs/models/messageoutputcontentchunks.md @@ -27,10 +27,10 @@ value: models.ToolFileChunk = /* values here */ value: models.DocumentURLChunk = /* values here */ ``` -### `models.ConversationThinkChunk` +### `models.ThinkChunk` ```python -value: models.ConversationThinkChunk = /* values here */ +value: models.ThinkChunk = /* values here */ ``` ### `models.ToolReferenceChunk` diff --git a/docs/models/messageresponse.md b/docs/models/messageresponse.md new file mode 100644 index 00000000..504aa9de --- /dev/null +++ b/docs/models/messageresponse.md @@ -0,0 +1,8 @@ +# MessageResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/modelconversation.md b/docs/models/modelconversation.md index af2e5c61..190a6f6e 100644 --- a/docs/models/modelconversation.md +++ b/docs/models/modelconversation.md @@ -8,6 +8,7 @@ | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | Instruction prompt the model will follow during the conversation. | | `tools` | List[[models.ModelConversationTool](../models/modelconversationtool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name given to the conversation. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the what the conversation is about. | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | diff --git a/docs/models/moderationllmv1action.md b/docs/models/moderationllmv1action.md new file mode 100644 index 00000000..e24d6a22 --- /dev/null +++ b/docs/models/moderationllmv1action.md @@ -0,0 +1,9 @@ +# ModerationLlmv1Action + + +## Values + +| Name | Value | +| ------- | ------- | +| `NONE` | none | +| `BLOCK` | block | \ No newline at end of file diff --git a/docs/models/moderationllmv1categorythresholds.md b/docs/models/moderationllmv1categorythresholds.md new file mode 100644 index 00000000..90ae213f --- /dev/null +++ b/docs/models/moderationllmv1categorythresholds.md @@ -0,0 +1,16 @@ +# ModerationLlmv1CategoryThresholds + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `sexual` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `hate_and_discrimination` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `violence_and_threats` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `dangerous_and_criminal_content` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `selfharm` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `health` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `financial` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `law` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `pii` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/moderationllmv1config.md b/docs/models/moderationllmv1config.md new file mode 100644 index 00000000..0c410947 --- /dev/null +++ b/docs/models/moderationllmv1config.md @@ -0,0 +1,11 @@ +# ModerationLlmv1Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv1CategoryThresholds]](../models/moderationllmv1categorythresholds.md) | :heavy_minus_sign: | Override default thresholds for specific categories. | +| `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | +| `action` | [Optional[models.ModerationLlmv1Action]](../models/moderationllmv1action.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/multipartbodyparams.md b/docs/models/multipartbodyparams.md index f14b9573..9d7a00c4 100644 --- a/docs/models/multipartbodyparams.md +++ b/docs/models/multipartbodyparams.md @@ -5,5 +5,7 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `expiry` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `visibility` | [Optional[models.FilesAPIRoutesUploadFileFileVisibility]](../models/filesapiroutesuploadfilefilevisibility.md) | :heavy_minus_sign: | N/A | | `purpose` | [Optional[models.FilePurpose]](../models/filepurpose.md) | :heavy_minus_sign: | N/A | | `file` | [models.File](../models/file.md) | :heavy_check_mark: | The File object (not file name) to be uploaded.
To upload a file and specify a custom file name you should format your request as such:
```bash
file=@path/to/your/file.jsonl;filename=custom_name.jsonl
```
Otherwise, you can just keep the original file name:
```bash
file=@path/to/your/file.jsonl
``` | \ No newline at end of file diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md new file mode 100644 index 00000000..0c387f57 --- /dev/null +++ b/docs/models/observabilityerrorcode.md @@ -0,0 +1,50 @@ +# ObservabilityErrorCode + + +## Values + +| Name | Value | +| ---------------------------------------------- | ---------------------------------------------- | +| `UNKNOWN_ERROR` | UNKNOWN_ERROR | +| `VALIDATION_ERROR` | VALIDATION_ERROR | +| `AUTH_FORBIDDEN` | AUTH_FORBIDDEN | +| `AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN` | AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN | +| `AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND` | AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND | +| `AUTH_FORBIDDEN_ROLE_NOT_FOUND` | AUTH_FORBIDDEN_ROLE_NOT_FOUND | +| `AUTH_FORBIDDEN_ORG_NOT_WHITELISTED` | AUTH_FORBIDDEN_ORG_NOT_WHITELISTED | +| `AUTH_UNAUTHORIZED` | AUTH_UNAUTHORIZED | +| `FEATURE_NOT_SUPPORTED` | FEATURE_NOT_SUPPORTED | +| `FIELDS_BAD_REQUEST` | FIELDS_BAD_REQUEST | +| `FIELDS_NOT_FOUND` | FIELDS_NOT_FOUND | +| `SEARCH_NOT_FOUND` | SEARCH_NOT_FOUND | +| `SEARCH_BAD_REQUEST` | SEARCH_BAD_REQUEST | +| `SEARCH_SERVICE_UNAVAILABLE` | SEARCH_SERVICE_UNAVAILABLE | +| `DATABASE_ERROR` | DATABASE_ERROR | +| `DATABASE_TIMEOUT` | DATABASE_TIMEOUT | +| `DATABASE_UNAVAILABLE` | DATABASE_UNAVAILABLE | +| `DATABASE_QUERY_ERROR` | DATABASE_QUERY_ERROR | +| `SEARCH_FILTER_TO_SQL_CONVERSION_ERROR` | SEARCH_FILTER_TO_SQL_CONVERSION_ERROR | +| `JUDGE_CONVERSATION_FORMAT_ERROR` | JUDGE_CONVERSATION_FORMAT_ERROR | +| `JUDGE_MISTRAL_API_ERROR` | JUDGE_MISTRAL_API_ERROR | +| `JUDGE_MISTRAL_API_TIMEOUT` | JUDGE_MISTRAL_API_TIMEOUT | +| `JUDGE_NAME_ALREADY_EXISTS` | JUDGE_NAME_ALREADY_EXISTS | +| `JUDGE_NOT_FOUND` | JUDGE_NOT_FOUND | +| `JUDGE_ALREADY_HAS_NEW_VERSION` | JUDGE_ALREADY_HAS_NEW_VERSION | +| `JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED` | JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED | +| `JUDGE_DID_NOT_CHANGE` | JUDGE_DID_NOT_CHANGE | +| `CAMPAIGN_NOT_FOUND` | CAMPAIGN_NOT_FOUND | +| `CAMPAIGN_NO_MATCHING_EVENTS` | CAMPAIGN_NO_MATCHING_EVENTS | +| `DATASET_NOT_FOUND` | DATASET_NOT_FOUND | +| `DATASET_TASK_NOT_FOUND` | DATASET_TASK_NOT_FOUND | +| `DATASET_RECORD_NOT_FOUND` | DATASET_RECORD_NOT_FOUND | +| `DATASET_RECORD_FORMAT_ERROR` | DATASET_RECORD_FORMAT_ERROR | +| `AGENT_NOT_FOUND` | AGENT_NOT_FOUND | +| `AGENT_MISTRAL_API_ERROR` | AGENT_MISTRAL_API_ERROR | +| `EVALUATION_NOT_FOUND` | EVALUATION_NOT_FOUND | +| `EVALUATION_CURRENTLY_RUNNING` | EVALUATION_CURRENTLY_RUNNING | +| `EVALUATION_RECORD_NOT_FOUND` | EVALUATION_RECORD_NOT_FOUND | +| `EVALUATION_RUN_NOT_FOUND` | EVALUATION_RUN_NOT_FOUND | +| `EVALUATION_RUN_TRANSITION_IS_INVALID` | EVALUATION_RUN_TRANSITION_IS_INVALID | +| `EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY` | EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY | +| `EVALUATION_RUN_TRANSITION_ERROR` | EVALUATION_RUN_TRANSITION_ERROR | +| `TEMPLATE_SYNTAX_ERROR` | TEMPLATE_SYNTAX_ERROR | \ No newline at end of file diff --git a/docs/models/observabilityerrordetail.md b/docs/models/observabilityerrordetail.md new file mode 100644 index 00000000..a95e25c9 --- /dev/null +++ b/docs/models/observabilityerrordetail.md @@ -0,0 +1,9 @@ +# ObservabilityErrorDetail + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `message` | *str* | :heavy_check_mark: | N/A | +| `error_code` | [Nullable[models.ObservabilityErrorCode]](../models/observabilityerrorcode.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/op.md b/docs/models/op.md new file mode 100644 index 00000000..fa3e2f3a --- /dev/null +++ b/docs/models/op.md @@ -0,0 +1,26 @@ +# Op + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `LT` | lt | +| `LTE` | lte | +| `GT` | gt | +| `GTE` | gte | +| `STARTSWITH` | startswith | +| `ISTARTSWITH` | istartswith | +| `ENDSWITH` | endswith | +| `IENDSWITH` | iendswith | +| `CONTAINS` | contains | +| `ICONTAINS` | icontains | +| `MATCHES` | matches | +| `NOTCONTAINS` | notcontains | +| `INOTCONTAINS` | inotcontains | +| `EQ` | eq | +| `NEQ` | neq | +| `ISNULL` | isnull | +| `INCLUDES` | includes | +| `EXCLUDES` | excludes | +| `LEN_EQ` | len_eq | \ No newline at end of file diff --git a/docs/models/operator.md b/docs/models/operator.md new file mode 100644 index 00000000..ca54debc --- /dev/null +++ b/docs/models/operator.md @@ -0,0 +1,28 @@ +# Operator + +The operator to use for filtering options + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `LT` | lt | +| `LTE` | lte | +| `GT` | gt | +| `GTE` | gte | +| `STARTSWITH` | startswith | +| `ISTARTSWITH` | istartswith | +| `ENDSWITH` | endswith | +| `IENDSWITH` | iendswith | +| `CONTAINS` | contains | +| `ICONTAINS` | icontains | +| `MATCHES` | matches | +| `NOTCONTAINS` | notcontains | +| `INOTCONTAINS` | inotcontains | +| `EQ` | eq | +| `NEQ` | neq | +| `ISNULL` | isnull | +| `INCLUDES` | includes | +| `EXCLUDES` | excludes | +| `LEN_EQ` | len_eq | \ No newline at end of file diff --git a/docs/models/option.md b/docs/models/option.md new file mode 100644 index 00000000..0f600be4 --- /dev/null +++ b/docs/models/option.md @@ -0,0 +1,17 @@ +# Option + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `bool` + +```python +value: bool = /* values here */ +``` + diff --git a/docs/models/or_.md b/docs/models/or_.md new file mode 100644 index 00000000..2a217269 --- /dev/null +++ b/docs/models/or_.md @@ -0,0 +1,17 @@ +# Or + + +## Supported Types + +### `models.FilterGroup` + +```python +value: models.FilterGroup = /* values here */ +``` + +### `models.FilterCondition` + +```python +value: models.FilterCondition = /* values here */ +``` + diff --git a/docs/models/outputcontentchunks.md b/docs/models/outputcontentchunks.md index e5185014..c76bc31d 100644 --- a/docs/models/outputcontentchunks.md +++ b/docs/models/outputcontentchunks.md @@ -27,10 +27,10 @@ value: models.ToolFileChunk = /* values here */ value: models.DocumentURLChunk = /* values here */ ``` -### `models.ConversationThinkChunk` +### `models.ThinkChunk` ```python -value: models.ConversationThinkChunk = /* values here */ +value: models.ThinkChunk = /* values here */ ``` ### `models.ToolReferenceChunk` diff --git a/docs/models/paginatedconnectors.md b/docs/models/paginatedconnectors.md new file mode 100644 index 00000000..3fff5b95 --- /dev/null +++ b/docs/models/paginatedconnectors.md @@ -0,0 +1,9 @@ +# PaginatedConnectors + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `items` | List[[models.Connector](../models/connector.md)] | :heavy_check_mark: | N/A | +| `pagination` | [models.PaginationResponse](../models/paginationresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/paginatedresultcampaignpreview.md b/docs/models/paginatedresultcampaignpreview.md new file mode 100644 index 00000000..7e8e5715 --- /dev/null +++ b/docs/models/paginatedresultcampaignpreview.md @@ -0,0 +1,11 @@ +# PaginatedResultCampaignPreview + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `results` | List[[models.Campaign](../models/campaign.md)] | :heavy_minus_sign: | N/A | +| `count` | *int* | :heavy_check_mark: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `previous` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/paginatedresultchatcompletioneventpreview.md b/docs/models/paginatedresultchatcompletioneventpreview.md new file mode 100644 index 00000000..96b4b7ae --- /dev/null +++ b/docs/models/paginatedresultchatcompletioneventpreview.md @@ -0,0 +1,11 @@ +# PaginatedResultChatCompletionEventPreview + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `results` | List[[models.ChatCompletionEventPreview](../models/chatcompletioneventpreview.md)] | :heavy_minus_sign: | N/A | +| `count` | *int* | :heavy_check_mark: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `previous` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/paginatedresultdatasetimporttask.md b/docs/models/paginatedresultdatasetimporttask.md new file mode 100644 index 00000000..ce067d52 --- /dev/null +++ b/docs/models/paginatedresultdatasetimporttask.md @@ -0,0 +1,11 @@ +# PaginatedResultDatasetImportTask + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `results` | List[[models.DatasetImportTask](../models/datasetimporttask.md)] | :heavy_minus_sign: | N/A | +| `count` | *int* | :heavy_check_mark: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `previous` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/paginatedresultdatasetpreview.md b/docs/models/paginatedresultdatasetpreview.md new file mode 100644 index 00000000..f6ca9037 --- /dev/null +++ b/docs/models/paginatedresultdatasetpreview.md @@ -0,0 +1,11 @@ +# PaginatedResultDatasetPreview + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `results` | List[[models.DatasetPreview](../models/datasetpreview.md)] | :heavy_minus_sign: | N/A | +| `count` | *int* | :heavy_check_mark: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `previous` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/paginatedresultdatasetrecord.md b/docs/models/paginatedresultdatasetrecord.md new file mode 100644 index 00000000..31b086eb --- /dev/null +++ b/docs/models/paginatedresultdatasetrecord.md @@ -0,0 +1,11 @@ +# PaginatedResultDatasetRecord + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `results` | List[[models.DatasetRecord](../models/datasetrecord.md)] | :heavy_minus_sign: | N/A | +| `count` | *int* | :heavy_check_mark: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `previous` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/paginatedresultjudgepreview.md b/docs/models/paginatedresultjudgepreview.md new file mode 100644 index 00000000..91bf0c35 --- /dev/null +++ b/docs/models/paginatedresultjudgepreview.md @@ -0,0 +1,11 @@ +# PaginatedResultJudgePreview + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `results` | List[[models.Judge](../models/judge.md)] | :heavy_minus_sign: | N/A | +| `count` | *int* | :heavy_check_mark: | N/A | +| `next` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `previous` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/paginationresponse.md b/docs/models/paginationresponse.md new file mode 100644 index 00000000..7ed17a69 --- /dev/null +++ b/docs/models/paginationresponse.md @@ -0,0 +1,9 @@ +# PaginationResponse + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `page_size` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/postdatasetrecordsfromcampaignv1observabilitydatasetsdatasetidimportsfromcampaignpostrequest.md b/docs/models/postdatasetrecordsfromcampaignv1observabilitydatasetsdatasetidimportsfromcampaignpostrequest.md new file mode 100644 index 00000000..b3bf2a61 --- /dev/null +++ b/docs/models/postdatasetrecordsfromcampaignv1observabilitydatasetsdatasetidimportsfromcampaignpostrequest.md @@ -0,0 +1,9 @@ +# PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `import_dataset_from_campaign_request` | [models.ImportDatasetFromCampaignRequest](../models/importdatasetfromcampaignrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/postdatasetrecordsfromdatasetv1observabilitydatasetsdatasetidimportsfromdatasetpostrequest.md b/docs/models/postdatasetrecordsfromdatasetv1observabilitydatasetsdatasetidimportsfromdatasetpostrequest.md new file mode 100644 index 00000000..33dafda2 --- /dev/null +++ b/docs/models/postdatasetrecordsfromdatasetv1observabilitydatasetsdatasetidimportsfromdatasetpostrequest.md @@ -0,0 +1,9 @@ +# PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `import_dataset_from_dataset_request` | [models.ImportDatasetFromDatasetRequest](../models/importdatasetfromdatasetrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/postdatasetrecordsfromexplorerv1observabilitydatasetsdatasetidimportsfromexplorerpostrequest.md b/docs/models/postdatasetrecordsfromexplorerv1observabilitydatasetsdatasetidimportsfromexplorerpostrequest.md new file mode 100644 index 00000000..ba25323e --- /dev/null +++ b/docs/models/postdatasetrecordsfromexplorerv1observabilitydatasetsdatasetidimportsfromexplorerpostrequest.md @@ -0,0 +1,9 @@ +# PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `import_dataset_from_explorer_request` | [models.ImportDatasetFromExplorerRequest](../models/importdatasetfromexplorerrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/postdatasetrecordsfromfilev1observabilitydatasetsdatasetidimportsfromfilepostrequest.md b/docs/models/postdatasetrecordsfromfilev1observabilitydatasetsdatasetidimportsfromfilepostrequest.md new file mode 100644 index 00000000..0bff196b --- /dev/null +++ b/docs/models/postdatasetrecordsfromfilev1observabilitydatasetsdatasetidimportsfromfilepostrequest.md @@ -0,0 +1,9 @@ +# PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `import_dataset_from_file_request` | [models.ImportDatasetFromFileRequest](../models/importdatasetfromfilerequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md b/docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md new file mode 100644 index 00000000..86ab87b8 --- /dev/null +++ b/docs/models/postdatasetrecordsfromplaygroundv1observabilitydatasetsdatasetidimportsfromplaygroundpostrequest.md @@ -0,0 +1,9 @@ +# PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `import_dataset_from_playground_request` | [models.ImportDatasetFromPlaygroundRequest](../models/importdatasetfromplaygroundrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/processingstatusout.md b/docs/models/processingstatus.md similarity index 98% rename from docs/models/processingstatusout.md rename to docs/models/processingstatus.md index bc40d320..514caa50 100644 --- a/docs/models/processingstatusout.md +++ b/docs/models/processingstatus.md @@ -1,4 +1,4 @@ -# ProcessingStatusOut +# ProcessingStatus ## Fields diff --git a/docs/models/resource.md b/docs/models/resource.md new file mode 100644 index 00000000..30d74c40 --- /dev/null +++ b/docs/models/resource.md @@ -0,0 +1,17 @@ +# Resource + + +## Supported Types + +### `models.TextResourceContents` + +```python +value: models.TextResourceContents = /* values here */ +``` + +### `models.BlobResourceContents` + +```python +value: models.BlobResourceContents = /* values here */ +``` + diff --git a/docs/models/resourcelink.md b/docs/models/resourcelink.md new file mode 100644 index 00000000..074c573e --- /dev/null +++ b/docs/models/resourcelink.md @@ -0,0 +1,22 @@ +# ResourceLink + +A resource that the server is capable of reading, included in a prompt or tool call result. + +Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `uri` | *str* | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `mime_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `icons` | List[[models.MCPServerIcon](../models/mcpservericon.md)] | :heavy_minus_sign: | N/A | +| `annotations` | [OptionalNullable[models.Annotations]](../models/annotations.md) | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `type` | *Literal["resource_link"]* | :heavy_check_mark: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/resourcevisibility.md b/docs/models/resourcevisibility.md new file mode 100644 index 00000000..9c06af2d --- /dev/null +++ b/docs/models/resourcevisibility.md @@ -0,0 +1,11 @@ +# ResourceVisibility + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `SHARED_GLOBAL` | shared_global | +| `SHARED_ORG` | shared_org | +| `SHARED_WORKSPACE` | shared_workspace | +| `PRIVATE` | private | \ No newline at end of file diff --git a/docs/models/searchchatcompletioneventidsrequest.md b/docs/models/searchchatcompletioneventidsrequest.md new file mode 100644 index 00000000..7d0c4a50 --- /dev/null +++ b/docs/models/searchchatcompletioneventidsrequest.md @@ -0,0 +1,9 @@ +# SearchChatCompletionEventIdsRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `search_params` | [models.FilterPayload](../models/filterpayload.md) | :heavy_check_mark: | N/A | +| `extra_fields` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/searchchatcompletioneventidsresponse.md b/docs/models/searchchatcompletioneventidsresponse.md new file mode 100644 index 00000000..6e429684 --- /dev/null +++ b/docs/models/searchchatcompletioneventidsresponse.md @@ -0,0 +1,8 @@ +# SearchChatCompletionEventIdsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `completion_event_ids` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listsharingout.md b/docs/models/searchchatcompletioneventsrequest.md similarity index 58% rename from docs/models/listsharingout.md rename to docs/models/searchchatcompletioneventsrequest.md index bcac4834..11bc3ab9 100644 --- a/docs/models/listsharingout.md +++ b/docs/models/searchchatcompletioneventsrequest.md @@ -1,8 +1,9 @@ -# ListSharingOut +# SearchChatCompletionEventsRequest ## Fields | Field | Type | Required | Description | | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `data` | List[[models.SharingOut](../models/sharingout.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| `search_params` | [models.FilterPayload](../models/filterpayload.md) | :heavy_check_mark: | N/A | +| `extra_fields` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/searchchatcompletioneventsresponse.md b/docs/models/searchchatcompletioneventsresponse.md new file mode 100644 index 00000000..9474c110 --- /dev/null +++ b/docs/models/searchchatcompletioneventsresponse.md @@ -0,0 +1,8 @@ +# SearchChatCompletionEventsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `completion_events` | [models.FeedResultChatCompletionEventPreview](../models/feedresultchatcompletioneventpreview.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/sharingout.md b/docs/models/sharing.md similarity index 98% rename from docs/models/sharingout.md rename to docs/models/sharing.md index 35aeff43..fc718632 100644 --- a/docs/models/sharingout.md +++ b/docs/models/sharing.md @@ -1,4 +1,4 @@ -# SharingOut +# Sharing ## Fields diff --git a/docs/models/sharingin.md b/docs/models/sharingrequest.md similarity index 99% rename from docs/models/sharingin.md rename to docs/models/sharingrequest.md index bac18c8d..21b8ec1f 100644 --- a/docs/models/sharingin.md +++ b/docs/models/sharingrequest.md @@ -1,4 +1,4 @@ -# SharingIn +# SharingRequest ## Fields diff --git a/docs/models/supportedoperator.md b/docs/models/supportedoperator.md new file mode 100644 index 00000000..74cf9b8e --- /dev/null +++ b/docs/models/supportedoperator.md @@ -0,0 +1,26 @@ +# SupportedOperator + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `LT` | lt | +| `LTE` | lte | +| `GT` | gt | +| `GTE` | gte | +| `STARTSWITH` | startswith | +| `ISTARTSWITH` | istartswith | +| `ENDSWITH` | endswith | +| `IENDSWITH` | iendswith | +| `CONTAINS` | contains | +| `ICONTAINS` | icontains | +| `MATCHES` | matches | +| `NOTCONTAINS` | notcontains | +| `INOTCONTAINS` | inotcontains | +| `EQ` | eq | +| `NEQ` | neq | +| `ISNULL` | isnull | +| `INCLUDES` | includes | +| `EXCLUDES` | excludes | +| `LEN_EQ` | len_eq | \ No newline at end of file diff --git a/docs/models/textcontent.md b/docs/models/textcontent.md new file mode 100644 index 00000000..ddd2df02 --- /dev/null +++ b/docs/models/textcontent.md @@ -0,0 +1,14 @@ +# TextContent + +Text content for a message. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `type` | *Literal["text"]* | :heavy_check_mark: | N/A | +| `text` | *str* | :heavy_check_mark: | N/A | +| `annotations` | [OptionalNullable[models.Annotations]](../models/annotations.md) | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/textresourcecontents.md b/docs/models/textresourcecontents.md new file mode 100644 index 00000000..daa531e1 --- /dev/null +++ b/docs/models/textresourcecontents.md @@ -0,0 +1,14 @@ +# TextResourceContents + +Text contents of a resource. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `uri` | *str* | :heavy_check_mark: | N/A | +| `mime_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `text` | *str* | :heavy_check_mark: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/thinkchunk.md b/docs/models/thinkchunk.md index 70c0369f..98603d8f 100644 --- a/docs/models/thinkchunk.md +++ b/docs/models/thinkchunk.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `type` | *Literal["thinking"]* | :heavy_check_mark: | N/A | -| `thinking` | List[[models.ThinkChunkThinking](../models/thinkchunkthinking.md)] | :heavy_check_mark: | N/A | +| `type` | *Optional[Literal["thinking"]]* | :heavy_minus_sign: | N/A | +| `thinking` | List[[models.Thinking](../models/thinking.md)] | :heavy_check_mark: | N/A | | `closed` | *Optional[bool]* | :heavy_minus_sign: | Whether the thinking chunk is closed or not. Currently only used for prefixing. | \ No newline at end of file diff --git a/docs/models/thinkchunkthinking.md b/docs/models/thinkchunkthinking.md deleted file mode 100644 index dd1ecca1..00000000 --- a/docs/models/thinkchunkthinking.md +++ /dev/null @@ -1,17 +0,0 @@ -# ThinkChunkThinking - - -## Supported Types - -### `models.ReferenceChunk` - -```python -value: models.ReferenceChunk = /* values here */ -``` - -### `models.TextChunk` - -```python -value: models.TextChunk = /* values here */ -``` - diff --git a/docs/models/conversationthinkchunkthinking.md b/docs/models/thinking.md similarity index 66% rename from docs/models/conversationthinkchunkthinking.md rename to docs/models/thinking.md index 84b80018..d9e51d7d 100644 --- a/docs/models/conversationthinkchunkthinking.md +++ b/docs/models/thinking.md @@ -1,4 +1,4 @@ -# ConversationThinkChunkThinking +# Thinking ## Supported Types @@ -15,3 +15,9 @@ value: models.TextChunk = /* values here */ value: models.ToolReferenceChunk = /* values here */ ``` +### `models.ReferenceChunk` + +```python +value: models.ReferenceChunk = /* values here */ +``` + diff --git a/docs/models/typeenum.md b/docs/models/typeenum.md new file mode 100644 index 00000000..80a66af3 --- /dev/null +++ b/docs/models/typeenum.md @@ -0,0 +1,14 @@ +# TypeEnum + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `ENUM` | ENUM | +| `TEXT` | TEXT | +| `INT` | INT | +| `FLOAT` | FLOAT | +| `BOOL` | BOOL | +| `TIMESTAMP` | TIMESTAMP | +| `ARRAY` | ARRAY | \ No newline at end of file diff --git a/docs/models/updateagentrequest.md b/docs/models/updateagentrequest.md index d3428d92..b8aa01f6 100644 --- a/docs/models/updateagentrequest.md +++ b/docs/models/updateagentrequest.md @@ -8,6 +8,7 @@ | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | Instruction prompt the model will follow during the conversation. | | `tools` | List[[models.UpdateAgentRequestTool](../models/updateagentrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/updateconnectorrequest.md b/docs/models/updateconnectorrequest.md new file mode 100644 index 00000000..d6d76631 --- /dev/null +++ b/docs/models/updateconnectorrequest.md @@ -0,0 +1,16 @@ +# UpdateConnectorRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | +| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | +| `connection_config` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection config. | +| `connection_secrets` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection secrets | +| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | New server url for your mcp connector. | +| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | New headers for your mcp connector. | +| `auth_data` | [OptionalNullable[models.AuthData]](../models/authdata.md) | :heavy_minus_sign: | New authentication data for your mcp connector. | \ No newline at end of file diff --git a/docs/models/updatedatasetrecordpayloadrequest.md b/docs/models/updatedatasetrecordpayloadrequest.md new file mode 100644 index 00000000..f152d843 --- /dev/null +++ b/docs/models/updatedatasetrecordpayloadrequest.md @@ -0,0 +1,8 @@ +# UpdateDatasetRecordPayloadRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `payload` | [models.ConversationPayload](../models/conversationpayload.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedatasetrecordpayloadv1observabilitydatasetrecordsdatasetrecordidpayloadputrequest.md b/docs/models/updatedatasetrecordpayloadv1observabilitydatasetrecordsdatasetrecordidpayloadputrequest.md new file mode 100644 index 00000000..fbb4b308 --- /dev/null +++ b/docs/models/updatedatasetrecordpayloadv1observabilitydatasetrecordsdatasetrecordidpayloadputrequest.md @@ -0,0 +1,9 @@ +# UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `update_dataset_record_payload_request` | [models.UpdateDatasetRecordPayloadRequest](../models/updatedatasetrecordpayloadrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedatasetrecordpropertiesrequest.md b/docs/models/updatedatasetrecordpropertiesrequest.md new file mode 100644 index 00000000..6e98944d --- /dev/null +++ b/docs/models/updatedatasetrecordpropertiesrequest.md @@ -0,0 +1,8 @@ +# UpdateDatasetRecordPropertiesRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `properties` | Dict[str, *Any*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedatasetrecordpropertiesv1observabilitydatasetrecordsdatasetrecordidpropertiesputrequest.md b/docs/models/updatedatasetrecordpropertiesv1observabilitydatasetrecordsdatasetrecordidpropertiesputrequest.md new file mode 100644 index 00000000..6b09e479 --- /dev/null +++ b/docs/models/updatedatasetrecordpropertiesv1observabilitydatasetrecordsdatasetrecordidpropertiesputrequest.md @@ -0,0 +1,9 @@ +# UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `update_dataset_record_properties_request` | [models.UpdateDatasetRecordPropertiesRequest](../models/updatedatasetrecordpropertiesrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedatasetrequest.md b/docs/models/updatedatasetrequest.md new file mode 100644 index 00000000..2a5194e4 --- /dev/null +++ b/docs/models/updatedatasetrequest.md @@ -0,0 +1,9 @@ +# UpdateDatasetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updatedatasetv1observabilitydatasetsdatasetidpatchrequest.md b/docs/models/updatedatasetv1observabilitydatasetsdatasetidpatchrequest.md new file mode 100644 index 00000000..78eae8fb --- /dev/null +++ b/docs/models/updatedatasetv1observabilitydatasetsdatasetidpatchrequest.md @@ -0,0 +1,9 @@ +# UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `update_dataset_request` | [models.UpdateDatasetRequest](../models/updatedatasetrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatejudgerequest.md b/docs/models/updatejudgerequest.md new file mode 100644 index 00000000..bf28ae7a --- /dev/null +++ b/docs/models/updatejudgerequest.md @@ -0,0 +1,13 @@ +# UpdateJudgeRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `model_name` | *str* | :heavy_check_mark: | N/A | +| `output` | [models.UpdateJudgeRequestOutput](../models/updatejudgerequestoutput.md) | :heavy_check_mark: | N/A | +| `instructions` | *str* | :heavy_check_mark: | N/A | +| `tools` | List[*str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatejudgerequestoutput.md b/docs/models/updatejudgerequestoutput.md new file mode 100644 index 00000000..a8db68ab --- /dev/null +++ b/docs/models/updatejudgerequestoutput.md @@ -0,0 +1,17 @@ +# UpdateJudgeRequestOutput + + +## Supported Types + +### `models.JudgeClassificationOutput` + +```python +value: models.JudgeClassificationOutput = /* values here */ +``` + +### `models.JudgeRegressionOutput` + +```python +value: models.JudgeRegressionOutput = /* values here */ +``` + diff --git a/docs/models/updatejudgev1observabilityjudgesjudgeidputrequest.md b/docs/models/updatejudgev1observabilityjudgesjudgeidputrequest.md new file mode 100644 index 00000000..bfe3648d --- /dev/null +++ b/docs/models/updatejudgev1observabilityjudgesjudgeidputrequest.md @@ -0,0 +1,9 @@ +# UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `update_judge_request` | [models.UpdateJudgeRequest](../models/updatejudgerequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/validationerror.md b/docs/models/validationerror.md index 7a1654a1..5bcea5b5 100644 --- a/docs/models/validationerror.md +++ b/docs/models/validationerror.md @@ -3,8 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `loc` | List[[models.Loc](../models/loc.md)] | :heavy_check_mark: | N/A | -| `msg` | *str* | :heavy_check_mark: | N/A | -| `type` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `loc` | List[[models.Loc](../models/loc.md)] | :heavy_check_mark: | N/A | +| `msg` | *str* | :heavy_check_mark: | N/A | +| `type` | *str* | :heavy_check_mark: | N/A | +| `input` | *Optional[Any]* | :heavy_minus_sign: | N/A | +| `ctx` | [Optional[models.Context]](../models/context.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/accesses/README.md b/docs/sdks/accesses/README.md index c50456df..51051e2f 100644 --- a/docs/sdks/accesses/README.md +++ b/docs/sdks/accesses/README.md @@ -42,7 +42,7 @@ with Mistral( ### Response -**[models.ListSharingOut](../../models/listsharingout.md)** +**[models.ListSharingResponse](../../models/listsharingresponse.md)** ### Errors @@ -87,7 +87,7 @@ with Mistral( ### Response -**[models.SharingOut](../../models/sharingout.md)** +**[models.Sharing](../../models/sharing.md)** ### Errors @@ -131,7 +131,7 @@ with Mistral( ### Response -**[models.SharingOut](../../models/sharingout.md)** +**[models.Sharing](../../models/sharing.md)** ### Errors diff --git a/docs/sdks/betaagents/README.md b/docs/sdks/betaagents/README.md index aaa5110e..b936538c 100644 --- a/docs/sdks/betaagents/README.md +++ b/docs/sdks/betaagents/README.md @@ -54,6 +54,7 @@ with Mistral( | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | Instruction prompt the model will follow during the conversation. | | `tools` | List[[models.CreateAgentRequestTool](../../models/createagentrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | @@ -196,6 +197,7 @@ with Mistral( | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | Instruction prompt the model will follow during the conversation. | | `tools` | List[[models.UpdateAgentRequestTool](../../models/updateagentrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/sdks/campaigns/README.md b/docs/sdks/campaigns/README.md new file mode 100644 index 00000000..d5d7e4d4 --- /dev/null +++ b/docs/sdks/campaigns/README.md @@ -0,0 +1,267 @@ +# Beta.Observability.Campaigns + +## Overview + +### Available Operations + +* [create](#create) - Create and start a new campaign +* [list](#list) - Get all campaigns +* [fetch](#fetch) - Get campaign by id +* [delete](#delete) - Delete a campaign +* [fetch_status](#fetch_status) - Get campaign status by campaign id +* [list_events](#list_events) - Get event ids that were selected by the given campaign + +## create + +Create and start a new campaign + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.campaigns.create(search_params={ + "filters": { + "field": "", + "op": "lt", + "value": "", + }, + }, judge_id="9b501b9f-3525-44a7-a51a-5352679be9ed", name="", description="shakily triangular scotch requirement whether once oh", max_nb_events=232889) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `search_params` | [models.FilterPayload](../../models/filterpayload.md) | :heavy_check_mark: | N/A | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `max_nb_events` | *int* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Campaign](../../models/campaign.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +Get all campaigns + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.campaigns.list(page_size=50, page=1) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `q` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListCampaignsResponse](../../models/listcampaignsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch + +Get campaign by id + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.campaigns.fetch(campaign_id="fd7945d6-00e2-4852-9054-bcbb968d7f98") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Campaign](../../models/campaign.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a campaign + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.campaigns.delete(campaign_id="90e07b45-8cf7-4081-8558-a786779e039d") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_status + +Get campaign status by campaign id + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.campaigns.fetch_status(campaign_id="4b1dd9a5-8dc9-48e1-bd11-29443e959902") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.FetchCampaignStatusResponse](../../models/fetchcampaignstatusresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_events + +Get event ids that were selected by the given campaign + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.campaigns.list_events(campaign_id="305b5e46-a650-4d8a-8b5b-d23ef90ec831", page_size=50, page=1) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListCampaignSelectedEventsResponse](../../models/listcampaignselectedeventsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/chatcompletionevents/README.md b/docs/sdks/chatcompletionevents/README.md new file mode 100644 index 00000000..c3f19868 --- /dev/null +++ b/docs/sdks/chatcompletionevents/README.md @@ -0,0 +1,244 @@ +# Beta.Observability.ChatCompletionEvents + +## Overview + +### Available Operations + +* [search](#search) - Get Chat Completion Events +* [search_ids](#search_ids) - Alternative to /search that returns only the IDs and that can return many IDs at once +* [fetch](#fetch) - Get Chat Completion Event +* [fetch_similar_events](#fetch_similar_events) - Get Similar Chat Completion Events +* [judge](#judge) - Run Judge on an event based on the given options + +## search + +Get Chat Completion Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.search(search_params={ + "filters": None, + }, page_size=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `search_params` | [models.FilterPayload](../../models/filterpayload.md) | :heavy_check_mark: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `extra_fields` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SearchChatCompletionEventsResponse](../../models/searchchatcompletioneventsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## search_ids + +Alternative to /search that returns only the IDs and that can return many IDs at once + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.search_ids(search_params={ + "filters": { + "field": "", + "op": "lt", + "value": "", + }, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `search_params` | [models.FilterPayload](../../models/filterpayload.md) | :heavy_check_mark: | N/A | +| `extra_fields` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SearchChatCompletionEventIdsResponse](../../models/searchchatcompletioneventidsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch + +Get Chat Completion Event + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.fetch(event_id="e79bf81b-b37f-425e-9dff-071a54592e44") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ChatCompletionEvent](../../models/chatcompletionevent.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_similar_events + +Get Similar Chat Completion Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.fetch_similar_events(event_id="b7be6e08-d068-45fc-b77a-966232e92fd6") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SearchChatCompletionEventsResponse](../../models/searchchatcompletioneventsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## judge + +Run Judge on an event based on the given options + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.judge(event_id="dfcd5582-1373-4de5-af51-987464da561c", judge_definition={ + "name": "", + "description": "total plain self-confidence candid hungrily partial astride cruelly brr", + "model_name": "", + "output": { + "type": "CLASSIFICATION", + "options": [ + { + "value": "", + "description": "indeed insolence delightfully following", + }, + ], + }, + "instructions": "", + "tools": [], + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | N/A | +| `judge_definition` | [models.CreateJudgeRequest](../../models/createjudgerequest.md) | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.JudgeOutput](../../models/judgeoutput.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md new file mode 100644 index 00000000..b8150eb8 --- /dev/null +++ b/docs/sdks/connectors/README.md @@ -0,0 +1,282 @@ +# Beta.Connectors + +## Overview + +(beta) Connectors API - manage your connectors + +### Available Operations + +* [create](#create) - Create a new connector. +* [list](#list) - List all connectors. +* [call_tool](#call_tool) - Call Connector Tool +* [get](#get) - Get a connector. +* [update](#update) - Update a connector. +* [delete](#delete) - Delete a connector. + +## create + +Create a new MCP connector. You can customize its visibility, url and auth type. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.create(name="", description="unibody usually despite slushy wherever reward stingy from", server="https://royal-majority.net/") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. | +| `description` | *str* | :heavy_check_mark: | The description of the connector. | +| `server` | *str* | :heavy_check_mark: | The url of the MCP server. | +| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | +| `visibility` | [Optional[models.ResourceVisibility]](../../models/resourcevisibility.md) | :heavy_minus_sign: | N/A | +| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | Optional organization-level headers to be sent with the request to the mcp server. | +| `auth_data` | [OptionalNullable[models.AuthData]](../../models/authdata.md) | :heavy_minus_sign: | Optional additional authentication data for the connector. | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Connector](../../models/connector.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +List all your custom connectors with keyset pagination and filters. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list(page_size=100) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `query_filters` | [Optional[models.ConnectorsQueryFilters]](../../models/connectorsqueryfilters.md) | :heavy_minus_sign: | N/A | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PaginatedConnectors](../../models/paginatedconnectors.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## call_tool + +Call a tool on an MCP connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.call_tool(tool_name="", connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `tool_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `arguments` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ConnectorToolCallResponse](../../models/connectortoolcallresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Get a connector by its ID or name. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.get(connector_id_or_name="", fetch_customer_data=False, fetch_connection_secrets=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `fetch_customer_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the customer data associated with the connector (e.g. customer secrets / config). | +| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch the general connection secrets associated with the connector. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Connector](../../models/connector.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update + +Update a connector by its ID. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.update(connector_id="81d30634-113f-4dce-a89e-7786be2d8693") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | +| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | +| `connection_config` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection config. | +| `connection_secrets` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection secrets | +| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | New server url for your mcp connector. | +| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | New headers for your mcp connector. | +| `auth_data` | [OptionalNullable[models.AuthData]](../../models/authdata.md) | :heavy_minus_sign: | New authentication data for your mcp connector. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Connector](../../models/connector.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a connector by its ID. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.delete(connector_id="5c3269fe-6a18-4216-b1fb-b093005874cd") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index e77d329b..083b293d 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -56,6 +56,7 @@ with Mistral( | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `tools` | List[[models.ConversationRequestTool](../../models/conversationrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | N/A | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | @@ -366,6 +367,7 @@ with Mistral( | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `agent_version` | [OptionalNullable[models.ConversationRestartRequestAgentVersion]](../../models/conversationrestartrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -428,6 +430,7 @@ with Mistral( | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `tools` | List[[models.ConversationStreamRequestTool](../../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | N/A | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | @@ -540,6 +543,7 @@ with Mistral( | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `agent_version` | [OptionalNullable[models.ConversationRestartStreamRequestAgentVersion]](../../models/conversationrestartstreamrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/datasets/README.md b/docs/sdks/datasets/README.md new file mode 100644 index 00000000..c04ced0c --- /dev/null +++ b/docs/sdks/datasets/README.md @@ -0,0 +1,669 @@ +# Beta.Observability.Datasets + +## Overview + +### Available Operations + +* [create](#create) - Create a new empty dataset +* [list](#list) - List existing datasets +* [fetch](#fetch) - Get dataset by id +* [delete](#delete) - Delete a dataset +* [update](#update) - Patch dataset +* [list_records](#list_records) - List existing records in the dataset +* [create_record](#create_record) - Add a conversation to the dataset +* [import_from_campaign](#import_from_campaign) - Populate the dataset with a campaign +* [import_from_explorer](#import_from_explorer) - Populate the dataset with samples from the explorer +* [import_from_file](#import_from_file) - Populate the dataset with samples from an uploaded file +* [import_from_playground](#import_from_playground) - Populate the dataset with samples from the playground +* [import_from_dataset_records](#import_from_dataset_records) - Populate the dataset with samples from another dataset +* [export_to_jsonl](#export_to_jsonl) - Export to the Files API and retrieve presigned URL to download the resulting JSONL file +* [fetch_task](#fetch_task) - Get status of a dataset import task +* [list_tasks](#list_tasks) - List import tasks for the given dataset + +## create + +Create a new empty dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.create(name="", description="citizen whoever sustenance necessary vibrant openly") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Dataset](../../models/dataset.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +List existing datasets + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.list(page_size=50, page=1) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `q` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListDatasetsResponse](../../models/listdatasetsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch + +Get dataset by id + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.fetch(dataset_id="036fa362-e080-4fa5-beff-a334a70efb58") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetPreview](../../models/datasetpreview.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.datasets.delete(dataset_id="baf961a3-bb8e-4085-89ef-de9c5d8c4e77") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update + +Patch dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.update(dataset_id="95be9afc-fc05-44a6-af9f-2362de1224f9") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetPreview](../../models/datasetpreview.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_records + +List existing records in the dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.list_records(dataset_id="444d2a88-e636-4bc0-ab6c-919bedaed112", page_size=50, page=1) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListDatasetRecordsResponse](../../models/listdatasetrecordsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create_record + +Add a conversation to the dataset + +### Example Usage + + +```python +from mistralai.client import Mistral, models +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.create_record(dataset_id="4c54ed13-1459-44e1-8696-1a6df06f7177", payload=models.ConversationPayload( + messages=[ + { + "key": "", + }, + { + "key": "", + "key1": "", + }, + ], + ), properties={ + "key": "", + "key1": "", + "key2": "", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `payload` | [models.ConversationPayload](../../models/conversationpayload.md) | :heavy_check_mark: | N/A | +| `properties` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetRecord](../../models/datasetrecord.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## import_from_campaign + +Populate the dataset with a campaign + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.import_from_campaign(dataset_id="306b5f31-e31c-4e06-9220-e3008c61bf1b", campaign_id="71a2e42d-7414-4fe6-89cb-44a2122b6f6b") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `campaign_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetImportTask](../../models/datasetimporttask.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## import_from_explorer + +Populate the dataset with samples from the explorer + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.import_from_explorer(dataset_id="ee1930e9-54f7-4c68-aa8a-40fe5d2a3485", completion_event_ids=[ + "", + "", + "", + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `completion_event_ids` | List[*str*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetImportTask](../../models/datasetimporttask.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## import_from_file + +Populate the dataset with samples from an uploaded file + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.import_from_file(dataset_id="1c96c925-cc58-4529-863d-9fe66a6f1924", file_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetImportTask](../../models/datasetimporttask.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## import_from_playground + +Populate the dataset with samples from the playground + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.import_from_playground(dataset_id="5cb42584-5fcf-4837-997a-6a67c5e6900d", conversation_ids=[]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `conversation_ids` | List[*str*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetImportTask](../../models/datasetimporttask.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## import_from_dataset_records + +Populate the dataset with samples from another dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.import_from_dataset_records(dataset_id="ada96a08-d724-4e5c-9111-aaf1bdb7d588", dataset_record_ids=[ + "58fe798a-537b-4c61-9efc-d1d96d5d264a", + "cfa1d197-deda-456e-906b-dd84dccfcd17", + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `dataset_record_ids` | List[*str*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetImportTask](../../models/datasetimporttask.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## export_to_jsonl + +Export to the Files API and retrieve presigned URL to download the resulting JSONL file + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.export_to_jsonl(dataset_id="d521add6-d909-4a69-a460-cb880d87b773") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ExportDatasetResponse](../../models/exportdatasetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_task + +Get status of a dataset import task + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.fetch_task(dataset_id="b64b504e-58a2-4d52-979b-e2634b301235", task_id="1713cde2-dea1-410d-851e-8cea964ffa14") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `task_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetImportTask](../../models/datasetimporttask.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_tasks + +List import tasks for the given dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.list_tasks(dataset_id="29903443-7f9c-42a6-9b6b-fc5cbef4191a", page_size=50, page=1) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_id` | *str* | :heavy_check_mark: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListDatasetImportTasksResponse](../../models/listdatasetimporttasksresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/documents/README.md b/docs/sdks/documents/README.md index 9c219b67..2c9440f9 100644 --- a/docs/sdks/documents/README.md +++ b/docs/sdks/documents/README.md @@ -307,7 +307,7 @@ with Mistral( ### Response -**[models.ProcessingStatusOut](../../models/processingstatusout.md)** +**[models.ProcessingStatus](../../models/processingstatus.md)** ### Errors diff --git a/docs/sdks/fields/README.md b/docs/sdks/fields/README.md new file mode 100644 index 00000000..3c842441 --- /dev/null +++ b/docs/sdks/fields/README.md @@ -0,0 +1,133 @@ +# Beta.Observability.ChatCompletionEvents.Fields + +## Overview + +### Available Operations + +* [list](#list) - Get Chat Completion Fields +* [fetch_options](#fetch_options) - Get Chat Completion Field Options +* [fetch_option_counts](#fetch_option_counts) - Get Chat Completion Field Options Counts + +## list + +Get Chat Completion Fields + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.fields.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListChatCompletionFieldsResponse](../../models/listchatcompletionfieldsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_options + +Get Chat Completion Field Options + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.fields.fetch_options(field_name="", operator="startswith") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `operator` | [models.Operator](../../models/operator.md) | :heavy_check_mark: | The operator to use for filtering options | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.FetchChatCompletionFieldOptionsResponse](../../models/fetchchatcompletionfieldoptionsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch_option_counts + +Get Chat Completion Field Options Counts + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.chat_completion_events.fields.fetch_option_counts(field_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `field_name` | *str* | :heavy_check_mark: | N/A | +| `filter_params` | [OptionalNullable[models.FilterPayload]](../../models/filterpayload.md) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.FetchFieldOptionCountsResponse](../../models/fetchfieldoptioncountsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index 9507326b..7db76611 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -36,7 +36,7 @@ with Mistral( res = mistral.files.upload(file={ "file_name": "example.file", "content": open("example.file", "rb"), - }) + }, visibility="workspace") # Handle response print(res) @@ -48,6 +48,8 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `file` | [models.File](../../models/file.md) | :heavy_check_mark: | The File object (not file name) to be uploaded.
To upload a file and specify a custom file name you should format your request as such:
```bash
file=@path/to/your/file.jsonl;filename=custom_name.jsonl
```
Otherwise, you can just keep the original file name:
```bash
file=@path/to/your/file.jsonl
``` | +| `expiry` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `visibility` | [Optional[models.FilesAPIRoutesUploadFileFileVisibility]](../../models/filesapiroutesuploadfilefilevisibility.md) | :heavy_minus_sign: | N/A | | `purpose` | [Optional[models.FilePurpose]](../../models/filepurpose.md) | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/judges/README.md b/docs/sdks/judges/README.md new file mode 100644 index 00000000..f1187518 --- /dev/null +++ b/docs/sdks/judges/README.md @@ -0,0 +1,236 @@ +# Beta.Observability.Judges + +## Overview + +### Available Operations + +* [create](#create) - Create a new judge +* [list](#list) - Get judges with optional filtering and search +* [fetch](#fetch) - Get judge by id +* [delete](#delete) - Delete a judge +* [update](#update) - Update a judge + +## create + +Create a new judge + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.judges.create(name="", description="border freely down whenever broadly whenever restructure catalyze after", model_name="", output={ + "type": "REGRESSION", + "min": 0, + "min_description": "", + "max": 1, + "max_description": "", + }, instructions="", tools=[ + "", + "", + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `model_name` | *str* | :heavy_check_mark: | N/A | +| `output` | [models.CreateJudgeRequestOutput](../../models/createjudgerequestoutput.md) | :heavy_check_mark: | N/A | +| `instructions` | *str* | :heavy_check_mark: | N/A | +| `tools` | List[*str*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Judge](../../models/judge.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list + +Get judges with optional filtering and search + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.judges.list(page_size=50, page=1) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `type_filter` | List[[models.JudgeOutputType](../../models/judgeoutputtype.md)] | :heavy_minus_sign: | Filter by judge output types | +| `model_filter` | List[*str*] | :heavy_minus_sign: | Filter by model names | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `q` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListJudgesResponse](../../models/listjudgesresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## fetch + +Get judge by id + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.judges.fetch(judge_id="19ae5cf8-2ade-4a40-b9d2-730aaebe8429") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Judge](../../models/judge.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a judge + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.judges.delete(judge_id="80deecde-e10f-409c-a13a-c242d3760f6e") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update + +Update a judge + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.judges.update(judge_id="9f28c7db-1fb7-4e1c-b137-d7039561ddb7", name="", description="noteworthy and unless", model_name="", output={ + "type": "REGRESSION", + "min": 0, + "min_description": "", + "max": 1, + "max_description": "", + }, instructions="", tools=[]) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `model_name` | *str* | :heavy_check_mark: | N/A | +| `output` | [models.UpdateJudgeRequestOutput](../../models/updatejudgerequestoutput.md) | :heavy_check_mark: | N/A | +| `instructions` | *str* | :heavy_check_mark: | N/A | +| `tools` | List[*str*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index 311a2db6..f585dcbe 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -40,6 +40,8 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `provider` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -48,9 +50,10 @@ with Mistral( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## retrieve @@ -125,7 +128,7 @@ with Mistral( ### Response -**[models.DeleteModelOut](../../models/deletemodelout.md)** +**[models.DeleteModelResponse](../../models/deletemodelresponse.md)** ### Errors diff --git a/docs/sdks/records/README.md b/docs/sdks/records/README.md new file mode 100644 index 00000000..ce8f1f68 --- /dev/null +++ b/docs/sdks/records/README.md @@ -0,0 +1,277 @@ +# Beta.Observability.Datasets.Records + +## Overview + +### Available Operations + +* [fetch](#fetch) - Get the content of a given conversation from a dataset +* [delete](#delete) - Delete a record from a dataset +* [bulk_delete](#bulk_delete) - Delete multiple records from datasets +* [judge](#judge) - Run Judge on a dataset record based on the given options +* [update_payload](#update_payload) - Update a dataset record conversation payload +* [update_properties](#update_properties) - Update conversation properties + +## fetch + +Get the content of a given conversation from a dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.records.fetch(dataset_record_id="ce995349-abbf-45c0-be75-885fc1c4b4c0") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DatasetRecord](../../models/datasetrecord.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a record from a dataset + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.datasets.records.delete(dataset_record_id="799fed99-80b4-4a9a-a15e-05352b811702") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## bulk_delete + +Delete multiple records from datasets + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.datasets.records.bulk_delete(dataset_record_ids=[ + "22fc78f7-e774-4ab5-b1ea-63852992ef31", + "1c533b4f-882e-4bd0-9ef6-9933b825f8b1", + ]) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_record_ids` | List[*str*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## judge + +Run Judge on a dataset record based on the given options + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.datasets.records.judge(dataset_record_id="9de5d7a1-787a-45dd-b668-9f3407e76d8b", judge_definition={ + "name": "", + "description": "wisely railway deceivingly arcade minion back what yowza outrun service", + "model_name": "", + "output": { + "type": "CLASSIFICATION", + "options": [ + { + "value": "", + "description": "spork excluding without retrospectivity bah next yearly", + }, + ], + }, + "instructions": "", + "tools": [ + "", + ], + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `judge_definition` | [models.CreateJudgeRequest](../../models/createjudgerequest.md) | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.JudgeOutput](../../models/judgeoutput.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update_payload + +Update a dataset record conversation payload + +### Example Usage + + +```python +from mistralai.client import Mistral, models +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.datasets.records.update_payload(dataset_record_id="17506b15-748e-4e7c-9737-c97c44d04b0f", payload=models.ConversationPayload( + messages=[ + { + "key": "", + }, + { + + }, + { + "key": "", + }, + ], + )) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `payload` | [models.ConversationPayload](../../models/conversationpayload.md) | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update_properties + +Update conversation properties + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.beta.observability.datasets.records.update_properties(dataset_record_id="a4deefc5-0905-427e-ad15-1090ef9e216d", properties={ + "key": "", + "key1": "", + "key2": "", + }) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `dataset_record_id` | *str* | :heavy_check_mark: | N/A | +| `properties` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 94572c05..bb175abf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.0rc1" +version = "2.0.0" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 805648e4..c7251c9c 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.0rc1" +__version__: str = "2.0.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.0rc1 2.841.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.841.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/accesses.py b/src/mistralai/client/accesses.py index 0761b0bc..2cfdc7da 100644 --- a/src/mistralai/client/accesses.py +++ b/src/mistralai/client/accesses.py @@ -21,7 +21,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ListSharingOut: + ) -> models.ListSharingResponse: r"""List all of the access to this library. Given a library, list all of the Entity that have access and to what level. @@ -88,7 +88,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ListSharingOut, http_res) + return unmarshal_json_response(models.ListSharingResponse, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -111,7 +111,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ListSharingOut: + ) -> models.ListSharingResponse: r"""List all of the access to this library. Given a library, list all of the Entity that have access and to what level. @@ -178,7 +178,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ListSharingOut, http_res) + return unmarshal_json_response(models.ListSharingResponse, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -205,7 +205,7 @@ def update_or_create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.SharingOut: + ) -> models.Sharing: r"""Create or update an access level. Given a library id, you can create or update the access level of an entity. You have to be owner of the library to share a library. An owner cannot change their own role. A library cannot be shared outside of the organization. @@ -232,7 +232,7 @@ def update_or_create( request = models.LibrariesShareCreateV1Request( library_id=library_id, - sharing_in=models.SharingIn( + sharing_request=models.SharingRequest( org_id=org_id, level=level, share_with_uuid=share_with_uuid, @@ -254,7 +254,7 @@ def update_or_create( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.sharing_in, False, False, "json", models.SharingIn + request.sharing_request, False, False, "json", models.SharingRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -285,7 +285,7 @@ def update_or_create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.SharingOut, http_res) + return unmarshal_json_response(models.Sharing, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -312,7 +312,7 @@ async def update_or_create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.SharingOut: + ) -> models.Sharing: r"""Create or update an access level. Given a library id, you can create or update the access level of an entity. You have to be owner of the library to share a library. An owner cannot change their own role. A library cannot be shared outside of the organization. @@ -339,7 +339,7 @@ async def update_or_create_async( request = models.LibrariesShareCreateV1Request( library_id=library_id, - sharing_in=models.SharingIn( + sharing_request=models.SharingRequest( org_id=org_id, level=level, share_with_uuid=share_with_uuid, @@ -361,7 +361,7 @@ async def update_or_create_async( http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( - request.sharing_in, False, False, "json", models.SharingIn + request.sharing_request, False, False, "json", models.SharingRequest ), allow_empty_value=None, timeout_ms=timeout_ms, @@ -392,7 +392,7 @@ async def update_or_create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.SharingOut, http_res) + return unmarshal_json_response(models.Sharing, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -418,7 +418,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.SharingOut: + ) -> models.Sharing: r"""Delete an access level. Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. @@ -496,7 +496,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.SharingOut, http_res) + return unmarshal_json_response(models.Sharing, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -522,7 +522,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.SharingOut: + ) -> models.Sharing: r"""Delete an access level. Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. @@ -600,7 +600,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.SharingOut, http_res) + return unmarshal_json_response(models.Sharing, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res diff --git a/src/mistralai/client/beta.py b/src/mistralai/client/beta.py index 65b761d1..83b8fc87 100644 --- a/src/mistralai/client/beta.py +++ b/src/mistralai/client/beta.py @@ -4,8 +4,10 @@ from .basesdk import BaseSDK from .sdkconfiguration import SDKConfiguration from mistralai.client.beta_agents import BetaAgents +from mistralai.client.connectors import Connectors from mistralai.client.conversations import Conversations from mistralai.client.libraries import Libraries +from mistralai.client.observability import Observability from typing import Optional @@ -16,6 +18,9 @@ class Beta(BaseSDK): r"""(beta) Agents API""" libraries: Libraries r"""(beta) Libraries API to create and manage libraries - index your documents to enhance agent capabilities.""" + observability: Observability + connectors: Connectors + r"""(beta) Connectors API - manage your connectors""" def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -30,3 +35,7 @@ def _init_sdks(self): ) self.agents = BetaAgents(self.sdk_configuration, parent_ref=self.parent_ref) self.libraries = Libraries(self.sdk_configuration, parent_ref=self.parent_ref) + self.observability = Observability( + self.sdk_configuration, parent_ref=self.parent_ref + ) + self.connectors = Connectors(self.sdk_configuration, parent_ref=self.parent_ref) diff --git a/src/mistralai/client/beta_agents.py b/src/mistralai/client/beta_agents.py index 157c5de4..19f8d2b2 100644 --- a/src/mistralai/client/beta_agents.py +++ b/src/mistralai/client/beta_agents.py @@ -28,6 +28,9 @@ def create( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, @@ -46,6 +49,7 @@ def create( :param instructions: Instruction prompt the model will follow during the conversation. :param tools: List of tools which are available to the model during the conversation. :param completion_args: White-listed arguments from the completion API + :param guardrails: :param description: :param handoffs: :param metadata: @@ -73,6 +77,9 @@ def create( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), model=model, name=name, description=description, @@ -156,6 +163,9 @@ async def create_async( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, @@ -174,6 +184,7 @@ async def create_async( :param instructions: Instruction prompt the model will follow during the conversation. :param tools: List of tools which are available to the model during the conversation. :param completion_args: White-listed arguments from the completion API + :param guardrails: :param description: :param handoffs: :param metadata: @@ -201,6 +212,9 @@ async def create_async( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), model=model, name=name, description=description, @@ -701,6 +715,9 @@ def update( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, model: OptionalNullable[str] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, @@ -721,6 +738,7 @@ def update( :param instructions: Instruction prompt the model will follow during the conversation. :param tools: List of tools which are available to the model during the conversation. :param completion_args: White-listed arguments from the completion API + :param guardrails: :param model: :param name: :param description: @@ -753,6 +771,9 @@ def update( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), model=model, name=name, description=description, @@ -841,6 +862,9 @@ async def update_async( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, model: OptionalNullable[str] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, @@ -861,6 +885,7 @@ async def update_async( :param instructions: Instruction prompt the model will follow during the conversation. :param tools: List of tools which are available to the model during the conversation. :param completion_args: White-listed arguments from the completion API + :param guardrails: :param model: :param name: :param description: @@ -893,6 +918,9 @@ async def update_async( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), model=model, name=name, description=description, diff --git a/src/mistralai/client/campaigns.py b/src/mistralai/client/campaigns.py new file mode 100644 index 00000000..a1ffcebc --- /dev/null +++ b/src/mistralai/client/campaigns.py @@ -0,0 +1,1150 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9e64fcf4e60e + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union + + +class Campaigns(BaseSDK): + def create( + self, + *, + search_params: Union[models.FilterPayload, models.FilterPayloadTypedDict], + judge_id: str, + name: str, + description: str, + max_nb_events: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Campaign: + r"""Create and start a new campaign + + :param search_params: + :param judge_id: + :param name: + :param description: + :param max_nb_events: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateCampaignRequest( + search_params=utils.get_pydantic_model(search_params, models.FilterPayload), + judge_id=judge_id, + name=name, + description=description, + max_nb_events=max_nb_events, + ) + + req = self._build_request( + method="POST", + path="/v1/observability/campaigns", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateCampaignRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_campaign_v1_observability_campaigns_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Campaign, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_async( + self, + *, + search_params: Union[models.FilterPayload, models.FilterPayloadTypedDict], + judge_id: str, + name: str, + description: str, + max_nb_events: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Campaign: + r"""Create and start a new campaign + + :param search_params: + :param judge_id: + :param name: + :param description: + :param max_nb_events: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateCampaignRequest( + search_params=utils.get_pydantic_model(search_params, models.FilterPayload), + judge_id=judge_id, + name=name, + description=description, + max_nb_events=max_nb_events, + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/campaigns", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateCampaignRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_campaign_v1_observability_campaigns_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Campaign, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list( + self, + *, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + q: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListCampaignsResponse: + r"""Get all campaigns + + :param page_size: + :param page: + :param q: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignsV1ObservabilityCampaignsGetRequest( + page_size=page_size, + page=page, + q=q, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/campaigns", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaigns_v1_observability_campaigns_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListCampaignsResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + q: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListCampaignsResponse: + r"""Get all campaigns + + :param page_size: + :param page: + :param q: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignsV1ObservabilityCampaignsGetRequest( + page_size=page_size, + page=page, + q=q, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/campaigns", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaigns_v1_observability_campaigns_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListCampaignsResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch( + self, + *, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Campaign: + r"""Get campaign by id + + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequest( + campaign_id=campaign_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/campaigns/{campaign_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaign_by_id_v1_observability_campaigns__campaign_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Campaign, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_async( + self, + *, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Campaign: + r"""Get campaign by id + + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequest( + campaign_id=campaign_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/campaigns/{campaign_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaign_by_id_v1_observability_campaigns__campaign_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Campaign, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete( + self, + *, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a campaign + + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest( + campaign_id=campaign_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/observability/campaigns/{campaign_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_campaign_v1_observability_campaigns__campaign_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a campaign + + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest( + campaign_id=campaign_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/observability/campaigns/{campaign_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_campaign_v1_observability_campaigns__campaign_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_status( + self, + *, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.FetchCampaignStatusResponse: + r"""Get campaign status by campaign id + + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequest( + campaign_id=campaign_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/campaigns/{campaign_id}/status", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaign_status_by_id_v1_observability_campaigns__campaign_id__status_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.FetchCampaignStatusResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_status_async( + self, + *, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.FetchCampaignStatusResponse: + r"""Get campaign status by campaign id + + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequest( + campaign_id=campaign_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/campaigns/{campaign_id}/status", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaign_status_by_id_v1_observability_campaigns__campaign_id__status_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.FetchCampaignStatusResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_events( + self, + *, + campaign_id: str, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListCampaignSelectedEventsResponse: + r"""Get event ids that were selected by the given campaign + + :param campaign_id: + :param page_size: + :param page: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequest( + campaign_id=campaign_id, + page_size=page_size, + page=page, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/campaigns/{campaign_id}/selected-events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaign_selected_events_v1_observability_campaigns__campaign_id__selected_events_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ListCampaignSelectedEventsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_events_async( + self, + *, + campaign_id: str, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListCampaignSelectedEventsResponse: + r"""Get event ids that were selected by the given campaign + + :param campaign_id: + :param page_size: + :param page: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequest( + campaign_id=campaign_id, + page_size=page_size, + page=page, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/campaigns/{campaign_id}/selected-events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_campaign_selected_events_v1_observability_campaigns__campaign_id__selected_events_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ListCampaignSelectedEventsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/chat_completion_events.py b/src/mistralai/client/chat_completion_events.py new file mode 100644 index 00000000..c060235c --- /dev/null +++ b/src/mistralai/client/chat_completion_events.py @@ -0,0 +1,1030 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1813f339625b + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.fields import Fields +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional, Union + + +class ChatCompletionEvents(BaseSDK): + fields: Fields + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.fields = Fields(self.sdk_configuration, parent_ref=self.parent_ref) + + def search( + self, + *, + search_params: Union[models.FilterPayload, models.FilterPayloadTypedDict], + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + extra_fields: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchChatCompletionEventsResponse: + r"""Get Chat Completion Events + + :param search_params: + :param page_size: + :param cursor: + :param extra_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest( + page_size=page_size, + cursor=cursor, + search_chat_completion_events_request=models.SearchChatCompletionEventsRequest( + search_params=utils.get_pydantic_model( + search_params, models.FilterPayload + ), + extra_fields=extra_fields, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/chat-completion-events/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.search_chat_completion_events_request, + False, + False, + "json", + models.SearchChatCompletionEventsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_events_v1_observability_chat_completion_events_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.SearchChatCompletionEventsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def search_async( + self, + *, + search_params: Union[models.FilterPayload, models.FilterPayloadTypedDict], + page_size: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + extra_fields: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchChatCompletionEventsResponse: + r"""Get Chat Completion Events + + :param search_params: + :param page_size: + :param cursor: + :param extra_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest( + page_size=page_size, + cursor=cursor, + search_chat_completion_events_request=models.SearchChatCompletionEventsRequest( + search_params=utils.get_pydantic_model( + search_params, models.FilterPayload + ), + extra_fields=extra_fields, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/chat-completion-events/search", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.search_chat_completion_events_request, + False, + False, + "json", + models.SearchChatCompletionEventsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_events_v1_observability_chat_completion_events_search_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.SearchChatCompletionEventsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def search_ids( + self, + *, + search_params: Union[models.FilterPayload, models.FilterPayloadTypedDict], + extra_fields: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchChatCompletionEventIdsResponse: + r"""Alternative to /search that returns only the IDs and that can return many IDs at once + + :param search_params: + :param extra_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchChatCompletionEventIdsRequest( + search_params=utils.get_pydantic_model(search_params, models.FilterPayload), + extra_fields=extra_fields, + ) + + req = self._build_request( + method="POST", + path="/v1/observability/chat-completion-events/search-ids", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + False, + "json", + models.SearchChatCompletionEventIdsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_event_ids_v1_observability_chat_completion_events_search_ids_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.SearchChatCompletionEventIdsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def search_ids_async( + self, + *, + search_params: Union[models.FilterPayload, models.FilterPayloadTypedDict], + extra_fields: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchChatCompletionEventIdsResponse: + r"""Alternative to /search that returns only the IDs and that can return many IDs at once + + :param search_params: + :param extra_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SearchChatCompletionEventIdsRequest( + search_params=utils.get_pydantic_model(search_params, models.FilterPayload), + extra_fields=extra_fields, + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/chat-completion-events/search-ids", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + False, + "json", + models.SearchChatCompletionEventIdsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_event_ids_v1_observability_chat_completion_events_search_ids_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.SearchChatCompletionEventIdsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch( + self, + *, + event_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ChatCompletionEvent: + r"""Get Chat Completion Event + + :param event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequest( + event_id=event_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/chat-completion-events/{event_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_event_v1_observability_chat_completion_events__event_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ChatCompletionEvent, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_async( + self, + *, + event_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ChatCompletionEvent: + r"""Get Chat Completion Event + + :param event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequest( + event_id=event_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/chat-completion-events/{event_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_event_v1_observability_chat_completion_events__event_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ChatCompletionEvent, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_similar_events( + self, + *, + event_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchChatCompletionEventsResponse: + r"""Get Similar Chat Completion Events + + :param event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest( + event_id=event_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/chat-completion-events/{event_id}/similar-events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_similar_chat_completion_events_v1_observability_chat_completion_events__event_id__similar_events_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.SearchChatCompletionEventsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_similar_events_async( + self, + *, + event_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchChatCompletionEventsResponse: + r"""Get Similar Chat Completion Events + + :param event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest( + event_id=event_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/chat-completion-events/{event_id}/similar-events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_similar_chat_completion_events_v1_observability_chat_completion_events__event_id__similar_events_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.SearchChatCompletionEventsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def judge( + self, + *, + event_id: str, + judge_definition: Union[ + models.CreateJudgeRequest, models.CreateJudgeRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.JudgeOutput: + r"""Run Judge on an event based on the given options + + :param event_id: + :param judge_definition: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest( + event_id=event_id, + judge_chat_completion_event_request=models.JudgeChatCompletionEventRequest( + judge_definition=utils.get_pydantic_model( + judge_definition, models.CreateJudgeRequest + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/chat-completion-events/{event_id}/live-judging", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.judge_chat_completion_event_request, + False, + False, + "json", + models.JudgeChatCompletionEventRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="judge_chat_completion_event_v1_observability_chat_completion_events__event_id__live_judging_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.JudgeOutput, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def judge_async( + self, + *, + event_id: str, + judge_definition: Union[ + models.CreateJudgeRequest, models.CreateJudgeRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.JudgeOutput: + r"""Run Judge on an event based on the given options + + :param event_id: + :param judge_definition: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest( + event_id=event_id, + judge_chat_completion_event_request=models.JudgeChatCompletionEventRequest( + judge_definition=utils.get_pydantic_model( + judge_definition, models.CreateJudgeRequest + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/chat-completion-events/{event_id}/live-judging", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.judge_chat_completion_event_request, + False, + False, + "json", + models.JudgeChatCompletionEventRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="judge_chat_completion_event_v1_observability_chat_completion_events__event_id__live_judging_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.JudgeOutput, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py new file mode 100644 index 00000000..37e01833 --- /dev/null +++ b/src/mistralai/client/connectors.py @@ -0,0 +1,1292 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 39da03126050 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, Mapping, Optional, Union + + +class Connectors(BaseSDK): + r"""(beta) Connectors API - manage your connectors""" + + def create( + self, + *, + name: str, + description: str, + server: str, + icon_url: OptionalNullable[str] = UNSET, + visibility: Optional[models.ResourceVisibility] = None, + headers: OptionalNullable[Dict[str, Any]] = UNSET, + auth_data: OptionalNullable[ + Union[models.AuthData, models.AuthDataTypedDict] + ] = UNSET, + system_prompt: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Connector: + r"""Create a new connector. + + Create a new MCP connector. You can customize its visibility, url and auth type. + + :param name: The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. + :param description: The description of the connector. + :param server: The url of the MCP server. + :param icon_url: The optional url of the icon you want to associate to the connector. + :param visibility: + :param headers: Optional organization-level headers to be sent with the request to the mcp server. + :param auth_data: Optional additional authentication data for the connector. + :param system_prompt: Optional system prompt for the connector. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateConnectorRequest( + name=name, + description=description, + icon_url=icon_url, + visibility=visibility, + server=server, + headers=headers, + auth_data=utils.get_pydantic_model( + auth_data, OptionalNullable[models.AuthData] + ), + system_prompt=system_prompt, + ) + + req = self._build_request( + method="POST", + path="/v1/connectors", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateConnectorRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Connector, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_async( + self, + *, + name: str, + description: str, + server: str, + icon_url: OptionalNullable[str] = UNSET, + visibility: Optional[models.ResourceVisibility] = None, + headers: OptionalNullable[Dict[str, Any]] = UNSET, + auth_data: OptionalNullable[ + Union[models.AuthData, models.AuthDataTypedDict] + ] = UNSET, + system_prompt: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Connector: + r"""Create a new connector. + + Create a new MCP connector. You can customize its visibility, url and auth type. + + :param name: The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. + :param description: The description of the connector. + :param server: The url of the MCP server. + :param icon_url: The optional url of the icon you want to associate to the connector. + :param visibility: + :param headers: Optional organization-level headers to be sent with the request to the mcp server. + :param auth_data: Optional additional authentication data for the connector. + :param system_prompt: Optional system prompt for the connector. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateConnectorRequest( + name=name, + description=description, + icon_url=icon_url, + visibility=visibility, + server=server, + headers=headers, + auth_data=utils.get_pydantic_model( + auth_data, OptionalNullable[models.AuthData] + ), + system_prompt=system_prompt, + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateConnectorRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Connector, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list( + self, + *, + query_filters: Optional[ + Union[models.ConnectorsQueryFilters, models.ConnectorsQueryFiltersTypedDict] + ] = None, + cursor: OptionalNullable[str] = UNSET, + page_size: Optional[int] = 100, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PaginatedConnectors: + r"""List all connectors. + + List all your custom connectors with keyset pagination and filters. + + :param query_filters: + :param cursor: + :param page_size: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListV1Request( + query_filters=utils.get_pydantic_model( + query_filters, Optional[models.ConnectorsQueryFilters] + ), + cursor=cursor, + page_size=page_size, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PaginatedConnectors, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + query_filters: Optional[ + Union[models.ConnectorsQueryFilters, models.ConnectorsQueryFiltersTypedDict] + ] = None, + cursor: OptionalNullable[str] = UNSET, + page_size: Optional[int] = 100, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PaginatedConnectors: + r"""List all connectors. + + List all your custom connectors with keyset pagination and filters. + + :param query_filters: + :param cursor: + :param page_size: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListV1Request( + query_filters=utils.get_pydantic_model( + query_filters, Optional[models.ConnectorsQueryFilters] + ), + cursor=cursor, + page_size=page_size, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.PaginatedConnectors, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def call_tool( + self, + *, + tool_name: str, + connector_id_or_name: str, + arguments: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ConnectorToolCallResponse: + r"""Call Connector Tool + + Call a tool on an MCP connector. + + :param tool_name: + :param connector_id_or_name: + :param arguments: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCallToolV1Request( + tool_name=tool_name, + connector_id_or_name=connector_id_or_name, + connector_call_tool_request=models.ConnectorCallToolRequest( + arguments=arguments, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id_or_name}/tools/{tool_name}/call", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.connector_call_tool_request, + False, + False, + "json", + models.ConnectorCallToolRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_call_tool_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ConnectorToolCallResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def call_tool_async( + self, + *, + tool_name: str, + connector_id_or_name: str, + arguments: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ConnectorToolCallResponse: + r"""Call Connector Tool + + Call a tool on an MCP connector. + + :param tool_name: + :param connector_id_or_name: + :param arguments: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCallToolV1Request( + tool_name=tool_name, + connector_id_or_name=connector_id_or_name, + connector_call_tool_request=models.ConnectorCallToolRequest( + arguments=arguments, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id_or_name}/tools/{tool_name}/call", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.connector_call_tool_request, + False, + False, + "json", + models.ConnectorCallToolRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_call_tool_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ConnectorToolCallResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get( + self, + *, + connector_id_or_name: str, + fetch_customer_data: Optional[bool] = False, + fetch_connection_secrets: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Connector: + r"""Get a connector. + + Get a connector by its ID or name. + + :param connector_id_or_name: + :param fetch_customer_data: Fetch the customer data associated with the connector (e.g. customer secrets / config). + :param fetch_connection_secrets: Fetch the general connection secrets associated with the connector. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetV1Request( + fetch_customer_data=fetch_customer_data, + fetch_connection_secrets=fetch_connection_secrets, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}#idOrName", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Connector, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_async( + self, + *, + connector_id_or_name: str, + fetch_customer_data: Optional[bool] = False, + fetch_connection_secrets: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Connector: + r"""Get a connector. + + Get a connector by its ID or name. + + :param connector_id_or_name: + :param fetch_customer_data: Fetch the customer data associated with the connector (e.g. customer secrets / config). + :param fetch_connection_secrets: Fetch the general connection secrets associated with the connector. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetV1Request( + fetch_customer_data=fetch_customer_data, + fetch_connection_secrets=fetch_connection_secrets, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}#idOrName", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Connector, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update( + self, + *, + connector_id: str, + name: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + icon_url: OptionalNullable[str] = UNSET, + system_prompt: OptionalNullable[str] = UNSET, + connection_config: OptionalNullable[Dict[str, Any]] = UNSET, + connection_secrets: OptionalNullable[Dict[str, Any]] = UNSET, + server: OptionalNullable[str] = UNSET, + headers: OptionalNullable[Dict[str, Any]] = UNSET, + auth_data: OptionalNullable[ + Union[models.AuthData, models.AuthDataTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Connector: + r"""Update a connector. + + Update a connector by its ID. + + :param connector_id: + :param name: The name of the connector. + :param description: The description of the connector. + :param icon_url: The optional url of the icon you want to associate to the connector. + :param system_prompt: Optional system prompt for the connector. + :param connection_config: Optional new connection config. + :param connection_secrets: Optional new connection secrets + :param server: New server url for your mcp connector. + :param headers: New headers for your mcp connector. + :param auth_data: New authentication data for your mcp connector. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorUpdateV1Request( + connector_id=connector_id, + update_connector_request=models.UpdateConnectorRequest( + name=name, + description=description, + icon_url=icon_url, + system_prompt=system_prompt, + connection_config=connection_config, + connection_secrets=connection_secrets, + server=server, + headers=headers, + auth_data=utils.get_pydantic_model( + auth_data, OptionalNullable[models.AuthData] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/connectors/{connector_id}#id", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_connector_request, + False, + False, + "json", + models.UpdateConnectorRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_update_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Connector, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + connector_id: str, + name: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + icon_url: OptionalNullable[str] = UNSET, + system_prompt: OptionalNullable[str] = UNSET, + connection_config: OptionalNullable[Dict[str, Any]] = UNSET, + connection_secrets: OptionalNullable[Dict[str, Any]] = UNSET, + server: OptionalNullable[str] = UNSET, + headers: OptionalNullable[Dict[str, Any]] = UNSET, + auth_data: OptionalNullable[ + Union[models.AuthData, models.AuthDataTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Connector: + r"""Update a connector. + + Update a connector by its ID. + + :param connector_id: + :param name: The name of the connector. + :param description: The description of the connector. + :param icon_url: The optional url of the icon you want to associate to the connector. + :param system_prompt: Optional system prompt for the connector. + :param connection_config: Optional new connection config. + :param connection_secrets: Optional new connection secrets + :param server: New server url for your mcp connector. + :param headers: New headers for your mcp connector. + :param auth_data: New authentication data for your mcp connector. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorUpdateV1Request( + connector_id=connector_id, + update_connector_request=models.UpdateConnectorRequest( + name=name, + description=description, + icon_url=icon_url, + system_prompt=system_prompt, + connection_config=connection_config, + connection_secrets=connection_secrets, + server=server, + headers=headers, + auth_data=utils.get_pydantic_model( + auth_data, OptionalNullable[models.AuthData] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/connectors/{connector_id}#id", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_connector_request, + False, + False, + "json", + models.UpdateConnectorRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_update_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Connector, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete a connector. + + Delete a connector by its ID. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteV1Request( + connector_id=connector_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/connectors/{connector_id}#id", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete a connector. + + Delete a connector by its ID. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteV1Request( + connector_id=connector_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/connectors/{connector_id}#id", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index ec33b1fb..a4af31f3 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -244,6 +244,9 @@ def start( completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, @@ -271,6 +274,7 @@ def start( :param instructions: :param tools: List of tools which are available to the model during the conversation. :param completion_args: + :param guardrails: :param name: :param description: :param metadata: @@ -304,6 +308,9 @@ def start( completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), name=name, description=description, metadata=metadata, @@ -391,6 +398,9 @@ async def start_async( completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, @@ -418,6 +428,7 @@ async def start_async( :param instructions: :param tools: List of tools which are available to the model during the conversation. :param completion_args: + :param guardrails: :param name: :param description: :param metadata: @@ -451,6 +462,9 @@ async def start_async( completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), name=name, description=description, metadata=metadata, @@ -1721,6 +1735,9 @@ def restart( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ @@ -1744,6 +1761,7 @@ def restart( :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API + :param guardrails: :param metadata: Custom metadata for the conversation. :param agent_version: Specific version of the agent to use when restarting. If not provided, uses the current version. :param retries: Override the default retry configuration for this method @@ -1773,6 +1791,9 @@ def restart( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, @@ -1859,6 +1880,9 @@ async def restart_async( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ @@ -1882,6 +1906,7 @@ async def restart_async( :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API + :param guardrails: :param metadata: Custom metadata for the conversation. :param agent_version: Specific version of the agent to use when restarting. If not provided, uses the current version. :param retries: Override the default retry configuration for this method @@ -1911,6 +1936,9 @@ async def restart_async( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, @@ -2000,6 +2028,9 @@ def start_stream( completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, @@ -2027,6 +2058,7 @@ def start_stream( :param instructions: :param tools: List of tools which are available to the model during the conversation. :param completion_args: + :param guardrails: :param name: :param description: :param metadata: @@ -2060,6 +2092,9 @@ def start_stream( completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), name=name, description=description, metadata=metadata, @@ -2154,6 +2189,9 @@ async def start_stream_async( completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, @@ -2181,6 +2219,7 @@ async def start_stream_async( :param instructions: :param tools: List of tools which are available to the model during the conversation. :param completion_args: + :param guardrails: :param name: :param description: :param metadata: @@ -2214,6 +2253,9 @@ async def start_stream_async( completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), name=name, description=description, metadata=metadata, @@ -2589,6 +2631,9 @@ def restart_stream( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ @@ -2612,6 +2657,7 @@ def restart_stream( :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API + :param guardrails: :param metadata: Custom metadata for the conversation. :param agent_version: Specific version of the agent to use when restarting. If not provided, uses the current version. :param retries: Override the default retry configuration for this method @@ -2641,6 +2687,9 @@ def restart_stream( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, @@ -2734,6 +2783,9 @@ async def restart_stream_async( completion_args: Optional[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = None, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ @@ -2757,6 +2809,7 @@ async def restart_stream_async( :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API + :param guardrails: :param metadata: Custom metadata for the conversation. :param agent_version: Specific version of the agent to use when restarting. If not provided, uses the current version. :param retries: Override the default retry configuration for this method @@ -2786,6 +2839,9 @@ async def restart_stream_async( completion_args=utils.get_pydantic_model( completion_args, Optional[models.CompletionArgs] ), + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, diff --git a/src/mistralai/client/datasets.py b/src/mistralai/client/datasets.py new file mode 100644 index 00000000..48ecbdd8 --- /dev/null +++ b/src/mistralai/client/datasets.py @@ -0,0 +1,2972 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e5a6ae2a2d85 + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.records import Records +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, List, Mapping, Optional, Union + + +class Datasets(BaseSDK): + records: Records + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.records = Records(self.sdk_configuration, parent_ref=self.parent_ref) + + def create( + self, + *, + name: str, + description: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Dataset: + r"""Create a new empty dataset + + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateDatasetRequest( + name=name, + description=description, + ) + + req = self._build_request( + method="POST", + path="/v1/observability/datasets", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateDatasetRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_dataset_v1_observability_datasets_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Dataset, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_async( + self, + *, + name: str, + description: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Dataset: + r"""Create a new empty dataset + + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateDatasetRequest( + name=name, + description=description, + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/datasets", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateDatasetRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_dataset_v1_observability_datasets_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Dataset, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list( + self, + *, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + q: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDatasetsResponse: + r"""List existing datasets + + :param page_size: + :param page: + :param q: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetsV1ObservabilityDatasetsGetRequest( + page_size=page_size, + page=page, + q=q, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/datasets", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_datasets_v1_observability_datasets_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListDatasetsResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + q: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDatasetsResponse: + r"""List existing datasets + + :param page_size: + :param page: + :param q: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetsV1ObservabilityDatasetsGetRequest( + page_size=page_size, + page=page, + q=q, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/datasets", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_datasets_v1_observability_datasets_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListDatasetsResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch( + self, + *, + dataset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetPreview: + r"""Get dataset by id + + :param dataset_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequest( + dataset_id=dataset_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/datasets/{dataset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_by_id_v1_observability_datasets__dataset_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetPreview, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_async( + self, + *, + dataset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetPreview: + r"""Get dataset by id + + :param dataset_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequest( + dataset_id=dataset_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/datasets/{dataset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_by_id_v1_observability_datasets__dataset_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetPreview, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete( + self, + *, + dataset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a dataset + + :param dataset_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequest( + dataset_id=dataset_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/observability/datasets/{dataset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_dataset_v1_observability_datasets__dataset_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + dataset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a dataset + + :param dataset_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequest( + dataset_id=dataset_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/observability/datasets/{dataset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_dataset_v1_observability_datasets__dataset_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update( + self, + *, + dataset_id: str, + name: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetPreview: + r"""Patch dataset + + :param dataset_id: + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest( + dataset_id=dataset_id, + update_dataset_request=models.UpdateDatasetRequest( + name=name, + description=description, + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/observability/datasets/{dataset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_dataset_request, + False, + False, + "json", + models.UpdateDatasetRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_dataset_v1_observability_datasets__dataset_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetPreview, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + dataset_id: str, + name: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetPreview: + r"""Patch dataset + + :param dataset_id: + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest( + dataset_id=dataset_id, + update_dataset_request=models.UpdateDatasetRequest( + name=name, + description=description, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/observability/datasets/{dataset_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_dataset_request, + False, + False, + "json", + models.UpdateDatasetRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_dataset_v1_observability_datasets__dataset_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetPreview, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_records( + self, + *, + dataset_id: str, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDatasetRecordsResponse: + r"""List existing records in the dataset + + :param dataset_id: + :param page_size: + :param page: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequest( + dataset_id=dataset_id, + page_size=page_size, + page=page, + ) + ) + + req = self._build_request( + method="GET", + path="/v1/observability/datasets/{dataset_id}/records", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_records_v1_observability_datasets__dataset_id__records_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListDatasetRecordsResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_records_async( + self, + *, + dataset_id: str, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDatasetRecordsResponse: + r"""List existing records in the dataset + + :param dataset_id: + :param page_size: + :param page: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequest( + dataset_id=dataset_id, + page_size=page_size, + page=page, + ) + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/datasets/{dataset_id}/records", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_records_v1_observability_datasets__dataset_id__records_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListDatasetRecordsResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create_record( + self, + *, + dataset_id: str, + payload: Union[models.ConversationPayload, models.ConversationPayloadTypedDict], + properties: Dict[str, Any], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetRecord: + r"""Add a conversation to the dataset + + :param dataset_id: + :param payload: + :param properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest( + dataset_id=dataset_id, + create_dataset_record_request=models.CreateDatasetRecordRequest( + payload=utils.get_pydantic_model(payload, models.ConversationPayload), + properties=properties, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/datasets/{dataset_id}/records", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_dataset_record_request, + False, + False, + "json", + models.CreateDatasetRecordRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_dataset_record_v1_observability_datasets__dataset_id__records_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.DatasetRecord, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_record_async( + self, + *, + dataset_id: str, + payload: Union[models.ConversationPayload, models.ConversationPayloadTypedDict], + properties: Dict[str, Any], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetRecord: + r"""Add a conversation to the dataset + + :param dataset_id: + :param payload: + :param properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest( + dataset_id=dataset_id, + create_dataset_record_request=models.CreateDatasetRecordRequest( + payload=utils.get_pydantic_model(payload, models.ConversationPayload), + properties=properties, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/datasets/{dataset_id}/records", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.create_dataset_record_request, + False, + False, + "json", + models.CreateDatasetRecordRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_dataset_record_v1_observability_datasets__dataset_id__records_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.DatasetRecord, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def import_from_campaign( + self, + *, + dataset_id: str, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with a campaign + + :param dataset_id: + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest( + dataset_id=dataset_id, + import_dataset_from_campaign_request=models.ImportDatasetFromCampaignRequest( + campaign_id=campaign_id, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-campaign", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_campaign_request, + False, + False, + "json", + models.ImportDatasetFromCampaignRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_campaign_v1_observability_datasets__dataset_id__imports_from_campaign_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def import_from_campaign_async( + self, + *, + dataset_id: str, + campaign_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with a campaign + + :param dataset_id: + :param campaign_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest( + dataset_id=dataset_id, + import_dataset_from_campaign_request=models.ImportDatasetFromCampaignRequest( + campaign_id=campaign_id, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-campaign", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_campaign_request, + False, + False, + "json", + models.ImportDatasetFromCampaignRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_campaign_v1_observability_datasets__dataset_id__imports_from_campaign_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def import_from_explorer( + self, + *, + dataset_id: str, + completion_event_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from the explorer + + :param dataset_id: + :param completion_event_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequest( + dataset_id=dataset_id, + import_dataset_from_explorer_request=models.ImportDatasetFromExplorerRequest( + completion_event_ids=completion_event_ids, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-explorer", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_explorer_request, + False, + False, + "json", + models.ImportDatasetFromExplorerRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_explorer_v1_observability_datasets__dataset_id__imports_from_explorer_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def import_from_explorer_async( + self, + *, + dataset_id: str, + completion_event_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from the explorer + + :param dataset_id: + :param completion_event_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequest( + dataset_id=dataset_id, + import_dataset_from_explorer_request=models.ImportDatasetFromExplorerRequest( + completion_event_ids=completion_event_ids, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-explorer", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_explorer_request, + False, + False, + "json", + models.ImportDatasetFromExplorerRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_explorer_v1_observability_datasets__dataset_id__imports_from_explorer_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def import_from_file( + self, + *, + dataset_id: str, + file_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from an uploaded file + + :param dataset_id: + :param file_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest( + dataset_id=dataset_id, + import_dataset_from_file_request=models.ImportDatasetFromFileRequest( + file_id=file_id, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-file", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_file_request, + False, + False, + "json", + models.ImportDatasetFromFileRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def import_from_file_async( + self, + *, + dataset_id: str, + file_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from an uploaded file + + :param dataset_id: + :param file_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest( + dataset_id=dataset_id, + import_dataset_from_file_request=models.ImportDatasetFromFileRequest( + file_id=file_id, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-file", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_file_request, + False, + False, + "json", + models.ImportDatasetFromFileRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_file_v1_observability_datasets__dataset_id__imports_from_file_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def import_from_playground( + self, + *, + dataset_id: str, + conversation_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from the playground + + :param dataset_id: + :param conversation_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest( + dataset_id=dataset_id, + import_dataset_from_playground_request=models.ImportDatasetFromPlaygroundRequest( + conversation_ids=conversation_ids, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-playground", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_playground_request, + False, + False, + "json", + models.ImportDatasetFromPlaygroundRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_playground_v1_observability_datasets__dataset_id__imports_from_playground_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def import_from_playground_async( + self, + *, + dataset_id: str, + conversation_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from the playground + + :param dataset_id: + :param conversation_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest( + dataset_id=dataset_id, + import_dataset_from_playground_request=models.ImportDatasetFromPlaygroundRequest( + conversation_ids=conversation_ids, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-playground", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_playground_request, + False, + False, + "json", + models.ImportDatasetFromPlaygroundRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_playground_v1_observability_datasets__dataset_id__imports_from_playground_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def import_from_dataset_records( + self, + *, + dataset_id: str, + dataset_record_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from another dataset + + :param dataset_id: + :param dataset_record_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest( + dataset_id=dataset_id, + import_dataset_from_dataset_request=models.ImportDatasetFromDatasetRequest( + dataset_record_ids=dataset_record_ids, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-dataset", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_dataset_request, + False, + False, + "json", + models.ImportDatasetFromDatasetRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_dataset_v1_observability_datasets__dataset_id__imports_from_dataset_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def import_from_dataset_records_async( + self, + *, + dataset_id: str, + dataset_record_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Populate the dataset with samples from another dataset + + :param dataset_id: + :param dataset_record_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest( + dataset_id=dataset_id, + import_dataset_from_dataset_request=models.ImportDatasetFromDatasetRequest( + dataset_record_ids=dataset_record_ids, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/datasets/{dataset_id}/imports/from-dataset", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.import_dataset_from_dataset_request, + False, + False, + "json", + models.ImportDatasetFromDatasetRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="post_dataset_records_from_dataset_v1_observability_datasets__dataset_id__imports_from_dataset_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def export_to_jsonl( + self, + *, + dataset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ExportDatasetResponse: + r"""Export to the Files API and retrieve presigned URL to download the resulting JSONL file + + :param dataset_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest( + dataset_id=dataset_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/datasets/{dataset_id}/exports/to-jsonl", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="export_dataset_to_jsonl_v1_observability_datasets__dataset_id__exports_to_jsonl_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ExportDatasetResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def export_to_jsonl_async( + self, + *, + dataset_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ExportDatasetResponse: + r"""Export to the Files API and retrieve presigned URL to download the resulting JSONL file + + :param dataset_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest( + dataset_id=dataset_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/datasets/{dataset_id}/exports/to-jsonl", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="export_dataset_to_jsonl_v1_observability_datasets__dataset_id__exports_to_jsonl_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ExportDatasetResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_task( + self, + *, + dataset_id: str, + task_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Get status of a dataset import task + + :param dataset_id: + :param task_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequest( + dataset_id=dataset_id, + task_id=task_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/datasets/{dataset_id}/tasks/{task_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_import_task_v1_observability_datasets__dataset_id__tasks__task_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_task_async( + self, + *, + dataset_id: str, + task_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetImportTask: + r"""Get status of a dataset import task + + :param dataset_id: + :param task_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequest( + dataset_id=dataset_id, + task_id=task_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/datasets/{dataset_id}/tasks/{task_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_import_task_v1_observability_datasets__dataset_id__tasks__task_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetImportTask, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_tasks( + self, + *, + dataset_id: str, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDatasetImportTasksResponse: + r"""List import tasks for the given dataset + + :param dataset_id: + :param page_size: + :param page: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequest( + dataset_id=dataset_id, + page_size=page_size, + page=page, + ) + ) + + req = self._build_request( + method="GET", + path="/v1/observability/datasets/{dataset_id}/tasks", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_import_tasks_v1_observability_datasets__dataset_id__tasks_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ListDatasetImportTasksResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_tasks_async( + self, + *, + dataset_id: str, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListDatasetImportTasksResponse: + r"""List import tasks for the given dataset + + :param dataset_id: + :param page_size: + :param page: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequest( + dataset_id=dataset_id, + page_size=page_size, + page=page, + ) + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/datasets/{dataset_id}/tasks", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_import_tasks_v1_observability_datasets__dataset_id__tasks_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ListDatasetImportTasksResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/documents.py b/src/mistralai/client/documents.py index b3130364..95ea4323 100644 --- a/src/mistralai/client/documents.py +++ b/src/mistralai/client/documents.py @@ -1228,7 +1228,7 @@ def status( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ProcessingStatusOut: + ) -> models.ProcessingStatus: r"""Retrieve the processing status of a specific document. Given a library and a document in that library, retrieve the processing status of that document. @@ -1297,7 +1297,7 @@ def status( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ProcessingStatusOut, http_res) + return unmarshal_json_response(models.ProcessingStatus, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -1321,7 +1321,7 @@ async def status_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ProcessingStatusOut: + ) -> models.ProcessingStatus: r"""Retrieve the processing status of a specific document. Given a library and a document in that library, retrieve the processing status of that document. @@ -1390,7 +1390,7 @@ async def status_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.ProcessingStatusOut, http_res) + return unmarshal_json_response(models.ProcessingStatus, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res diff --git a/src/mistralai/client/errors/__init__.py b/src/mistralai/client/errors/__init__.py index 58a591a1..f6fd99a0 100644 --- a/src/mistralai/client/errors/__init__.py +++ b/src/mistralai/client/errors/__init__.py @@ -9,6 +9,7 @@ if TYPE_CHECKING: from .httpvalidationerror import HTTPValidationError, HTTPValidationErrorData from .no_response_error import NoResponseError + from .observabilityerror import ObservabilityError, ObservabilityErrorData from .responsevalidationerror import ResponseValidationError from .sdkerror import SDKError @@ -17,6 +18,8 @@ "HTTPValidationErrorData", "MistralError", "NoResponseError", + "ObservabilityError", + "ObservabilityErrorData", "ResponseValidationError", "SDKError", ] @@ -25,6 +28,8 @@ "HTTPValidationError": ".httpvalidationerror", "HTTPValidationErrorData": ".httpvalidationerror", "NoResponseError": ".no_response_error", + "ObservabilityError": ".observabilityerror", + "ObservabilityErrorData": ".observabilityerror", "ResponseValidationError": ".responsevalidationerror", "SDKError": ".sdkerror", } diff --git a/src/mistralai/client/errors/observabilityerror.py b/src/mistralai/client/errors/observabilityerror.py new file mode 100644 index 00000000..a360bac4 --- /dev/null +++ b/src/mistralai/client/errors/observabilityerror.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4946ae06717e + +from __future__ import annotations +from dataclasses import dataclass, field +import httpx +from mistralai.client.errors import MistralError +from mistralai.client.models import ( + observabilityerrordetail as models_observabilityerrordetail, +) +from mistralai.client.types import BaseModel +from typing import Optional + + +class ObservabilityErrorData(BaseModel): + detail: models_observabilityerrordetail.ObservabilityErrorDetail + + +@dataclass(unsafe_hash=True) +class ObservabilityError(MistralError): + data: ObservabilityErrorData = field(hash=False) + + def __init__( + self, + data: ObservabilityErrorData, + raw_response: httpx.Response, + body: Optional[str] = None, + ): + fallback = body or raw_response.text + message = str(data.detail.message) or fallback + super().__init__(message, raw_response, body) + object.__setattr__(self, "data", data) diff --git a/src/mistralai/client/fields.py b/src/mistralai/client/fields.py new file mode 100644 index 00000000..a5b8003c --- /dev/null +++ b/src/mistralai/client/fields.py @@ -0,0 +1,588 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 862335210b20 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union + + +class Fields(BaseSDK): + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListChatCompletionFieldsResponse: + r"""Get Chat Completion Fields + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/observability/chat-completion-fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_fields_v1_observability_chat_completion_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ListChatCompletionFieldsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListChatCompletionFieldsResponse: + r"""Get Chat Completion Fields + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/observability/chat-completion-fields", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_fields_v1_observability_chat_completion_fields_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ListChatCompletionFieldsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_options( + self, + *, + field_name: str, + operator: models.Operator, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.FetchChatCompletionFieldOptionsResponse: + r"""Get Chat Completion Field Options + + :param field_name: + :param operator: The operator to use for filtering options + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest( + field_name=field_name, + operator=operator, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/chat-completion-fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_field_options_v1_observability_chat_completion_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.FetchChatCompletionFieldOptionsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_options_async( + self, + *, + field_name: str, + operator: models.Operator, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.FetchChatCompletionFieldOptionsResponse: + r"""Get Chat Completion Field Options + + :param field_name: + :param operator: The operator to use for filtering options + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest( + field_name=field_name, + operator=operator, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/chat-completion-fields/{field_name}/options", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_field_options_v1_observability_chat_completion_fields__field_name__options_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.FetchChatCompletionFieldOptionsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch_option_counts( + self, + *, + field_name: str, + filter_params: OptionalNullable[ + Union[models.FilterPayload, models.FilterPayloadTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.FetchFieldOptionCountsResponse: + r"""Get Chat Completion Field Options Counts + + :param field_name: + :param filter_params: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest( + field_name=field_name, + fetch_field_option_counts_request=models.FetchFieldOptionCountsRequest( + filter_params=utils.get_pydantic_model( + filter_params, OptionalNullable[models.FilterPayload] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/chat-completion-fields/{field_name}/options-counts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.fetch_field_option_counts_request, + False, + False, + "json", + models.FetchFieldOptionCountsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_field_options_counts_v1_observability_chat_completion_fields__field_name__options_counts_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.FetchFieldOptionCountsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_option_counts_async( + self, + *, + field_name: str, + filter_params: OptionalNullable[ + Union[models.FilterPayload, models.FilterPayloadTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.FetchFieldOptionCountsResponse: + r"""Get Chat Completion Field Options Counts + + :param field_name: + :param filter_params: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest( + field_name=field_name, + fetch_field_option_counts_request=models.FetchFieldOptionCountsRequest( + filter_params=utils.get_pydantic_model( + filter_params, OptionalNullable[models.FilterPayload] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/chat-completion-fields/{field_name}/options-counts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.fetch_field_option_counts_request, + False, + False, + "json", + models.FetchFieldOptionCountsRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_chat_completion_field_options_counts_v1_observability_chat_completion_fields__field_name__options_counts_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.FetchFieldOptionCountsResponse, http_res + ) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/files.py b/src/mistralai/client/files.py index a5f3adf6..a843cb7b 100644 --- a/src/mistralai/client/files.py +++ b/src/mistralai/client/files.py @@ -18,6 +18,10 @@ def upload( self, *, file: Union[models.File, models.FileTypedDict], + expiry: OptionalNullable[int] = UNSET, + visibility: Optional[ + models.FilesAPIRoutesUploadFileFileVisibility + ] = "workspace", purpose: Optional[models.FilePurpose] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -41,6 +45,8 @@ def upload( ```bash file=@path/to/your/file.jsonl ``` + :param expiry: + :param visibility: :param purpose: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -58,6 +64,8 @@ def upload( base_url = self._get_url(base_url, url_variables) request = models.MultiPartBodyParams( + expiry=expiry, + visibility=visibility, purpose=purpose, file=utils.get_pydantic_model(file, models.File), ) @@ -120,6 +128,10 @@ async def upload_async( self, *, file: Union[models.File, models.FileTypedDict], + expiry: OptionalNullable[int] = UNSET, + visibility: Optional[ + models.FilesAPIRoutesUploadFileFileVisibility + ] = "workspace", purpose: Optional[models.FilePurpose] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -143,6 +155,8 @@ async def upload_async( ```bash file=@path/to/your/file.jsonl ``` + :param expiry: + :param visibility: :param purpose: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -160,6 +174,8 @@ async def upload_async( base_url = self._get_url(base_url, url_variables) request = models.MultiPartBodyParams( + expiry=expiry, + visibility=visibility, purpose=purpose, file=utils.get_pydantic_model(file, models.File), ) diff --git a/src/mistralai/client/judges.py b/src/mistralai/client/judges.py new file mode 100644 index 00000000..e5dacd7f --- /dev/null +++ b/src/mistralai/client/judges.py @@ -0,0 +1,1038 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b6024a41ecb4 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional, Union + + +class Judges(BaseSDK): + def create( + self, + *, + name: str, + description: str, + model_name: str, + output: Union[ + models.CreateJudgeRequestOutput, models.CreateJudgeRequestOutputTypedDict + ], + instructions: str, + tools: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Judge: + r"""Create a new judge + + :param name: + :param description: + :param model_name: + :param output: + :param instructions: + :param tools: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateJudgeRequest( + name=name, + description=description, + model_name=model_name, + output=utils.get_pydantic_model(output, models.CreateJudgeRequestOutput), + instructions=instructions, + tools=tools, + ) + + req = self._build_request( + method="POST", + path="/v1/observability/judges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateJudgeRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_judge_v1_observability_judges_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Judge, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_async( + self, + *, + name: str, + description: str, + model_name: str, + output: Union[ + models.CreateJudgeRequestOutput, models.CreateJudgeRequestOutputTypedDict + ], + instructions: str, + tools: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Judge: + r"""Create a new judge + + :param name: + :param description: + :param model_name: + :param output: + :param instructions: + :param tools: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateJudgeRequest( + name=name, + description=description, + model_name=model_name, + output=utils.get_pydantic_model(output, models.CreateJudgeRequestOutput), + instructions=instructions, + tools=tools, + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/judges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateJudgeRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_judge_v1_observability_judges_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.Judge, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list( + self, + *, + type_filter: OptionalNullable[List[models.JudgeOutputType]] = UNSET, + model_filter: OptionalNullable[List[str]] = UNSET, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + q: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListJudgesResponse: + r"""Get judges with optional filtering and search + + :param type_filter: Filter by judge output types + :param model_filter: Filter by model names + :param page_size: + :param page: + :param q: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetJudgesV1ObservabilityJudgesGetRequest( + type_filter=type_filter, + model_filter=model_filter, + page_size=page_size, + page=page, + q=q, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/judges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_judges_v1_observability_judges_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListJudgesResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + type_filter: OptionalNullable[List[models.JudgeOutputType]] = UNSET, + model_filter: OptionalNullable[List[str]] = UNSET, + page_size: Optional[int] = 50, + page: Optional[int] = 1, + q: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListJudgesResponse: + r"""Get judges with optional filtering and search + + :param type_filter: Filter by judge output types + :param model_filter: Filter by model names + :param page_size: + :param page: + :param q: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetJudgesV1ObservabilityJudgesGetRequest( + type_filter=type_filter, + model_filter=model_filter, + page_size=page_size, + page=page, + q=q, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/judges", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_judges_v1_observability_judges_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListJudgesResponse, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def fetch( + self, + *, + judge_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Judge: + r"""Get judge by id + + :param judge_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest( + judge_id=judge_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/judges/{judge_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_judge_by_id_v1_observability_judges__judge_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Judge, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_async( + self, + *, + judge_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Judge: + r"""Get judge by id + + :param judge_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest( + judge_id=judge_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/judges/{judge_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_judge_by_id_v1_observability_judges__judge_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Judge, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete( + self, + *, + judge_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a judge + + :param judge_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequest( + judge_id=judge_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/observability/judges/{judge_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_judge_v1_observability_judges__judge_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + judge_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a judge + + :param judge_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequest( + judge_id=judge_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/observability/judges/{judge_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_judge_v1_observability_judges__judge_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update( + self, + *, + judge_id: str, + name: str, + description: str, + model_name: str, + output: Union[ + models.UpdateJudgeRequestOutput, models.UpdateJudgeRequestOutputTypedDict + ], + instructions: str, + tools: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Update a judge + + :param judge_id: + :param name: + :param description: + :param model_name: + :param output: + :param instructions: + :param tools: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest( + judge_id=judge_id, + update_judge_request=models.UpdateJudgeRequest( + name=name, + description=description, + model_name=model_name, + output=utils.get_pydantic_model( + output, models.UpdateJudgeRequestOutput + ), + instructions=instructions, + tools=tools, + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/observability/judges/{judge_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_judge_request, + False, + False, + "json", + models.UpdateJudgeRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_judge_v1_observability_judges__judge_id__put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + judge_id: str, + name: str, + description: str, + model_name: str, + output: Union[ + models.UpdateJudgeRequestOutput, models.UpdateJudgeRequestOutputTypedDict + ], + instructions: str, + tools: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Update a judge + + :param judge_id: + :param name: + :param description: + :param model_name: + :param output: + :param instructions: + :param tools: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest( + judge_id=judge_id, + update_judge_request=models.UpdateJudgeRequest( + name=name, + description=description, + model_name=model_name, + output=utils.get_pydantic_model( + output, models.UpdateJudgeRequestOutput + ), + instructions=instructions, + tools=tools, + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/observability/judges/{judge_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_judge_request, + False, + False, + "json", + models.UpdateJudgeRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_judge_v1_observability_judges__judge_id__put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 7d2dfd97..741c80f3 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -1,6 +1,14 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" # @generated-id: e0e8dad92725 +from .filtergroup import ( + And, + AndTypedDict, + FilterGroup, + FilterGroupTypedDict, + Or, + OrTypedDict, +) from typing import Any, TYPE_CHECKING from mistralai.client.utils.dynamic_imports import lazy_getattr, lazy_dir @@ -131,6 +139,7 @@ AgentsCompletionStreamRequestToolChoiceTypedDict, AgentsCompletionStreamRequestTypedDict, ) + from .annotations import Annotations, AnnotationsTypedDict, Audience from .apiendpoint import APIEndpoint from .archivemodelresponse import ( ArchiveModelResponse, @@ -143,6 +152,7 @@ AssistantMessageTypedDict, ) from .audiochunk import AudioChunk, AudioChunkTypedDict + from .audiocontent import AudioContent, AudioContentTypedDict from .audioencoding import AudioEncoding from .audioformat import AudioFormat, AudioFormatTypedDict from .audiotranscriptionrequest import ( @@ -153,12 +163,32 @@ AudioTranscriptionRequestStream, AudioTranscriptionRequestStreamTypedDict, ) + from .audiourl import AudioURL, AudioURLTypedDict + from .audiourlchunk import ( + AudioURLChunk, + AudioURLChunkTypedDict, + AudioURLUnion, + AudioURLUnionTypedDict, + ) + from .authdata import AuthData, AuthDataTypedDict + from .basefielddefinition import ( + BaseFieldDefinition, + BaseFieldDefinitionTypedDict, + SupportedOperator, + TypeEnum, + ) from .basemodelcard import BaseModelCard, BaseModelCardTypedDict + from .basetaskstatus import BaseTaskStatus from .batcherror import BatchError, BatchErrorTypedDict from .batchjob import BatchJob, BatchJobTypedDict from .batchjobstatus import BatchJobStatus from .batchrequest import BatchRequest, BatchRequestTypedDict + from .blobresourcecontents import ( + BlobResourceContents, + BlobResourceContentsTypedDict, + ) from .builtinconnectors import BuiltInConnectors + from .campaign import Campaign, CampaignTypedDict from .chatclassificationrequest import ( ChatClassificationRequest, ChatClassificationRequestTypedDict, @@ -168,6 +198,18 @@ ChatCompletionChoiceFinishReason, ChatCompletionChoiceTypedDict, ) + from .chatcompletionevent import ( + ChatCompletionEvent, + ChatCompletionEventExtraFields, + ChatCompletionEventExtraFieldsTypedDict, + ChatCompletionEventTypedDict, + ) + from .chatcompletioneventpreview import ( + ChatCompletionEventPreview, + ChatCompletionEventPreviewExtraFields, + ChatCompletionEventPreviewExtraFieldsTypedDict, + ChatCompletionEventPreviewTypedDict, + ) from .chatcompletionrequest import ( ChatCompletionRequest, ChatCompletionRequestMessage, @@ -202,6 +244,10 @@ ChatModerationRequestInputs3TypedDict, ChatModerationRequestTypedDict, ) + from .chattranscriptionevent import ( + ChatTranscriptionEvent, + ChatTranscriptionEventTypedDict, + ) from .checkpoint import Checkpoint, CheckpointTypedDict from .classificationrequest import ( ClassificationRequest, @@ -286,6 +332,52 @@ CompletionTrainingParameters, CompletionTrainingParametersTypedDict, ) + from .connector import Connector, ConnectorTypedDict + from .connector_call_tool_v1op import ( + ConnectorCallToolV1Request, + ConnectorCallToolV1RequestTypedDict, + ) + from .connector_delete_v1op import ( + ConnectorDeleteV1Request, + ConnectorDeleteV1RequestTypedDict, + ) + from .connector_get_v1op import ( + ConnectorGetV1Request, + ConnectorGetV1RequestTypedDict, + ) + from .connector_list_v1op import ( + ConnectorListV1Request, + ConnectorListV1RequestTypedDict, + ) + from .connector_update_v1op import ( + ConnectorUpdateV1Request, + ConnectorUpdateV1RequestTypedDict, + ) + from .connectorcalltoolrequest import ( + ConnectorCallToolRequest, + ConnectorCallToolRequestTypedDict, + ) + from .connectorsqueryfilters import ( + ConnectorsQueryFilters, + ConnectorsQueryFiltersTypedDict, + ) + from .connectortool import ConnectorTool, ConnectorToolTypedDict + from .connectortoolcallmetadata import ( + ConnectorToolCallMetadata, + ConnectorToolCallMetadataTypedDict, + ) + from .connectortoolcallresponse import ( + ConnectorToolCallResponse, + ConnectorToolCallResponseContent, + ConnectorToolCallResponseContentTypedDict, + ConnectorToolCallResponseTypedDict, + UnknownConnectorToolCallResponseContent, + ) + from .connectortoollocale import ConnectorToolLocale, ConnectorToolLocaleTypedDict + from .connectortoolresultmetadata import ( + ConnectorToolResultMetadata, + ConnectorToolResultMetadataTypedDict, + ) from .contentchunk import ContentChunk, ContentChunkTypedDict, UnknownContentChunk from .conversationappendrequest import ( ConversationAppendRequest, @@ -315,6 +407,7 @@ ConversationMessages, ConversationMessagesTypedDict, ) + from .conversationpayload import ConversationPayload, ConversationPayloadTypedDict from .conversationrequest import ( ConversationRequest, ConversationRequestAgentVersion, @@ -326,9 +419,11 @@ ) from .conversationresponse import ( ConversationResponse, + ConversationResponseOutput, + ConversationResponseOutputTypedDict, ConversationResponseTypedDict, - Output, - OutputTypedDict, + Guardrail, + GuardrailTypedDict, ) from .conversationrestartrequest import ( ConversationRestartRequest, @@ -344,6 +439,7 @@ ConversationRestartStreamRequestHandoffExecution, ConversationRestartStreamRequestTypedDict, ) + from .conversationsource import ConversationSource from .conversationstreamrequest import ( ConversationStreamRequest, ConversationStreamRequestAgentVersion, @@ -353,16 +449,14 @@ ConversationStreamRequestToolTypedDict, ConversationStreamRequestTypedDict, ) - from .conversationthinkchunk import ( - ConversationThinkChunk, - ConversationThinkChunkThinking, - ConversationThinkChunkThinkingTypedDict, - ConversationThinkChunkTypedDict, - ) from .conversationusageinfo import ( ConversationUsageInfo, ConversationUsageInfoTypedDict, ) + from .create_dataset_record_v1_observability_datasets_dataset_id_records_postop import ( + CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest, + CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict, + ) from .createagentrequest import ( CreateAgentRequest, CreateAgentRequestTool, @@ -373,6 +467,22 @@ CreateBatchJobRequest, CreateBatchJobRequestTypedDict, ) + from .createcampaignrequest import ( + CreateCampaignRequest, + CreateCampaignRequestTypedDict, + ) + from .createconnectorrequest import ( + CreateConnectorRequest, + CreateConnectorRequestTypedDict, + ) + from .createdatasetrecordrequest import ( + CreateDatasetRecordRequest, + CreateDatasetRecordRequestTypedDict, + ) + from .createdatasetrequest import ( + CreateDatasetRequest, + CreateDatasetRequestTypedDict, + ) from .createfileresponse import CreateFileResponse, CreateFileResponseTypedDict from .createfinetuningjobrequest import ( CreateFineTuningJobRequest, @@ -384,16 +494,50 @@ Hyperparameters, HyperparametersTypedDict, ) + from .creategithubrepositoryrequest import ( + CreateGithubRepositoryRequest, + CreateGithubRepositoryRequestTypedDict, + ) + from .createjudgerequest import ( + CreateJudgeRequest, + CreateJudgeRequestOutput, + CreateJudgeRequestOutputTypedDict, + CreateJudgeRequestTypedDict, + ) from .createlibraryrequest import ( CreateLibraryRequest, CreateLibraryRequestTypedDict, ) + from .dataset import Dataset, DatasetTypedDict + from .datasetimporttask import DatasetImportTask, DatasetImportTaskTypedDict + from .datasetpreview import DatasetPreview, DatasetPreviewTypedDict + from .datasetrecord import DatasetRecord, DatasetRecordTypedDict + from .delete_campaign_v1_observability_campaigns_campaign_id_deleteop import ( + DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest, + DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequestTypedDict, + ) + from .delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop import ( + DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest, + DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequestTypedDict, + ) + from .delete_dataset_v1_observability_datasets_dataset_id_deleteop import ( + DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequest, + DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequestTypedDict, + ) + from .delete_judge_v1_observability_judges_judge_id_deleteop import ( + DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequest, + DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequestTypedDict, + ) from .delete_model_v1_models_model_id_deleteop import ( DeleteModelV1ModelsModelIDDeleteRequest, DeleteModelV1ModelsModelIDDeleteRequestTypedDict, ) + from .deletedatasetrecordsrequest import ( + DeleteDatasetRecordsRequest, + DeleteDatasetRecordsRequestTypedDict, + ) from .deletefileresponse import DeleteFileResponse, DeleteFileResponseTypedDict - from .deletemodelout import DeleteModelOut, DeleteModelOutTypedDict + from .deletemodelresponse import DeleteModelResponse, DeleteModelResponseTypedDict from .deltamessage import ( DeltaMessage, DeltaMessageContent, @@ -404,6 +548,12 @@ from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .documenttextcontent import DocumentTextContent, DocumentTextContentTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict + from .embeddedresource import ( + EmbeddedResource, + EmbeddedResourceTypedDict, + Resource, + ResourceTypedDict, + ) from .embeddingdtype import EmbeddingDtype from .embeddingrequest import ( EmbeddingRequest, @@ -419,6 +569,42 @@ from .encodingformat import EncodingFormat from .entitytype import EntityType from .event import Event, EventTypedDict + from .executionconfig import ExecutionConfig, ExecutionConfigTypedDict + from .export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop import ( + ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest, + ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict, + ) + from .exportdatasetresponse import ( + ExportDatasetResponse, + ExportDatasetResponseTypedDict, + ) + from .feedresultchatcompletioneventpreview import ( + FeedResultChatCompletionEventPreview, + FeedResultChatCompletionEventPreviewTypedDict, + ) + from .fetchcampaignstatusresponse import ( + FetchCampaignStatusResponse, + FetchCampaignStatusResponseTypedDict, + ) + from .fetchchatcompletionfieldoptionsresponse import ( + FetchChatCompletionFieldOptionsResponse, + FetchChatCompletionFieldOptionsResponseTypedDict, + Option, + OptionTypedDict, + ) + from .fetchfieldoptioncountsrequest import ( + FetchFieldOptionCountsRequest, + FetchFieldOptionCountsRequestTypedDict, + ) + from .fetchfieldoptioncountsresponse import ( + FetchFieldOptionCountsResponse, + FetchFieldOptionCountsResponseTypedDict, + ) + from .fieldgroup import FieldGroup, FieldGroupTypedDict + from .fieldoptioncountitem import ( + FieldOptionCountItem, + FieldOptionCountItemTypedDict, + ) from .file import File, FileTypedDict from .filechunk import FileChunk, FileChunkTypedDict from .filepurpose import FilePurpose @@ -443,10 +629,19 @@ FilesAPIRoutesRetrieveFileRequestTypedDict, ) from .files_api_routes_upload_fileop import ( + FilesAPIRoutesUploadFileFileVisibility, MultiPartBodyParams, MultiPartBodyParamsTypedDict, ) from .fileschema import FileSchema, FileSchemaTypedDict + from .filevisibility import FileVisibility + from .filtercondition import FilterCondition, FilterConditionTypedDict, Op + from .filterpayload import ( + FilterPayload, + FilterPayloadTypedDict, + Filters, + FiltersTypedDict, + ) from .fimcompletionrequest import ( FIMCompletionRequest, FIMCompletionRequestStop, @@ -494,13 +689,83 @@ from .functionname import FunctionName, FunctionNameTypedDict from .functionresultentry import FunctionResultEntry, FunctionResultEntryTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict + from .get_campaign_by_id_v1_observability_campaigns_campaign_id_getop import ( + GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequest, + GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequestTypedDict, + ) + from .get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop import ( + GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequest, + GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequestTypedDict, + ) + from .get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop import ( + GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequest, + GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequestTypedDict, + ) + from .get_campaigns_v1_observability_campaigns_getop import ( + GetCampaignsV1ObservabilityCampaignsGetRequest, + GetCampaignsV1ObservabilityCampaignsGetRequestTypedDict, + ) + from .get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop import ( + GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequest, + GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequestTypedDict, + ) + from .get_chat_completion_events_v1_observability_chat_completion_events_search_postop import ( + GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest, + GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequestTypedDict, + ) + from .get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop import ( + GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest, + GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequestTypedDict, + ) + from .get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop import ( + GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest, + GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequestTypedDict, + Operator, + ) + from .get_dataset_by_id_v1_observability_datasets_dataset_id_getop import ( + GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequest, + GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequestTypedDict, + ) + from .get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop import ( + GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequest, + GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequestTypedDict, + ) + from .get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop import ( + GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequest, + GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequestTypedDict, + ) + from .get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop import ( + GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequest, + GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequestTypedDict, + ) + from .get_dataset_records_v1_observability_datasets_dataset_id_records_getop import ( + GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequest, + GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict, + ) + from .get_datasets_v1_observability_datasets_getop import ( + GetDatasetsV1ObservabilityDatasetsGetRequest, + GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict, + ) + from .get_judge_by_id_v1_observability_judges_judge_id_getop import ( + GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest, + GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict, + ) + from .get_judges_v1_observability_judges_getop import ( + GetJudgesV1ObservabilityJudgesGetRequest, + GetJudgesV1ObservabilityJudgesGetRequestTypedDict, + ) + from .get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop import ( + GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest, + GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict, + ) from .getfileresponse import GetFileResponse, GetFileResponseTypedDict from .getsignedurlresponse import ( GetSignedURLResponse, GetSignedURLResponseTypedDict, ) from .githubrepository import GithubRepository, GithubRepositoryTypedDict - from .githubrepositoryin import GithubRepositoryIn, GithubRepositoryInTypedDict + from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict + from .imagecontent import ImageContent, ImageContentTypedDict from .imagedetail import ImageDetail from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .imageurl import ImageURL, ImageURLTypedDict @@ -510,6 +775,26 @@ ImageURLUnion, ImageURLUnionTypedDict, ) + from .importdatasetfromcampaignrequest import ( + ImportDatasetFromCampaignRequest, + ImportDatasetFromCampaignRequestTypedDict, + ) + from .importdatasetfromdatasetrequest import ( + ImportDatasetFromDatasetRequest, + ImportDatasetFromDatasetRequestTypedDict, + ) + from .importdatasetfromexplorerrequest import ( + ImportDatasetFromExplorerRequest, + ImportDatasetFromExplorerRequestTypedDict, + ) + from .importdatasetfromfilerequest import ( + ImportDatasetFromFileRequest, + ImportDatasetFromFileRequestTypedDict, + ) + from .importdatasetfromplaygroundrequest import ( + ImportDatasetFromPlaygroundRequest, + ImportDatasetFromPlaygroundRequestTypedDict, + ) from .inputentries import InputEntries, InputEntriesTypedDict from .inputs import Inputs, InputsTypedDict from .instructrequest import ( @@ -581,6 +866,43 @@ UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse, ) from .jsonschema import JSONSchema, JSONSchemaTypedDict + from .judge import ( + Judge, + JudgeOutputUnion, + JudgeOutputUnionTypedDict, + JudgeTypedDict, + UnknownJudgeOutputUnion, + ) + from .judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop import ( + JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest, + JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequestTypedDict, + ) + from .judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop import ( + JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest, + JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequestTypedDict, + ) + from .judgechatcompletioneventrequest import ( + JudgeChatCompletionEventRequest, + JudgeChatCompletionEventRequestTypedDict, + ) + from .judgeclassificationoutput import ( + JudgeClassificationOutput, + JudgeClassificationOutputTypedDict, + ) + from .judgeclassificationoutputoption import ( + JudgeClassificationOutputOption, + JudgeClassificationOutputOptionTypedDict, + ) + from .judgedatasetrecordrequest import ( + JudgeDatasetRecordRequest, + JudgeDatasetRecordRequestTypedDict, + ) + from .judgeoutput import Answer, AnswerTypedDict, JudgeOutput, JudgeOutputTypedDict + from .judgeoutputtype import JudgeOutputType + from .judgeregressionoutput import ( + JudgeRegressionOutput, + JudgeRegressionOutputTypedDict, + ) from .legacyjobmetadata import LegacyJobMetadata, LegacyJobMetadataTypedDict from .libraries_delete_v1op import ( LibrariesDeleteV1Request, @@ -649,10 +971,38 @@ LibrariesUpdateV1RequestTypedDict, ) from .library import Library, LibraryTypedDict + from .list_models_v1_models_getop import ( + ListModelsV1ModelsGetRequest, + ListModelsV1ModelsGetRequestTypedDict, + ) from .listbatchjobsresponse import ( ListBatchJobsResponse, ListBatchJobsResponseTypedDict, ) + from .listcampaignselectedeventsresponse import ( + ListCampaignSelectedEventsResponse, + ListCampaignSelectedEventsResponseTypedDict, + ) + from .listcampaignsresponse import ( + ListCampaignsResponse, + ListCampaignsResponseTypedDict, + ) + from .listchatcompletionfieldsresponse import ( + ListChatCompletionFieldsResponse, + ListChatCompletionFieldsResponseTypedDict, + ) + from .listdatasetimporttasksresponse import ( + ListDatasetImportTasksResponse, + ListDatasetImportTasksResponseTypedDict, + ) + from .listdatasetrecordsresponse import ( + ListDatasetRecordsResponse, + ListDatasetRecordsResponseTypedDict, + ) + from .listdatasetsresponse import ( + ListDatasetsResponse, + ListDatasetsResponseTypedDict, + ) from .listdocumentsresponse import ( ListDocumentsResponse, ListDocumentsResponseTypedDict, @@ -665,11 +1015,13 @@ ListFineTuningJobsResponseTypedDict, UnknownListFineTuningJobsResponseData, ) + from .listjudgesresponse import ListJudgesResponse, ListJudgesResponseTypedDict from .listlibrariesresponse import ( ListLibrariesResponse, ListLibrariesResponseTypedDict, ) - from .listsharingout import ListSharingOut, ListSharingOutTypedDict + from .listsharingresponse import ListSharingResponse, ListSharingResponseTypedDict + from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict from .messageentries import MessageEntries, MessageEntriesTypedDict from .messageinputcontentchunks import ( MessageInputContentChunks, @@ -698,6 +1050,7 @@ MessageOutputEventContentTypedDict, MessageOutputEventTypedDict, ) + from .messageresponse import MessageResponse, MessageResponseTypedDict from .metric import Metric, MetricTypedDict from .mistralpromptmode import MistralPromptMode from .modelcapabilities import ModelCapabilities, ModelCapabilitiesTypedDict @@ -715,8 +1068,22 @@ ModelListTypedDict, UnknownModelListData, ) + from .moderationllmv1action import ModerationLlmv1Action + from .moderationllmv1categorythresholds import ( + ModerationLlmv1CategoryThresholds, + ModerationLlmv1CategoryThresholdsTypedDict, + ) + from .moderationllmv1config import ( + ModerationLlmv1Config, + ModerationLlmv1ConfigTypedDict, + ) from .moderationobject import ModerationObject, ModerationObjectTypedDict from .moderationresponse import ModerationResponse, ModerationResponseTypedDict + from .observabilityerrorcode import ObservabilityErrorCode + from .observabilityerrordetail import ( + ObservabilityErrorDetail, + ObservabilityErrorDetailTypedDict, + ) from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict from .ocrpageobject import OCRPageObject, OCRPageObjectTypedDict @@ -731,9 +1098,55 @@ from .ocrtableobject import Format, OCRTableObject, OCRTableObjectTypedDict from .ocrusageinfo import OCRUsageInfo, OCRUsageInfoTypedDict from .outputcontentchunks import OutputContentChunks, OutputContentChunksTypedDict + from .paginatedconnectors import PaginatedConnectors, PaginatedConnectorsTypedDict + from .paginatedresultcampaignpreview import ( + PaginatedResultCampaignPreview, + PaginatedResultCampaignPreviewTypedDict, + ) + from .paginatedresultchatcompletioneventpreview import ( + PaginatedResultChatCompletionEventPreview, + PaginatedResultChatCompletionEventPreviewTypedDict, + ) + from .paginatedresultdatasetimporttask import ( + PaginatedResultDatasetImportTask, + PaginatedResultDatasetImportTaskTypedDict, + ) + from .paginatedresultdatasetpreview import ( + PaginatedResultDatasetPreview, + PaginatedResultDatasetPreviewTypedDict, + ) + from .paginatedresultdatasetrecord import ( + PaginatedResultDatasetRecord, + PaginatedResultDatasetRecordTypedDict, + ) + from .paginatedresultjudgepreview import ( + PaginatedResultJudgePreview, + PaginatedResultJudgePreviewTypedDict, + ) from .paginationinfo import PaginationInfo, PaginationInfoTypedDict + from .paginationresponse import PaginationResponse, PaginationResponseTypedDict + from .post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop import ( + PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest, + PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequestTypedDict, + ) + from .post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop import ( + PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest, + PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequestTypedDict, + ) + from .post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop import ( + PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequest, + PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequestTypedDict, + ) + from .post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop import ( + PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest, + PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequestTypedDict, + ) + from .post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop import ( + PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest, + PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict, + ) from .prediction import Prediction, PredictionTypedDict - from .processingstatusout import ProcessingStatusOut, ProcessingStatusOutTypedDict + from .processingstatus import ProcessingStatus, ProcessingStatusTypedDict from .processstatus import ProcessStatus from .realtimetranscriptionerror import ( RealtimeTranscriptionError, @@ -779,6 +1192,8 @@ ) from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict from .requestsource import RequestSource + from .resourcelink import ResourceLink, ResourceLinkTypedDict + from .resourcevisibility import ResourceVisibility from .responsedoneevent import ResponseDoneEvent, ResponseDoneEventTypedDict from .responseerrorevent import ResponseErrorEvent, ResponseErrorEventTypedDict from .responseformat import ResponseFormat, ResponseFormatTypedDict @@ -795,11 +1210,27 @@ UnknownResponseRetrieveModelV1ModelsModelIDGet, ) from .sampletype import SampleType + from .searchchatcompletioneventidsrequest import ( + SearchChatCompletionEventIdsRequest, + SearchChatCompletionEventIdsRequestTypedDict, + ) + from .searchchatcompletioneventidsresponse import ( + SearchChatCompletionEventIdsResponse, + SearchChatCompletionEventIdsResponseTypedDict, + ) + from .searchchatcompletioneventsrequest import ( + SearchChatCompletionEventsRequest, + SearchChatCompletionEventsRequestTypedDict, + ) + from .searchchatcompletioneventsresponse import ( + SearchChatCompletionEventsResponse, + SearchChatCompletionEventsResponseTypedDict, + ) from .security import Security, SecurityTypedDict from .shareenum import ShareEnum + from .sharing import Sharing, SharingTypedDict from .sharingdelete import SharingDelete, SharingDeleteTypedDict - from .sharingin import SharingIn, SharingInTypedDict - from .sharingout import SharingOut, SharingOutTypedDict + from .sharingrequest import SharingRequest, SharingRequestTypedDict from .source import Source from .ssetypes import SSETypes from .systemmessage import ( @@ -813,12 +1244,12 @@ SystemMessageContentChunksTypedDict, ) from .textchunk import TextChunk, TextChunkTypedDict - from .thinkchunk import ( - ThinkChunk, - ThinkChunkThinking, - ThinkChunkThinkingTypedDict, - ThinkChunkTypedDict, + from .textcontent import TextContent, TextContentTypedDict + from .textresourcecontents import ( + TextResourceContents, + TextResourceContentsTypedDict, ) + from .thinkchunk import ThinkChunk, ThinkChunkTypedDict, Thinking, ThinkingTypedDict from .timestampgranularity import TimestampGranularity from .tool import Tool, ToolTypedDict from .toolcall import ToolCall, ToolCallTypedDict @@ -910,18 +1341,56 @@ UnarchiveModelResponse, UnarchiveModelResponseTypedDict, ) + from .update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop import ( + UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest, + UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequestTypedDict, + ) + from .update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop import ( + UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest, + UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequestTypedDict, + ) + from .update_dataset_v1_observability_datasets_dataset_id_patchop import ( + UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest, + UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict, + ) + from .update_judge_v1_observability_judges_judge_id_putop import ( + UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest, + UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict, + ) from .updateagentrequest import ( UpdateAgentRequest, UpdateAgentRequestTool, UpdateAgentRequestToolTypedDict, UpdateAgentRequestTypedDict, ) + from .updateconnectorrequest import ( + UpdateConnectorRequest, + UpdateConnectorRequestTypedDict, + ) + from .updatedatasetrecordpayloadrequest import ( + UpdateDatasetRecordPayloadRequest, + UpdateDatasetRecordPayloadRequestTypedDict, + ) + from .updatedatasetrecordpropertiesrequest import ( + UpdateDatasetRecordPropertiesRequest, + UpdateDatasetRecordPropertiesRequestTypedDict, + ) + from .updatedatasetrequest import ( + UpdateDatasetRequest, + UpdateDatasetRequestTypedDict, + ) from .updatedocumentrequest import ( Attributes, AttributesTypedDict, UpdateDocumentRequest, UpdateDocumentRequestTypedDict, ) + from .updatejudgerequest import ( + UpdateJudgeRequest, + UpdateJudgeRequestOutput, + UpdateJudgeRequestOutputTypedDict, + UpdateJudgeRequestTypedDict, + ) from .updatelibraryrequest import ( UpdateLibraryRequest, UpdateLibraryRequestTypedDict, @@ -935,6 +1404,8 @@ UserMessageTypedDict, ) from .validationerror import ( + Context, + ContextTypedDict, Loc, LocTypedDict, ValidationError, @@ -949,7 +1420,12 @@ WebSearchPremiumTool, WebSearchPremiumToolTypedDict, ) - from .websearchtool import WebSearchTool, WebSearchToolTypedDict + from .websearchtool import ( + WebSearchTool, + WebSearchToolTypedDict, + ) # Pydantic models with forward references +FilterGroup.model_rebuild() + __all__ = [ "APIEndpoint", @@ -1027,6 +1503,12 @@ "AgentsCompletionStreamRequestToolChoice", "AgentsCompletionStreamRequestToolChoiceTypedDict", "AgentsCompletionStreamRequestTypedDict", + "And", + "AndTypedDict", + "Annotations", + "AnnotationsTypedDict", + "Answer", + "AnswerTypedDict", "ArchiveModelResponse", "ArchiveModelResponseTypedDict", "Arguments", @@ -1037,8 +1519,11 @@ "AssistantMessageTypedDict", "Attributes", "AttributesTypedDict", + "Audience", "AudioChunk", "AudioChunkTypedDict", + "AudioContent", + "AudioContentTypedDict", "AudioEncoding", "AudioFormat", "AudioFormatTypedDict", @@ -1046,8 +1531,19 @@ "AudioTranscriptionRequestStream", "AudioTranscriptionRequestStreamTypedDict", "AudioTranscriptionRequestTypedDict", + "AudioURL", + "AudioURLChunk", + "AudioURLChunkTypedDict", + "AudioURLTypedDict", + "AudioURLUnion", + "AudioURLUnionTypedDict", + "AuthData", + "AuthDataTypedDict", + "BaseFieldDefinition", + "BaseFieldDefinitionTypedDict", "BaseModelCard", "BaseModelCardTypedDict", + "BaseTaskStatus", "BatchError", "BatchErrorTypedDict", "BatchJob", @@ -1055,12 +1551,24 @@ "BatchJobTypedDict", "BatchRequest", "BatchRequestTypedDict", + "BlobResourceContents", + "BlobResourceContentsTypedDict", "BuiltInConnectors", + "Campaign", + "CampaignTypedDict", "ChatClassificationRequest", "ChatClassificationRequestTypedDict", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", "ChatCompletionChoiceTypedDict", + "ChatCompletionEvent", + "ChatCompletionEventExtraFields", + "ChatCompletionEventExtraFieldsTypedDict", + "ChatCompletionEventPreview", + "ChatCompletionEventPreviewExtraFields", + "ChatCompletionEventPreviewExtraFieldsTypedDict", + "ChatCompletionEventPreviewTypedDict", + "ChatCompletionEventTypedDict", "ChatCompletionRequest", "ChatCompletionRequestMessage", "ChatCompletionRequestMessageTypedDict", @@ -1087,6 +1595,8 @@ "ChatModerationRequestInputs3", "ChatModerationRequestInputs3TypedDict", "ChatModerationRequestTypedDict", + "ChatTranscriptionEvent", + "ChatTranscriptionEventTypedDict", "Checkpoint", "CheckpointTypedDict", "ClassificationRequest", @@ -1147,8 +1657,38 @@ "CompletionTrainingParameters", "CompletionTrainingParametersTypedDict", "Confirmation", + "Connector", + "ConnectorCallToolRequest", + "ConnectorCallToolRequestTypedDict", + "ConnectorCallToolV1Request", + "ConnectorCallToolV1RequestTypedDict", + "ConnectorDeleteV1Request", + "ConnectorDeleteV1RequestTypedDict", + "ConnectorGetV1Request", + "ConnectorGetV1RequestTypedDict", + "ConnectorListV1Request", + "ConnectorListV1RequestTypedDict", + "ConnectorTool", + "ConnectorToolCallMetadata", + "ConnectorToolCallMetadataTypedDict", + "ConnectorToolCallResponse", + "ConnectorToolCallResponseContent", + "ConnectorToolCallResponseContentTypedDict", + "ConnectorToolCallResponseTypedDict", + "ConnectorToolLocale", + "ConnectorToolLocaleTypedDict", + "ConnectorToolResultMetadata", + "ConnectorToolResultMetadataTypedDict", + "ConnectorToolTypedDict", + "ConnectorTypedDict", + "ConnectorUpdateV1Request", + "ConnectorUpdateV1RequestTypedDict", + "ConnectorsQueryFilters", + "ConnectorsQueryFiltersTypedDict", "ContentChunk", "ContentChunkTypedDict", + "Context", + "ContextTypedDict", "ConversationAppendRequest", "ConversationAppendRequestHandoffExecution", "ConversationAppendRequestTypedDict", @@ -1165,6 +1705,8 @@ "ConversationInputsTypedDict", "ConversationMessages", "ConversationMessagesTypedDict", + "ConversationPayload", + "ConversationPayloadTypedDict", "ConversationRequest", "ConversationRequestAgentVersion", "ConversationRequestAgentVersionTypedDict", @@ -1173,6 +1715,8 @@ "ConversationRequestToolTypedDict", "ConversationRequestTypedDict", "ConversationResponse", + "ConversationResponseOutput", + "ConversationResponseOutputTypedDict", "ConversationResponseTypedDict", "ConversationRestartRequest", "ConversationRestartRequestAgentVersion", @@ -1184,6 +1728,7 @@ "ConversationRestartStreamRequestAgentVersionTypedDict", "ConversationRestartStreamRequestHandoffExecution", "ConversationRestartStreamRequestTypedDict", + "ConversationSource", "ConversationStreamRequest", "ConversationStreamRequestAgentVersion", "ConversationStreamRequestAgentVersionTypedDict", @@ -1191,10 +1736,6 @@ "ConversationStreamRequestTool", "ConversationStreamRequestToolTypedDict", "ConversationStreamRequestTypedDict", - "ConversationThinkChunk", - "ConversationThinkChunkThinking", - "ConversationThinkChunkThinkingTypedDict", - "ConversationThinkChunkTypedDict", "ConversationUsageInfo", "ConversationUsageInfoTypedDict", "CreateAgentRequest", @@ -1203,6 +1744,16 @@ "CreateAgentRequestTypedDict", "CreateBatchJobRequest", "CreateBatchJobRequestTypedDict", + "CreateCampaignRequest", + "CreateCampaignRequestTypedDict", + "CreateConnectorRequest", + "CreateConnectorRequestTypedDict", + "CreateDatasetRecordRequest", + "CreateDatasetRecordRequestTypedDict", + "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest", + "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict", + "CreateDatasetRequest", + "CreateDatasetRequestTypedDict", "CreateFileResponse", "CreateFileResponseTypedDict", "CreateFineTuningJobRequest", @@ -1211,12 +1762,36 @@ "CreateFineTuningJobRequestRepository", "CreateFineTuningJobRequestRepositoryTypedDict", "CreateFineTuningJobRequestTypedDict", + "CreateGithubRepositoryRequest", + "CreateGithubRepositoryRequestTypedDict", + "CreateJudgeRequest", + "CreateJudgeRequestOutput", + "CreateJudgeRequestOutputTypedDict", + "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", + "Dataset", + "DatasetImportTask", + "DatasetImportTaskTypedDict", + "DatasetPreview", + "DatasetPreviewTypedDict", + "DatasetRecord", + "DatasetRecordTypedDict", + "DatasetTypedDict", + "DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest", + "DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequestTypedDict", + "DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest", + "DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequestTypedDict", + "DeleteDatasetRecordsRequest", + "DeleteDatasetRecordsRequestTypedDict", + "DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequest", + "DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequestTypedDict", "DeleteFileResponse", "DeleteFileResponseTypedDict", - "DeleteModelOut", - "DeleteModelOutTypedDict", + "DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequest", + "DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequestTypedDict", + "DeleteModelResponse", + "DeleteModelResponseTypedDict", "DeleteModelV1ModelsModelIDDeleteRequest", "DeleteModelV1ModelsModelIDDeleteRequestTypedDict", "DeltaMessage", @@ -1235,6 +1810,8 @@ "DocumentUnionTypedDict", "DocumentUpload", "DocumentUploadTypedDict", + "EmbeddedResource", + "EmbeddedResourceTypedDict", "EmbeddingDtype", "EmbeddingRequest", "EmbeddingRequestInputs", @@ -1250,6 +1827,12 @@ "EntryTypedDict", "Event", "EventTypedDict", + "ExecutionConfig", + "ExecutionConfigTypedDict", + "ExportDatasetResponse", + "ExportDatasetResponseTypedDict", + "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest", + "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict", "FIMCompletionRequest", "FIMCompletionRequestStop", "FIMCompletionRequestStopTypedDict", @@ -1263,6 +1846,20 @@ "FTClassifierLossFunction", "FTModelCard", "FTModelCardTypedDict", + "FeedResultChatCompletionEventPreview", + "FeedResultChatCompletionEventPreviewTypedDict", + "FetchCampaignStatusResponse", + "FetchCampaignStatusResponseTypedDict", + "FetchChatCompletionFieldOptionsResponse", + "FetchChatCompletionFieldOptionsResponseTypedDict", + "FetchFieldOptionCountsRequest", + "FetchFieldOptionCountsRequestTypedDict", + "FetchFieldOptionCountsResponse", + "FetchFieldOptionCountsResponseTypedDict", + "FieldGroup", + "FieldGroupTypedDict", + "FieldOptionCountItem", + "FieldOptionCountItemTypedDict", "File", "FileChunk", "FileChunkTypedDict", @@ -1270,6 +1867,7 @@ "FileSchema", "FileSchemaTypedDict", "FileTypedDict", + "FileVisibility", "FilesAPIRoutesDeleteFileRequest", "FilesAPIRoutesDeleteFileRequestTypedDict", "FilesAPIRoutesDownloadFileRequest", @@ -1280,6 +1878,15 @@ "FilesAPIRoutesListFilesRequestTypedDict", "FilesAPIRoutesRetrieveFileRequest", "FilesAPIRoutesRetrieveFileRequestTypedDict", + "FilesAPIRoutesUploadFileFileVisibility", + "FilterCondition", + "FilterConditionTypedDict", + "FilterGroup", + "FilterGroupTypedDict", + "FilterPayload", + "FilterPayloadTypedDict", + "Filters", + "FiltersTypedDict", "FineTuneableModelType", "FineTunedModelCapabilities", "FineTunedModelCapabilitiesTypedDict", @@ -1302,16 +1909,54 @@ "FunctionTool", "FunctionToolTypedDict", "FunctionTypedDict", + "GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequest", + "GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequestTypedDict", + "GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequest", + "GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequestTypedDict", + "GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequest", + "GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequestTypedDict", + "GetCampaignsV1ObservabilityCampaignsGetRequest", + "GetCampaignsV1ObservabilityCampaignsGetRequestTypedDict", + "GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequest", + "GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequestTypedDict", + "GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest", + "GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequestTypedDict", + "GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest", + "GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequestTypedDict", + "GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest", + "GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequestTypedDict", + "GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequest", + "GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequestTypedDict", + "GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequest", + "GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequestTypedDict", + "GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequest", + "GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequestTypedDict", + "GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequest", + "GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequestTypedDict", + "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequest", + "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict", + "GetDatasetsV1ObservabilityDatasetsGetRequest", + "GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict", "GetFileResponse", "GetFileResponseTypedDict", + "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest", + "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict", + "GetJudgesV1ObservabilityJudgesGetRequest", + "GetJudgesV1ObservabilityJudgesGetRequestTypedDict", "GetSignedURLResponse", "GetSignedURLResponseTypedDict", + "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest", + "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict", "GithubRepository", - "GithubRepositoryIn", - "GithubRepositoryInTypedDict", "GithubRepositoryTypedDict", + "Guardrail", + "GuardrailConfig", + "GuardrailConfigTypedDict", + "GuardrailTypedDict", "Hyperparameters", "HyperparametersTypedDict", + "ImageContent", + "ImageContentTypedDict", "ImageDetail", "ImageGenerationTool", "ImageGenerationToolTypedDict", @@ -1321,6 +1966,16 @@ "ImageURLTypedDict", "ImageURLUnion", "ImageURLUnionTypedDict", + "ImportDatasetFromCampaignRequest", + "ImportDatasetFromCampaignRequestTypedDict", + "ImportDatasetFromDatasetRequest", + "ImportDatasetFromDatasetRequestTypedDict", + "ImportDatasetFromExplorerRequest", + "ImportDatasetFromExplorerRequestTypedDict", + "ImportDatasetFromFileRequest", + "ImportDatasetFromFileRequestTypedDict", + "ImportDatasetFromPlaygroundRequest", + "ImportDatasetFromPlaygroundRequestTypedDict", "InputEntries", "InputEntriesTypedDict", "Inputs", @@ -1364,6 +2019,27 @@ "JobsAPIRoutesFineTuningUpdateFineTunedModelRequestTypedDict", "JobsAPIRoutesFineTuningUpdateFineTunedModelResponse", "JobsAPIRoutesFineTuningUpdateFineTunedModelResponseTypedDict", + "Judge", + "JudgeChatCompletionEventRequest", + "JudgeChatCompletionEventRequestTypedDict", + "JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest", + "JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequestTypedDict", + "JudgeClassificationOutput", + "JudgeClassificationOutputOption", + "JudgeClassificationOutputOptionTypedDict", + "JudgeClassificationOutputTypedDict", + "JudgeDatasetRecordRequest", + "JudgeDatasetRecordRequestTypedDict", + "JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest", + "JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequestTypedDict", + "JudgeOutput", + "JudgeOutputType", + "JudgeOutputTypedDict", + "JudgeOutputUnion", + "JudgeOutputUnionTypedDict", + "JudgeRegressionOutput", + "JudgeRegressionOutputTypedDict", + "JudgeTypedDict", "LegacyJobMetadata", "LegacyJobMetadataTypedDict", "LibrariesDeleteV1Request", @@ -1402,6 +2078,18 @@ "LibraryTypedDict", "ListBatchJobsResponse", "ListBatchJobsResponseTypedDict", + "ListCampaignSelectedEventsResponse", + "ListCampaignSelectedEventsResponseTypedDict", + "ListCampaignsResponse", + "ListCampaignsResponseTypedDict", + "ListChatCompletionFieldsResponse", + "ListChatCompletionFieldsResponseTypedDict", + "ListDatasetImportTasksResponse", + "ListDatasetImportTasksResponseTypedDict", + "ListDatasetRecordsResponse", + "ListDatasetRecordsResponseTypedDict", + "ListDatasetsResponse", + "ListDatasetsResponseTypedDict", "ListDocumentsResponse", "ListDocumentsResponseTypedDict", "ListFilesResponse", @@ -1410,12 +2098,18 @@ "ListFineTuningJobsResponseData", "ListFineTuningJobsResponseDataTypedDict", "ListFineTuningJobsResponseTypedDict", + "ListJudgesResponse", + "ListJudgesResponseTypedDict", "ListLibrariesResponse", "ListLibrariesResponseTypedDict", - "ListSharingOut", - "ListSharingOutTypedDict", + "ListModelsV1ModelsGetRequest", + "ListModelsV1ModelsGetRequestTypedDict", + "ListSharingResponse", + "ListSharingResponseTypedDict", "Loc", "LocTypedDict", + "MCPServerIcon", + "MCPServerIconTypedDict", "MessageEntries", "MessageEntriesTypedDict", "MessageInputContentChunks", @@ -1434,6 +2128,8 @@ "MessageOutputEventContent", "MessageOutputEventContentTypedDict", "MessageOutputEventTypedDict", + "MessageResponse", + "MessageResponseTypedDict", "Metric", "MetricTypedDict", "MistralPromptMode", @@ -1447,6 +2143,11 @@ "ModelListData", "ModelListDataTypedDict", "ModelListTypedDict", + "ModerationLlmv1Action", + "ModerationLlmv1CategoryThresholds", + "ModerationLlmv1CategoryThresholdsTypedDict", + "ModerationLlmv1Config", + "ModerationLlmv1ConfigTypedDict", "ModerationObject", "ModerationObjectTypedDict", "ModerationResponse", @@ -1467,18 +2168,51 @@ "OCRTableObjectTypedDict", "OCRUsageInfo", "OCRUsageInfoTypedDict", + "ObservabilityErrorCode", + "ObservabilityErrorDetail", + "ObservabilityErrorDetailTypedDict", + "Op", + "Operator", + "Option", + "OptionTypedDict", + "Or", + "OrTypedDict", "OrderBy", - "Output", "OutputContentChunks", "OutputContentChunksTypedDict", - "OutputTypedDict", + "PaginatedConnectors", + "PaginatedConnectorsTypedDict", + "PaginatedResultCampaignPreview", + "PaginatedResultCampaignPreviewTypedDict", + "PaginatedResultChatCompletionEventPreview", + "PaginatedResultChatCompletionEventPreviewTypedDict", + "PaginatedResultDatasetImportTask", + "PaginatedResultDatasetImportTaskTypedDict", + "PaginatedResultDatasetPreview", + "PaginatedResultDatasetPreviewTypedDict", + "PaginatedResultDatasetRecord", + "PaginatedResultDatasetRecordTypedDict", + "PaginatedResultJudgePreview", + "PaginatedResultJudgePreviewTypedDict", "PaginationInfo", "PaginationInfoTypedDict", + "PaginationResponse", + "PaginationResponseTypedDict", + "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest", + "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequestTypedDict", + "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest", + "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequestTypedDict", + "PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequest", + "PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequestTypedDict", + "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest", + "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequestTypedDict", + "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest", + "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict", "Prediction", "PredictionTypedDict", "ProcessStatus", - "ProcessingStatusOut", - "ProcessingStatusOutTypedDict", + "ProcessingStatus", + "ProcessingStatusTypedDict", "RealtimeTranscriptionError", "RealtimeTranscriptionErrorDetail", "RealtimeTranscriptionErrorDetailMessage", @@ -1504,6 +2238,11 @@ "ReferenceChunk", "ReferenceChunkTypedDict", "RequestSource", + "Resource", + "ResourceLink", + "ResourceLinkTypedDict", + "ResourceTypedDict", + "ResourceVisibility", "Response", "ResponseDoneEvent", "ResponseDoneEventTypedDict", @@ -1524,16 +2263,25 @@ "Role", "SSETypes", "SampleType", + "SearchChatCompletionEventIdsRequest", + "SearchChatCompletionEventIdsRequestTypedDict", + "SearchChatCompletionEventIdsResponse", + "SearchChatCompletionEventIdsResponseTypedDict", + "SearchChatCompletionEventsRequest", + "SearchChatCompletionEventsRequestTypedDict", + "SearchChatCompletionEventsResponse", + "SearchChatCompletionEventsResponseTypedDict", "Security", "SecurityTypedDict", "ShareEnum", + "Sharing", "SharingDelete", "SharingDeleteTypedDict", - "SharingIn", - "SharingInTypedDict", - "SharingOut", - "SharingOutTypedDict", + "SharingRequest", + "SharingRequestTypedDict", + "SharingTypedDict", "Source", + "SupportedOperator", "SystemMessage", "SystemMessageContent", "SystemMessageContentChunks", @@ -1543,10 +2291,14 @@ "TableFormat", "TextChunk", "TextChunkTypedDict", + "TextContent", + "TextContentTypedDict", + "TextResourceContents", + "TextResourceContentsTypedDict", "ThinkChunk", - "ThinkChunkThinking", - "ThinkChunkThinkingTypedDict", "ThinkChunkTypedDict", + "Thinking", + "ThinkingTypedDict", "TimestampGranularity", "Tool", "ToolCall", @@ -1607,6 +2359,7 @@ "TranscriptionStreamSegmentDeltaTypedDict", "TranscriptionStreamTextDelta", "TranscriptionStreamTextDeltaTypedDict", + "TypeEnum", "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", "UnknownAgentTool", @@ -1616,12 +2369,14 @@ "UnknownCompletionFineTuningJobDetailsRepository", "UnknownCompletionFineTuningJobIntegration", "UnknownCompletionFineTuningJobRepository", + "UnknownConnectorToolCallResponseContent", "UnknownContentChunk", "UnknownConversationEventsData", "UnknownJobsAPIRoutesFineTuningCancelFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningGetFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningStartFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse", + "UnknownJudgeOutputUnion", "UnknownListFineTuningJobsResponseData", "UnknownModelConversationTool", "UnknownModelListData", @@ -1632,8 +2387,28 @@ "UpdateAgentRequestTool", "UpdateAgentRequestToolTypedDict", "UpdateAgentRequestTypedDict", + "UpdateConnectorRequest", + "UpdateConnectorRequestTypedDict", + "UpdateDatasetRecordPayloadRequest", + "UpdateDatasetRecordPayloadRequestTypedDict", + "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest", + "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequestTypedDict", + "UpdateDatasetRecordPropertiesRequest", + "UpdateDatasetRecordPropertiesRequestTypedDict", + "UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest", + "UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequestTypedDict", + "UpdateDatasetRequest", + "UpdateDatasetRequestTypedDict", + "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest", + "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict", "UpdateDocumentRequest", "UpdateDocumentRequestTypedDict", + "UpdateJudgeRequest", + "UpdateJudgeRequestOutput", + "UpdateJudgeRequestOutputTypedDict", + "UpdateJudgeRequestTypedDict", + "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest", + "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict", "UpdateLibraryRequest", "UpdateLibraryRequestTypedDict", "UpdateModelRequest", @@ -1734,6 +2509,9 @@ "AgentsCompletionStreamRequestToolChoice": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoiceTypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestTypedDict": ".agentscompletionstreamrequest", + "Annotations": ".annotations", + "AnnotationsTypedDict": ".annotations", + "Audience": ".annotations", "APIEndpoint": ".apiendpoint", "ArchiveModelResponse": ".archivemodelresponse", "ArchiveModelResponseTypedDict": ".archivemodelresponse", @@ -1743,6 +2521,8 @@ "AssistantMessageTypedDict": ".assistantmessage", "AudioChunk": ".audiochunk", "AudioChunkTypedDict": ".audiochunk", + "AudioContent": ".audiocontent", + "AudioContentTypedDict": ".audiocontent", "AudioEncoding": ".audioencoding", "AudioFormat": ".audioformat", "AudioFormatTypedDict": ".audioformat", @@ -1750,8 +2530,21 @@ "AudioTranscriptionRequestTypedDict": ".audiotranscriptionrequest", "AudioTranscriptionRequestStream": ".audiotranscriptionrequeststream", "AudioTranscriptionRequestStreamTypedDict": ".audiotranscriptionrequeststream", + "AudioURL": ".audiourl", + "AudioURLTypedDict": ".audiourl", + "AudioURLChunk": ".audiourlchunk", + "AudioURLChunkTypedDict": ".audiourlchunk", + "AudioURLUnion": ".audiourlchunk", + "AudioURLUnionTypedDict": ".audiourlchunk", + "AuthData": ".authdata", + "AuthDataTypedDict": ".authdata", + "BaseFieldDefinition": ".basefielddefinition", + "BaseFieldDefinitionTypedDict": ".basefielddefinition", + "SupportedOperator": ".basefielddefinition", + "TypeEnum": ".basefielddefinition", "BaseModelCard": ".basemodelcard", "BaseModelCardTypedDict": ".basemodelcard", + "BaseTaskStatus": ".basetaskstatus", "BatchError": ".batcherror", "BatchErrorTypedDict": ".batcherror", "BatchJob": ".batchjob", @@ -1759,12 +2552,24 @@ "BatchJobStatus": ".batchjobstatus", "BatchRequest": ".batchrequest", "BatchRequestTypedDict": ".batchrequest", + "BlobResourceContents": ".blobresourcecontents", + "BlobResourceContentsTypedDict": ".blobresourcecontents", "BuiltInConnectors": ".builtinconnectors", + "Campaign": ".campaign", + "CampaignTypedDict": ".campaign", "ChatClassificationRequest": ".chatclassificationrequest", "ChatClassificationRequestTypedDict": ".chatclassificationrequest", "ChatCompletionChoice": ".chatcompletionchoice", "ChatCompletionChoiceFinishReason": ".chatcompletionchoice", "ChatCompletionChoiceTypedDict": ".chatcompletionchoice", + "ChatCompletionEvent": ".chatcompletionevent", + "ChatCompletionEventExtraFields": ".chatcompletionevent", + "ChatCompletionEventExtraFieldsTypedDict": ".chatcompletionevent", + "ChatCompletionEventTypedDict": ".chatcompletionevent", + "ChatCompletionEventPreview": ".chatcompletioneventpreview", + "ChatCompletionEventPreviewExtraFields": ".chatcompletioneventpreview", + "ChatCompletionEventPreviewExtraFieldsTypedDict": ".chatcompletioneventpreview", + "ChatCompletionEventPreviewTypedDict": ".chatcompletioneventpreview", "ChatCompletionRequest": ".chatcompletionrequest", "ChatCompletionRequestMessage": ".chatcompletionrequest", "ChatCompletionRequestMessageTypedDict": ".chatcompletionrequest", @@ -1791,6 +2596,8 @@ "ChatModerationRequestInputs3": ".chatmoderationrequest", "ChatModerationRequestInputs3TypedDict": ".chatmoderationrequest", "ChatModerationRequestTypedDict": ".chatmoderationrequest", + "ChatTranscriptionEvent": ".chattranscriptionevent", + "ChatTranscriptionEventTypedDict": ".chattranscriptionevent", "Checkpoint": ".checkpoint", "CheckpointTypedDict": ".checkpoint", "ClassificationRequest": ".classificationrequest", @@ -1856,6 +2663,35 @@ "CompletionResponseStreamChoiceTypedDict": ".completionresponsestreamchoice", "CompletionTrainingParameters": ".completiontrainingparameters", "CompletionTrainingParametersTypedDict": ".completiontrainingparameters", + "Connector": ".connector", + "ConnectorTypedDict": ".connector", + "ConnectorCallToolV1Request": ".connector_call_tool_v1op", + "ConnectorCallToolV1RequestTypedDict": ".connector_call_tool_v1op", + "ConnectorDeleteV1Request": ".connector_delete_v1op", + "ConnectorDeleteV1RequestTypedDict": ".connector_delete_v1op", + "ConnectorGetV1Request": ".connector_get_v1op", + "ConnectorGetV1RequestTypedDict": ".connector_get_v1op", + "ConnectorListV1Request": ".connector_list_v1op", + "ConnectorListV1RequestTypedDict": ".connector_list_v1op", + "ConnectorUpdateV1Request": ".connector_update_v1op", + "ConnectorUpdateV1RequestTypedDict": ".connector_update_v1op", + "ConnectorCallToolRequest": ".connectorcalltoolrequest", + "ConnectorCallToolRequestTypedDict": ".connectorcalltoolrequest", + "ConnectorsQueryFilters": ".connectorsqueryfilters", + "ConnectorsQueryFiltersTypedDict": ".connectorsqueryfilters", + "ConnectorTool": ".connectortool", + "ConnectorToolTypedDict": ".connectortool", + "ConnectorToolCallMetadata": ".connectortoolcallmetadata", + "ConnectorToolCallMetadataTypedDict": ".connectortoolcallmetadata", + "ConnectorToolCallResponse": ".connectortoolcallresponse", + "ConnectorToolCallResponseContent": ".connectortoolcallresponse", + "ConnectorToolCallResponseContentTypedDict": ".connectortoolcallresponse", + "ConnectorToolCallResponseTypedDict": ".connectortoolcallresponse", + "UnknownConnectorToolCallResponseContent": ".connectortoolcallresponse", + "ConnectorToolLocale": ".connectortoollocale", + "ConnectorToolLocaleTypedDict": ".connectortoollocale", + "ConnectorToolResultMetadata": ".connectortoolresultmetadata", + "ConnectorToolResultMetadataTypedDict": ".connectortoolresultmetadata", "ContentChunk": ".contentchunk", "ContentChunkTypedDict": ".contentchunk", "UnknownContentChunk": ".contentchunk", @@ -1878,6 +2714,8 @@ "ConversationInputsTypedDict": ".conversationinputs", "ConversationMessages": ".conversationmessages", "ConversationMessagesTypedDict": ".conversationmessages", + "ConversationPayload": ".conversationpayload", + "ConversationPayloadTypedDict": ".conversationpayload", "ConversationRequest": ".conversationrequest", "ConversationRequestAgentVersion": ".conversationrequest", "ConversationRequestAgentVersionTypedDict": ".conversationrequest", @@ -1886,9 +2724,11 @@ "ConversationRequestToolTypedDict": ".conversationrequest", "ConversationRequestTypedDict": ".conversationrequest", "ConversationResponse": ".conversationresponse", + "ConversationResponseOutput": ".conversationresponse", + "ConversationResponseOutputTypedDict": ".conversationresponse", "ConversationResponseTypedDict": ".conversationresponse", - "Output": ".conversationresponse", - "OutputTypedDict": ".conversationresponse", + "Guardrail": ".conversationresponse", + "GuardrailTypedDict": ".conversationresponse", "ConversationRestartRequest": ".conversationrestartrequest", "ConversationRestartRequestAgentVersion": ".conversationrestartrequest", "ConversationRestartRequestAgentVersionTypedDict": ".conversationrestartrequest", @@ -1899,6 +2739,7 @@ "ConversationRestartStreamRequestAgentVersionTypedDict": ".conversationrestartstreamrequest", "ConversationRestartStreamRequestHandoffExecution": ".conversationrestartstreamrequest", "ConversationRestartStreamRequestTypedDict": ".conversationrestartstreamrequest", + "ConversationSource": ".conversationsource", "ConversationStreamRequest": ".conversationstreamrequest", "ConversationStreamRequestAgentVersion": ".conversationstreamrequest", "ConversationStreamRequestAgentVersionTypedDict": ".conversationstreamrequest", @@ -1906,18 +2747,24 @@ "ConversationStreamRequestTool": ".conversationstreamrequest", "ConversationStreamRequestToolTypedDict": ".conversationstreamrequest", "ConversationStreamRequestTypedDict": ".conversationstreamrequest", - "ConversationThinkChunk": ".conversationthinkchunk", - "ConversationThinkChunkThinking": ".conversationthinkchunk", - "ConversationThinkChunkThinkingTypedDict": ".conversationthinkchunk", - "ConversationThinkChunkTypedDict": ".conversationthinkchunk", "ConversationUsageInfo": ".conversationusageinfo", "ConversationUsageInfoTypedDict": ".conversationusageinfo", + "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest": ".create_dataset_record_v1_observability_datasets_dataset_id_records_postop", + "CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict": ".create_dataset_record_v1_observability_datasets_dataset_id_records_postop", "CreateAgentRequest": ".createagentrequest", "CreateAgentRequestTool": ".createagentrequest", "CreateAgentRequestToolTypedDict": ".createagentrequest", "CreateAgentRequestTypedDict": ".createagentrequest", "CreateBatchJobRequest": ".createbatchjobrequest", "CreateBatchJobRequestTypedDict": ".createbatchjobrequest", + "CreateCampaignRequest": ".createcampaignrequest", + "CreateCampaignRequestTypedDict": ".createcampaignrequest", + "CreateConnectorRequest": ".createconnectorrequest", + "CreateConnectorRequestTypedDict": ".createconnectorrequest", + "CreateDatasetRecordRequest": ".createdatasetrecordrequest", + "CreateDatasetRecordRequestTypedDict": ".createdatasetrecordrequest", + "CreateDatasetRequest": ".createdatasetrequest", + "CreateDatasetRequestTypedDict": ".createdatasetrequest", "CreateFileResponse": ".createfileresponse", "CreateFileResponseTypedDict": ".createfileresponse", "CreateFineTuningJobRequest": ".createfinetuningjobrequest", @@ -1928,14 +2775,38 @@ "CreateFineTuningJobRequestTypedDict": ".createfinetuningjobrequest", "Hyperparameters": ".createfinetuningjobrequest", "HyperparametersTypedDict": ".createfinetuningjobrequest", + "CreateGithubRepositoryRequest": ".creategithubrepositoryrequest", + "CreateGithubRepositoryRequestTypedDict": ".creategithubrepositoryrequest", + "CreateJudgeRequest": ".createjudgerequest", + "CreateJudgeRequestOutput": ".createjudgerequest", + "CreateJudgeRequestOutputTypedDict": ".createjudgerequest", + "CreateJudgeRequestTypedDict": ".createjudgerequest", "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", + "Dataset": ".dataset", + "DatasetTypedDict": ".dataset", + "DatasetImportTask": ".datasetimporttask", + "DatasetImportTaskTypedDict": ".datasetimporttask", + "DatasetPreview": ".datasetpreview", + "DatasetPreviewTypedDict": ".datasetpreview", + "DatasetRecord": ".datasetrecord", + "DatasetRecordTypedDict": ".datasetrecord", + "DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest": ".delete_campaign_v1_observability_campaigns_campaign_id_deleteop", + "DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequestTypedDict": ".delete_campaign_v1_observability_campaigns_campaign_id_deleteop", + "DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest": ".delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop", + "DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequestTypedDict": ".delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop", + "DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequest": ".delete_dataset_v1_observability_datasets_dataset_id_deleteop", + "DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequestTypedDict": ".delete_dataset_v1_observability_datasets_dataset_id_deleteop", + "DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequest": ".delete_judge_v1_observability_judges_judge_id_deleteop", + "DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequestTypedDict": ".delete_judge_v1_observability_judges_judge_id_deleteop", "DeleteModelV1ModelsModelIDDeleteRequest": ".delete_model_v1_models_model_id_deleteop", "DeleteModelV1ModelsModelIDDeleteRequestTypedDict": ".delete_model_v1_models_model_id_deleteop", + "DeleteDatasetRecordsRequest": ".deletedatasetrecordsrequest", + "DeleteDatasetRecordsRequestTypedDict": ".deletedatasetrecordsrequest", "DeleteFileResponse": ".deletefileresponse", "DeleteFileResponseTypedDict": ".deletefileresponse", - "DeleteModelOut": ".deletemodelout", - "DeleteModelOutTypedDict": ".deletemodelout", + "DeleteModelResponse": ".deletemodelresponse", + "DeleteModelResponseTypedDict": ".deletemodelresponse", "DeltaMessage": ".deltamessage", "DeltaMessageContent": ".deltamessage", "DeltaMessageContentTypedDict": ".deltamessage", @@ -1948,6 +2819,10 @@ "DocumentTextContentTypedDict": ".documenttextcontent", "DocumentURLChunk": ".documenturlchunk", "DocumentURLChunkTypedDict": ".documenturlchunk", + "EmbeddedResource": ".embeddedresource", + "EmbeddedResourceTypedDict": ".embeddedresource", + "Resource": ".embeddedresource", + "ResourceTypedDict": ".embeddedresource", "EmbeddingDtype": ".embeddingdtype", "EmbeddingRequest": ".embeddingrequest", "EmbeddingRequestInputs": ".embeddingrequest", @@ -1961,6 +2836,28 @@ "EntityType": ".entitytype", "Event": ".event", "EventTypedDict": ".event", + "ExecutionConfig": ".executionconfig", + "ExecutionConfigTypedDict": ".executionconfig", + "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest": ".export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop", + "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict": ".export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop", + "ExportDatasetResponse": ".exportdatasetresponse", + "ExportDatasetResponseTypedDict": ".exportdatasetresponse", + "FeedResultChatCompletionEventPreview": ".feedresultchatcompletioneventpreview", + "FeedResultChatCompletionEventPreviewTypedDict": ".feedresultchatcompletioneventpreview", + "FetchCampaignStatusResponse": ".fetchcampaignstatusresponse", + "FetchCampaignStatusResponseTypedDict": ".fetchcampaignstatusresponse", + "FetchChatCompletionFieldOptionsResponse": ".fetchchatcompletionfieldoptionsresponse", + "FetchChatCompletionFieldOptionsResponseTypedDict": ".fetchchatcompletionfieldoptionsresponse", + "Option": ".fetchchatcompletionfieldoptionsresponse", + "OptionTypedDict": ".fetchchatcompletionfieldoptionsresponse", + "FetchFieldOptionCountsRequest": ".fetchfieldoptioncountsrequest", + "FetchFieldOptionCountsRequestTypedDict": ".fetchfieldoptioncountsrequest", + "FetchFieldOptionCountsResponse": ".fetchfieldoptioncountsresponse", + "FetchFieldOptionCountsResponseTypedDict": ".fetchfieldoptioncountsresponse", + "FieldGroup": ".fieldgroup", + "FieldGroupTypedDict": ".fieldgroup", + "FieldOptionCountItem": ".fieldoptioncountitem", + "FieldOptionCountItemTypedDict": ".fieldoptioncountitem", "File": ".file", "FileTypedDict": ".file", "FileChunk": ".filechunk", @@ -1976,10 +2873,19 @@ "FilesAPIRoutesListFilesRequestTypedDict": ".files_api_routes_list_filesop", "FilesAPIRoutesRetrieveFileRequest": ".files_api_routes_retrieve_fileop", "FilesAPIRoutesRetrieveFileRequestTypedDict": ".files_api_routes_retrieve_fileop", + "FilesAPIRoutesUploadFileFileVisibility": ".files_api_routes_upload_fileop", "MultiPartBodyParams": ".files_api_routes_upload_fileop", "MultiPartBodyParamsTypedDict": ".files_api_routes_upload_fileop", "FileSchema": ".fileschema", "FileSchemaTypedDict": ".fileschema", + "FileVisibility": ".filevisibility", + "FilterCondition": ".filtercondition", + "FilterConditionTypedDict": ".filtercondition", + "Op": ".filtercondition", + "FilterPayload": ".filterpayload", + "FilterPayloadTypedDict": ".filterpayload", + "Filters": ".filterpayload", + "FiltersTypedDict": ".filterpayload", "FIMCompletionRequest": ".fimcompletionrequest", "FIMCompletionRequestStop": ".fimcompletionrequest", "FIMCompletionRequestStopTypedDict": ".fimcompletionrequest", @@ -2016,14 +2922,51 @@ "FunctionResultEntryTypedDict": ".functionresultentry", "FunctionTool": ".functiontool", "FunctionToolTypedDict": ".functiontool", + "GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequest": ".get_campaign_by_id_v1_observability_campaigns_campaign_id_getop", + "GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequestTypedDict": ".get_campaign_by_id_v1_observability_campaigns_campaign_id_getop", + "GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequest": ".get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop", + "GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequestTypedDict": ".get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop", + "GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequest": ".get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop", + "GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequestTypedDict": ".get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop", + "GetCampaignsV1ObservabilityCampaignsGetRequest": ".get_campaigns_v1_observability_campaigns_getop", + "GetCampaignsV1ObservabilityCampaignsGetRequestTypedDict": ".get_campaigns_v1_observability_campaigns_getop", + "GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequest": ".get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop", + "GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequestTypedDict": ".get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop", + "GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest": ".get_chat_completion_events_v1_observability_chat_completion_events_search_postop", + "GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequestTypedDict": ".get_chat_completion_events_v1_observability_chat_completion_events_search_postop", + "GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest": ".get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop", + "GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequestTypedDict": ".get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop", + "GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest": ".get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop", + "GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequestTypedDict": ".get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop", + "Operator": ".get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop", + "GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequest": ".get_dataset_by_id_v1_observability_datasets_dataset_id_getop", + "GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequestTypedDict": ".get_dataset_by_id_v1_observability_datasets_dataset_id_getop", + "GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequest": ".get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop", + "GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequestTypedDict": ".get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop", + "GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequest": ".get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop", + "GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequestTypedDict": ".get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop", + "GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequest": ".get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop", + "GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequestTypedDict": ".get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop", + "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequest": ".get_dataset_records_v1_observability_datasets_dataset_id_records_getop", + "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict": ".get_dataset_records_v1_observability_datasets_dataset_id_records_getop", + "GetDatasetsV1ObservabilityDatasetsGetRequest": ".get_datasets_v1_observability_datasets_getop", + "GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict": ".get_datasets_v1_observability_datasets_getop", + "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest": ".get_judge_by_id_v1_observability_judges_judge_id_getop", + "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict": ".get_judge_by_id_v1_observability_judges_judge_id_getop", + "GetJudgesV1ObservabilityJudgesGetRequest": ".get_judges_v1_observability_judges_getop", + "GetJudgesV1ObservabilityJudgesGetRequestTypedDict": ".get_judges_v1_observability_judges_getop", + "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", + "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetFileResponse": ".getfileresponse", "GetFileResponseTypedDict": ".getfileresponse", "GetSignedURLResponse": ".getsignedurlresponse", "GetSignedURLResponseTypedDict": ".getsignedurlresponse", "GithubRepository": ".githubrepository", "GithubRepositoryTypedDict": ".githubrepository", - "GithubRepositoryIn": ".githubrepositoryin", - "GithubRepositoryInTypedDict": ".githubrepositoryin", + "GuardrailConfig": ".guardrailconfig", + "GuardrailConfigTypedDict": ".guardrailconfig", + "ImageContent": ".imagecontent", + "ImageContentTypedDict": ".imagecontent", "ImageDetail": ".imagedetail", "ImageGenerationTool": ".imagegenerationtool", "ImageGenerationToolTypedDict": ".imagegenerationtool", @@ -2033,6 +2976,16 @@ "ImageURLChunkTypedDict": ".imageurlchunk", "ImageURLUnion": ".imageurlchunk", "ImageURLUnionTypedDict": ".imageurlchunk", + "ImportDatasetFromCampaignRequest": ".importdatasetfromcampaignrequest", + "ImportDatasetFromCampaignRequestTypedDict": ".importdatasetfromcampaignrequest", + "ImportDatasetFromDatasetRequest": ".importdatasetfromdatasetrequest", + "ImportDatasetFromDatasetRequestTypedDict": ".importdatasetfromdatasetrequest", + "ImportDatasetFromExplorerRequest": ".importdatasetfromexplorerrequest", + "ImportDatasetFromExplorerRequestTypedDict": ".importdatasetfromexplorerrequest", + "ImportDatasetFromFileRequest": ".importdatasetfromfilerequest", + "ImportDatasetFromFileRequestTypedDict": ".importdatasetfromfilerequest", + "ImportDatasetFromPlaygroundRequest": ".importdatasetfromplaygroundrequest", + "ImportDatasetFromPlaygroundRequestTypedDict": ".importdatasetfromplaygroundrequest", "InputEntries": ".inputentries", "InputEntriesTypedDict": ".inputentries", "Inputs": ".inputs", @@ -2084,6 +3037,30 @@ "UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse": ".jobs_api_routes_fine_tuning_update_fine_tuned_modelop", "JSONSchema": ".jsonschema", "JSONSchemaTypedDict": ".jsonschema", + "Judge": ".judge", + "JudgeOutputUnion": ".judge", + "JudgeOutputUnionTypedDict": ".judge", + "JudgeTypedDict": ".judge", + "UnknownJudgeOutputUnion": ".judge", + "JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest": ".judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop", + "JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequestTypedDict": ".judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop", + "JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest": ".judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop", + "JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequestTypedDict": ".judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop", + "JudgeChatCompletionEventRequest": ".judgechatcompletioneventrequest", + "JudgeChatCompletionEventRequestTypedDict": ".judgechatcompletioneventrequest", + "JudgeClassificationOutput": ".judgeclassificationoutput", + "JudgeClassificationOutputTypedDict": ".judgeclassificationoutput", + "JudgeClassificationOutputOption": ".judgeclassificationoutputoption", + "JudgeClassificationOutputOptionTypedDict": ".judgeclassificationoutputoption", + "JudgeDatasetRecordRequest": ".judgedatasetrecordrequest", + "JudgeDatasetRecordRequestTypedDict": ".judgedatasetrecordrequest", + "Answer": ".judgeoutput", + "AnswerTypedDict": ".judgeoutput", + "JudgeOutput": ".judgeoutput", + "JudgeOutputTypedDict": ".judgeoutput", + "JudgeOutputType": ".judgeoutputtype", + "JudgeRegressionOutput": ".judgeregressionoutput", + "JudgeRegressionOutputTypedDict": ".judgeregressionoutput", "LegacyJobMetadata": ".legacyjobmetadata", "LegacyJobMetadataTypedDict": ".legacyjobmetadata", "LibrariesDeleteV1Request": ".libraries_delete_v1op", @@ -2122,8 +3099,22 @@ "LibrariesUpdateV1RequestTypedDict": ".libraries_update_v1op", "Library": ".library", "LibraryTypedDict": ".library", + "ListModelsV1ModelsGetRequest": ".list_models_v1_models_getop", + "ListModelsV1ModelsGetRequestTypedDict": ".list_models_v1_models_getop", "ListBatchJobsResponse": ".listbatchjobsresponse", "ListBatchJobsResponseTypedDict": ".listbatchjobsresponse", + "ListCampaignSelectedEventsResponse": ".listcampaignselectedeventsresponse", + "ListCampaignSelectedEventsResponseTypedDict": ".listcampaignselectedeventsresponse", + "ListCampaignsResponse": ".listcampaignsresponse", + "ListCampaignsResponseTypedDict": ".listcampaignsresponse", + "ListChatCompletionFieldsResponse": ".listchatcompletionfieldsresponse", + "ListChatCompletionFieldsResponseTypedDict": ".listchatcompletionfieldsresponse", + "ListDatasetImportTasksResponse": ".listdatasetimporttasksresponse", + "ListDatasetImportTasksResponseTypedDict": ".listdatasetimporttasksresponse", + "ListDatasetRecordsResponse": ".listdatasetrecordsresponse", + "ListDatasetRecordsResponseTypedDict": ".listdatasetrecordsresponse", + "ListDatasetsResponse": ".listdatasetsresponse", + "ListDatasetsResponseTypedDict": ".listdatasetsresponse", "ListDocumentsResponse": ".listdocumentsresponse", "ListDocumentsResponseTypedDict": ".listdocumentsresponse", "ListFilesResponse": ".listfilesresponse", @@ -2133,10 +3124,14 @@ "ListFineTuningJobsResponseDataTypedDict": ".listfinetuningjobsresponse", "ListFineTuningJobsResponseTypedDict": ".listfinetuningjobsresponse", "UnknownListFineTuningJobsResponseData": ".listfinetuningjobsresponse", + "ListJudgesResponse": ".listjudgesresponse", + "ListJudgesResponseTypedDict": ".listjudgesresponse", "ListLibrariesResponse": ".listlibrariesresponse", "ListLibrariesResponseTypedDict": ".listlibrariesresponse", - "ListSharingOut": ".listsharingout", - "ListSharingOutTypedDict": ".listsharingout", + "ListSharingResponse": ".listsharingresponse", + "ListSharingResponseTypedDict": ".listsharingresponse", + "MCPServerIcon": ".mcpservericon", + "MCPServerIconTypedDict": ".mcpservericon", "MessageEntries": ".messageentries", "MessageEntriesTypedDict": ".messageentries", "MessageInputContentChunks": ".messageinputcontentchunks", @@ -2156,6 +3151,8 @@ "MessageOutputEventContent": ".messageoutputevent", "MessageOutputEventContentTypedDict": ".messageoutputevent", "MessageOutputEventTypedDict": ".messageoutputevent", + "MessageResponse": ".messageresponse", + "MessageResponseTypedDict": ".messageresponse", "Metric": ".metric", "MetricTypedDict": ".metric", "MistralPromptMode": ".mistralpromptmode", @@ -2171,10 +3168,18 @@ "ModelListDataTypedDict": ".modellist", "ModelListTypedDict": ".modellist", "UnknownModelListData": ".modellist", + "ModerationLlmv1Action": ".moderationllmv1action", + "ModerationLlmv1CategoryThresholds": ".moderationllmv1categorythresholds", + "ModerationLlmv1CategoryThresholdsTypedDict": ".moderationllmv1categorythresholds", + "ModerationLlmv1Config": ".moderationllmv1config", + "ModerationLlmv1ConfigTypedDict": ".moderationllmv1config", "ModerationObject": ".moderationobject", "ModerationObjectTypedDict": ".moderationobject", "ModerationResponse": ".moderationresponse", "ModerationResponseTypedDict": ".moderationresponse", + "ObservabilityErrorCode": ".observabilityerrorcode", + "ObservabilityErrorDetail": ".observabilityerrordetail", + "ObservabilityErrorDetailTypedDict": ".observabilityerrordetail", "OCRImageObject": ".ocrimageobject", "OCRImageObjectTypedDict": ".ocrimageobject", "OCRPageDimensions": ".ocrpagedimensions", @@ -2195,12 +3200,38 @@ "OCRUsageInfoTypedDict": ".ocrusageinfo", "OutputContentChunks": ".outputcontentchunks", "OutputContentChunksTypedDict": ".outputcontentchunks", + "PaginatedConnectors": ".paginatedconnectors", + "PaginatedConnectorsTypedDict": ".paginatedconnectors", + "PaginatedResultCampaignPreview": ".paginatedresultcampaignpreview", + "PaginatedResultCampaignPreviewTypedDict": ".paginatedresultcampaignpreview", + "PaginatedResultChatCompletionEventPreview": ".paginatedresultchatcompletioneventpreview", + "PaginatedResultChatCompletionEventPreviewTypedDict": ".paginatedresultchatcompletioneventpreview", + "PaginatedResultDatasetImportTask": ".paginatedresultdatasetimporttask", + "PaginatedResultDatasetImportTaskTypedDict": ".paginatedresultdatasetimporttask", + "PaginatedResultDatasetPreview": ".paginatedresultdatasetpreview", + "PaginatedResultDatasetPreviewTypedDict": ".paginatedresultdatasetpreview", + "PaginatedResultDatasetRecord": ".paginatedresultdatasetrecord", + "PaginatedResultDatasetRecordTypedDict": ".paginatedresultdatasetrecord", + "PaginatedResultJudgePreview": ".paginatedresultjudgepreview", + "PaginatedResultJudgePreviewTypedDict": ".paginatedresultjudgepreview", "PaginationInfo": ".paginationinfo", "PaginationInfoTypedDict": ".paginationinfo", + "PaginationResponse": ".paginationresponse", + "PaginationResponseTypedDict": ".paginationresponse", + "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest": ".post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop", + "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequestTypedDict": ".post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop", + "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest": ".post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop", + "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequestTypedDict": ".post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop", + "PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequest": ".post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop", + "PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequestTypedDict": ".post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop", + "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest": ".post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop", + "PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequestTypedDict": ".post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop", + "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest": ".post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop", + "PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict": ".post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop", "Prediction": ".prediction", "PredictionTypedDict": ".prediction", - "ProcessingStatusOut": ".processingstatusout", - "ProcessingStatusOutTypedDict": ".processingstatusout", + "ProcessingStatus": ".processingstatus", + "ProcessingStatusTypedDict": ".processingstatus", "ProcessStatus": ".processstatus", "RealtimeTranscriptionError": ".realtimetranscriptionerror", "RealtimeTranscriptionErrorTypedDict": ".realtimetranscriptionerror", @@ -2227,6 +3258,9 @@ "ReferenceChunk": ".referencechunk", "ReferenceChunkTypedDict": ".referencechunk", "RequestSource": ".requestsource", + "ResourceLink": ".resourcelink", + "ResourceLinkTypedDict": ".resourcelink", + "ResourceVisibility": ".resourcevisibility", "ResponseDoneEvent": ".responsedoneevent", "ResponseDoneEventTypedDict": ".responsedoneevent", "ResponseErrorEvent": ".responseerrorevent", @@ -2242,15 +3276,23 @@ "RetrieveModelV1ModelsModelIDGetRequestTypedDict": ".retrieve_model_v1_models_model_id_getop", "UnknownResponseRetrieveModelV1ModelsModelIDGet": ".retrieve_model_v1_models_model_id_getop", "SampleType": ".sampletype", + "SearchChatCompletionEventIdsRequest": ".searchchatcompletioneventidsrequest", + "SearchChatCompletionEventIdsRequestTypedDict": ".searchchatcompletioneventidsrequest", + "SearchChatCompletionEventIdsResponse": ".searchchatcompletioneventidsresponse", + "SearchChatCompletionEventIdsResponseTypedDict": ".searchchatcompletioneventidsresponse", + "SearchChatCompletionEventsRequest": ".searchchatcompletioneventsrequest", + "SearchChatCompletionEventsRequestTypedDict": ".searchchatcompletioneventsrequest", + "SearchChatCompletionEventsResponse": ".searchchatcompletioneventsresponse", + "SearchChatCompletionEventsResponseTypedDict": ".searchchatcompletioneventsresponse", "Security": ".security", "SecurityTypedDict": ".security", "ShareEnum": ".shareenum", + "Sharing": ".sharing", + "SharingTypedDict": ".sharing", "SharingDelete": ".sharingdelete", "SharingDeleteTypedDict": ".sharingdelete", - "SharingIn": ".sharingin", - "SharingInTypedDict": ".sharingin", - "SharingOut": ".sharingout", - "SharingOutTypedDict": ".sharingout", + "SharingRequest": ".sharingrequest", + "SharingRequestTypedDict": ".sharingrequest", "Source": ".source", "SSETypes": ".ssetypes", "SystemMessage": ".systemmessage", @@ -2261,10 +3303,14 @@ "SystemMessageContentChunksTypedDict": ".systemmessagecontentchunks", "TextChunk": ".textchunk", "TextChunkTypedDict": ".textchunk", + "TextContent": ".textcontent", + "TextContentTypedDict": ".textcontent", + "TextResourceContents": ".textresourcecontents", + "TextResourceContentsTypedDict": ".textresourcecontents", "ThinkChunk": ".thinkchunk", - "ThinkChunkThinking": ".thinkchunk", - "ThinkChunkThinkingTypedDict": ".thinkchunk", "ThinkChunkTypedDict": ".thinkchunk", + "Thinking": ".thinkchunk", + "ThinkingTypedDict": ".thinkchunk", "TimestampGranularity": ".timestampgranularity", "Tool": ".tool", "ToolTypedDict": ".tool", @@ -2329,14 +3375,34 @@ "TranscriptionStreamTextDeltaTypedDict": ".transcriptionstreamtextdelta", "UnarchiveModelResponse": ".unarchivemodelresponse", "UnarchiveModelResponseTypedDict": ".unarchivemodelresponse", + "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest": ".update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop", + "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequestTypedDict": ".update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop", + "UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest": ".update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop", + "UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequestTypedDict": ".update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop", + "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest": ".update_dataset_v1_observability_datasets_dataset_id_patchop", + "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict": ".update_dataset_v1_observability_datasets_dataset_id_patchop", + "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest": ".update_judge_v1_observability_judges_judge_id_putop", + "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateAgentRequest": ".updateagentrequest", "UpdateAgentRequestTool": ".updateagentrequest", "UpdateAgentRequestToolTypedDict": ".updateagentrequest", "UpdateAgentRequestTypedDict": ".updateagentrequest", + "UpdateConnectorRequest": ".updateconnectorrequest", + "UpdateConnectorRequestTypedDict": ".updateconnectorrequest", + "UpdateDatasetRecordPayloadRequest": ".updatedatasetrecordpayloadrequest", + "UpdateDatasetRecordPayloadRequestTypedDict": ".updatedatasetrecordpayloadrequest", + "UpdateDatasetRecordPropertiesRequest": ".updatedatasetrecordpropertiesrequest", + "UpdateDatasetRecordPropertiesRequestTypedDict": ".updatedatasetrecordpropertiesrequest", + "UpdateDatasetRequest": ".updatedatasetrequest", + "UpdateDatasetRequestTypedDict": ".updatedatasetrequest", "Attributes": ".updatedocumentrequest", "AttributesTypedDict": ".updatedocumentrequest", "UpdateDocumentRequest": ".updatedocumentrequest", "UpdateDocumentRequestTypedDict": ".updatedocumentrequest", + "UpdateJudgeRequest": ".updatejudgerequest", + "UpdateJudgeRequestOutput": ".updatejudgerequest", + "UpdateJudgeRequestOutputTypedDict": ".updatejudgerequest", + "UpdateJudgeRequestTypedDict": ".updatejudgerequest", "UpdateLibraryRequest": ".updatelibraryrequest", "UpdateLibraryRequestTypedDict": ".updatelibraryrequest", "UpdateModelRequest": ".updatemodelrequest", @@ -2347,6 +3413,8 @@ "UserMessageContent": ".usermessage", "UserMessageContentTypedDict": ".usermessage", "UserMessageTypedDict": ".usermessage", + "Context": ".validationerror", + "ContextTypedDict": ".validationerror", "Loc": ".validationerror", "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 686a6eb8..1fa27f08 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -6,6 +6,7 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict @@ -98,6 +99,7 @@ class AgentTypedDict(TypedDict): r"""List of tools which are available to the model during the conversation.""" completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] metadata: NotRequired[Nullable[Dict[str, Any]]] @@ -133,6 +135,8 @@ class Agent(BaseModel): completion_args: Optional[CompletionArgs] = None r"""White-listed arguments from the completion API""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + description: OptionalNullable[str] = UNSET handoffs: OptionalNullable[List[str]] = UNSET @@ -153,6 +157,7 @@ def serialize_model(self, handler): "instructions", "tools", "completion_args", + "guardrails", "description", "handoffs", "metadata", @@ -161,7 +166,14 @@ def serialize_model(self, handler): ] ) nullable_fields = set( - ["instructions", "description", "handoffs", "metadata", "version_message"] + [ + "instructions", + "guardrails", + "description", + "handoffs", + "metadata", + "version_message", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/annotations.py b/src/mistralai/client/models/annotations.py new file mode 100644 index 00000000..ba085e2c --- /dev/null +++ b/src/mistralai/client/models/annotations.py @@ -0,0 +1,77 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3ae9e07de11d + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List, Literal, Union +from typing_extensions import NotRequired, TypedDict + + +Audience = Union[ + Literal[ + "user", + "assistant", + ], + UnrecognizedStr, +] + + +class AnnotationsTypedDict(TypedDict): + audience: NotRequired[Nullable[List[Audience]]] + priority: NotRequired[Nullable[float]] + + +class Annotations(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + audience: OptionalNullable[List[Audience]] = UNSET + + priority: OptionalNullable[float] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["audience", "priority"]) + nullable_fields = set(["audience", "priority"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/audiocontent.py b/src/mistralai/client/models/audiocontent.py new file mode 100644 index 00000000..b0a9505b --- /dev/null +++ b/src/mistralai/client/models/audiocontent.py @@ -0,0 +1,94 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8e39736e73f0 + +from __future__ import annotations +from .annotations import Annotations, AnnotationsTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Any, Dict, Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AudioContentTypedDict(TypedDict): + r"""Audio content for a message.""" + + data: str + mime_type: str + type: Literal["audio"] + annotations: NotRequired[Nullable[AnnotationsTypedDict]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class AudioContent(BaseModel): + r"""Audio content for a message.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + data: str + + mime_type: Annotated[str, pydantic.Field(alias="mimeType")] + + type: Annotated[ + Annotated[Literal["audio"], AfterValidator(validate_const("audio"))], + pydantic.Field(alias="type"), + ] = "audio" + + annotations: OptionalNullable[Annotations] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["annotations", "_meta"]) + nullable_fields = set(["annotations", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + AudioContent.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/audiourl.py b/src/mistralai/client/models/audiourl.py new file mode 100644 index 00000000..98fef977 --- /dev/null +++ b/src/mistralai/client/models/audiourl.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f62d73a27faa + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class AudioURLTypedDict(TypedDict): + r"""Audio URL. + + Attributes: + url: The URL of the audio file. + """ + + url: str + + +class AudioURL(BaseModel): + r"""Audio URL. + + Attributes: + url: The URL of the audio file. + """ + + url: str diff --git a/src/mistralai/client/models/audiourlchunk.py b/src/mistralai/client/models/audiourlchunk.py new file mode 100644 index 00000000..89ebce79 --- /dev/null +++ b/src/mistralai/client/models/audiourlchunk.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f582b26db67b + +from __future__ import annotations +from .audiourl import AudioURL, AudioURLTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +AudioURLUnionTypedDict = TypeAliasType( + "AudioURLUnionTypedDict", Union[AudioURLTypedDict, str] +) + + +AudioURLUnion = TypeAliasType("AudioURLUnion", Union[AudioURL, str]) + + +class AudioURLChunkTypedDict(TypedDict): + r"""Audio URL chunk. + + Attributes: + type: The type of the chunk, which is always `ChunkTypes.audio_url`. + audio_url: The URL of the audio file. + """ + + audio_url: AudioURLUnionTypedDict + type: Literal["audio_url"] + + +class AudioURLChunk(BaseModel): + r"""Audio URL chunk. + + Attributes: + type: The type of the chunk, which is always `ChunkTypes.audio_url`. + audio_url: The URL of the audio file. + """ + + audio_url: AudioURLUnion + + type: Annotated[ + Annotated[Literal["audio_url"], AfterValidator(validate_const("audio_url"))], + pydantic.Field(alias="type"), + ] = "audio_url" + + +try: + AudioURLChunk.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/authdata.py b/src/mistralai/client/models/authdata.py new file mode 100644 index 00000000..fb8b7972 --- /dev/null +++ b/src/mistralai/client/models/authdata.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b4d3fb07196e + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class AuthDataTypedDict(TypedDict): + client_id: str + client_secret: str + + +class AuthData(BaseModel): + client_id: str + + client_secret: str diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py new file mode 100644 index 00000000..f8b8faf7 --- /dev/null +++ b/src/mistralai/client/models/basefielddefinition.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ffa42818fea3 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from pydantic import model_serializer +from typing import List, Literal, Union +from typing_extensions import NotRequired, TypedDict + + +TypeEnum = Union[ + Literal[ + "ENUM", + "TEXT", + "INT", + "FLOAT", + "BOOL", + "TIMESTAMP", + "ARRAY", + ], + UnrecognizedStr, +] + + +SupportedOperator = Union[ + Literal[ + "lt", + "lte", + "gt", + "gte", + "startswith", + "istartswith", + "endswith", + "iendswith", + "contains", + "icontains", + "matches", + "notcontains", + "inotcontains", + "eq", + "neq", + "isnull", + "includes", + "excludes", + "len_eq", + ], + UnrecognizedStr, +] + + +class BaseFieldDefinitionTypedDict(TypedDict): + name: str + label: str + type: TypeEnum + supported_operators: List[SupportedOperator] + group: NotRequired[Nullable[str]] + + +class BaseFieldDefinition(BaseModel): + name: str + + label: str + + type: TypeEnum + + supported_operators: List[SupportedOperator] + + group: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["group"]) + nullable_fields = set(["group"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/basetaskstatus.py b/src/mistralai/client/models/basetaskstatus.py new file mode 100644 index 00000000..ff2f1c63 --- /dev/null +++ b/src/mistralai/client/models/basetaskstatus.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7b381554d5c7 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +BaseTaskStatus = Union[ + Literal[ + "RUNNING", + "COMPLETED", + "FAILED", + "CANCELED", + "TERMINATED", + "CONTINUED_AS_NEW", + "TIMED_OUT", + "UNKNOWN", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/blobresourcecontents.py b/src/mistralai/client/models/blobresourcecontents.py new file mode 100644 index 00000000..c2a55f95 --- /dev/null +++ b/src/mistralai/client/models/blobresourcecontents.py @@ -0,0 +1,87 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fa924bc295ad + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BlobResourceContentsTypedDict(TypedDict): + r"""Binary contents of a resource.""" + + uri: str + blob: str + mime_type: NotRequired[Nullable[str]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class BlobResourceContents(BaseModel): + r"""Binary contents of a resource.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + uri: str + + blob: str + + mime_type: Annotated[OptionalNullable[str], pydantic.Field(alias="mimeType")] = ( + UNSET + ) + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mimeType", "_meta"]) + nullable_fields = set(["mimeType", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + BlobResourceContents.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/campaign.py b/src/mistralai/client/models/campaign.py new file mode 100644 index 00000000..a52bfcb9 --- /dev/null +++ b/src/mistralai/client/models/campaign.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c91d862fb405 + +from __future__ import annotations +from .filterpayload import FilterPayload, FilterPayloadTypedDict +from .judge import Judge, JudgeTypedDict +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class CampaignTypedDict(TypedDict): + id: str + created_at: datetime + updated_at: datetime + deleted_at: Nullable[datetime] + name: str + owner_id: str + workspace_id: str + description: str + max_nb_events: int + search_params: FilterPayloadTypedDict + judge: JudgeTypedDict + + +class Campaign(BaseModel): + id: str + + created_at: datetime + + updated_at: datetime + + deleted_at: Nullable[datetime] + + name: str + + owner_id: str + + workspace_id: str + + description: str + + max_nb_events: int + + search_params: FilterPayload + + judge: Judge + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/chatcompletionevent.py b/src/mistralai/client/models/chatcompletionevent.py new file mode 100644 index 00000000..86253f5d --- /dev/null +++ b/src/mistralai/client/models/chatcompletionevent.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d85484d0205e + +from __future__ import annotations +from .chattranscriptionevent import ( + ChatTranscriptionEvent, + ChatTranscriptionEventTypedDict, +) +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable +from typing import Any, Dict, List, Union +from typing_extensions import TypeAliasType, TypedDict + + +ChatCompletionEventExtraFieldsTypedDict = TypeAliasType( + "ChatCompletionEventExtraFieldsTypedDict", + Union[bool, int, float, str, datetime, List[str]], +) + + +ChatCompletionEventExtraFields = TypeAliasType( + "ChatCompletionEventExtraFields", Union[bool, int, float, str, datetime, List[str]] +) + + +class ChatCompletionEventTypedDict(TypedDict): + event_id: str + correlation_id: str + created_at: datetime + extra_fields: Dict[str, Nullable[ChatCompletionEventExtraFieldsTypedDict]] + nb_input_tokens: int + nb_output_tokens: int + enabled_tools: List[Dict[str, Any]] + request_messages: List[Dict[str, Any]] + response_messages: List[Dict[str, Any]] + nb_messages: int + chat_transcription_events: List[ChatTranscriptionEventTypedDict] + + +class ChatCompletionEvent(BaseModel): + event_id: str + + correlation_id: str + + created_at: datetime + + extra_fields: Dict[str, Nullable[ChatCompletionEventExtraFields]] + + nb_input_tokens: int + + nb_output_tokens: int + + enabled_tools: List[Dict[str, Any]] + + request_messages: List[Dict[str, Any]] + + response_messages: List[Dict[str, Any]] + + nb_messages: int + + chat_transcription_events: List[ChatTranscriptionEvent] diff --git a/src/mistralai/client/models/chatcompletioneventpreview.py b/src/mistralai/client/models/chatcompletioneventpreview.py new file mode 100644 index 00000000..e7fef9d0 --- /dev/null +++ b/src/mistralai/client/models/chatcompletioneventpreview.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1cd843828e99 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable +from typing import Dict, List, Union +from typing_extensions import TypeAliasType, TypedDict + + +ChatCompletionEventPreviewExtraFieldsTypedDict = TypeAliasType( + "ChatCompletionEventPreviewExtraFieldsTypedDict", + Union[bool, int, float, str, datetime, List[str]], +) + + +ChatCompletionEventPreviewExtraFields = TypeAliasType( + "ChatCompletionEventPreviewExtraFields", + Union[bool, int, float, str, datetime, List[str]], +) + + +class ChatCompletionEventPreviewTypedDict(TypedDict): + event_id: str + correlation_id: str + created_at: datetime + extra_fields: Dict[str, Nullable[ChatCompletionEventPreviewExtraFieldsTypedDict]] + nb_input_tokens: int + nb_output_tokens: int + + +class ChatCompletionEventPreview(BaseModel): + event_id: str + + correlation_id: str + + created_at: datetime + + extra_fields: Dict[str, Nullable[ChatCompletionEventPreviewExtraFields]] + + nb_input_tokens: int + + nb_output_tokens: int diff --git a/src/mistralai/client/models/chattranscriptionevent.py b/src/mistralai/client/models/chattranscriptionevent.py new file mode 100644 index 00000000..b23adf74 --- /dev/null +++ b/src/mistralai/client/models/chattranscriptionevent.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8ca679b2c39a + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Any, Dict +from typing_extensions import TypedDict + + +class ChatTranscriptionEventTypedDict(TypedDict): + audio_url: str + model: str + response_message: Dict[str, Any] + + +class ChatTranscriptionEvent(BaseModel): + audio_url: str + + model: str + + response_message: Dict[str, Any] diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py new file mode 100644 index 00000000..967e454f --- /dev/null +++ b/src/mistralai/client/models/connector.py @@ -0,0 +1,70 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1a4facac922d + +from __future__ import annotations +from .connectortool import ConnectorTool, ConnectorToolTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ConnectorTypedDict(TypedDict): + id: str + name: str + description: str + created_at: datetime + modified_at: datetime + server: NotRequired[Nullable[str]] + auth_type: NotRequired[Nullable[str]] + tools: NotRequired[Nullable[List[ConnectorToolTypedDict]]] + + +class Connector(BaseModel): + id: str + + name: str + + description: str + + created_at: datetime + + modified_at: datetime + + server: OptionalNullable[str] = UNSET + + auth_type: OptionalNullable[str] = UNSET + + tools: OptionalNullable[List[ConnectorTool]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["server", "auth_type", "tools"]) + nullable_fields = set(["server", "auth_type", "tools"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_call_tool_v1op.py b/src/mistralai/client/models/connector_call_tool_v1op.py new file mode 100644 index 00000000..df5783d0 --- /dev/null +++ b/src/mistralai/client/models/connector_call_tool_v1op.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7948899b3068 + +from __future__ import annotations +from .connectorcalltoolrequest import ( + ConnectorCallToolRequest, + ConnectorCallToolRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorCallToolV1RequestTypedDict(TypedDict): + tool_name: str + connector_id_or_name: str + connector_call_tool_request: ConnectorCallToolRequestTypedDict + + +class ConnectorCallToolV1Request(BaseModel): + tool_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_call_tool_request: Annotated[ + ConnectorCallToolRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connector_delete_v1op.py b/src/mistralai/client/models/connector_delete_v1op.py new file mode 100644 index 00000000..74134361 --- /dev/null +++ b/src/mistralai/client/models/connector_delete_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a377930b1435 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeleteV1RequestTypedDict(TypedDict): + connector_id: str + + +class ConnectorDeleteV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_get_v1op.py b/src/mistralai/client/models/connector_get_v1op.py new file mode 100644 index 00000000..5770ee09 --- /dev/null +++ b/src/mistralai/client/models/connector_get_v1op.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 73ca3a446dcc + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorGetV1RequestTypedDict(TypedDict): + connector_id_or_name: str + fetch_customer_data: NotRequired[bool] + r"""Fetch the customer data associated with the connector (e.g. customer secrets / config).""" + fetch_connection_secrets: NotRequired[bool] + r"""Fetch the general connection secrets associated with the connector.""" + + +class ConnectorGetV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + fetch_customer_data: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Fetch the customer data associated with the connector (e.g. customer secrets / config).""" + + fetch_connection_secrets: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Fetch the general connection secrets associated with the connector.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["fetch_customer_data", "fetch_connection_secrets"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_list_v1op.py b/src/mistralai/client/models/connector_list_v1op.py new file mode 100644 index 00000000..a89da710 --- /dev/null +++ b/src/mistralai/client/models/connector_list_v1op.py @@ -0,0 +1,67 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5ec0889995f5 + +from __future__ import annotations +from .connectorsqueryfilters import ( + ConnectorsQueryFilters, + ConnectorsQueryFiltersTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorListV1RequestTypedDict(TypedDict): + query_filters: NotRequired[ConnectorsQueryFiltersTypedDict] + cursor: NotRequired[Nullable[str]] + page_size: NotRequired[int] + + +class ConnectorListV1Request(BaseModel): + query_filters: Annotated[ + Optional[ConnectorsQueryFilters], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 100 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["query_filters", "cursor", "page_size"]) + nullable_fields = set(["cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_update_v1op.py b/src/mistralai/client/models/connector_update_v1op.py new file mode 100644 index 00000000..6b00d0b0 --- /dev/null +++ b/src/mistralai/client/models/connector_update_v1op.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6f884d18ac56 + +from __future__ import annotations +from .updateconnectorrequest import ( + UpdateConnectorRequest, + UpdateConnectorRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorUpdateV1RequestTypedDict(TypedDict): + connector_id: str + update_connector_request: UpdateConnectorRequestTypedDict + + +class ConnectorUpdateV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_connector_request: Annotated[ + UpdateConnectorRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connectorcalltoolrequest.py b/src/mistralai/client/models/connectorcalltoolrequest.py new file mode 100644 index 00000000..4e9a4d45 --- /dev/null +++ b/src/mistralai/client/models/connectorcalltoolrequest.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7dc7ec295301 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class ConnectorCallToolRequestTypedDict(TypedDict): + r"""Request body for calling an MCP tool.""" + + arguments: NotRequired[Dict[str, Any]] + + +class ConnectorCallToolRequest(BaseModel): + r"""Request body for calling an MCP tool.""" + + arguments: Optional[Dict[str, Any]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["arguments"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/connectorsqueryfilters.py b/src/mistralai/client/models/connectorsqueryfilters.py new file mode 100644 index 00000000..1aea18b0 --- /dev/null +++ b/src/mistralai/client/models/connectorsqueryfilters.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3b9fc81aa726 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorsQueryFiltersTypedDict(TypedDict): + active: NotRequired[Nullable[bool]] + r"""Filter for active connectors for a given user, workspace and organization.""" + fetch_connection_secrets: NotRequired[bool] + r"""Fetch connection secrets.""" + + +class ConnectorsQueryFilters(BaseModel): + active: Annotated[OptionalNullable[bool], FieldMetadata(query=True)] = UNSET + r"""Filter for active connectors for a given user, workspace and organization.""" + + fetch_connection_secrets: Annotated[Optional[bool], FieldMetadata(query=True)] = ( + False + ) + r"""Fetch connection secrets.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["active", "fetch_connection_secrets"]) + nullable_fields = set(["active"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connectortool.py b/src/mistralai/client/models/connectortool.py new file mode 100644 index 00000000..26a8b7b7 --- /dev/null +++ b/src/mistralai/client/models/connectortool.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 41ca596b44f8 + +from __future__ import annotations +from .connectortoollocale import ConnectorToolLocale, ConnectorToolLocaleTypedDict +from .executionconfig import ExecutionConfig, ExecutionConfigTypedDict +from .resourcevisibility import ResourceVisibility +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ConnectorToolTypedDict(TypedDict): + id: str + name: str + description: str + execution_config: Nullable[ExecutionConfigTypedDict] + visibility: ResourceVisibility + created_at: datetime + modified_at: datetime + system_prompt: NotRequired[Nullable[str]] + locale: NotRequired[Nullable[ConnectorToolLocaleTypedDict]] + jsonschema: NotRequired[Nullable[Dict[str, Any]]] + active: NotRequired[Nullable[bool]] + + +class ConnectorTool(BaseModel): + id: str + + name: str + + description: str + + execution_config: Nullable[ExecutionConfig] + + visibility: ResourceVisibility + + created_at: datetime + + modified_at: datetime + + system_prompt: OptionalNullable[str] = UNSET + + locale: OptionalNullable[ConnectorToolLocale] = UNSET + + jsonschema: OptionalNullable[Dict[str, Any]] = UNSET + + active: OptionalNullable[bool] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["system_prompt", "locale", "jsonschema", "active"]) + nullable_fields = set( + ["system_prompt", "locale", "jsonschema", "execution_config", "active"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connectortoolcallmetadata.py b/src/mistralai/client/models/connectortoolcallmetadata.py new file mode 100644 index 00000000..9f3be6c4 --- /dev/null +++ b/src/mistralai/client/models/connectortoolcallmetadata.py @@ -0,0 +1,80 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2d27189e58e6 + +from __future__ import annotations +from .connectortoolresultmetadata import ( + ConnectorToolResultMetadata, + ConnectorToolResultMetadataTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ConnectorToolCallMetadataTypedDict(TypedDict): + r"""Metadata wrapper for MCP tool call responses. + + Nests MCP-specific fields under `mcp_meta` to avoid collisions with other + metadata keys (e.g. `tool_call_result`) in Harmattan's streaming deltas. + """ + + mcp_meta: NotRequired[Nullable[ConnectorToolResultMetadataTypedDict]] + + +class ConnectorToolCallMetadata(BaseModel): + r"""Metadata wrapper for MCP tool call responses. + + Nests MCP-specific fields under `mcp_meta` to avoid collisions with other + metadata keys (e.g. `tool_call_result`) in Harmattan's streaming deltas. + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + mcp_meta: OptionalNullable[ConnectorToolResultMetadata] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mcp_meta"]) + nullable_fields = set(["mcp_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/connectortoolcallresponse.py b/src/mistralai/client/models/connectortoolcallresponse.py new file mode 100644 index 00000000..47071a94 --- /dev/null +++ b/src/mistralai/client/models/connectortoolcallresponse.py @@ -0,0 +1,149 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c4f7a932bd2e + +from __future__ import annotations +from .audiocontent import AudioContent, AudioContentTypedDict +from .connectortoolcallmetadata import ( + ConnectorToolCallMetadata, + ConnectorToolCallMetadataTypedDict, +) +from .embeddedresource import EmbeddedResource, EmbeddedResourceTypedDict +from .imagecontent import ImageContent, ImageContentTypedDict +from .resourcelink import ResourceLink, ResourceLinkTypedDict +from .textcontent import TextContent, TextContentTypedDict +from functools import partial +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils.unions import parse_open_union +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import BeforeValidator +from typing import Any, Dict, List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ConnectorToolCallResponseContentTypedDict = TypeAliasType( + "ConnectorToolCallResponseContentTypedDict", + Union[ + TextContentTypedDict, + EmbeddedResourceTypedDict, + ImageContentTypedDict, + AudioContentTypedDict, + ResourceLinkTypedDict, + ], +) + + +class UnknownConnectorToolCallResponseContent(BaseModel): + r"""A ConnectorToolCallResponseContent variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_CONNECTOR_TOOL_CALL_RESPONSE_CONTENT_VARIANTS: dict[str, Any] = { + "text": TextContent, + "image": ImageContent, + "audio": AudioContent, + "resource_link": ResourceLink, + "resource": EmbeddedResource, +} + + +ConnectorToolCallResponseContent = Annotated[ + Union[ + TextContent, + ImageContent, + AudioContent, + ResourceLink, + EmbeddedResource, + UnknownConnectorToolCallResponseContent, + ], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_CONNECTOR_TOOL_CALL_RESPONSE_CONTENT_VARIANTS, + unknown_cls=UnknownConnectorToolCallResponseContent, + union_name="ConnectorToolCallResponseContent", + ) + ), +] + + +class ConnectorToolCallResponseTypedDict(TypedDict): + r"""Response from calling an MCP tool. + + We override mcp_types.CallToolResult because: + - Models only support `content`, not `structuredContent` at top level + - Downstream consumers (le-chat, etc.) need structuredContent/isError/_meta via metadata + + SYNC: Keep in sync with Harmattan (orchestrator) for harmonized tool result processing. + """ + + content: List[ConnectorToolCallResponseContentTypedDict] + metadata: NotRequired[Nullable[ConnectorToolCallMetadataTypedDict]] + + +class ConnectorToolCallResponse(BaseModel): + r"""Response from calling an MCP tool. + + We override mcp_types.CallToolResult because: + - Models only support `content`, not `structuredContent` at top level + - Downstream consumers (le-chat, etc.) need structuredContent/isError/_meta via metadata + + SYNC: Keep in sync with Harmattan (orchestrator) for harmonized tool result processing. + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + content: List[ConnectorToolCallResponseContent] + + metadata: OptionalNullable[ConnectorToolCallMetadata] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["metadata"]) + nullable_fields = set(["metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/connectortoollocale.py b/src/mistralai/client/models/connectortoollocale.py new file mode 100644 index 00000000..ec1359c8 --- /dev/null +++ b/src/mistralai/client/models/connectortoollocale.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 247ebe411537 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Dict +from typing_extensions import TypedDict + + +class ConnectorToolLocaleTypedDict(TypedDict): + name: Dict[str, str] + description: Dict[str, str] + usage_sentence: Dict[str, str] + + +class ConnectorToolLocale(BaseModel): + name: Dict[str, str] + + description: Dict[str, str] + + usage_sentence: Dict[str, str] diff --git a/src/mistralai/client/models/connectortoolresultmetadata.py b/src/mistralai/client/models/connectortoolresultmetadata.py new file mode 100644 index 00000000..520fb99b --- /dev/null +++ b/src/mistralai/client/models/connectortoolresultmetadata.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 86730e16aa67 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorToolResultMetadataTypedDict(TypedDict): + r"""MCP-specific result metadata (isError, structuredContent, _meta).""" + + is_error: NotRequired[bool] + structured_content: NotRequired[Nullable[Dict[str, Any]]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class ConnectorToolResultMetadata(BaseModel): + r"""MCP-specific result metadata (isError, structuredContent, _meta).""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + is_error: Annotated[Optional[bool], pydantic.Field(alias="isError")] = False + + structured_content: Annotated[ + OptionalNullable[Dict[str, Any]], pydantic.Field(alias="structuredContent") + ] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["isError", "structuredContent", "_meta"]) + nullable_fields = set(["structuredContent", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + ConnectorToolResultMetadata.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/contentchunk.py b/src/mistralai/client/models/contentchunk.py index e3de7591..6d521e1a 100644 --- a/src/mistralai/client/models/contentchunk.py +++ b/src/mistralai/client/models/contentchunk.py @@ -3,6 +3,7 @@ from __future__ import annotations from .audiochunk import AudioChunk, AudioChunkTypedDict +from .audiourlchunk import AudioURLChunk, AudioURLChunkTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .filechunk import FileChunk, FileChunkTypedDict from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict @@ -26,6 +27,7 @@ ReferenceChunkTypedDict, FileChunkTypedDict, AudioChunkTypedDict, + AudioURLChunkTypedDict, DocumentURLChunkTypedDict, ThinkChunkTypedDict, ], @@ -50,6 +52,7 @@ class UnknownContentChunk(BaseModel): "file": FileChunk, "thinking": ThinkChunk, "input_audio": AudioChunk, + "audio_url": AudioURLChunk, } @@ -62,6 +65,7 @@ class UnknownContentChunk(BaseModel): FileChunk, ThinkChunk, AudioChunk, + AudioURLChunk, UnknownContentChunk, ], BeforeValidator( diff --git a/src/mistralai/client/models/conversationpayload.py b/src/mistralai/client/models/conversationpayload.py new file mode 100644 index 00000000..6bfc5894 --- /dev/null +++ b/src/mistralai/client/models/conversationpayload.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4581218c84c1 + +from __future__ import annotations +from mistralai.client.types import BaseModel +import pydantic +from pydantic import ConfigDict +from typing import Any, Dict, List +from typing_extensions import TypedDict + + +class ConversationPayloadTypedDict(TypedDict): + messages: List[Dict[str, Any]] + + +class ConversationPayload(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + messages: List[Dict[str, Any]] + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index 83d599eb..cb5dc6a5 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -7,6 +7,7 @@ from .conversationinputs import ConversationInputs, ConversationInputsTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict @@ -73,6 +74,7 @@ class ConversationRequestTypedDict(TypedDict): tools: NotRequired[List[ConversationRequestToolTypedDict]] r"""List of tools which are available to the model during the conversation.""" completion_args: NotRequired[Nullable[CompletionArgsTypedDict]] + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] metadata: NotRequired[Nullable[Dict[str, Any]]] @@ -97,6 +99,8 @@ class ConversationRequest(BaseModel): completion_args: OptionalNullable[CompletionArgs] = UNSET + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + name: OptionalNullable[str] = UNSET description: OptionalNullable[str] = UNSET @@ -119,6 +123,7 @@ def serialize_model(self, handler): "instructions", "tools", "completion_args", + "guardrails", "name", "description", "metadata", @@ -133,6 +138,7 @@ def serialize_model(self, handler): "handoff_execution", "instructions", "completion_args", + "guardrails", "name", "description", "metadata", diff --git a/src/mistralai/client/models/conversationresponse.py b/src/mistralai/client/models/conversationresponse.py index f6c10969..2fc8504d 100644 --- a/src/mistralai/client/models/conversationresponse.py +++ b/src/mistralai/client/models/conversationresponse.py @@ -7,17 +7,23 @@ from .functioncallentry import FunctionCallEntry, FunctionCallEntryTypedDict from .messageoutputentry import MessageOutputEntry, MessageOutputEntryTypedDict from .toolexecutionentry import ToolExecutionEntry, ToolExecutionEntryTypedDict -from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.client.utils import validate_const import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, TypeAliasType, TypedDict +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -OutputTypedDict = TypeAliasType( - "OutputTypedDict", +ConversationResponseOutputTypedDict = TypeAliasType( + "ConversationResponseOutputTypedDict", Union[ MessageOutputEntryTypedDict, AgentHandoffEntryTypedDict, @@ -27,19 +33,28 @@ ) -Output = TypeAliasType( - "Output", +ConversationResponseOutput = TypeAliasType( + "ConversationResponseOutput", Union[MessageOutputEntry, AgentHandoffEntry, ToolExecutionEntry, FunctionCallEntry], ) +class GuardrailTypedDict(TypedDict): + pass + + +class Guardrail(BaseModel): + pass + + class ConversationResponseTypedDict(TypedDict): r"""The response after appending new entries to the conversation.""" conversation_id: str - outputs: List[OutputTypedDict] + outputs: List[ConversationResponseOutputTypedDict] usage: ConversationUsageInfoTypedDict object: Literal["conversation.response"] + guardrails: NotRequired[Nullable[List[GuardrailTypedDict]]] class ConversationResponse(BaseModel): @@ -47,7 +62,7 @@ class ConversationResponse(BaseModel): conversation_id: str - outputs: List[Output] + outputs: List[ConversationResponseOutput] usage: ConversationUsageInfo @@ -59,18 +74,29 @@ class ConversationResponse(BaseModel): pydantic.Field(alias="object"), ] = "conversation.response" + guardrails: OptionalNullable[List[Guardrail]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["object"]) + optional_fields = set(["object", "guardrails"]) + nullable_fields = set(["guardrails"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/mistralai/client/models/conversationrestartrequest.py b/src/mistralai/client/models/conversationrestartrequest.py index 7ae16aff..d5079689 100644 --- a/src/mistralai/client/models/conversationrestartrequest.py +++ b/src/mistralai/client/models/conversationrestartrequest.py @@ -4,6 +4,7 @@ from __future__ import annotations from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -12,7 +13,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import Any, Dict, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -45,6 +46,7 @@ class ConversationRestartRequestTypedDict(TypedDict): handoff_execution: NotRequired[ConversationRestartRequestHandoffExecution] completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] metadata: NotRequired[Nullable[Dict[str, Any]]] r"""Custom metadata for the conversation.""" agent_version: NotRequired[ @@ -70,6 +72,8 @@ class ConversationRestartRequest(BaseModel): completion_args: Optional[CompletionArgs] = None r"""White-listed arguments from the completion API""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET r"""Custom metadata for the conversation.""" @@ -85,11 +89,12 @@ def serialize_model(self, handler): "store", "handoff_execution", "completion_args", + "guardrails", "metadata", "agent_version", ] ) - nullable_fields = set(["metadata", "agent_version"]) + nullable_fields = set(["guardrails", "metadata", "agent_version"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/conversationrestartstreamrequest.py b/src/mistralai/client/models/conversationrestartstreamrequest.py index 0e247261..5cea4146 100644 --- a/src/mistralai/client/models/conversationrestartstreamrequest.py +++ b/src/mistralai/client/models/conversationrestartstreamrequest.py @@ -4,6 +4,7 @@ from __future__ import annotations from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -12,7 +13,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import Any, Dict, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -45,6 +46,7 @@ class ConversationRestartStreamRequestTypedDict(TypedDict): handoff_execution: NotRequired[ConversationRestartStreamRequestHandoffExecution] completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] metadata: NotRequired[Nullable[Dict[str, Any]]] r"""Custom metadata for the conversation.""" agent_version: NotRequired[ @@ -72,6 +74,8 @@ class ConversationRestartStreamRequest(BaseModel): completion_args: Optional[CompletionArgs] = None r"""White-listed arguments from the completion API""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET r"""Custom metadata for the conversation.""" @@ -89,11 +93,12 @@ def serialize_model(self, handler): "store", "handoff_execution", "completion_args", + "guardrails", "metadata", "agent_version", ] ) - nullable_fields = set(["metadata", "agent_version"]) + nullable_fields = set(["guardrails", "metadata", "agent_version"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/conversationsource.py b/src/mistralai/client/models/conversationsource.py new file mode 100644 index 00000000..a3b93b61 --- /dev/null +++ b/src/mistralai/client/models/conversationsource.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 24d6a0861d4b + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ConversationSource = Union[ + Literal[ + "EXPLORER", + "UPLOADED_FILE", + "DIRECT_INPUT", + "PLAYGROUND", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index a20dccae..2559a887 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -7,6 +7,7 @@ from .conversationinputs import ConversationInputs, ConversationInputsTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict @@ -73,6 +74,7 @@ class ConversationStreamRequestTypedDict(TypedDict): tools: NotRequired[List[ConversationStreamRequestToolTypedDict]] r"""List of tools which are available to the model during the conversation.""" completion_args: NotRequired[Nullable[CompletionArgsTypedDict]] + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] metadata: NotRequired[Nullable[Dict[str, Any]]] @@ -99,6 +101,8 @@ class ConversationStreamRequest(BaseModel): completion_args: OptionalNullable[CompletionArgs] = UNSET + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + name: OptionalNullable[str] = UNSET description: OptionalNullable[str] = UNSET @@ -121,6 +125,7 @@ def serialize_model(self, handler): "instructions", "tools", "completion_args", + "guardrails", "name", "description", "metadata", @@ -135,6 +140,7 @@ def serialize_model(self, handler): "handoff_execution", "instructions", "completion_args", + "guardrails", "name", "description", "metadata", diff --git a/src/mistralai/client/models/conversationthinkchunk.py b/src/mistralai/client/models/conversationthinkchunk.py deleted file mode 100644 index e0e172e3..00000000 --- a/src/mistralai/client/models/conversationthinkchunk.py +++ /dev/null @@ -1,65 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 77e59cde5c0f - -from __future__ import annotations -from .textchunk import TextChunk, TextChunkTypedDict -from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict -from mistralai.client.types import BaseModel, UNSET_SENTINEL -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict - - -ConversationThinkChunkThinkingTypedDict = TypeAliasType( - "ConversationThinkChunkThinkingTypedDict", - Union[TextChunkTypedDict, ToolReferenceChunkTypedDict], -) - - -ConversationThinkChunkThinking = TypeAliasType( - "ConversationThinkChunkThinking", Union[TextChunk, ToolReferenceChunk] -) - - -class ConversationThinkChunkTypedDict(TypedDict): - thinking: List[ConversationThinkChunkThinkingTypedDict] - type: Literal["thinking"] - closed: NotRequired[bool] - - -class ConversationThinkChunk(BaseModel): - thinking: List[ConversationThinkChunkThinking] - - type: Annotated[ - Annotated[ - Optional[Literal["thinking"]], AfterValidator(validate_const("thinking")) - ], - pydantic.Field(alias="type"), - ] = "thinking" - - closed: Optional[bool] = True - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["type", "closed"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m - - -try: - ConversationThinkChunk.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py b/src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py new file mode 100644 index 00000000..03156fa3 --- /dev/null +++ b/src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1ddc53a46c74 + +from __future__ import annotations +from .createdatasetrecordrequest import ( + CreateDatasetRecordRequest, + CreateDatasetRecordRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequestTypedDict( + TypedDict +): + dataset_id: str + create_dataset_record_request: CreateDatasetRecordRequestTypedDict + + +class CreateDatasetRecordV1ObservabilityDatasetsDatasetIDRecordsPostRequest(BaseModel): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + create_dataset_record_request: Annotated[ + CreateDatasetRecordRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index 54b09880..8acbbd1b 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -6,6 +6,7 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict @@ -56,6 +57,7 @@ class CreateAgentRequestTypedDict(TypedDict): r"""List of tools which are available to the model during the conversation.""" completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] metadata: NotRequired[Nullable[Dict[str, Any]]] @@ -76,6 +78,8 @@ class CreateAgentRequest(BaseModel): completion_args: Optional[CompletionArgs] = None r"""White-listed arguments from the completion API""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + description: OptionalNullable[str] = UNSET handoffs: OptionalNullable[List[str]] = UNSET @@ -91,6 +95,7 @@ def serialize_model(self, handler): "instructions", "tools", "completion_args", + "guardrails", "description", "handoffs", "metadata", @@ -98,7 +103,14 @@ def serialize_model(self, handler): ] ) nullable_fields = set( - ["instructions", "description", "handoffs", "metadata", "version_message"] + [ + "instructions", + "guardrails", + "description", + "handoffs", + "metadata", + "version_message", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/createcampaignrequest.py b/src/mistralai/client/models/createcampaignrequest.py new file mode 100644 index 00000000..b3957df9 --- /dev/null +++ b/src/mistralai/client/models/createcampaignrequest.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 60012b559aee + +from __future__ import annotations +from .filterpayload import FilterPayload, FilterPayloadTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CreateCampaignRequestTypedDict(TypedDict): + search_params: FilterPayloadTypedDict + judge_id: str + name: str + description: str + max_nb_events: int + + +class CreateCampaignRequest(BaseModel): + search_params: FilterPayload + + judge_id: str + + name: str + + description: str + + max_nb_events: int diff --git a/src/mistralai/client/models/createconnectorrequest.py b/src/mistralai/client/models/createconnectorrequest.py new file mode 100644 index 00000000..8fd3d3ab --- /dev/null +++ b/src/mistralai/client/models/createconnectorrequest.py @@ -0,0 +1,86 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3da192d6491a + +from __future__ import annotations +from .authdata import AuthData, AuthDataTypedDict +from .resourcevisibility import ResourceVisibility +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class CreateConnectorRequestTypedDict(TypedDict): + name: str + r"""The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes.""" + description: str + r"""The description of the connector.""" + server: str + r"""The url of the MCP server.""" + icon_url: NotRequired[Nullable[str]] + r"""The optional url of the icon you want to associate to the connector.""" + visibility: NotRequired[ResourceVisibility] + headers: NotRequired[Nullable[Dict[str, Any]]] + r"""Optional organization-level headers to be sent with the request to the mcp server.""" + auth_data: NotRequired[Nullable[AuthDataTypedDict]] + r"""Optional additional authentication data for the connector.""" + system_prompt: NotRequired[Nullable[str]] + r"""Optional system prompt for the connector.""" + + +class CreateConnectorRequest(BaseModel): + name: str + r"""The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes.""" + + description: str + r"""The description of the connector.""" + + server: str + r"""The url of the MCP server.""" + + icon_url: OptionalNullable[str] = UNSET + r"""The optional url of the icon you want to associate to the connector.""" + + visibility: Optional[ResourceVisibility] = None + + headers: OptionalNullable[Dict[str, Any]] = UNSET + r"""Optional organization-level headers to be sent with the request to the mcp server.""" + + auth_data: OptionalNullable[AuthData] = UNSET + r"""Optional additional authentication data for the connector.""" + + system_prompt: OptionalNullable[str] = UNSET + r"""Optional system prompt for the connector.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["icon_url", "visibility", "headers", "auth_data", "system_prompt"] + ) + nullable_fields = set(["icon_url", "headers", "auth_data", "system_prompt"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/createdatasetrecordrequest.py b/src/mistralai/client/models/createdatasetrecordrequest.py new file mode 100644 index 00000000..6fd2bf96 --- /dev/null +++ b/src/mistralai/client/models/createdatasetrecordrequest.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9455e38a8c31 + +from __future__ import annotations +from .conversationpayload import ConversationPayload, ConversationPayloadTypedDict +from mistralai.client.types import BaseModel +from typing import Any, Dict +from typing_extensions import TypedDict + + +class CreateDatasetRecordRequestTypedDict(TypedDict): + payload: ConversationPayloadTypedDict + properties: Dict[str, Any] + + +class CreateDatasetRecordRequest(BaseModel): + payload: ConversationPayload + + properties: Dict[str, Any] diff --git a/src/mistralai/client/models/createdatasetrequest.py b/src/mistralai/client/models/createdatasetrequest.py new file mode 100644 index 00000000..ecffc52a --- /dev/null +++ b/src/mistralai/client/models/createdatasetrequest.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 046a094d3ef9 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CreateDatasetRequestTypedDict(TypedDict): + name: str + description: str + + +class CreateDatasetRequest(BaseModel): + name: str + + description: str diff --git a/src/mistralai/client/models/createfileresponse.py b/src/mistralai/client/models/createfileresponse.py index 76821280..1f03b275 100644 --- a/src/mistralai/client/models/createfileresponse.py +++ b/src/mistralai/client/models/createfileresponse.py @@ -3,6 +3,7 @@ from __future__ import annotations from .filepurpose import FilePurpose +from .filevisibility import FileVisibility from .sampletype import SampleType from .source import Source from mistralai.client.types import ( @@ -34,6 +35,8 @@ class CreateFileResponseTypedDict(TypedDict): num_lines: NotRequired[Nullable[int]] mimetype: NotRequired[Nullable[str]] signature: NotRequired[Nullable[str]] + expires_at: NotRequired[Nullable[int]] + visibility: NotRequired[Nullable[FileVisibility]] class CreateFileResponse(BaseModel): @@ -64,10 +67,18 @@ class CreateFileResponse(BaseModel): signature: OptionalNullable[str] = UNSET + expires_at: OptionalNullable[int] = UNSET + + visibility: OptionalNullable[FileVisibility] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["num_lines", "mimetype", "signature"]) - nullable_fields = set(["num_lines", "mimetype", "signature"]) + optional_fields = set( + ["num_lines", "mimetype", "signature", "expires_at", "visibility"] + ) + nullable_fields = set( + ["num_lines", "mimetype", "signature", "expires_at", "visibility"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/createfinetuningjobrequest.py b/src/mistralai/client/models/createfinetuningjobrequest.py index e328d944..be97bd07 100644 --- a/src/mistralai/client/models/createfinetuningjobrequest.py +++ b/src/mistralai/client/models/createfinetuningjobrequest.py @@ -11,8 +11,11 @@ CompletionTrainingParameters, CompletionTrainingParametersTypedDict, ) +from .creategithubrepositoryrequest import ( + CreateGithubRepositoryRequest, + CreateGithubRepositoryRequestTypedDict, +) from .finetuneablemodeltype import FineTuneableModelType -from .githubrepositoryin import GithubRepositoryIn, GithubRepositoryInTypedDict from .trainingfile import TrainingFile, TrainingFileTypedDict from .wandbintegration import WandbIntegration, WandbIntegrationTypedDict from mistralai.client.types import ( @@ -44,10 +47,10 @@ ) -CreateFineTuningJobRequestRepositoryTypedDict = GithubRepositoryInTypedDict +CreateFineTuningJobRequestRepositoryTypedDict = CreateGithubRepositoryRequestTypedDict -CreateFineTuningJobRequestRepository = GithubRepositoryIn +CreateFineTuningJobRequestRepository = CreateGithubRepositoryRequest class CreateFineTuningJobRequestTypedDict(TypedDict): diff --git a/src/mistralai/client/models/githubrepositoryin.py b/src/mistralai/client/models/creategithubrepositoryrequest.py similarity index 90% rename from src/mistralai/client/models/githubrepositoryin.py rename to src/mistralai/client/models/creategithubrepositoryrequest.py index 38bcc208..61ffde27 100644 --- a/src/mistralai/client/models/githubrepositoryin.py +++ b/src/mistralai/client/models/creategithubrepositoryrequest.py @@ -1,5 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: eef26fbd2876 +# @generated-id: 0814afcf63bb from __future__ import annotations from mistralai.client.types import ( @@ -17,7 +17,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict -class GithubRepositoryInTypedDict(TypedDict): +class CreateGithubRepositoryRequestTypedDict(TypedDict): name: str owner: str token: str @@ -26,7 +26,7 @@ class GithubRepositoryInTypedDict(TypedDict): weight: NotRequired[float] -class GithubRepositoryIn(BaseModel): +class CreateGithubRepositoryRequest(BaseModel): name: str owner: str @@ -69,6 +69,6 @@ def serialize_model(self, handler): try: - GithubRepositoryIn.model_rebuild() + CreateGithubRepositoryRequest.model_rebuild() except NameError: pass diff --git a/src/mistralai/client/models/createjudgerequest.py b/src/mistralai/client/models/createjudgerequest.py new file mode 100644 index 00000000..7c30aa5f --- /dev/null +++ b/src/mistralai/client/models/createjudgerequest.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e606837a626e + +from __future__ import annotations +from .judgeclassificationoutput import ( + JudgeClassificationOutput, + JudgeClassificationOutputTypedDict, +) +from .judgeregressionoutput import JudgeRegressionOutput, JudgeRegressionOutputTypedDict +from mistralai.client.types import BaseModel +from pydantic import Field +from typing import List, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +CreateJudgeRequestOutputTypedDict = TypeAliasType( + "CreateJudgeRequestOutputTypedDict", + Union[JudgeClassificationOutputTypedDict, JudgeRegressionOutputTypedDict], +) + + +CreateJudgeRequestOutput = Annotated[ + Union[JudgeClassificationOutput, JudgeRegressionOutput], Field(discriminator="type") +] + + +class CreateJudgeRequestTypedDict(TypedDict): + name: str + description: str + model_name: str + output: CreateJudgeRequestOutputTypedDict + instructions: str + tools: List[str] + + +class CreateJudgeRequest(BaseModel): + name: str + + description: str + + model_name: str + + output: CreateJudgeRequestOutput + + instructions: str + + tools: List[str] diff --git a/src/mistralai/client/models/dataset.py b/src/mistralai/client/models/dataset.py new file mode 100644 index 00000000..2acd911d --- /dev/null +++ b/src/mistralai/client/models/dataset.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cbf14670ee00 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class DatasetTypedDict(TypedDict): + id: str + created_at: datetime + updated_at: datetime + deleted_at: Nullable[datetime] + name: str + description: str + owner_id: str + workspace_id: str + + +class Dataset(BaseModel): + id: str + + created_at: datetime + + updated_at: datetime + + deleted_at: Nullable[datetime] + + name: str + + description: str + + owner_id: str + + workspace_id: str + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/datasetimporttask.py b/src/mistralai/client/models/datasetimporttask.py new file mode 100644 index 00000000..4ef52e9e --- /dev/null +++ b/src/mistralai/client/models/datasetimporttask.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c20f7db9633c + +from __future__ import annotations +from .basetaskstatus import BaseTaskStatus +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class DatasetImportTaskTypedDict(TypedDict): + id: str + created_at: datetime + updated_at: datetime + deleted_at: Nullable[datetime] + creator_id: str + dataset_id: str + workspace_id: str + status: BaseTaskStatus + progress: NotRequired[Nullable[int]] + message: NotRequired[Nullable[str]] + + +class DatasetImportTask(BaseModel): + id: str + + created_at: datetime + + updated_at: datetime + + deleted_at: Nullable[datetime] + + creator_id: str + + dataset_id: str + + workspace_id: str + + status: BaseTaskStatus + + progress: OptionalNullable[int] = UNSET + + message: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["progress", "message"]) + nullable_fields = set(["deleted_at", "progress", "message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/datasetpreview.py b/src/mistralai/client/models/datasetpreview.py new file mode 100644 index 00000000..55493568 --- /dev/null +++ b/src/mistralai/client/models/datasetpreview.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 128c29db3f37 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class DatasetPreviewTypedDict(TypedDict): + id: str + created_at: datetime + updated_at: datetime + deleted_at: Nullable[datetime] + name: str + description: str + owner_id: str + workspace_id: str + + +class DatasetPreview(BaseModel): + id: str + + created_at: datetime + + updated_at: datetime + + deleted_at: Nullable[datetime] + + name: str + + description: str + + owner_id: str + + workspace_id: str + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/datasetrecord.py b/src/mistralai/client/models/datasetrecord.py new file mode 100644 index 00000000..9c9f42e5 --- /dev/null +++ b/src/mistralai/client/models/datasetrecord.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 87ddebf2a0ce + +from __future__ import annotations +from .conversationpayload import ConversationPayload, ConversationPayloadTypedDict +from .conversationsource import ConversationSource +from datetime import datetime +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import TypedDict + + +class DatasetRecordTypedDict(TypedDict): + id: str + created_at: datetime + updated_at: datetime + deleted_at: Nullable[datetime] + dataset_id: str + payload: ConversationPayloadTypedDict + properties: Dict[str, Any] + source: ConversationSource + + +class DatasetRecord(BaseModel): + id: str + + created_at: datetime + + updated_at: datetime + + deleted_at: Nullable[datetime] + + dataset_id: str + + payload: ConversationPayload + + properties: Dict[str, Any] + + source: ConversationSource + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py b/src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py new file mode 100644 index 00000000..f33a3747 --- /dev/null +++ b/src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3d1cd35fecc6 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequestTypedDict(TypedDict): + campaign_id: str + + +class DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest(BaseModel): + campaign_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop.py b/src/mistralai/client/models/delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop.py new file mode 100644 index 00000000..ffeefca6 --- /dev/null +++ b/src/mistralai/client/models/delete_dataset_record_v1_observability_dataset_records_dataset_record_id_deleteop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 66b2054bda8c + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequestTypedDict( + TypedDict +): + dataset_record_id: str + + +class DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest( + BaseModel +): + dataset_record_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/delete_dataset_v1_observability_datasets_dataset_id_deleteop.py b/src/mistralai/client/models/delete_dataset_v1_observability_datasets_dataset_id_deleteop.py new file mode 100644 index 00000000..af869770 --- /dev/null +++ b/src/mistralai/client/models/delete_dataset_v1_observability_datasets_dataset_id_deleteop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 446419cd07d2 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequestTypedDict(TypedDict): + dataset_id: str + + +class DeleteDatasetV1ObservabilityDatasetsDatasetIDDeleteRequest(BaseModel): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/delete_judge_v1_observability_judges_judge_id_deleteop.py b/src/mistralai/client/models/delete_judge_v1_observability_judges_judge_id_deleteop.py new file mode 100644 index 00000000..c2f7b797 --- /dev/null +++ b/src/mistralai/client/models/delete_judge_v1_observability_judges_judge_id_deleteop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 415724e139bd + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequestTypedDict(TypedDict): + judge_id: str + + +class DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequest(BaseModel): + judge_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/deletedatasetrecordsrequest.py b/src/mistralai/client/models/deletedatasetrecordsrequest.py new file mode 100644 index 00000000..8c33a963 --- /dev/null +++ b/src/mistralai/client/models/deletedatasetrecordsrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e7ef16596e54 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class DeleteDatasetRecordsRequestTypedDict(TypedDict): + dataset_record_ids: List[str] + + +class DeleteDatasetRecordsRequest(BaseModel): + dataset_record_ids: List[str] diff --git a/src/mistralai/client/models/deletemodelout.py b/src/mistralai/client/models/deletemodelresponse.py similarity index 90% rename from src/mistralai/client/models/deletemodelout.py rename to src/mistralai/client/models/deletemodelresponse.py index fa0c20a4..fac884bc 100644 --- a/src/mistralai/client/models/deletemodelout.py +++ b/src/mistralai/client/models/deletemodelresponse.py @@ -1,5 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: ef6a1671c739 +# @generated-id: 8957175b7482 from __future__ import annotations from mistralai.client.types import BaseModel, UNSET_SENTINEL @@ -8,7 +8,7 @@ from typing_extensions import NotRequired, TypedDict -class DeleteModelOutTypedDict(TypedDict): +class DeleteModelResponseTypedDict(TypedDict): id: str r"""The ID of the deleted model.""" object: NotRequired[str] @@ -17,7 +17,7 @@ class DeleteModelOutTypedDict(TypedDict): r"""The deletion status""" -class DeleteModelOut(BaseModel): +class DeleteModelResponse(BaseModel): id: str r"""The ID of the deleted model.""" diff --git a/src/mistralai/client/models/embeddedresource.py b/src/mistralai/client/models/embeddedresource.py new file mode 100644 index 00000000..54cb17fd --- /dev/null +++ b/src/mistralai/client/models/embeddedresource.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 94a23f656f72 + +from __future__ import annotations +from .annotations import Annotations, AnnotationsTypedDict +from .blobresourcecontents import BlobResourceContents, BlobResourceContentsTypedDict +from .textresourcecontents import TextResourceContents, TextResourceContentsTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Any, Dict, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ResourceTypedDict = TypeAliasType( + "ResourceTypedDict", + Union[TextResourceContentsTypedDict, BlobResourceContentsTypedDict], +) + + +Resource = TypeAliasType("Resource", Union[TextResourceContents, BlobResourceContents]) + + +class EmbeddedResourceTypedDict(TypedDict): + r"""The contents of a resource, embedded into a prompt or tool call result. + + It is up to the client how best to render embedded resources for the benefit + of the LLM and/or the user. + """ + + resource: ResourceTypedDict + type: Literal["resource"] + annotations: NotRequired[Nullable[AnnotationsTypedDict]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class EmbeddedResource(BaseModel): + r"""The contents of a resource, embedded into a prompt or tool call result. + + It is up to the client how best to render embedded resources for the benefit + of the LLM and/or the user. + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + resource: Resource + + type: Annotated[ + Annotated[Literal["resource"], AfterValidator(validate_const("resource"))], + pydantic.Field(alias="type"), + ] = "resource" + + annotations: OptionalNullable[Annotations] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["annotations", "_meta"]) + nullable_fields = set(["annotations", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + EmbeddedResource.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/executionconfig.py b/src/mistralai/client/models/executionconfig.py new file mode 100644 index 00000000..56b58ae3 --- /dev/null +++ b/src/mistralai/client/models/executionconfig.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 14518c40a13b + +from __future__ import annotations +from mistralai.client.types import BaseModel +import pydantic +from pydantic import ConfigDict +from typing import Any, Dict +from typing_extensions import TypedDict + + +class ExecutionConfigTypedDict(TypedDict): + r"""Not typed since mcp config can changed / not stable + we allow all extra fields and this is a dict + TODO: once mcp is stable, we need to type this + """ + + type: str + + +class ExecutionConfig(BaseModel): + r"""Not typed since mcp config can changed / not stable + we allow all extra fields and this is a dict + TODO: once mcp is stable, we need to type this + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + type: str + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/src/mistralai/client/models/export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop.py b/src/mistralai/client/models/export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop.py new file mode 100644 index 00000000..07b4e58f --- /dev/null +++ b/src/mistralai/client/models/export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 74f5f3183b64 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict( + TypedDict +): + dataset_id: str + + +class ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest( + BaseModel +): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/exportdatasetresponse.py b/src/mistralai/client/models/exportdatasetresponse.py new file mode 100644 index 00000000..f1600cac --- /dev/null +++ b/src/mistralai/client/models/exportdatasetresponse.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 22cc29d258db + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ExportDatasetResponseTypedDict(TypedDict): + file_url: str + + +class ExportDatasetResponse(BaseModel): + file_url: str diff --git a/src/mistralai/client/models/feedresultchatcompletioneventpreview.py b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py new file mode 100644 index 00000000..e87e007e --- /dev/null +++ b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 19109368b436 + +from __future__ import annotations +from .chatcompletioneventpreview import ( + ChatCompletionEventPreview, + ChatCompletionEventPreviewTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class FeedResultChatCompletionEventPreviewTypedDict(TypedDict): + results: NotRequired[List[ChatCompletionEventPreviewTypedDict]] + next: NotRequired[Nullable[str]] + cursor: NotRequired[Nullable[str]] + + +class FeedResultChatCompletionEventPreview(BaseModel): + results: Optional[List[ChatCompletionEventPreview]] = None + + next: OptionalNullable[str] = UNSET + + cursor: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "cursor"]) + nullable_fields = set(["next", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/fetchcampaignstatusresponse.py b/src/mistralai/client/models/fetchcampaignstatusresponse.py new file mode 100644 index 00000000..6004892e --- /dev/null +++ b/src/mistralai/client/models/fetchcampaignstatusresponse.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b74b57603a4c + +from __future__ import annotations +from .basetaskstatus import BaseTaskStatus +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class FetchCampaignStatusResponseTypedDict(TypedDict): + status: BaseTaskStatus + + +class FetchCampaignStatusResponse(BaseModel): + status: BaseTaskStatus diff --git a/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py new file mode 100644 index 00000000..d3cbd653 --- /dev/null +++ b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2191cab4638b + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +OptionTypedDict = TypeAliasType("OptionTypedDict", Union[str, bool]) + + +Option = TypeAliasType("Option", Union[str, bool]) + + +class FetchChatCompletionFieldOptionsResponseTypedDict(TypedDict): + options: NotRequired[Nullable[List[Nullable[OptionTypedDict]]]] + + +class FetchChatCompletionFieldOptionsResponse(BaseModel): + options: OptionalNullable[List[Nullable[Option]]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["options"]) + nullable_fields = set(["options"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/fetchfieldoptioncountsrequest.py b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py new file mode 100644 index 00000000..19698b9b --- /dev/null +++ b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2fd8caa0697d + +from __future__ import annotations +from .filterpayload import FilterPayload, FilterPayloadTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class FetchFieldOptionCountsRequestTypedDict(TypedDict): + filter_params: NotRequired[Nullable[FilterPayloadTypedDict]] + + +class FetchFieldOptionCountsRequest(BaseModel): + filter_params: OptionalNullable[FilterPayload] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["filter_params"]) + nullable_fields = set(["filter_params"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/fetchfieldoptioncountsresponse.py b/src/mistralai/client/models/fetchfieldoptioncountsresponse.py new file mode 100644 index 00000000..4c9f9d0f --- /dev/null +++ b/src/mistralai/client/models/fetchfieldoptioncountsresponse.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 16ce9431fc7b + +from __future__ import annotations +from .fieldoptioncountitem import FieldOptionCountItem, FieldOptionCountItemTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class FetchFieldOptionCountsResponseTypedDict(TypedDict): + counts: List[FieldOptionCountItemTypedDict] + + +class FetchFieldOptionCountsResponse(BaseModel): + counts: List[FieldOptionCountItem] diff --git a/src/mistralai/client/models/fieldgroup.py b/src/mistralai/client/models/fieldgroup.py new file mode 100644 index 00000000..07f9e7c7 --- /dev/null +++ b/src/mistralai/client/models/fieldgroup.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 201353e45f89 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class FieldGroupTypedDict(TypedDict): + name: str + label: str + + +class FieldGroup(BaseModel): + name: str + + label: str diff --git a/src/mistralai/client/models/fieldoptioncountitem.py b/src/mistralai/client/models/fieldoptioncountitem.py new file mode 100644 index 00000000..0b50c148 --- /dev/null +++ b/src/mistralai/client/models/fieldoptioncountitem.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5b707a343930 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class FieldOptionCountItemTypedDict(TypedDict): + value: str + count: int + + +class FieldOptionCountItem(BaseModel): + value: str + + count: int diff --git a/src/mistralai/client/models/files_api_routes_upload_fileop.py b/src/mistralai/client/models/files_api_routes_upload_fileop.py index 54ff4e49..b6683639 100644 --- a/src/mistralai/client/models/files_api_routes_upload_fileop.py +++ b/src/mistralai/client/models/files_api_routes_upload_fileop.py @@ -4,13 +4,25 @@ from __future__ import annotations from .file import File, FileTypedDict from .filepurpose import FilePurpose -from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.client.utils import FieldMetadata, MultipartFormMetadata from pydantic import model_serializer -from typing import Optional +from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict +FilesAPIRoutesUploadFileFileVisibility = Literal[ + "workspace", + "user", +] + + class MultiPartBodyParamsTypedDict(TypedDict): file: FileTypedDict r"""The File object (not file name) to be uploaded. @@ -23,6 +35,8 @@ class MultiPartBodyParamsTypedDict(TypedDict): file=@path/to/your/file.jsonl ``` """ + expiry: NotRequired[Nullable[int]] + visibility: NotRequired[FilesAPIRoutesUploadFileFileVisibility] purpose: NotRequired[FilePurpose] @@ -39,20 +53,35 @@ class MultiPartBodyParams(BaseModel): ``` """ + expiry: Annotated[OptionalNullable[int], FieldMetadata(multipart=True)] = UNSET + + visibility: Annotated[ + Optional[FilesAPIRoutesUploadFileFileVisibility], FieldMetadata(multipart=True) + ] = "workspace" + purpose: Annotated[Optional[FilePurpose], FieldMetadata(multipart=True)] = None @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["purpose"]) + optional_fields = set(["expiry", "visibility", "purpose"]) + nullable_fields = set(["expiry"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/mistralai/client/models/fileschema.py b/src/mistralai/client/models/fileschema.py index e99066a9..11caa083 100644 --- a/src/mistralai/client/models/fileschema.py +++ b/src/mistralai/client/models/fileschema.py @@ -3,6 +3,7 @@ from __future__ import annotations from .filepurpose import FilePurpose +from .filevisibility import FileVisibility from .sampletype import SampleType from .source import Source from mistralai.client.types import ( @@ -34,6 +35,8 @@ class FileSchemaTypedDict(TypedDict): num_lines: NotRequired[Nullable[int]] mimetype: NotRequired[Nullable[str]] signature: NotRequired[Nullable[str]] + expires_at: NotRequired[Nullable[int]] + visibility: NotRequired[Nullable[FileVisibility]] class FileSchema(BaseModel): @@ -64,10 +67,18 @@ class FileSchema(BaseModel): signature: OptionalNullable[str] = UNSET + expires_at: OptionalNullable[int] = UNSET + + visibility: OptionalNullable[FileVisibility] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["num_lines", "mimetype", "signature"]) - nullable_fields = set(["num_lines", "mimetype", "signature"]) + optional_fields = set( + ["num_lines", "mimetype", "signature", "expires_at", "visibility"] + ) + nullable_fields = set( + ["num_lines", "mimetype", "signature", "expires_at", "visibility"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/filevisibility.py b/src/mistralai/client/models/filevisibility.py new file mode 100644 index 00000000..56cfe881 --- /dev/null +++ b/src/mistralai/client/models/filevisibility.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 11a670fa3b71 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +FileVisibility = Union[ + Literal[ + "workspace", + "user", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/filtercondition.py b/src/mistralai/client/models/filtercondition.py new file mode 100644 index 00000000..fe62d6dd --- /dev/null +++ b/src/mistralai/client/models/filtercondition.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ba62f90873c5 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UnrecognizedStr +from typing import Any, Literal, Union +from typing_extensions import TypedDict + + +Op = Union[ + Literal[ + "lt", + "lte", + "gt", + "gte", + "startswith", + "istartswith", + "endswith", + "iendswith", + "contains", + "icontains", + "matches", + "notcontains", + "inotcontains", + "eq", + "neq", + "isnull", + "includes", + "excludes", + "len_eq", + ], + UnrecognizedStr, +] + + +class FilterConditionTypedDict(TypedDict): + field: str + op: Op + value: Any + + +class FilterCondition(BaseModel): + field: str + + op: Op + + value: Any diff --git a/src/mistralai/client/models/filtergroup.py b/src/mistralai/client/models/filtergroup.py new file mode 100644 index 00000000..06616a01 --- /dev/null +++ b/src/mistralai/client/models/filtergroup.py @@ -0,0 +1,74 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: dbc0c34fbc2f + +from __future__ import annotations +from .filtercondition import FilterCondition, FilterConditionTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import List, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class FilterGroupTypedDict(TypedDict): + and_: NotRequired[Nullable[List[AndTypedDict]]] + or_: NotRequired[Nullable[List[OrTypedDict]]] + + +class FilterGroup(BaseModel): + and_: Annotated[OptionalNullable[List[And]], pydantic.Field(alias="AND")] = UNSET + + or_: Annotated[OptionalNullable[List[Or]], pydantic.Field(alias="OR")] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["AND", "OR"]) + nullable_fields = set(["AND", "OR"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +OrTypedDict = TypeAliasType( + "OrTypedDict", Union["FilterGroupTypedDict", FilterConditionTypedDict] +) + + +Or = TypeAliasType("Or", Union["FilterGroup", FilterCondition]) + + +AndTypedDict = TypeAliasType( + "AndTypedDict", Union["FilterGroupTypedDict", FilterConditionTypedDict] +) + + +And = TypeAliasType("And", Union["FilterGroup", FilterCondition]) + + +try: + FilterGroup.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/filterpayload.py b/src/mistralai/client/models/filterpayload.py new file mode 100644 index 00000000..188375f1 --- /dev/null +++ b/src/mistralai/client/models/filterpayload.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 56757b849f7a + +from __future__ import annotations +from .filtercondition import FilterCondition, FilterConditionTypedDict +from .filtergroup import FilterGroup, FilterGroupTypedDict +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Union +from typing_extensions import TypeAliasType, TypedDict + + +FiltersTypedDict = TypeAliasType( + "FiltersTypedDict", Union[FilterGroupTypedDict, FilterConditionTypedDict] +) + + +Filters = TypeAliasType("Filters", Union[FilterGroup, FilterCondition]) + + +class FilterPayloadTypedDict(TypedDict): + filters: Nullable[FiltersTypedDict] + + +class FilterPayload(BaseModel): + filters: Nullable[Filters] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_campaign_by_id_v1_observability_campaigns_campaign_id_getop.py b/src/mistralai/client/models/get_campaign_by_id_v1_observability_campaigns_campaign_id_getop.py new file mode 100644 index 00000000..a8446737 --- /dev/null +++ b/src/mistralai/client/models/get_campaign_by_id_v1_observability_campaigns_campaign_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 288520184035 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequestTypedDict(TypedDict): + campaign_id: str + + +class GetCampaignByIDV1ObservabilityCampaignsCampaignIDGetRequest(BaseModel): + campaign_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py new file mode 100644 index 00000000..e1b04950 --- /dev/null +++ b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 270800e2c264 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequestTypedDict( + TypedDict +): + campaign_id: str + page_size: NotRequired[int] + page: NotRequired[int] + + +class GetCampaignSelectedEventsV1ObservabilityCampaignsCampaignIDSelectedEventsGetRequest( + BaseModel +): + campaign_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "page"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py b/src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py new file mode 100644 index 00000000..57ac4490 --- /dev/null +++ b/src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 853a43ee6b98 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequestTypedDict( + TypedDict +): + campaign_id: str + + +class GetCampaignStatusByIDV1ObservabilityCampaignsCampaignIDStatusGetRequest( + BaseModel +): + campaign_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py new file mode 100644 index 00000000..a6a329c7 --- /dev/null +++ b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 598a7340fc98 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetCampaignsV1ObservabilityCampaignsGetRequestTypedDict(TypedDict): + page_size: NotRequired[int] + page: NotRequired[int] + q: NotRequired[Nullable[str]] + + +class GetCampaignsV1ObservabilityCampaignsGetRequest(BaseModel): + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + + q: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "page", "q"]) + nullable_fields = set(["q"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py b/src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py new file mode 100644 index 00000000..f39b0f56 --- /dev/null +++ b/src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 98aff68bc7c7 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequestTypedDict( + TypedDict +): + event_id: str + + +class GetChatCompletionEventV1ObservabilityChatCompletionEventsEventIDGetRequest( + BaseModel +): + event_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py new file mode 100644 index 00000000..5a8b7450 --- /dev/null +++ b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 36957d0f73aa + +from __future__ import annotations +from .searchchatcompletioneventsrequest import ( + SearchChatCompletionEventsRequest, + SearchChatCompletionEventsRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequestTypedDict( + TypedDict +): + search_chat_completion_events_request: SearchChatCompletionEventsRequestTypedDict + page_size: NotRequired[int] + cursor: NotRequired[Nullable[str]] + + +class GetChatCompletionEventsV1ObservabilityChatCompletionEventsSearchPostRequest( + BaseModel +): + search_chat_completion_events_request: Annotated[ + SearchChatCompletionEventsRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "cursor"]) + nullable_fields = set(["cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py b/src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py new file mode 100644 index 00000000..f579260d --- /dev/null +++ b/src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0b1bd06b24af + +from __future__ import annotations +from .fetchfieldoptioncountsrequest import ( + FetchFieldOptionCountsRequest, + FetchFieldOptionCountsRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequestTypedDict( + TypedDict +): + field_name: str + fetch_field_option_counts_request: FetchFieldOptionCountsRequestTypedDict + + +class GetChatCompletionFieldOptionsCountsV1ObservabilityChatCompletionFieldsFieldNameOptionsCountsPostRequest( + BaseModel +): + field_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + fetch_field_option_counts_request: Annotated[ + FetchFieldOptionCountsRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop.py b/src/mistralai/client/models/get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop.py new file mode 100644 index 00000000..c044bb92 --- /dev/null +++ b/src/mistralai/client/models/get_chat_completion_field_options_v1_observability_chat_completion_fields_field_name_options_getop.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4fb7f3c0e51b + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +Operator = Literal[ + "lt", + "lte", + "gt", + "gte", + "startswith", + "istartswith", + "endswith", + "iendswith", + "contains", + "icontains", + "matches", + "notcontains", + "inotcontains", + "eq", + "neq", + "isnull", + "includes", + "excludes", + "len_eq", +] +r"""The operator to use for filtering options""" + + +class GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequestTypedDict( + TypedDict +): + field_name: str + operator: Operator + r"""The operator to use for filtering options""" + + +class GetChatCompletionFieldOptionsV1ObservabilityChatCompletionFieldsFieldNameOptionsGetRequest( + BaseModel +): + field_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + operator: Annotated[ + Operator, FieldMetadata(query=QueryParamMetadata(style="form", explode=True)) + ] + r"""The operator to use for filtering options""" diff --git a/src/mistralai/client/models/get_dataset_by_id_v1_observability_datasets_dataset_id_getop.py b/src/mistralai/client/models/get_dataset_by_id_v1_observability_datasets_dataset_id_getop.py new file mode 100644 index 00000000..0259485d --- /dev/null +++ b/src/mistralai/client/models/get_dataset_by_id_v1_observability_datasets_dataset_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cfd3282e7f33 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequestTypedDict(TypedDict): + dataset_id: str + + +class GetDatasetByIDV1ObservabilityDatasetsDatasetIDGetRequest(BaseModel): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop.py b/src/mistralai/client/models/get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop.py new file mode 100644 index 00000000..cf900d0e --- /dev/null +++ b/src/mistralai/client/models/get_dataset_import_task_v1_observability_datasets_dataset_id_tasks_task_id_getop.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b45f77cb328c + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequestTypedDict( + TypedDict +): + dataset_id: str + task_id: str + + +class GetDatasetImportTaskV1ObservabilityDatasetsDatasetIDTasksTaskIDGetRequest( + BaseModel +): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + task_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py new file mode 100644 index 00000000..43e0dc5b --- /dev/null +++ b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 07ece48f664d + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequestTypedDict( + TypedDict +): + dataset_id: str + page_size: NotRequired[int] + page: NotRequired[int] + + +class GetDatasetImportTasksV1ObservabilityDatasetsDatasetIDTasksGetRequest(BaseModel): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "page"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py b/src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py new file mode 100644 index 00000000..0cb239df --- /dev/null +++ b/src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6ea6a0dab32f + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequestTypedDict( + TypedDict +): + dataset_record_id: str + + +class GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequest(BaseModel): + dataset_record_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py new file mode 100644 index 00000000..7617a5d2 --- /dev/null +++ b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 77967c965aea + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict( + TypedDict +): + dataset_id: str + page_size: NotRequired[int] + page: NotRequired[int] + + +class GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequest(BaseModel): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "page"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py new file mode 100644 index 00000000..ea52dd51 --- /dev/null +++ b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3e4f4e2447ac + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict(TypedDict): + page_size: NotRequired[int] + page: NotRequired[int] + q: NotRequired[Nullable[str]] + + +class GetDatasetsV1ObservabilityDatasetsGetRequest(BaseModel): + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + + q: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "page", "q"]) + nullable_fields = set(["q"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py b/src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py new file mode 100644 index 00000000..375db2e9 --- /dev/null +++ b/src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4201c3c5a891 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict(TypedDict): + judge_id: str + + +class GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest(BaseModel): + judge_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py new file mode 100644 index 00000000..7228cfa1 --- /dev/null +++ b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py @@ -0,0 +1,80 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fa04e3db7781 + +from __future__ import annotations +from .judgeoutputtype import JudgeOutputType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetJudgesV1ObservabilityJudgesGetRequestTypedDict(TypedDict): + type_filter: NotRequired[Nullable[List[JudgeOutputType]]] + r"""Filter by judge output types""" + model_filter: NotRequired[Nullable[List[str]]] + r"""Filter by model names""" + page_size: NotRequired[int] + page: NotRequired[int] + q: NotRequired[Nullable[str]] + + +class GetJudgesV1ObservabilityJudgesGetRequest(BaseModel): + type_filter: Annotated[ + OptionalNullable[List[JudgeOutputType]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by judge output types""" + + model_filter: Annotated[ + OptionalNullable[List[str]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by model names""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + + q: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type_filter", "model_filter", "page_size", "page", "q"]) + nullable_fields = set(["type_filter", "model_filter", "q"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py b/src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py new file mode 100644 index 00000000..7689415d --- /dev/null +++ b/src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d651bdc06c1b + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict( + TypedDict +): + event_id: str + + +class GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest( + BaseModel +): + event_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/getfileresponse.py b/src/mistralai/client/models/getfileresponse.py index f625c153..82280899 100644 --- a/src/mistralai/client/models/getfileresponse.py +++ b/src/mistralai/client/models/getfileresponse.py @@ -3,6 +3,7 @@ from __future__ import annotations from .filepurpose import FilePurpose +from .filevisibility import FileVisibility from .sampletype import SampleType from .source import Source from mistralai.client.types import ( @@ -35,6 +36,8 @@ class GetFileResponseTypedDict(TypedDict): num_lines: NotRequired[Nullable[int]] mimetype: NotRequired[Nullable[str]] signature: NotRequired[Nullable[str]] + expires_at: NotRequired[Nullable[int]] + visibility: NotRequired[Nullable[FileVisibility]] class GetFileResponse(BaseModel): @@ -67,10 +70,18 @@ class GetFileResponse(BaseModel): signature: OptionalNullable[str] = UNSET + expires_at: OptionalNullable[int] = UNSET + + visibility: OptionalNullable[FileVisibility] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["num_lines", "mimetype", "signature"]) - nullable_fields = set(["num_lines", "mimetype", "signature"]) + optional_fields = set( + ["num_lines", "mimetype", "signature", "expires_at", "visibility"] + ) + nullable_fields = set( + ["num_lines", "mimetype", "signature", "expires_at", "visibility"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/guardrailconfig.py b/src/mistralai/client/models/guardrailconfig.py new file mode 100644 index 00000000..9af986cf --- /dev/null +++ b/src/mistralai/client/models/guardrailconfig.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c72b74412547 + +from __future__ import annotations +from .moderationllmv1config import ModerationLlmv1Config, ModerationLlmv1ConfigTypedDict +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GuardrailConfigTypedDict(TypedDict): + moderation_llm_v1: Nullable[ModerationLlmv1ConfigTypedDict] + block_on_error: NotRequired[bool] + r"""If true, return HTTP 403 and block request in the event of a server-side error""" + + +class GuardrailConfig(BaseModel): + moderation_llm_v1: Nullable[ModerationLlmv1Config] + + block_on_error: Optional[bool] = False + r"""If true, return HTTP 403 and block request in the event of a server-side error""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["block_on_error"]) + nullable_fields = set(["moderation_llm_v1"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/imagecontent.py b/src/mistralai/client/models/imagecontent.py new file mode 100644 index 00000000..13c3f449 --- /dev/null +++ b/src/mistralai/client/models/imagecontent.py @@ -0,0 +1,94 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3abe7faee278 + +from __future__ import annotations +from .annotations import Annotations, AnnotationsTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Any, Dict, Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ImageContentTypedDict(TypedDict): + r"""Image content for a message.""" + + data: str + mime_type: str + type: Literal["image"] + annotations: NotRequired[Nullable[AnnotationsTypedDict]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class ImageContent(BaseModel): + r"""Image content for a message.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + data: str + + mime_type: Annotated[str, pydantic.Field(alias="mimeType")] + + type: Annotated[ + Annotated[Literal["image"], AfterValidator(validate_const("image"))], + pydantic.Field(alias="type"), + ] = "image" + + annotations: OptionalNullable[Annotations] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["annotations", "_meta"]) + nullable_fields = set(["annotations", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + ImageContent.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/importdatasetfromcampaignrequest.py b/src/mistralai/client/models/importdatasetfromcampaignrequest.py new file mode 100644 index 00000000..5db45e8e --- /dev/null +++ b/src/mistralai/client/models/importdatasetfromcampaignrequest.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ee475b85bfc7 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ImportDatasetFromCampaignRequestTypedDict(TypedDict): + campaign_id: str + + +class ImportDatasetFromCampaignRequest(BaseModel): + campaign_id: str diff --git a/src/mistralai/client/models/importdatasetfromdatasetrequest.py b/src/mistralai/client/models/importdatasetfromdatasetrequest.py new file mode 100644 index 00000000..ebf2a649 --- /dev/null +++ b/src/mistralai/client/models/importdatasetfromdatasetrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 77aea4882ccb + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ImportDatasetFromDatasetRequestTypedDict(TypedDict): + dataset_record_ids: List[str] + + +class ImportDatasetFromDatasetRequest(BaseModel): + dataset_record_ids: List[str] diff --git a/src/mistralai/client/models/importdatasetfromexplorerrequest.py b/src/mistralai/client/models/importdatasetfromexplorerrequest.py new file mode 100644 index 00000000..85df7af6 --- /dev/null +++ b/src/mistralai/client/models/importdatasetfromexplorerrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 852a3cbc1631 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ImportDatasetFromExplorerRequestTypedDict(TypedDict): + completion_event_ids: List[str] + + +class ImportDatasetFromExplorerRequest(BaseModel): + completion_event_ids: List[str] diff --git a/src/mistralai/client/models/importdatasetfromfilerequest.py b/src/mistralai/client/models/importdatasetfromfilerequest.py new file mode 100644 index 00000000..9a486776 --- /dev/null +++ b/src/mistralai/client/models/importdatasetfromfilerequest.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b2882fa57029 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ImportDatasetFromFileRequestTypedDict(TypedDict): + file_id: str + + +class ImportDatasetFromFileRequest(BaseModel): + file_id: str diff --git a/src/mistralai/client/models/importdatasetfromplaygroundrequest.py b/src/mistralai/client/models/importdatasetfromplaygroundrequest.py new file mode 100644 index 00000000..f5bd720d --- /dev/null +++ b/src/mistralai/client/models/importdatasetfromplaygroundrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8d809b14b144 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ImportDatasetFromPlaygroundRequestTypedDict(TypedDict): + conversation_ids: List[str] + + +class ImportDatasetFromPlaygroundRequest(BaseModel): + conversation_ids: List[str] diff --git a/src/mistralai/client/models/judge.py b/src/mistralai/client/models/judge.py new file mode 100644 index 00000000..1fb1d386 --- /dev/null +++ b/src/mistralai/client/models/judge.py @@ -0,0 +1,136 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d6adc687c2d9 + +from __future__ import annotations +from .judgeclassificationoutput import ( + JudgeClassificationOutput, + JudgeClassificationOutputTypedDict, +) +from .judgeregressionoutput import JudgeRegressionOutput, JudgeRegressionOutputTypedDict +from datetime import datetime +from functools import partial +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils.unions import parse_open_union +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import BeforeValidator +from typing import Any, List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +JudgeOutputUnionTypedDict = TypeAliasType( + "JudgeOutputUnionTypedDict", + Union[JudgeClassificationOutputTypedDict, JudgeRegressionOutputTypedDict], +) + + +class UnknownJudgeOutputUnion(BaseModel): + r"""A JudgeOutputUnion variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_JUDGE_OUTPUT_UNION_VARIANTS: dict[str, Any] = { + "CLASSIFICATION": JudgeClassificationOutput, + "REGRESSION": JudgeRegressionOutput, +} + + +JudgeOutputUnion = Annotated[ + Union[JudgeClassificationOutput, JudgeRegressionOutput, UnknownJudgeOutputUnion], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_JUDGE_OUTPUT_UNION_VARIANTS, + unknown_cls=UnknownJudgeOutputUnion, + union_name="JudgeOutputUnion", + ) + ), +] + + +class JudgeTypedDict(TypedDict): + id: str + created_at: datetime + updated_at: datetime + deleted_at: Nullable[datetime] + owner_id: str + workspace_id: str + name: str + description: str + model_name: str + output: JudgeOutputUnionTypedDict + instructions: str + tools: List[str] + up_revision: NotRequired[Nullable[str]] + down_revision: NotRequired[Nullable[str]] + base_revision: NotRequired[Nullable[str]] + + +class Judge(BaseModel): + id: str + + created_at: datetime + + updated_at: datetime + + deleted_at: Nullable[datetime] + + owner_id: str + + workspace_id: str + + name: str + + description: str + + model_name: str + + output: JudgeOutputUnion + + instructions: str + + tools: List[str] + + up_revision: OptionalNullable[str] = UNSET + + down_revision: OptionalNullable[str] = UNSET + + base_revision: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["up_revision", "down_revision", "base_revision"]) + nullable_fields = set( + ["deleted_at", "up_revision", "down_revision", "base_revision"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py b/src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py new file mode 100644 index 00000000..a6b9c969 --- /dev/null +++ b/src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 98c823e7cc1b + +from __future__ import annotations +from .judgechatcompletioneventrequest import ( + JudgeChatCompletionEventRequest, + JudgeChatCompletionEventRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequestTypedDict( + TypedDict +): + event_id: str + judge_chat_completion_event_request: JudgeChatCompletionEventRequestTypedDict + + +class JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest( + BaseModel +): + event_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + judge_chat_completion_event_request: Annotated[ + JudgeChatCompletionEventRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop.py b/src/mistralai/client/models/judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop.py new file mode 100644 index 00000000..4d54fa42 --- /dev/null +++ b/src/mistralai/client/models/judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4749566fd16d + +from __future__ import annotations +from .judgedatasetrecordrequest import ( + JudgeDatasetRecordRequest, + JudgeDatasetRecordRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequestTypedDict( + TypedDict +): + dataset_record_id: str + judge_dataset_record_request: JudgeDatasetRecordRequestTypedDict + + +class JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest( + BaseModel +): + dataset_record_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + judge_dataset_record_request: Annotated[ + JudgeDatasetRecordRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/judgechatcompletioneventrequest.py b/src/mistralai/client/models/judgechatcompletioneventrequest.py new file mode 100644 index 00000000..59c68801 --- /dev/null +++ b/src/mistralai/client/models/judgechatcompletioneventrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4fad8a510f7d + +from __future__ import annotations +from .createjudgerequest import CreateJudgeRequest, CreateJudgeRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class JudgeChatCompletionEventRequestTypedDict(TypedDict): + judge_definition: CreateJudgeRequestTypedDict + + +class JudgeChatCompletionEventRequest(BaseModel): + judge_definition: CreateJudgeRequest diff --git a/src/mistralai/client/models/judgeclassificationoutput.py b/src/mistralai/client/models/judgeclassificationoutput.py new file mode 100644 index 00000000..aa799682 --- /dev/null +++ b/src/mistralai/client/models/judgeclassificationoutput.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 683ae72d0efa + +from __future__ import annotations +from .judgeclassificationoutputoption import ( + JudgeClassificationOutputOption, + JudgeClassificationOutputOptionTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, TypedDict + + +class JudgeClassificationOutputTypedDict(TypedDict): + options: List[JudgeClassificationOutputOptionTypedDict] + type: Literal["CLASSIFICATION"] + + +class JudgeClassificationOutput(BaseModel): + options: List[JudgeClassificationOutputOption] + + type: Annotated[ + Annotated[ + Literal["CLASSIFICATION"], AfterValidator(validate_const("CLASSIFICATION")) + ], + pydantic.Field(alias="type"), + ] = "CLASSIFICATION" + + +try: + JudgeClassificationOutput.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/judgeclassificationoutputoption.py b/src/mistralai/client/models/judgeclassificationoutputoption.py new file mode 100644 index 00000000..64fad49f --- /dev/null +++ b/src/mistralai/client/models/judgeclassificationoutputoption.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c238f17d786b + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class JudgeClassificationOutputOptionTypedDict(TypedDict): + value: str + description: str + + +class JudgeClassificationOutputOption(BaseModel): + value: str + + description: str diff --git a/src/mistralai/client/models/judgedatasetrecordrequest.py b/src/mistralai/client/models/judgedatasetrecordrequest.py new file mode 100644 index 00000000..11499067 --- /dev/null +++ b/src/mistralai/client/models/judgedatasetrecordrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9ad8915328dd + +from __future__ import annotations +from .createjudgerequest import CreateJudgeRequest, CreateJudgeRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class JudgeDatasetRecordRequestTypedDict(TypedDict): + judge_definition: CreateJudgeRequestTypedDict + + +class JudgeDatasetRecordRequest(BaseModel): + judge_definition: CreateJudgeRequest diff --git a/src/mistralai/client/models/judgeoutput.py b/src/mistralai/client/models/judgeoutput.py new file mode 100644 index 00000000..2224a797 --- /dev/null +++ b/src/mistralai/client/models/judgeoutput.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8c8099403e62 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Union +from typing_extensions import TypeAliasType, TypedDict + + +AnswerTypedDict = TypeAliasType("AnswerTypedDict", Union[str, float]) + + +Answer = TypeAliasType("Answer", Union[str, float]) + + +class JudgeOutputTypedDict(TypedDict): + analysis: str + answer: AnswerTypedDict + + +class JudgeOutput(BaseModel): + analysis: str + + answer: Answer diff --git a/src/mistralai/client/models/judgeoutputtype.py b/src/mistralai/client/models/judgeoutputtype.py new file mode 100644 index 00000000..4fa99498 --- /dev/null +++ b/src/mistralai/client/models/judgeoutputtype.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3f07e1eb25f9 + +from __future__ import annotations +from typing import Literal + + +JudgeOutputType = Literal[ + "REGRESSION", + "CLASSIFICATION", +] diff --git a/src/mistralai/client/models/judgeregressionoutput.py b/src/mistralai/client/models/judgeregressionoutput.py new file mode 100644 index 00000000..63394d8b --- /dev/null +++ b/src/mistralai/client/models/judgeregressionoutput.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c61d451066dc + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class JudgeRegressionOutputTypedDict(TypedDict): + min_description: str + max_description: str + type: Literal["REGRESSION"] + min: NotRequired[float] + max: NotRequired[float] + + +class JudgeRegressionOutput(BaseModel): + min_description: str + + max_description: str + + type: Annotated[ + Annotated[Literal["REGRESSION"], AfterValidator(validate_const("REGRESSION"))], + pydantic.Field(alias="type"), + ] = "REGRESSION" + + min: Optional[float] = 0 + + max: Optional[float] = 1 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["min", "max"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + JudgeRegressionOutput.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/libraries_share_create_v1op.py b/src/mistralai/client/models/libraries_share_create_v1op.py index 00ea7482..9751045c 100644 --- a/src/mistralai/client/models/libraries_share_create_v1op.py +++ b/src/mistralai/client/models/libraries_share_create_v1op.py @@ -2,7 +2,7 @@ # @generated-id: feaacfd46dd3 from __future__ import annotations -from .sharingin import SharingIn, SharingInTypedDict +from .sharingrequest import SharingRequest, SharingRequestTypedDict from mistralai.client.types import BaseModel from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata from typing_extensions import Annotated, TypedDict @@ -10,7 +10,7 @@ class LibrariesShareCreateV1RequestTypedDict(TypedDict): library_id: str - sharing_in: SharingInTypedDict + sharing_request: SharingRequestTypedDict class LibrariesShareCreateV1Request(BaseModel): @@ -18,6 +18,7 @@ class LibrariesShareCreateV1Request(BaseModel): str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - sharing_in: Annotated[ - SharingIn, FieldMetadata(request=RequestMetadata(media_type="application/json")) + sharing_request: Annotated[ + SharingRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), ] diff --git a/src/mistralai/client/models/list_models_v1_models_getop.py b/src/mistralai/client/models/list_models_v1_models_getop.py new file mode 100644 index 00000000..70b0ab82 --- /dev/null +++ b/src/mistralai/client/models/list_models_v1_models_getop.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1843a7aa68e5 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListModelsV1ModelsGetRequestTypedDict(TypedDict): + provider: NotRequired[Nullable[str]] + model: NotRequired[Nullable[str]] + + +class ListModelsV1ModelsGetRequest(BaseModel): + provider: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + model: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["provider", "model"]) + nullable_fields = set(["provider", "model"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/listcampaignselectedeventsresponse.py b/src/mistralai/client/models/listcampaignselectedeventsresponse.py new file mode 100644 index 00000000..a6133ecc --- /dev/null +++ b/src/mistralai/client/models/listcampaignselectedeventsresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8e28cb9aff1a + +from __future__ import annotations +from .paginatedresultchatcompletioneventpreview import ( + PaginatedResultChatCompletionEventPreview, + PaginatedResultChatCompletionEventPreviewTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ListCampaignSelectedEventsResponseTypedDict(TypedDict): + completion_events: PaginatedResultChatCompletionEventPreviewTypedDict + + +class ListCampaignSelectedEventsResponse(BaseModel): + completion_events: PaginatedResultChatCompletionEventPreview diff --git a/src/mistralai/client/models/listcampaignsresponse.py b/src/mistralai/client/models/listcampaignsresponse.py new file mode 100644 index 00000000..741b1b21 --- /dev/null +++ b/src/mistralai/client/models/listcampaignsresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 307695cde5c2 + +from __future__ import annotations +from .paginatedresultcampaignpreview import ( + PaginatedResultCampaignPreview, + PaginatedResultCampaignPreviewTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ListCampaignsResponseTypedDict(TypedDict): + campaigns: PaginatedResultCampaignPreviewTypedDict + + +class ListCampaignsResponse(BaseModel): + campaigns: PaginatedResultCampaignPreview diff --git a/src/mistralai/client/models/listchatcompletionfieldsresponse.py b/src/mistralai/client/models/listchatcompletionfieldsresponse.py new file mode 100644 index 00000000..d260463a --- /dev/null +++ b/src/mistralai/client/models/listchatcompletionfieldsresponse.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2f8837a6a5c3 + +from __future__ import annotations +from .basefielddefinition import BaseFieldDefinition, BaseFieldDefinitionTypedDict +from .fieldgroup import FieldGroup, FieldGroupTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListChatCompletionFieldsResponseTypedDict(TypedDict): + field_definitions: List[BaseFieldDefinitionTypedDict] + field_groups: List[FieldGroupTypedDict] + + +class ListChatCompletionFieldsResponse(BaseModel): + field_definitions: List[BaseFieldDefinition] + + field_groups: List[FieldGroup] diff --git a/src/mistralai/client/models/listdatasetimporttasksresponse.py b/src/mistralai/client/models/listdatasetimporttasksresponse.py new file mode 100644 index 00000000..15bea396 --- /dev/null +++ b/src/mistralai/client/models/listdatasetimporttasksresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f635c1a3d02b + +from __future__ import annotations +from .paginatedresultdatasetimporttask import ( + PaginatedResultDatasetImportTask, + PaginatedResultDatasetImportTaskTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ListDatasetImportTasksResponseTypedDict(TypedDict): + tasks: PaginatedResultDatasetImportTaskTypedDict + + +class ListDatasetImportTasksResponse(BaseModel): + tasks: PaginatedResultDatasetImportTask diff --git a/src/mistralai/client/models/listdatasetrecordsresponse.py b/src/mistralai/client/models/listdatasetrecordsresponse.py new file mode 100644 index 00000000..2341577a --- /dev/null +++ b/src/mistralai/client/models/listdatasetrecordsresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 13b97e8095c4 + +from __future__ import annotations +from .paginatedresultdatasetrecord import ( + PaginatedResultDatasetRecord, + PaginatedResultDatasetRecordTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ListDatasetRecordsResponseTypedDict(TypedDict): + records: PaginatedResultDatasetRecordTypedDict + + +class ListDatasetRecordsResponse(BaseModel): + records: PaginatedResultDatasetRecord diff --git a/src/mistralai/client/models/listdatasetsresponse.py b/src/mistralai/client/models/listdatasetsresponse.py new file mode 100644 index 00000000..a35e9a73 --- /dev/null +++ b/src/mistralai/client/models/listdatasetsresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e18de4849423 + +from __future__ import annotations +from .paginatedresultdatasetpreview import ( + PaginatedResultDatasetPreview, + PaginatedResultDatasetPreviewTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ListDatasetsResponseTypedDict(TypedDict): + datasets: PaginatedResultDatasetPreviewTypedDict + + +class ListDatasetsResponse(BaseModel): + datasets: PaginatedResultDatasetPreview diff --git a/src/mistralai/client/models/listjudgesresponse.py b/src/mistralai/client/models/listjudgesresponse.py new file mode 100644 index 00000000..0284cb99 --- /dev/null +++ b/src/mistralai/client/models/listjudgesresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: db389a8abc34 + +from __future__ import annotations +from .paginatedresultjudgepreview import ( + PaginatedResultJudgePreview, + PaginatedResultJudgePreviewTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ListJudgesResponseTypedDict(TypedDict): + judges: PaginatedResultJudgePreviewTypedDict + + +class ListJudgesResponse(BaseModel): + judges: PaginatedResultJudgePreview diff --git a/src/mistralai/client/models/listsharingout.py b/src/mistralai/client/models/listsharingout.py deleted file mode 100644 index 443ad0d6..00000000 --- a/src/mistralai/client/models/listsharingout.py +++ /dev/null @@ -1,16 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: ee708a7ccdad - -from __future__ import annotations -from .sharingout import SharingOut, SharingOutTypedDict -from mistralai.client.types import BaseModel -from typing import List -from typing_extensions import TypedDict - - -class ListSharingOutTypedDict(TypedDict): - data: List[SharingOutTypedDict] - - -class ListSharingOut(BaseModel): - data: List[SharingOut] diff --git a/src/mistralai/client/models/listsharingresponse.py b/src/mistralai/client/models/listsharingresponse.py new file mode 100644 index 00000000..f3e6dc87 --- /dev/null +++ b/src/mistralai/client/models/listsharingresponse.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 487c6addf089 + +from __future__ import annotations +from .sharing import Sharing, SharingTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class ListSharingResponseTypedDict(TypedDict): + data: List[SharingTypedDict] + + +class ListSharingResponse(BaseModel): + data: List[Sharing] diff --git a/src/mistralai/client/models/mcpservericon.py b/src/mistralai/client/models/mcpservericon.py new file mode 100644 index 00000000..6068c1c4 --- /dev/null +++ b/src/mistralai/client/models/mcpservericon.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a5b508a322d7 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List +from typing_extensions import Annotated, NotRequired, TypedDict + + +class MCPServerIconTypedDict(TypedDict): + r"""An icon for display in user interfaces.""" + + src: str + mime_type: NotRequired[Nullable[str]] + sizes: NotRequired[Nullable[List[str]]] + + +class MCPServerIcon(BaseModel): + r"""An icon for display in user interfaces.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + src: str + + mime_type: Annotated[OptionalNullable[str], pydantic.Field(alias="mimeType")] = ( + UNSET + ) + + sizes: OptionalNullable[List[str]] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mimeType", "sizes"]) + nullable_fields = set(["mimeType", "sizes"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + MCPServerIcon.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/messageinputcontentchunks.py b/src/mistralai/client/models/messageinputcontentchunks.py index 1e04ce24..63cf14e7 100644 --- a/src/mistralai/client/models/messageinputcontentchunks.py +++ b/src/mistralai/client/models/messageinputcontentchunks.py @@ -2,13 +2,10 @@ # @generated-id: 01025c12866a from __future__ import annotations -from .conversationthinkchunk import ( - ConversationThinkChunk, - ConversationThinkChunkTypedDict, -) from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict +from .thinkchunk import ThinkChunk, ThinkChunkTypedDict from .toolfilechunk import ToolFileChunk, ToolFileChunkTypedDict from typing import Union from typing_extensions import TypeAliasType @@ -20,7 +17,7 @@ TextChunkTypedDict, ImageURLChunkTypedDict, DocumentURLChunkTypedDict, - ConversationThinkChunkTypedDict, + ThinkChunkTypedDict, ToolFileChunkTypedDict, ], ) @@ -28,11 +25,5 @@ MessageInputContentChunks = TypeAliasType( "MessageInputContentChunks", - Union[ - TextChunk, - ImageURLChunk, - DocumentURLChunk, - ConversationThinkChunk, - ToolFileChunk, - ], + Union[TextChunk, ImageURLChunk, DocumentURLChunk, ThinkChunk, ToolFileChunk], ) diff --git a/src/mistralai/client/models/messageoutputcontentchunks.py b/src/mistralai/client/models/messageoutputcontentchunks.py index bf455d17..def7a4d2 100644 --- a/src/mistralai/client/models/messageoutputcontentchunks.py +++ b/src/mistralai/client/models/messageoutputcontentchunks.py @@ -2,13 +2,10 @@ # @generated-id: 2ed248515035 from __future__ import annotations -from .conversationthinkchunk import ( - ConversationThinkChunk, - ConversationThinkChunkTypedDict, -) from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict +from .thinkchunk import ThinkChunk, ThinkChunkTypedDict from .toolfilechunk import ToolFileChunk, ToolFileChunkTypedDict from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict from typing import Union @@ -21,7 +18,7 @@ TextChunkTypedDict, ImageURLChunkTypedDict, DocumentURLChunkTypedDict, - ConversationThinkChunkTypedDict, + ThinkChunkTypedDict, ToolFileChunkTypedDict, ToolReferenceChunkTypedDict, ], @@ -34,7 +31,7 @@ TextChunk, ImageURLChunk, DocumentURLChunk, - ConversationThinkChunk, + ThinkChunk, ToolFileChunk, ToolReferenceChunk, ], diff --git a/src/mistralai/client/models/messageresponse.py b/src/mistralai/client/models/messageresponse.py new file mode 100644 index 00000000..c8fbdff7 --- /dev/null +++ b/src/mistralai/client/models/messageresponse.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6b388bc155dd + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class MessageResponseTypedDict(TypedDict): + message: str + + +class MessageResponse(BaseModel): + message: str diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index bb33d2e0..74e113bf 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -6,6 +6,7 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict @@ -93,6 +94,7 @@ class ModelConversationTypedDict(TypedDict): r"""List of tools which are available to the model during the conversation.""" completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] r"""Name given to the conversation.""" description: NotRequired[Nullable[str]] @@ -120,6 +122,8 @@ class ModelConversation(BaseModel): completion_args: Optional[CompletionArgs] = None r"""White-listed arguments from the completion API""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + name: OptionalNullable[str] = UNSET r"""Name given to the conversation.""" @@ -144,13 +148,16 @@ def serialize_model(self, handler): "instructions", "tools", "completion_args", + "guardrails", "name", "description", "metadata", "object", ] ) - nullable_fields = set(["instructions", "name", "description", "metadata"]) + nullable_fields = set( + ["instructions", "guardrails", "name", "description", "metadata"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/moderationllmv1action.py b/src/mistralai/client/models/moderationllmv1action.py new file mode 100644 index 00000000..ae3a6ee9 --- /dev/null +++ b/src/mistralai/client/models/moderationllmv1action.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c95110c21e79 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ModerationLlmv1Action = Union[ + Literal[ + "none", + "block", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/moderationllmv1categorythresholds.py b/src/mistralai/client/models/moderationllmv1categorythresholds.py new file mode 100644 index 00000000..0451ba3a --- /dev/null +++ b/src/mistralai/client/models/moderationllmv1categorythresholds.py @@ -0,0 +1,94 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0c51d6766440 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv1CategoryThresholdsTypedDict(TypedDict): + sexual: NotRequired[Nullable[float]] + hate_and_discrimination: NotRequired[Nullable[float]] + violence_and_threats: NotRequired[Nullable[float]] + dangerous_and_criminal_content: NotRequired[Nullable[float]] + selfharm: NotRequired[Nullable[float]] + health: NotRequired[Nullable[float]] + financial: NotRequired[Nullable[float]] + law: NotRequired[Nullable[float]] + pii: NotRequired[Nullable[float]] + + +class ModerationLlmv1CategoryThresholds(BaseModel): + sexual: OptionalNullable[float] = UNSET + + hate_and_discrimination: OptionalNullable[float] = UNSET + + violence_and_threats: OptionalNullable[float] = UNSET + + dangerous_and_criminal_content: OptionalNullable[float] = UNSET + + selfharm: OptionalNullable[float] = UNSET + + health: OptionalNullable[float] = UNSET + + financial: OptionalNullable[float] = UNSET + + law: OptionalNullable[float] = UNSET + + pii: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous_and_criminal_content", + "selfharm", + "health", + "financial", + "law", + "pii", + ] + ) + nullable_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous_and_criminal_content", + "selfharm", + "health", + "financial", + "law", + "pii", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/moderationllmv1config.py b/src/mistralai/client/models/moderationllmv1config.py new file mode 100644 index 00000000..b34dbbd3 --- /dev/null +++ b/src/mistralai/client/models/moderationllmv1config.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 483378b56394 + +from __future__ import annotations +from .moderationllmv1action import ModerationLlmv1Action +from .moderationllmv1categorythresholds import ( + ModerationLlmv1CategoryThresholds, + ModerationLlmv1CategoryThresholdsTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv1ConfigTypedDict(TypedDict): + model_name: NotRequired[str] + r"""Override model name. Should be omitted in general.""" + custom_category_thresholds: NotRequired[ + Nullable[ModerationLlmv1CategoryThresholdsTypedDict] + ] + r"""Override default thresholds for specific categories.""" + ignore_other_categories: NotRequired[bool] + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + action: NotRequired[ModerationLlmv1Action] + + +class ModerationLlmv1Config(BaseModel): + model_name: Optional[str] = "mistral-moderation-2411" + r"""Override model name. Should be omitted in general.""" + + custom_category_thresholds: OptionalNullable[ModerationLlmv1CategoryThresholds] = ( + UNSET + ) + r"""Override default thresholds for specific categories.""" + + ignore_other_categories: Optional[bool] = False + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + + action: Optional[ModerationLlmv1Action] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "model_name", + "custom_category_thresholds", + "ignore_other_categories", + "action", + ] + ) + nullable_fields = set(["custom_category_thresholds"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/observabilityerrorcode.py b/src/mistralai/client/models/observabilityerrorcode.py new file mode 100644 index 00000000..99360d41 --- /dev/null +++ b/src/mistralai/client/models/observabilityerrorcode.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ae572b470a30 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ObservabilityErrorCode = Union[ + Literal[ + "UNKNOWN_ERROR", + "VALIDATION_ERROR", + "AUTH_FORBIDDEN", + "AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN", + "AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND", + "AUTH_FORBIDDEN_ROLE_NOT_FOUND", + "AUTH_FORBIDDEN_ORG_NOT_WHITELISTED", + "AUTH_UNAUTHORIZED", + "FEATURE_NOT_SUPPORTED", + "FIELDS_BAD_REQUEST", + "FIELDS_NOT_FOUND", + "SEARCH_NOT_FOUND", + "SEARCH_BAD_REQUEST", + "SEARCH_SERVICE_UNAVAILABLE", + "DATABASE_ERROR", + "DATABASE_TIMEOUT", + "DATABASE_UNAVAILABLE", + "DATABASE_QUERY_ERROR", + "SEARCH_FILTER_TO_SQL_CONVERSION_ERROR", + "JUDGE_CONVERSATION_FORMAT_ERROR", + "JUDGE_MISTRAL_API_ERROR", + "JUDGE_MISTRAL_API_TIMEOUT", + "JUDGE_NAME_ALREADY_EXISTS", + "JUDGE_NOT_FOUND", + "JUDGE_ALREADY_HAS_NEW_VERSION", + "JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED", + "JUDGE_DID_NOT_CHANGE", + "CAMPAIGN_NOT_FOUND", + "CAMPAIGN_NO_MATCHING_EVENTS", + "DATASET_NOT_FOUND", + "DATASET_TASK_NOT_FOUND", + "DATASET_RECORD_NOT_FOUND", + "DATASET_RECORD_FORMAT_ERROR", + "AGENT_NOT_FOUND", + "AGENT_MISTRAL_API_ERROR", + "EVALUATION_NOT_FOUND", + "EVALUATION_CURRENTLY_RUNNING", + "EVALUATION_RECORD_NOT_FOUND", + "EVALUATION_RUN_NOT_FOUND", + "EVALUATION_RUN_TRANSITION_IS_INVALID", + "EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY", + "EVALUATION_RUN_TRANSITION_ERROR", + "TEMPLATE_SYNTAX_ERROR", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/observabilityerrordetail.py b/src/mistralai/client/models/observabilityerrordetail.py new file mode 100644 index 00000000..a6236b66 --- /dev/null +++ b/src/mistralai/client/models/observabilityerrordetail.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cb6e8a484a38 + +from __future__ import annotations +from .observabilityerrorcode import ObservabilityErrorCode +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class ObservabilityErrorDetailTypedDict(TypedDict): + message: str + error_code: Nullable[ObservabilityErrorCode] + + +class ObservabilityErrorDetail(BaseModel): + message: str + + error_code: Nullable[ObservabilityErrorCode] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/outputcontentchunks.py b/src/mistralai/client/models/outputcontentchunks.py index fab7907b..1a115fe8 100644 --- a/src/mistralai/client/models/outputcontentchunks.py +++ b/src/mistralai/client/models/outputcontentchunks.py @@ -2,13 +2,10 @@ # @generated-id: 9ad9741f4975 from __future__ import annotations -from .conversationthinkchunk import ( - ConversationThinkChunk, - ConversationThinkChunkTypedDict, -) from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict +from .thinkchunk import ThinkChunk, ThinkChunkTypedDict from .toolfilechunk import ToolFileChunk, ToolFileChunkTypedDict from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict from typing import Union @@ -21,7 +18,7 @@ TextChunkTypedDict, ImageURLChunkTypedDict, DocumentURLChunkTypedDict, - ConversationThinkChunkTypedDict, + ThinkChunkTypedDict, ToolFileChunkTypedDict, ToolReferenceChunkTypedDict, ], @@ -34,7 +31,7 @@ TextChunk, ImageURLChunk, DocumentURLChunk, - ConversationThinkChunk, + ThinkChunk, ToolFileChunk, ToolReferenceChunk, ], diff --git a/src/mistralai/client/models/paginatedconnectors.py b/src/mistralai/client/models/paginatedconnectors.py new file mode 100644 index 00000000..291da111 --- /dev/null +++ b/src/mistralai/client/models/paginatedconnectors.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 17e125b1022c + +from __future__ import annotations +from .connector import Connector, ConnectorTypedDict +from .paginationresponse import PaginationResponse, PaginationResponseTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class PaginatedConnectorsTypedDict(TypedDict): + items: List[ConnectorTypedDict] + pagination: PaginationResponseTypedDict + + +class PaginatedConnectors(BaseModel): + items: List[Connector] + + pagination: PaginationResponse diff --git a/src/mistralai/client/models/paginatedresultcampaignpreview.py b/src/mistralai/client/models/paginatedresultcampaignpreview.py new file mode 100644 index 00000000..d82ee741 --- /dev/null +++ b/src/mistralai/client/models/paginatedresultcampaignpreview.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6653cba0f982 + +from __future__ import annotations +from .campaign import Campaign, CampaignTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PaginatedResultCampaignPreviewTypedDict(TypedDict): + count: int + results: NotRequired[List[CampaignTypedDict]] + next: NotRequired[Nullable[str]] + previous: NotRequired[Nullable[str]] + + +class PaginatedResultCampaignPreview(BaseModel): + count: int + + results: Optional[List[Campaign]] = None + + next: OptionalNullable[str] = UNSET + + previous: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "previous"]) + nullable_fields = set(["next", "previous"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py new file mode 100644 index 00000000..97bbfea7 --- /dev/null +++ b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py @@ -0,0 +1,60 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8c640682ccf9 + +from __future__ import annotations +from .chatcompletioneventpreview import ( + ChatCompletionEventPreview, + ChatCompletionEventPreviewTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PaginatedResultChatCompletionEventPreviewTypedDict(TypedDict): + count: int + results: NotRequired[List[ChatCompletionEventPreviewTypedDict]] + next: NotRequired[Nullable[str]] + previous: NotRequired[Nullable[str]] + + +class PaginatedResultChatCompletionEventPreview(BaseModel): + count: int + + results: Optional[List[ChatCompletionEventPreview]] = None + + next: OptionalNullable[str] = UNSET + + previous: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "previous"]) + nullable_fields = set(["next", "previous"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/paginatedresultdatasetimporttask.py b/src/mistralai/client/models/paginatedresultdatasetimporttask.py new file mode 100644 index 00000000..9d6dcd05 --- /dev/null +++ b/src/mistralai/client/models/paginatedresultdatasetimporttask.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8fd0a8bad4e7 + +from __future__ import annotations +from .datasetimporttask import DatasetImportTask, DatasetImportTaskTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PaginatedResultDatasetImportTaskTypedDict(TypedDict): + count: int + results: NotRequired[List[DatasetImportTaskTypedDict]] + next: NotRequired[Nullable[str]] + previous: NotRequired[Nullable[str]] + + +class PaginatedResultDatasetImportTask(BaseModel): + count: int + + results: Optional[List[DatasetImportTask]] = None + + next: OptionalNullable[str] = UNSET + + previous: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "previous"]) + nullable_fields = set(["next", "previous"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/paginatedresultdatasetpreview.py b/src/mistralai/client/models/paginatedresultdatasetpreview.py new file mode 100644 index 00000000..51566cc5 --- /dev/null +++ b/src/mistralai/client/models/paginatedresultdatasetpreview.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: bf20489474ce + +from __future__ import annotations +from .datasetpreview import DatasetPreview, DatasetPreviewTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PaginatedResultDatasetPreviewTypedDict(TypedDict): + count: int + results: NotRequired[List[DatasetPreviewTypedDict]] + next: NotRequired[Nullable[str]] + previous: NotRequired[Nullable[str]] + + +class PaginatedResultDatasetPreview(BaseModel): + count: int + + results: Optional[List[DatasetPreview]] = None + + next: OptionalNullable[str] = UNSET + + previous: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "previous"]) + nullable_fields = set(["next", "previous"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/paginatedresultdatasetrecord.py b/src/mistralai/client/models/paginatedresultdatasetrecord.py new file mode 100644 index 00000000..1d6e15c1 --- /dev/null +++ b/src/mistralai/client/models/paginatedresultdatasetrecord.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2556a91b48c4 + +from __future__ import annotations +from .datasetrecord import DatasetRecord, DatasetRecordTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PaginatedResultDatasetRecordTypedDict(TypedDict): + count: int + results: NotRequired[List[DatasetRecordTypedDict]] + next: NotRequired[Nullable[str]] + previous: NotRequired[Nullable[str]] + + +class PaginatedResultDatasetRecord(BaseModel): + count: int + + results: Optional[List[DatasetRecord]] = None + + next: OptionalNullable[str] = UNSET + + previous: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "previous"]) + nullable_fields = set(["next", "previous"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/paginatedresultjudgepreview.py b/src/mistralai/client/models/paginatedresultjudgepreview.py new file mode 100644 index 00000000..57dbc1e5 --- /dev/null +++ b/src/mistralai/client/models/paginatedresultjudgepreview.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4d5aab2705a0 + +from __future__ import annotations +from .judge import Judge, JudgeTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PaginatedResultJudgePreviewTypedDict(TypedDict): + count: int + results: NotRequired[List[JudgeTypedDict]] + next: NotRequired[Nullable[str]] + previous: NotRequired[Nullable[str]] + + +class PaginatedResultJudgePreview(BaseModel): + count: int + + results: Optional[List[Judge]] = None + + next: OptionalNullable[str] = UNSET + + previous: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results", "next", "previous"]) + nullable_fields = set(["next", "previous"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/paginationresponse.py b/src/mistralai/client/models/paginationresponse.py new file mode 100644 index 00000000..f05ee380 --- /dev/null +++ b/src/mistralai/client/models/paginationresponse.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d64678967bf0 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class PaginationResponseTypedDict(TypedDict): + page_size: int + next_cursor: NotRequired[Nullable[str]] + + +class PaginationResponse(BaseModel): + page_size: int + + next_cursor: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next_cursor"]) + nullable_fields = set(["next_cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py b/src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py new file mode 100644 index 00000000..3d572517 --- /dev/null +++ b/src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3e8e390b7fa1 + +from __future__ import annotations +from .importdatasetfromcampaignrequest import ( + ImportDatasetFromCampaignRequest, + ImportDatasetFromCampaignRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequestTypedDict( + TypedDict +): + dataset_id: str + import_dataset_from_campaign_request: ImportDatasetFromCampaignRequestTypedDict + + +class PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest( + BaseModel +): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + import_dataset_from_campaign_request: Annotated[ + ImportDatasetFromCampaignRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop.py b/src/mistralai/client/models/post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop.py new file mode 100644 index 00000000..aac48bd6 --- /dev/null +++ b/src/mistralai/client/models/post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d396e018c804 + +from __future__ import annotations +from .importdatasetfromdatasetrequest import ( + ImportDatasetFromDatasetRequest, + ImportDatasetFromDatasetRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequestTypedDict( + TypedDict +): + dataset_id: str + import_dataset_from_dataset_request: ImportDatasetFromDatasetRequestTypedDict + + +class PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest( + BaseModel +): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + import_dataset_from_dataset_request: Annotated[ + ImportDatasetFromDatasetRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop.py b/src/mistralai/client/models/post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop.py new file mode 100644 index 00000000..6524c4d9 --- /dev/null +++ b/src/mistralai/client/models/post_dataset_records_from_explorer_v1_observability_datasets_dataset_id_imports_from_explorer_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 046c79ed47c7 + +from __future__ import annotations +from .importdatasetfromexplorerrequest import ( + ImportDatasetFromExplorerRequest, + ImportDatasetFromExplorerRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequestTypedDict( + TypedDict +): + dataset_id: str + import_dataset_from_explorer_request: ImportDatasetFromExplorerRequestTypedDict + + +class PostDatasetRecordsFromExplorerV1ObservabilityDatasetsDatasetIDImportsFromExplorerPostRequest( + BaseModel +): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + import_dataset_from_explorer_request: Annotated[ + ImportDatasetFromExplorerRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop.py b/src/mistralai/client/models/post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop.py new file mode 100644 index 00000000..17f90d48 --- /dev/null +++ b/src/mistralai/client/models/post_dataset_records_from_file_v1_observability_datasets_dataset_id_imports_from_file_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6e93e5363630 + +from __future__ import annotations +from .importdatasetfromfilerequest import ( + ImportDatasetFromFileRequest, + ImportDatasetFromFileRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequestTypedDict( + TypedDict +): + dataset_id: str + import_dataset_from_file_request: ImportDatasetFromFileRequestTypedDict + + +class PostDatasetRecordsFromFileV1ObservabilityDatasetsDatasetIDImportsFromFilePostRequest( + BaseModel +): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + import_dataset_from_file_request: Annotated[ + ImportDatasetFromFileRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py b/src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py new file mode 100644 index 00000000..7423375a --- /dev/null +++ b/src/mistralai/client/models/post_dataset_records_from_playground_v1_observability_datasets_dataset_id_imports_from_playground_postop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 09334d96c26d + +from __future__ import annotations +from .importdatasetfromplaygroundrequest import ( + ImportDatasetFromPlaygroundRequest, + ImportDatasetFromPlaygroundRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequestTypedDict( + TypedDict +): + dataset_id: str + import_dataset_from_playground_request: ImportDatasetFromPlaygroundRequestTypedDict + + +class PostDatasetRecordsFromPlaygroundV1ObservabilityDatasetsDatasetIDImportsFromPlaygroundPostRequest( + BaseModel +): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + import_dataset_from_playground_request: Annotated[ + ImportDatasetFromPlaygroundRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/processingstatusout.py b/src/mistralai/client/models/processingstatus.py similarity index 77% rename from src/mistralai/client/models/processingstatusout.py rename to src/mistralai/client/models/processingstatus.py index ed2a4f22..7e93308f 100644 --- a/src/mistralai/client/models/processingstatusout.py +++ b/src/mistralai/client/models/processingstatus.py @@ -1,5 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 3df842c4140f +# @generated-id: 28146eaecfcf from __future__ import annotations from .processstatus import ProcessStatus @@ -7,13 +7,13 @@ from typing_extensions import TypedDict -class ProcessingStatusOutTypedDict(TypedDict): +class ProcessingStatusTypedDict(TypedDict): document_id: str process_status: ProcessStatus processing_status: str -class ProcessingStatusOut(BaseModel): +class ProcessingStatus(BaseModel): document_id: str process_status: ProcessStatus diff --git a/src/mistralai/client/models/resourcelink.py b/src/mistralai/client/models/resourcelink.py new file mode 100644 index 00000000..8ed5613c --- /dev/null +++ b/src/mistralai/client/models/resourcelink.py @@ -0,0 +1,140 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4251cc3c7797 + +from __future__ import annotations +from .annotations import Annotations, AnnotationsTypedDict +from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Any, Dict, List, Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ResourceLinkTypedDict(TypedDict): + r"""A resource that the server is capable of reading, included in a prompt or tool call result. + + Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests. + """ + + name: str + uri: str + title: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + mime_type: NotRequired[Nullable[str]] + size: NotRequired[Nullable[int]] + icons: NotRequired[Nullable[List[MCPServerIconTypedDict]]] + annotations: NotRequired[Nullable[AnnotationsTypedDict]] + meta: NotRequired[Nullable[Dict[str, Any]]] + type: Literal["resource_link"] + + +class ResourceLink(BaseModel): + r"""A resource that the server is capable of reading, included in a prompt or tool call result. + + Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests. + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + name: str + + uri: str + + title: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + mime_type: Annotated[OptionalNullable[str], pydantic.Field(alias="mimeType")] = ( + UNSET + ) + + size: OptionalNullable[int] = UNSET + + icons: OptionalNullable[List[MCPServerIcon]] = UNSET + + annotations: OptionalNullable[Annotations] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + type: Annotated[ + Annotated[ + Literal["resource_link"], AfterValidator(validate_const("resource_link")) + ], + pydantic.Field(alias="type"), + ] = "resource_link" + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "title", + "description", + "mimeType", + "size", + "icons", + "annotations", + "_meta", + ] + ) + nullable_fields = set( + [ + "title", + "description", + "mimeType", + "size", + "icons", + "annotations", + "_meta", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + ResourceLink.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/resourcevisibility.py b/src/mistralai/client/models/resourcevisibility.py new file mode 100644 index 00000000..56f91f15 --- /dev/null +++ b/src/mistralai/client/models/resourcevisibility.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b5819dd5f981 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ResourceVisibility = Union[ + Literal[ + "shared_global", + "shared_org", + "shared_workspace", + "private", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/searchchatcompletioneventidsrequest.py b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py new file mode 100644 index 00000000..f8476081 --- /dev/null +++ b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cabc8ef82d67 + +from __future__ import annotations +from .filterpayload import FilterPayload, FilterPayloadTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class SearchChatCompletionEventIdsRequestTypedDict(TypedDict): + search_params: FilterPayloadTypedDict + extra_fields: NotRequired[Nullable[List[str]]] + + +class SearchChatCompletionEventIdsRequest(BaseModel): + search_params: FilterPayload + + extra_fields: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["extra_fields"]) + nullable_fields = set(["extra_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/searchchatcompletioneventidsresponse.py b/src/mistralai/client/models/searchchatcompletioneventidsresponse.py new file mode 100644 index 00000000..f4751159 --- /dev/null +++ b/src/mistralai/client/models/searchchatcompletioneventidsresponse.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a5f0bad3ba10 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class SearchChatCompletionEventIdsResponseTypedDict(TypedDict): + completion_event_ids: List[str] + + +class SearchChatCompletionEventIdsResponse(BaseModel): + completion_event_ids: List[str] diff --git a/src/mistralai/client/models/searchchatcompletioneventsrequest.py b/src/mistralai/client/models/searchchatcompletioneventsrequest.py new file mode 100644 index 00000000..95524c5b --- /dev/null +++ b/src/mistralai/client/models/searchchatcompletioneventsrequest.py @@ -0,0 +1,51 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a437333780bc + +from __future__ import annotations +from .filterpayload import FilterPayload, FilterPayloadTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class SearchChatCompletionEventsRequestTypedDict(TypedDict): + search_params: FilterPayloadTypedDict + extra_fields: NotRequired[Nullable[List[str]]] + + +class SearchChatCompletionEventsRequest(BaseModel): + search_params: FilterPayload + + extra_fields: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["extra_fields"]) + nullable_fields = set(["extra_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/searchchatcompletioneventsresponse.py b/src/mistralai/client/models/searchchatcompletioneventsresponse.py new file mode 100644 index 00000000..8b9b10b5 --- /dev/null +++ b/src/mistralai/client/models/searchchatcompletioneventsresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f96acbcd45f7 + +from __future__ import annotations +from .feedresultchatcompletioneventpreview import ( + FeedResultChatCompletionEventPreview, + FeedResultChatCompletionEventPreviewTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class SearchChatCompletionEventsResponseTypedDict(TypedDict): + completion_events: FeedResultChatCompletionEventPreviewTypedDict + + +class SearchChatCompletionEventsResponse(BaseModel): + completion_events: FeedResultChatCompletionEventPreview diff --git a/src/mistralai/client/models/sharingout.py b/src/mistralai/client/models/sharing.py similarity index 93% rename from src/mistralai/client/models/sharingout.py rename to src/mistralai/client/models/sharing.py index ab3679a4..d6142e83 100644 --- a/src/mistralai/client/models/sharingout.py +++ b/src/mistralai/client/models/sharing.py @@ -1,5 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 0b8804effb5c +# @generated-id: 324f5ac27249 from __future__ import annotations from mistralai.client.types import ( @@ -13,7 +13,7 @@ from typing_extensions import NotRequired, TypedDict -class SharingOutTypedDict(TypedDict): +class SharingTypedDict(TypedDict): library_id: str org_id: str role: str @@ -22,7 +22,7 @@ class SharingOutTypedDict(TypedDict): user_id: NotRequired[Nullable[str]] -class SharingOut(BaseModel): +class Sharing(BaseModel): library_id: str org_id: str diff --git a/src/mistralai/client/models/sharingin.py b/src/mistralai/client/models/sharingrequest.py similarity index 94% rename from src/mistralai/client/models/sharingin.py rename to src/mistralai/client/models/sharingrequest.py index 7c1a52b0..76424b8e 100644 --- a/src/mistralai/client/models/sharingin.py +++ b/src/mistralai/client/models/sharingrequest.py @@ -1,5 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: e953dda09c02 +# @generated-id: 2439b732dfae from __future__ import annotations from .entitytype import EntityType @@ -15,7 +15,7 @@ from typing_extensions import NotRequired, TypedDict -class SharingInTypedDict(TypedDict): +class SharingRequestTypedDict(TypedDict): level: ShareEnum share_with_uuid: str r"""The id of the entity (user, workspace or organization) to share with""" @@ -24,7 +24,7 @@ class SharingInTypedDict(TypedDict): org_id: NotRequired[Nullable[str]] -class SharingIn(BaseModel): +class SharingRequest(BaseModel): level: ShareEnum share_with_uuid: str diff --git a/src/mistralai/client/models/textcontent.py b/src/mistralai/client/models/textcontent.py new file mode 100644 index 00000000..7468b046 --- /dev/null +++ b/src/mistralai/client/models/textcontent.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 60805b9f7050 + +from __future__ import annotations +from .annotations import Annotations, AnnotationsTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Any, Dict, Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TextContentTypedDict(TypedDict): + r"""Text content for a message.""" + + text: str + type: Literal["text"] + annotations: NotRequired[Nullable[AnnotationsTypedDict]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class TextContent(BaseModel): + r"""Text content for a message.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + text: str + + type: Annotated[ + Annotated[Literal["text"], AfterValidator(validate_const("text"))], + pydantic.Field(alias="type"), + ] = "text" + + annotations: OptionalNullable[Annotations] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["annotations", "_meta"]) + nullable_fields = set(["annotations", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + TextContent.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/textresourcecontents.py b/src/mistralai/client/models/textresourcecontents.py new file mode 100644 index 00000000..c497bb4d --- /dev/null +++ b/src/mistralai/client/models/textresourcecontents.py @@ -0,0 +1,87 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 58fe427f427f + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TextResourceContentsTypedDict(TypedDict): + r"""Text contents of a resource.""" + + uri: str + text: str + mime_type: NotRequired[Nullable[str]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class TextResourceContents(BaseModel): + r"""Text contents of a resource.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + uri: str + + text: str + + mime_type: Annotated[OptionalNullable[str], pydantic.Field(alias="mimeType")] = ( + UNSET + ) + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mimeType", "_meta"]) + nullable_fields = set(["mimeType", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + TextResourceContents.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/thinkchunk.py b/src/mistralai/client/models/thinkchunk.py index 5995e601..03573f8e 100644 --- a/src/mistralai/client/models/thinkchunk.py +++ b/src/mistralai/client/models/thinkchunk.py @@ -4,6 +4,7 @@ from __future__ import annotations from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict +from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict from mistralai.client.types import BaseModel, UNSET_SENTINEL from mistralai.client.utils import validate_const import pydantic @@ -13,28 +14,31 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -ThinkChunkThinkingTypedDict = TypeAliasType( - "ThinkChunkThinkingTypedDict", Union[ReferenceChunkTypedDict, TextChunkTypedDict] +ThinkingTypedDict = TypeAliasType( + "ThinkingTypedDict", + Union[TextChunkTypedDict, ReferenceChunkTypedDict, ToolReferenceChunkTypedDict], ) -ThinkChunkThinking = TypeAliasType( - "ThinkChunkThinking", Union[ReferenceChunk, TextChunk] +Thinking = TypeAliasType( + "Thinking", Union[TextChunk, ReferenceChunk, ToolReferenceChunk] ) class ThinkChunkTypedDict(TypedDict): - thinking: List[ThinkChunkThinkingTypedDict] + thinking: List[ThinkingTypedDict] type: Literal["thinking"] closed: NotRequired[bool] r"""Whether the thinking chunk is closed or not. Currently only used for prefixing.""" class ThinkChunk(BaseModel): - thinking: List[ThinkChunkThinking] + thinking: List[Thinking] type: Annotated[ - Annotated[Literal["thinking"], AfterValidator(validate_const("thinking"))], + Annotated[ + Optional[Literal["thinking"]], AfterValidator(validate_const("thinking")) + ], pydantic.Field(alias="type"), ] = "thinking" @@ -43,7 +47,7 @@ class ThinkChunk(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["closed"]) + optional_fields = set(["type", "closed"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py b/src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py new file mode 100644 index 00000000..d5a2bd9d --- /dev/null +++ b/src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fa5d55a9d6cf + +from __future__ import annotations +from .updatedatasetrecordpayloadrequest import ( + UpdateDatasetRecordPayloadRequest, + UpdateDatasetRecordPayloadRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequestTypedDict( + TypedDict +): + dataset_record_id: str + update_dataset_record_payload_request: UpdateDatasetRecordPayloadRequestTypedDict + + +class UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest( + BaseModel +): + dataset_record_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_dataset_record_payload_request: Annotated[ + UpdateDatasetRecordPayloadRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop.py b/src/mistralai/client/models/update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop.py new file mode 100644 index 00000000..b828aa80 --- /dev/null +++ b/src/mistralai/client/models/update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b0af26e00bfa + +from __future__ import annotations +from .updatedatasetrecordpropertiesrequest import ( + UpdateDatasetRecordPropertiesRequest, + UpdateDatasetRecordPropertiesRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequestTypedDict( + TypedDict +): + dataset_record_id: str + update_dataset_record_properties_request: ( + UpdateDatasetRecordPropertiesRequestTypedDict + ) + + +class UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest( + BaseModel +): + dataset_record_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_dataset_record_properties_request: Annotated[ + UpdateDatasetRecordPropertiesRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/update_dataset_v1_observability_datasets_dataset_id_patchop.py b/src/mistralai/client/models/update_dataset_v1_observability_datasets_dataset_id_patchop.py new file mode 100644 index 00000000..5a440564 --- /dev/null +++ b/src/mistralai/client/models/update_dataset_v1_observability_datasets_dataset_id_patchop.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7bb459765cba + +from __future__ import annotations +from .updatedatasetrequest import UpdateDatasetRequest, UpdateDatasetRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict(TypedDict): + dataset_id: str + update_dataset_request: UpdateDatasetRequestTypedDict + + +class UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest(BaseModel): + dataset_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_dataset_request: Annotated[ + UpdateDatasetRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/update_judge_v1_observability_judges_judge_id_putop.py b/src/mistralai/client/models/update_judge_v1_observability_judges_judge_id_putop.py new file mode 100644 index 00000000..41c3a365 --- /dev/null +++ b/src/mistralai/client/models/update_judge_v1_observability_judges_judge_id_putop.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a1bace5342e6 + +from __future__ import annotations +from .updatejudgerequest import UpdateJudgeRequest, UpdateJudgeRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict(TypedDict): + judge_id: str + update_judge_request: UpdateJudgeRequestTypedDict + + +class UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest(BaseModel): + judge_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_judge_request: Annotated[ + UpdateJudgeRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index b751ff74..dbe3499e 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -6,6 +6,7 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict @@ -54,6 +55,7 @@ class UpdateAgentRequestTypedDict(TypedDict): r"""List of tools which are available to the model during the conversation.""" completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] model: NotRequired[Nullable[str]] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] @@ -73,6 +75,8 @@ class UpdateAgentRequest(BaseModel): completion_args: Optional[CompletionArgs] = None r"""White-listed arguments from the completion API""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + model: OptionalNullable[str] = UNSET name: OptionalNullable[str] = UNSET @@ -94,6 +98,7 @@ def serialize_model(self, handler): "instructions", "tools", "completion_args", + "guardrails", "model", "name", "description", @@ -106,6 +111,7 @@ def serialize_model(self, handler): nullable_fields = set( [ "instructions", + "guardrails", "model", "name", "description", diff --git a/src/mistralai/client/models/updateconnectorrequest.py b/src/mistralai/client/models/updateconnectorrequest.py new file mode 100644 index 00000000..2fe42ba8 --- /dev/null +++ b/src/mistralai/client/models/updateconnectorrequest.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a761cd154109 + +from __future__ import annotations +from .authdata import AuthData, AuthDataTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class UpdateConnectorRequestTypedDict(TypedDict): + name: NotRequired[Nullable[str]] + r"""The name of the connector.""" + description: NotRequired[Nullable[str]] + r"""The description of the connector.""" + icon_url: NotRequired[Nullable[str]] + r"""The optional url of the icon you want to associate to the connector.""" + system_prompt: NotRequired[Nullable[str]] + r"""Optional system prompt for the connector.""" + connection_config: NotRequired[Nullable[Dict[str, Any]]] + r"""Optional new connection config.""" + connection_secrets: NotRequired[Nullable[Dict[str, Any]]] + r"""Optional new connection secrets""" + server: NotRequired[Nullable[str]] + r"""New server url for your mcp connector.""" + headers: NotRequired[Nullable[Dict[str, Any]]] + r"""New headers for your mcp connector.""" + auth_data: NotRequired[Nullable[AuthDataTypedDict]] + r"""New authentication data for your mcp connector.""" + + +class UpdateConnectorRequest(BaseModel): + name: OptionalNullable[str] = UNSET + r"""The name of the connector.""" + + description: OptionalNullable[str] = UNSET + r"""The description of the connector.""" + + icon_url: OptionalNullable[str] = UNSET + r"""The optional url of the icon you want to associate to the connector.""" + + system_prompt: OptionalNullable[str] = UNSET + r"""Optional system prompt for the connector.""" + + connection_config: OptionalNullable[Dict[str, Any]] = UNSET + r"""Optional new connection config.""" + + connection_secrets: OptionalNullable[Dict[str, Any]] = UNSET + r"""Optional new connection secrets""" + + server: OptionalNullable[str] = UNSET + r"""New server url for your mcp connector.""" + + headers: OptionalNullable[Dict[str, Any]] = UNSET + r"""New headers for your mcp connector.""" + + auth_data: OptionalNullable[AuthData] = UNSET + r"""New authentication data for your mcp connector.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "name", + "description", + "icon_url", + "system_prompt", + "connection_config", + "connection_secrets", + "server", + "headers", + "auth_data", + ] + ) + nullable_fields = set( + [ + "name", + "description", + "icon_url", + "system_prompt", + "connection_config", + "connection_secrets", + "server", + "headers", + "auth_data", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/updatedatasetrecordpayloadrequest.py b/src/mistralai/client/models/updatedatasetrecordpayloadrequest.py new file mode 100644 index 00000000..155ea78d --- /dev/null +++ b/src/mistralai/client/models/updatedatasetrecordpayloadrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: bd45f357a538 + +from __future__ import annotations +from .conversationpayload import ConversationPayload, ConversationPayloadTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class UpdateDatasetRecordPayloadRequestTypedDict(TypedDict): + payload: ConversationPayloadTypedDict + + +class UpdateDatasetRecordPayloadRequest(BaseModel): + payload: ConversationPayload diff --git a/src/mistralai/client/models/updatedatasetrecordpropertiesrequest.py b/src/mistralai/client/models/updatedatasetrecordpropertiesrequest.py new file mode 100644 index 00000000..ccba4a5c --- /dev/null +++ b/src/mistralai/client/models/updatedatasetrecordpropertiesrequest.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c457ead40a69 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Any, Dict +from typing_extensions import TypedDict + + +class UpdateDatasetRecordPropertiesRequestTypedDict(TypedDict): + properties: Dict[str, Any] + + +class UpdateDatasetRecordPropertiesRequest(BaseModel): + properties: Dict[str, Any] diff --git a/src/mistralai/client/models/updatedatasetrequest.py b/src/mistralai/client/models/updatedatasetrequest.py new file mode 100644 index 00000000..02974089 --- /dev/null +++ b/src/mistralai/client/models/updatedatasetrequest.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: bbb067caa23f + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class UpdateDatasetRequestTypedDict(TypedDict): + name: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + + +class UpdateDatasetRequest(BaseModel): + name: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "description"]) + nullable_fields = set(["name", "description"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/updatejudgerequest.py b/src/mistralai/client/models/updatejudgerequest.py new file mode 100644 index 00000000..04c86ab6 --- /dev/null +++ b/src/mistralai/client/models/updatejudgerequest.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f6ad6fb901a0 + +from __future__ import annotations +from .judgeclassificationoutput import ( + JudgeClassificationOutput, + JudgeClassificationOutputTypedDict, +) +from .judgeregressionoutput import JudgeRegressionOutput, JudgeRegressionOutputTypedDict +from mistralai.client.types import BaseModel +from pydantic import Field +from typing import List, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +UpdateJudgeRequestOutputTypedDict = TypeAliasType( + "UpdateJudgeRequestOutputTypedDict", + Union[JudgeClassificationOutputTypedDict, JudgeRegressionOutputTypedDict], +) + + +UpdateJudgeRequestOutput = Annotated[ + Union[JudgeClassificationOutput, JudgeRegressionOutput], Field(discriminator="type") +] + + +class UpdateJudgeRequestTypedDict(TypedDict): + name: str + description: str + model_name: str + output: UpdateJudgeRequestOutputTypedDict + instructions: str + tools: List[str] + + +class UpdateJudgeRequest(BaseModel): + name: str + + description: str + + model_name: str + + output: UpdateJudgeRequestOutput + + instructions: str + + tools: List[str] diff --git a/src/mistralai/client/models/validationerror.py b/src/mistralai/client/models/validationerror.py index 385714c8..d856e24c 100644 --- a/src/mistralai/client/models/validationerror.py +++ b/src/mistralai/client/models/validationerror.py @@ -2,9 +2,10 @@ # @generated-id: 15df3c7368ab from __future__ import annotations -from mistralai.client.types import BaseModel -from typing import List, Union -from typing_extensions import TypeAliasType, TypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, List, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict LocTypedDict = TypeAliasType("LocTypedDict", Union[str, int]) @@ -13,10 +14,20 @@ Loc = TypeAliasType("Loc", Union[str, int]) +class ContextTypedDict(TypedDict): + pass + + +class Context(BaseModel): + pass + + class ValidationErrorTypedDict(TypedDict): loc: List[LocTypedDict] msg: str type: str + input: NotRequired[Any] + ctx: NotRequired[ContextTypedDict] class ValidationError(BaseModel): @@ -25,3 +36,23 @@ class ValidationError(BaseModel): msg: str type: str + + input: Optional[Any] = None + + ctx: Optional[Context] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["input", "ctx"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models_.py b/src/mistralai/client/models_.py index a287c413..7bb6dc1d 100644 --- a/src/mistralai/client/models_.py +++ b/src/mistralai/client/models_.py @@ -16,6 +16,8 @@ class Models(BaseSDK): def list( self, *, + provider: OptionalNullable[str] = UNSET, + model: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -25,6 +27,8 @@ def list( List all models available to the user. + :param provider: + :param model: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -39,12 +43,18 @@ def list( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.ListModelsV1ModelsGetRequest( + provider=provider, + model=model, + ) + req = self._build_request( method="GET", path="/v1/models", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, request_has_path_params=False, request_has_query_params=True, @@ -75,12 +85,18 @@ def list( ), ), request=req, - error_status_codes=["4XX", "5XX"], + error_status_codes=["422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.ModelList, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -93,6 +109,8 @@ def list( async def list_async( self, *, + provider: OptionalNullable[str] = UNSET, + model: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -102,6 +120,8 @@ async def list_async( List all models available to the user. + :param provider: + :param model: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -116,12 +136,18 @@ async def list_async( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.ListModelsV1ModelsGetRequest( + provider=provider, + model=model, + ) + req = self._build_request_async( method="GET", path="/v1/models", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, request_has_path_params=False, request_has_query_params=True, @@ -152,12 +178,18 @@ async def list_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + error_status_codes=["422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.ModelList, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -359,7 +391,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.DeleteModelOut: + ) -> models.DeleteModelResponse: r"""Delete Model Delete a fine-tuned model. @@ -426,7 +458,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.DeleteModelOut, http_res) + return unmarshal_json_response(models.DeleteModelResponse, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res @@ -449,7 +481,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.DeleteModelOut: + ) -> models.DeleteModelResponse: r"""Delete Model Delete a fine-tuned model. @@ -516,7 +548,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.DeleteModelOut, http_res) + return unmarshal_json_response(models.DeleteModelResponse, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( errors.HTTPValidationErrorData, http_res diff --git a/src/mistralai/client/observability.py b/src/mistralai/client/observability.py new file mode 100644 index 00000000..4057909e --- /dev/null +++ b/src/mistralai/client/observability.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 453a1d06d130 + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from mistralai.client.campaigns import Campaigns +from mistralai.client.chat_completion_events import ChatCompletionEvents +from mistralai.client.datasets import Datasets +from mistralai.client.judges import Judges +from typing import Optional + + +class Observability(BaseSDK): + chat_completion_events: ChatCompletionEvents + judges: Judges + campaigns: Campaigns + datasets: Datasets + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.chat_completion_events = ChatCompletionEvents( + self.sdk_configuration, parent_ref=self.parent_ref + ) + self.judges = Judges(self.sdk_configuration, parent_ref=self.parent_ref) + self.campaigns = Campaigns(self.sdk_configuration, parent_ref=self.parent_ref) + self.datasets = Datasets(self.sdk_configuration, parent_ref=self.parent_ref) diff --git a/src/mistralai/client/records.py b/src/mistralai/client/records.py new file mode 100644 index 00000000..ceb8de4f --- /dev/null +++ b/src/mistralai/client/records.py @@ -0,0 +1,1178 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 10f90c990bd8 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, List, Mapping, Optional, Union + + +class Records(BaseSDK): + def fetch( + self, + *, + dataset_record_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetRecord: + r"""Get the content of a given conversation from a dataset + + :param dataset_record_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequest( + dataset_record_id=dataset_record_id, + ) + + req = self._build_request( + method="GET", + path="/v1/observability/dataset-records/{dataset_record_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_record_v1_observability_dataset_records__dataset_record_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetRecord, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def fetch_async( + self, + *, + dataset_record_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DatasetRecord: + r"""Get the content of a given conversation from a dataset + + :param dataset_record_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDGetRequest( + dataset_record_id=dataset_record_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/observability/dataset-records/{dataset_record_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_dataset_record_v1_observability_dataset_records__dataset_record_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DatasetRecord, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete( + self, + *, + dataset_record_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a record from a dataset + + :param dataset_record_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest( + dataset_record_id=dataset_record_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/observability/dataset-records/{dataset_record_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_dataset_record_v1_observability_dataset_records__dataset_record_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + dataset_record_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete a record from a dataset + + :param dataset_record_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest( + dataset_record_id=dataset_record_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/observability/dataset-records/{dataset_record_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_dataset_record_v1_observability_dataset_records__dataset_record_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def bulk_delete( + self, + *, + dataset_record_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete multiple records from datasets + + :param dataset_record_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteDatasetRecordsRequest( + dataset_record_ids=dataset_record_ids, + ) + + req = self._build_request( + method="POST", + path="/v1/observability/dataset-records/bulk-delete", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.DeleteDatasetRecordsRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_dataset_records_v1_observability_dataset_records_bulk_delete_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def bulk_delete_async( + self, + *, + dataset_record_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Delete multiple records from datasets + + :param dataset_record_ids: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteDatasetRecordsRequest( + dataset_record_ids=dataset_record_ids, + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/dataset-records/bulk-delete", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.DeleteDatasetRecordsRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_dataset_records_v1_observability_dataset_records_bulk_delete_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def judge( + self, + *, + dataset_record_id: str, + judge_definition: Union[ + models.CreateJudgeRequest, models.CreateJudgeRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.JudgeOutput: + r"""Run Judge on a dataset record based on the given options + + :param dataset_record_id: + :param judge_definition: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest( + dataset_record_id=dataset_record_id, + judge_dataset_record_request=models.JudgeDatasetRecordRequest( + judge_definition=utils.get_pydantic_model( + judge_definition, models.CreateJudgeRequest + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/observability/dataset-records/{dataset_record_id}/live-judging", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.judge_dataset_record_request, + False, + False, + "json", + models.JudgeDatasetRecordRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="judge_dataset_record_v1_observability_dataset_records__dataset_record_id__live_judging_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.JudgeOutput, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def judge_async( + self, + *, + dataset_record_id: str, + judge_definition: Union[ + models.CreateJudgeRequest, models.CreateJudgeRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.JudgeOutput: + r"""Run Judge on a dataset record based on the given options + + :param dataset_record_id: + :param judge_definition: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest( + dataset_record_id=dataset_record_id, + judge_dataset_record_request=models.JudgeDatasetRecordRequest( + judge_definition=utils.get_pydantic_model( + judge_definition, models.CreateJudgeRequest + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/dataset-records/{dataset_record_id}/live-judging", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.judge_dataset_record_request, + False, + False, + "json", + models.JudgeDatasetRecordRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="judge_dataset_record_v1_observability_dataset_records__dataset_record_id__live_judging_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.JudgeOutput, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update_payload( + self, + *, + dataset_record_id: str, + payload: Union[models.ConversationPayload, models.ConversationPayloadTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Update a dataset record conversation payload + + :param dataset_record_id: + :param payload: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest( + dataset_record_id=dataset_record_id, + update_dataset_record_payload_request=models.UpdateDatasetRecordPayloadRequest( + payload=utils.get_pydantic_model(payload, models.ConversationPayload), + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/observability/dataset-records/{dataset_record_id}/payload", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_dataset_record_payload_request, + False, + False, + "json", + models.UpdateDatasetRecordPayloadRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_dataset_record_payload_v1_observability_dataset_records__dataset_record_id__payload_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_payload_async( + self, + *, + dataset_record_id: str, + payload: Union[models.ConversationPayload, models.ConversationPayloadTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Update a dataset record conversation payload + + :param dataset_record_id: + :param payload: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest( + dataset_record_id=dataset_record_id, + update_dataset_record_payload_request=models.UpdateDatasetRecordPayloadRequest( + payload=utils.get_pydantic_model(payload, models.ConversationPayload), + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/observability/dataset-records/{dataset_record_id}/payload", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_dataset_record_payload_request, + False, + False, + "json", + models.UpdateDatasetRecordPayloadRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_dataset_record_payload_v1_observability_dataset_records__dataset_record_id__payload_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update_properties( + self, + *, + dataset_record_id: str, + properties: Dict[str, Any], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Update conversation properties + + :param dataset_record_id: + :param properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest( + dataset_record_id=dataset_record_id, + update_dataset_record_properties_request=models.UpdateDatasetRecordPropertiesRequest( + properties=properties, + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/observability/dataset-records/{dataset_record_id}/properties", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_dataset_record_properties_request, + False, + False, + "json", + models.UpdateDatasetRecordPropertiesRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_dataset_record_properties_v1_observability_dataset_records__dataset_record_id__properties_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_properties_async( + self, + *, + dataset_record_id: str, + properties: Dict[str, Any], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Update conversation properties + + :param dataset_record_id: + :param properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest( + dataset_record_id=dataset_record_id, + update_dataset_record_properties_request=models.UpdateDatasetRecordPropertiesRequest( + properties=properties, + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/observability/dataset-records/{dataset_record_id}/properties", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_dataset_record_properties_request, + False, + False, + "json", + models.UpdateDatasetRecordPropertiesRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_dataset_record_properties_v1_observability_dataset_records__dataset_record_id__properties_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/uv.lock b/uv.lock index d10bd5b1..461e1d5c 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.0rc1" +version = "2.0.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 0803fb39345833da44501e0c397c5146f82893a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:33:58 +0100 Subject: [PATCH 04/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRAL-PYTHON-SDK-GOOGLE-CLOUD=20MISTRALAI-GCP-S?= =?UTF-8?q?DK=202.0.0=20(#410)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral_gcp.chat.stream()`: * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added** * `error.detail[]` **Changed** * `mistral_gcp.chat.complete()`: * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added** * `error.detail[]` **Changed** * `mistral_gcp.fim.stream()`: `error.detail[]` **Changed** * `mistral_gcp.fim.complete()`: `error.detail[]` **Changed** * chore: align GCP pyproject.toml and uv.lock to version 2.0.0 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/workflow.lock | 12 +-- packages/gcp/.speakeasy/gen.lock | 61 ++++++++++---- packages/gcp/.speakeasy/gen.yaml | 2 +- packages/gcp/RELEASES.md | 12 ++- packages/gcp/docs/models/builtinconnectors.md | 12 +++ packages/gcp/docs/models/context.md | 7 ++ packages/gcp/docs/models/thinking.md | 14 +++- .../gcp/docs/models/toolreferencechunk.md | 13 +++ packages/gcp/docs/models/toolunion.md | 17 ++++ packages/gcp/docs/models/validationerror.md | 12 +-- packages/gcp/pyproject.toml | 2 +- .../gcp/src/mistralai/gcp/client/_version.py | 4 +- .../mistralai/gcp/client/models/__init__.py | 23 +++++ .../gcp/client/models/builtinconnectors.py | 13 +++ .../mistralai/gcp/client/models/thinkchunk.py | 8 +- .../gcp/client/models/toolreferencechunk.py | 83 +++++++++++++++++++ .../gcp/client/models/validationerror.py | 37 ++++++++- packages/gcp/uv.lock | 2 +- 18 files changed, 290 insertions(+), 44 deletions(-) create mode 100644 packages/gcp/docs/models/builtinconnectors.md create mode 100644 packages/gcp/docs/models/context.md create mode 100644 packages/gcp/docs/models/toolreferencechunk.md create mode 100644 packages/gcp/docs/models/toolunion.md create mode 100644 packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 15c359ef..89144809 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -9,11 +9,11 @@ sources: - speakeasy-sdk-regen-1772457322 mistral-google-cloud-source: sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:b2ffad81388f92b1018cb5fe2d409920d795a4b9cd18d8d4147d06b6e53585eb - sourceBlobDigest: sha256:9fbc256371243c39284852f9c44ea59244205fe4265fddf867903d3eb60f17fd + sourceRevisionDigest: sha256:b2406e82ec4ce411afc0c307d5a037c7737388bcc696bbb41884fe54e22831c9 + sourceBlobDigest: sha256:795c0e010501e770b07cd28f1d0253cdb8f1419381e828b26575fdf149c022da tags: - latest - - speakeasy-sdk-regen-1772455561 + - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53 @@ -32,10 +32,10 @@ targets: mistralai-gcp-sdk: source: mistral-google-cloud-source sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:b2ffad81388f92b1018cb5fe2d409920d795a4b9cd18d8d4147d06b6e53585eb - sourceBlobDigest: sha256:9fbc256371243c39284852f9c44ea59244205fe4265fddf867903d3eb60f17fd + sourceRevisionDigest: sha256:b2406e82ec4ce411afc0c307d5a037c7737388bcc696bbb41884fe54e22831c9 + sourceBlobDigest: sha256:795c0e010501e770b07cd28f1d0253cdb8f1419381e828b26575fdf149c022da codeSamplesNamespace: mistral-openapi-google-cloud-code-samples - codeSamplesRevisionDigest: sha256:79c3a6d89d6c6f01f0400a619531f4f1cf18875754ff488558c337535fd83ce9 + codeSamplesRevisionDigest: sha256:c5a968a0454378d7f03ace500b309c0c709ea0b88d79700091d9ca7ea82c55a2 mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi diff --git a/packages/gcp/.speakeasy/gen.lock b/packages/gcp/.speakeasy/gen.lock index e7932c9e..08289d3a 100644 --- a/packages/gcp/.speakeasy/gen.lock +++ b/packages/gcp/.speakeasy/gen.lock @@ -1,20 +1,20 @@ lockVersion: 2.0.0 id: ec60f2d8-7869-45c1-918e-773d41a8cf74 management: - docChecksum: 58bc2dcdd83a2b7c4856971baa20641b + docChecksum: 6f32cd54fc5f3d2a609ff3933cbf34b8 docVersion: 1.0.0 speakeasyVersion: 1.729.0 generationVersion: 2.841.0 - releaseVersion: 2.0.0rc1 - configChecksum: 5b0554f4a04c849bc6f376bec69654aa + releaseVersion: 2.0.0 + configChecksum: d208fbfc438189901f0d6546484d5f26 repoURL: https://github.com/mistralai/client-python.git repoSubDirectory: packages/gcp installationURL: https://github.com/mistralai/client-python.git#subdirectory=packages/gcp published: true persistentEdits: - generation_id: 724d8b32-d30d-4743-9e65-0bd450961ed2 - pristine_commit_hash: 7ef9f2e9ed9ed33b6f502afc01b1354bd0c499d1 - pristine_tree_hash: 19a1b62b3168a95e58538e2da4215028949b1ba2 + generation_id: 4c7dd269-a55c-4b55-a90a-e8fec97c6b98 + pristine_commit_hash: 81f2700802a475a353aad9d56a4a9845f061ce74 + pristine_tree_hash: 0984d2a0c850ed3ed1b0ca1e96672c03a46be7d5 features: python: additionalDependencies: 1.0.0 @@ -68,6 +68,10 @@ trackedFiles: id: 9f1795bbe642 last_write_checksum: sha1:1ce4066623a8d62d969e5ed3a088d73a9ba26643 pristine_git_object: 047b7cf95f4db203bf2c501680b73ca0562a122d + docs/models/builtinconnectors.md: + id: 9d14e972f08a + last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c + pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 docs/models/chatcompletionchoice.md: id: 0d15c59ab501 last_write_checksum: sha1:a6274a39a4239e054816d08517bf8507cb5c4564 @@ -132,6 +136,10 @@ trackedFiles: id: d2d3a32080cd last_write_checksum: sha1:5839a26cdc412b78caad7fb59df97bdcea57be6d pristine_git_object: 22023e8b19692df969693b7a14f8cf6e0143859f + docs/models/context.md: + id: e8f2f9e54b8e + last_write_checksum: sha1:4c14b386f9f89d98f4dd9487ab030f10478c0e63 + pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 docs/models/deltamessage.md: id: 6c5ed6b60968 last_write_checksum: sha1:00052476b9b2474dbc149f18dd18c71c86d0fc74 @@ -242,8 +250,8 @@ trackedFiles: pristine_git_object: b07f598ebc5f0e9c041186c081dc98bc21104bdb docs/models/thinking.md: id: 07234f8dd364 - last_write_checksum: sha1:a5962d1615b57996730da19e59fbfaa684321442 - pristine_git_object: c7a0d5c9811ea37aaf9e16b6e93c833ab979573f + last_write_checksum: sha1:90c0b34284137712678b0671e9f4bfb319548cbf + pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a @@ -268,10 +276,18 @@ trackedFiles: id: f0522d2d3c93 last_write_checksum: sha1:783769c0200baa1b6751327aa3e009fa83da72ee pristine_git_object: 5c76091fbd2c8e0d768921fab19c7b761df73411 + docs/models/toolreferencechunk.md: + id: 10414b39b7b3 + last_write_checksum: sha1:a0e93881de5ecaf765300d45a18ab21dcffe54f9 + pristine_git_object: 9fc10399fe4ce9eb3b5e87a6bc609643d6a2cb3a docs/models/tooltypes.md: id: adb50fe63ea2 last_write_checksum: sha1:f224c3d8732450b9c969b3e04027b7df7892694c pristine_git_object: 84e49253c9b9bd1bd314e2a126106404cbb52f16 + docs/models/toolunion.md: + id: ad708b0ce4e0 + last_write_checksum: sha1:61909a56240c784e05f13dff8d9787272e1aa8bc + pristine_git_object: 2dcb3deec9f05d1e578c485a47a8ddd10b375f48 docs/models/usageinfo.md: id: ec6fe65028a9 last_write_checksum: sha1:cf71fb9676d870eba7c4d10a69636e1db4054adc @@ -290,8 +306,8 @@ trackedFiles: pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf docs/models/validationerror.md: id: 304bdf06ef8b - last_write_checksum: sha1:1889f608099577e6a116c14b211a6811d6b22786 - pristine_git_object: 7a1654a1a5cfb3ab92360b361e8e962bf2db4582 + last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 + pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -326,8 +342,8 @@ trackedFiles: pristine_git_object: ea95bed210db9180824efddfb1b3e47f5bf96489 src/mistralai/gcp/client/_version.py: id: f87319e32c7b - last_write_checksum: sha1:05656d6552e7c9cc97c9bbe6483ee906050d28ea - pristine_git_object: 7415341f2a4519b074f4b8ffa0f06c5ac2ac45e3 + last_write_checksum: sha1:2c22a5ebb7568968607db20612021af35240f714 + pristine_git_object: 377c9836b5f8bdf65e87ba375232422114af2966 src/mistralai/gcp/client/basesdk.py: id: 4d594572857b last_write_checksum: sha1:d8ef9e2f4fa97d402eb9f5472ceb80fb39693991 @@ -370,12 +386,16 @@ trackedFiles: pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/mistralai/gcp/client/models/__init__.py: id: d9e976d01972 - last_write_checksum: sha1:97ddfc7f70abd5e1a0b36be6dce209b69e9d5c73 - pristine_git_object: 575f64040c90152e74954b749ea89bce5a07e02e + last_write_checksum: sha1:9ba03a47ef26bb6d64366ec4a2b466a6d417aa82 + pristine_git_object: e42ed4bb30a39afd1d63dc2f9918e86981f2bf94 src/mistralai/gcp/client/models/assistantmessage.py: id: d39c4bdd289e last_write_checksum: sha1:c813783bcbeec4e40f12e007d1dde4aed8ec71cf pristine_git_object: 702ac4708abb95fc18d138500b8353715c2dbc98 + src/mistralai/gcp/client/models/builtinconnectors.py: + id: 7bbec8f3c9c7 + last_write_checksum: sha1:4e94744e3854d4cdc9d1272e4f1d9371f9829a5f + pristine_git_object: 6a3b2476d54096722eb3e7a271629d108028bd35 src/mistralai/gcp/client/models/chatcompletionchoice.py: id: 8e65b56f3e6d last_write_checksum: sha1:e6d1382e9f880b866130d900fd866997aaf80e45 @@ -490,8 +510,8 @@ trackedFiles: pristine_git_object: 690322725c0f852a005d08c5b722c41709868b22 src/mistralai/gcp/client/models/thinkchunk.py: id: 59a1d1ef2020 - last_write_checksum: sha1:066eeb10de301264e601a9ec64d21e1cc13b0c20 - pristine_git_object: 33ec83949499d99a28c55bb20429ab948bb5b1e8 + last_write_checksum: sha1:f2f07f8bf1094cff718fb0f3ef760890c54e4003 + pristine_git_object: d534fc1ecc2a127d9ac9ac3d7a7aba7156faf7c2 src/mistralai/gcp/client/models/tool.py: id: 4b27d45e56ad last_write_checksum: sha1:cb0d879a55218fd7753bdd005be8a155982feb8f @@ -512,6 +532,10 @@ trackedFiles: id: b3774786c2e9 last_write_checksum: sha1:3d414da8132467d1472ebe485802ffc78eb6f7e4 pristine_git_object: ce160391f37ce3568daf2877f8dc1aa0f3694821 + src/mistralai/gcp/client/models/toolreferencechunk.py: + id: 16363389756d + last_write_checksum: sha1:42abb2395ed4aa06831723288ce3d20f53f38da7 + pristine_git_object: 0a2a7fa3b80417ac2462126c4fae1e9f777df534 src/mistralai/gcp/client/models/tooltypes.py: id: 5926c64f5229 last_write_checksum: sha1:ffd576511eed9f823c3d67df9fc5574d8d53c54b @@ -526,8 +550,8 @@ trackedFiles: pristine_git_object: e237e900421a9e65fd15aede29ade0e510b189f6 src/mistralai/gcp/client/models/validationerror.py: id: 6b4f4910ea9c - last_write_checksum: sha1:2792fd656f55519902f37670fb9fb3b43b4aa016 - pristine_git_object: 2d330e9acb579cc4928fa27fdd72288ce8832b8b + last_write_checksum: sha1:1fd1ffba68b202465f3a0269d7099b4fee5c85c9 + pristine_git_object: 3ff872c15f6380c3a7f9dc9be1b80be159f752ba src/mistralai/gcp/client/py.typed: id: 98b8ab80ab0d last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -653,6 +677,7 @@ examples: application/json: {"id": "447e3e0d457e42e98248b5d2ef52a2a3", "object": "chat.completion", "model": "codestral-2508", "usage": {"prompt_tokens": 8, "completion_tokens": 91, "total_tokens": 99}, "created": 1759496862, "choices": [{"index": 0, "message": {"role": "assistant", "content": "add_numbers(a: int, b: int) -> int:\n \"\"\"\n You are given two integers `a` and `b`. Your task is to write a function that\n returns the sum of these two integers. The function should be implemented in a\n way that it can handle very large integers (up to 10^18). As a reminder, your\n code has to be in python\n \"\"\"\n", "tool_calls": null, "prefix": false}, "finish_reason": "stop"}]} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes:\n* `mistral_gcp.chat.stream()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_gcp.chat.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_gcp.fim.stream()`: `error.detail[]` **Changed**\n* `mistral_gcp.fim.complete()`: `error.detail[]` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/packages/gcp/.speakeasy/gen.yaml b/packages/gcp/.speakeasy/gen.yaml index 35a47062..27793130 100644 --- a/packages/gcp/.speakeasy/gen.yaml +++ b/packages/gcp/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.0rc1 + version: 2.0.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/packages/gcp/RELEASES.md b/packages/gcp/RELEASES.md index 2261c857..30d3e580 100644 --- a/packages/gcp/RELEASES.md +++ b/packages/gcp/RELEASES.md @@ -28,4 +28,14 @@ Based on: ### Generated - [python v2.0.0rc1] packages/gcp ### Releases -- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai-gcp/2.0.0rc1 - packages/gcp \ No newline at end of file +- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai-gcp/2.0.0rc1 - packages/gcp + +## 2026-03-09 19:30:40 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.0] packages/gcp +### Releases +- [PyPI v2.0.0] https://pypi.org/project/mistralai-gcp/2.0.0 - packages/gcp \ No newline at end of file diff --git a/packages/gcp/docs/models/builtinconnectors.md b/packages/gcp/docs/models/builtinconnectors.md new file mode 100644 index 00000000..f96f5044 --- /dev/null +++ b/packages/gcp/docs/models/builtinconnectors.md @@ -0,0 +1,12 @@ +# BuiltInConnectors + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `WEB_SEARCH` | web_search | +| `WEB_SEARCH_PREMIUM` | web_search_premium | +| `CODE_INTERPRETER` | code_interpreter | +| `IMAGE_GENERATION` | image_generation | +| `DOCUMENT_LIBRARY` | document_library | \ No newline at end of file diff --git a/packages/gcp/docs/models/context.md b/packages/gcp/docs/models/context.md new file mode 100644 index 00000000..107f1bd4 --- /dev/null +++ b/packages/gcp/docs/models/context.md @@ -0,0 +1,7 @@ +# Context + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/packages/gcp/docs/models/thinking.md b/packages/gcp/docs/models/thinking.md index c7a0d5c9..d9e51d7d 100644 --- a/packages/gcp/docs/models/thinking.md +++ b/packages/gcp/docs/models/thinking.md @@ -3,15 +3,21 @@ ## Supported Types -### `models.ReferenceChunk` +### `models.TextChunk` ```python -value: models.ReferenceChunk = /* values here */ +value: models.TextChunk = /* values here */ ``` -### `models.TextChunk` +### `models.ToolReferenceChunk` ```python -value: models.TextChunk = /* values here */ +value: models.ToolReferenceChunk = /* values here */ +``` + +### `models.ReferenceChunk` + +```python +value: models.ReferenceChunk = /* values here */ ``` diff --git a/packages/gcp/docs/models/toolreferencechunk.md b/packages/gcp/docs/models/toolreferencechunk.md new file mode 100644 index 00000000..9fc10399 --- /dev/null +++ b/packages/gcp/docs/models/toolreferencechunk.md @@ -0,0 +1,13 @@ +# ToolReferenceChunk + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `type` | *Optional[Literal["tool_reference"]]* | :heavy_minus_sign: | N/A | +| `tool` | [models.ToolUnion](../models/toolunion.md) | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | N/A | +| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `favicon` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/toolunion.md b/packages/gcp/docs/models/toolunion.md new file mode 100644 index 00000000..2dcb3dee --- /dev/null +++ b/packages/gcp/docs/models/toolunion.md @@ -0,0 +1,17 @@ +# ToolUnion + + +## Supported Types + +### `models.BuiltInConnectors` + +```python +value: models.BuiltInConnectors = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/packages/gcp/docs/models/validationerror.md b/packages/gcp/docs/models/validationerror.md index 7a1654a1..5bcea5b5 100644 --- a/packages/gcp/docs/models/validationerror.md +++ b/packages/gcp/docs/models/validationerror.md @@ -3,8 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `loc` | List[[models.Loc](../models/loc.md)] | :heavy_check_mark: | N/A | -| `msg` | *str* | :heavy_check_mark: | N/A | -| `type` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `loc` | List[[models.Loc](../models/loc.md)] | :heavy_check_mark: | N/A | +| `msg` | *str* | :heavy_check_mark: | N/A | +| `type` | *str* | :heavy_check_mark: | N/A | +| `input` | *Optional[Any]* | :heavy_minus_sign: | N/A | +| `ctx` | [Optional[models.Context]](../models/context.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/pyproject.toml b/packages/gcp/pyproject.toml index e0c4af9a..dba8a772 100644 --- a/packages/gcp/pyproject.toml +++ b/packages/gcp/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai-gcp" -version = "2.0.0rc1" +version = "2.0.0" description = "Python Client SDK for the Mistral AI API in GCP." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/packages/gcp/src/mistralai/gcp/client/_version.py b/packages/gcp/src/mistralai/gcp/client/_version.py index 7415341f..377c9836 100644 --- a/packages/gcp/src/mistralai/gcp/client/_version.py +++ b/packages/gcp/src/mistralai/gcp/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai-gcp" -__version__: str = "2.0.0rc1" +__version__: str = "2.0.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.0rc1 2.841.0 1.0.0 mistralai-gcp" +__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.841.0 1.0.0 mistralai-gcp" try: if __package__ is not None: diff --git a/packages/gcp/src/mistralai/gcp/client/models/__init__.py b/packages/gcp/src/mistralai/gcp/client/models/__init__.py index 575f6404..e42ed4bb 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/__init__.py +++ b/packages/gcp/src/mistralai/gcp/client/models/__init__.py @@ -11,6 +11,7 @@ AssistantMessageContentTypedDict, AssistantMessageTypedDict, ) + from .builtinconnectors import BuiltInConnectors from .chatcompletionchoice import ( ChatCompletionChoice, ChatCompletionChoiceFinishReason, @@ -115,6 +116,12 @@ ToolMessageContentTypedDict, ToolMessageTypedDict, ) + from .toolreferencechunk import ( + ToolReferenceChunk, + ToolReferenceChunkTypedDict, + ToolUnion, + ToolUnionTypedDict, + ) from .tooltypes import ToolTypes from .usageinfo import UsageInfo, UsageInfoTypedDict from .usermessage import ( @@ -124,6 +131,8 @@ UserMessageTypedDict, ) from .validationerror import ( + Context, + ContextTypedDict, Loc, LocTypedDict, ValidationError, @@ -137,6 +146,7 @@ "AssistantMessageContent", "AssistantMessageContentTypedDict", "AssistantMessageTypedDict", + "BuiltInConnectors", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", "ChatCompletionChoiceTypedDict", @@ -167,6 +177,8 @@ "CompletionResponseStreamChoiceTypedDict", "ContentChunk", "ContentChunkTypedDict", + "Context", + "ContextTypedDict", "DeltaMessage", "DeltaMessageContent", "DeltaMessageContentTypedDict", @@ -230,8 +242,12 @@ "ToolMessageContent", "ToolMessageContentTypedDict", "ToolMessageTypedDict", + "ToolReferenceChunk", + "ToolReferenceChunkTypedDict", "ToolTypedDict", "ToolTypes", + "ToolUnion", + "ToolUnionTypedDict", "UnknownContentChunk", "UsageInfo", "UsageInfoTypedDict", @@ -248,6 +264,7 @@ "AssistantMessageContent": ".assistantmessage", "AssistantMessageContentTypedDict": ".assistantmessage", "AssistantMessageTypedDict": ".assistantmessage", + "BuiltInConnectors": ".builtinconnectors", "ChatCompletionChoice": ".chatcompletionchoice", "ChatCompletionChoiceFinishReason": ".chatcompletionchoice", "ChatCompletionChoiceTypedDict": ".chatcompletionchoice", @@ -343,6 +360,10 @@ "ToolMessageContent": ".toolmessage", "ToolMessageContentTypedDict": ".toolmessage", "ToolMessageTypedDict": ".toolmessage", + "ToolReferenceChunk": ".toolreferencechunk", + "ToolReferenceChunkTypedDict": ".toolreferencechunk", + "ToolUnion": ".toolreferencechunk", + "ToolUnionTypedDict": ".toolreferencechunk", "ToolTypes": ".tooltypes", "UsageInfo": ".usageinfo", "UsageInfoTypedDict": ".usageinfo", @@ -350,6 +371,8 @@ "UserMessageContent": ".usermessage", "UserMessageContentTypedDict": ".usermessage", "UserMessageTypedDict": ".usermessage", + "Context": ".validationerror", + "ContextTypedDict": ".validationerror", "Loc": ".validationerror", "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", diff --git a/packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py b/packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py new file mode 100644 index 00000000..6a3b2476 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/builtinconnectors.py @@ -0,0 +1,13 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Literal + + +BuiltInConnectors = Literal[ + "web_search", + "web_search_premium", + "code_interpreter", + "image_generation", + "document_library", +] diff --git a/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py b/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py index 33ec8394..d534fc1e 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py +++ b/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py @@ -3,6 +3,7 @@ from __future__ import annotations from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict +from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL from mistralai.gcp.client.utils import validate_const import pydantic @@ -13,11 +14,14 @@ ThinkingTypedDict = TypeAliasType( - "ThinkingTypedDict", Union[ReferenceChunkTypedDict, TextChunkTypedDict] + "ThinkingTypedDict", + Union[TextChunkTypedDict, ReferenceChunkTypedDict, ToolReferenceChunkTypedDict], ) -Thinking = TypeAliasType("Thinking", Union[ReferenceChunk, TextChunk]) +Thinking = TypeAliasType( + "Thinking", Union[TextChunk, ReferenceChunk, ToolReferenceChunk] +) class ThinkChunkTypedDict(TypedDict): diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py b/packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py new file mode 100644 index 00000000..0a2a7fa3 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .builtinconnectors import BuiltInConnectors +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ToolUnionTypedDict = TypeAliasType("ToolUnionTypedDict", Union[BuiltInConnectors, str]) + + +ToolUnion = TypeAliasType("ToolUnion", Union[BuiltInConnectors, str]) + + +class ToolReferenceChunkTypedDict(TypedDict): + tool: ToolUnionTypedDict + title: str + type: Literal["tool_reference"] + url: NotRequired[Nullable[str]] + favicon: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + + +class ToolReferenceChunk(BaseModel): + tool: ToolUnion + + title: str + + type: Annotated[ + Annotated[ + Optional[Literal["tool_reference"]], + AfterValidator(validate_const("tool_reference")), + ], + pydantic.Field(alias="type"), + ] = "tool_reference" + + url: OptionalNullable[str] = UNSET + + favicon: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "url", "favicon", "description"]) + nullable_fields = set(["url", "favicon", "description"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ToolReferenceChunk.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/validationerror.py b/packages/gcp/src/mistralai/gcp/client/models/validationerror.py index 2d330e9a..3ff872c1 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/validationerror.py +++ b/packages/gcp/src/mistralai/gcp/client/models/validationerror.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.gcp.client.types import BaseModel -from typing import List, Union -from typing_extensions import TypeAliasType, TypedDict +from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, List, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict LocTypedDict = TypeAliasType("LocTypedDict", Union[str, int]) @@ -12,10 +13,20 @@ Loc = TypeAliasType("Loc", Union[str, int]) +class ContextTypedDict(TypedDict): + pass + + +class Context(BaseModel): + pass + + class ValidationErrorTypedDict(TypedDict): loc: List[LocTypedDict] msg: str type: str + input: NotRequired[Any] + ctx: NotRequired[ContextTypedDict] class ValidationError(BaseModel): @@ -24,3 +35,23 @@ class ValidationError(BaseModel): msg: str type: str + + input: Optional[Any] = None + + ctx: Optional[Context] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["input", "ctx"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/packages/gcp/uv.lock b/packages/gcp/uv.lock index 0c978164..3fca8e89 100644 --- a/packages/gcp/uv.lock +++ b/packages/gcp/uv.lock @@ -277,7 +277,7 @@ wheels = [ [[package]] name = "mistralai-gcp" -version = "2.0.0rc1" +version = "2.0.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 168700c693e4227f73075f859d034b3068109773 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:37:59 +0100 Subject: [PATCH 05/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRAL-PYTHON-SDK-AZURE=20MISTRALAI-AZURE-SDK=20?= =?UTF-8?q?2.0.0=20(#411)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral_azure.chat.stream()`: * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added** * `error.detail[]` **Changed** * `mistral_azure.chat.complete()`: * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added** * `error.detail[]` **Changed** * `mistral_azure.ocr.process()`: `error.detail[]` **Changed** * chore: align Azure pyproject.toml and uv.lock to version 2.0.0 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/workflow.lock | 12 +-- packages/azure/.speakeasy/gen.lock | 61 ++++++++++---- packages/azure/.speakeasy/gen.yaml | 2 +- packages/azure/RELEASES.md | 12 ++- .../azure/docs/models/builtinconnectors.md | 12 +++ packages/azure/docs/models/context.md | 7 ++ packages/azure/docs/models/thinking.md | 14 +++- .../azure/docs/models/toolreferencechunk.md | 13 +++ packages/azure/docs/models/toolunion.md | 17 ++++ packages/azure/docs/models/validationerror.md | 12 +-- packages/azure/pyproject.toml | 2 +- .../src/mistralai/azure/client/_version.py | 4 +- .../mistralai/azure/client/models/__init__.py | 23 +++++ .../azure/client/models/builtinconnectors.py | 13 +++ .../azure/client/models/thinkchunk.py | 8 +- .../azure/client/models/toolreferencechunk.py | 83 +++++++++++++++++++ .../azure/client/models/validationerror.py | 37 ++++++++- packages/azure/uv.lock | 2 +- 18 files changed, 290 insertions(+), 44 deletions(-) create mode 100644 packages/azure/docs/models/builtinconnectors.md create mode 100644 packages/azure/docs/models/context.md create mode 100644 packages/azure/docs/models/toolreferencechunk.md create mode 100644 packages/azure/docs/models/toolunion.md create mode 100644 packages/azure/src/mistralai/azure/client/models/builtinconnectors.py create mode 100644 packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 89144809..748a2257 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,11 +2,11 @@ speakeasyVersion: 1.729.0 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:0ac44fcf0cc7e7b8e101cb781a3699d5ccd37e0d80a5583c582ac7f0396803ac - sourceBlobDigest: sha256:4707ee1cbefa98516d39020e9cb29d7593fbd101a7d5c9c5fa50c44da3d4dce6 + sourceRevisionDigest: sha256:a6918148cb6fdd9108b7bef0ef41fe5c9e79b18c65c0b52fc4d2afecf6db2d4d + sourceBlobDigest: sha256:dded6b429a29c2889469b10d19aecd41be2db06cde1a8408510120c8abfd9553 tags: - latest - - speakeasy-sdk-regen-1772457322 + - speakeasy-sdk-regen-1773084953 mistral-google-cloud-source: sourceNamespace: mistral-openapi-google-cloud sourceRevisionDigest: sha256:b2406e82ec4ce411afc0c307d5a037c7737388bcc696bbb41884fe54e22831c9 @@ -25,10 +25,10 @@ targets: mistralai-azure-sdk: source: mistral-azure-source sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:0ac44fcf0cc7e7b8e101cb781a3699d5ccd37e0d80a5583c582ac7f0396803ac - sourceBlobDigest: sha256:4707ee1cbefa98516d39020e9cb29d7593fbd101a7d5c9c5fa50c44da3d4dce6 + sourceRevisionDigest: sha256:a6918148cb6fdd9108b7bef0ef41fe5c9e79b18c65c0b52fc4d2afecf6db2d4d + sourceBlobDigest: sha256:dded6b429a29c2889469b10d19aecd41be2db06cde1a8408510120c8abfd9553 codeSamplesNamespace: mistral-openapi-azure-code-samples - codeSamplesRevisionDigest: sha256:67fa6ead333ffe784141b51b231bca05411189fd92f2e5fe3b9f861b97db5942 + codeSamplesRevisionDigest: sha256:b7620f11d5669423730c5790ef4a72bba3ab46dd453e6685edf420053abbcb30 mistralai-gcp-sdk: source: mistral-google-cloud-source sourceNamespace: mistral-openapi-google-cloud diff --git a/packages/azure/.speakeasy/gen.lock b/packages/azure/.speakeasy/gen.lock index ad85f076..ec39708b 100644 --- a/packages/azure/.speakeasy/gen.lock +++ b/packages/azure/.speakeasy/gen.lock @@ -1,20 +1,20 @@ lockVersion: 2.0.0 id: dc40fa48-2c4d-46ad-ac8b-270749770f34 management: - docChecksum: be10e9d3b72d49632e8d6d311b9b8193 + docChecksum: 564969ee9c3ae8a740e47605a64c0077 docVersion: 1.0.0 speakeasyVersion: 1.729.0 generationVersion: 2.841.0 - releaseVersion: 2.0.0rc1 - configChecksum: b06d8b151630e956c8b778cdc6c54c06 + releaseVersion: 2.0.0 + configChecksum: 62c02749475cfa5a77859c3b5fab5b8f repoURL: https://github.com/mistralai/client-python.git repoSubDirectory: packages/azure installationURL: https://github.com/mistralai/client-python.git#subdirectory=packages/azure published: true persistentEdits: - generation_id: f76a86de-7619-48b9-8987-e2ecf1378ceb - pristine_commit_hash: 8b77e997fc0b0da49806cf251be6f273cf32cdfb - pristine_tree_hash: 2ff5921bc10f855310c77650bdc4622a57fc63fb + generation_id: b492a8a2-7f2d-419f-bbf4-8db30c210bb5 + pristine_commit_hash: 0d59853df8a614bb4710a34bfea9a6211af33fae + pristine_tree_hash: 9cc57b34f00c96452174bfa6fa5b7e02c099aeca features: python: additionalDependencies: 1.0.0 @@ -68,6 +68,10 @@ trackedFiles: id: 9f1795bbe642 last_write_checksum: sha1:1ce4066623a8d62d969e5ed3a088d73a9ba26643 pristine_git_object: 047b7cf95f4db203bf2c501680b73ca0562a122d + docs/models/builtinconnectors.md: + id: 9d14e972f08a + last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c + pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 docs/models/chatcompletionchoice.md: id: 0d15c59ab501 last_write_checksum: sha1:a6274a39a4239e054816d08517bf8507cb5c4564 @@ -132,6 +136,10 @@ trackedFiles: id: d2d3a32080cd last_write_checksum: sha1:5839a26cdc412b78caad7fb59df97bdcea57be6d pristine_git_object: 22023e8b19692df969693b7a14f8cf6e0143859f + docs/models/context.md: + id: e8f2f9e54b8e + last_write_checksum: sha1:4c14b386f9f89d98f4dd9487ab030f10478c0e63 + pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 docs/models/deltamessage.md: id: 6c5ed6b60968 last_write_checksum: sha1:00052476b9b2474dbc149f18dd18c71c86d0fc74 @@ -270,8 +278,8 @@ trackedFiles: pristine_git_object: b07f598ebc5f0e9c041186c081dc98bc21104bdb docs/models/thinking.md: id: 07234f8dd364 - last_write_checksum: sha1:a5962d1615b57996730da19e59fbfaa684321442 - pristine_git_object: c7a0d5c9811ea37aaf9e16b6e93c833ab979573f + last_write_checksum: sha1:90c0b34284137712678b0671e9f4bfb319548cbf + pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a @@ -296,10 +304,18 @@ trackedFiles: id: f0522d2d3c93 last_write_checksum: sha1:783769c0200baa1b6751327aa3e009fa83da72ee pristine_git_object: 5c76091fbd2c8e0d768921fab19c7b761df73411 + docs/models/toolreferencechunk.md: + id: 10414b39b7b3 + last_write_checksum: sha1:a0e93881de5ecaf765300d45a18ab21dcffe54f9 + pristine_git_object: 9fc10399fe4ce9eb3b5e87a6bc609643d6a2cb3a docs/models/tooltypes.md: id: adb50fe63ea2 last_write_checksum: sha1:f224c3d8732450b9c969b3e04027b7df7892694c pristine_git_object: 84e49253c9b9bd1bd314e2a126106404cbb52f16 + docs/models/toolunion.md: + id: ad708b0ce4e0 + last_write_checksum: sha1:61909a56240c784e05f13dff8d9787272e1aa8bc + pristine_git_object: 2dcb3deec9f05d1e578c485a47a8ddd10b375f48 docs/models/usageinfo.md: id: ec6fe65028a9 last_write_checksum: sha1:cf71fb9676d870eba7c4d10a69636e1db4054adc @@ -318,8 +334,8 @@ trackedFiles: pristine_git_object: 69dd549ec7f5f885101d08dd502e25748183aebf docs/models/validationerror.md: id: 304bdf06ef8b - last_write_checksum: sha1:1889f608099577e6a116c14b211a6811d6b22786 - pristine_git_object: 7a1654a1a5cfb3ab92360b361e8e962bf2db4582 + last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 + pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -354,8 +370,8 @@ trackedFiles: pristine_git_object: 3e4e39555d60adebe84e596c8323ee5b80676fc9 src/mistralai/azure/client/_version.py: id: a77160e60e5d - last_write_checksum: sha1:79494d1fb83ebffd4ad7b285299d4fea4e5a4e92 - pristine_git_object: 4d15bdc8f877a1616c6d1f978037f76e0487bd6c + last_write_checksum: sha1:991341c1aaa4a0fc2ef89aa7a69429b54764d309 + pristine_git_object: 8923c29dad7a842f2137ae6e466c8a7ddf13823d src/mistralai/azure/client/basesdk.py: id: 5a585a95ec21 last_write_checksum: sha1:0c2e686aa42d6aeeb103193aa058d6ddff7bcf74 @@ -394,12 +410,16 @@ trackedFiles: pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/mistralai/azure/client/models/__init__.py: id: "335011330e21" - last_write_checksum: sha1:07054ca95df60a3f03d8ea37a361aa506f94b78b - pristine_git_object: 908dda32cebe894b37dccaaa9b84db174ac93c21 + last_write_checksum: sha1:6ae218231fc52b0ce36cf3ed2116c93e4782791f + pristine_git_object: 79c5df321d8d95cecd502e22a521165f70c5c635 src/mistralai/azure/client/models/assistantmessage.py: id: 353ed9110f97 last_write_checksum: sha1:973979ac03f86f26ee9a540aaaa8f70a7011daca pristine_git_object: e9ae6e82c3c758561c8c9663f27b2fd7e38d2911 + src/mistralai/azure/client/models/builtinconnectors.py: + id: d260ad466b17 + last_write_checksum: sha1:4e94744e3854d4cdc9d1272e4f1d9371f9829a5f + pristine_git_object: 6a3b2476d54096722eb3e7a271629d108028bd35 src/mistralai/azure/client/models/chatcompletionchoice.py: id: 6942c7db5891 last_write_checksum: sha1:817bfda6120a98248322c308629e404081e01279 @@ -538,8 +558,8 @@ trackedFiles: pristine_git_object: 9295148588a143278ff5f48f9142347e35cfdab2 src/mistralai/azure/client/models/thinkchunk.py: id: df6bbd55b3eb - last_write_checksum: sha1:752a81be169fdd7a6afc293cf090b2cd4d2b22c9 - pristine_git_object: 4e881aad3b11d43aecaab922fe55bf7b4076c42f + last_write_checksum: sha1:b988cdf2755c3192aef30a9b2f945214fbc59785 + pristine_git_object: ec8e7f95be2ff0d742acb1fdea2867e23788cb06 src/mistralai/azure/client/models/tool.py: id: 4075ef72c086 last_write_checksum: sha1:4bef6d64b6426fdeff5031557c3c0e37f5c33b9a @@ -560,6 +580,10 @@ trackedFiles: id: 84ac736fa955 last_write_checksum: sha1:e4ed14906985fe74fd76a9adb09125ebc1218a1f pristine_git_object: 670210de0d05b52ee9dffbbb808a87e67c2d37a9 + src/mistralai/azure/client/models/toolreferencechunk.py: + id: b96d2eda57fc + last_write_checksum: sha1:6640e3ce0e2a0478fb29e6ea28ff6c447d4aea44 + pristine_git_object: c9db878fd3234ca46b0f958994e9dda4d68b9171 src/mistralai/azure/client/models/tooltypes.py: id: fa881b046d34 last_write_checksum: sha1:cd28ddc02fff9a5abbb59c82fe9e0dcbdb9b6d2a @@ -574,8 +598,8 @@ trackedFiles: pristine_git_object: 549b01ca887651a95c5efc8aff3372d32dfdc277 src/mistralai/azure/client/models/validationerror.py: id: f2b84813e2ea - last_write_checksum: sha1:f0f9706a5af2ac4f6b234e768fdd492bbdd8a18c - pristine_git_object: 817ecf7a56470369ccacd0f5e0bb739656a5f92c + last_write_checksum: sha1:10b9637fc1c659518bc5bc9116058ad055869800 + pristine_git_object: f0169e18a5d0e3d1d87fd907697fcca22b11bc06 src/mistralai/azure/client/ocr.py: id: 5817c10c9297 last_write_checksum: sha1:7666ca9f4596cee080952b2f4096bd4176051680 @@ -706,6 +730,7 @@ examples: application/json: {"pages": [{"index": 1, "markdown": "# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-DISTRIBUTION PERFORMANCE\nSaurabh Garg*
Carnegie Mellon University
sgarg2@andrew.cmu.edu
Sivaraman Balakrishnan
Carnegie Mellon University
sbalakri@andrew.cmu.edu
Zachary C. Lipton
Carnegie Mellon University
zlipton@andrew.cmu.edu\n## Behnam Neyshabur\nGoogle Research, Blueshift team
neyshabur@google.com\nHanie Sedghi
Google Research, Brain team
hsedghi@google.com\n#### Abstract\nReal-world machine learning deployments are characterized by mismatches between the source (training) and target (test) distributions that may cause performance drops. In this work, we investigate methods for predicting the target domain accuracy using only labeled source data and unlabeled target data. We propose Average Thresholded Confidence (ATC), a practical method that learns a threshold on the model's confidence, predicting accuracy as the fraction of unlabeled examples for which model confidence exceeds that threshold. ATC outperforms previous methods across several model architectures, types of distribution shifts (e.g., due to synthetic corruptions, dataset reproduction, or novel subpopulations), and datasets (WILDS, ImageNet, BREEDS, CIFAR, and MNIST). In our experiments, ATC estimates target performance $2-4 \\times$ more accurately than prior methods. We also explore the theoretical foundations of the problem, proving that, in general, identifying the accuracy is just as hard as identifying the optimal predictor and thus, the efficacy of any method rests upon (perhaps unstated) assumptions on the nature of the shift. Finally, analyzing our method on some toy distributions, we provide insights concerning when it works ${ }^{1}$.\n## 1 INTRODUCTION\nMachine learning models deployed in the real world typically encounter examples from previously unseen distributions. While the IID assumption enables us to evaluate models using held-out data from the source distribution (from which training data is sampled), this estimate is no longer valid in presence of a distribution shift. Moreover, under such shifts, model accuracy tends to degrade (Szegedy et al., 2014; Recht et al., 2019; Koh et al., 2021). Commonly, the only data available to the practitioner are a labeled training set (source) and unlabeled deployment-time data which makes the problem more difficult. In this setting, detecting shifts in the distribution of covariates is known to be possible (but difficult) in theory (Ramdas et al., 2015), and in practice (Rabanser et al., 2018). However, producing an optimal predictor using only labeled source and unlabeled target data is well-known to be impossible absent further assumptions (Ben-David et al., 2010; Lipton et al., 2018).\nTwo vital questions that remain are: (i) the precise conditions under which we can estimate a classifier's target-domain accuracy; and (ii) which methods are most practically useful. To begin, the straightforward way to assess the performance of a model under distribution shift would be to collect labeled (target domain) examples and then to evaluate the model on that data. However, collecting fresh labeled data from the target distribution is prohibitively expensive and time-consuming, especially if the target distribution is non-stationary. Hence, instead of using labeled data, we aim to use unlabeled data from the target distribution, that is comparatively abundant, to predict model performance. Note that in this work, our focus is not to improve performance on the target but, rather, to estimate the accuracy on the target for a given classifier.\n[^0]: Work done in part while Saurabh Garg was interning at Google ${ }^{1}$ Code is available at [https://github.com/saurabhgarg1996/ATC_code](https://github.com/saurabhgarg1996/ATC_code).\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 2, "markdown": "![img-0.jpeg](img-0.jpeg)\nFigure 1: Illustration of our proposed method ATC. Left: using source domain validation data, we identify a threshold on a score (e.g. negative entropy) computed on model confidence such that fraction of examples above the threshold matches the validation set accuracy. ATC estimates accuracy on unlabeled target data as the fraction of examples with the score above the threshold. Interestingly, this threshold yields accurate estimates on a wide set of target distributions resulting from natural and synthetic shifts. Right: Efficacy of ATC over previously proposed approaches on our testbed with a post-hoc calibrated model. To obtain errors on the same scale, we rescale all errors with Average Confidence (AC) error. Lower estimation error is better. See Table 1 for exact numbers and comparison on various types of distribution shift. See Sec. 5 for details on our testbed.\nRecently, numerous methods have been proposed for this purpose (Deng & Zheng, 2021; Chen et al., 2021b; Jiang et al., 2021; Deng et al., 2021; Guillory et al., 2021). These methods either require calibration on the target domain to yield consistent estimates (Jiang et al., 2021; Guillory et al., 2021) or additional labeled data from several target domains to learn a linear regression function on a distributional distance that then predicts model performance (Deng et al., 2021; Deng & Zheng, 2021; Guillory et al., 2021). However, methods that require calibration on the target domain typically yield poor estimates since deep models trained and calibrated on source data are not, in general, calibrated on a (previously unseen) target domain (Ovadia et al., 2019). Besides, methods that leverage labeled data from target domains rely on the fact that unseen target domains exhibit strong linear correlation with seen target domains on the underlying distance measure and, hence, can be rendered ineffective when such target domains with labeled data are unavailable (in Sec. 5.1 we demonstrate such a failure on a real-world distribution shift problem). Therefore, throughout the paper, we assume access to labeled source data and only unlabeled data from target domain(s).\nIn this work, we first show that absent assumptions on the source classifier or the nature of the shift, no method of estimating accuracy will work generally (even in non-contrived settings). To estimate accuracy on target domain perfectly, we highlight that even given perfect knowledge of the labeled source distribution (i.e., $p_{s}(x, y)$ ) and unlabeled target distribution (i.e., $p_{t}(x)$ ), we need restrictions on the nature of the shift such that we can uniquely identify the target conditional $p_{t}(y \\mid x)$. Thus, in general, identifying the accuracy of the classifier is as hard as identifying the optimal predictor.\nSecond, motivated by the superiority of methods that use maximum softmax probability (or logit) of a model for Out-Of-Distribution (OOD) detection (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019), we propose a simple method that leverages softmax probability to predict model performance. Our method, Average Thresholded Confidence (ATC), learns a threshold on a score (e.g., maximum confidence or negative entropy) of model confidence on validation source data and predicts target domain accuracy as the fraction of unlabeled target points that receive a score above that threshold. ATC selects a threshold on validation source data such that the fraction of source examples that receive the score above the threshold match the accuracy of those examples. Our primary contribution in ATC is the proposal of obtaining the threshold and observing its efficacy on (practical) accuracy estimation. Importantly, our work takes a step forward in positively answering the question raised in Deng & Zheng (2021); Deng et al. (2021) about a practical strategy to select a threshold that enables accuracy prediction with thresholded model confidence.\n", "images": [{"id": "img-0.jpeg", "top_left_x": 292, "top_left_y": 217, "bottom_right_x": 1405, "bottom_right_y": 649, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 3, "markdown": "", "images": [], "dimensions": {"dpi": 539192, "height": 944919, "width": 247256}}, {"index": 27, "markdown": "![img-8.jpeg](img-8.jpeg)\nFigure 9: Scatter plot of predicted accuracy versus (true) OOD accuracy for vision datasets except MNIST with a ResNet50 model. Results reported by aggregating MAE numbers over 4 different seeds.\n", "images": [{"id": "img-8.jpeg", "top_left_x": 290, "top_left_y": 226, "bottom_right_x": 1405, "bottom_right_y": 1834, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 28, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 6.60 | 5.74 | 9.88 | 6.89 | 7.25 | 6.07 | 4.77 | 3.21 | 3.02 | 2.99 | 2.85 | | | | (0.35) | (0.30) | (0.16) | (0.13) | (0.15) | (0.16) | (0.13) | (0.49) | (0.40) | (0.37) | (0.29) | | | Synthetic | 12.33 | 10.20 | 16.50 | 11.91 | 13.87 | 11.08 | 6.55 | 4.65 | 4.25 | 4.21 | 3.87 | | | | (0.51) | (0.48) | (0.26) | (0.17) | (0.18) | (0.17) | (0.35) | (0.55) | (0.55) | (0.55) | (0.75) | | CIFAR100 | Synthetic | 13.69 | 11.51 | 23.61 | 13.10 | 14.60 | 10.14 | 9.85 | 5.50 | 4.75 | 4.72 | 4.94 | | | | (0.55) | (0.41) | (1.16) | (0.80) | (0.77) | (0.64) | (0.57) | (0.70) | (0.73) | (0.74) | (0.74) | | ImageNet200 | Natural | 12.37 | 8.19 | 22.07 | 8.61 | 15.17 | 7.81 | 5.13 | 4.37 | 2.04 | 3.79 | 1.45 | | | | (0.25) | (0.33) | (0.08) | (0.25) | (0.11) | (0.29) | (0.08) | (0.39) | (0.24) | (0.30) | (0.27) | | | Synthetic | 19.86 | 12.94 | 32.44 | 13.35 | 25.02 | 12.38 | 5.41 | 5.93 | 3.09 | 5.00 | 2.68 | | | | (1.38) | (1.81) | (1.00) | (1.30) | (1.10) | (1.38) | (0.89) | (1.38) | (0.87) | (1.28) | (0.45) | | ImageNet | Natural | 7.77 | 6.50 | 18.13 | 6.02 | 8.13 | 5.76 | 6.23 | 3.88 | 2.17 | 2.06 | 0.80 | | | | (0.27) | (0.33) | (0.23) | (0.34) | (0.27) | (0.37) | (0.41) | (0.53) | (0.62) | (0.54) | (0.44) | | | Synthetic | 13.39 | 10.12 | 24.62 | 8.51 | 13.55 | 7.90 | 6.32 | 3.34 | 2.53 | 2.61 | 4.89 | | | | (0.53) | (0.63) | (0.64) | (0.71) | (0.61) | (0.72) | (0.33) | (0.53) | (0.36) | (0.33) | (0.83) | | FMoW-WILDS | Natural | 5.53 | 4.31 | 33.53 | 12.84 | 5.94 | 4.45 | 5.74 | 3.06 | 2.70 | 3.02 | 2.72 | | | | (0.33) | (0.63) | (0.13) | (12.06) | (0.36) | (0.77) | (0.55) | (0.36) | (0.54) | (0.35) | (0.44) | | RxRx1-WILDS | Natural | 5.80 | 5.72 | 7.90 | 4.84 | 5.98 | 5.98 | 6.03 | 4.66 | 4.56 | 4.41 | 4.47 | | | | (0.17) | (0.15) | (0.24) | (0.09) | (0.15) | (0.13) | (0.08) | (0.38) | (0.38) | (0.31) | (0.26) | | Amazon-WILDS | Natural | 2.40 | 2.29 | 8.01 | 2.38 | 2.40 | 2.28 | 17.87 | 1.65 | 1.62 | 1.60 | 1.59 | | | | (0.08) | (0.09) | (0.53) | (0.17) | (0.09) | (0.09) | (0.18) | (0.06) | (0.05) | (0.14) | (0.15) | | CivilCom.-WILDS | Natural | 12.64 | 10.80 | 16.76 | 11.03 | 13.31 | 10.99 | 16.65 | | 7.14 | | | | | | (0.52) | (0.48) | (0.53) | (0.49) | (0.52) | (0.49) | (0.25) | | (0.41) | | | | MNIST | Natural | 18.48 | 15.99 | 21.17 | 14.81 | 20.19 | 14.56 | 24.42 | 5.02 | 2.40 | 3.14 | 3.50 | | | | (0.45) | (1.53) | (0.24) | (3.89) | (0.23) | (3.47) | (0.41) | (0.44) | (1.83) | (0.49) | (0.17) | | ENTITY-13 | Same | 16.23 | 11.14 | 24.97 | 10.88 | 19.08 | 10.47 | 10.71 | 5.39 | 3.88 | 4.58 | 4.19 | | | | (0.77) | (0.65) | (0.70) | (0.77) | (0.65) | (0.72) | (0.74) | (0.92) | (0.61) | (0.85) | (0.16) | | | Novel | 28.53 | 22.02 | 38.33 | 21.64 | 32.43 | 21.22 | 20.61 | 13.58 | 10.28 | 12.25 | 6.63 | | | | (0.82) | (0.68) | (0.75) | (0.86) | (0.69) | (0.80) | (0.60) | (1.15) | (1.34) | (1.21) | (0.93) | | ENTITY-30 | Same | 18.59 | 14.46 | 28.82 | 14.30 | 21.63 | 13.46 | 12.92 | 9.12 | 7.75 | 8.15 | 7.64 | | | | (0.51) | (0.52) | (0.43) | (0.71) | (0.37) | (0.59) | (0.14) | (0.62) | (0.72) | (0.68) | (0.88) | | | Novel | 32.34 | 26.85 | 44.02 | 26.27 | 36.82 | 25.42 | 23.16 | 17.75 | 14.30 | 15.60 | 10.57 | | | | (0.60) | (0.58) | (0.56) | (0.79) | (0.47) | (0.68) | (0.12) | (0.76) | (0.85) | (0.86) | (0.86) | | NONLIVING-26 | Same | 18.66 | 17.17 | 26.39 | 16.14 | 19.86 | 15.58 | 16.63 | 10.87 | 10.24 | 10.07 | 10.26 | | | | (0.76) | (0.74) | (0.82) | (0.81) | (0.67) | (0.76) | (0.45) | (0.98) | (0.83) | (0.92) | (1.18) | | | Novel | 33.43 | 31.53 | 41.66 | 29.87 | 35.13 | 29.31 | 29.56 | 21.70 | 20.12 | 19.08 | 18.26 | | | | (0.67) | (0.65) | (0.67) | (0.71) | (0.54) | (0.64) | (0.21) | (0.86) | (0.75) | (0.82) | (1.12) | | LIVING-17 | Same | 12.63 | 11.05 | 18.32 | 10.46 | 14.43 | 10.14 | 9.87 | 4.57 | 3.95 | 3.81 | 4.21 | | | | (1.25) | (1.20) | (1.01) | (1.12) | (1.11) | (1.16) | (0.61) | (0.71) | (0.48) | (0.22) | (0.53) | | | Novel | 29.03 | 26.96 | 35.67 | 26.11 | 31.73 | 25.73 | 23.53 | 16.15 | 14.49 | 12.97 | 11.39 | | | | (1.44) | (1.38) | (1.09) | (1.27) | (1.19) | (1.35) | (0.52) | (1.36) | (1.46) | (1.52) | (1.72) |\nTable 3: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. For language datasets, we use DistilBERT-base-uncased, for vision dataset we report results with DenseNet model with the exception of MNIST where we use FCN. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 29, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 7.14 | 6.20 | 10.25 | 7.06 | 7.68 | 6.35 | 5.74 | 4.02 | 3.85 | 3.76 | 3.38 | | | | (0.14) | (0.11) | (0.31) | (0.33) | (0.28) | (0.27) | (0.25) | (0.38) | (0.30) | (0.33) | (0.32) | | | Synthetic | 12.62 | 10.75 | 16.50 | 11.91 | 13.93 | 11.20 | 7.97 | 5.66 | 5.03 | 4.87 | 3.63 | | | | (0.76) | (0.71) | (0.28) | (0.24) | (0.29) | (0.28) | (0.13) | (0.64) | (0.71) | (0.71) | (0.62) | | CIFAR100 | Synthetic | 12.77 | 12.34 | 16.89 | 12.73 | 11.18 | 9.63 | 12.00 | 5.61 | 5.55 | 5.65 | 5.76 | | | | (0.43) | (0.68) | (0.20) | (2.59) | (0.35) | (1.25) | (0.48) | (0.51) | (0.55) | (0.35) | (0.27) | | ImageNet200 | Natural | 12.63 | 7.99 | 23.08 | 7.22 | 15.40 | 6.33 | 5.00 | 4.60 | 1.80 | 4.06 | 1.38 | | | | (0.59) | (0.47) | (0.31) | (0.22) | (0.42) | (0.24) | (0.36) | (0.63) | (0.17) | (0.69) | (0.29) | | | Synthetic | 20.17 | 11.74 | 33.69 | 9.51 | 25.49 | 8.61 | 4.19 | 5.37 | 2.78 | 4.53 | 3.58 | | | | (0.74) | (0.80) | (0.73) | (0.51) | (0.66) | (0.50) | (0.14) | (0.88) | (0.23) | (0.79) | (0.33) | | ImageNet | Natural | 8.09 | 6.42 | 21.66 | 5.91 | 8.53 | 5.21 | 5.90 | 3.93 | 1.89 | 2.45 | 0.73 | | | | (0.25) | (0.28) | (0.38) | (0.22) | (0.26) | (0.25) | (0.44) | (0.26) | (0.21) | (0.16) | (0.10) | | | Synthetic | 13.93 | 9.90 | 28.05 | 7.56 | 13.82 | 6.19 | 6.70 | 3.33 | 2.55 | 2.12 | 5.06 | | | | (0.14) | (0.23) | (0.39) | (0.13) | (0.31) | (0.07) | (0.52) | (0.25) | (0.25) | (0.31) | (0.27) | | FMoW-WILDS | Natural | 5.15 | 3.55 | 34.64 | 5.03 | 5.58 | 3.46 | 5.08 | 2.59 | 2.33 | 2.52 | 2.22 | | | | (0.19) | (0.41) | (0.22) | (0.29) | (0.17) | (0.37) | (0.46) | (0.32) | (0.28) | (0.25) | (0.30) | | RxRx1-WILDS | Natural | 6.17 | 6.11 | 21.05 | 5.21 | 6.54 | 6.27 | 6.82 | 5.30 | 5.20 | 5.19 | 5.63 | | | | (0.20) | (0.24) | (0.31) | (0.18) | (0.21) | (0.20) | (0.31) | (0.30) | (0.44) | (0.43) | (0.55) | | Entity-13 | Same | 18.32 | 14.38 | 27.79 | 13.56 | 20.50 | 13.22 | 16.09 | 9.35 | 7.50 | 7.80 | 6.94 | | | | (0.29) | (0.53) | (1.18) | (0.58) | (0.47) | (0.58) | (0.84) | (0.79) | (0.65) | (0.62) | (0.71) | | | Novel | 28.82 | 24.03 | 38.97 | 22.96 | 31.66 | 22.61 | 25.26 | 17.11 | 13.96 | 14.75 | 9.94 | | | | (0.30) | (0.55) | (1.32) | (0.59) | (0.54) | (0.58) | (1.08) | (0.93) | (0.64) | (0.78) | | | Entity-30 | Same | 16.91 | 14.61 | 26.84 | 14.37 | 18.60 | 13.11 | 13.74 | 8.54 | 7.94 | 7.77 | 8.04 | | | | (1.33) | (1.11) | (2.15) | (1.34) | (1.69) | (1.30) | (1.07) | (1.47) | (1.38) | (1.44) | (1.51) | | | Novel | 28.66 | 25.83 | 39.21 | 25.03 | 30.95 | 23.73 | 23.15 | 15.57 | 13.24 | 12.44 | 11.05 | | | | (1.16) | (0.88) | (2.03) | (1.11) | (1.64) | (1.11) | (0.51) | (1.44) | (1.15) | (1.26) | (1.13) | | NonLIVING-26 | Same | 17.43 | 15.95 | 27.70 | 15.40 | 18.06 | 14.58 | 16.99 | 10.79 | 10.13 | 10.05 | 10.29 | | | | (0.90) | (0.86) | (0.90) | (0.69) | (1.00) | (0.78) | (1.25) | (0.62) | (0.32) | (0.46) | (0.79) | | | Novel | 29.51 | 27.75 | 40.02 | 26.77 | 30.36 | 25.93 | 27.70 | 19.64 | 17.75 | 16.90 | 15.69 | | | | (0.86) | (0.82) | (0.76) | (0.82) | (0.95) | (0.80) | (1.42) | (0.68) | (0.53) | (0.60) | (0.83) | | LIVING-17 | Same | 14.28 | 12.21 | 23.46 | 11.16 | 15.22 | 10.78 | 10.49 | 4.92 | 4.23 | 4.19 | 4.73 | | | | (0.96) | (0.93) | (1.16) | (0.90) | (0.96) | (0.99) | (0.97) | (0.57) | (0.42) | (0.35) | (0.24) | | | Novel | 28.91 | 26.35 | 38.62 | 24.91 | 30.32 | 24.52 | 22.49 | 15.42 | 13.02 | 12.29 | 10.34 | | | | (0.66) | (0.73) | (1.01) | (0.61) | (0.59) | (0.74) | (0.85) | (0.59) | (0.53) | (0.73) | (0.62) |\nTable 4: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift for ResNet model. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}], "model": "mistral-ocr-2503-completion", "usage_info": {"pages_processed": 29, "doc_size_bytes": null}} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes:\n* `mistral_azure.chat.stream()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_azure.chat.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_azure.ocr.process()`: `error.detail[]` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/packages/azure/.speakeasy/gen.yaml b/packages/azure/.speakeasy/gen.yaml index 518e1e25..58016b88 100644 --- a/packages/azure/.speakeasy/gen.yaml +++ b/packages/azure/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.0rc1 + version: 2.0.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/packages/azure/RELEASES.md b/packages/azure/RELEASES.md index 2090c67a..6844bc64 100644 --- a/packages/azure/RELEASES.md +++ b/packages/azure/RELEASES.md @@ -28,4 +28,14 @@ Based on: ### Generated - [python v2.0.0rc1] packages/azure ### Releases -- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai-azure/2.0.0rc1 - packages/azure \ No newline at end of file +- [PyPI v2.0.0rc1] https://pypi.org/project/mistralai-azure/2.0.0rc1 - packages/azure + +## 2026-03-09 19:35:33 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.0] packages/azure +### Releases +- [PyPI v2.0.0] https://pypi.org/project/mistralai-azure/2.0.0 - packages/azure \ No newline at end of file diff --git a/packages/azure/docs/models/builtinconnectors.md b/packages/azure/docs/models/builtinconnectors.md new file mode 100644 index 00000000..f96f5044 --- /dev/null +++ b/packages/azure/docs/models/builtinconnectors.md @@ -0,0 +1,12 @@ +# BuiltInConnectors + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `WEB_SEARCH` | web_search | +| `WEB_SEARCH_PREMIUM` | web_search_premium | +| `CODE_INTERPRETER` | code_interpreter | +| `IMAGE_GENERATION` | image_generation | +| `DOCUMENT_LIBRARY` | document_library | \ No newline at end of file diff --git a/packages/azure/docs/models/context.md b/packages/azure/docs/models/context.md new file mode 100644 index 00000000..107f1bd4 --- /dev/null +++ b/packages/azure/docs/models/context.md @@ -0,0 +1,7 @@ +# Context + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/packages/azure/docs/models/thinking.md b/packages/azure/docs/models/thinking.md index c7a0d5c9..d9e51d7d 100644 --- a/packages/azure/docs/models/thinking.md +++ b/packages/azure/docs/models/thinking.md @@ -3,15 +3,21 @@ ## Supported Types -### `models.ReferenceChunk` +### `models.TextChunk` ```python -value: models.ReferenceChunk = /* values here */ +value: models.TextChunk = /* values here */ ``` -### `models.TextChunk` +### `models.ToolReferenceChunk` ```python -value: models.TextChunk = /* values here */ +value: models.ToolReferenceChunk = /* values here */ +``` + +### `models.ReferenceChunk` + +```python +value: models.ReferenceChunk = /* values here */ ``` diff --git a/packages/azure/docs/models/toolreferencechunk.md b/packages/azure/docs/models/toolreferencechunk.md new file mode 100644 index 00000000..9fc10399 --- /dev/null +++ b/packages/azure/docs/models/toolreferencechunk.md @@ -0,0 +1,13 @@ +# ToolReferenceChunk + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `type` | *Optional[Literal["tool_reference"]]* | :heavy_minus_sign: | N/A | +| `tool` | [models.ToolUnion](../models/toolunion.md) | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | N/A | +| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `favicon` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/toolunion.md b/packages/azure/docs/models/toolunion.md new file mode 100644 index 00000000..2dcb3dee --- /dev/null +++ b/packages/azure/docs/models/toolunion.md @@ -0,0 +1,17 @@ +# ToolUnion + + +## Supported Types + +### `models.BuiltInConnectors` + +```python +value: models.BuiltInConnectors = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/packages/azure/docs/models/validationerror.md b/packages/azure/docs/models/validationerror.md index 7a1654a1..5bcea5b5 100644 --- a/packages/azure/docs/models/validationerror.md +++ b/packages/azure/docs/models/validationerror.md @@ -3,8 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `loc` | List[[models.Loc](../models/loc.md)] | :heavy_check_mark: | N/A | -| `msg` | *str* | :heavy_check_mark: | N/A | -| `type` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `loc` | List[[models.Loc](../models/loc.md)] | :heavy_check_mark: | N/A | +| `msg` | *str* | :heavy_check_mark: | N/A | +| `type` | *str* | :heavy_check_mark: | N/A | +| `input` | *Optional[Any]* | :heavy_minus_sign: | N/A | +| `ctx` | [Optional[models.Context]](../models/context.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/pyproject.toml b/packages/azure/pyproject.toml index 000dd558..8742bb24 100644 --- a/packages/azure/pyproject.toml +++ b/packages/azure/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai-azure" -version = "2.0.0rc1" +version = "2.0.0" description = "Python Client SDK for the Mistral AI API in Azure." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/packages/azure/src/mistralai/azure/client/_version.py b/packages/azure/src/mistralai/azure/client/_version.py index 4d15bdc8..8923c29d 100644 --- a/packages/azure/src/mistralai/azure/client/_version.py +++ b/packages/azure/src/mistralai/azure/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai-azure" -__version__: str = "2.0.0rc1" +__version__: str = "2.0.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.0rc1 2.841.0 1.0.0 mistralai-azure" +__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.841.0 1.0.0 mistralai-azure" try: if __package__ is not None: diff --git a/packages/azure/src/mistralai/azure/client/models/__init__.py b/packages/azure/src/mistralai/azure/client/models/__init__.py index 908dda32..79c5df32 100644 --- a/packages/azure/src/mistralai/azure/client/models/__init__.py +++ b/packages/azure/src/mistralai/azure/client/models/__init__.py @@ -11,6 +11,7 @@ AssistantMessageContentTypedDict, AssistantMessageTypedDict, ) + from .builtinconnectors import BuiltInConnectors from .chatcompletionchoice import ( ChatCompletionChoice, ChatCompletionChoiceFinishReason, @@ -114,6 +115,12 @@ ToolMessageContentTypedDict, ToolMessageTypedDict, ) + from .toolreferencechunk import ( + ToolReferenceChunk, + ToolReferenceChunkTypedDict, + ToolUnion, + ToolUnionTypedDict, + ) from .tooltypes import ToolTypes from .usageinfo import UsageInfo, UsageInfoTypedDict from .usermessage import ( @@ -123,6 +130,8 @@ UserMessageTypedDict, ) from .validationerror import ( + Context, + ContextTypedDict, Loc, LocTypedDict, ValidationError, @@ -136,6 +145,7 @@ "AssistantMessageContent", "AssistantMessageContentTypedDict", "AssistantMessageTypedDict", + "BuiltInConnectors", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", "ChatCompletionChoiceTypedDict", @@ -166,6 +176,8 @@ "CompletionResponseStreamChoiceTypedDict", "ContentChunk", "ContentChunkTypedDict", + "Context", + "ContextTypedDict", "DeltaMessage", "DeltaMessageContent", "DeltaMessageContentTypedDict", @@ -241,8 +253,12 @@ "ToolMessageContent", "ToolMessageContentTypedDict", "ToolMessageTypedDict", + "ToolReferenceChunk", + "ToolReferenceChunkTypedDict", "ToolTypedDict", "ToolTypes", + "ToolUnion", + "ToolUnionTypedDict", "UnknownContentChunk", "UsageInfo", "UsageInfoTypedDict", @@ -259,6 +275,7 @@ "AssistantMessageContent": ".assistantmessage", "AssistantMessageContentTypedDict": ".assistantmessage", "AssistantMessageTypedDict": ".assistantmessage", + "BuiltInConnectors": ".builtinconnectors", "ChatCompletionChoice": ".chatcompletionchoice", "ChatCompletionChoiceFinishReason": ".chatcompletionchoice", "ChatCompletionChoiceTypedDict": ".chatcompletionchoice", @@ -366,6 +383,10 @@ "ToolMessageContent": ".toolmessage", "ToolMessageContentTypedDict": ".toolmessage", "ToolMessageTypedDict": ".toolmessage", + "ToolReferenceChunk": ".toolreferencechunk", + "ToolReferenceChunkTypedDict": ".toolreferencechunk", + "ToolUnion": ".toolreferencechunk", + "ToolUnionTypedDict": ".toolreferencechunk", "ToolTypes": ".tooltypes", "UsageInfo": ".usageinfo", "UsageInfoTypedDict": ".usageinfo", @@ -373,6 +394,8 @@ "UserMessageContent": ".usermessage", "UserMessageContentTypedDict": ".usermessage", "UserMessageTypedDict": ".usermessage", + "Context": ".validationerror", + "ContextTypedDict": ".validationerror", "Loc": ".validationerror", "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", diff --git a/packages/azure/src/mistralai/azure/client/models/builtinconnectors.py b/packages/azure/src/mistralai/azure/client/models/builtinconnectors.py new file mode 100644 index 00000000..6a3b2476 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/builtinconnectors.py @@ -0,0 +1,13 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Literal + + +BuiltInConnectors = Literal[ + "web_search", + "web_search_premium", + "code_interpreter", + "image_generation", + "document_library", +] diff --git a/packages/azure/src/mistralai/azure/client/models/thinkchunk.py b/packages/azure/src/mistralai/azure/client/models/thinkchunk.py index 4e881aad..ec8e7f95 100644 --- a/packages/azure/src/mistralai/azure/client/models/thinkchunk.py +++ b/packages/azure/src/mistralai/azure/client/models/thinkchunk.py @@ -3,6 +3,7 @@ from __future__ import annotations from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict +from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL from mistralai.azure.client.utils import validate_const import pydantic @@ -13,11 +14,14 @@ ThinkingTypedDict = TypeAliasType( - "ThinkingTypedDict", Union[ReferenceChunkTypedDict, TextChunkTypedDict] + "ThinkingTypedDict", + Union[TextChunkTypedDict, ReferenceChunkTypedDict, ToolReferenceChunkTypedDict], ) -Thinking = TypeAliasType("Thinking", Union[ReferenceChunk, TextChunk]) +Thinking = TypeAliasType( + "Thinking", Union[TextChunk, ReferenceChunk, ToolReferenceChunk] +) class ThinkChunkTypedDict(TypedDict): diff --git a/packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py b/packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py new file mode 100644 index 00000000..c9db878f --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .builtinconnectors import BuiltInConnectors +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ToolUnionTypedDict = TypeAliasType("ToolUnionTypedDict", Union[BuiltInConnectors, str]) + + +ToolUnion = TypeAliasType("ToolUnion", Union[BuiltInConnectors, str]) + + +class ToolReferenceChunkTypedDict(TypedDict): + tool: ToolUnionTypedDict + title: str + type: Literal["tool_reference"] + url: NotRequired[Nullable[str]] + favicon: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + + +class ToolReferenceChunk(BaseModel): + tool: ToolUnion + + title: str + + type: Annotated[ + Annotated[ + Optional[Literal["tool_reference"]], + AfterValidator(validate_const("tool_reference")), + ], + pydantic.Field(alias="type"), + ] = "tool_reference" + + url: OptionalNullable[str] = UNSET + + favicon: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "url", "favicon", "description"]) + nullable_fields = set(["url", "favicon", "description"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ToolReferenceChunk.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/validationerror.py b/packages/azure/src/mistralai/azure/client/models/validationerror.py index 817ecf7a..f0169e18 100644 --- a/packages/azure/src/mistralai/azure/client/models/validationerror.py +++ b/packages/azure/src/mistralai/azure/client/models/validationerror.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.azure.client.types import BaseModel -from typing import List, Union -from typing_extensions import TypeAliasType, TypedDict +from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, List, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict LocTypedDict = TypeAliasType("LocTypedDict", Union[str, int]) @@ -12,10 +13,20 @@ Loc = TypeAliasType("Loc", Union[str, int]) +class ContextTypedDict(TypedDict): + pass + + +class Context(BaseModel): + pass + + class ValidationErrorTypedDict(TypedDict): loc: List[LocTypedDict] msg: str type: str + input: NotRequired[Any] + ctx: NotRequired[ContextTypedDict] class ValidationError(BaseModel): @@ -24,3 +35,23 @@ class ValidationError(BaseModel): msg: str type: str + + input: Optional[Any] = None + + ctx: Optional[Context] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["input", "ctx"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/packages/azure/uv.lock b/packages/azure/uv.lock index df3719ff..ac8a5de9 100644 --- a/packages/azure/uv.lock +++ b/packages/azure/uv.lock @@ -154,7 +154,7 @@ wheels = [ [[package]] name = "mistralai-azure" -version = "2.0.0rc1" +version = "2.0.0" source = { editable = "." } dependencies = [ { name = "httpcore" }, From 643ebeed6346f9f75e64dd0934919f8406814df7 Mon Sep 17 00:00:00 2001 From: Oli Cairns Date: Mon, 9 Mar 2026 22:11:39 +0000 Subject: [PATCH 06/82] Fix function_calling.py to check all transactions before returning error (#290) From 54def72e1f7432d91ade5a10a2f12a13b7ccaaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=86=E3=82=8A?= Date: Tue, 10 Mar 2026 06:15:14 +0800 Subject: [PATCH 07/82] Fix rec_strict_json_schema to handle numeric constraint keywords (#302) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rec_strict_json_schema function now handles int and float values as terminal types. This fixes issue #300 where Pydantic models with constraint keywords like min_length, max_length, minItems, maxItems, minimum, maximum, and multipleOf would cause a ValueError. JSON Schema constraint keywords have numeric values (int or float), and these should be preserved without recursion, just like str and bool. Fixes #300 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: yurekami Co-authored-by: Claude Opus 4.5 --- src/mistralai/extra/tests/test_utils.py | 83 ++++++++++++++++++- src/mistralai/extra/utils/_pydantic_helper.py | 4 +- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/src/mistralai/extra/tests/test_utils.py b/src/mistralai/extra/tests/test_utils.py index 35523fbd..b0e5cdbc 100644 --- a/src/mistralai/extra/tests/test_utils.py +++ b/src/mistralai/extra/tests/test_utils.py @@ -3,7 +3,7 @@ response_format_from_pydantic_model, rec_strict_json_schema, ) -from pydantic import BaseModel, ValidationError +from pydantic import BaseModel, Field, ValidationError from mistralai.client.models import ResponseFormat, JSONSchema from mistralai.client.types.basemodel import Unset @@ -149,11 +149,90 @@ def test_response_format_from_pydantic_model(self): ) def test_rec_strict_json_schema(self): - invalid_schema = mathdemo_schema | {"wrong_value": 1} self.assertEqual( rec_strict_json_schema(mathdemo_schema), mathdemo_strict_schema ) + def test_rec_strict_json_schema_with_numeric_constraints(self): + """ + Test that rec_strict_json_schema handles JSON Schema constraint keywords + that have numeric values (e.g., minLength, maxLength, minItems, maxItems). + + This is a regression test for issue #300 where Pydantic models with + constraint keywords like min_length would cause a ValueError. + """ + # Schema with numeric constraint values (minItems, maxItems, minimum, etc.) + schema_with_constraints = { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": {"type": "integer"}, + "minItems": 1, + "maxItems": 10, + }, + "name": { + "type": "string", + "minLength": 1, + "maxLength": 100, + }, + "count": { + "type": "number", + "minimum": 0, + "maximum": 1000, + "multipleOf": 0.5, # float value + }, + }, + "required": ["items", "name"], + } + + # Should not raise ValueError - integers and floats are valid terminal values + result = rec_strict_json_schema(schema_with_constraints) + + # Check that additionalProperties was added + self.assertEqual(result["additionalProperties"], False) + # Check that numeric constraints are preserved + self.assertEqual(result["properties"]["items"]["minItems"], 1) + self.assertEqual(result["properties"]["items"]["maxItems"], 10) + self.assertEqual(result["properties"]["name"]["minLength"], 1) + self.assertEqual(result["properties"]["count"]["multipleOf"], 0.5) + + def test_response_format_with_constrained_pydantic_model(self): + """ + Test that response_format_from_pydantic_model works with Pydantic models + that use constraint keywords like min_length. + + This is a regression test for issue #300. + """ + + class ModelWithConstraints(BaseModel): + some_list: list[int] = Field( + default_factory=list, + description="A list of integers", + min_length=1, + ) + name: str = Field( + description="A name", + min_length=1, + max_length=100, + ) + + # Should not raise ValueError + result = response_format_from_pydantic_model(ModelWithConstraints) + + # Verify it returns a valid ResponseFormat + self.assertIsInstance(result, ResponseFormat) + self.assertEqual(result.type, "json_schema") + self.assertIsNotNone(result.json_schema) + + def test_rec_strict_json_schema_with_invalid_type(self): + """Test that rec_strict_json_schema raises ValueError for truly invalid types.""" + # A custom object that is not a valid JSON schema node type + class CustomObject: + pass + + invalid_schema = {"invalid": CustomObject()} + with self.assertRaises(ValueError): rec_strict_json_schema(invalid_schema) diff --git a/src/mistralai/extra/utils/_pydantic_helper.py b/src/mistralai/extra/utils/_pydantic_helper.py index f042c394..7273af12 100644 --- a/src/mistralai/extra/utils/_pydantic_helper.py +++ b/src/mistralai/extra/utils/_pydantic_helper.py @@ -6,7 +6,9 @@ def rec_strict_json_schema(schema_node: Any) -> Any: Recursively set the additionalProperties property to False for all objects in the JSON Schema. This makes the JSON Schema strict (i.e. no additional properties are allowed). """ - if isinstance(schema_node, (str, bool)) or schema_node is None: + # Include int and float as terminal types to handle JSON Schema constraint keywords + # like minLength, maxLength, minItems, maxItems, minimum, maximum, etc. + if isinstance(schema_node, (str, bool, int, float)) or schema_node is None: return schema_node if isinstance(schema_node, dict): if "type" in schema_node and schema_node["type"] == "object": From c52beeda740950731381ec4be663ae09f96ccb4a Mon Sep 17 00:00:00 2001 From: Simon Van de Kerckhove Date: Tue, 10 Mar 2026 09:46:36 +0100 Subject: [PATCH 08/82] chore(deps): move invoke and pyyaml to dev dependencies (#413) --- pyproject.toml | 4 ++-- uv.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bb175abf..c616022c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,8 +11,6 @@ dependencies = [ "pydantic >=2.11.2", "python-dateutil >=2.8.2", "typing-inspection >=0.4.0", - "pyyaml (>=6.0.2,<7.0.0)", - "invoke (>=2.2.0,<3.0.0)", "opentelemetry-api (>=1.33.1,<2.0.0)", "opentelemetry-semantic-conventions (>=0.59b0,<0.61)", ] @@ -36,6 +34,8 @@ Repository = "https://github.com/mistralai/client-python.git" [dependency-groups] dev = [ + "invoke>=2.2.0,<3", + "pyyaml>=6.0.2,<7", "mypy==1.15.0", "pylint==3.2.3", "pytest>=8.2.2,<9", diff --git a/uv.lock b/uv.lock index 461e1d5c..07118b65 100644 --- a/uv.lock +++ b/uv.lock @@ -556,12 +556,10 @@ source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, { name = "httpx" }, - { name = "invoke" }, { name = "opentelemetry-api" }, { name = "opentelemetry-semantic-conventions" }, { name = "pydantic" }, { name = "python-dateutil" }, - { name = "pyyaml" }, { name = "typing-inspection" }, ] @@ -583,11 +581,13 @@ realtime = [ dev = [ { name = "authlib" }, { name = "griffe" }, + { name = "invoke" }, { name = "mcp" }, { name = "mypy" }, { name = "pylint" }, { name = "pytest" }, { name = "pytest-asyncio" }, + { name = "pyyaml" }, { name = "types-authlib" }, { name = "types-python-dateutil" }, { name = "types-pyyaml" }, @@ -606,13 +606,11 @@ requires-dist = [ { name = "google-auth", marker = "extra == 'gcp'", specifier = ">=2.27.0" }, { name = "griffe", marker = "extra == 'agents'", specifier = ">=1.7.3,<2.0" }, { name = "httpx", specifier = ">=0.28.1" }, - { name = "invoke", specifier = ">=2.2.0,<3.0.0" }, { name = "mcp", marker = "extra == 'agents'", specifier = ">=1.0,<2.0" }, { name = "opentelemetry-api", specifier = ">=1.33.1,<2.0.0" }, { name = "opentelemetry-semantic-conventions", specifier = ">=0.59b0,<0.61" }, { name = "pydantic", specifier = ">=2.11.2" }, { name = "python-dateutil", specifier = ">=2.8.2" }, - { name = "pyyaml", specifier = ">=6.0.2,<7.0.0" }, { name = "requests", marker = "extra == 'gcp'", specifier = ">=2.32.3" }, { name = "typing-inspection", specifier = ">=0.4.0" }, { name = "websockets", marker = "extra == 'realtime'", specifier = ">=13.0" }, @@ -623,11 +621,13 @@ provides-extras = ["gcp", "agents", "realtime"] dev = [ { name = "authlib", specifier = ">=1.5.2,<2" }, { name = "griffe", specifier = ">=1.7.3,<2" }, + { name = "invoke", specifier = ">=2.2.0,<3" }, { name = "mcp", specifier = ">=1.0,<2" }, { name = "mypy", specifier = "==1.15.0" }, { name = "pylint", specifier = "==3.2.3" }, { name = "pytest", specifier = ">=8.2.2,<9" }, { name = "pytest-asyncio", specifier = ">=0.23.7,<0.24" }, + { name = "pyyaml", specifier = ">=6.0.2,<7" }, { name = "types-authlib", specifier = ">=1.5.0.20250516,<2" }, { name = "types-python-dateutil", specifier = ">=2.9.0.20240316,<3" }, { name = "types-pyyaml", specifier = ">=6.0.12.20250516,<7" }, From 809234f011fcd63e1b0d86cae8d6ef897107c981 Mon Sep 17 00:00:00 2001 From: Simon Van de Kerckhove Date: Tue, 10 Mar 2026 11:21:09 +0100 Subject: [PATCH 09/82] docs: fix typo in migration guide (#408) * docs: fix typo in migration guide * revert: fix typo in migration guide This reverts commit 1b677270eda1404e63a251c75287a1d1efac0ae7. * docs: clarify migration guide v0 to v1 --- MIGRATION.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MIGRATION.md b/MIGRATION.md index 220908ce..bf25c4f6 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -96,7 +96,8 @@ Only one user-facing type rename: `Tools` -> `ConversationRequestTool`. --- -## Migrating from v0.x to v1.x +
+

Legacy: Migrating from v0.x to v1.x

> **Note:** The v1.x examples below use v1-style imports (e.g., `from mistralai import Mistral`). If you're on v2.x, combine these API changes with the [v1 to v2 import changes](#migration-guide-v1x-to-v2x) above. @@ -117,3 +118,5 @@ Only one user-facing type rename: `Tools` -> `ConversationRequestTool`. | `client.jobs.list` | `client.fine_tuning.jobs.list` | | `client.jobs.retrieve` | `client.fine_tuning.jobs.get` | | `client.jobs.cancel` | `client.fine_tuning.jobs.cancel` | + +
From f5e990830e34cb50adcd59ddb7373d1270ff50e0 Mon Sep 17 00:00:00 2001 From: Simon Van de Kerckhove Date: Tue, 10 Mar 2026 14:41:18 +0100 Subject: [PATCH 10/82] feat(extra): better OTEL instrumentation (#407) * feat(extra): better OTEL instrumentation * chore: adapt to v2 * chore(deps): adapt opentelemetry deps Will probably be merged before in https://github.com/mistralai/client-python/pull/406 * fix: use public httpx content API * docs: add some TODOs * chore: remove custom mistral ai total tokens span attribute * chore(extra): remove custom operation id span attribute --- pyproject.toml | 3 +- src/mistralai/extra/observability/otel.py | 657 +++++-- .../extra/observability/serialization.py | 156 ++ .../extra/observability/streaming.py | 98 ++ src/mistralai/extra/run/tools.py | 54 +- .../extra/tests/test_otel_tracing.py | 1529 +++++++++++++++++ .../extra/tests/test_serialization.py | 447 +++++ src/mistralai/extra/tests/test_streaming.py | 372 ++++ uv.lock | 30 +- 9 files changed, 3130 insertions(+), 216 deletions(-) create mode 100644 src/mistralai/extra/observability/serialization.py create mode 100644 src/mistralai/extra/observability/streaming.py create mode 100644 src/mistralai/extra/tests/test_otel_tracing.py create mode 100644 src/mistralai/extra/tests/test_serialization.py create mode 100644 src/mistralai/extra/tests/test_streaming.py diff --git a/pyproject.toml b/pyproject.toml index c616022c..a2e89ff9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "python-dateutil >=2.8.2", "typing-inspection >=0.4.0", "opentelemetry-api (>=1.33.1,<2.0.0)", - "opentelemetry-semantic-conventions (>=0.59b0,<0.61)", + "opentelemetry-semantic-conventions (>=0.60b1,<0.61)", ] [project.optional-dependencies] @@ -37,6 +37,7 @@ dev = [ "invoke>=2.2.0,<3", "pyyaml>=6.0.2,<7", "mypy==1.15.0", + "opentelemetry-sdk (>=1.33.1,<2.0.0)", "pylint==3.2.3", "pytest>=8.2.2,<9", "pytest-asyncio>=0.23.7,<0.24", diff --git a/src/mistralai/extra/observability/otel.py b/src/mistralai/extra/observability/otel.py index 1f7e2c2f..45c33535 100644 --- a/src/mistralai/extra/observability/otel.py +++ b/src/mistralai/extra/observability/otel.py @@ -1,3 +1,9 @@ +"""OTEL conventions for gen AI may be found at: + +https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/ +https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-agent-spans/ +""" + import copy import json import logging @@ -5,40 +11,46 @@ import traceback from datetime import datetime, timezone from enum import Enum +from typing import Any import httpx import opentelemetry.semconv._incubating.attributes.gen_ai_attributes as gen_ai_attributes import opentelemetry.semconv._incubating.attributes.http_attributes as http_attributes +import opentelemetry.semconv.attributes.error_attributes as error_attributes import opentelemetry.semconv.attributes.server_attributes as server_attributes +from opentelemetry import context as context_api from opentelemetry import propagate, trace from opentelemetry.trace import Span, Status, StatusCode, Tracer, set_span_in_context +from .serialization import ( + serialize_input_message, + serialize_output_message, + serialize_tool_definition, +) +from .streaming import accumulate_chunks_to_response_dict, parse_sse_chunks + logger = logging.getLogger(__name__) OTEL_SERVICE_NAME: str = "mistralai_sdk" MISTRAL_SDK_OTEL_TRACER_NAME: str = OTEL_SERVICE_NAME + "_tracer" -MISTRAL_SDK_DEBUG_TRACING: bool = os.getenv("MISTRAL_SDK_DEBUG_TRACING", "false").lower() == "true" +MISTRAL_SDK_DEBUG_TRACING: bool = ( + os.getenv("MISTRAL_SDK_DEBUG_TRACING", "false").lower() == "true" +) DEBUG_HINT: str = "To see detailed tracing logs, set MISTRAL_SDK_DEBUG_TRACING=true." class MistralAIAttributes: - MISTRAL_AI_TOTAL_TOKENS = "mistral_ai.request.total_tokens" - MISTRAL_AI_TOOL_CALL_ARGUMENTS = "mistral_ai.tool.call.arguments" - MISTRAL_AI_MESSAGE_ID = "mistral_ai.message.id" - MISTRAL_AI_OPERATION_NAME= "mistral_ai.operation.name" MISTRAL_AI_OCR_USAGE_PAGES_PROCESSED = "mistral_ai.ocr.usage.pages_processed" MISTRAL_AI_OCR_USAGE_DOC_SIZE_BYTES = "mistral_ai.ocr.usage.doc_size_bytes" - MISTRAL_AI_OPERATION_ID = "mistral_ai.operation.id" - MISTRAL_AI_ERROR_TYPE = "mistral_ai.error.type" - MISTRAL_AI_ERROR_MESSAGE = "mistral_ai.error.message" MISTRAL_AI_ERROR_CODE = "mistral_ai.error.code" - MISTRAL_AI_FUNCTION_CALL_ARGUMENTS = "mistral_ai.function.call.arguments" + class MistralAINameValues(Enum): OCR = "ocr" + class TracingErrors(Exception, Enum): FAILED_TO_CREATE_SPAN_FOR_REQUEST = "Failed to create span for request." FAILED_TO_ENRICH_SPAN_WITH_RESPONSE = "Failed to enrich span with response." @@ -48,28 +60,74 @@ class TracingErrors(Exception, Enum): def __str__(self): return str(self.value) + class GenAISpanEnum(str, Enum): CONVERSATION = "conversation" - CONV_REQUEST = "POST /v1/conversations" - EXECUTE_TOOL = "execute_tool" VALIDATE_RUN = "validate_run" - @staticmethod - def function_call(func_name: str): - return f"function_call[{func_name}]" - def parse_time_to_nanos(ts: str) -> int: dt = datetime.fromisoformat(ts.replace("Z", "+00:00")).astimezone(timezone.utc) return int(dt.timestamp() * 1e9) -def set_available_attributes(span: Span, attributes: dict) -> None: + +def _infer_gen_ai_operation_name( + operation_id: str, +) -> gen_ai_attributes.GenAiOperationNameValues | None: + """Infer the GenAI operation name from the operation_id using rule-based matching.""" + if "chat_completion" in operation_id or operation_id == "stream_chat": + return gen_ai_attributes.GenAiOperationNameValues.CHAT + if ( + "agents_create" in operation_id or "agents_update" in operation_id + ) and "alias" not in operation_id: + return gen_ai_attributes.GenAiOperationNameValues.CREATE_AGENT + if "agents_completion" in operation_id or operation_id == "stream_agents": + return gen_ai_attributes.GenAiOperationNameValues.INVOKE_AGENT + if "conversations" in operation_id and any( + action in operation_id for action in ("start", "append", "restart") + ): + return gen_ai_attributes.GenAiOperationNameValues.INVOKE_AGENT + if "fim" in operation_id: + return gen_ai_attributes.GenAiOperationNameValues.TEXT_COMPLETION + if "embeddings" in operation_id: + return gen_ai_attributes.GenAiOperationNameValues.EMBEDDINGS + if "ocr_post" in operation_id: + return gen_ai_attributes.GenAiOperationNameValues.GENERATE_CONTENT + # TODO: Handle transcriptions (audio_api_v1_transcriptions_post[_stream]) + return None + + +def _build_genai_span_name( + gen_ai_op: gen_ai_attributes.GenAiOperationNameValues, body: dict[str, Any] +) -> str: + """Build span name per GenAI semantic conventions. + + - Chat/text_completion/embeddings: "{operation_name} {model}" + - create_agent/invoke_agent: "{operation_name} {agent_name}" + - execute_tool: "execute_tool {gen_ai.tool.name}" + """ + op_name = gen_ai_op.value + if gen_ai_op in { + gen_ai_attributes.GenAiOperationNameValues.CREATE_AGENT, + gen_ai_attributes.GenAiOperationNameValues.INVOKE_AGENT, + }: + agent_name = body.get("name", "") + return f"{op_name} {agent_name}" if agent_name else op_name + if gen_ai_op is gen_ai_attributes.GenAiOperationNameValues.EXECUTE_TOOL: + tool_name = body.get("name", "") + return f"{op_name} {tool_name}" if tool_name else op_name + model = body.get("model", "") + return f"{op_name} {model}" if model else op_name + + +def set_available_attributes(span: Span, attributes: dict[str, Any]) -> None: for attribute, value in attributes.items(): if value: span.set_attribute(attribute, value) -def enrich_span_from_request(span: Span, request: httpx.Request) -> Span: +def _set_http_attributes(span: Span, operation_id: str, request: httpx.Request) -> None: + """Set HTTP and server attributes on the span.""" if not request.url.port: # From httpx doc: # Note that the URL class performs port normalization as per the WHATWG spec. @@ -84,120 +142,275 @@ def enrich_span_from_request(span: Span, request: httpx.Request) -> Span: else: port = request.url.port - span.set_attributes({ - http_attributes.HTTP_REQUEST_METHOD: request.method, - http_attributes.HTTP_URL: str(request.url), - server_attributes.SERVER_ADDRESS: request.headers.get("host", ""), - server_attributes.SERVER_PORT: port - }) - if request._content: - request_body = json.loads(request._content) - - attributes = { - gen_ai_attributes.GEN_AI_REQUEST_CHOICE_COUNT: request_body.get("n", None), - gen_ai_attributes.GEN_AI_REQUEST_ENCODING_FORMATS: request_body.get("encoding_formats", None), - gen_ai_attributes.GEN_AI_REQUEST_FREQUENCY_PENALTY: request_body.get("frequency_penalty", None), - gen_ai_attributes.GEN_AI_REQUEST_MAX_TOKENS: request_body.get("max_tokens", None), - gen_ai_attributes.GEN_AI_REQUEST_MODEL: request_body.get("model", None), - gen_ai_attributes.GEN_AI_REQUEST_PRESENCE_PENALTY: request_body.get("presence_penalty", None), - gen_ai_attributes.GEN_AI_REQUEST_SEED: request_body.get("random_seed", None), - gen_ai_attributes.GEN_AI_REQUEST_STOP_SEQUENCES: request_body.get("stop", None), - gen_ai_attributes.GEN_AI_REQUEST_TEMPERATURE: request_body.get("temperature", None), - gen_ai_attributes.GEN_AI_REQUEST_TOP_P: request_body.get("top_p", None), - gen_ai_attributes.GEN_AI_REQUEST_TOP_K: request_body.get("top_k", None), - # Input messages are likely to be large, containing user/PII data and other sensitive information. - # Also structured attributes are not yet supported on spans in Python. - # For those reasons, we will not record the input messages for now. - gen_ai_attributes.GEN_AI_INPUT_MESSAGES: None, + span.set_attributes( + { + http_attributes.HTTP_REQUEST_METHOD: request.method, + http_attributes.HTTP_URL: str(request.url), + server_attributes.SERVER_ADDRESS: request.headers.get("host", ""), + server_attributes.SERVER_PORT: port, } - # Set attributes only if they are not None. - # From OpenTelemetry documentation: None is not a valid attribute value per spec / is not a permitted value type for an attribute. - set_available_attributes(span, attributes) - return span + ) + + +def _enrich_request_genai_attrs( + span: Span, + gen_ai_op: gen_ai_attributes.GenAiOperationNameValues, + request_body: dict[str, Any], +) -> None: + """Set GenAI request attributes: model params, input messages, tool definitions.""" + # Update span name per GenAI semantic conventions, now that we have the parsed request body. + span.update_name(_build_genai_span_name(gen_ai_op, request_body)) + + attributes = { + gen_ai_attributes.GEN_AI_REQUEST_CHOICE_COUNT: request_body.get("n"), + gen_ai_attributes.GEN_AI_REQUEST_ENCODING_FORMATS: request_body.get( + "encoding_formats" + ), + gen_ai_attributes.GEN_AI_REQUEST_FREQUENCY_PENALTY: request_body.get( + "frequency_penalty" + ), + gen_ai_attributes.GEN_AI_REQUEST_MAX_TOKENS: request_body.get("max_tokens"), + gen_ai_attributes.GEN_AI_REQUEST_MODEL: request_body.get("model"), + gen_ai_attributes.GEN_AI_REQUEST_PRESENCE_PENALTY: request_body.get( + "presence_penalty" + ), + gen_ai_attributes.GEN_AI_REQUEST_SEED: request_body.get("random_seed"), + gen_ai_attributes.GEN_AI_REQUEST_STOP_SEQUENCES: request_body.get("stop"), + gen_ai_attributes.GEN_AI_REQUEST_TEMPERATURE: request_body.get("temperature"), + gen_ai_attributes.GEN_AI_REQUEST_TOP_P: request_body.get("top_p"), + gen_ai_attributes.GEN_AI_REQUEST_TOP_K: request_body.get("top_k"), + } + # Chat/agent completion API uses messages in request body; conversation API uses inputs + input_messages = request_body.get("messages") or request_body.get("inputs") + if isinstance(input_messages, str): + attributes[gen_ai_attributes.GEN_AI_INPUT_MESSAGES] = [ + serialize_input_message({"role": "user", "content": input_messages}) + ] + elif isinstance(input_messages, list): + attributes[gen_ai_attributes.GEN_AI_INPUT_MESSAGES] = list( + map(serialize_input_message, input_messages) + ) + # Tool definitions + if tools := request_body.get("tools"): + attributes[gen_ai_attributes.GEN_AI_TOOL_DEFINITIONS] = list( + filter(None, map(serialize_tool_definition, tools)) + ) + # TODO: For agent start conversation, add agent id and version attributes here ? -def enrich_span_from_response(tracer: trace.Tracer, span: Span, operation_id: str, response: httpx.Response) -> None: - span.set_status(Status(StatusCode.OK)) - response_data = json.loads(response.content) + set_available_attributes(span, attributes) - # Base attributes - attributes: dict[str, str | int] = { - http_attributes.HTTP_RESPONSE_STATUS_CODE: response.status_code, - MistralAIAttributes.MISTRAL_AI_OPERATION_ID: operation_id, - gen_ai_attributes.GEN_AI_PROVIDER_NAME: gen_ai_attributes.GenAiProviderNameValues.MISTRAL_AI.value - } - # Add usage attributes if available +def enrich_span_from_request( + span: Span, operation_id: str, request: httpx.Request +) -> Span: + _set_http_attributes(span, operation_id, request) + + gen_ai_op = _infer_gen_ai_operation_name(operation_id) + if gen_ai_op is None: + return span + + span.set_attributes( + { + gen_ai_attributes.GEN_AI_OPERATION_NAME: gen_ai_op.value, + gen_ai_attributes.GEN_AI_PROVIDER_NAME: gen_ai_attributes.GenAiProviderNameValues.MISTRAL_AI.value, + } + ) + + if request.content: + request_body = json.loads(request.content) + _enrich_request_genai_attrs(span, gen_ai_op, request_body) + + return span + + +def _enrich_response_genai_attrs( + span: Span, + gen_ai_op: gen_ai_attributes.GenAiOperationNameValues, + response_data: dict[str, Any], +) -> None: + """Set common GenAI response attributes: response ID, model, choices, usage.""" + attributes: dict[str, Any] = {} + + if gen_ai_op is not gen_ai_attributes.GenAiOperationNameValues.CREATE_AGENT: + # id has another meaning for create agent operation (id of the agent) + attributes[gen_ai_attributes.GEN_AI_RESPONSE_ID] = response_data.get("id") + attributes[gen_ai_attributes.GEN_AI_RESPONSE_MODEL] = response_data.get("model") + + # Finish reasons and output messages from choices + choices = response_data.get("choices", []) + finish_reasons = [c.get("finish_reason") for c in choices if c.get("finish_reason")] + if finish_reasons: + attributes[gen_ai_attributes.GEN_AI_RESPONSE_FINISH_REASONS] = finish_reasons + if choices: + attributes[gen_ai_attributes.GEN_AI_OUTPUT_MESSAGES] = list( + map(serialize_output_message, choices) + ) + + # Usage usage = response_data.get("usage", {}) if usage: - attributes.update({ - gen_ai_attributes.GEN_AI_USAGE_PROMPT_TOKENS: usage.get("prompt_tokens", 0), - gen_ai_attributes.GEN_AI_USAGE_OUTPUT_TOKENS: usage.get("completion_tokens", 0), - MistralAIAttributes.MISTRAL_AI_TOTAL_TOKENS: usage.get("total_tokens", 0) - }) - - span.set_attributes(attributes) - if operation_id == "agents_api_v1_agents_create": - # Semantics from https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-agent-spans/#create-agent-span - agent_attributes = { - gen_ai_attributes.GEN_AI_OPERATION_NAME: gen_ai_attributes.GenAiOperationNameValues.CREATE_AGENT.value, - gen_ai_attributes.GEN_AI_AGENT_DESCRIPTION: response_data.get("description", ""), - gen_ai_attributes.GEN_AI_AGENT_ID: response_data.get("id", ""), - gen_ai_attributes.GEN_AI_AGENT_NAME: response_data.get("name", ""), - gen_ai_attributes.GEN_AI_REQUEST_MODEL: response_data.get("model", ""), - gen_ai_attributes.GEN_AI_SYSTEM_INSTRUCTIONS: response_data.get("instructions", "") - } - span.set_attributes(agent_attributes) - if operation_id in ["agents_api_v1_conversations_start", "agents_api_v1_conversations_append"]: - outputs = response_data.get("outputs", []) - conversation_attributes = { - gen_ai_attributes.GEN_AI_OPERATION_NAME: gen_ai_attributes.GenAiOperationNameValues.INVOKE_AGENT.value, - gen_ai_attributes.GEN_AI_CONVERSATION_ID: response_data.get("conversation_id", "") - } - span.set_attributes(conversation_attributes) - parent_context = set_span_in_context(span) - - for output in outputs: - # TODO: Only enrich the spans if it's a single turn conversation. - # Multi turn conversations are handled in the extra.run.tools.create_function_result function - if output["type"] == "function.call": - pass - if output["type"] == "tool.execution": - start_ns = parse_time_to_nanos(output["created_at"]) - end_ns = parse_time_to_nanos(output["completed_at"]) - child_span = tracer.start_span("Tool Execution", start_time=start_ns, context=parent_context) - child_span.set_attributes({"agent.trace.public": ""}) - tool_attributes = { - gen_ai_attributes.GEN_AI_OPERATION_NAME: gen_ai_attributes.GenAiOperationNameValues.EXECUTE_TOOL.value, - gen_ai_attributes.GEN_AI_TOOL_CALL_ID: output.get("id", ""), - MistralAIAttributes.MISTRAL_AI_TOOL_CALL_ARGUMENTS: output.get("arguments", ""), - gen_ai_attributes.GEN_AI_TOOL_NAME: output.get("name", "") - } - child_span.set_attributes(tool_attributes) - child_span.end(end_time=end_ns) - if output["type"] == "message.output": - start_ns = parse_time_to_nanos(output["created_at"]) - end_ns = parse_time_to_nanos(output["completed_at"]) - child_span = tracer.start_span("Message Output", start_time=start_ns, context=parent_context) - child_span.set_attributes({"agent.trace.public": ""}) - message_attributes = { - gen_ai_attributes.GEN_AI_OPERATION_NAME: gen_ai_attributes.GenAiOperationNameValues.CHAT.value, - gen_ai_attributes.GEN_AI_PROVIDER_NAME: gen_ai_attributes.GenAiProviderNameValues.MISTRAL_AI.value, - MistralAIAttributes.MISTRAL_AI_MESSAGE_ID: output.get("id", ""), - gen_ai_attributes.GEN_AI_AGENT_ID: output.get("agent_id", ""), - gen_ai_attributes.GEN_AI_REQUEST_MODEL: output.get("model", "") - } - child_span.set_attributes(message_attributes) - child_span.end(end_time=end_ns) + attributes.update( + { + gen_ai_attributes.GEN_AI_USAGE_INPUT_TOKENS: usage.get( + "prompt_tokens", 0 + ), + gen_ai_attributes.GEN_AI_USAGE_OUTPUT_TOKENS: usage.get( + "completion_tokens", 0 + ), + } + ) + + set_available_attributes(span, attributes) + + +def _enrich_create_agent(span: Span, response_data: dict[str, Any]) -> None: + """Set agent-specific attributes from create_agent response. + + Semantics: https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-agent-spans/#create-agent-span + """ + agent_attributes = { + gen_ai_attributes.GEN_AI_AGENT_DESCRIPTION: response_data.get("description"), + gen_ai_attributes.GEN_AI_AGENT_ID: response_data.get("id"), + gen_ai_attributes.GEN_AI_AGENT_NAME: response_data.get("name"), + # As of 2026-03-02: in convention, but not yet in opentelemetry-semantic-conventions + "gen_ai.agent.version": str(response_data.get("version")), + gen_ai_attributes.GEN_AI_REQUEST_MODEL: response_data.get("model"), + gen_ai_attributes.GEN_AI_SYSTEM_INSTRUCTIONS: response_data.get("instructions"), + } + set_available_attributes(span, agent_attributes) + + +def _create_tool_execution_child_span( + tracer: trace.Tracer, parent_context: context_api.Context, output: dict[str, Any] +) -> None: + """Create a child span for a tool.execution conversation output.""" + start_ns = parse_time_to_nanos(output["created_at"]) + end_ns = parse_time_to_nanos(output["completed_at"]) + op_name = gen_ai_attributes.GenAiOperationNameValues.EXECUTE_TOOL + span_name = _build_genai_span_name(op_name, output) + child_span = tracer.start_span( + span_name, start_time=start_ns, context=parent_context + ) + child_span.set_attributes({"agent.trace.public": ""}) + tool_arguments = output.get("arguments") + # The tool call result is in the "info" field, if provided + tool_result = output.get("info") + tool_attributes = { + gen_ai_attributes.GEN_AI_OPERATION_NAME: op_name.value, + gen_ai_attributes.GEN_AI_PROVIDER_NAME: gen_ai_attributes.GenAiProviderNameValues.MISTRAL_AI.value, + gen_ai_attributes.GEN_AI_TOOL_CALL_ID: output.get("id"), + gen_ai_attributes.GEN_AI_TOOL_CALL_ARGUMENTS: tool_arguments + if isinstance(tool_arguments, str) + else (json.dumps(tool_arguments) if tool_arguments else None), + gen_ai_attributes.GEN_AI_TOOL_CALL_RESULT: tool_result + and json.dumps(tool_result), + gen_ai_attributes.GEN_AI_TOOL_NAME: output.get("name"), + gen_ai_attributes.GEN_AI_TOOL_TYPE: "extension", + } + set_available_attributes(child_span, tool_attributes) + child_span.end(end_time=end_ns) + + +def _create_message_output_child_span( + tracer: trace.Tracer, parent_context: context_api.Context, output: dict[str, Any] +) -> None: + """Create a child span for a message.output conversation output.""" + start_ns = parse_time_to_nanos(output["created_at"]) + end_ns = parse_time_to_nanos(output["completed_at"]) + op_name = gen_ai_attributes.GenAiOperationNameValues.CHAT + span_name = _build_genai_span_name(op_name, output) + child_span = tracer.start_span( + span_name, start_time=start_ns, context=parent_context + ) + child_span.set_attributes({"agent.trace.public": ""}) + # Wrap the flat conversation output as a choice dict so we + # can reuse serialize_output_message (which also handles + # tool_calls, not just content). + choice_wrapper: dict = { + "message": output, + "finish_reason": output.get("finish_reason", ""), + } + message_attributes = { + gen_ai_attributes.GEN_AI_OPERATION_NAME: op_name.value, + gen_ai_attributes.GEN_AI_PROVIDER_NAME: gen_ai_attributes.GenAiProviderNameValues.MISTRAL_AI.value, + gen_ai_attributes.GEN_AI_RESPONSE_ID: output.get("id"), + gen_ai_attributes.GEN_AI_AGENT_ID: output.get("agent_id"), + gen_ai_attributes.GEN_AI_RESPONSE_MODEL: output.get("model"), + gen_ai_attributes.GEN_AI_OUTPUT_MESSAGES: [ + serialize_output_message(choice_wrapper) + ], + } + set_available_attributes(child_span, message_attributes) + child_span.end(end_time=end_ns) + + +def _enrich_invoke_agent( + tracer: trace.Tracer, span: Span, response_data: dict[str, Any] +) -> None: + """Set invoke_agent attributes and create child spans for conversation outputs.""" + conversation_attributes = { + gen_ai_attributes.GEN_AI_CONVERSATION_ID: response_data.get("conversation_id"), + # We don't have more agent attributes available in the response data + # (agent id, name, version, description). For start conversation operation, + # we could get it from the request; see associated TODO + } + set_available_attributes(span, conversation_attributes) + + outputs = response_data.get("outputs", []) + parent_context = set_span_in_context(span) + for output in outputs: + output_type = output.get("type") + if not output_type: + continue # Safety net + if output_type == "function.call": + # handled in the extra.run.tools.create_function_result function + continue + elif output_type == "tool.execution": + _create_tool_execution_child_span(tracer, parent_context, output) + elif output_type == "message.output": + _create_message_output_child_span(tracer, parent_context, output) + # TODO: do type agent.handoff + + +def _enrich_ocr(span: Span, response_data: dict[str, Any]) -> None: + """Set OCR-specific usage attributes.""" + usage_info = response_data.get("usage_info", {}) + ocr_attributes = { + MistralAIAttributes.MISTRAL_AI_OCR_USAGE_PAGES_PROCESSED: usage_info.get( + "pages_processed" + ), + MistralAIAttributes.MISTRAL_AI_OCR_USAGE_DOC_SIZE_BYTES: usage_info.get( + "doc_size_bytes" + ), + } + set_available_attributes(span, ocr_attributes) + + +def _enrich_span_from_response( + tracer: Tracer, + span: Span, + operation_id: str, + response_data: dict[str, Any], +) -> None: + """Enrich span with GenAI response attributes and operation-specific data. + + Used by both the non-streaming and streaming paths so that the same + attributes are set regardless of response type. + """ + gen_ai_op = _infer_gen_ai_operation_name(operation_id) + if gen_ai_op is None: + return + + _enrich_response_genai_attrs(span, gen_ai_op, response_data) + + if gen_ai_op is gen_ai_attributes.GenAiOperationNameValues.CREATE_AGENT: + _enrich_create_agent(span, response_data) + elif gen_ai_op is gen_ai_attributes.GenAiOperationNameValues.INVOKE_AGENT: + _enrich_invoke_agent(tracer, span, response_data) + if operation_id == "ocr_v1_ocr_post": - usage_info = response_data.get("usage_info", "") - ocr_attributes = { - MistralAIAttributes.MISTRAL_AI_OPERATION_NAME: MistralAINameValues.OCR.value, - MistralAIAttributes.MISTRAL_AI_OCR_USAGE_PAGES_PROCESSED: usage_info.get("pages_processed", "") if usage_info else "", - MistralAIAttributes.MISTRAL_AI_OCR_USAGE_DOC_SIZE_BYTES: usage_info.get("doc_size_bytes", "") if usage_info else "", - gen_ai_attributes.GEN_AI_REQUEST_MODEL: response_data.get("model", "") - } - span.set_attributes(ocr_attributes) + _enrich_ocr(span, response_data) def get_or_create_otel_tracer() -> tuple[bool, Tracer]: @@ -226,6 +439,7 @@ def get_or_create_otel_tracer() -> tuple[bool, Tracer]: return tracing_enabled, tracer + def get_traced_request_and_span( tracing_enabled: bool, tracer: Tracer, @@ -233,26 +447,26 @@ def get_traced_request_and_span( operation_id: str, request: httpx.Request, ) -> tuple[httpx.Request, Span | None]: - if not tracing_enabled: - return request, span + if not tracing_enabled: + return request, span - try: - span = tracer.start_span(name=operation_id) - span.set_attributes({"agent.trace.public": ""}) - # Inject the span context into the request headers to be used by the backend service to continue the trace - propagate.inject(request.headers, context=set_span_in_context(span)) - span = enrich_span_from_request(span, request) - except Exception: - logger.warning( - "%s %s", - TracingErrors.FAILED_TO_CREATE_SPAN_FOR_REQUEST, - traceback.format_exc() if MISTRAL_SDK_DEBUG_TRACING else DEBUG_HINT, - ) - if span: - end_span(span=span) - span = None + try: + span = tracer.start_span(name=operation_id) + span.set_attributes({"agent.trace.public": ""}) + # Inject the span context into the request headers to be used by the backend service to continue the trace + propagate.inject(request.headers, context=set_span_in_context(span)) + span = enrich_span_from_request(span, operation_id, request) + except Exception: + logger.warning( + "%s %s", + TracingErrors.FAILED_TO_CREATE_SPAN_FOR_REQUEST, + traceback.format_exc() if MISTRAL_SDK_DEBUG_TRACING else DEBUG_HINT, + ) + if span: + end_span(span=span) + span = None - return request, span + return request, span def get_traced_response( @@ -265,12 +479,18 @@ def get_traced_response( if not tracing_enabled or not span: return response try: + span.set_status(Status(StatusCode.OK)) + span.set_attribute( + http_attributes.HTTP_RESPONSE_STATUS_CODE, response.status_code + ) is_stream_response = not response.is_closed and not response.is_stream_consumed if is_stream_response: - return TracedResponse.from_response(resp=response, span=span) - enrich_span_from_response( - tracer, span, operation_id, response - ) + return TracedResponse.from_response( + resp=response, span=span, tracer=tracer, operation_id=operation_id + ) + if response.content: + response_data = json.loads(response.content) + _enrich_span_from_response(tracer, span, operation_id, response_data) except Exception: logger.warning( "%s %s", @@ -281,6 +501,7 @@ def get_traced_response( end_span(span=span) return response + def get_response_and_error( tracing_enabled: bool, tracer: Tracer, @@ -289,38 +510,48 @@ def get_response_and_error( response: httpx.Response, error: Exception | None, ) -> tuple[httpx.Response, Exception | None]: - if not tracing_enabled or not span: - return response, error - try: - if error: - span.record_exception(error) - span.set_status(Status(StatusCode.ERROR, str(error))) - if hasattr(response, "_content") and response._content: - response_body = json.loads(response._content) - if response_body.get("object", "") == "error": - if error_msg := response_body.get("message", ""): - attributes = { - http_attributes.HTTP_RESPONSE_STATUS_CODE: response.status_code, - MistralAIAttributes.MISTRAL_AI_ERROR_TYPE: response_body.get("type", ""), - MistralAIAttributes.MISTRAL_AI_ERROR_MESSAGE: error_msg, - MistralAIAttributes.MISTRAL_AI_ERROR_CODE: response_body.get("code", ""), - } - for attribute, value in attributes.items(): - if value: - span.set_attribute(attribute, value) + if not tracing_enabled or not span: + return response, error + try: + if error: + span.record_exception(error) + span.set_status(Status(StatusCode.ERROR, str(error))) + if response.content: + response_body = json.loads(response.content) + if response_body.get("object", "") == "error": + if error_msg := response_body.get("message", ""): + error_type = response_body.get("type", "") + span.set_status(Status(StatusCode.ERROR, error_msg)) + span.add_event( + "exception", + { + "exception.type": error_type or "api_error", + "exception.message": error_msg, + }, + ) + attributes = { + http_attributes.HTTP_RESPONSE_STATUS_CODE: response.status_code, + error_attributes.ERROR_TYPE: error_type, + MistralAIAttributes.MISTRAL_AI_ERROR_CODE: response_body.get( + "code", "" + ), + } + for attribute, value in attributes.items(): + if value: + span.set_attribute(attribute, value) + span.end() + span = None + except Exception: + logger.warning( + "%s %s", + TracingErrors.FAILED_TO_HANDLE_ERROR_IN_SPAN, + traceback.format_exc() if MISTRAL_SDK_DEBUG_TRACING else DEBUG_HINT, + ) + + if span: span.end() span = None - except Exception: - logger.warning( - "%s %s", - TracingErrors.FAILED_TO_HANDLE_ERROR_IN_SPAN, - traceback.format_exc() if MISTRAL_SDK_DEBUG_TRACING else DEBUG_HINT, - ) - - if span: - span.end() - span = None - return response, error + return response, error def end_span(span: Span) -> None: @@ -333,34 +564,84 @@ def end_span(span: Span) -> None: traceback.format_exc() if MISTRAL_SDK_DEBUG_TRACING else DEBUG_HINT, ) + class TracedResponse(httpx.Response): + """Subclass of httpx.Response that accumulates streamed SSE bytes and + enriches the OTEL span with response attributes when the stream is closed. """ - TracedResponse is a subclass of httpx.Response that ends the span when the response is closed. - This hack allows ending the span only once the stream is fully consumed. - """ - def __init__(self, *args, span: Span | None, **kwargs) -> None: + span: Span | None + tracer: Tracer + operation_id: str + _accumulated_sse: bytearray + + def __init__( + self, + *args, + span: Span | None, + tracer: Tracer, + operation_id: str = "", + **kwargs, + ) -> None: super().__init__(*args, **kwargs) self.span = span + self.tracer = tracer + self.operation_id = operation_id + self._accumulated_sse = bytearray() + + def iter_bytes(self, *args, **kwargs): + for chunk in super().iter_bytes(*args, **kwargs): + self._accumulated_sse.extend(chunk) + yield chunk + + async def aiter_bytes(self, *args, **kwargs): + async for chunk in super().aiter_bytes(*args, **kwargs): + self._accumulated_sse.extend(chunk) + yield chunk def close(self) -> None: - if self.span: - end_span(span=self.span) + self._finalize_span() super().close() async def aclose(self) -> None: - if self.span: - end_span(span=self.span) + self._finalize_span() await super().aclose() + def _finalize_span(self) -> None: + """Enrich and end the span after the stream has been fully consumed.""" + if not self.span: + return + try: + chunks = parse_sse_chunks(bytes(self._accumulated_sse)) + if chunks: + response_data = accumulate_chunks_to_response_dict(chunks) + _enrich_span_from_response( + self.tracer, self.span, self.operation_id, response_data + ) + except Exception: + logger.warning( + "%s %s", + TracingErrors.FAILED_TO_ENRICH_SPAN_WITH_RESPONSE, + traceback.format_exc() if MISTRAL_SDK_DEBUG_TRACING else DEBUG_HINT, + ) + end_span(span=self.span) + self.span = None + @classmethod - def from_response(cls, resp: httpx.Response, span: Span | None) -> "TracedResponse": + def from_response( + cls, + resp: httpx.Response, + span: Span | None, + tracer: Tracer, + operation_id: str = "", + ) -> "TracedResponse": + # Bypass __init__ to steal the live httpx stream/connection via __dict__ copy. + # Keep tracing field assignments in sync with __init__. traced_resp = cls.__new__(cls) traced_resp.__dict__ = copy.copy(resp.__dict__) traced_resp.span = span - - # Warning: this syntax bypasses the __init__ method. - # If you add init logic in the TracedResponse.__init__ method, you will need to add the following line for it to execute: - # traced_resp.__init__(your_arguments) + traced_resp.tracer = tracer + traced_resp.operation_id = operation_id + traced_resp._accumulated_sse = bytearray() return traced_resp diff --git a/src/mistralai/extra/observability/serialization.py b/src/mistralai/extra/observability/serialization.py new file mode 100644 index 00000000..de3bfce2 --- /dev/null +++ b/src/mistralai/extra/observability/serialization.py @@ -0,0 +1,156 @@ +"""Serialization helpers for converting Mistral API payloads to OTEL GenAI convention formats. + +These are pure functions with no OTEL dependencies — they transform dicts to JSON strings +matching the GenAI semantic convention schemas for input/output messages and tool definitions. + +Schemas: +- Input messages: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-input-messages.json +- Output messages: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-output-messages.json +- Tool definitions: https://github.com/Cirilla-zmh/semantic-conventions/blob/cc4d07e7e56b80e9aa5904a3d524c134699da37f/docs/gen-ai/gen-ai-tool-definitions.json +""" + +import json +from typing import Any + + +def _content_to_parts(content) -> list[dict]: + """Convert Mistral message content to OTEL parts array. + + Mistral content is either a string or an array of content chunks. + """ + if content is None: + return [] + if isinstance(content, str): + return [{"type": "text", "content": content}] + # Content chunks array — map known Mistral types to OTEL part types + parts = [] + for chunk in content: + if isinstance(chunk, str): + parts.append({"type": "text", "content": chunk}) + elif isinstance(chunk, dict): + chunk_type = chunk.get("type", "") + if chunk_type == "text": + parts.append({"type": "text", "content": chunk.get("text", "")}) + elif chunk_type == "thinking": + thinking = chunk.get("thinking", "") + if isinstance(thinking, list): + text_parts = [ + sub.get("text", "") + for sub in thinking + if isinstance(sub, dict) and sub.get("type") == "text" + ] + content_str = "\n".join(text_parts) + else: # Fallback + content_str = str(thinking) + parts.append({"type": "reasoning", "content": content_str}) + elif chunk_type == "image_url": + url = chunk.get("image_url", {}) + uri = url.get("url", "") if isinstance(url, dict) else str(url) + parts.append({"type": "uri", "modality": "image", "uri": uri}) + else: + # Catch-all for other content chunk types + parts.append({"type": chunk_type}) + return parts + + +def _tool_calls_to_parts(tool_calls: list[dict] | None) -> list[dict]: + """Convert Mistral tool_calls to OTEL ToolCallRequestPart entries.""" + if not tool_calls: + return [] + parts = [] + for tc in tool_calls: + func = tc.get("function", {}) or {} + part: dict = { + "type": "tool_call", + "name": func.get("name", ""), + } + if (tc_id := tc.get("id")) is not None: + part["id"] = tc_id + if (arguments := func.get("arguments")) is not None: + part["arguments"] = arguments + parts.append(part) + return parts + + +def serialize_input_message(message: dict[str, Any]) -> str: + """Serialize a single input message per the OTEL GenAI convention. + + Schema: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-input-messages.json + ChatMessage: {role (required), parts (required), name?} + + Conversation entry objects (e.g. function.result) don't carry a "role" + field — they are detected via their "type" and mapped to the closest + OTEL role. + """ + entry_type = message.get("type") + + # Conversation entry: function.result → OTEL tool role + if entry_type == "function.result": + part: dict = {"type": "tool_call_response", "response": message.get("result")} + if (tool_call_id := message.get("tool_call_id")) is not None: + part["id"] = tool_call_id + return json.dumps({"role": "tool", "parts": [part]}) + + # TODO: may need to handle other types for conversations (e.g. agent handoff) + + role = message.get("role", "unknown") + parts: list[dict] = [] + + if role == "tool": + # Tool messages are responses to tool calls + tool_part: dict = { + "type": "tool_call_response", + "response": message.get("content"), + } + if (tool_call_id := message.get("tool_call_id")) is not None: + tool_part["id"] = tool_call_id + parts.append(tool_part) + else: + parts.extend(_content_to_parts(message.get("content"))) + parts.extend(_tool_calls_to_parts(message.get("tool_calls"))) + + return json.dumps({"role": role, "parts": parts}) + + +def serialize_output_message(choice: dict[str, Any]) -> str: + """Serialize a single output choice/message per the OTEL GenAI convention. + + Schema: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-output-messages.json + OutputMessage: {role (required), parts (required), finish_reason (required), name?} + """ + message = choice.get("message", {}) or {} + parts: list[dict] = [] + parts.extend(_content_to_parts(message.get("content"))) + parts.extend(_tool_calls_to_parts(message.get("tool_calls"))) + + return json.dumps( + { + "role": message.get("role", "assistant"), + "parts": parts, + "finish_reason": choice.get("finish_reason", ""), + } + ) + + +def serialize_tool_definition(tool: dict[str, Any]) -> str | None: + """Flatten a Mistral tool definition to the OTEL GenAI convention schema. + + Mistral format: {"type": "function", "function": {"name": ..., "description": ..., "parameters": ...}} + OTEL format: {"type": "function", "name": ..., "description": ..., "parameters": ...} + + Schema, still under review: https://github.com/Cirilla-zmh/semantic-conventions/blob/cc4d07e7e56b80e9aa5904a3d524c134699da37f/docs/gen-ai/gen-ai-tool-definitions.json + """ + # Early exit conditions: only functions supported for now, and name is required + type = tool.get("type", "function") + func = tool.get("function") + if not func: + return None + name = func.get("name") + if not name: + return None + serialized: dict = {"type": type, "name": name} + if (description := func.get("description")) is not None: + serialized["description"] = description + if (parameters := func.get("parameters")) is not None: + serialized["parameters"] = parameters + return json.dumps(serialized) diff --git a/src/mistralai/extra/observability/streaming.py b/src/mistralai/extra/observability/streaming.py new file mode 100644 index 00000000..3eb9423a --- /dev/null +++ b/src/mistralai/extra/observability/streaming.py @@ -0,0 +1,98 @@ +"""Streaming response helpers for OTEL tracing. + +Pure functions that parse SSE byte streams and accumulate CompletionChunk +deltas into a ChatCompletionResponse-shaped dict suitable for span enrichment. + +TODO: supports chat and agent completion streaming endpoints. Evolutions will +be necessary to support other streaming endpoints (e.g. conversations). + +NOTE: The SSE bytes are re-parsed here even though EventStream already +parsed them during iteration. +TracedResponse sits below EventStream and can only accumulate raw bytes; it +has no access to the decoded events. Hooking into EventStream could eliminate +this double-parse, but EventStream is Speakeasy-generated code. +""" + +from typing import Any + +from mistralai.client.models import CompletionChunk, UsageInfo + + +def parse_sse_chunks(raw_sse_bytes: bytes) -> list[CompletionChunk]: + """Parse raw SSE bytes into a list of typed CompletionChunk models. + + Only CompletionChunk is handled. If new SSE-streamed response types + are added, parsing and typing here will need updating. + """ + chunks: list[CompletionChunk] = [] + text = raw_sse_bytes.decode("utf-8", errors="replace") + for line in text.split("\n"): + line = line.strip() + if not line.startswith("data: "): + continue + payload = line[6:] + if payload == "[DONE]": + continue + try: + chunks.append(CompletionChunk.model_validate_json(payload)) + except Exception: + continue + return chunks + + +def accumulate_chunks_to_response_dict( + chunks: list[CompletionChunk], +) -> dict[str, Any]: + """Accumulate streaming CompletionChunk deltas into a ChatCompletionResponse-shaped dict.""" + response_id: str | None = None + model: str | None = None + usage: UsageInfo | None = None + choices: dict[int, dict[str, Any]] = {} + + for chunk in chunks: + response_id = response_id or chunk.id + model = model or chunk.model + usage = usage or chunk.usage + + for choice in chunk.choices: + accumulated = choices.setdefault( + choice.index, + { + "message": {"role": "assistant", "content": ""}, + "finish_reason": "", + }, + ) + msg = accumulated["message"] + delta = choice.delta + if isinstance(delta.role, str): + msg["role"] = delta.role + if isinstance(delta.content, str) and delta.content: + msg["content"] += delta.content + if isinstance(choice.finish_reason, str): + accumulated["finish_reason"] = choice.finish_reason + if isinstance(delta.tool_calls, list): + tc_list = msg.setdefault("tool_calls", []) + for tc in delta.tool_calls: + tc_idx = tc.index if tc.index is not None else len(tc_list) + while len(tc_list) <= tc_idx: + tc_list.append( + {"id": None, "function": {"name": "", "arguments": ""}} + ) + # ToolCall.id defaults to the string "null" (Speakeasy codegen quirk) + if tc.id is not None and tc.id != "null": + tc_list[tc_idx]["id"] = tc.id + if tc.function.name: + tc_list[tc_idx]["function"]["name"] += tc.function.name + if isinstance(tc.function.arguments, str) and tc.function.arguments: + tc_list[tc_idx]["function"]["arguments"] += ( + tc.function.arguments + ) + + result: dict[str, Any] = { + "id": response_id, + "model": model, + "choices": [choices[idx] for idx in sorted(choices)], + } + if usage is not None: + result["usage"] = usage.model_dump(mode="json", by_alias=True) + return result diff --git a/src/mistralai/extra/run/tools.py b/src/mistralai/extra/run/tools.py index 18c1d3dd..95dc21a9 100644 --- a/src/mistralai/extra/run/tools.py +++ b/src/mistralai/extra/run/tools.py @@ -8,26 +8,28 @@ import opentelemetry.semconv._incubating.attributes.gen_ai_attributes as gen_ai_attributes from griffe import ( Docstring, - DocstringSectionKind, - DocstringSectionText, DocstringParameter, DocstringSection, + DocstringSectionKind, + DocstringSectionText, ) from opentelemetry import trace +from opentelemetry.trace import Status, StatusCode from pydantic import Field, create_model from pydantic.fields import FieldInfo -from mistralai.extra.exceptions import RunException -from mistralai.extra.mcp.base import MCPClientProtocol -from mistralai.extra.observability.otel import GenAISpanEnum, MistralAIAttributes, set_available_attributes -from mistralai.extra.run.result import RunOutputEntries from mistralai.client.models import ( - FunctionResultEntry, - FunctionTool, Function, FunctionCallEntry, + FunctionResultEntry, + FunctionTool, ) - +from mistralai.extra.exceptions import RunException +from mistralai.extra.mcp.base import MCPClientProtocol +from mistralai.extra.observability.otel import ( + set_available_attributes, +) +from mistralai.extra.run.result import RunOutputEntries logger = logging.getLogger(__name__) @@ -193,22 +195,35 @@ async def create_function_result( else function_call.arguments ) tracer = trace.get_tracer(__name__) - with tracer.start_as_current_span(GenAISpanEnum.function_call(function_call.name)) as span: + with tracer.start_as_current_span( + f"{gen_ai_attributes.GenAiOperationNameValues.EXECUTE_TOOL.value} {function_call.name}" + ) as span: + # Always record identity attributes so the span is useful even on error + function_call_attributes = { + gen_ai_attributes.GEN_AI_OPERATION_NAME: gen_ai_attributes.GenAiOperationNameValues.EXECUTE_TOOL.value, + gen_ai_attributes.GEN_AI_PROVIDER_NAME: gen_ai_attributes.GenAiProviderNameValues.MISTRAL_AI.value, + gen_ai_attributes.GEN_AI_TOOL_CALL_ID: function_call.id, + gen_ai_attributes.GEN_AI_TOOL_CALL_ARGUMENTS: function_call.arguments + if isinstance(function_call.arguments, str) + else json.dumps(function_call.arguments), + gen_ai_attributes.GEN_AI_TOOL_NAME: function_call.name, + gen_ai_attributes.GEN_AI_TOOL_TYPE: "function", + } + set_available_attributes(span, function_call_attributes) try: if isinstance(run_tool, RunFunction): res = run_tool.callable(**arguments) elif isinstance(run_tool, RunCoroutine): res = await run_tool.awaitable(**arguments) elif isinstance(run_tool, RunMCPTool): - res = await run_tool.mcp_client.execute_tool(function_call.name, arguments) - function_call_attributes = { - gen_ai_attributes.GEN_AI_OPERATION_NAME: gen_ai_attributes.GenAiOperationNameValues.EXECUTE_TOOL.value, - gen_ai_attributes.GEN_AI_TOOL_CALL_ID: function_call.id, - MistralAIAttributes.MISTRAL_AI_TOOL_CALL_ARGUMENTS: str(function_call.arguments), - gen_ai_attributes.GEN_AI_TOOL_NAME: function_call.name - } - set_available_attributes(span, function_call_attributes) + res = await run_tool.mcp_client.execute_tool( + function_call.name, arguments + ) + result_str = res if isinstance(res, str) else json.dumps(res) + span.set_attribute(gen_ai_attributes.GEN_AI_TOOL_CALL_RESULT, result_str) except Exception as e: + span.record_exception(e) + span.set_status(Status(StatusCode.ERROR, str(e))) if continue_on_fn_error is True: return FunctionResultEntry( tool_call_id=function_call.tool_call_id, @@ -219,8 +234,7 @@ async def create_function_result( ) from e return FunctionResultEntry( - tool_call_id=function_call.tool_call_id, - result=res if isinstance(res, str) else json.dumps(res), + tool_call_id=function_call.tool_call_id, result=result_str ) diff --git a/src/mistralai/extra/tests/test_otel_tracing.py b/src/mistralai/extra/tests/test_otel_tracing.py new file mode 100644 index 00000000..1c78e5b1 --- /dev/null +++ b/src/mistralai/extra/tests/test_otel_tracing.py @@ -0,0 +1,1529 @@ +"""Tests for OTEL tracing instrumentation. + +Each test drives the real TracingHook lifecycle (before_request → after_success) +with realistic Mistral API payloads and verifies the resulting OTEL span attributes +match GenAI semantic conventions. + +Fixtures are defined inline using SDK model classes so each test is self-contained. +""" + +# pyright: reportOptionalSubscript=false +# pyright: reportOptionalMemberAccess=false +# pyright: reportArgumentType=false + +import asyncio +import json +import unittest +from datetime import datetime, timezone +from unittest.mock import MagicMock + +import httpx +from opentelemetry import trace +from opentelemetry.sdk.trace import TracerProvider +from opentelemetry.sdk.trace.export import SimpleSpanProcessor +from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter +from opentelemetry.trace import StatusCode + +from mistralai.client._hooks.tracing import TracingHook +from mistralai.client._hooks.types import ( + AfterErrorContext, + AfterSuccessContext, + BeforeRequestContext, + HookContext, +) +from mistralai.client.models import ( + Agent, + AgentsCompletionRequest, + AssistantMessage, + ChatCompletionChoice, + ChatCompletionRequest, + ChatCompletionResponse, + CompletionChunk, + CompletionEvent, + CompletionResponseStreamChoice, + ConversationAppendRequest, + ConversationRequest, + ConversationResponse, + ConversationUsageInfo, + CreateAgentRequest, + DeltaMessage, + EmbeddingRequest, + EmbeddingResponse, + EmbeddingResponseData, + Function, + FunctionCall, + FunctionCallEntry, + FunctionResultEntry, + FunctionTool, + ImageURL, + ImageURLChunk, + MessageOutputEntry, + SystemMessage, + TextChunk, + ThinkChunk, + Tool, + ToolCall, + ToolExecutionEntry, + ToolMessage, + UsageInfo, + UserMessage, +) +from mistralai.extra.observability.otel import TracedResponse +from mistralai.extra.run.tools import ( + RunFunction, + create_function_result, +) + +# Set up a single TracerProvider for the entire test module. +# trace.set_tracer_provider() can only be called once per process. +_EXPORTER = InMemorySpanExporter() +_PROVIDER = TracerProvider() +_PROVIDER.add_span_processor(SimpleSpanProcessor(_EXPORTER)) +trace.set_tracer_provider(_PROVIDER) + + +# -- Helpers ------------------------------------------------------------------- + + +def _make_httpx_request( + body: dict, + method: str = "POST", + url: str = "https://api.mistral.ai/v1/chat/completions", +) -> httpx.Request: + return httpx.Request( + method=method, + url=url, + content=json.dumps(body).encode(), + headers={"host": "api.mistral.ai", "content-type": "application/json"}, + ) + + +def _make_httpx_response(body: dict, status_code: int = 200) -> httpx.Response: + resp = httpx.Response( + status_code=status_code, + content=json.dumps(body).encode(), + ) + # Mark the response as closed/consumed so it's treated as non-streaming + resp.stream = httpx.ByteStream(resp.content) + resp.stream.close() + return resp + + +def _make_hook_context(operation_id: str) -> HookContext: + return HookContext( + config=MagicMock(), + base_url="https://api.mistral.ai", + operation_id=operation_id, + oauth2_scopes=None, + security_source=None, + ) + + +def _dump(model) -> dict: + """Serialize an SDK model to a JSON-compatible dict, matching wire format.""" + return model.model_dump(mode="json", by_alias=True) + + +def _build_sse_body(events: list[CompletionEvent]) -> bytes: + """Serialize a list of CompletionEvent models into an SSE byte payload.""" + lines = [f"data: {json.dumps(_dump(e.data))}" for e in events] + lines.append("data: [DONE]") + return ("\n\n".join(lines) + "\n\n").encode() + + +def _make_streaming_httpx_response(sse_body: bytes) -> httpx.Response: + """Create an *open* httpx.Response that simulates a streaming SSE response.""" + return httpx.Response( + status_code=200, + stream=httpx.ByteStream(sse_body), + ) + + +def _parse_json_list(span_attr): + """Parse a span attribute containing a list of JSON-encoded strings.""" + return [json.loads(m) for m in span_attr] + + +# -- Tests --------------------------------------------------------------------- + + +class TestOtelTracing(unittest.TestCase): + def setUp(self): + _EXPORTER.clear() + + # -- Test helpers ---------------------------------------------------------- + + def _run_hook_lifecycle( + self, + operation_id: str, + request_body, + response_body, + streaming: bool = False, + ): + """Drive the real TracingHook: before_request → after_success. + + ``request_body`` and ``response_body`` can be SDK model instances or + plain dicts. Models are serialised via ``_dump()`` automatically. + + When ``streaming=True``, ``response_body`` must be a + ``list[CompletionEvent]``. The helper builds an SSE byte payload, + creates an open streaming response, and consumes + closes the stream + so the span is finalised before returning. + """ + hook = TracingHook() + hook_ctx = _make_hook_context(operation_id) + + req_dict = ( + _dump(request_body) if hasattr(request_body, "model_dump") else request_body + ) + + request = _make_httpx_request(req_dict) + + if streaming: + sse_body = _build_sse_body(response_body) + response = _make_streaming_httpx_response(sse_body) + else: + resp_dict = ( + _dump(response_body) + if hasattr(response_body, "model_dump") + else response_body + ) + response = _make_httpx_response(resp_dict) + + hooked_request = hook.before_request(BeforeRequestContext(hook_ctx), request) + self.assertNotIsInstance(hooked_request, Exception) + assert isinstance(hooked_request, httpx.Request) + + result = hook.after_success(AfterSuccessContext(hook_ctx), response) + self.assertNotIsInstance(result, Exception) + + if streaming: + self.assertIsInstance(result, TracedResponse) + assert isinstance(result, TracedResponse) + for _chunk in result.iter_bytes(): + pass + result.close() + + def _run_hook_error_lifecycle( + self, + operation_id: str, + request_body, + response_body: dict, + status_code: int = 400, + error: Exception | None = None, + ): + """Drive the real TracingHook: before_request → after_error.""" + hook = TracingHook() + hook_ctx = _make_hook_context(operation_id) + + req_dict = ( + _dump(request_body) if hasattr(request_body, "model_dump") else request_body + ) + request = _make_httpx_request(req_dict) + response = _make_httpx_response(response_body, status_code=status_code) + + hooked_request = hook.before_request(BeforeRequestContext(hook_ctx), request) + self.assertNotIsInstance(hooked_request, Exception) + assert isinstance(hooked_request, httpx.Request) + + result = hook.after_error(AfterErrorContext(hook_ctx), response, error) + self.assertNotIsInstance(result, Exception) + + def _get_finished_spans(self): + return _EXPORTER.get_finished_spans() + + def _get_single_span(self): + spans = self._get_finished_spans() + self.assertEqual(len(spans), 1, f"Expected 1 span, got {len(spans)}") + return spans[0] + + def assertSpanAttributes(self, span, expected: dict): + """Assert that *expected* is a subset of *span.attributes*.""" + actual = {k: span.attributes[k] for k in expected} + self.assertEqual(expected, actual) + + # -- Simple chat completion ------------------------------------------------ + + def test_simple_chat_completion(self): + request = ChatCompletionRequest( + model="mistral-large-latest", + temperature=0.7, + top_p=1, + max_tokens=512, + messages=[ + SystemMessage(content="You are a helpful assistant."), + UserMessage(content="What is the best French cheese?"), + ], + ) + response = ChatCompletionResponse( + id="cmpl-a1b2c3d4e5f6", + object="chat.completion", + model="mistral-large-latest", + created=1700000000, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage( + content="There are many great French cheeses! Camembert, Roquefort, and Brie are among the most celebrated.", + tool_calls=None, + ), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=20, completion_tokens=25, total_tokens=45), + ) + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + span = self._get_single_span() + + self.assertEqual(span.name, "chat mistral-large-latest") + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "chat", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.request.model": "mistral-large-latest", + "gen_ai.request.temperature": 0.7, + "gen_ai.request.top_p": 1, + "gen_ai.request.max_tokens": 512, + "http.request.method": "POST", + "server.address": "api.mistral.ai", + "server.port": 443, + "http.response.status_code": 200, + "gen_ai.response.id": "cmpl-a1b2c3d4e5f6", + "gen_ai.response.model": "mistral-large-latest", + "gen_ai.response.finish_reasons": ("stop",), + "gen_ai.usage.input_tokens": 20, + "gen_ai.usage.output_tokens": 25, + }, + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.input.messages"]), + [ + { + "role": "system", + "parts": [ + {"type": "text", "content": "You are a helpful assistant."} + ], + }, + { + "role": "user", + "parts": [ + {"type": "text", "content": "What is the best French cheese?"} + ], + }, + ], + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + { + "type": "text", + "content": "There are many great French cheeses! Camembert, Roquefort, and Brie are among the most celebrated.", + } + ], + "finish_reason": "stop", + }, + ], + ) + + # -- Chat completion with tool calls --------------------------------------- + + def test_chat_completion_with_tool_calls(self): + request = ChatCompletionRequest( + model="mistral-large-latest", + messages=[ + UserMessage(content="What's the weather in Paris?"), + ], + tools=[ + Tool( + type="function", + function=Function( + name="get_weather", + description="Get the current weather in a given location", + parameters={ + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "City name", + }, + }, + "required": ["location"], + }, + ), + ), + ], + tool_choice="auto", + ) + response = ChatCompletionResponse( + id="cmpl-tool-001", + object="chat.completion", + model="mistral-large-latest", + created=1700000001, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage( + content="", + tool_calls=[ + ToolCall( + id="call_abc123", + function=FunctionCall( + name="get_weather", + arguments='{"location": "Paris"}', + ), + ), + ], + ), + finish_reason="tool_calls", + ), + ], + usage=UsageInfo(prompt_tokens=30, completion_tokens=15, total_tokens=45), + ) + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + span = self._get_single_span() + + self.assertEqual(span.name, "chat mistral-large-latest") + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "chat", + "gen_ai.response.finish_reasons": ("tool_calls",), + "gen_ai.usage.input_tokens": 30, + "gen_ai.usage.output_tokens": 15, + }, + ) + + # Tool definitions in request + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.tool.definitions"]), + [ + { + "type": "function", + "name": "get_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": {"type": "string", "description": "City name"} + }, + "required": ["location"], + }, + }, + ], + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.input.messages"]), + [ + { + "role": "user", + "parts": [ + {"type": "text", "content": "What's the weather in Paris?"} + ], + }, + ], + ) + + # Output messages — assistant with tool call and empty text content + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + {"type": "text", "content": ""}, + { + "type": "tool_call", + "name": "get_weather", + "id": "call_abc123", + "arguments": '{"location": "Paris"}', + }, + ], + "finish_reason": "tool_calls", + }, + ], + ) + + # -- Embeddings ------------------------------------------------------------ + + def test_embeddings(self): + request = EmbeddingRequest( + model="mistral-embed", + inputs=["What is the best French cheese?"], + ) + response = EmbeddingResponse( + id="emb-a1b2c3", + object="list", + model="mistral-embed", + data=[ + EmbeddingResponseData( + object="embedding", embedding=[0.1, 0.2, 0.3], index=0 + ) + ], + usage=UsageInfo(prompt_tokens=10, completion_tokens=0, total_tokens=10), + ) + + self._run_hook_lifecycle( + "embeddings_v1_embeddings_post", + request, + response, + ) + span = self._get_single_span() + + self.assertEqual(span.name, "embeddings mistral-embed") + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "embeddings", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.request.model": "mistral-embed", + "gen_ai.response.id": "emb-a1b2c3", + "gen_ai.response.model": "mistral-embed", + "gen_ai.usage.input_tokens": 10, + }, + ) + + # Embeddings have no messages or choices + self.assertNotIn("gen_ai.input.messages", span.attributes) + self.assertNotIn("gen_ai.output.messages", span.attributes) + self.assertNotIn("gen_ai.response.finish_reasons", span.attributes) + + # -- Create agent ---------------------------------------------------------- + + def test_create_agent(self): + request = CreateAgentRequest( + model="mistral-large-latest", + name="my-test-agent", + description="A helpful test agent", + instructions="You are a helpful test assistant. Be concise.", + tools=[ + FunctionTool( + function=Function( + name="get_weather", + description="Get weather", + parameters={ + "type": "object", + "properties": {"location": {"type": "string"}}, + }, + ), + ), + ], + ) + response = Agent( + id="agent-xyz-789", + object="agent", + model="mistral-large-latest", + name="my-test-agent", + version=0, + versions=[], + description="A helpful test agent", + instructions="You are a helpful test assistant. Be concise.", + tools=[], + created_at=datetime(2024, 6, 1, 12, 0, 0, tzinfo=timezone.utc), + updated_at=datetime(2024, 6, 1, 12, 0, 0, tzinfo=timezone.utc), + deployment_chat=False, + source="api", + ) + + self._run_hook_lifecycle( + "agents_api_v1_agents_create", + request, + response, + ) + span = self._get_single_span() + + self.assertEqual(span.name, "create_agent my-test-agent") + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "create_agent", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.agent.id": "agent-xyz-789", + "gen_ai.agent.name": "my-test-agent", + "gen_ai.agent.description": "A helpful test agent", + "gen_ai.system_instructions": "You are a helpful test assistant. Be concise.", + "gen_ai.agent.version": "0", + "gen_ai.request.model": "mistral-large-latest", + }, + ) + + # response.id should NOT be set (id means agent id for create_agent) + self.assertNotIn("gen_ai.response.id", span.attributes) + + # -- Agent completion (via /v1/agents/completions) ------------------------- + + def test_agent_completion(self): + request = AgentsCompletionRequest( + agent_id="agent-xyz-789", + messages=[ + UserMessage(content="What's the weather in Paris?"), + ], + max_tokens=1024, + ) + response = ChatCompletionResponse( + id="cmpl-agent-001", + object="chat.completion", + model="mistral-large-latest", + created=1700000002, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage( + content="It's sunny and 22C in Paris today.", + tool_calls=None, + ), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=40, completion_tokens=12, total_tokens=52), + ) + + self._run_hook_lifecycle( + "agents_completion_v1_agents_completions_post", + request, + response, + ) + span = self._get_single_span() + + # Span name — no agent name in request body, falls back to op name + self.assertEqual(span.name, "invoke_agent") + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "invoke_agent", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.response.id": "cmpl-agent-001", + "gen_ai.response.model": "mistral-large-latest", + "gen_ai.response.finish_reasons": ("stop",), + "gen_ai.usage.input_tokens": 40, + "gen_ai.usage.output_tokens": 12, + }, + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.input.messages"]), + [ + { + "role": "user", + "parts": [ + {"type": "text", "content": "What's the weather in Paris?"} + ], + }, + ], + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + { + "type": "text", + "content": "It's sunny and 22C in Paris today.", + } + ], + "finish_reason": "stop", + }, + ], + ) + + # -- Conversation start (via /v1/conversations) ---------------------------- + + def test_conversation_start(self): + request = ConversationRequest( + agent_id="agent-xyz-789", + inputs="What's the weather in Paris?", + ) + response = ConversationResponse( + conversation_id="conv-001", + object="conversation.response", + usage=ConversationUsageInfo( + prompt_tokens=15, completion_tokens=10, total_tokens=25 + ), + outputs=[ + ToolExecutionEntry( + name="get_weather", + arguments='{"location": "Paris"}', + id="tool-exec-001", + info={"temperature": "22C", "condition": "sunny"}, + created_at=datetime(2024, 6, 1, 12, 0, 0, tzinfo=timezone.utc), + completed_at=datetime(2024, 6, 1, 12, 0, 1, tzinfo=timezone.utc), + ), + MessageOutputEntry( + id="msg-out-001", + role="assistant", + content="It's sunny and 22C in Paris today.", + model="mistral-large-latest", + agent_id="agent-xyz-789", + created_at=datetime(2024, 6, 1, 12, 0, 1, tzinfo=timezone.utc), + completed_at=datetime(2024, 6, 1, 12, 0, 2, tzinfo=timezone.utc), + ), + ], + ) + + self._run_hook_lifecycle( + "agents_api_v1_conversations_start", + request, + response, + ) + spans = self._get_finished_spans() + + # Parent span + 2 child spans (tool execution + message output) + self.assertEqual(len(spans), 3, f"Expected 3 spans, got {len(spans)}") + + # Identify spans by operation name + parent = None + tool_span = None + message_span = None + for s in spans: + op = s.attributes.get("gen_ai.operation.name") + if op == "invoke_agent": + parent = s + elif op == "execute_tool": + tool_span = s + elif op == "chat": + message_span = s + + self.assertIsNotNone(parent, "Missing invoke_agent parent span") + self.assertIsNotNone(tool_span, "Missing execute_tool child span") + self.assertIsNotNone(message_span, "Missing chat child span") + + # Parent span + self.assertSpanAttributes( + parent, + { + "gen_ai.operation.name": "invoke_agent", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.conversation.id": "conv-001", + "gen_ai.usage.input_tokens": 15, + "gen_ai.usage.output_tokens": 10, + }, + ) + + self.assertListEqual( + _parse_json_list(parent.attributes["gen_ai.input.messages"]), + [ + { + "role": "user", + "parts": [ + {"type": "text", "content": "What's the weather in Paris?"} + ], + }, + ], + ) + + # Parent span should NOT have output messages (they belong on child spans) + self.assertNotIn("gen_ai.output.messages", parent.attributes) + + # Tool execution child span + self.assertEqual(tool_span.name, "execute_tool get_weather") + self.assertSpanAttributes( + tool_span, + { + "gen_ai.operation.name": "execute_tool", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.tool.name": "get_weather", + "gen_ai.tool.call.id": "tool-exec-001", + "gen_ai.tool.call.arguments": '{"location": "Paris"}', + "gen_ai.tool.type": "extension", + }, + ) + self.assertEqual( + json.loads(tool_span.attributes["gen_ai.tool.call.result"]), + {"temperature": "22C", "condition": "sunny"}, + ) + self.assertEqual(tool_span.parent.span_id, parent.context.span_id) + + # Message output child span + self.assertEqual(message_span.name, "chat mistral-large-latest") + self.assertSpanAttributes( + message_span, + { + "gen_ai.operation.name": "chat", + "gen_ai.response.id": "msg-out-001", + "gen_ai.agent.id": "agent-xyz-789", + "gen_ai.response.model": "mistral-large-latest", + }, + ) + self.assertEqual(message_span.parent.span_id, parent.context.span_id) + + self.assertListEqual( + _parse_json_list(message_span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + { + "type": "text", + "content": "It's sunny and 22C in Paris today.", + } + ], + "finish_reason": "", + }, + ], + ) + + # -- Conversation append --------------------------------------------------- + + def test_conversation_append_with_function_results(self): + """Conversation append with FunctionResultEntry inputs must serialize them as tool messages.""" + request = ConversationAppendRequest( + inputs=[ + FunctionResultEntry( + tool_call_id="tc-001", + result='{"status": "Completed"}', + ), + FunctionResultEntry( + tool_call_id="tc-002", + result='{"date": "2021-10-05"}', + ), + ], + ) + response = ConversationResponse( + conversation_id="conv-001", + object="conversation.response", + usage=ConversationUsageInfo( + prompt_tokens=20, completion_tokens=15, total_tokens=35 + ), + outputs=[ + MessageOutputEntry( + id="msg-out-002", + role="assistant", + content="Transaction T1001 was completed on 2021-10-05.", + model="mistral-large-latest", + agent_id="agent-xyz-789", + created_at=datetime(2024, 6, 1, 12, 1, 0, tzinfo=timezone.utc), + completed_at=datetime(2024, 6, 1, 12, 1, 1, tzinfo=timezone.utc), + ), + ], + ) + + self._run_hook_lifecycle( + "agents_api_v1_conversations_append", + _dump(request), + _dump(response), + ) + spans = self._get_finished_spans() + + # Parent span + 1 child span (message output) + self.assertEqual(len(spans), 2, f"Expected 2 spans, got {len(spans)}") + + parent = None + message_span = None + for s in spans: + op = s.attributes.get("gen_ai.operation.name") + if op == "invoke_agent" and s.parent is None: + parent = s + elif op == "chat": + message_span = s + + self.assertIsNotNone(parent, "Missing invoke_agent parent span") + self.assertIsNotNone(message_span, "Missing chat child span") + + # Parent span — input messages must contain the function results + self.assertListEqual( + _parse_json_list(parent.attributes["gen_ai.input.messages"]), + [ + { + "role": "tool", + "parts": [ + { + "type": "tool_call_response", + "response": '{"status": "Completed"}', + "id": "tc-001", + }, + ], + }, + { + "role": "tool", + "parts": [ + { + "type": "tool_call_response", + "response": '{"date": "2021-10-05"}', + "id": "tc-002", + }, + ], + }, + ], + ) + + # -- Non-GenAI operation --------------------------------------------------- + + def test_non_genai_operation(self): + self._run_hook_lifecycle( + "files_api_routes_upload_file", + {"file": "data"}, + {"id": "file-123", "object": "file"}, + ) + span = self._get_single_span() + self.assertNotIn("gen_ai.operation.name", span.attributes) + self.assertNotIn("gen_ai.provider.name", span.attributes) + self.assertEqual(span.attributes["http.request.method"], "POST") + + # -- Multi-turn tool use --------------------------------------------------- + + def test_multi_turn_tool_use(self): + """Full tool-use loop: user → assistant(tool_calls) → tool(result) → assistant(final). + + Tests that all message roles are serialised correctly in + gen_ai.input.messages, including the tool_call_response part for + role="tool" and the tool_call parts for role="assistant". + """ + request = ChatCompletionRequest( + model="mistral-small-latest", + max_tokens=64, + messages=[ + UserMessage(content="What is the weather in Paris?"), + AssistantMessage( + content="", + tool_calls=[ + ToolCall( + id="7SXIeh1Ie", + function=FunctionCall( + name="get_weather", + arguments='{"location": "Paris"}', + ), + ), + ], + ), + ToolMessage( + name="get_weather", + content="22C, sunny", + tool_call_id="7SXIeh1Ie", + ), + ], + tools=[ + Tool( + type="function", + function=Function( + name="get_weather", + description="Get the current weather in a given location", + parameters={ + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "City name", + }, + }, + "required": ["location"], + }, + ), + ), + ], + ) + response = ChatCompletionResponse( + id="cmpl-multiturn-001", + object="chat.completion", + model="mistral-small-latest", + created=1700000003, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage( + content="The weather in Paris is currently 22°C and sunny.", + tool_calls=None, + ), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=115, completion_tokens=14, total_tokens=129), + ) + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + span = self._get_single_span() + + self.assertEqual(span.name, "chat mistral-small-latest") + self.assertSpanAttributes( + span, + { + "gen_ai.usage.input_tokens": 115, + "gen_ai.usage.output_tokens": 14, + }, + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.input.messages"]), + [ + { + "role": "user", + "parts": [ + {"type": "text", "content": "What is the weather in Paris?"} + ], + }, + { + "role": "assistant", + "parts": [ + {"type": "text", "content": ""}, + { + "type": "tool_call", + "name": "get_weather", + "id": "7SXIeh1Ie", + "arguments": '{"location": "Paris"}', + }, + ], + }, + { + "role": "tool", + "parts": [ + { + "type": "tool_call_response", + "response": "22C, sunny", + "id": "7SXIeh1Ie", + }, + ], + }, + ], + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + { + "type": "text", + "content": "The weather in Paris is currently 22°C and sunny.", + } + ], + "finish_reason": "stop", + }, + ], + ) + + # Tool definitions + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.tool.definitions"]), + [ + { + "type": "function", + "name": "get_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": {"type": "string", "description": "City name"} + }, + "required": ["location"], + }, + }, + ], + ) + + # -- Content chunks (multimodal) ------------------------------------------- + + def test_content_chunks_text_and_image(self): + """Request with content as array of chunks (text + image_url).""" + request = ChatCompletionRequest( + model="mistral-small-latest", + max_tokens=64, + messages=[ + UserMessage( + content=[ + TextChunk(text="Describe this image briefly"), + ImageURLChunk( + image_url=ImageURL( + url="https://example.com/image.jpg", + ), + ), + ], + ), + ], + ) + response = ChatCompletionResponse( + id="cmpl-vision-001", + object="chat.completion", + model="mistral-small-latest", + created=1700000004, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage( + content="The image shows a landscape.", + tool_calls=None, + ), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=96, completion_tokens=8, total_tokens=104), + ) + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + span = self._get_single_span() + + self.assertEqual(span.name, "chat mistral-small-latest") + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.input.messages"]), + [ + { + "role": "user", + "parts": [ + {"type": "text", "content": "Describe this image briefly"}, + { + "type": "uri", + "modality": "image", + "uri": "https://example.com/image.jpg", + }, + ], + }, + ], + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + {"type": "text", "content": "The image shows a landscape."} + ], + "finish_reason": "stop", + }, + ], + ) + + def test_content_chunks_thinking(self): + """Response with thinking content chunk. + + Tests the "thinking" → "reasoning" mapping in _content_to_parts. + """ + request = ChatCompletionRequest( + model="magistral-small-latest", + messages=[ + UserMessage(content="What is 15 * 37?"), + ], + ) + response = ChatCompletionResponse( + id="cmpl-think-001", + object="chat.completion", + model="magistral-small-latest", + created=1700000006, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage( + content=[ + ThinkChunk( + thinking=[ + TextChunk( + text="Let me calculate: 15 * 37 = 15 * 30 + 15 * 7 = 450 + 105 = 555" + ), + ], + ), + TextChunk(text="15 * 37 = 555"), + ], + ), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=10, completion_tokens=30, total_tokens=40), + ) + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + span = self._get_single_span() + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.input.messages"]), + [ + { + "role": "user", + "parts": [{"type": "text", "content": "What is 15 * 37?"}], + }, + ], + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + { + "type": "reasoning", + "content": "Let me calculate: 15 * 37 = 15 * 30 + 15 * 7 = 450 + 105 = 555", + }, + {"type": "text", "content": "15 * 37 = 555"}, + ], + "finish_reason": "stop", + }, + ], + ) + + # -- Multiple choices (n > 1) ---------------------------------------------- + + def test_multiple_choices(self): + """Response with multiple choices (n=2).""" + request = ChatCompletionRequest( + model="mistral-small-latest", + n=2, + max_tokens=32, + messages=[ + UserMessage(content="Tell me a joke"), + ], + ) + response = ChatCompletionResponse( + id="cmpl-multi-001", + object="chat.completion", + model="mistral-small-latest", + created=1700000005, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage( + content="Why did the chicken cross the road?", + tool_calls=None, + ), + finish_reason="stop", + ), + ChatCompletionChoice( + index=1, + message=AssistantMessage( + content="A programmer walks into a bar...", + tool_calls=None, + ), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=10, completion_tokens=20, total_tokens=30), + ) + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + span = self._get_single_span() + + self.assertEqual( + span.attributes["gen_ai.response.finish_reasons"], ("stop", "stop") + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.input.messages"]), + [ + { + "role": "user", + "parts": [{"type": "text", "content": "Tell me a joke"}], + }, + ], + ) + + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + { + "type": "text", + "content": "Why did the chicken cross the road?", + } + ], + "finish_reason": "stop", + }, + { + "role": "assistant", + "parts": [ + { + "type": "text", + "content": "A programmer walks into a bar...", + } + ], + "finish_reason": "stop", + }, + ], + ) + + # -- Error response -------------------------------------------------------- + + def test_error_response(self): + """API error response (object="error") via after_error hook.""" + + request = ChatCompletionRequest( + model="mistral-large-latest", + temperature=0.7, + top_p=1, + max_tokens=512, + messages=[ + SystemMessage(content="You are a helpful assistant."), + UserMessage(content="What is the best French cheese?"), + ], + ) + error_body = { + "object": "error", + "message": "Invalid model: nonexistent-model", + "type": "invalid_model", + "param": None, + "code": "1500", + } + + self._run_hook_error_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + error_body, + status_code=400, + error=Exception("Bad Request"), + ) + span = self._get_single_span() + + self.assertEqual(span.status.status_code, StatusCode.ERROR) + self.assertEqual(span.status.description, "Invalid model: nonexistent-model") + self.assertSpanAttributes( + span, + { + "error.type": "invalid_model", + "mistral_ai.error.code": "1500", + "http.response.status_code": 400, + }, + ) + + # Exception event per OTEL exception semantic conventions + exc_events = [e for e in span.events if e.name == "exception"] + self.assertEqual( + len(exc_events), 2 + ) # one from record_exception, one from API error body + api_error_event = exc_events[1] + self.assertEqual(api_error_event.attributes["exception.type"], "invalid_model") + self.assertEqual( + api_error_event.attributes["exception.message"], + "Invalid model: nonexistent-model", + ) + + # -- Streaming response ---------------------------------------------------- + + def test_streaming_chat_completion_enriches_span(self): + """Streaming responses must set the same response attributes as non-streaming. + + Simulates a realistic SSE stream with multiple CompletionEvent chunks: + - chunk 1: role + first content delta + - chunk 2: more content + - chunk 3: finish_reason + usage + - sentinel: [DONE] + + After consuming the stream and closing, the span must contain + gen_ai.response.id, gen_ai.response.model, gen_ai.usage.*, + gen_ai.response.finish_reasons, and gen_ai.output.messages. + """ + request = ChatCompletionRequest( + model="mistral-large-latest", + temperature=0.7, + max_tokens=512, + messages=[ + SystemMessage(content="You are a helpful assistant."), + UserMessage(content="What is the best French cheese?"), + ], + ) + response_events = [ + CompletionEvent( + data=CompletionChunk( + id="cmpl-stream-001", + model="mistral-large-latest", + object="chat.completion.chunk", + created=1700000000, + choices=[ + CompletionResponseStreamChoice( + index=0, + delta=DeltaMessage(role="assistant", content="Camembert"), + finish_reason=None, + ), + ], + ), + ), + CompletionEvent( + data=CompletionChunk( + id="cmpl-stream-001", + model="mistral-large-latest", + object="chat.completion.chunk", + created=1700000000, + choices=[ + CompletionResponseStreamChoice( + index=0, + delta=DeltaMessage(content=" is a classic choice."), + finish_reason=None, + ), + ], + ), + ), + CompletionEvent( + data=CompletionChunk( + id="cmpl-stream-001", + model="mistral-large-latest", + object="chat.completion.chunk", + created=1700000000, + choices=[ + CompletionResponseStreamChoice( + index=0, + delta=DeltaMessage(content=""), + finish_reason="stop", + ), + ], + usage=UsageInfo( + prompt_tokens=20, completion_tokens=8, total_tokens=28 + ), + ), + ), + ] + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response_events, + streaming=True, + ) + span = self._get_single_span() + + # Request-side attributes + self.assertEqual(span.name, "chat mistral-large-latest") + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "chat", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.request.model": "mistral-large-latest", + "gen_ai.request.temperature": 0.7, + "gen_ai.request.max_tokens": 512, + "gen_ai.response.id": "cmpl-stream-001", + "gen_ai.response.model": "mistral-large-latest", + "gen_ai.usage.input_tokens": 20, + "gen_ai.usage.output_tokens": 8, + "gen_ai.response.finish_reasons": ("stop",), + }, + ) + + # Output messages — accumulated from deltas + self.assertListEqual( + _parse_json_list(span.attributes["gen_ai.output.messages"]), + [ + { + "role": "assistant", + "parts": [ + { + "type": "text", + "content": "Camembert is a classic choice.", + } + ], + "finish_reason": "stop", + }, + ], + ) + + # -- create_function_result (client-side tool execution) ------------------- + + def test_create_function_result_span_attributes(self): + """create_function_result must emit an execute_tool span with all GenAI attributes.""" + + def get_weather(location: str) -> dict: + return {"temperature": "22C", "condition": "sunny"} + + function_call = FunctionCallEntry( + tool_call_id="tc-001", + name="get_weather", + arguments='{"location": "Paris"}', + id="fc-001", + ) + run_tool = RunFunction( + name="get_weather", + callable=get_weather, + tool=FunctionTool(function=Function(name="get_weather", parameters={})), + ) + + result = asyncio.get_event_loop().run_until_complete( + create_function_result(function_call, run_tool) + ) + self.assertEqual(result.tool_call_id, "tc-001") + + span = self._get_single_span() + + self.assertEqual(span.name, "execute_tool get_weather") + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "execute_tool", + "gen_ai.provider.name": "mistral_ai", + "gen_ai.tool.name": "get_weather", + "gen_ai.tool.call.id": "fc-001", + "gen_ai.tool.call.arguments": '{"location": "Paris"}', + "gen_ai.tool.type": "function", + }, + ) + self.assertEqual( + json.loads(span.attributes["gen_ai.tool.call.result"]), + {"temperature": "22C", "condition": "sunny"}, + ) + + def test_create_function_result_error_span(self): + """When the tool raises, the span must record the error and retain identity attributes.""" + + def failing_tool(x: int) -> str: + raise ValueError("boom") + + function_call = FunctionCallEntry( + tool_call_id="tc-err", + name="failing_tool", + arguments='{"x": 1}', + id="fc-err", + ) + run_tool = RunFunction( + name="failing_tool", + callable=failing_tool, + tool=FunctionTool(function=Function(name="failing_tool", parameters={})), + ) + + asyncio.get_event_loop().run_until_complete( + create_function_result(function_call, run_tool, continue_on_fn_error=True) + ) + + span = self._get_single_span() + + self.assertSpanAttributes( + span, + { + "gen_ai.operation.name": "execute_tool", + "gen_ai.tool.name": "failing_tool", + "gen_ai.tool.call.id": "fc-err", + }, + ) + # Result should NOT be present (tool didn't succeed) + self.assertNotIn("gen_ai.tool.call.result", span.attributes) + # Error status must be recorded + self.assertEqual(span.status.status_code, StatusCode.ERROR) + # Exception event must be recorded + self.assertTrue( + any(e.name == "exception" for e in span.events), + "Expected an exception event on the span", + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/mistralai/extra/tests/test_serialization.py b/src/mistralai/extra/tests/test_serialization.py new file mode 100644 index 00000000..3c88aa71 --- /dev/null +++ b/src/mistralai/extra/tests/test_serialization.py @@ -0,0 +1,447 @@ +"""Unit tests for the OTEL serialization helpers. + +Each test covers a single function with both happy-path and edge-case inputs. +The functions are pure (dict → str/list), so no OTEL setup is needed. +""" + +import json +import unittest + +from mistralai.extra.observability.serialization import ( + _content_to_parts, + _tool_calls_to_parts, + serialize_input_message, + serialize_output_message, + serialize_tool_definition, +) + + +def _parse(json_str: str): + """Shorthand: parse a JSON string returned by a serialize_* function.""" + return json.loads(json_str) + + +class TestContentToParts(unittest.TestCase): + def test_none(self): + self.assertEqual(_content_to_parts(None), []) + + def test_string(self): + self.assertEqual( + _content_to_parts("hello"), + [{"type": "text", "content": "hello"}], + ) + + def test_empty_string(self): + self.assertEqual( + _content_to_parts(""), + [{"type": "text", "content": ""}], + ) + + def test_empty_list(self): + self.assertEqual(_content_to_parts([]), []) + + def test_list_of_strings(self): + self.assertEqual( + _content_to_parts(["a", "b"]), + [ + {"type": "text", "content": "a"}, + {"type": "text", "content": "b"}, + ], + ) + + def test_text_chunk(self): + self.assertEqual( + _content_to_parts([{"type": "text", "text": "hello"}]), + [{"type": "text", "content": "hello"}], + ) + + def test_text_chunk_missing_text_field(self): + self.assertEqual( + _content_to_parts([{"type": "text"}]), + [{"type": "text", "content": ""}], + ) + + # -- thinking chunks ------------------------------------------------------- + + def test_thinking_chunk_with_sub_chunks(self): + chunk = { + "type": "thinking", + "thinking": [ + {"type": "text", "text": "step 1"}, + {"type": "text", "text": "step 2"}, + ], + } + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "reasoning", "content": "step 1\nstep 2"}], + ) + + def test_thinking_chunk_filters_non_text_sub_chunks(self): + chunk = { + "type": "thinking", + "thinking": [ + {"type": "text", "text": "kept"}, + {"type": "other", "text": "ignored"}, + "also ignored", + ], + } + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "reasoning", "content": "kept"}], + ) + + def test_thinking_chunk_fallback_plain_string(self): + chunk = {"type": "thinking", "thinking": "raw thought"} + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "reasoning", "content": "raw thought"}], + ) + + def test_thinking_chunk_missing_thinking_field(self): + """Empty string default → str("") fallback.""" + chunk = {"type": "thinking"} + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "reasoning", "content": ""}], + ) + + # -- image_url chunks ------------------------------------------------------ + + def test_image_url_chunk_dict(self): + chunk = {"type": "image_url", "image_url": {"url": "https://img.png"}} + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "uri", "modality": "image", "uri": "https://img.png"}], + ) + + def test_image_url_chunk_string_fallback(self): + chunk = {"type": "image_url", "image_url": "https://img.png"} + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "uri", "modality": "image", "uri": "https://img.png"}], + ) + + def test_image_url_chunk_missing_url(self): + chunk = {"type": "image_url", "image_url": {}} + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "uri", "modality": "image", "uri": ""}], + ) + + # -- unknown / catch-all --------------------------------------------------- + + def test_unknown_chunk_type(self): + chunk = {"type": "audio", "data": "..."} + self.assertEqual( + _content_to_parts([chunk]), + [{"type": "audio"}], + ) + + def test_mixed_chunk_types(self): + """Multiple chunk types in one content array.""" + parts = _content_to_parts( + [ + {"type": "text", "text": "look at this"}, + {"type": "image_url", "image_url": {"url": "https://img.png"}}, + "plain string", + ] + ) + self.assertListEqual( + parts, + [ + {"type": "text", "content": "look at this"}, + {"type": "uri", "modality": "image", "uri": "https://img.png"}, + {"type": "text", "content": "plain string"}, + ], + ) + + +class TestToolCallsToParts(unittest.TestCase): + def test_none(self): + self.assertEqual(_tool_calls_to_parts(None), []) + + def test_empty_list(self): + self.assertEqual(_tool_calls_to_parts([]), []) + + def test_full_tool_call(self): + tc = { + "id": "call_123", + "function": {"name": "get_weather", "arguments": '{"city": "Paris"}'}, + } + self.assertEqual( + _tool_calls_to_parts([tc]), + [ + { + "type": "tool_call", + "name": "get_weather", + "id": "call_123", + "arguments": '{"city": "Paris"}', + }, + ], + ) + + def test_missing_id(self): + tc = {"function": {"name": "f"}} + self.assertListEqual( + _tool_calls_to_parts([tc]), + [{"type": "tool_call", "name": "f"}], + ) + + def test_missing_arguments(self): + tc = {"id": "1", "function": {"name": "f"}} + self.assertListEqual( + _tool_calls_to_parts([tc]), + [{"type": "tool_call", "name": "f", "id": "1"}], + ) + + def test_missing_function(self): + """No function key → empty name.""" + tc = {"id": "1"} + self.assertListEqual( + _tool_calls_to_parts([tc]), + [{"type": "tool_call", "name": "", "id": "1"}], + ) + + def test_function_is_none(self): + tc = {"id": "1", "function": None} + self.assertListEqual( + _tool_calls_to_parts([tc]), + [{"type": "tool_call", "name": "", "id": "1"}], + ) + + +class TestSerializeInputMessage(unittest.TestCase): + # -- Happy paths (role-based messages) ------------------------------------ + + def test_user_message(self): + result = _parse(serialize_input_message({"role": "user", "content": "hi"})) + self.assertDictEqual( + result, + { + "role": "user", + "parts": [{"type": "text", "content": "hi"}], + }, + ) + + def test_system_message(self): + result = _parse( + serialize_input_message({"role": "system", "content": "be helpful"}) + ) + self.assertDictEqual( + result, + { + "role": "system", + "parts": [{"type": "text", "content": "be helpful"}], + }, + ) + + def test_assistant_message_with_tool_calls(self): + msg = { + "role": "assistant", + "content": "", + "tool_calls": [{"id": "tc1", "function": {"name": "f", "arguments": "{}"}}], + } + result = _parse(serialize_input_message(msg)) + self.assertEqual(result["role"], "assistant") + # text part from content + tool_call part + self.assertListEqual( + [p["type"] for p in result["parts"]], + ["text", "tool_call"], + ) + + def test_tool_message(self): + msg = {"role": "tool", "content": "22C sunny", "tool_call_id": "tc1"} + result = _parse(serialize_input_message(msg)) + self.assertDictEqual( + result, + { + "role": "tool", + "parts": [ + {"type": "tool_call_response", "response": "22C sunny", "id": "tc1"} + ], + }, + ) + + def test_tool_message_without_tool_call_id(self): + msg = {"role": "tool", "content": "result"} + result = _parse(serialize_input_message(msg)) + self.assertNotIn("id", result["parts"][0]) + + # -- Conversation entry: function.result ---------------------------------- + + def test_function_result_entry(self): + msg = { + "type": "function.result", + "result": '{"status": "ok"}', + "tool_call_id": "tc1", + } + result = _parse(serialize_input_message(msg)) + self.assertDictEqual( + result, + { + "role": "tool", + "parts": [ + { + "type": "tool_call_response", + "response": '{"status": "ok"}', + "id": "tc1", + } + ], + }, + ) + + def test_function_result_entry_without_tool_call_id(self): + msg = {"type": "function.result", "result": "data"} + result = _parse(serialize_input_message(msg)) + self.assertNotIn("id", result["parts"][0]) + + # -- Edge cases ----------------------------------------------------------- + + def test_missing_role_defaults_to_unknown(self): + result = _parse(serialize_input_message({"content": "orphan"})) + self.assertDictEqual( + result, + { + "role": "unknown", + "parts": [{"type": "text", "content": "orphan"}], + }, + ) + + def test_no_content_no_tool_calls(self): + result = _parse(serialize_input_message({"role": "user"})) + self.assertDictEqual(result, {"role": "user", "parts": []}) + + +class TestSerializeOutputMessage(unittest.TestCase): + def test_simple_assistant_response(self): + choice = { + "message": {"role": "assistant", "content": "hello"}, + "finish_reason": "stop", + } + result = _parse(serialize_output_message(choice)) + self.assertDictEqual( + result, + { + "role": "assistant", + "parts": [{"type": "text", "content": "hello"}], + "finish_reason": "stop", + }, + ) + + def test_tool_calls_response(self): + choice = { + "message": { + "role": "assistant", + "content": None, + "tool_calls": [ + {"id": "tc1", "function": {"name": "f", "arguments": "{}"}}, + ], + }, + "finish_reason": "tool_calls", + } + result = _parse(serialize_output_message(choice)) + self.assertEqual(result["finish_reason"], "tool_calls") + self.assertListEqual( + [p["type"] for p in result["parts"]], + ["tool_call"], + ) + + def test_missing_message(self): + result = _parse(serialize_output_message({})) + self.assertDictEqual( + result, + { + "role": "assistant", + "parts": [], + "finish_reason": "", + }, + ) + + def test_message_is_none(self): + result = _parse(serialize_output_message({"message": None})) + self.assertDictEqual( + result, + { + "role": "assistant", + "parts": [], + "finish_reason": "", + }, + ) + + def test_defaults_role_to_assistant(self): + choice = {"message": {"content": "hi"}, "finish_reason": "stop"} + result = _parse(serialize_output_message(choice)) + self.assertDictEqual( + result, + { + "role": "assistant", + "parts": [{"type": "text", "content": "hi"}], + "finish_reason": "stop", + }, + ) + + +class TestSerializeToolDefinition(unittest.TestCase): + def test_full_definition(self): + tool = { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get weather", + "parameters": {"type": "object", "properties": {}}, + }, + } + serialized = serialize_tool_definition(tool) + self.assertIsNotNone(serialized) + assert serialized is not None + self.assertDictEqual( + _parse(serialized), + { + "type": "function", + "name": "get_weather", + "description": "Get weather", + "parameters": {"type": "object", "properties": {}}, + }, + ) + + def test_minimal_definition(self): + """Only name, no description or parameters.""" + tool = {"function": {"name": "f"}} + serialized = serialize_tool_definition(tool) + self.assertIsNotNone(serialized) + assert serialized is not None + self.assertDictEqual( + _parse(serialized), + { + "type": "function", + "name": "f", + }, + ) + + def test_missing_function_returns_none(self): + self.assertIsNone(serialize_tool_definition({"type": "function"})) + + def test_empty_function_returns_none(self): + self.assertIsNone(serialize_tool_definition({"function": {}})) + + def test_missing_name_returns_none(self): + self.assertIsNone( + serialize_tool_definition({"function": {"description": "no name"}}) + ) + + def test_custom_type_preserved(self): + tool = {"type": "custom_tool", "function": {"name": "f"}} + serialized = serialize_tool_definition(tool) + self.assertIsNotNone(serialized) + assert serialized is not None + self.assertDictEqual( + _parse(serialized), + { + "type": "custom_tool", + "name": "f", + }, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/mistralai/extra/tests/test_streaming.py b/src/mistralai/extra/tests/test_streaming.py new file mode 100644 index 00000000..9f2ec557 --- /dev/null +++ b/src/mistralai/extra/tests/test_streaming.py @@ -0,0 +1,372 @@ +"""Tests for streaming SSE parsing and chunk accumulation. + +Unit tests for the pure functions in ``observability.streaming``, independent +of OTEL span management. +""" + +import json +import unittest + +from mistralai.client.models import ( + CompletionChunk, + CompletionResponseStreamChoice, + CompletionResponseStreamChoiceFinishReason, + DeltaMessage, + FunctionCall, + ToolCall, + UsageInfo, +) +from mistralai.extra.observability.streaming import ( + accumulate_chunks_to_response_dict, + parse_sse_chunks, +) + +_DEFAULT_ID = "id-1" +_DEFAULT_MODEL = "m" + + +def _single_choice_chunk( + id: str = _DEFAULT_ID, + model: str = _DEFAULT_MODEL, + role: str | None = None, + content: str | None = None, + tool_calls: list[ToolCall] | None = None, + finish_reason: CompletionResponseStreamChoiceFinishReason | None = None, + object: str | None = None, + created: int | None = None, + usage: UsageInfo | None = None, +) -> CompletionChunk: + return CompletionChunk( + id=id, + model=model, + choices=[ + CompletionResponseStreamChoice( + index=0, + delta=DeltaMessage(role=role, content=content, tool_calls=tool_calls), + finish_reason=finish_reason, + ) + ], + object=object, + created=created, + usage=usage, + ) + + +def _dump(model) -> dict: + return model.model_dump(mode="json", by_alias=True) + + +def _to_sse(chunks: list[CompletionChunk], done: bool = True) -> bytes: + """Build SSE bytes from CompletionChunk models.""" + lines = [f"data: {json.dumps(_dump(c))}" for c in chunks] + if done: + lines.append("data: [DONE]") + return ("\n\n".join(lines) + "\n\n").encode() + + +class TestParseSseChunks(unittest.TestCase): + def test_parses_valid_chunks(self): + chunks = [ + _single_choice_chunk(content="hello"), + _single_choice_chunk(content=" world", finish_reason="stop"), + ] + result = parse_sse_chunks(_to_sse(chunks)) + self.assertEqual(result, chunks) + + def test_skips_done_sentinel(self): + chunk = _single_choice_chunk(content="hi", finish_reason="stop") + result = parse_sse_chunks(_to_sse([chunk], done=True)) + self.assertEqual(result, [chunk]) + + def test_skips_invalid_json(self): + sse = b"data: {not valid json}\n\ndata: [DONE]\n\n" + result = parse_sse_chunks(sse) + self.assertEqual(result, []) + + def test_skips_non_data_lines(self): + chunk = _single_choice_chunk(content="hi", finish_reason="stop") + sse = b"event: message\n\n" + _to_sse([chunk]) + result = parse_sse_chunks(sse) + self.assertEqual(result, [chunk]) + + def test_empty_bytes(self): + self.assertEqual(parse_sse_chunks(b""), []) + + +class TestAccumulateChunks(unittest.TestCase): + def test_simple_content_concatenation(self): + chunks = [ + _single_choice_chunk(role="assistant", content="Hello"), + _single_choice_chunk(content=" world"), + _single_choice_chunk( + content="", + finish_reason="stop", + usage=UsageInfo(prompt_tokens=10, completion_tokens=5, total_tokens=15), + ), + ] + result = accumulate_chunks_to_response_dict(chunks) + + self.assertDictEqual( + result, + { + "id": _DEFAULT_ID, + "model": _DEFAULT_MODEL, + "choices": [ + { + "message": {"role": "assistant", "content": "Hello world"}, + "finish_reason": "stop", + } + ], + "usage": { + "prompt_tokens": 10, + "completion_tokens": 5, + "total_tokens": 15, + }, + }, + ) + + def test_tool_call_argument_accumulation(self): + """Tool call arguments fragmented across multiple chunks.""" + chunks = [ + _single_choice_chunk( + role="assistant", + content="", + tool_calls=[ + ToolCall( + id="tc-1", + index=0, + function=FunctionCall(name="get_weather", arguments=""), + ) + ], + ), + _single_choice_chunk( + tool_calls=[ + ToolCall( + index=0, function=FunctionCall(name="", arguments='{"location"') + ) + ], + ), + _single_choice_chunk( + tool_calls=[ + ToolCall( + index=0, function=FunctionCall(name="", arguments=': "Paris"}') + ) + ], + finish_reason="tool_calls", + ), + ] + result = accumulate_chunks_to_response_dict(chunks) + + self.assertDictEqual( + result, + { + "id": _DEFAULT_ID, + "model": _DEFAULT_MODEL, + "choices": [ + { + "message": { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "id": "tc-1", + "function": { + "name": "get_weather", + "arguments": '{"location": "Paris"}', + }, + } + ], + }, + "finish_reason": "tool_calls", + } + ], + }, + ) + + def test_multiple_tool_calls_on_same_choice(self): + """Two tool calls on the same choice, different indexes.""" + chunks = [ + _single_choice_chunk( + role="assistant", + tool_calls=[ + ToolCall( + id="tc-1", + index=0, + function=FunctionCall( + name="get_weather", arguments='{"location": "Paris"}' + ), + ), + ToolCall( + id="tc-2", + index=1, + function=FunctionCall( + name="get_time", arguments='{"timezone": "CET"}' + ), + ), + ], + finish_reason="tool_calls", + ), + ] + result = accumulate_chunks_to_response_dict(chunks) + + self.assertDictEqual( + result, + { + "id": _DEFAULT_ID, + "model": _DEFAULT_MODEL, + "choices": [ + { + "message": { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "id": "tc-1", + "function": { + "name": "get_weather", + "arguments": '{"location": "Paris"}', + }, + }, + { + "id": "tc-2", + "function": { + "name": "get_time", + "arguments": '{"timezone": "CET"}', + }, + }, + ], + }, + "finish_reason": "tool_calls", + } + ], + }, + ) + + def test_multiple_choices(self): + """n > 1: parallel choice accumulation.""" + chunks = [ + CompletionChunk( + id=_DEFAULT_ID, + model=_DEFAULT_MODEL, + choices=[ + CompletionResponseStreamChoice( + index=0, + delta=DeltaMessage(role="assistant", content="Answer A"), + finish_reason=None, + ), + CompletionResponseStreamChoice( + index=1, + delta=DeltaMessage(role="assistant", content="Answer B"), + finish_reason=None, + ), + ], + ), + CompletionChunk( + id=_DEFAULT_ID, + model=_DEFAULT_MODEL, + choices=[ + CompletionResponseStreamChoice( + index=0, delta=DeltaMessage(content=""), finish_reason="stop" + ), + CompletionResponseStreamChoice( + index=1, delta=DeltaMessage(content=""), finish_reason="stop" + ), + ], + ), + ] + result = accumulate_chunks_to_response_dict(chunks) + + self.assertDictEqual( + result, + { + "id": _DEFAULT_ID, + "model": _DEFAULT_MODEL, + "choices": [ + { + "message": {"role": "assistant", "content": "Answer A"}, + "finish_reason": "stop", + }, + { + "message": {"role": "assistant", "content": "Answer B"}, + "finish_reason": "stop", + }, + ], + }, + ) + + def test_missing_usage(self): + """Interrupted stream — no usage in any chunk.""" + chunks = [ + _single_choice_chunk(role="assistant", content="partial"), + ] + result = accumulate_chunks_to_response_dict(chunks) + + self.assertDictEqual( + result, + { + "id": _DEFAULT_ID, + "model": _DEFAULT_MODEL, + "choices": [ + { + "message": {"role": "assistant", "content": "partial"}, + "finish_reason": "", + } + ], + }, + ) + + def test_function_name_accumulation(self): + """Function name split across chunks.""" + chunks = [ + _single_choice_chunk( + tool_calls=[ + ToolCall( + id="tc-1", + index=0, + function=FunctionCall(name="get_", arguments=""), + ) + ], + ), + _single_choice_chunk( + tool_calls=[ + ToolCall( + index=0, + function=FunctionCall( + name="weather", arguments='{"loc": "Paris"}' + ), + ) + ], + finish_reason="tool_calls", + ), + ] + result = accumulate_chunks_to_response_dict(chunks) + + self.assertDictEqual( + result, + { + "id": _DEFAULT_ID, + "model": _DEFAULT_MODEL, + "choices": [ + { + "message": { + "role": "assistant", + "content": "", + "tool_calls": [ + { + "id": "tc-1", + "function": { + "name": "get_weather", + "arguments": '{"loc": "Paris"}', + }, + } + ], + }, + "finish_reason": "tool_calls", + } + ], + }, + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/uv.lock b/uv.lock index 07118b65..c359ba58 100644 --- a/uv.lock +++ b/uv.lock @@ -584,6 +584,7 @@ dev = [ { name = "invoke" }, { name = "mcp" }, { name = "mypy" }, + { name = "opentelemetry-sdk" }, { name = "pylint" }, { name = "pytest" }, { name = "pytest-asyncio" }, @@ -608,7 +609,7 @@ requires-dist = [ { name = "httpx", specifier = ">=0.28.1" }, { name = "mcp", marker = "extra == 'agents'", specifier = ">=1.0,<2.0" }, { name = "opentelemetry-api", specifier = ">=1.33.1,<2.0.0" }, - { name = "opentelemetry-semantic-conventions", specifier = ">=0.59b0,<0.61" }, + { name = "opentelemetry-semantic-conventions", specifier = ">=0.60b1,<0.61" }, { name = "pydantic", specifier = ">=2.11.2" }, { name = "python-dateutil", specifier = ">=2.8.2" }, { name = "requests", marker = "extra == 'gcp'", specifier = ">=2.32.3" }, @@ -624,6 +625,7 @@ dev = [ { name = "invoke", specifier = ">=2.2.0,<3" }, { name = "mcp", specifier = ">=1.0,<2" }, { name = "mypy", specifier = "==1.15.0" }, + { name = "opentelemetry-sdk", specifier = ">=1.33.1,<2.0.0" }, { name = "pylint", specifier = "==3.2.3" }, { name = "pytest", specifier = ">=8.2.2,<9" }, { name = "pytest-asyncio", specifier = ">=0.23.7,<0.24" }, @@ -697,28 +699,42 @@ wheels = [ [[package]] name = "opentelemetry-api" -version = "1.38.0" +version = "1.39.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "importlib-metadata" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/08/d8/0f354c375628e048bd0570645b310797299754730079853095bf000fba69/opentelemetry_api-1.38.0.tar.gz", hash = "sha256:f4c193b5e8acb0912b06ac5b16321908dd0843d75049c091487322284a3eea12", size = 65242, upload-time = "2025-10-16T08:35:50.25Z" } +sdist = { url = "https://files.pythonhosted.org/packages/97/b9/3161be15bb8e3ad01be8be5a968a9237c3027c5be504362ff800fca3e442/opentelemetry_api-1.39.1.tar.gz", hash = "sha256:fbde8c80e1b937a2c61f20347e91c0c18a1940cecf012d62e65a7caf08967c9c", size = 65767, upload-time = "2025-12-11T13:32:39.182Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ae/a2/d86e01c28300bd41bab8f18afd613676e2bd63515417b77636fc1add426f/opentelemetry_api-1.38.0-py3-none-any.whl", hash = "sha256:2891b0197f47124454ab9f0cf58f3be33faca394457ac3e09daba13ff50aa582", size = 65947, upload-time = "2025-10-16T08:35:30.23Z" }, + { url = "https://files.pythonhosted.org/packages/cf/df/d3f1ddf4bb4cb50ed9b1139cc7b1c54c34a1e7ce8fd1b9a37c0d1551a6bd/opentelemetry_api-1.39.1-py3-none-any.whl", hash = "sha256:2edd8463432a7f8443edce90972169b195e7d6a05500cd29e6d13898187c9950", size = 66356, upload-time = "2025-12-11T13:32:17.304Z" }, +] + +[[package]] +name = "opentelemetry-sdk" +version = "1.39.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-api" }, + { name = "opentelemetry-semantic-conventions" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/fb/c76080c9ba07e1e8235d24cdcc4d125ef7aa3edf23eb4e497c2e50889adc/opentelemetry_sdk-1.39.1.tar.gz", hash = "sha256:cf4d4563caf7bff906c9f7967e2be22d0d6b349b908be0d90fb21c8e9c995cc6", size = 171460, upload-time = "2025-12-11T13:32:49.369Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/98/e91cf858f203d86f4eccdf763dcf01cf03f1dae80c3750f7e635bfa206b6/opentelemetry_sdk-1.39.1-py3-none-any.whl", hash = "sha256:4d5482c478513ecb0a5d938dcc61394e647066e0cc2676bee9f3af3f3f45f01c", size = 132565, upload-time = "2025-12-11T13:32:35.069Z" }, ] [[package]] name = "opentelemetry-semantic-conventions" -version = "0.59b0" +version = "0.60b1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "opentelemetry-api" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/40/bc/8b9ad3802cd8ac6583a4eb7de7e5d7db004e89cb7efe7008f9c8a537ee75/opentelemetry_semantic_conventions-0.59b0.tar.gz", hash = "sha256:7a6db3f30d70202d5bf9fa4b69bc866ca6a30437287de6c510fb594878aed6b0", size = 129861, upload-time = "2025-10-16T08:36:03.346Z" } +sdist = { url = "https://files.pythonhosted.org/packages/91/df/553f93ed38bf22f4b999d9be9c185adb558982214f33eae539d3b5cd0858/opentelemetry_semantic_conventions-0.60b1.tar.gz", hash = "sha256:87c228b5a0669b748c76d76df6c364c369c28f1c465e50f661e39737e84bc953", size = 137935, upload-time = "2025-12-11T13:32:50.487Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/24/7d/c88d7b15ba8fe5c6b8f93be50fc11795e9fc05386c44afaf6b76fe191f9b/opentelemetry_semantic_conventions-0.59b0-py3-none-any.whl", hash = "sha256:35d3b8833ef97d614136e253c1da9342b4c3c083bbaf29ce31d572a1c3825eed", size = 207954, upload-time = "2025-10-16T08:35:48.054Z" }, + { url = "https://files.pythonhosted.org/packages/7a/5e/5958555e09635d09b75de3c4f8b9cae7335ca545d77392ffe7331534c402/opentelemetry_semantic_conventions-0.60b1-py3-none-any.whl", hash = "sha256:9fa8c8b0c110da289809292b0591220d3a7b53c1526a23021e977d68597893fb", size = 219982, upload-time = "2025-12-11T13:32:36.955Z" }, ] [[package]] From d12d36718a222bf4a0ce208180e319aa4a6dd355 Mon Sep 17 00:00:00 2001 From: Louis Sanna <85956496+louis-sanna-dev@users.noreply.github.com> Date: Tue, 10 Mar 2026 18:27:07 +0100 Subject: [PATCH 11/82] docs: update README to reflect v2 as latest PyPI release (#416) Remove the IMPORTANT banner stating v2 was not yet on PyPI. Replace with a NOTE pointing v1 users to the v1 branch. Rename 'Migration warning' section to 'Migrating from v1'. Generated by Mistral Vibe. Co-authored-by: Mistral Vibe --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a2289844..971372f9 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # Mistral Python Client -> [!IMPORTANT] -> **Looking for v1 documentation?** If you installed `mistralai` from PyPI (e.g., `pip install mistralai`), you are using **v1** of the SDK. The documentation on this branch (`main`) is for **v2**, which is not yet released on PyPI. +> [!NOTE] +> **Looking for v1 documentation?** This is the documentation for the **latest** version (v2) of the `mistralai` SDK, available on PyPI. > -> **➡️ [Go to the v1 branch for v1 documentation](https://github.com/mistralai/client-python/tree/v1)** +> **[Go to the v1 branch for v1 documentation](https://github.com/mistralai/client-python/tree/v1)** -## Migration warning +## Migrating from v1 -This documentation is for Mistral AI SDK v2. You can find more details on how to migrate from v1 to v2 [here](MIGRATION.md) +If you are upgrading from v1 to v2, check the [migration guide](MIGRATION.md) for details on breaking changes and how to update your code. ## API Key Setup @@ -34,7 +34,7 @@ Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create yo ## Table of Contents * [Mistral Python Client](#mistral-python-client) - * [Migration warning](#migration-warning) + * [Migrating from v1](#migrating-from-v1) * [API Key Setup](#api-key-setup) * [SDK Installation](#sdk-installation) * [SDK Example Usage](#sdk-example-usage) From 6035f1795fd12aa4a31100393e7991b437240a05 Mon Sep 17 00:00:00 2001 From: Louis Sanna <85956496+louis-sanna-dev@users.noreply.github.com> Date: Wed, 11 Mar 2026 10:11:49 +0100 Subject: [PATCH 12/82] ci: publish v2 from main (#417) --- .github/workflows/sdk_publish_mistralai_sdk.yaml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sdk_publish_mistralai_sdk.yaml b/.github/workflows/sdk_publish_mistralai_sdk.yaml index 44635571..0483de11 100644 --- a/.github/workflows/sdk_publish_mistralai_sdk.yaml +++ b/.github/workflows/sdk_publish_mistralai_sdk.yaml @@ -6,23 +6,15 @@ permissions: statuses: write "on": workflow_dispatch: - inputs: - confirm_publish: - description: 'WARNING: This will publish v2 SDK (mistralai.client namespace) which is still WIP/alpha. To publish v1 (mistralai namespace), use the v1 branch instead. Type "publish" to confirm.' - required: false - type: string push: branches: - - v1 + - main paths: - RELEASES.md - "*/RELEASES.md" jobs: publish: - # Auto-publish from v1 branch; require manual confirmation from main - if: | - github.ref == 'refs/heads/v1' || - (github.event_name == 'workflow_dispatch' && github.event.inputs.confirm_publish == 'publish') + if: github.ref == 'refs/heads/main' uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 secrets: github_access_token: ${{ secrets.GITHUB_TOKEN }} From 8da1e18ca94e633a9516d95906a8ad234644f99d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 08:58:01 +0100 Subject: [PATCH 13/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.0.1=20(#421)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.chat.complete()`: * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.classifiers.classify_chat()`: * `request.input.union(InstructRequest).messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.classifiers.moderate_chat()`: * `request.inputs.union(Array<>)[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.agents.stream()`: * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.agents.complete()`: * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.fim.stream()`: `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.fim.complete()`: `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.chat.stream()`: * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️) * `mistral.beta.conversations.restart_stream()`: * `request.guardrails[]` **Changed** * `mistral.beta.agents.update()`: * `request` **Changed** * `response` **Changed** * `mistral.beta.agents.update_version()`: `response` **Changed** * `mistral.beta.agents.list_versions()`: `response.[]` **Changed** * `mistral.beta.agents.get_version()`: `response` **Changed** * `mistral.beta.agents.get()`: `response` **Changed** * `mistral.beta.agents.list()`: `response.[]` **Changed** * `mistral.beta.agents.create()`: * `request` **Changed** * `response` **Changed** * `mistral.beta.conversations.start()`: `request` **Changed** * `mistral.beta.conversations.start_stream()`: `request` **Changed** * `mistral.beta.conversations.restart()`: * `request.guardrails[]` **Changed** * `mistral.beta.conversations.get()`: `response.union(ModelConversation)` **Changed** * `mistral.beta.conversations.list()`: `response.[].union(ModelConversation)` **Changed** * chore: align pyproject.toml and uv.lock to version 2.0.1 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 190 ++++++++++-------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +- RELEASES.md | 12 +- docs/models/agenttool.md | 6 + docs/models/apikeyauth.md | 9 + docs/models/audiourl.md | 13 -- docs/models/audiourlchunk.md | 15 -- docs/models/audiourlunion.md | 17 -- docs/models/authorization.md | 17 ++ docs/models/contentchunk.md | 6 - docs/models/conversationrequest.md | 2 +- docs/models/conversationrequesttool.md | 6 + docs/models/conversationstreamrequest.md | 2 +- docs/models/conversationstreamrequesttool.md | 6 + docs/models/createagentrequesttool.md | 6 + docs/models/customconnector.md | 11 + docs/models/guardrailconfig.md | 9 +- docs/models/modelconversationtool.md | 6 + ...nllmv1action.md => moderationllmaction.md} | 2 +- docs/models/moderationllmv1config.md | 4 +- .../moderationllmv2categorythresholds.md | 18 ++ docs/models/moderationllmv2config.md | 11 + docs/models/oauth2tokenauth.md | 9 + docs/models/updateagentrequesttool.md | 6 + docs/sdks/conversations/README.md | 4 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/conversations.py | 32 +-- src/mistralai/client/models/__init__.py | 68 +++++-- src/mistralai/client/models/agent.py | 4 + src/mistralai/client/models/apikeyauth.py | 30 +++ src/mistralai/client/models/audiourl.py | 26 --- src/mistralai/client/models/audiourlchunk.py | 53 ----- src/mistralai/client/models/contentchunk.py | 4 - .../client/models/conversationrequest.py | 10 +- .../models/conversationstreamrequest.py | 10 +- .../client/models/createagentrequest.py | 3 + .../client/models/customconnector.py | 108 ++++++++++ .../client/models/guardrailconfig.py | 24 ++- .../client/models/modelconversation.py | 4 + ...nllmv1action.py => moderationllmaction.py} | 4 +- .../client/models/moderationllmv1config.py | 8 +- .../moderationllmv2categorythresholds.py | 104 ++++++++++ .../client/models/moderationllmv2config.py | 76 +++++++ .../client/models/oauth2tokenauth.py | 32 +++ .../client/models/updateagentrequest.py | 3 + uv.lock | 2 +- 48 files changed, 713 insertions(+), 299 deletions(-) create mode 100644 docs/models/apikeyauth.md delete mode 100644 docs/models/audiourl.md delete mode 100644 docs/models/audiourlchunk.md delete mode 100644 docs/models/audiourlunion.md create mode 100644 docs/models/authorization.md create mode 100644 docs/models/customconnector.md rename docs/models/{moderationllmv1action.md => moderationllmaction.md} (80%) create mode 100644 docs/models/moderationllmv2categorythresholds.md create mode 100644 docs/models/moderationllmv2config.md create mode 100644 docs/models/oauth2tokenauth.md create mode 100644 src/mistralai/client/models/apikeyauth.py delete mode 100644 src/mistralai/client/models/audiourl.py delete mode 100644 src/mistralai/client/models/audiourlchunk.py create mode 100644 src/mistralai/client/models/customconnector.py rename src/mistralai/client/models/{moderationllmv1action.py => moderationllmaction.py} (81%) create mode 100644 src/mistralai/client/models/moderationllmv2categorythresholds.py create mode 100644 src/mistralai/client/models/moderationllmv2config.py create mode 100644 src/mistralai/client/models/oauth2tokenauth.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index dd18eda6..7e03be4c 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: ae098de142fd81aa02c9a5a26a6591b8 + docChecksum: bb87a2d97f3451b49ece1f757a33f0ba docVersion: 1.0.0 speakeasyVersion: 1.729.0 generationVersion: 2.841.0 - releaseVersion: 2.0.0 - configChecksum: 60e6aae39454140823667a495d507fca + releaseVersion: 2.0.1 + configChecksum: 006abc607168111d628a422258f355ba repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 1fa80ee6-4130-423f-9d6e-8b865b18cc7f - pristine_commit_hash: f2c5b1b11c5e7496fda888469f22e3dd22af1603 - pristine_tree_hash: 4bf96963cbd890c55a9d591243f7aea7311db58b + generation_id: 03da14ba-78d6-4fb7-b997-4bb820eedd19 + pristine_commit_hash: 81f0d1b22d32115b6bea27499be12662db3c24c1 + pristine_tree_hash: b7173449eea74b886d2cf12c4108224effd56e16 features: python: additionalDependencies: 1.0.0 @@ -216,8 +216,8 @@ trackedFiles: pristine_git_object: 4354523a7d0d21721a96e91938b89236169ccced docs/models/agenttool.md: id: 513b8b7bc0b7 - last_write_checksum: sha1:9154d0ac6b0ab8970a10a8ad7716009d62e80ce7 - pristine_git_object: 022f7e10edb22cb1b1d741c13ac586bd136d03b5 + last_write_checksum: sha1:8dedf7bcaa05492689ce0828e5644380258d5a7e + pristine_git_object: 0722e955359c8569a219f3c2c9b3d9dbb7449ee0 docs/models/and_.md: id: a4692aa4d8e7 last_write_checksum: sha1:86773c7178b6c04a7adc487d860c39a51116b0cb @@ -234,6 +234,10 @@ trackedFiles: id: be613fd9b947 last_write_checksum: sha1:4d984c11248f7da42c949164e69b53995d5942c4 pristine_git_object: 8d83a26f19241da5ce626ff9526575c50e5d27be + docs/models/apikeyauth.md: + id: 529789e1b079 + last_write_checksum: sha1:edb801076d411a5d6c1f7a3f4fdb4c3612b12ab1 + pristine_git_object: 1fbff10e21eb51df061790f0215cb4916318ebc1 docs/models/archivemodelresponse.md: id: 133f4af8058f last_write_checksum: sha1:95fa73ebd765cbd244c847218df6d31e18dc5e85 @@ -282,22 +286,14 @@ trackedFiles: id: 79b5f721b753 last_write_checksum: sha1:df6825c05b5a02dcf904ebaa40fb97e9186248cc pristine_git_object: 5d64964d1a635da912f2553c306fb8654ebfca2e - docs/models/audiourl.md: - id: 5cf317caac89 - last_write_checksum: sha1:2ab877ab65fd947d3d3833266d64167a78f83350 - pristine_git_object: 45ad74938a74eeed51440b4b62db941cac19e095 - docs/models/audiourlchunk.md: - id: dc995cbb4163 - last_write_checksum: sha1:f85ceef0dd3cf36caf7889eaf645c5fc6a329baf - pristine_git_object: 56af9df98b9d948575f733b88bfaf6c9202832b3 - docs/models/audiourlunion.md: - id: fe1a2fe0351a - last_write_checksum: sha1:9d271e3711f30e7715720e1d68b7b5d2a6a74cc1 - pristine_git_object: 9666906674288fa3e251549d6edb355eabbce1d9 docs/models/authdata.md: id: e510ac107a56 last_write_checksum: sha1:1cfbc35a6112a6eca7b4199c37959a0fef390ca8 pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 + docs/models/authorization.md: + id: dec4d9809e25 + last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e + pristine_git_object: 11ea5c6a700e7b92f5cbd29e88e41b834f8b8ef4 docs/models/basefielddefinition.md: id: f9e0bbae859b last_write_checksum: sha1:28a4d2774231873af97debedcf2fba4f49e83bf2 @@ -612,8 +608,8 @@ trackedFiles: pristine_git_object: db9cc9b4c4379865ad15292c5385dce864b5935b docs/models/contentchunk.md: id: d2d3a32080cd - last_write_checksum: sha1:26f4ec3431c023af6ef3da732f753b66a52bdeac - pristine_git_object: 5a8ef58c968cd6d4e29a8c6c02fbc5e8bacd6839 + last_write_checksum: sha1:b253e4b802adb5b66d896bfc6245ac4d21a0c67c + pristine_git_object: cb7e51d3a6e05f197fceff4a4999594f3e340dac docs/models/context.md: id: e8f2f9e54b8e last_write_checksum: sha1:4c14b386f9f89d98f4dd9487ab030f10478c0e63 @@ -660,8 +656,8 @@ trackedFiles: pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:093de161c340171af6f89228f7e248668e09b3a1 - pristine_git_object: 9aabc52a331b638ce4633834328fe50ffb8d09eb + last_write_checksum: sha1:bfb3664fa8011fb44786d6e5c32cd5c0eed3058d + pristine_git_object: 903d13c1d92d31aa7db836bbd796fe0875892219 docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 @@ -672,8 +668,8 @@ trackedFiles: pristine_git_object: e7314f7e0080ff3f1a80afdbb229c78df5b008bb docs/models/conversationrequesttool.md: id: bd1bb6fcea8b - last_write_checksum: sha1:69d503d73f5bd044882d13cd0c7de188dd5f4831 - pristine_git_object: 2e4e8d01b5482c4e0644be52e55bf6912aeff69e + last_write_checksum: sha1:9c04dc1c7401b775671130cce7a1d85fbdf35957 + pristine_git_object: 5a58e6d139fd902bb810088221e036001d7690d2 docs/models/conversationresponse.md: id: 2eccf42d48af last_write_checksum: sha1:55493c0b639cb8bda3b5f3bca57a7eec6060b148 @@ -712,8 +708,8 @@ trackedFiles: pristine_git_object: 12bf7c1fa98223675c6b27f6010d05c9b78e7017 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:19602f1f58e594960340559d57733bc11223c494 - pristine_git_object: f792c26369b64508b8aa6b5032cedcd16aa556e9 + last_write_checksum: sha1:bfa762698bd078c1a046e0f17d0316299ae11288 + pristine_git_object: 8debea1c3e036e2fa7d21e6aa5f2883173b4988a docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 @@ -724,8 +720,8 @@ trackedFiles: pristine_git_object: c98e194c1d204c3a5d4234f0553712a7025d7f85 docs/models/conversationstreamrequesttool.md: id: 71df6212ff44 - last_write_checksum: sha1:f2882742a74dd2b4f74383efa444c7ab968249dc - pristine_git_object: 0f75f82b38f224340bed468ceecfe622066740ba + last_write_checksum: sha1:04f89a30daec9bad78f99d0bcf28c8a717fc7833 + pristine_git_object: 82ef640a0026772728b84abe22544f9cf7d5d03c docs/models/conversationusageinfo.md: id: 57ef89d3ab83 last_write_checksum: sha1:d92408ad37d7261b0f83588e6216871074a50225 @@ -736,8 +732,8 @@ trackedFiles: pristine_git_object: e9665545ae14415bb0c61dc0312136dd2930ee13 docs/models/createagentrequesttool.md: id: 72e5f99878c5 - last_write_checksum: sha1:a90ad01c15da321f0c8ec700ba359a5371c5dcbb - pristine_git_object: c6ed3e98566eb684932fae9d2648a85c84443493 + last_write_checksum: sha1:4b4ab1566b3c82a14ace1c141538d7ad6b7192f7 + pristine_git_object: e45d57bc9eea6f192d0cc0258e5d31e8409dd00d docs/models/createbatchjobrequest.md: id: e79afe8f495c last_write_checksum: sha1:6cedce49f3108b9d5bc80e6d11712c594f2d9e50 @@ -794,6 +790,10 @@ trackedFiles: id: 8935b2ed9d13 last_write_checksum: sha1:c00abfe1abb0f0323e434b084dafa0d451eb3e51 pristine_git_object: 71562806dbec6444dcdd0a19852a31ca00b6229a + docs/models/customconnector.md: + id: 7bcc77607afa + last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a + pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 docs/models/dataset.md: id: 31af4d237e19 last_write_checksum: sha1:073fa9a0b7891ccd9b6ae64ba960d74eeb5c9007 @@ -1180,8 +1180,8 @@ trackedFiles: pristine_git_object: 319e1415d9396412c455056135189d817e2fc473 docs/models/guardrailconfig.md: id: f60bf2eefb45 - last_write_checksum: sha1:517e5d142f8e259795cc0083522041ec006baeb7 - pristine_git_object: 235d7204080f3aef0b7910ed32d009cae6d4247c + last_write_checksum: sha1:e8dd384d2fd18d731753ba8d45a2975379c97052 + pristine_git_object: 1276462cc43fbd940f12282b1dca05e6fc7a16f9 docs/models/hyperparameters.md: id: c167bad5b302 last_write_checksum: sha1:e391cf72690e6cd01a2878081b8d87938e1c6639 @@ -1560,8 +1560,8 @@ trackedFiles: pristine_git_object: 190a6f6eb48191b2507a4861525707f041961538 docs/models/modelconversationtool.md: id: 2dd28167bc36 - last_write_checksum: sha1:9b33f73330e5ae31de877a904954efe342e99c4f - pristine_git_object: 8723556753d077969bc665a423c057ae4ceaa0d2 + last_write_checksum: sha1:029cca1fe47df23ef858a01fd2627f0bc2ffdfd3 + pristine_git_object: 0b6a45f7ec2ca95191b228a6468c80ddbfd373ed docs/models/modellist.md: id: ce07fd9ce413 last_write_checksum: sha1:b4c22b5eff4478ffa5717bd5af92ca79f4a90b01 @@ -1570,18 +1570,26 @@ trackedFiles: id: e2eb639c646f last_write_checksum: sha1:7394ba5645f990163c4d777ebbfc71f24c5d3a74 pristine_git_object: b44e84a00d0c54f8df78650d45de0a409c901048 - docs/models/moderationllmv1action.md: - id: ebbde3bb4ffb - last_write_checksum: sha1:4b8a7001254c7c1f56bba10e4aa5445a41def160 - pristine_git_object: e24d6a2296ded90c15dffccf636c6628d0de6c4f + docs/models/moderationllmaction.md: + id: 26373b4ad9cd + last_write_checksum: sha1:da6507feedd7db7e8e0c0d5ca3428e3f5a3aee9a + pristine_git_object: 951880b61ec0e40c30c427f9c2b5f68c5a89a7e2 docs/models/moderationllmv1categorythresholds.md: id: b474ca28a6e7 last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 pristine_git_object: 90ae213feda5e63ad71fbd7bb0bfb07ee7b1e2c1 docs/models/moderationllmv1config.md: id: e39a45c3e458 - last_write_checksum: sha1:7bc088d2563fa4bb89175423b94908da4aaf7a54 - pristine_git_object: 0c410947c9554348a77fd02d48a1a5d7e40f0abb + last_write_checksum: sha1:63b7677d0b488d44312417d9335abd595f9b6fa9 + pristine_git_object: bdb5812b87a69af904eb9cdc0fffff6e73d96cd3 + docs/models/moderationllmv2categorythresholds.md: + id: 401d3285071c + last_write_checksum: sha1:6fbfadaba4db8bed9fc7d38ad77cd47a089dd5f0 + pristine_git_object: e95b81b0315cf77724d027dbf8ff0f524ad1d068 + docs/models/moderationllmv2config.md: + id: 64c1e213e7cc + last_write_checksum: sha1:851923395e5a4097b82d184e070a85bf648a9e8c + pristine_git_object: e928506c8d210b865e8aee9739a35433ca136872 docs/models/moderationobject.md: id: 4e84364835f5 last_write_checksum: sha1:2831033dcc3d93d32b8813498f6eb3082e2d3c4e @@ -1594,6 +1602,10 @@ trackedFiles: id: f5be2d861921 last_write_checksum: sha1:624f30759b7b7de1913b1ef3b8bb2187a95b9570 pristine_git_object: 9d7a00c44e1507edd12f16fbb6b3864f1c0bbd81 + docs/models/oauth2tokenauth.md: + id: f23959dcc4b0 + last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 + pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 last_write_checksum: sha1:cba4ebf5b8b3007046c124504e1472bcd464f109 @@ -2056,8 +2068,8 @@ trackedFiles: pristine_git_object: b8aa01f66b13d050839bd0aacf1550f669bc8d13 docs/models/updateagentrequesttool.md: id: bdf961d2c886 - last_write_checksum: sha1:5355f8c97b2aef98aebff251e1f4830ddbaa7881 - pristine_git_object: e358b1edb9035667104700dde890bb0b43074543 + last_write_checksum: sha1:104218314ae55ccf111d90bdbad987a13988f7f5 + pristine_git_object: cf590a2fc7f58707855eb0bda2d4b8460bfea800 docs/models/updateconnectorrequest.md: id: 40e38d9c7c2a last_write_checksum: sha1:183567baed17e6b95628cfe17455e1861fd48758 @@ -2184,8 +2196,8 @@ trackedFiles: pristine_git_object: b8150eb85d182af6e7ed8216cc4b4a535271a53a docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:5c75be39ef1f2a15249e363e33ebf8f3e964301c - pristine_git_object: 083b293d12fd00ba9b74a00666a9f9542cca9f4c + last_write_checksum: sha1:3bc235805eff20efdb634834e11f519a5d09dd47 + pristine_git_object: 0803b39816e5393050f383407f162446eb0d455d docs/sdks/datasets/README.md: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 @@ -2264,8 +2276,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:9ca227af0848f7e58917b55ae2433118ff5f073d - pristine_git_object: c7251c9ce55d10a4ef89ce5ab58a05332b9b21ff + last_write_checksum: sha1:3032daf0aeb47d7e21ff355c838e9ab5c765b428 + pristine_git_object: 7c37028eac3c970d707ee16fa69ae1e7b0020cfc src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -2320,8 +2332,8 @@ trackedFiles: pristine_git_object: 37e018330e85109692a83d97d62a5efe7a15ee6f src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:eba234effe5c649b220c370a1c9098ba9a4c686d - pristine_git_object: a4af31f3abe3ece7791a76d20de9146bb83e1fcc + last_write_checksum: sha1:c13593e5cf9c7f7d5b4c32a874a0b8e1212d1e0f + pristine_git_object: 99f3a33e211ce45d8920baa60f0e8bc915cfb50f src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 @@ -2396,12 +2408,12 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:d776a15e3fa0fd11027c50d0f3c8e77882eb29b5 - pristine_git_object: 741c80f30cdaac0f0f03c440f2436bbb453af2f6 + last_write_checksum: sha1:15c081adb2e325471e7e1a5aa47159281082abd0 + pristine_git_object: e0fd60e48c43a87566b6abbc7e87cdd695e83a55 src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:7fede9394ca174a3f0ee3d5a01d95ec265783e2c - pristine_git_object: 1fa27f08eaf0a7737a0f505aeae920f598f6968e + last_write_checksum: sha1:6bd14cd797a902679111638ede8b3f8a6389ba87 + pristine_git_object: 068b32267ff9305d6431790bccee7b79fce3c1b5 src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 @@ -2514,6 +2526,10 @@ trackedFiles: id: 00b34ce0a24d last_write_checksum: sha1:733e852bf75956acd2c72a23443627abfa090b7b pristine_git_object: a6665c1076f05c28936510c24ee7d3498d7e7a24 + src/mistralai/client/models/apikeyauth.py: + id: f55510f5ff82 + last_write_checksum: sha1:995d3fcf007b0f10eea18bb6745478e7eeb6bce2 + pristine_git_object: 10cbaf589e2a4bc1e63b3a02689e76f4d7f1e88a src/mistralai/client/models/archivemodelresponse.py: id: 2d22c644df64 last_write_checksum: sha1:d0f67fd2bc5a6e8de4f2b0a5742ceb4a1f7f5ab8 @@ -2546,14 +2562,6 @@ trackedFiles: id: 33a07317a3b3 last_write_checksum: sha1:6e648ff58a70a0a3bd63a24676122b80eba4baf7 pristine_git_object: 2d1e9269b51d84cd8b21643fe04accd00839b013 - src/mistralai/client/models/audiourl.py: - id: f62d73a27faa - last_write_checksum: sha1:25e4a2f40630d678779befb4802a70b7fea582c1 - pristine_git_object: 98fef9770865c6ead929902a16286e7e697291c0 - src/mistralai/client/models/audiourlchunk.py: - id: f582b26db67b - last_write_checksum: sha1:dbfedb012b00140bc3ea91ac3f7ebf7b2a17ed17 - pristine_git_object: 89ebce795e95ab55e59652468bf55690e980a697 src/mistralai/client/models/authdata.py: id: b4d3fb07196e last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 @@ -2768,8 +2776,8 @@ trackedFiles: pristine_git_object: 520fb99b6430b317c326bdd9be86b63bd3822bd1 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 - last_write_checksum: sha1:872274333d03c88665b115a2eb99c2650ac7e3bb - pristine_git_object: 6d521e1a49c4ed1cdf6a3a3b85bfb17aa631f994 + last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea + pristine_git_object: e3de7591a089a3739af17108cecdc2d4240f10bf src/mistralai/client/models/conversationappendrequest.py: id: 81ce529e0865 last_write_checksum: sha1:bdae860241893ec3ab3f22bd57c45dede2927da3 @@ -2800,8 +2808,8 @@ trackedFiles: pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:56e87a8f6e4670392e10f392bec44a923f3e14f8 - pristine_git_object: cb5dc6a5f2d69331263c12870ff5603e703d6060 + last_write_checksum: sha1:3b21ed0d747df3b0917bcb1141e387b3c8eb8bd9 + pristine_git_object: 299b41fc79df3b8cd1221142aa693f77e060d757 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf last_write_checksum: sha1:86c11bbd5003fc1a6838636257e07404da981ca7 @@ -2820,8 +2828,8 @@ trackedFiles: pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:c349ea248a85a9a329fbf878507b32fc761c4639 - pristine_git_object: 2559a8872df6a9bf9dd088f05259c5464df19a7c + last_write_checksum: sha1:6e503a49b1edf52b2f9ecad17c96d9607d689899 + pristine_git_object: 9404e32c3f3158d5c6d63728d8eaa07a86f69b6c src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 last_write_checksum: sha1:3e0489836936a7a77fa3b41adde1eb459ecd176d @@ -2832,8 +2840,8 @@ trackedFiles: pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:28dd507f0d965b6e4ede3fb2248681e034b2bb4a - pristine_git_object: 8acbbd1b90bce84275d5e76ca74f2a2105c65f3f + last_write_checksum: sha1:55adc884e1fa3ee169d34812516e541407648368 + pristine_git_object: 1e0cb7b6b86f791d17655aa36f38842992380a69 src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 last_write_checksum: sha1:e648017622cd6e860cb15e5dd2b29bf9f2a00572 @@ -2874,6 +2882,10 @@ trackedFiles: id: 1c489bec2f53 last_write_checksum: sha1:45fa65be82712ce99304027c88f953f0932bdae4 pristine_git_object: 58874e014275b06ce19d145aaa34a48d11ca0950 + src/mistralai/client/models/customconnector.py: + id: 14f3643f7703 + last_write_checksum: sha1:1c452564f118d0efd906b7b7b62f3cac7b1fec2d + pristine_git_object: 23cddfc119ff3c2cf2d1a270c3830ce48c568f3a src/mistralai/client/models/dataset.py: id: cbf14670ee00 last_write_checksum: sha1:4636e54c4ca7825b93d55ef1f69b640557b26467 @@ -3212,8 +3224,8 @@ trackedFiles: pristine_git_object: 84b01078c2192de5d6668a6943d416a2ff30db5f src/mistralai/client/models/guardrailconfig.py: id: c72b74412547 - last_write_checksum: sha1:0054fd2ef6b4b169d5eddd9863b893ee160a86e8 - pristine_git_object: 9af986cf73791a19aeecc6d3b9cc28326b7b45f2 + last_write_checksum: sha1:b66f91989a8aabd977bce2c8fd225e6f47dae60d + pristine_git_object: 4f8fe352e9d0abc23468ed6498ebf63c7e4df5b6 src/mistralai/client/models/imagecontent.py: id: 3abe7faee278 last_write_checksum: sha1:22229b74dd00ebe78ea3589964367e0785f8bcf0 @@ -3532,24 +3544,32 @@ trackedFiles: pristine_git_object: d9293ccc163995cfe0419d05c90fe1ae8e75cf57 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:87bcbce66e719b06fa229edd875ff952cadb4ae9 - pristine_git_object: 74e113bf84fff58b037b1140e950c251801e347b + last_write_checksum: sha1:d08fe4b4bb63e20e51fed78f1bf376babe667179 + pristine_git_object: d7f765bf9657f7637da3ab00f545d0f3ce9d2614 src/mistralai/client/models/modellist.py: id: 00693c7eec60 last_write_checksum: sha1:de62fc6787f482e5df0ff0e70415f493f177b9a1 pristine_git_object: 5fd835f24cd1098a153ebfb3e958038a183d28a7 - src/mistralai/client/models/moderationllmv1action.py: - id: c95110c21e79 - last_write_checksum: sha1:53e2b0e06df3890cf9a1822dd19551adcc2f1a22 - pristine_git_object: ae3a6ee957e7e9a7a94e56a48204367e2b776a2d + src/mistralai/client/models/moderationllmaction.py: + id: 7b18ccbd8ca9 + last_write_checksum: sha1:0067c773f68e8c9a6fa9e802b1d5a5b97efa7d5b + pristine_git_object: a2553f3041e129df165d49072a60fe31cd8b387b src/mistralai/client/models/moderationllmv1categorythresholds.py: id: 0c51d6766440 last_write_checksum: sha1:17f74a67d19a59214e93c54e5cabc4132bdbee48 pristine_git_object: 0451ba3afcbff22d1cc41b784c896419bf49e5f5 src/mistralai/client/models/moderationllmv1config.py: id: 483378b56394 - last_write_checksum: sha1:be0b266e84480aa46ca1c5048357a6afd22d1ddb - pristine_git_object: b34dbbd34b61990962b67e7d8d8dea18297bd7dc + last_write_checksum: sha1:b512a61a1513ac50731ccf154b85e8d746f965db + pristine_git_object: da7156eb30c23a89648d8cc7e674910b12a0c896 + src/mistralai/client/models/moderationllmv2categorythresholds.py: + id: 4c2a8ff4d52b + last_write_checksum: sha1:2194db15a54038f89890c7d5b56aa50a2df0603c + pristine_git_object: 1754582b849a16dbf77fd9943edcc6f2f1c55ee2 + src/mistralai/client/models/moderationllmv2config.py: + id: bb511e7c628b + last_write_checksum: sha1:853c419e237e290057a6454ab99d492311d7b67b + pristine_git_object: df2b04bdfb831a71555a849209f10a1ef06d0564 src/mistralai/client/models/moderationobject.py: id: 132faad0549a last_write_checksum: sha1:a8c1454a533e466216ef98dd198ae8959f51fa76 @@ -3558,6 +3578,10 @@ trackedFiles: id: 06bab279cb31 last_write_checksum: sha1:b9158e575276c1e0a510c129347b9a98c5a70567 pristine_git_object: a8a8ec3d8d8a58deb3c1f8358c6dce5a9734f89c + src/mistralai/client/models/oauth2tokenauth.py: + id: 167c3b8a104e + last_write_checksum: sha1:146c4ce3a29c0bedcb575cf7fa32cb97aa375c5b + pristine_git_object: 76ebfd0de6c7457bcecb1aee026ea16ffa8a7cbd src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 last_write_checksum: sha1:f52abcb9e8f504fd9993679611912d3b64270452 @@ -3936,8 +3960,8 @@ trackedFiles: pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:940fbc17f2b76bacbdc38b1ad29abeb5eda33ed9 - pristine_git_object: dbe3499ed323b995453cd06ec54b55f75d2c4241 + last_write_checksum: sha1:8f522b8d81152da1248a00073265d927c43ecae5 + pristine_git_object: 584c034c988dbc50e7889b207118eb5f4545b09e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 last_write_checksum: sha1:cd461734ab9df9ca0d254c69a552b74b8f63f20e @@ -6025,7 +6049,7 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.start()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.append()`: \n * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get_history()`: \n * `response.entries[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get_messages()`: \n * `response.messages[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.restart()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.agents.stream()`: \n * `request.messages[].union(tool).content.union(Array)[]` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.agents.complete()`: \n * `request.messages[]` **Changed**\n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.fim.stream()`: \n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.fim.complete()`: \n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.chat.stream()`: \n * `request.messages[]` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.chat.complete()`: \n * `request.messages[].union(tool).content.union(Array)[]` **Changed**\n * `response.choices[].message.content.union(Array)[]` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.restart_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.append_stream()`: \n * `request.inputs.union(Array)[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.start_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks)` **Changed** (Breaking ⚠️)\n * `error.detail[]` **Changed**\n* `mistral.beta.connectors.delete()`: **Added**\n* `mistral.beta.conversations.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.delete()`: **Added**\n* `mistral.beta.observability.judges.update()`: **Added**\n* `mistral.beta.observability.campaigns.create()`: **Added**\n* `mistral.beta.observability.campaigns.list()`: **Added**\n* `mistral.beta.observability.campaigns.fetch()`: **Added**\n* `mistral.beta.observability.campaigns.delete()`: **Added**\n* `mistral.beta.observability.campaigns.fetch_status()`: **Added**\n* `mistral.beta.observability.campaigns.list_events()`: **Added**\n* `mistral.beta.observability.datasets.create()`: **Added**\n* `mistral.beta.observability.datasets.list()`: **Added**\n* `mistral.beta.observability.datasets.fetch()`: **Added**\n* `mistral.beta.observability.datasets.delete()`: **Added**\n* `mistral.beta.observability.datasets.update()`: **Added**\n* `mistral.beta.observability.datasets.list_records()`: **Added**\n* `mistral.beta.observability.datasets.create_record()`: **Added**\n* `mistral.beta.observability.datasets.import_from_campaign()`: **Added**\n* `mistral.beta.observability.datasets.import_from_explorer()`: **Added**\n* `mistral.beta.observability.datasets.import_from_file()`: **Added**\n* `mistral.beta.observability.datasets.import_from_playground()`: **Added**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: **Added**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: **Added**\n* `mistral.beta.observability.datasets.fetch_task()`: **Added**\n* `mistral.beta.observability.datasets.list_tasks()`: **Added**\n* `mistral.beta.observability.datasets.records.fetch()`: **Added**\n* `mistral.beta.observability.datasets.records.delete()`: **Added**\n* `mistral.beta.observability.datasets.records.bulk_delete()`: **Added**\n* `mistral.beta.observability.datasets.records.judge()`: **Added**\n* `mistral.beta.observability.datasets.records.update_payload()`: **Added**\n* `mistral.beta.observability.datasets.records.update_properties()`: **Added**\n* `mistral.beta.connectors.create()`: **Added**\n* `mistral.beta.connectors.list()`: **Added**\n* `mistral.beta.connectors.call_tool()`: **Added**\n* `mistral.beta.connectors.get()`: **Added**\n* `mistral.beta.connectors.update()`: **Added**\n* `mistral.beta.observability.judges.list()`: **Added**\n* `mistral.models.list()`: \n * `request` **Changed**\n * `error.status[422]` **Added**\n* `mistral.models.retrieve()`: `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.create()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: **Added**\n* `mistral.models.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.conversations.list()`: \n * `response.[].union(ModelConversation).guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.conversations.get()`: \n * `response.union(ModelConversation).guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.observability.judges.fetch()`: **Added**\n* `mistral.beta.agents.create()`: \n * `request.guardrails` **Added**\n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.list()`: \n * `response.[].guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.get()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.update()`: \n * `request.guardrails` **Added**\n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.update_version()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.list_versions()`: \n * `response.[].guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.get_version()`: \n * `response.guardrails` **Added**\n * `error.detail[]` **Changed**\n* `mistral.beta.agents.create_version_alias()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.list_version_aliases()`: `error.detail[]` **Changed**\n* `mistral.beta.agents.delete_version_alias()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.create()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.get()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.update()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.list()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.upload()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.get()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.update()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.delete()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.text_content()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.status()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.get_signed_url()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.extracted_text_signed_url()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.documents.reprocess()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.list()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.update_or_create()`: `error.detail[]` **Changed**\n* `mistral.beta.libraries.accesses.delete()`: `error.detail[]` **Changed**\n* `mistral.files.upload()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.files.list()`: `response.data[]` **Changed**\n* `mistral.files.retrieve()`: `response` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: **Added**\n* `mistral.beta.observability.chat_completion_events.judge()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: **Added**\n* `mistral.beta.observability.chat_completion_events.fetch()`: **Added**\n* `mistral.beta.observability.chat_completion_events.search_ids()`: **Added**\n* `mistral.beta.observability.chat_completion_events.search()`: **Added**\n* `mistral.embeddings.create()`: `error.detail[]` **Changed**\n* `mistral.classifiers.moderate()`: `error.detail[]` **Changed**\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[]` **Changed**\n * `error.detail[]` **Changed**\n* `mistral.classifiers.classify()`: `error.detail[]` **Changed**\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(Array)[].messages[].union(tool).content.union(Array)[]` **Changed**\n * `error.detail[]` **Changed**\n* `mistral.ocr.process()`: `error.detail[]` **Changed**\n" +releaseNotes: "## Python SDK Changes:\n* `mistral.chat.complete()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart_stream()`: \n * `request.guardrails[]` **Changed**\n* `mistral.beta.agents.update()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.beta.agents.update_version()`: `response` **Changed**\n* `mistral.beta.agents.list_versions()`: `response.[]` **Changed**\n* `mistral.beta.agents.get_version()`: `response` **Changed**\n* `mistral.beta.agents.get()`: `response` **Changed**\n* `mistral.beta.agents.list()`: `response.[]` **Changed**\n* `mistral.beta.agents.create()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.beta.conversations.start()`: `request` **Changed**\n* `mistral.beta.conversations.start_stream()`: `request` **Changed**\n* `mistral.beta.conversations.restart()`: \n * `request.guardrails[]` **Changed**\n* `mistral.beta.conversations.get()`: `response.union(ModelConversation)` **Changed**\n* `mistral.beta.conversations.list()`: `response.[].union(ModelConversation)` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1205fef8..17660f7a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.0 + version: 2.0.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 748a2257..0e45ebb7 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53 - sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d + sourceRevisionDigest: sha256:4ca07ff6dd708405d376cf74c8111d260aaa3aace7250a406ffbad01f3dfee44 + sourceBlobDigest: sha256:3a9d8e056455da40ba3d6b6abb665cf65ccc5b1ba63d84fb823c3156bd385a30 tags: - latest - - speakeasy-sdk-regen-1773084143 + - speakeasy-sdk-regen-1773249358 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:640293da26384ecedd813123997d7946815084924b8cbd91069aea0829d28b53 - sourceBlobDigest: sha256:940626b1345a63b95ae840bd523458ea2b418767d64b864ad06ded4d38c6ea4d + sourceRevisionDigest: sha256:4ca07ff6dd708405d376cf74c8111d260aaa3aace7250a406ffbad01f3dfee44 + sourceBlobDigest: sha256:3a9d8e056455da40ba3d6b6abb665cf65ccc5b1ba63d84fb823c3156bd385a30 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:57a8f791effc62a15982c2ca9560bddbf4a9d03ae9cb0171f352e73a34e7cf61 + codeSamplesRevisionDigest: sha256:b626a4c6b6a48943ae2fd215af3aa30cb923f2bad94bf4bbbb6a9c5838ad1c79 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.729.0 diff --git a/RELEASES.md b/RELEASES.md index 99c72716..3c67586a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -398,4 +398,14 @@ Based on: ### Generated - [python v2.0.0] . ### Releases -- [PyPI v2.0.0] https://pypi.org/project/mistralai/2.0.0 - . \ No newline at end of file +- [PyPI v2.0.0] https://pypi.org/project/mistralai/2.0.0 - . + +## 2026-03-11 17:15:32 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.1] . +### Releases +- [PyPI v2.0.1] https://pypi.org/project/mistralai/2.0.1 - . \ No newline at end of file diff --git a/docs/models/agenttool.md b/docs/models/agenttool.md index 022f7e10..0722e955 100644 --- a/docs/models/agenttool.md +++ b/docs/models/agenttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/apikeyauth.md b/docs/models/apikeyauth.md new file mode 100644 index 00000000..1fbff10e --- /dev/null +++ b/docs/models/apikeyauth.md @@ -0,0 +1,9 @@ +# APIKeyAuth + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `type` | *Literal["api-key"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourl.md b/docs/models/audiourl.md deleted file mode 100644 index 45ad7493..00000000 --- a/docs/models/audiourl.md +++ /dev/null @@ -1,13 +0,0 @@ -# AudioURL - -Audio URL. - -Attributes: - url: The URL of the audio file. - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `url` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourlchunk.md b/docs/models/audiourlchunk.md deleted file mode 100644 index 56af9df9..00000000 --- a/docs/models/audiourlchunk.md +++ /dev/null @@ -1,15 +0,0 @@ -# AudioURLChunk - -Audio URL chunk. - -Attributes: - type: The type of the chunk, which is always `ChunkTypes.audio_url`. - audio_url: The URL of the audio file. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `type` | *Literal["audio_url"]* | :heavy_check_mark: | N/A | -| `audio_url` | [models.AudioURLUnion](../models/audiourlunion.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/audiourlunion.md b/docs/models/audiourlunion.md deleted file mode 100644 index 96669066..00000000 --- a/docs/models/audiourlunion.md +++ /dev/null @@ -1,17 +0,0 @@ -# AudioURLUnion - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `models.AudioURL` - -```python -value: models.AudioURL = /* values here */ -``` - diff --git a/docs/models/authorization.md b/docs/models/authorization.md new file mode 100644 index 00000000..11ea5c6a --- /dev/null +++ b/docs/models/authorization.md @@ -0,0 +1,17 @@ +# Authorization + + +## Supported Types + +### `models.APIKeyAuth` + +```python +value: models.APIKeyAuth = /* values here */ +``` + +### `models.OAuth2TokenAuth` + +```python +value: models.OAuth2TokenAuth = /* values here */ +``` + diff --git a/docs/models/contentchunk.md b/docs/models/contentchunk.md index 5a8ef58c..cb7e51d3 100644 --- a/docs/models/contentchunk.md +++ b/docs/models/contentchunk.md @@ -45,9 +45,3 @@ value: models.ThinkChunk = /* values here */ value: models.AudioChunk = /* values here */ ``` -### `models.AudioURLChunk` - -```python -value: models.AudioURLChunk = /* values here */ -``` - diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index 9aabc52a..903d13c1 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -10,7 +10,7 @@ | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationRequestTool](../models/conversationrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationRequestTool](../models/conversationrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationrequesttool.md b/docs/models/conversationrequesttool.md index 2e4e8d01..5a58e6d1 100644 --- a/docs/models/conversationrequesttool.md +++ b/docs/models/conversationrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index f792c263..8debea1c 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -10,7 +10,7 @@ | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationStreamRequestTool](../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationStreamRequestTool](../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationstreamrequesttool.md b/docs/models/conversationstreamrequesttool.md index 0f75f82b..82ef640a 100644 --- a/docs/models/conversationstreamrequesttool.md +++ b/docs/models/conversationstreamrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/createagentrequesttool.md b/docs/models/createagentrequesttool.md index c6ed3e98..e45d57bc 100644 --- a/docs/models/createagentrequesttool.md +++ b/docs/models/createagentrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/customconnector.md b/docs/models/customconnector.md new file mode 100644 index 00000000..0a0b6921 --- /dev/null +++ b/docs/models/customconnector.md @@ -0,0 +1,11 @@ +# CustomConnector + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | *Literal["connector"]* | :heavy_check_mark: | N/A | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `authorization` | [OptionalNullable[models.Authorization]](../models/authorization.md) | :heavy_minus_sign: | N/A | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/guardrailconfig.md b/docs/models/guardrailconfig.md index 235d7204..1276462c 100644 --- a/docs/models/guardrailconfig.md +++ b/docs/models/guardrailconfig.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `block_on_error` | *Optional[bool]* | :heavy_minus_sign: | If true, return HTTP 403 and block request in the event of a server-side error | -| `moderation_llm_v1` | [Nullable[models.ModerationLlmv1Config]](../models/moderationllmv1config.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `block_on_error` | *Optional[bool]* | :heavy_minus_sign: | If true, return HTTP 403 and block request in the event of a server-side error | +| `moderation_llm_v1` | [OptionalNullable[models.ModerationLlmv1Config]](../models/moderationllmv1config.md) | :heavy_minus_sign: | N/A | +| `moderation_llm_v2` | [OptionalNullable[models.ModerationLlmv2Config]](../models/moderationllmv2config.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/modelconversationtool.md b/docs/models/modelconversationtool.md index 87235567..0b6a45f7 100644 --- a/docs/models/modelconversationtool.md +++ b/docs/models/modelconversationtool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/models/moderationllmv1action.md b/docs/models/moderationllmaction.md similarity index 80% rename from docs/models/moderationllmv1action.md rename to docs/models/moderationllmaction.md index e24d6a22..951880b6 100644 --- a/docs/models/moderationllmv1action.md +++ b/docs/models/moderationllmaction.md @@ -1,4 +1,4 @@ -# ModerationLlmv1Action +# ModerationLLMAction ## Values diff --git a/docs/models/moderationllmv1config.md b/docs/models/moderationllmv1config.md index 0c410947..bdb5812b 100644 --- a/docs/models/moderationllmv1config.md +++ b/docs/models/moderationllmv1config.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | -| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv1CategoryThresholds]](../models/moderationllmv1categorythresholds.md) | :heavy_minus_sign: | Override default thresholds for specific categories. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv1CategoryThresholds]](../models/moderationllmv1categorythresholds.md) | :heavy_minus_sign: | N/A | | `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | -| `action` | [Optional[models.ModerationLlmv1Action]](../models/moderationllmv1action.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/moderationllmv2categorythresholds.md b/docs/models/moderationllmv2categorythresholds.md new file mode 100644 index 00000000..e95b81b0 --- /dev/null +++ b/docs/models/moderationllmv2categorythresholds.md @@ -0,0 +1,18 @@ +# ModerationLlmv2CategoryThresholds + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `sexual` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `hate_and_discrimination` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `violence_and_threats` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `dangerous` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `criminal` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `selfharm` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `health` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `financial` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `law` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `pii` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `jailbreaking` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/moderationllmv2config.md b/docs/models/moderationllmv2config.md new file mode 100644 index 00000000..e928506c --- /dev/null +++ b/docs/models/moderationllmv2config.md @@ -0,0 +1,11 @@ +# ModerationLlmv2Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv2CategoryThresholds]](../models/moderationllmv2categorythresholds.md) | :heavy_minus_sign: | N/A | +| `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/oauth2tokenauth.md b/docs/models/oauth2tokenauth.md new file mode 100644 index 00000000..89f80436 --- /dev/null +++ b/docs/models/oauth2tokenauth.md @@ -0,0 +1,9 @@ +# OAuth2TokenAuth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `type` | *Literal["oauth2-token"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateagentrequesttool.md b/docs/models/updateagentrequesttool.md index e358b1ed..cf590a2f 100644 --- a/docs/models/updateagentrequesttool.md +++ b/docs/models/updateagentrequesttool.md @@ -9,6 +9,12 @@ value: models.CodeInterpreterTool = /* values here */ ``` +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + ### `models.DocumentLibraryTool` ```python diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 083b293d..0803b398 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -54,7 +54,7 @@ with Mistral( | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationRequestTool](../../models/conversationrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationRequestTool](../../models/conversationrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -428,7 +428,7 @@ with Mistral( | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConversationStreamRequestTool](../../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | List of tools which are available to the model during the conversation. | +| `tools` | List[[models.ConversationStreamRequestTool](../../models/conversationstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | `completion_args` | [OptionalNullable[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | N/A | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/pyproject.toml b/pyproject.toml index a2e89ff9..52251124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.0" +version = "2.0.1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index c7251c9c..7c37028e 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.0" +__version__: str = "2.0.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.841.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.0.1 2.841.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index a4af31f3..99f3a33e 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -235,12 +235,12 @@ def start( models.ConversationRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationRequestTool], List[models.ConversationRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -272,7 +272,7 @@ def start( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -303,7 +303,7 @@ def start( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationRequestTool]] + tools, OptionalNullable[List[models.ConversationRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] @@ -389,12 +389,12 @@ async def start_async( models.ConversationRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationRequestTool], List[models.ConversationRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -426,7 +426,7 @@ async def start_async( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -457,7 +457,7 @@ async def start_async( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationRequestTool]] + tools, OptionalNullable[List[models.ConversationRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] @@ -2019,12 +2019,12 @@ def start_stream( models.ConversationStreamRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationStreamRequestTool], List[models.ConversationStreamRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -2056,7 +2056,7 @@ def start_stream( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -2087,7 +2087,7 @@ def start_stream( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationStreamRequestTool]] + tools, OptionalNullable[List[models.ConversationStreamRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] @@ -2180,12 +2180,12 @@ async def start_stream_async( models.ConversationStreamRequestHandoffExecution ] = UNSET, instructions: OptionalNullable[str] = UNSET, - tools: Optional[ + tools: OptionalNullable[ Union[ List[models.ConversationStreamRequestTool], List[models.ConversationStreamRequestToolTypedDict], ] - ] = None, + ] = UNSET, completion_args: OptionalNullable[ Union[models.CompletionArgs, models.CompletionArgsTypedDict] ] = UNSET, @@ -2217,7 +2217,7 @@ async def start_stream_async( :param store: :param handoff_execution: :param instructions: - :param tools: List of tools which are available to the model during the conversation. + :param tools: :param completion_args: :param guardrails: :param name: @@ -2248,7 +2248,7 @@ async def start_stream_async( handoff_execution=handoff_execution, instructions=instructions, tools=utils.get_pydantic_model( - tools, Optional[List[models.ConversationStreamRequestTool]] + tools, OptionalNullable[List[models.ConversationStreamRequestTool]] ), completion_args=utils.get_pydantic_model( completion_args, OptionalNullable[models.CompletionArgs] diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 741c80f3..e0fd60e4 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -141,6 +141,7 @@ ) from .annotations import Annotations, AnnotationsTypedDict, Audience from .apiendpoint import APIEndpoint + from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict from .archivemodelresponse import ( ArchiveModelResponse, ArchiveModelResponseTypedDict, @@ -163,13 +164,6 @@ AudioTranscriptionRequestStream, AudioTranscriptionRequestStreamTypedDict, ) - from .audiourl import AudioURL, AudioURLTypedDict - from .audiourlchunk import ( - AudioURLChunk, - AudioURLChunkTypedDict, - AudioURLUnion, - AudioURLUnionTypedDict, - ) from .authdata import AuthData, AuthDataTypedDict from .basefielddefinition import ( BaseFieldDefinition, @@ -508,6 +502,13 @@ CreateLibraryRequest, CreateLibraryRequestTypedDict, ) + from .customconnector import ( + Authorization, + AuthorizationTypedDict, + CustomConnector, + CustomConnectorTypedDict, + UnknownAuthorization, + ) from .dataset import Dataset, DatasetTypedDict from .datasetimporttask import DatasetImportTask, DatasetImportTaskTypedDict from .datasetpreview import DatasetPreview, DatasetPreviewTypedDict @@ -1068,7 +1069,7 @@ ModelListTypedDict, UnknownModelListData, ) - from .moderationllmv1action import ModerationLlmv1Action + from .moderationllmaction import ModerationLLMAction from .moderationllmv1categorythresholds import ( ModerationLlmv1CategoryThresholds, ModerationLlmv1CategoryThresholdsTypedDict, @@ -1077,8 +1078,17 @@ ModerationLlmv1Config, ModerationLlmv1ConfigTypedDict, ) + from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, + ) + from .moderationllmv2config import ( + ModerationLlmv2Config, + ModerationLlmv2ConfigTypedDict, + ) from .moderationobject import ModerationObject, ModerationObjectTypedDict from .moderationresponse import ModerationResponse, ModerationResponseTypedDict + from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict from .observabilityerrorcode import ObservabilityErrorCode from .observabilityerrordetail import ( ObservabilityErrorDetail, @@ -1429,6 +1439,8 @@ __all__ = [ "APIEndpoint", + "APIKeyAuth", + "APIKeyAuthTypedDict", "Agent", "AgentAliasResponse", "AgentAliasResponseTypedDict", @@ -1531,14 +1543,10 @@ "AudioTranscriptionRequestStream", "AudioTranscriptionRequestStreamTypedDict", "AudioTranscriptionRequestTypedDict", - "AudioURL", - "AudioURLChunk", - "AudioURLChunkTypedDict", - "AudioURLTypedDict", - "AudioURLUnion", - "AudioURLUnionTypedDict", "AuthData", "AuthDataTypedDict", + "Authorization", + "AuthorizationTypedDict", "BaseFieldDefinition", "BaseFieldDefinitionTypedDict", "BaseModelCard", @@ -1770,6 +1778,8 @@ "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", + "CustomConnector", + "CustomConnectorTypedDict", "Dataset", "DatasetImportTask", "DatasetImportTaskTypedDict", @@ -2143,17 +2153,23 @@ "ModelListData", "ModelListDataTypedDict", "ModelListTypedDict", - "ModerationLlmv1Action", + "ModerationLLMAction", "ModerationLlmv1CategoryThresholds", "ModerationLlmv1CategoryThresholdsTypedDict", "ModerationLlmv1Config", "ModerationLlmv1ConfigTypedDict", + "ModerationLlmv2CategoryThresholds", + "ModerationLlmv2CategoryThresholdsTypedDict", + "ModerationLlmv2Config", + "ModerationLlmv2ConfigTypedDict", "ModerationObject", "ModerationObjectTypedDict", "ModerationResponse", "ModerationResponseTypedDict", "MultiPartBodyParams", "MultiPartBodyParamsTypedDict", + "OAuth2TokenAuth", + "OAuth2TokenAuthTypedDict", "OCRImageObject", "OCRImageObjectTypedDict", "OCRPageDimensions", @@ -2363,6 +2379,7 @@ "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", "UnknownAgentTool", + "UnknownAuthorization", "UnknownClassifierFineTuningJobDetailsIntegration", "UnknownClassifierFineTuningJobIntegration", "UnknownCompletionFineTuningJobDetailsIntegration", @@ -2513,6 +2530,8 @@ "AnnotationsTypedDict": ".annotations", "Audience": ".annotations", "APIEndpoint": ".apiendpoint", + "APIKeyAuth": ".apikeyauth", + "APIKeyAuthTypedDict": ".apikeyauth", "ArchiveModelResponse": ".archivemodelresponse", "ArchiveModelResponseTypedDict": ".archivemodelresponse", "AssistantMessage": ".assistantmessage", @@ -2530,12 +2549,6 @@ "AudioTranscriptionRequestTypedDict": ".audiotranscriptionrequest", "AudioTranscriptionRequestStream": ".audiotranscriptionrequeststream", "AudioTranscriptionRequestStreamTypedDict": ".audiotranscriptionrequeststream", - "AudioURL": ".audiourl", - "AudioURLTypedDict": ".audiourl", - "AudioURLChunk": ".audiourlchunk", - "AudioURLChunkTypedDict": ".audiourlchunk", - "AudioURLUnion": ".audiourlchunk", - "AudioURLUnionTypedDict": ".audiourlchunk", "AuthData": ".authdata", "AuthDataTypedDict": ".authdata", "BaseFieldDefinition": ".basefielddefinition", @@ -2783,6 +2796,11 @@ "CreateJudgeRequestTypedDict": ".createjudgerequest", "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", + "Authorization": ".customconnector", + "AuthorizationTypedDict": ".customconnector", + "CustomConnector": ".customconnector", + "CustomConnectorTypedDict": ".customconnector", + "UnknownAuthorization": ".customconnector", "Dataset": ".dataset", "DatasetTypedDict": ".dataset", "DatasetImportTask": ".datasetimporttask", @@ -3168,15 +3186,21 @@ "ModelListDataTypedDict": ".modellist", "ModelListTypedDict": ".modellist", "UnknownModelListData": ".modellist", - "ModerationLlmv1Action": ".moderationllmv1action", + "ModerationLLMAction": ".moderationllmaction", "ModerationLlmv1CategoryThresholds": ".moderationllmv1categorythresholds", "ModerationLlmv1CategoryThresholdsTypedDict": ".moderationllmv1categorythresholds", "ModerationLlmv1Config": ".moderationllmv1config", "ModerationLlmv1ConfigTypedDict": ".moderationllmv1config", + "ModerationLlmv2CategoryThresholds": ".moderationllmv2categorythresholds", + "ModerationLlmv2CategoryThresholdsTypedDict": ".moderationllmv2categorythresholds", + "ModerationLlmv2Config": ".moderationllmv2config", + "ModerationLlmv2ConfigTypedDict": ".moderationllmv2config", "ModerationObject": ".moderationobject", "ModerationObjectTypedDict": ".moderationobject", "ModerationResponse": ".moderationresponse", "ModerationResponseTypedDict": ".moderationresponse", + "OAuth2TokenAuth": ".oauth2tokenauth", + "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", "ObservabilityErrorCode": ".observabilityerrorcode", "ObservabilityErrorDetail": ".observabilityerrordetail", "ObservabilityErrorDetailTypedDict": ".observabilityerrordetail", diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 1fa27f08..068b3226 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -37,6 +38,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -53,6 +55,7 @@ class UnknownAgentTool(BaseModel): _AGENT_TOOL_VARIANTS: dict[str, Any] = { "code_interpreter": CodeInterpreterTool, + "connector": CustomConnector, "document_library": DocumentLibraryTool, "function": FunctionTool, "image_generation": ImageGenerationTool, @@ -64,6 +67,7 @@ class UnknownAgentTool(BaseModel): AgentTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/src/mistralai/client/models/apikeyauth.py b/src/mistralai/client/models/apikeyauth.py new file mode 100644 index 00000000..10cbaf58 --- /dev/null +++ b/src/mistralai/client/models/apikeyauth.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f55510f5ff82 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class APIKeyAuthTypedDict(TypedDict): + value: str + type: Literal["api-key"] + + +class APIKeyAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[Literal["api-key"], AfterValidator(validate_const("api-key"))], + pydantic.Field(alias="type"), + ] = "api-key" + + +try: + APIKeyAuth.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/audiourl.py b/src/mistralai/client/models/audiourl.py deleted file mode 100644 index 98fef977..00000000 --- a/src/mistralai/client/models/audiourl.py +++ /dev/null @@ -1,26 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: f62d73a27faa - -from __future__ import annotations -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class AudioURLTypedDict(TypedDict): - r"""Audio URL. - - Attributes: - url: The URL of the audio file. - """ - - url: str - - -class AudioURL(BaseModel): - r"""Audio URL. - - Attributes: - url: The URL of the audio file. - """ - - url: str diff --git a/src/mistralai/client/models/audiourlchunk.py b/src/mistralai/client/models/audiourlchunk.py deleted file mode 100644 index 89ebce79..00000000 --- a/src/mistralai/client/models/audiourlchunk.py +++ /dev/null @@ -1,53 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: f582b26db67b - -from __future__ import annotations -from .audiourl import AudioURL, AudioURLTypedDict -from mistralai.client.types import BaseModel -from mistralai.client.utils import validate_const -import pydantic -from pydantic.functional_validators import AfterValidator -from typing import Literal, Union -from typing_extensions import Annotated, TypeAliasType, TypedDict - - -AudioURLUnionTypedDict = TypeAliasType( - "AudioURLUnionTypedDict", Union[AudioURLTypedDict, str] -) - - -AudioURLUnion = TypeAliasType("AudioURLUnion", Union[AudioURL, str]) - - -class AudioURLChunkTypedDict(TypedDict): - r"""Audio URL chunk. - - Attributes: - type: The type of the chunk, which is always `ChunkTypes.audio_url`. - audio_url: The URL of the audio file. - """ - - audio_url: AudioURLUnionTypedDict - type: Literal["audio_url"] - - -class AudioURLChunk(BaseModel): - r"""Audio URL chunk. - - Attributes: - type: The type of the chunk, which is always `ChunkTypes.audio_url`. - audio_url: The URL of the audio file. - """ - - audio_url: AudioURLUnion - - type: Annotated[ - Annotated[Literal["audio_url"], AfterValidator(validate_const("audio_url"))], - pydantic.Field(alias="type"), - ] = "audio_url" - - -try: - AudioURLChunk.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/contentchunk.py b/src/mistralai/client/models/contentchunk.py index 6d521e1a..e3de7591 100644 --- a/src/mistralai/client/models/contentchunk.py +++ b/src/mistralai/client/models/contentchunk.py @@ -3,7 +3,6 @@ from __future__ import annotations from .audiochunk import AudioChunk, AudioChunkTypedDict -from .audiourlchunk import AudioURLChunk, AudioURLChunkTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .filechunk import FileChunk, FileChunkTypedDict from .imageurlchunk import ImageURLChunk, ImageURLChunkTypedDict @@ -27,7 +26,6 @@ ReferenceChunkTypedDict, FileChunkTypedDict, AudioChunkTypedDict, - AudioURLChunkTypedDict, DocumentURLChunkTypedDict, ThinkChunkTypedDict, ], @@ -52,7 +50,6 @@ class UnknownContentChunk(BaseModel): "file": FileChunk, "thinking": ThinkChunk, "input_audio": AudioChunk, - "audio_url": AudioURLChunk, } @@ -65,7 +62,6 @@ class UnknownContentChunk(BaseModel): FileChunk, ThinkChunk, AudioChunk, - AudioURLChunk, UnknownContentChunk, ], BeforeValidator( diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index cb5dc6a5..299b41fc 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -5,6 +5,7 @@ from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -38,6 +39,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -45,6 +47,7 @@ ConversationRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, @@ -71,8 +74,7 @@ class ConversationRequestTypedDict(TypedDict): store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] - tools: NotRequired[List[ConversationRequestToolTypedDict]] - r"""List of tools which are available to the model during the conversation.""" + tools: NotRequired[Nullable[List[ConversationRequestToolTypedDict]]] completion_args: NotRequired[Nullable[CompletionArgsTypedDict]] guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] @@ -94,8 +96,7 @@ class ConversationRequest(BaseModel): instructions: OptionalNullable[str] = UNSET - tools: Optional[List[ConversationRequestTool]] = None - r"""List of tools which are available to the model during the conversation.""" + tools: OptionalNullable[List[ConversationRequestTool]] = UNSET completion_args: OptionalNullable[CompletionArgs] = UNSET @@ -137,6 +138,7 @@ def serialize_model(self, handler): "store", "handoff_execution", "instructions", + "tools", "completion_args", "guardrails", "name", diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index 2559a887..9404e32c 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -5,6 +5,7 @@ from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -38,6 +39,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -45,6 +47,7 @@ ConversationStreamRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, @@ -71,8 +74,7 @@ class ConversationStreamRequestTypedDict(TypedDict): store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationStreamRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] - tools: NotRequired[List[ConversationStreamRequestToolTypedDict]] - r"""List of tools which are available to the model during the conversation.""" + tools: NotRequired[Nullable[List[ConversationStreamRequestToolTypedDict]]] completion_args: NotRequired[Nullable[CompletionArgsTypedDict]] guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] @@ -96,8 +98,7 @@ class ConversationStreamRequest(BaseModel): instructions: OptionalNullable[str] = UNSET - tools: Optional[List[ConversationStreamRequestTool]] = None - r"""List of tools which are available to the model during the conversation.""" + tools: OptionalNullable[List[ConversationStreamRequestTool]] = UNSET completion_args: OptionalNullable[CompletionArgs] = UNSET @@ -139,6 +140,7 @@ def serialize_model(self, handler): "store", "handoff_execution", "instructions", + "tools", "completion_args", "guardrails", "name", diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index 8acbbd1b..1e0cb7b6 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -31,6 +32,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -38,6 +40,7 @@ CreateAgentRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/src/mistralai/client/models/customconnector.py b/src/mistralai/client/models/customconnector.py new file mode 100644 index 00000000..23cddfc1 --- /dev/null +++ b/src/mistralai/client/models/customconnector.py @@ -0,0 +1,108 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 14f3643f7703 + +from __future__ import annotations +from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict +from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from functools import partial +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +from mistralai.client.utils.unions import parse_open_union +import pydantic +from pydantic import ConfigDict, model_serializer +from pydantic.functional_validators import AfterValidator, BeforeValidator +from typing import Any, Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +AuthorizationTypedDict = TypeAliasType( + "AuthorizationTypedDict", Union[OAuth2TokenAuthTypedDict, APIKeyAuthTypedDict] +) + + +class UnknownAuthorization(BaseModel): + r"""A Authorization variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_AUTHORIZATION_VARIANTS: dict[str, Any] = { + "api-key": APIKeyAuth, + "oauth2-token": OAuth2TokenAuth, +} + + +Authorization = Annotated[ + Union[APIKeyAuth, OAuth2TokenAuth, UnknownAuthorization], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_AUTHORIZATION_VARIANTS, + unknown_cls=UnknownAuthorization, + union_name="Authorization", + ) + ), +] + + +class CustomConnectorTypedDict(TypedDict): + connector_id: str + type: Literal["connector"] + authorization: NotRequired[Nullable[AuthorizationTypedDict]] + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + + +class CustomConnector(BaseModel): + connector_id: str + + type: Annotated[ + Annotated[Literal["connector"], AfterValidator(validate_const("connector"))], + pydantic.Field(alias="type"), + ] = "connector" + + authorization: OptionalNullable[Authorization] = UNSET + + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["authorization", "tool_configuration"]) + nullable_fields = set(["authorization", "tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomConnector.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/guardrailconfig.py b/src/mistralai/client/models/guardrailconfig.py index 9af986cf..4f8fe352 100644 --- a/src/mistralai/client/models/guardrailconfig.py +++ b/src/mistralai/client/models/guardrailconfig.py @@ -3,28 +3,40 @@ from __future__ import annotations from .moderationllmv1config import ModerationLlmv1Config, ModerationLlmv1ConfigTypedDict -from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from .moderationllmv2config import ModerationLlmv2Config, ModerationLlmv2ConfigTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict class GuardrailConfigTypedDict(TypedDict): - moderation_llm_v1: Nullable[ModerationLlmv1ConfigTypedDict] block_on_error: NotRequired[bool] r"""If true, return HTTP 403 and block request in the event of a server-side error""" + moderation_llm_v1: NotRequired[Nullable[ModerationLlmv1ConfigTypedDict]] + moderation_llm_v2: NotRequired[Nullable[ModerationLlmv2ConfigTypedDict]] class GuardrailConfig(BaseModel): - moderation_llm_v1: Nullable[ModerationLlmv1Config] - block_on_error: Optional[bool] = False r"""If true, return HTTP 403 and block request in the event of a server-side error""" + moderation_llm_v1: OptionalNullable[ModerationLlmv1Config] = UNSET + + moderation_llm_v2: OptionalNullable[ModerationLlmv2Config] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["block_on_error"]) - nullable_fields = set(["moderation_llm_v1"]) + optional_fields = set( + ["block_on_error", "moderation_llm_v1", "moderation_llm_v2"] + ) + nullable_fields = set(["moderation_llm_v1", "moderation_llm_v2"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index 74e113bf..d7f765bf 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -37,6 +38,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -53,6 +55,7 @@ class UnknownModelConversationTool(BaseModel): _MODEL_CONVERSATION_TOOL_VARIANTS: dict[str, Any] = { "code_interpreter": CodeInterpreterTool, + "connector": CustomConnector, "document_library": DocumentLibraryTool, "function": FunctionTool, "image_generation": ImageGenerationTool, @@ -64,6 +67,7 @@ class UnknownModelConversationTool(BaseModel): ModelConversationTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/src/mistralai/client/models/moderationllmv1action.py b/src/mistralai/client/models/moderationllmaction.py similarity index 81% rename from src/mistralai/client/models/moderationllmv1action.py rename to src/mistralai/client/models/moderationllmaction.py index ae3a6ee9..a2553f30 100644 --- a/src/mistralai/client/models/moderationllmv1action.py +++ b/src/mistralai/client/models/moderationllmaction.py @@ -1,12 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: c95110c21e79 +# @generated-id: 7b18ccbd8ca9 from __future__ import annotations from mistralai.client.types import UnrecognizedStr from typing import Literal, Union -ModerationLlmv1Action = Union[ +ModerationLLMAction = Union[ Literal[ "none", "block", diff --git a/src/mistralai/client/models/moderationllmv1config.py b/src/mistralai/client/models/moderationllmv1config.py index b34dbbd3..da7156eb 100644 --- a/src/mistralai/client/models/moderationllmv1config.py +++ b/src/mistralai/client/models/moderationllmv1config.py @@ -2,7 +2,7 @@ # @generated-id: 483378b56394 from __future__ import annotations -from .moderationllmv1action import ModerationLlmv1Action +from .moderationllmaction import ModerationLLMAction from .moderationllmv1categorythresholds import ( ModerationLlmv1CategoryThresholds, ModerationLlmv1CategoryThresholdsTypedDict, @@ -25,10 +25,9 @@ class ModerationLlmv1ConfigTypedDict(TypedDict): custom_category_thresholds: NotRequired[ Nullable[ModerationLlmv1CategoryThresholdsTypedDict] ] - r"""Override default thresholds for specific categories.""" ignore_other_categories: NotRequired[bool] r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" - action: NotRequired[ModerationLlmv1Action] + action: NotRequired[ModerationLLMAction] class ModerationLlmv1Config(BaseModel): @@ -38,12 +37,11 @@ class ModerationLlmv1Config(BaseModel): custom_category_thresholds: OptionalNullable[ModerationLlmv1CategoryThresholds] = ( UNSET ) - r"""Override default thresholds for specific categories.""" ignore_other_categories: Optional[bool] = False r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" - action: Optional[ModerationLlmv1Action] = None + action: Optional[ModerationLLMAction] = None @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/moderationllmv2categorythresholds.py b/src/mistralai/client/models/moderationllmv2categorythresholds.py new file mode 100644 index 00000000..1754582b --- /dev/null +++ b/src/mistralai/client/models/moderationllmv2categorythresholds.py @@ -0,0 +1,104 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4c2a8ff4d52b + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv2CategoryThresholdsTypedDict(TypedDict): + sexual: NotRequired[Nullable[float]] + hate_and_discrimination: NotRequired[Nullable[float]] + violence_and_threats: NotRequired[Nullable[float]] + dangerous: NotRequired[Nullable[float]] + criminal: NotRequired[Nullable[float]] + selfharm: NotRequired[Nullable[float]] + health: NotRequired[Nullable[float]] + financial: NotRequired[Nullable[float]] + law: NotRequired[Nullable[float]] + pii: NotRequired[Nullable[float]] + jailbreaking: NotRequired[Nullable[float]] + + +class ModerationLlmv2CategoryThresholds(BaseModel): + sexual: OptionalNullable[float] = UNSET + + hate_and_discrimination: OptionalNullable[float] = UNSET + + violence_and_threats: OptionalNullable[float] = UNSET + + dangerous: OptionalNullable[float] = UNSET + + criminal: OptionalNullable[float] = UNSET + + selfharm: OptionalNullable[float] = UNSET + + health: OptionalNullable[float] = UNSET + + financial: OptionalNullable[float] = UNSET + + law: OptionalNullable[float] = UNSET + + pii: OptionalNullable[float] = UNSET + + jailbreaking: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + nullable_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/moderationllmv2config.py b/src/mistralai/client/models/moderationllmv2config.py new file mode 100644 index 00000000..df2b04bd --- /dev/null +++ b/src/mistralai/client/models/moderationllmv2config.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: bb511e7c628b + +from __future__ import annotations +from .moderationllmaction import ModerationLLMAction +from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv2ConfigTypedDict(TypedDict): + model_name: NotRequired[str] + r"""Override model name. Should be omitted in general.""" + custom_category_thresholds: NotRequired[ + Nullable[ModerationLlmv2CategoryThresholdsTypedDict] + ] + ignore_other_categories: NotRequired[bool] + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + action: NotRequired[ModerationLLMAction] + + +class ModerationLlmv2Config(BaseModel): + model_name: Optional[str] = "mistral-moderation-2603" + r"""Override model name. Should be omitted in general.""" + + custom_category_thresholds: OptionalNullable[ModerationLlmv2CategoryThresholds] = ( + UNSET + ) + + ignore_other_categories: Optional[bool] = False + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + + action: Optional[ModerationLLMAction] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "model_name", + "custom_category_thresholds", + "ignore_other_categories", + "action", + ] + ) + nullable_fields = set(["custom_category_thresholds"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/oauth2tokenauth.py b/src/mistralai/client/models/oauth2tokenauth.py new file mode 100644 index 00000000..76ebfd0d --- /dev/null +++ b/src/mistralai/client/models/oauth2tokenauth.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 167c3b8a104e + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class OAuth2TokenAuthTypedDict(TypedDict): + value: str + type: Literal["oauth2-token"] + + +class OAuth2TokenAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[ + Literal["oauth2-token"], AfterValidator(validate_const("oauth2-token")) + ], + pydantic.Field(alias="type"), + ] = "oauth2-token" + + +try: + OAuth2TokenAuth.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index dbe3499e..584c034c 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -4,6 +4,7 @@ from __future__ import annotations from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict @@ -31,6 +32,7 @@ CodeInterpreterToolTypedDict, ImageGenerationToolTypedDict, DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, ], ) @@ -38,6 +40,7 @@ UpdateAgentRequestTool = Annotated[ Union[ CodeInterpreterTool, + CustomConnector, DocumentLibraryTool, FunctionTool, ImageGenerationTool, diff --git a/uv.lock b/uv.lock index c359ba58..9a01d8e6 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.0" +version = "2.0.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 93e78a9cb3ec69078911afbcfa17e1fa4af0c49a Mon Sep 17 00:00:00 2001 From: andreaonofrei01 Date: Thu, 12 Mar 2026 16:57:07 +0100 Subject: [PATCH 14/82] fix: docs fixes and publish pipeline for 2.0.1.post1 Docs-only fixes (broken links, typos, syntax) and publish pipeline alignment for a 2.0.1.post1 PyPI release. --- .github/workflows/run_example_scripts.yaml | 1 - .../workflows/sdk_publish_mistralai_sdk.yaml | 10 +- .gitignore | 1 - README-PYPI.md | 1070 +++++++++++++++++ README.md | 33 +- USAGE.md | 10 +- docs/models/chatcompletionrequest.md | 2 +- docs/models/chatcompletionstreamrequest.md | 2 +- docs/sdks/accesses/README.md | 2 +- docs/sdks/agents/README.md | 2 +- docs/sdks/betaagents/README.md | 8 +- docs/sdks/chat/README.md | 6 +- docs/sdks/conversations/README.md | 8 +- docs/sdks/documents/README.md | 4 +- docs/sdks/files/README.md | 2 +- docs/sdks/fim/README.md | 2 +- docs/sdks/libraries/README.md | 2 +- docs/sdks/transcriptions/README.md | 2 +- .../agents/async_agents_no_streaming.py | 22 +- .../agents/async_multi_turn_conversation.py | 41 +- packages/azure/.genignore | 1 + packages/azure/README.md | 6 +- packages/azure/USAGE.md | 2 +- packages/azure/docs/sdks/chat/README.md | 6 +- packages/azure/pyproject.toml | 2 +- packages/azure/scripts/prepare_readme.py | 65 +- packages/gcp/.genignore | 1 + packages/gcp/README.md | 6 +- packages/gcp/USAGE.md | 2 +- .../gcp/docs/models/chatcompletionrequest.md | 2 +- .../models/chatcompletionstreamrequest.md | 2 +- packages/gcp/docs/sdks/chat/README.md | 10 +- packages/gcp/docs/sdks/fim/README.md | 2 +- packages/gcp/pyproject.toml | 2 +- packages/gcp/scripts/prepare_readme.py | 65 +- pyproject.toml | 4 +- scripts/prepare_readme.py | 130 +- src/mistralai/extra/README.md | 4 +- tests/test_prepare_readme.py | 87 +- uv.lock | 2 +- 40 files changed, 1373 insertions(+), 258 deletions(-) create mode 100644 README-PYPI.md diff --git a/.github/workflows/run_example_scripts.yaml b/.github/workflows/run_example_scripts.yaml index cecefb0e..4f82e0d7 100644 --- a/.github/workflows/run_example_scripts.yaml +++ b/.github/workflows/run_example_scripts.yaml @@ -47,5 +47,4 @@ jobs: uv pip install --system "$PACKAGE" ./scripts/run_examples.sh env: - MISTRAL_AGENT_ID: ${{ secrets.CI_AGENT_ID }} MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }} diff --git a/.github/workflows/sdk_publish_mistralai_sdk.yaml b/.github/workflows/sdk_publish_mistralai_sdk.yaml index 0483de11..c3fdd9e0 100644 --- a/.github/workflows/sdk_publish_mistralai_sdk.yaml +++ b/.github/workflows/sdk_publish_mistralai_sdk.yaml @@ -6,6 +6,11 @@ permissions: statuses: write "on": workflow_dispatch: + inputs: + confirm_publish: + description: 'Type "publish" to confirm.' + required: false + type: string push: branches: - main @@ -14,7 +19,10 @@ permissions: - "*/RELEASES.md" jobs: publish: - if: github.ref == 'refs/heads/main' + # Auto-publish on push to main branch; require manual confirmation for workflow_dispatch + if: | + (github.event_name == 'push' && github.ref == 'refs/heads/main') || + (github.event_name == 'workflow_dispatch' && github.event.inputs.confirm_publish == 'publish') uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 secrets: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index cf2de5ee..7ead1d0d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ **/.speakeasy/logs/ .vscode/ .speakeasy/reports -README-PYPI.md .venv/ pyrightconfig.json src/*.egg-info/ diff --git a/README-PYPI.md b/README-PYPI.md new file mode 100644 index 00000000..ac177f6b --- /dev/null +++ b/README-PYPI.md @@ -0,0 +1,1070 @@ +# Mistral Python Client + +## Migrating from v1 + +If you are upgrading from v1 to v2, check the [migration guide](https://github.com/mistralai/client-python/blob/main/MIGRATION.md) for details on breaking changes and how to update your code. + +## API Key Setup + +Before you begin, you will need a Mistral AI API key. + +1. Get your own Mistral API Key: +2. Set your Mistral API Key as an environment variable. You only need to do this once. + +```bash +# set Mistral API Key (using zsh for example) +$ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv + +# reload the environment (or just quit and open a new terminal) +$ source ~/.zshenv +``` + + +## Summary + +Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it. + + + +## Table of Contents + +* [Mistral Python Client](#mistral-python-client) + * [Migrating from v1](#migrating-from-v1) + * [API Key Setup](#api-key-setup) + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Providers' SDKs Example Usage](#providers-sdks-example-usage) + * [Available Resources and Operations](#available-resources-and-operations) + * [Server-sent event streaming](#server-sent-event-streaming) + * [File uploads](#file-uploads) + * [Retries](#retries) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Custom HTTP Client](#custom-http-client) + * [Authentication](#authentication) + * [Resource Management](#resource-management) + * [Debugging](#debugging) + * [IDE Support](#ide-support) +* [Development](#development) + * [Contributions](#contributions) + + + + +## SDK Installation + +> [!NOTE] +> **Python version upgrade policy** +> +> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated. + +The SDK can be installed with *uv*, *pip*, or *poetry* package managers. + +### uv + +*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities. + +```bash +uv add mistralai +``` + +### PIP + +*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line. + +```bash +pip install mistralai +``` + +### Poetry + +*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies. + +```bash +poetry add mistralai +``` + +### Shell and script usage with `uv` + +You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so: + +```shell +uvx --from mistralai python +``` + +It's also possible to write a standalone Python script without needing to set up a whole project like so: + +```python +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.10" +# dependencies = [ +# "mistralai", +# ] +# /// + +from mistralai.client import Mistral + +sdk = Mistral( + # SDK arguments +) + +# Rest of script here... +``` + +Once that is saved to a file, you can run it with `uv run script.py` where +`script.py` can be replaced with the actual file name. + + +### Agents extra dependencies + +When using the agents related feature it is required to add the `agents` extra dependencies. This can be added when +installing the package: + +```bash +pip install "mistralai[agents]" +``` + +> Note: These features require Python 3.10+ (the SDK minimum). + +### Additional packages + +Additional `mistralai-*` packages (e.g. `mistralai-workflows`) can be installed separately and are available under the `mistralai` namespace: + +```bash +pip install mistralai-workflows +``` + + +## SDK Example Usage + +### Create Chat Completions + +This example shows how to create chat completions. + +```python +# Synchronous Example +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.chat.complete(model="mistral-large-latest", messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], stream=False, response_format={ + "type": "text", + }) + + # Handle response + print(res) +``` + +
+ +The same SDK client can also be used to make asynchronous requests by importing asyncio. + +```python +# Asynchronous Example +import asyncio +from mistralai.client import Mistral +import os + +async def main(): + + async with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), + ) as mistral: + + res = await mistral.chat.complete_async(model="mistral-large-latest", messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], stream=False, response_format={ + "type": "text", + }) + + # Handle response + print(res) + +asyncio.run(main()) +``` + +### Upload a file + +This example shows how to upload a file. + +```python +# Synchronous Example +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.files.upload(file={ + "file_name": "example.file", + "content": open("example.file", "rb"), + }, visibility="workspace") + + # Handle response + print(res) +``` + +
+ +The same SDK client can also be used to make asynchronous requests by importing asyncio. + +```python +# Asynchronous Example +import asyncio +from mistralai.client import Mistral +import os + +async def main(): + + async with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), + ) as mistral: + + res = await mistral.files.upload_async(file={ + "file_name": "example.file", + "content": open("example.file", "rb"), + }, visibility="workspace") + + # Handle response + print(res) + +asyncio.run(main()) +``` + +### Create Agents Completions + +This example shows how to create agents completions. + +```python +# Synchronous Example +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.agents.complete(messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], agent_id="", stream=False, response_format={ + "type": "text", + }) + + # Handle response + print(res) +``` + +
+ +The same SDK client can also be used to make asynchronous requests by importing asyncio. + +```python +# Asynchronous Example +import asyncio +from mistralai.client import Mistral +import os + +async def main(): + + async with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), + ) as mistral: + + res = await mistral.agents.complete_async(messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], agent_id="", stream=False, response_format={ + "type": "text", + }) + + # Handle response + print(res) + +asyncio.run(main()) +``` + +### Create Embedding Request + +This example shows how to create an embedding request. + +```python +# Synchronous Example +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.embeddings.create(model="mistral-embed", inputs=[ + "Embed this sentence.", + "As well as this one.", + ]) + + # Handle response + print(res) +``` + +
+ +The same SDK client can also be used to make asynchronous requests by importing asyncio. + +```python +# Asynchronous Example +import asyncio +from mistralai.client import Mistral +import os + +async def main(): + + async with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), + ) as mistral: + + res = await mistral.embeddings.create_async(model="mistral-embed", inputs=[ + "Embed this sentence.", + "As well as this one.", + ]) + + # Handle response + print(res) + +asyncio.run(main()) +``` + + + +### More examples + +You can run the examples in the `examples/` directory using `uv run`. + + +## Providers' SDKs Example Usage + +### Azure AI + +**Prerequisites** + +Before you begin, ensure you have `AZURE_ENDPOINT` and an `AZURE_API_KEY`. To obtain these, you will need to deploy Mistral on Azure AI. +See [instructions for deploying Mistral on Azure AI here](https://docs.mistral.ai/deployment/cloud/azure/). + +**Step 1: Install** + +```bash +pip install mistralai +``` + +**Step 2: Example Usage** + +Here's a basic example to get you started. You can also run [the example in the `examples` directory](https://github.com/mistralai/client-python/blob/main/examples/azure). + +```python +import os +from mistralai.azure.client import MistralAzure + +# The SDK automatically injects api-version as a query parameter +client = MistralAzure( + api_key=os.environ["AZURE_API_KEY"], + server_url=os.environ["AZURE_ENDPOINT"], + api_version="2024-05-01-preview", # Optional, this is the default +) + +res = client.chat.complete( + model=os.environ["AZURE_MODEL"], + messages=[ + { + "role": "user", + "content": "Hello there!", + } + ], +) +print(res.choices[0].message.content) +``` + +### Google Cloud + + +**Prerequisites** + +Before you begin, you will need to create a Google Cloud project and enable the Mistral API. To do this, follow the instructions [here](https://docs.mistral.ai/deployment/cloud/vertex/). + +To run this locally you will also need to ensure you are authenticated with Google Cloud. You can do this by running + +```bash +gcloud auth application-default login +``` + +**Step 1: Install** + +```bash +pip install mistralai +# For GCP authentication support (required): +pip install "mistralai[gcp]" +``` + +**Step 2: Example Usage** + +Here's a basic example to get you started. You can also run [the example in the `examples` directory](https://github.com/mistralai/client-python/blob/main/examples/gcp). + +The SDK automatically: +- Detects credentials via `google.auth.default()` +- Auto-refreshes tokens when they expire +- Builds the Vertex AI URL from `project_id` and `region` + +```python +import os +from mistralai.gcp.client import MistralGCP + +# The SDK auto-detects credentials and builds the Vertex AI URL +client = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected from credentials + region="us-central1", # Default: europe-west4 +) + +res = client.chat.complete( + model="mistral-small-2503", + messages=[ + { + "role": "user", + "content": "Hello there!", + } + ], +) +print(res.choices[0].message.content) +``` + + + +## Available Resources and Operations + +
+Available methods + +### [Agents](https://github.com/mistralai/client-python/blob/main/docs/sdks/agents/README.md) + +* [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/agents/README.md#complete) - Agents Completion +* [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/agents/README.md#stream) - Stream Agents completion + +### [Audio.Transcriptions](https://github.com/mistralai/client-python/blob/main/docs/sdks/transcriptions/README.md) + +* [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/transcriptions/README.md#complete) - Create Transcription +* [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/transcriptions/README.md#stream) - Create Streaming Transcription (SSE) + +### [Batch.Jobs](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#list) - Get Batch Jobs +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#create) - Create Batch Job +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#get) - Get Batch Job +* [cancel](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#cancel) - Cancel Batch Job + +### [Beta.Agents](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#create) - Create an agent that can be used within a conversation. +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#list) - List agent entities. +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#get) - Retrieve an agent entity. +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#update) - Update an agent entity. +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#delete) - Delete an agent entity. +* [update_version](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#update_version) - Update an agent version. +* [list_versions](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#list_versions) - List all versions of an agent. +* [get_version](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#get_version) - Retrieve a specific version of an agent. +* [create_version_alias](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#create_version_alias) - Create or update an agent version alias. +* [list_version_aliases](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#list_version_aliases) - List all aliases for an agent. +* [delete_version_alias](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#delete_version_alias) - Delete an agent version alias. + +### [Beta.Connectors](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create) - Create a new connector. +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list) - List all connectors. +* [call_tool](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#call_tool) - Call Connector Tool +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get) - Get a connector. +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#update) - Update a connector. +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete) - Delete a connector. + +### [Beta.Conversations](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md) + +* [start](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#start) - Create a conversation and append entries to it. +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#list) - List all created conversations. +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#get) - Retrieve a conversation information. +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#delete) - Delete a conversation. +* [append](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#append) - Append new entries to an existing conversation. +* [get_history](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#get_history) - Retrieve all entries in a conversation. +* [get_messages](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#get_messages) - Retrieve all messages in a conversation. +* [restart](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#restart) - Restart a conversation starting from a given entry. +* [start_stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#start_stream) - Create a conversation and append entries to it. +* [append_stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#append_stream) - Append new entries to an existing conversation. +* [restart_stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/conversations/README.md#restart_stream) - Restart a conversation starting from a given entry. + +### [Beta.Libraries](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#list) - List all libraries you have access to. +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#create) - Create a new Library. +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#get) - Detailed information about a specific Library. +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#delete) - Delete a library and all of its documents. +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#update) - Update a library. + +#### [Beta.Libraries.Accesses](https://github.com/mistralai/client-python/blob/main/docs/sdks/accesses/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/accesses/README.md#list) - List all of the access to this library. +* [update_or_create](https://github.com/mistralai/client-python/blob/main/docs/sdks/accesses/README.md#update_or_create) - Create or update an access level. +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/accesses/README.md#delete) - Delete an access level. + +#### [Beta.Libraries.Documents](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#list) - List documents in a given library. +* [upload](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#upload) - Upload a new document. +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#get) - Retrieve the metadata of a specific document. +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#update) - Update the metadata of a specific document. +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#delete) - Delete a document. +* [text_content](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#text_content) - Retrieve the text content of a specific document. +* [status](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#status) - Retrieve the processing status of a specific document. +* [get_signed_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#get_signed_url) - Retrieve the signed URL of a specific document. +* [extracted_text_signed_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#extracted_text_signed_url) - Retrieve the signed URL of text extracted from a given document. +* [reprocess](https://github.com/mistralai/client-python/blob/main/docs/sdks/documents/README.md#reprocess) - Reprocess a document. + +### [Beta.Observability.Campaigns](https://github.com/mistralai/client-python/blob/main/docs/sdks/campaigns/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/campaigns/README.md#create) - Create and start a new campaign +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/campaigns/README.md#list) - Get all campaigns +* [fetch](https://github.com/mistralai/client-python/blob/main/docs/sdks/campaigns/README.md#fetch) - Get campaign by id +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/campaigns/README.md#delete) - Delete a campaign +* [fetch_status](https://github.com/mistralai/client-python/blob/main/docs/sdks/campaigns/README.md#fetch_status) - Get campaign status by campaign id +* [list_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/campaigns/README.md#list_events) - Get event ids that were selected by the given campaign + +### [Beta.Observability.ChatCompletionEvents](https://github.com/mistralai/client-python/blob/main/docs/sdks/chatcompletionevents/README.md) + +* [search](https://github.com/mistralai/client-python/blob/main/docs/sdks/chatcompletionevents/README.md#search) - Get Chat Completion Events +* [search_ids](https://github.com/mistralai/client-python/blob/main/docs/sdks/chatcompletionevents/README.md#search_ids) - Alternative to /search that returns only the IDs and that can return many IDs at once +* [fetch](https://github.com/mistralai/client-python/blob/main/docs/sdks/chatcompletionevents/README.md#fetch) - Get Chat Completion Event +* [fetch_similar_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/chatcompletionevents/README.md#fetch_similar_events) - Get Similar Chat Completion Events +* [judge](https://github.com/mistralai/client-python/blob/main/docs/sdks/chatcompletionevents/README.md#judge) - Run Judge on an event based on the given options + +#### [Beta.Observability.ChatCompletionEvents.Fields](https://github.com/mistralai/client-python/blob/main/docs/sdks/fields/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/fields/README.md#list) - Get Chat Completion Fields +* [fetch_options](https://github.com/mistralai/client-python/blob/main/docs/sdks/fields/README.md#fetch_options) - Get Chat Completion Field Options +* [fetch_option_counts](https://github.com/mistralai/client-python/blob/main/docs/sdks/fields/README.md#fetch_option_counts) - Get Chat Completion Field Options Counts + +### [Beta.Observability.Datasets](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#create) - Create a new empty dataset +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#list) - List existing datasets +* [fetch](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#fetch) - Get dataset by id +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#delete) - Delete a dataset +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#update) - Patch dataset +* [list_records](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#list_records) - List existing records in the dataset +* [create_record](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#create_record) - Add a conversation to the dataset +* [import_from_campaign](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_campaign) - Populate the dataset with a campaign +* [import_from_explorer](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_explorer) - Populate the dataset with samples from the explorer +* [import_from_file](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_file) - Populate the dataset with samples from an uploaded file +* [import_from_playground](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_playground) - Populate the dataset with samples from the playground +* [import_from_dataset_records](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#import_from_dataset_records) - Populate the dataset with samples from another dataset +* [export_to_jsonl](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#export_to_jsonl) - Export to the Files API and retrieve presigned URL to download the resulting JSONL file +* [fetch_task](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#fetch_task) - Get status of a dataset import task +* [list_tasks](https://github.com/mistralai/client-python/blob/main/docs/sdks/datasets/README.md#list_tasks) - List import tasks for the given dataset + +#### [Beta.Observability.Datasets.Records](https://github.com/mistralai/client-python/blob/main/docs/sdks/records/README.md) + +* [fetch](https://github.com/mistralai/client-python/blob/main/docs/sdks/records/README.md#fetch) - Get the content of a given conversation from a dataset +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/records/README.md#delete) - Delete a record from a dataset +* [bulk_delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/records/README.md#bulk_delete) - Delete multiple records from datasets +* [judge](https://github.com/mistralai/client-python/blob/main/docs/sdks/records/README.md#judge) - Run Judge on a dataset record based on the given options +* [update_payload](https://github.com/mistralai/client-python/blob/main/docs/sdks/records/README.md#update_payload) - Update a dataset record conversation payload +* [update_properties](https://github.com/mistralai/client-python/blob/main/docs/sdks/records/README.md#update_properties) - Update conversation properties + +### [Beta.Observability.Judges](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#create) - Create a new judge +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#list) - Get judges with optional filtering and search +* [fetch](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#fetch) - Get judge by id +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#delete) - Delete a judge +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#update) - Update a judge + +### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) + +* [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md#complete) - Chat Completion +* [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md#stream) - Stream chat completion + +### [Classifiers](https://github.com/mistralai/client-python/blob/main/docs/sdks/classifiers/README.md) + +* [moderate](https://github.com/mistralai/client-python/blob/main/docs/sdks/classifiers/README.md#moderate) - Moderations +* [moderate_chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/classifiers/README.md#moderate_chat) - Chat Moderations +* [classify](https://github.com/mistralai/client-python/blob/main/docs/sdks/classifiers/README.md#classify) - Classifications +* [classify_chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/classifiers/README.md#classify_chat) - Chat Classifications + +### [Embeddings](https://github.com/mistralai/client-python/blob/main/docs/sdks/embeddings/README.md) + +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/embeddings/README.md#create) - Embeddings + +### [Files](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md) + +* [upload](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#upload) - Upload File +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#list) - List Files +* [retrieve](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#retrieve) - Retrieve File +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#delete) - Delete File +* [download](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#download) - Download File +* [get_signed_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#get_signed_url) - Get Signed Url + +### [Fim](https://github.com/mistralai/client-python/blob/main/docs/sdks/fim/README.md) + +* [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/fim/README.md#complete) - Fim Completion +* [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/fim/README.md#stream) - Stream fim completion + +### [FineTuning.Jobs](https://github.com/mistralai/client-python/blob/main/docs/sdks/finetuningjobs/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/finetuningjobs/README.md#list) - Get Fine Tuning Jobs +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/finetuningjobs/README.md#create) - Create Fine Tuning Job +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/finetuningjobs/README.md#get) - Get Fine Tuning Job +* [cancel](https://github.com/mistralai/client-python/blob/main/docs/sdks/finetuningjobs/README.md#cancel) - Cancel Fine Tuning Job +* [start](https://github.com/mistralai/client-python/blob/main/docs/sdks/finetuningjobs/README.md#start) - Start Fine Tuning Job + +### [Models](https://github.com/mistralai/client-python/blob/main/docs/sdks/models/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/models/README.md#list) - List Models +* [retrieve](https://github.com/mistralai/client-python/blob/main/docs/sdks/models/README.md#retrieve) - Retrieve Model +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/models/README.md#delete) - Delete Model +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/models/README.md#update) - Update Fine Tuned Model +* [archive](https://github.com/mistralai/client-python/blob/main/docs/sdks/models/README.md#archive) - Archive Fine Tuned Model +* [unarchive](https://github.com/mistralai/client-python/blob/main/docs/sdks/models/README.md#unarchive) - Unarchive Fine Tuned Model + +### [Ocr](https://github.com/mistralai/client-python/blob/main/docs/sdks/ocr/README.md) + +* [process](https://github.com/mistralai/client-python/blob/main/docs/sdks/ocr/README.md#process) - OCR + +
+ + + +## Server-sent event streaming + +[Server-sent events][mdn-sse] are used to stream content from certain +operations. These operations will expose the stream as [Generator][generator] that +can be consumed using a simple `for` loop. The loop will +terminate when the server no longer has any events to send and closes the +underlying connection. + +The stream is also a [Context Manager][context-manager] and can be used with the `with` statement and will close the +underlying connection when the context is exited. + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.conversations.start_stream(inputs=[ + { + "object": "entry", + "type": "function.result", + "tool_call_id": "", + "result": "", + }, + ], stream=True, completion_args={ + "response_format": { + "type": "text", + }, + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) + +``` + +[mdn-sse]: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events +[generator]: https://book.pythontips.com/en/latest/generators.html +[context-manager]: https://book.pythontips.com/en/latest/context_managers.html + + + +## File uploads + +Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request. + +> [!TIP] +> +> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files. +> + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.libraries.documents.upload(library_id="a02150d9-5ee0-4877-b62c-28b1fcdf3b76", file={ + "file_name": "example.file", + "content": open("example.file", "rb"), + }) + + # Handle response + print(res) + +``` + + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: +```python +from mistralai.client import Mistral +from mistralai.client.utils import BackoffStrategy, RetryConfig +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.models.list( + retries=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) + + # Handle response + print(res) + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: +```python +from mistralai.client import Mistral +from mistralai.client.utils import BackoffStrategy, RetryConfig +import os + + +with Mistral( + retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.models.list() + + # Handle response + print(res) + +``` + + + +## Error Handling + +[`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py) is the base class for all HTTP error responses. It has the following properties: + +| Property | Type | Description | +| ------------------ | ---------------- | --------------------------------------------------------------------------------------- | +| `err.message` | `str` | Error message | +| `err.status_code` | `int` | HTTP response status code eg `404` | +| `err.headers` | `httpx.Headers` | HTTP response headers | +| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. | +| `err.raw_response` | `httpx.Response` | Raw HTTP response | +| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). | + +### Example +```python +from mistralai.client import Mistral, errors +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + res = None + try: + + res = mistral.models.list() + + # Handle response + print(res) + + + except errors.MistralError as e: + # The base class for HTTP error responses + print(e.message) + print(e.status_code) + print(e.body) + print(e.headers) + print(e.raw_response) + + # Depending on the method different errors may be thrown + if isinstance(e, errors.HTTPValidationError): + print(e.data.detail) # Optional[List[models.ValidationError]] +``` + +### Error Classes +**Primary error:** +* [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py): The base class for HTTP error responses. + +
Less common errors (7) + +
+ +**Network errors:** +* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors. + * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server. + * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out. + + +**Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 121 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 40 of 121 methods.* +* [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. + +
+ +\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable. + + + +## Server Selection + +### Select Server by Name + +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: + +| Name | Server | Description | +| ---- | ------------------------ | -------------------- | +| `eu` | `https://api.mistral.ai` | EU Production server | + +#### Example + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + server="eu", + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.models.list() + + # Handle response + print(res) + +``` + +### Override Server URL Per-Client + +The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example: +```python +from mistralai.client import Mistral +import os + + +with Mistral( + server_url="https://api.mistral.ai", + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.models.list() + + # Handle response + print(res) + +``` + + + +## Custom HTTP Client + +The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. +This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. + +For example, you could specify a header for every request that this SDK makes as follows: +```python +from mistralai.client import Mistral +import httpx + +http_client = httpx.Client(headers={"x-custom-header": "someValue"}) +s = Mistral(client=http_client) +``` + +or you could wrap the client with your own custom logic: +```python +from mistralai.client import Mistral +from mistralai.client.httpclient import AsyncHttpClient +import httpx + +class CustomClient(AsyncHttpClient): + client: AsyncHttpClient + + def __init__(self, client: AsyncHttpClient): + self.client = client + + async def send( + self, + request: httpx.Request, + *, + stream: bool = False, + auth: Union[ + httpx._types.AuthTypes, httpx._client.UseClientDefault, None + ] = httpx.USE_CLIENT_DEFAULT, + follow_redirects: Union[ + bool, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + ) -> httpx.Response: + request.headers["Client-Level-Header"] = "added by client" + + return await self.client.send( + request, stream=stream, auth=auth, follow_redirects=follow_redirects + ) + + def build_request( + self, + method: str, + url: httpx._types.URLTypes, + *, + content: Optional[httpx._types.RequestContent] = None, + data: Optional[httpx._types.RequestData] = None, + files: Optional[httpx._types.RequestFiles] = None, + json: Optional[Any] = None, + params: Optional[httpx._types.QueryParamTypes] = None, + headers: Optional[httpx._types.HeaderTypes] = None, + cookies: Optional[httpx._types.CookieTypes] = None, + timeout: Union[ + httpx._types.TimeoutTypes, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + extensions: Optional[httpx._types.RequestExtensions] = None, + ) -> httpx.Request: + return self.client.build_request( + method, + url, + content=content, + data=data, + files=files, + json=json, + params=params, + headers=headers, + cookies=cookies, + timeout=timeout, + extensions=extensions, + ) + +s = Mistral(async_client=CustomClient(httpx.AsyncClient())) +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | Environment Variable | +| --------- | ---- | ----------- | -------------------- | +| `api_key` | http | HTTP Bearer | `MISTRAL_API_KEY` | + +To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example: +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.models.list() + + # Handle response + print(res) + +``` + + + +## Resource Management + +The `Mistral` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application. + +[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers + +```python +from mistralai.client import Mistral +import os +def main(): + + with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), + ) as mistral: + pass # Rest of application here... + + +# Or when using async: +async def amain(): + + async with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), + ) as mistral: + pass # Rest of application here... +``` + + + +## Debugging + +You can setup your SDK to emit debug logs for SDK requests and responses. + +You can pass your own logger class directly into your SDK. +```python +from mistralai.client import Mistral +import logging + +logging.basicConfig(level=logging.DEBUG) +s = Mistral(debug_logger=logging.getLogger("mistralai.client")) +``` + +You can also enable a default debug logger by setting an environment variable `MISTRAL_DEBUG` to true. + + + +## IDE Support + +### PyCharm + +Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin. + +- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/) + + + + +# Development + +## Contributions + +While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. +We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release. diff --git a/README.md b/README.md index 971372f9..7ce8434b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,8 @@ # Mistral Python Client -> [!NOTE] -> **Looking for v1 documentation?** This is the documentation for the **latest** version (v2) of the `mistralai` SDK, available on PyPI. -> -> **[Go to the v1 branch for v1 documentation](https://github.com/mistralai/client-python/tree/v1)** - ## Migrating from v1 -If you are upgrading from v1 to v2, check the [migration guide](MIGRATION.md) for details on breaking changes and how to update your code. +If you are upgrading from v1 to v2, check the [migration guide](https://github.com/mistralai/client-python/blob/main/MIGRATION.md) for details on breaking changes and how to update your code. ## API Key Setup @@ -170,7 +165,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -224,7 +219,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -278,7 +273,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -311,7 +306,7 @@ asyncio.run(main()) ### Create Embedding Request -This example shows how to create embedding request. +This example shows how to create an embedding request. ```python # Synchronous Example @@ -332,7 +327,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -486,7 +481,7 @@ print(res.choices[0].message.content) ### [Beta.Agents](docs/sdks/betaagents/README.md) -* [create](docs/sdks/betaagents/README.md#create) - Create a agent that can be used within a conversation. +* [create](docs/sdks/betaagents/README.md#create) - Create an agent that can be used within a conversation. * [list](docs/sdks/betaagents/README.md#list) - List agent entities. * [get](docs/sdks/betaagents/README.md#get) - Retrieve an agent entity. * [update](docs/sdks/betaagents/README.md#update) - Update an agent entity. @@ -526,7 +521,7 @@ print(res.choices[0].message.content) * [list](docs/sdks/libraries/README.md#list) - List all libraries you have access to. * [create](docs/sdks/libraries/README.md#create) - Create a new Library. * [get](docs/sdks/libraries/README.md#get) - Detailed information about a specific Library. -* [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document. +* [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of its documents. * [update](docs/sdks/libraries/README.md#update) - Update a library. #### [Beta.Libraries.Accesses](docs/sdks/accesses/README.md) @@ -752,8 +747,8 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list(, - RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) + res = mistral.models.list( + retries=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response print(res) @@ -904,10 +899,10 @@ with Mistral( ## Custom HTTP Client The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. -Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. -For example, you could specify a header for every request that this sdk makes as follows: +For example, you could specify a header for every request that this SDK makes as follows: ```python from mistralai.client import Mistral import httpx @@ -1025,7 +1020,7 @@ def main(): with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - # Rest of application here... + pass # Rest of application here... # Or when using async: @@ -1034,7 +1029,7 @@ async def amain(): async with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - # Rest of application here... + pass # Rest of application here... ``` diff --git a/USAGE.md b/USAGE.md index 9d32240a..bb01b160 100644 --- a/USAGE.md +++ b/USAGE.md @@ -26,7 +26,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -80,7 +80,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -134,7 +134,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -167,7 +167,7 @@ asyncio.run(main()) ### Create Embedding Request -This example shows how to create embedding request. +This example shows how to create an embedding request. ```python # Synchronous Example @@ -188,7 +188,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 921161fa..2752d73e 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index 8761f000..e7d542a6 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | diff --git a/docs/sdks/accesses/README.md b/docs/sdks/accesses/README.md index 51051e2f..09515e0b 100644 --- a/docs/sdks/accesses/README.md +++ b/docs/sdks/accesses/README.md @@ -98,7 +98,7 @@ with Mistral( ## delete -Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. +Given a library id, you can delete the access level of an entity. An owner cannot delete its own access. You have to be the owner of the library to delete an access other than yours. ### Example Usage diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index 8a608370..d39e72ee 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -128,7 +128,7 @@ with Mistral( ### Response -**[Union[eventstreaming.EventStream[models.CompletionEvent], eventstreaming.EventStreamAsync[models.CompletionEvent]]](../../models/.md)** +**Union[eventstreaming.EventStream[models.CompletionEvent], eventstreaming.EventStreamAsync[models.CompletionEvent]]** ### Errors diff --git a/docs/sdks/betaagents/README.md b/docs/sdks/betaagents/README.md index b936538c..56773f08 100644 --- a/docs/sdks/betaagents/README.md +++ b/docs/sdks/betaagents/README.md @@ -6,7 +6,7 @@ ### Available Operations -* [create](#create) - Create a agent that can be used within a conversation. +* [create](#create) - Create an agent that can be used within a conversation. * [list](#list) - List agent entities. * [get](#get) - Retrieve an agent entity. * [update](#update) - Update an agent entity. @@ -111,7 +111,7 @@ with Mistral( ### Response -**[List[models.Agent]](../../models/.md)** +**List[models.Agent]** ### Errors @@ -330,7 +330,7 @@ with Mistral( ### Response -**[List[models.Agent]](../../models/.md)** +**List[models.Agent]** ### Errors @@ -456,7 +456,7 @@ with Mistral( ### Response -**[List[models.AgentAliasResponse]](../../models/.md)** +**List[models.AgentAliasResponse]** ### Errors diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index 1bf4aead..d43e42f2 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -43,7 +43,7 @@ with Mistral( | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `messages` | List[[models.ChatCompletionRequestMessage](../../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | @@ -111,7 +111,7 @@ with Mistral( | Parameter | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | @@ -134,7 +134,7 @@ with Mistral( ### Response -**[Union[eventstreaming.EventStream[models.CompletionEvent], eventstreaming.EventStreamAsync[models.CompletionEvent]]](../../models/.md)** +**Union[eventstreaming.EventStream[models.CompletionEvent], eventstreaming.EventStreamAsync[models.CompletionEvent]]** ### Errors diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 0803b398..12d94765 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -110,7 +110,7 @@ with Mistral( ### Response -**[List[models.AgentsAPIV1ConversationsListResponse]](../../models/.md)** +**List[models.AgentsAPIV1ConversationsListResponse]** ### Errors @@ -441,7 +441,7 @@ with Mistral( ### Response -**[Union[eventstreaming.EventStream[models.ConversationEvents], eventstreaming.EventStreamAsync[models.ConversationEvents]]](../../models/.md)** +**Union[eventstreaming.EventStream[models.ConversationEvents], eventstreaming.EventStreamAsync[models.ConversationEvents]]** ### Errors @@ -494,7 +494,7 @@ with Mistral( ### Response -**[Union[eventstreaming.EventStream[models.ConversationEvents], eventstreaming.EventStreamAsync[models.ConversationEvents]]](../../models/.md)** +**Union[eventstreaming.EventStream[models.ConversationEvents], eventstreaming.EventStreamAsync[models.ConversationEvents]]** ### Errors @@ -550,7 +550,7 @@ with Mistral( ### Response -**[Union[eventstreaming.EventStream[models.ConversationEvents], eventstreaming.EventStreamAsync[models.ConversationEvents]]](../../models/.md)** +**Union[eventstreaming.EventStream[models.ConversationEvents], eventstreaming.EventStreamAsync[models.ConversationEvents]]** ### Errors diff --git a/docs/sdks/documents/README.md b/docs/sdks/documents/README.md index 2c9440f9..48ddb6f8 100644 --- a/docs/sdks/documents/README.md +++ b/docs/sdks/documents/README.md @@ -349,7 +349,7 @@ with Mistral( ### Response -**[str](../../models/responselibrariesdocumentsgetsignedurlv1.md)** +**str** ### Errors @@ -391,7 +391,7 @@ with Mistral( ### Response -**[str](../../models/responselibrariesdocumentsgetextractedtextsignedurlv1.md)** +**str** ### Errors diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index 7db76611..bceebdf8 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -222,7 +222,7 @@ with Mistral( ### Response -**[httpx.Response](../../models/.md)** +**httpx.Response** ### Errors diff --git a/docs/sdks/fim/README.md b/docs/sdks/fim/README.md index 49151bf5..d06ed31e 100644 --- a/docs/sdks/fim/README.md +++ b/docs/sdks/fim/README.md @@ -104,7 +104,7 @@ with Mistral( ### Response -**[Union[eventstreaming.EventStream[models.CompletionEvent], eventstreaming.EventStreamAsync[models.CompletionEvent]]](../../models/.md)** +**Union[eventstreaming.EventStream[models.CompletionEvent], eventstreaming.EventStreamAsync[models.CompletionEvent]]** ### Errors diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index 7df1ef4e..6a514e1f 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -9,7 +9,7 @@ * [list](#list) - List all libraries you have access to. * [create](#create) - Create a new Library. * [get](#get) - Detailed information about a specific Library. -* [delete](#delete) - Delete a library and all of it's document. +* [delete](#delete) - Delete a library and all of its documents. * [update](#update) - Update a library. ## list diff --git a/docs/sdks/transcriptions/README.md b/docs/sdks/transcriptions/README.md index 97703c9b..7357f9e9 100644 --- a/docs/sdks/transcriptions/README.md +++ b/docs/sdks/transcriptions/README.md @@ -99,7 +99,7 @@ with Mistral( ### Response -**[Union[eventstreaming.EventStream[models.TranscriptionStreamEvents], eventstreaming.EventStreamAsync[models.TranscriptionStreamEvents]]](../../models/.md)** +**Union[eventstreaming.EventStream[models.TranscriptionStreamEvents], eventstreaming.EventStreamAsync[models.TranscriptionStreamEvents]]** ### Errors diff --git a/examples/mistral/agents/async_agents_no_streaming.py b/examples/mistral/agents/async_agents_no_streaming.py index 6041cad3..bb2d767a 100755 --- a/examples/mistral/agents/async_agents_no_streaming.py +++ b/examples/mistral/agents/async_agents_no_streaming.py @@ -6,19 +6,29 @@ from mistralai.client import Mistral from mistralai.client.models import UserMessage +MODEL = "mistral-medium-latest" + async def main(): api_key = os.environ["MISTRAL_API_KEY"] - agent_id = os.environ["MISTRAL_AGENT_ID"] - client = Mistral(api_key=api_key) - chat_response = await client.agents.complete_async( - agent_id=agent_id, - messages=[UserMessage(content="What is the best French cheese?")], + # Create a fresh agent for this run to avoid version accumulation + agent = client.beta.agents.create( + model=MODEL, + name="cheese-expert-example", + instructions="You are a helpful assistant.", ) - print(chat_response.choices[0].message.content) + try: + chat_response = await client.agents.complete_async( + agent_id=agent.id, + messages=[UserMessage(content="What is the best French cheese?")], + ) + + print(chat_response.choices[0].message.content) + finally: + client.beta.agents.delete(agent_id=agent.id) if __name__ == "__main__": diff --git a/examples/mistral/agents/async_multi_turn_conversation.py b/examples/mistral/agents/async_multi_turn_conversation.py index 26c2378f..9a41a097 100644 --- a/examples/mistral/agents/async_multi_turn_conversation.py +++ b/examples/mistral/agents/async_multi_turn_conversation.py @@ -1,10 +1,10 @@ import os -from mistralai.client import Mistral - -from mistralai.extra.run.context import RunContext +import asyncio import logging import time -import asyncio + +from mistralai.client import Mistral +from mistralai.extra.run.context import RunContext MODEL = "mistral-medium-latest" @@ -22,23 +22,30 @@ async def main(): api_key = os.environ["MISTRAL_API_KEY"] - mistral_agent_id = os.environ["MISTRAL_AGENT_ID"] client = Mistral( api_key=api_key, debug_logger=logging.getLogger("mistralai") ) - async with RunContext( - agent_id=mistral_agent_id - ) as run_context: - run_context.register_func(get_secret_santa_assignment) - run_context.register_func(get_gift_wishlist) - run_context.register_func(buy_gift) - run_context.register_func(send_gift) + # Create a fresh agent for this run to avoid version accumulation + agent = client.beta.agents.create( + model=MODEL, + name="secret-santa-example", + instructions="You are a helpful assistant that helps with Secret Santa.", + ) + + try: + async with RunContext(agent_id=agent.id) as run_context: + run_context.register_func(get_secret_santa_assignment) + run_context.register_func(get_gift_wishlist) + run_context.register_func(buy_gift) + run_context.register_func(send_gift) - await client.beta.conversations.run_async( - run_ctx=run_context, - inputs=USER_MESSAGE, - ) + await client.beta.conversations.run_async( + run_ctx=run_context, + inputs=USER_MESSAGE, + ) + finally: + client.beta.agents.delete(agent_id=agent.id) def get_secret_santa_assignment(): @@ -66,4 +73,4 @@ def send_gift(friend_name: str, gift_name: str, website: str): if __name__ == "__main__": - asyncio.run(main()) \ No newline at end of file + asyncio.run(main()) diff --git a/packages/azure/.genignore b/packages/azure/.genignore index 6bdf6621..c4f3ac71 100644 --- a/packages/azure/.genignore +++ b/packages/azure/.genignore @@ -4,3 +4,4 @@ src/mistralai/azure/client/_hooks/registration.py README.md USAGE.md docs/sdks/**/README.md +scripts/prepare_readme.py diff --git a/packages/azure/README.md b/packages/azure/README.md index 6eff040f..f1f865f6 100644 --- a/packages/azure/README.md +++ b/packages/azure/README.md @@ -58,7 +58,7 @@ if res is not None: print(res.choices[0].message.content) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. ```python @@ -326,10 +326,10 @@ if res is not None: ## Custom HTTP Client The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. -Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. -For example, you could specify a header for every request that this sdk makes as follows: +For example, you could specify a header for every request that this SDK makes as follows: ```python from mistralai.azure.client import MistralAzure import httpx diff --git a/packages/azure/USAGE.md b/packages/azure/USAGE.md index a4bc5147..f2641e8f 100644 --- a/packages/azure/USAGE.md +++ b/packages/azure/USAGE.md @@ -34,7 +34,7 @@ if res is not None: print(res.choices[0].message.content) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. ```python diff --git a/packages/azure/docs/sdks/chat/README.md b/packages/azure/docs/sdks/chat/README.md index 560ffa83..88735d97 100644 --- a/packages/azure/docs/sdks/chat/README.md +++ b/packages/azure/docs/sdks/chat/README.md @@ -50,7 +50,7 @@ if res is not None: | Parameter | Type | Required | Description | Example | | ----------------- | ----------------------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `messages` | List[[models.Messages](../../models/messages.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | +| `messages` | List[models.Messages] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the model to use for this request. | azureai | | `temperature` | *Optional[float]* | :heavy_minus_sign: | What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | @@ -68,7 +68,7 @@ if res is not None: ### Response -**[Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]](../../models/.md)** +**Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]** ### Errors | Error Object | Status Code | Content Type | @@ -114,7 +114,7 @@ if res is not None: | Parameter | Type | Required | Description | Example | | ----------------- | --------------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `messages` | List[[models.ChatCompletionRequestMessages](../../models/chatcompletionrequestmessages.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | +| `messages` | List[models.ChatCompletionRequestMessages] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the model to use for this request. | azureai | | `temperature` | *Optional[float]* | :heavy_minus_sign: | What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | diff --git a/packages/azure/pyproject.toml b/packages/azure/pyproject.toml index 8742bb24..334767bd 100644 --- a/packages/azure/pyproject.toml +++ b/packages/azure/pyproject.toml @@ -4,7 +4,7 @@ version = "2.0.0" description = "Python Client SDK for the Mistral AI API in Azure." authors = [{ name = "Mistral" }] requires-python = ">=3.10" -readme = "README.md" +readme = "README-PYPI.md" dependencies = [ "httpcore >=1.0.9", "httpx >=0.28.1", diff --git a/packages/azure/scripts/prepare_readme.py b/packages/azure/scripts/prepare_readme.py index 2b2577ea..a628b6b4 100644 --- a/packages/azure/scripts/prepare_readme.py +++ b/packages/azure/scripts/prepare_readme.py @@ -1,33 +1,45 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - import re import shutil +import sys + +GITHUB_URL = "https://github.com/mistralai/client-python.git" +BRANCH = "main" +REPO_SUBDIR = "packages/azure" +LINK_PATTERN = re.compile(r"(\[[^\]]+\]\()((?![a-zA-Z][a-zA-Z0-9+.-]*:|#)[^\)]+)(\))") + + +def _build_base_url(repo_url: str, branch: str, repo_subdir: str) -> str: + normalized = repo_url[:-4] if repo_url.endswith(".git") else repo_url + subdir = repo_subdir.strip("/") + if subdir: + subdir = f"{subdir}/" + return f"{normalized}/blob/{branch}/{subdir}" + + +def _normalize_relative_path(path: str) -> str: + if path.startswith("./"): + path = path[2:] + elif path.startswith("/"): + path = path[1:] + return path + + +def _rewrite_relative_links(contents: str, base_url: str) -> str: + return LINK_PATTERN.sub( + lambda m: f"{m.group(1)}{base_url}{_normalize_relative_path(m.group(2))}{m.group(3)}", + contents, + ) + try: - with open("README.md", "r", encoding="utf-8") as rh: - readme_contents = rh.read() - GITHUB_URL = "https://github.com/mistralai/client-python.git" - GITHUB_URL = ( - GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL - ) - REPO_SUBDIR = "packages/azure" - # Ensure the subdirectory has a trailing slash - if not REPO_SUBDIR.endswith("/"): - REPO_SUBDIR += "/" - # links on PyPI should have absolute URLs - readme_contents = re.sub( - r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))", - lambda m: m.group(1) - + GITHUB_URL - + "/blob/master/" - + REPO_SUBDIR - + m.group(2) - + m.group(3), - readme_contents, - ) - - with open("README-PYPI.md", "w", encoding="utf-8") as wh: - wh.write(readme_contents) + with open("README.md", "r", encoding="utf-8") as fh: + readme_contents = fh.read() + + base_url = _build_base_url(GITHUB_URL, BRANCH, REPO_SUBDIR) + readme_contents = _rewrite_relative_links(readme_contents, base_url) + + with open("README-PYPI.md", "w", encoding="utf-8") as fh: + fh.write(readme_contents) except Exception as e: try: print("Failed to rewrite README.md to README-PYPI.md, copying original instead") @@ -36,3 +48,4 @@ except Exception as ie: print("Failed to copy README.md to README-PYPI.md") print(ie) + sys.exit(1) diff --git a/packages/gcp/.genignore b/packages/gcp/.genignore index 9a119b75..ac1791db 100644 --- a/packages/gcp/.genignore +++ b/packages/gcp/.genignore @@ -4,3 +4,4 @@ src/mistralai/gcp/client/_hooks/registration.py README.md USAGE.md docs/sdks/**/README.md +scripts/prepare_readme.py diff --git a/packages/gcp/README.md b/packages/gcp/README.md index 5b66766b..8a26cf2c 100644 --- a/packages/gcp/README.md +++ b/packages/gcp/README.md @@ -54,7 +54,7 @@ if res is not None: print(res.choices[0].message.content) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. ```python @@ -291,10 +291,10 @@ if res is not None: ## Custom HTTP Client The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. -Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. -For example, you could specify a header for every request that this sdk makes as follows: +For example, you could specify a header for every request that this SDK makes as follows: ```python import os from mistralai.gcp.client import MistralGCP diff --git a/packages/gcp/USAGE.md b/packages/gcp/USAGE.md index 3156349d..6ca6bdcd 100644 --- a/packages/gcp/USAGE.md +++ b/packages/gcp/USAGE.md @@ -31,7 +31,7 @@ if res is not None: print(res.choices[0].message.content) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. ```python diff --git a/packages/gcp/docs/models/chatcompletionrequest.md b/packages/gcp/docs/models/chatcompletionrequest.md index 8dbd4a82..78cce437 100644 --- a/packages/gcp/docs/models/chatcompletionrequest.md +++ b/packages/gcp/docs/models/chatcompletionrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | diff --git a/packages/gcp/docs/models/chatcompletionstreamrequest.md b/packages/gcp/docs/models/chatcompletionstreamrequest.md index db76b6c8..a26a85d7 100644 --- a/packages/gcp/docs/models/chatcompletionstreamrequest.md +++ b/packages/gcp/docs/models/chatcompletionstreamrequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | diff --git a/packages/gcp/docs/sdks/chat/README.md b/packages/gcp/docs/sdks/chat/README.md index a1fdfd9a..ca80b3fd 100644 --- a/packages/gcp/docs/sdks/chat/README.md +++ b/packages/gcp/docs/sdks/chat/README.md @@ -44,8 +44,8 @@ if res is not None: | Parameter | Type | Required | Description | Example | | ----------------- | ----------------------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `messages` | List[[models.Messages](../../models/messages.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | -| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-small-latest | +| `messages` | List[models.Messages] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api#operation/listModels) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-small-latest | | `temperature` | *Optional[float]* | :heavy_minus_sign: | What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | @@ -61,7 +61,7 @@ if res is not None: ### Response -**[Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]](../../models/.md)** +**Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]** ### Errors | Error Object | Status Code | Content Type | @@ -101,8 +101,8 @@ if res is not None: | Parameter | Type | Required | Description | Example | | ----------------- | --------------------------------------------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | -| `messages` | List[[models.ChatCompletionRequestMessages](../../models/chatcompletionrequestmessages.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | -| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the model to use. You can use the [List Available Models](/api#operation/listModels) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-small-latest | +| `messages` | List[models.ChatCompletionRequestMessages] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | {
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
} | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api#operation/listModels) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-small-latest | | `temperature` | *Optional[float]* | :heavy_minus_sign: | What sampling temperature to use, between 0.0 and 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. | | | `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | diff --git a/packages/gcp/docs/sdks/fim/README.md b/packages/gcp/docs/sdks/fim/README.md index 61a28883..013f28dd 100644 --- a/packages/gcp/docs/sdks/fim/README.md +++ b/packages/gcp/docs/sdks/fim/README.md @@ -54,7 +54,7 @@ if res is not None: ### Response -**[Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]](../../models/.md)** +**Union[Generator[models.CompletionEvent, None, None], AsyncGenerator[models.CompletionEvent, None]]** ### Errors | Error Object | Status Code | Content Type | diff --git a/packages/gcp/pyproject.toml b/packages/gcp/pyproject.toml index dba8a772..9a8969c1 100644 --- a/packages/gcp/pyproject.toml +++ b/packages/gcp/pyproject.toml @@ -4,7 +4,7 @@ version = "2.0.0" description = "Python Client SDK for the Mistral AI API in GCP." authors = [{ name = "Mistral" }] requires-python = ">=3.10" -readme = "README.md" +readme = "README-PYPI.md" dependencies = [ "eval-type-backport >=0.2.0", "google-auth (>=2.31.0,<3.0.0)", diff --git a/packages/gcp/scripts/prepare_readme.py b/packages/gcp/scripts/prepare_readme.py index ae27b555..f73464c9 100644 --- a/packages/gcp/scripts/prepare_readme.py +++ b/packages/gcp/scripts/prepare_readme.py @@ -1,33 +1,45 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - import re import shutil +import sys + +GITHUB_URL = "https://github.com/mistralai/client-python.git" +BRANCH = "main" +REPO_SUBDIR = "packages/gcp" +LINK_PATTERN = re.compile(r"(\[[^\]]+\]\()((?![a-zA-Z][a-zA-Z0-9+.-]*:|#)[^\)]+)(\))") + + +def _build_base_url(repo_url: str, branch: str, repo_subdir: str) -> str: + normalized = repo_url[:-4] if repo_url.endswith(".git") else repo_url + subdir = repo_subdir.strip("/") + if subdir: + subdir = f"{subdir}/" + return f"{normalized}/blob/{branch}/{subdir}" + + +def _normalize_relative_path(path: str) -> str: + if path.startswith("./"): + path = path[2:] + elif path.startswith("/"): + path = path[1:] + return path + + +def _rewrite_relative_links(contents: str, base_url: str) -> str: + return LINK_PATTERN.sub( + lambda m: f"{m.group(1)}{base_url}{_normalize_relative_path(m.group(2))}{m.group(3)}", + contents, + ) + try: - with open("README.md", "r", encoding="utf-8") as rh: - readme_contents = rh.read() - GITHUB_URL = "https://github.com/mistralai/client-python.git" - GITHUB_URL = ( - GITHUB_URL[: -len(".git")] if GITHUB_URL.endswith(".git") else GITHUB_URL - ) - REPO_SUBDIR = "packages/gcp" - # Ensure the subdirectory has a trailing slash - if not REPO_SUBDIR.endswith("/"): - REPO_SUBDIR += "/" - # links on PyPI should have absolute URLs - readme_contents = re.sub( - r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))", - lambda m: m.group(1) - + GITHUB_URL - + "/blob/master/" - + REPO_SUBDIR - + m.group(2) - + m.group(3), - readme_contents, - ) - - with open("README-PYPI.md", "w", encoding="utf-8") as wh: - wh.write(readme_contents) + with open("README.md", "r", encoding="utf-8") as fh: + readme_contents = fh.read() + + base_url = _build_base_url(GITHUB_URL, BRANCH, REPO_SUBDIR) + readme_contents = _rewrite_relative_links(readme_contents, base_url) + + with open("README-PYPI.md", "w", encoding="utf-8") as fh: + fh.write(readme_contents) except Exception as e: try: print("Failed to rewrite README.md to README-PYPI.md, copying original instead") @@ -36,3 +48,4 @@ except Exception as ie: print("Failed to copy README.md to README-PYPI.md") print(ie) + sys.exit(1) diff --git a/pyproject.toml b/pyproject.toml index 52251124..be5c7e6e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "mistralai" -version = "2.0.1" +version = "2.0.1.post1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" -readme = "README.md" +readme = "README-PYPI.md" dependencies = [ "eval-type-backport >=0.2.0", "httpx >=0.28.1", diff --git a/scripts/prepare_readme.py b/scripts/prepare_readme.py index c220a055..7f7cfe74 100644 --- a/scripts/prepare_readme.py +++ b/scripts/prepare_readme.py @@ -1,107 +1,51 @@ -import argparse import re -import subprocess +import shutil import sys -from pathlib import Path -DEFAULT_REPO_URL = "https://github.com/mistralai/client-python.git" -DEFAULT_BRANCH = "main" -LINK_PATTERN = re.compile(r"(\[[^\]]+\]\()((?!https?:)[^\)]+)(\))") +GITHUB_URL = "https://github.com/mistralai/client-python.git" +BRANCH = "main" +REPO_SUBDIR = "" +LINK_PATTERN = re.compile(r"(\[[^\]]+\]\()((?![a-zA-Z][a-zA-Z0-9+.-]*:|#)[^\)]+)(\))") -def build_base_url(repo_url: str, branch: str, repo_subdir: str) -> str: - """Build the GitHub base URL used to rewrite relative README links.""" - normalized_repo_url = repo_url[:-4] if repo_url.endswith(".git") else repo_url - normalized_subdir = repo_subdir.strip("/") - if normalized_subdir: - normalized_subdir = f"{normalized_subdir}/" - return f"{normalized_repo_url}/blob/{branch}/{normalized_subdir}" +def _build_base_url(repo_url: str, branch: str, repo_subdir: str) -> str: + normalized = repo_url[:-4] if repo_url.endswith(".git") else repo_url + subdir = repo_subdir.strip("/") + if subdir: + subdir = f"{subdir}/" + return f"{normalized}/blob/{branch}/{subdir}" -def rewrite_relative_links(contents: str, base_url: str) -> str: - """Rewrite Markdown relative links to absolute GitHub URLs.""" - return LINK_PATTERN.sub( - lambda match: f"{match.group(1)}{base_url}{match.group(2)}{match.group(3)}", - contents, - ) - - -def run_with_rewritten_readme( - readme_path: Path, base_url: str, command: list[str] -) -> int: - """Rewrite README links, run a command, and restore the original README.""" - original_contents = readme_path.read_text(encoding="utf-8") - rewritten_contents = rewrite_relative_links(original_contents, base_url) - readme_path.write_text(rewritten_contents, encoding="utf-8") - try: - if not command: - return 0 - result = subprocess.run(command, check=False) - return result.returncode - finally: - readme_path.write_text(original_contents, encoding="utf-8") +def _normalize_relative_path(path: str) -> str: + if path.startswith("./"): + path = path[2:] + elif path.startswith("/"): + path = path[1:] + return path -def parse_args(argv: list[str]) -> argparse.Namespace: - """Parse command-line arguments for README rewriting.""" - parser = argparse.ArgumentParser( - description=( - "Rewrite README links to absolute GitHub URLs while running a command." - ) - ) - parser.add_argument( - "--readme", - type=Path, - default=Path("README.md"), - help="Path to the README file to rewrite.", - ) - parser.add_argument( - "--repo-url", - default=DEFAULT_REPO_URL, - help="Repository URL used to build absolute links.", - ) - parser.add_argument( - "--branch", - default=DEFAULT_BRANCH, - help="Repository branch used for absolute links.", - ) - parser.add_argument( - "--repo-subdir", - default="", - help="Repository subdirectory that contains the README.", - ) - parser.add_argument( - "command", - nargs=argparse.REMAINDER, - help=( - "Command to run (prefix with -- to stop option parsing). " - "If omitted, the rewritten README is printed to stdout." - ), +def _rewrite_relative_links(contents: str, base_url: str) -> str: + return LINK_PATTERN.sub( + lambda m: f"{m.group(1)}{base_url}{_normalize_relative_path(m.group(2))}{m.group(3)}", + contents, ) - return parser.parse_args(argv) -def main(argv: list[str]) -> int: - """Entry point for rewriting README links during build commands.""" - args = parse_args(argv) - readme_path = args.readme - if not readme_path.is_file(): - raise FileNotFoundError(f"README file not found: {readme_path}") - base_url = build_base_url(args.repo_url, args.branch, args.repo_subdir) - command = ( - args.command[1:] - if args.command and args.command[0] == "--" - else args.command - ) - if not command: - rewritten_contents = rewrite_relative_links( - readme_path.read_text(encoding="utf-8"), - base_url, - ) - sys.stdout.write(rewritten_contents) - return 0 - return run_with_rewritten_readme(readme_path, base_url, command) +try: + with open("README.md", "r", encoding="utf-8") as fh: + readme_contents = fh.read() + base_url = _build_base_url(GITHUB_URL, BRANCH, REPO_SUBDIR) + readme_contents = _rewrite_relative_links(readme_contents, base_url) -if __name__ == "__main__": - sys.exit(main(sys.argv[1:])) + with open("README-PYPI.md", "w", encoding="utf-8") as fh: + fh.write(readme_contents) +except Exception as e: + try: + print("Failed to rewrite README.md to README-PYPI.md, copying original instead") + print(e) + shutil.copyfile("README.md", "README-PYPI.md") + except Exception as ie: + print("Failed to copy README.md to README-PYPI.md") + print(ie) + sys.exit(1) diff --git a/src/mistralai/extra/README.md b/src/mistralai/extra/README.md index 0593d84a..94f077f7 100644 --- a/src/mistralai/extra/README.md +++ b/src/mistralai/extra/README.md @@ -34,13 +34,13 @@ class Chat(BaseSDK): 3. Now build the SDK with the custom code: ```bash -rm -rf dist; uv build; uv pip install --reinstall ~/client-python/dist/mistralai-1.4.1-py3-none-any.whl +rm -rf dist; uv build; uv pip install --reinstall ~/client-python/dist/mistralai-2.0.0-py3-none-any.whl ``` 4. And now you should be able to call the custom method: ```python import os -from mistralai import Mistral +from mistralai.client import Mistral api_key = os.environ["MISTRAL_API_KEY"] client = Mistral(api_key=api_key) diff --git a/tests/test_prepare_readme.py b/tests/test_prepare_readme.py index ce3e11c9..76227ae4 100644 --- a/tests/test_prepare_readme.py +++ b/tests/test_prepare_readme.py @@ -1,6 +1,8 @@ import importlib.util from pathlib import Path +import pytest + SCRIPT_PATH = Path(__file__).resolve().parents[1] / "scripts" / "prepare_readme.py" SPEC = importlib.util.spec_from_file_location("prepare_readme", SCRIPT_PATH) if SPEC is None or SPEC.loader is None: @@ -8,30 +10,83 @@ prepare_readme = importlib.util.module_from_spec(SPEC) SPEC.loader.exec_module(prepare_readme) +BASE_URL = "https://example.com/blob/main/" + def test_rewrite_relative_links_keeps_absolute() -> None: - base_url = "https://example.com/blob/main/" contents = "[Migration](MIGRATION.md)\n[Docs](https://docs.mistral.ai)" expected = ( - "[Migration](https://example.com/blob/main/MIGRATION.md)\n" + f"[Migration]({BASE_URL}MIGRATION.md)\n" "[Docs](https://docs.mistral.ai)" ) - assert prepare_readme.rewrite_relative_links(contents, base_url) == expected + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == expected + + +def test_rewrite_relative_links_keeps_http() -> None: + contents = "[Site](http://example.com)" + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == contents -def test_main_prints_rewritten_readme_with_defaults(tmp_path, capsys) -> None: - original = "[Migration](MIGRATION.md)\n" - base_url = prepare_readme.build_base_url( - prepare_readme.DEFAULT_REPO_URL, - prepare_readme.DEFAULT_BRANCH, - "", +def test_rewrite_relative_links_keeps_anchors() -> None: + contents = "[Retries](#retries)\n[File](docs/README.md#upload)" + expected = ( + "[Retries](#retries)\n" + f"[File]({BASE_URL}docs/README.md#upload)" ) - expected = f"[Migration]({base_url}MIGRATION.md)\n" - readme_path = tmp_path / "README.md" - readme_path.write_text(original, encoding="utf-8") + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == expected + + +def test_rewrite_relative_links_keeps_mailto() -> None: + contents = "[Email](mailto:user@example.com)" + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == contents + + +def test_rewrite_relative_links_keeps_ftp() -> None: + contents = "[FTP](ftp://files.example.com/data)" + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == contents + + +def test_rewrite_strips_leading_dot_slash() -> None: + contents = "[Errors](./src/errors.py)" + expected = f"[Errors]({BASE_URL}src/errors.py)" + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == expected + + +def test_rewrite_strips_leading_slash() -> None: + contents = "[Examples](/examples/azure)" + expected = f"[Examples]({BASE_URL}examples/azure)" + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == expected - exit_code = prepare_readme.main(["--readme", str(readme_path)]) - captured = capsys.readouterr() - assert exit_code == 0 - assert captured.out == expected +def test_rewrite_multiple_links_same_line() -> None: + contents = "[A](a.md) and [B](b.md)" + expected = f"[A]({BASE_URL}a.md) and [B]({BASE_URL}b.md)" + assert prepare_readme._rewrite_relative_links(contents, BASE_URL) == expected + + +def test_build_base_url_strips_git_suffix() -> None: + url = prepare_readme._build_base_url( + "https://github.com/org/repo.git", "main", "" + ) + assert url == "https://github.com/org/repo/blob/main/" + + +def test_build_base_url_no_git_suffix() -> None: + url = prepare_readme._build_base_url( + "https://github.com/org/repo", "main", "" + ) + assert url == "https://github.com/org/repo/blob/main/" + + +def test_build_base_url_with_subdir() -> None: + url = prepare_readme._build_base_url( + "https://github.com/org/repo.git", "main", "packages/azure" + ) + assert url == "https://github.com/org/repo/blob/main/packages/azure/" + + +def test_build_base_url_strips_subdir_slashes() -> None: + url = prepare_readme._build_base_url( + "https://github.com/org/repo.git", "main", "/packages/azure/" + ) + assert url == "https://github.com/org/repo/blob/main/packages/azure/" diff --git a/uv.lock b/uv.lock index 9a01d8e6..a431998a 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.1" +version = "2.0.1.post1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From ed25660946bc212a0ec79a77ff08f672bb81a3d4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:54:42 +0000 Subject: [PATCH 15/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.0.2=20(#423)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.conversations.start()`: `response.guardrails[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.append()`: `response.guardrails[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.restart()`: `response.guardrails[]` **Changed** (Breaking ⚠️) * chore: align pyproject.toml and uv.lock to version 2.0.2 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 38 +++++++++---------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 12 +++--- README-PYPI.md | 26 ++++++------- README.md | 26 ++++++------- RELEASES.md | 12 +++++- docs/models/conversationresponse.md | 2 +- docs/models/guardrail.md | 7 ---- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/models/__init__.py | 6 --- .../client/models/conversationresponse.py | 14 ++----- uv.lock | 2 +- 13 files changed, 71 insertions(+), 82 deletions(-) delete mode 100644 docs/models/guardrail.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7e03be4c..8ba8ceff 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: bb87a2d97f3451b49ece1f757a33f0ba + docChecksum: 5009f43722321807dd58e322f7738cf4 docVersion: 1.0.0 speakeasyVersion: 1.729.0 generationVersion: 2.841.0 - releaseVersion: 2.0.1 - configChecksum: 006abc607168111d628a422258f355ba + releaseVersion: 2.0.2 + configChecksum: 600f26a381bbc109a39342b9b900117e repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 03da14ba-78d6-4fb7-b997-4bb820eedd19 - pristine_commit_hash: 81f0d1b22d32115b6bea27499be12662db3c24c1 - pristine_tree_hash: b7173449eea74b886d2cf12c4108224effd56e16 + generation_id: 844caeee-5cc5-4912-b4e9-794ec8780d23 + pristine_commit_hash: e13afd0003d7e5b8cdb9af2921f5d0e43d730272 + pristine_tree_hash: c5b3654933b6bea986d447829317550dc0b5f80b features: python: additionalDependencies: 1.0.0 @@ -672,8 +672,8 @@ trackedFiles: pristine_git_object: 5a58e6d139fd902bb810088221e036001d7690d2 docs/models/conversationresponse.md: id: 2eccf42d48af - last_write_checksum: sha1:55493c0b639cb8bda3b5f3bca57a7eec6060b148 - pristine_git_object: 3f0340ba8f382754589a29758d06e7822446488f + last_write_checksum: sha1:519eed0bd9b45ac7c5ccd72f0e56d0a10308aa19 + pristine_git_object: 414755d3f7db0a27e73ef174c8d8c4714c19774e docs/models/conversationresponseoutput.md: id: b4663dc32fc3 last_write_checksum: sha1:5f188564b4b1fd9460a5155bc433c9adf7df031a @@ -1174,10 +1174,6 @@ trackedFiles: id: 66c120df624b last_write_checksum: sha1:045e538dd7faffc1c6c6e6816563c5c8e776a276 pristine_git_object: 827b6f34ae68ace7b8b4811764f59de2e0fcdd22 - docs/models/guardrail.md: - id: 34d09568ab25 - last_write_checksum: sha1:8c95d17ab908018f763f74cc79e14bd5137f5544 - pristine_git_object: 319e1415d9396412c455056135189d817e2fc473 docs/models/guardrailconfig.md: id: f60bf2eefb45 last_write_checksum: sha1:e8dd384d2fd18d731753ba8d45a2975379c97052 @@ -2276,8 +2272,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:3032daf0aeb47d7e21ff355c838e9ab5c765b428 - pristine_git_object: 7c37028eac3c970d707ee16fa69ae1e7b0020cfc + last_write_checksum: sha1:3d3edd7cc94ea5c606cee1b8f046cdc498e8605e + pristine_git_object: 131837b21ca2c493f2af563add51d8fe842799db src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -2408,8 +2404,8 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:15c081adb2e325471e7e1a5aa47159281082abd0 - pristine_git_object: e0fd60e48c43a87566b6abbc7e87cdd695e83a55 + last_write_checksum: sha1:8b1de8b199740065d159c3025c564dce74654e1a + pristine_git_object: 7b5eb3434b332c53ae32470c513f25fb606caf30 src/mistralai/client/models/agent.py: id: 1336849c84fb last_write_checksum: sha1:6bd14cd797a902679111638ede8b3f8a6389ba87 @@ -2812,8 +2808,8 @@ trackedFiles: pristine_git_object: 299b41fc79df3b8cd1221142aa693f77e060d757 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf - last_write_checksum: sha1:86c11bbd5003fc1a6838636257e07404da981ca7 - pristine_git_object: 2fc8504dbc7e2157623c0a6077e18ca96a0a0f5c + last_write_checksum: sha1:c668077dd7d22c87c075530bbca7f4625bee5d0c + pristine_git_object: d1f8ac4b89cb332d4b0b5e90ef936228f267f804 src/mistralai/client/models/conversationrestartrequest.py: id: 681d90d50514 last_write_checksum: sha1:9a015a4eb700aa97311231704da0f0eef4b4c7c3 @@ -6049,7 +6045,11 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.chat.complete()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request.messages[].union(user).content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(audio_url)` **Removed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart_stream()`: \n * `request.guardrails[]` **Changed**\n* `mistral.beta.agents.update()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.beta.agents.update_version()`: `response` **Changed**\n* `mistral.beta.agents.list_versions()`: `response.[]` **Changed**\n* `mistral.beta.agents.get_version()`: `response` **Changed**\n* `mistral.beta.agents.get()`: `response` **Changed**\n* `mistral.beta.agents.list()`: `response.[]` **Changed**\n* `mistral.beta.agents.create()`: \n * `request` **Changed**\n * `response` **Changed**\n* `mistral.beta.conversations.start()`: `request` **Changed**\n* `mistral.beta.conversations.start_stream()`: `request` **Changed**\n* `mistral.beta.conversations.restart()`: \n * `request.guardrails[]` **Changed**\n* `mistral.beta.conversations.get()`: `response.union(ModelConversation)` **Changed**\n* `mistral.beta.conversations.list()`: `response.[].union(ModelConversation)` **Changed**\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.beta.conversations.start()`: `response.guardrails[]` **Changed** (Breaking ⚠️) + * `mistral.beta.conversations.append()`: `response.guardrails[]` **Changed** (Breaking ⚠️) + * `mistral.beta.conversations.restart()`: `response.guardrails[]` **Changed** (Breaking ⚠️) generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 17660f7a..d98e2074 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.1 + version: 2.0.2 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0e45ebb7..17e7db75 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,11 +16,11 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:4ca07ff6dd708405d376cf74c8111d260aaa3aace7250a406ffbad01f3dfee44 - sourceBlobDigest: sha256:3a9d8e056455da40ba3d6b6abb665cf65ccc5b1ba63d84fb823c3156bd385a30 + sourceRevisionDigest: sha256:8e520bf6342e9820336a36b3b1f0308513c31f537579c630c1a48424d5f4caac + sourceBlobDigest: sha256:1353b6824cfc37c4033c16d8c9d291ea06b123d7ee3e095936b2c93a31fefed0 tags: - latest - - speakeasy-sdk-regen-1773249358 + - speakeasy-sdk-regen-1773407111 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:4ca07ff6dd708405d376cf74c8111d260aaa3aace7250a406ffbad01f3dfee44 - sourceBlobDigest: sha256:3a9d8e056455da40ba3d6b6abb665cf65ccc5b1ba63d84fb823c3156bd385a30 + sourceRevisionDigest: sha256:8e520bf6342e9820336a36b3b1f0308513c31f537579c630c1a48424d5f4caac + sourceBlobDigest: sha256:1353b6824cfc37c4033c16d8c9d291ea06b123d7ee3e095936b2c93a31fefed0 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:b626a4c6b6a48943ae2fd215af3aa30cb923f2bad94bf4bbbb6a9c5838ad1c79 + codeSamplesRevisionDigest: sha256:5e5b3cfb6d3b5e303545a9aebbaaf38e7dbb865000ca11e38232dcc659083d25 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.729.0 diff --git a/README-PYPI.md b/README-PYPI.md index ac177f6b..ef6a3bc5 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -165,7 +165,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -219,7 +219,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -273,7 +273,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -306,7 +306,7 @@ asyncio.run(main()) ### Create Embedding Request -This example shows how to create an embedding request. +This example shows how to create embedding request. ```python # Synchronous Example @@ -327,7 +327,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -481,7 +481,7 @@ print(res.choices[0].message.content) ### [Beta.Agents](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md) -* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#create) - Create an agent that can be used within a conversation. +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#create) - Create a agent that can be used within a conversation. * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#list) - List agent entities. * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#get) - Retrieve an agent entity. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md#update) - Update an agent entity. @@ -521,7 +521,7 @@ print(res.choices[0].message.content) * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#list) - List all libraries you have access to. * [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#create) - Create a new Library. * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#get) - Detailed information about a specific Library. -* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#delete) - Delete a library and all of its documents. +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/libraries/README.md#update) - Update a library. #### [Beta.Libraries.Accesses](https://github.com/mistralai/client-python/blob/main/docs/sdks/accesses/README.md) @@ -747,8 +747,8 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list( - retries=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) + res = mistral.models.list(, + RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response print(res) @@ -899,10 +899,10 @@ with Mistral( ## Custom HTTP Client The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. -Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. -For example, you could specify a header for every request that this SDK makes as follows: +For example, you could specify a header for every request that this sdk makes as follows: ```python from mistralai.client import Mistral import httpx @@ -1020,7 +1020,7 @@ def main(): with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - pass # Rest of application here... + # Rest of application here... # Or when using async: @@ -1029,7 +1029,7 @@ async def amain(): async with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - pass # Rest of application here... + # Rest of application here... ``` diff --git a/README.md b/README.md index 7ce8434b..5bdcf8e2 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -219,7 +219,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -273,7 +273,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -306,7 +306,7 @@ asyncio.run(main()) ### Create Embedding Request -This example shows how to create an embedding request. +This example shows how to create embedding request. ```python # Synchronous Example @@ -327,7 +327,7 @@ with Mistral( print(res) ``` -
+
The same SDK client can also be used to make asynchronous requests by importing asyncio. @@ -481,7 +481,7 @@ print(res.choices[0].message.content) ### [Beta.Agents](docs/sdks/betaagents/README.md) -* [create](docs/sdks/betaagents/README.md#create) - Create an agent that can be used within a conversation. +* [create](docs/sdks/betaagents/README.md#create) - Create a agent that can be used within a conversation. * [list](docs/sdks/betaagents/README.md#list) - List agent entities. * [get](docs/sdks/betaagents/README.md#get) - Retrieve an agent entity. * [update](docs/sdks/betaagents/README.md#update) - Update an agent entity. @@ -521,7 +521,7 @@ print(res.choices[0].message.content) * [list](docs/sdks/libraries/README.md#list) - List all libraries you have access to. * [create](docs/sdks/libraries/README.md#create) - Create a new Library. * [get](docs/sdks/libraries/README.md#get) - Detailed information about a specific Library. -* [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of its documents. +* [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document. * [update](docs/sdks/libraries/README.md#update) - Update a library. #### [Beta.Libraries.Accesses](docs/sdks/accesses/README.md) @@ -747,8 +747,8 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list( - retries=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) + res = mistral.models.list(, + RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) # Handle response print(res) @@ -899,10 +899,10 @@ with Mistral( ## Custom HTTP Client The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. -Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls. This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. -For example, you could specify a header for every request that this SDK makes as follows: +For example, you could specify a header for every request that this sdk makes as follows: ```python from mistralai.client import Mistral import httpx @@ -1020,7 +1020,7 @@ def main(): with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - pass # Rest of application here... + # Rest of application here... # Or when using async: @@ -1029,7 +1029,7 @@ async def amain(): async with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - pass # Rest of application here... + # Rest of application here... ``` diff --git a/RELEASES.md b/RELEASES.md index 3c67586a..39f9be11 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -408,4 +408,14 @@ Based on: ### Generated - [python v2.0.1] . ### Releases -- [PyPI v2.0.1] https://pypi.org/project/mistralai/2.0.1 - . \ No newline at end of file +- [PyPI v2.0.1] https://pypi.org/project/mistralai/2.0.1 - . + +## 2026-03-13 13:04:52 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.2] . +### Releases +- [PyPI v2.0.2] https://pypi.org/project/mistralai/2.0.2 - . \ No newline at end of file diff --git a/docs/models/conversationresponse.md b/docs/models/conversationresponse.md index 3f0340ba..414755d3 100644 --- a/docs/models/conversationresponse.md +++ b/docs/models/conversationresponse.md @@ -11,4 +11,4 @@ The response after appending new entries to the conversation. | `conversation_id` | *str* | :heavy_check_mark: | N/A | | `outputs` | List[[models.ConversationResponseOutput](../models/conversationresponseoutput.md)] | :heavy_check_mark: | N/A | | `usage` | [models.ConversationUsageInfo](../models/conversationusageinfo.md) | :heavy_check_mark: | N/A | -| `guardrails` | List[[models.Guardrail](../models/guardrail.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `guardrails` | List[Dict[str, *Any*]] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/guardrail.md b/docs/models/guardrail.md deleted file mode 100644 index 319e1415..00000000 --- a/docs/models/guardrail.md +++ /dev/null @@ -1,7 +0,0 @@ -# Guardrail - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index be5c7e6e..59922b83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.1.post1" +version = "2.0.2" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 7c37028e..131837b2 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.1" +__version__: str = "2.0.2" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.1 2.841.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.0.2 2.841.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index e0fd60e4..7b5eb343 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -416,8 +416,6 @@ ConversationResponseOutput, ConversationResponseOutputTypedDict, ConversationResponseTypedDict, - Guardrail, - GuardrailTypedDict, ) from .conversationrestartrequest import ( ConversationRestartRequest, @@ -1959,10 +1957,8 @@ "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict", "GithubRepository", "GithubRepositoryTypedDict", - "Guardrail", "GuardrailConfig", "GuardrailConfigTypedDict", - "GuardrailTypedDict", "Hyperparameters", "HyperparametersTypedDict", "ImageContent", @@ -2740,8 +2736,6 @@ "ConversationResponseOutput": ".conversationresponse", "ConversationResponseOutputTypedDict": ".conversationresponse", "ConversationResponseTypedDict": ".conversationresponse", - "Guardrail": ".conversationresponse", - "GuardrailTypedDict": ".conversationresponse", "ConversationRestartRequest": ".conversationrestartrequest", "ConversationRestartRequestAgentVersion": ".conversationrestartrequest", "ConversationRestartRequestAgentVersionTypedDict": ".conversationrestartrequest", diff --git a/src/mistralai/client/models/conversationresponse.py b/src/mistralai/client/models/conversationresponse.py index 2fc8504d..d1f8ac4b 100644 --- a/src/mistralai/client/models/conversationresponse.py +++ b/src/mistralai/client/models/conversationresponse.py @@ -18,7 +18,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -39,14 +39,6 @@ ) -class GuardrailTypedDict(TypedDict): - pass - - -class Guardrail(BaseModel): - pass - - class ConversationResponseTypedDict(TypedDict): r"""The response after appending new entries to the conversation.""" @@ -54,7 +46,7 @@ class ConversationResponseTypedDict(TypedDict): outputs: List[ConversationResponseOutputTypedDict] usage: ConversationUsageInfoTypedDict object: Literal["conversation.response"] - guardrails: NotRequired[Nullable[List[GuardrailTypedDict]]] + guardrails: NotRequired[Nullable[List[Dict[str, Any]]]] class ConversationResponse(BaseModel): @@ -74,7 +66,7 @@ class ConversationResponse(BaseModel): pydantic.Field(alias="object"), ] = "conversation.response" - guardrails: OptionalNullable[List[Guardrail]] = UNSET + guardrails: OptionalNullable[List[Dict[str, Any]]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/uv.lock b/uv.lock index a431998a..ff717007 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.1.post1" +version = "2.0.2" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 93b9b7adcf474639235da9ad663cb600499b2eaa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 12:04:54 +0100 Subject: [PATCH 16/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.0.3=20(#424)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.conversations.append_stream()`: * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.chat.complete()`: * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.choices[].message.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.start()`: * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.append()`: * `request.inputs.union(Array)[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.get_history()`: `response.entries[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.get_messages()`: `response.messages[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.restart()`: * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.start_stream()`: * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.classifiers.classify_chat()`: * `request.input.union(InstructRequest).messages[].union(user).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.classifiers.moderate_chat()`: * `request.inputs.union(Array<>)[].union(tool).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.restart_stream()`: * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.chat.stream()`: * `request.messages[].union(tool).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️) * `response.[].data.choices[].delta.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.fim.complete()`: `response.choices[].message.content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.fim.stream()`: `response.[].data.choices[].delta.content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.agents.complete()`: * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.choices[].message.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.agents.stream()`: * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️) * `response.[].data.choices[].delta.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️) * `mistral.models.list()`: `response.data[].union(base).capabilities` **Changed** * `mistral.models.retrieve()`: `response.union(base).capabilities` **Changed** * chore: align pyproject.toml and uv.lock to version 2.0.3 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 1164 ++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 13 +- README-PYPI.md | 2 +- README.md | 2 +- RELEASES.md | 12 +- docs/models/apiendpoint.md | 33 +- docs/models/audience.md | 17 +- docs/models/audioencoding.md | 25 +- docs/models/basemodelcard.md | 30 +- docs/models/basetaskstatus.md | 29 +- docs/models/batchjobstatus.md | 27 +- docs/models/builtinconnectors.md | 23 +- .../chatcompletionchoicefinishreason.md | 23 +- .../classifierfinetuningjobdetailsstatus.md | 33 +- docs/models/classifierfinetuningjobstatus.md | 33 +- .../completionfinetuningjobdetailsstatus.md | 33 +- docs/models/completionfinetuningjobstatus.md | 33 +- ...pletionresponsestreamchoicefinishreason.md | 21 +- docs/models/confirmation.md | 13 +- docs/models/conversationappendrequest.md | 2 +- ...nversationappendrequesthandoffexecution.md | 13 +- .../models/conversationappendstreamrequest.md | 2 +- ...tionappendstreamrequesthandoffexecution.md | 13 +- docs/models/conversationrequest.md | 2 +- .../conversationrequesthandoffexecution.md | 13 +- docs/models/conversationrestartrequest.md | 2 +- ...versationrestartrequesthandoffexecution.md | 13 +- .../conversationrestartstreamrequest.md | 2 +- ...ionrestartstreamrequesthandoffexecution.md | 13 +- docs/models/conversationsource.md | 21 +- docs/models/conversationstreamrequest.md | 2 +- ...nversationstreamrequesthandoffexecution.md | 13 +- docs/models/embeddingdtype.md | 19 +- docs/models/encodingformat.md | 13 +- docs/models/entitytype.md | 19 +- docs/models/filepurpose.md | 19 +- .../filesapiroutesuploadfilefilevisibility.md | 13 +- docs/models/filevisibility.md | 17 +- docs/models/finetuneablemodeltype.md | 13 +- docs/models/format_.md | 17 +- docs/models/ftclassifierlossfunction.md | 17 +- docs/models/ftmodelcard.md | 36 +- .../functioncallentryconfirmationstatus.md | 19 +- .../functioncalleventconfirmationstatus.md | 19 +- docs/models/imagedetail.md | 19 +- ...routesfinetuninggetfinetuningjobsstatus.md | 29 +- docs/models/judgeoutputtype.md | 13 +- docs/models/mistralpromptmode.md | 15 +- docs/models/modelcapabilities.md | 29 +- docs/models/moderationllmaction.md | 17 +- docs/models/observabilityerrorcode.md | 99 +- docs/models/op.md | 51 +- docs/models/operator.md | 47 +- docs/models/orderby.md | 13 +- docs/models/processstatus.md | 29 +- docs/models/referencechunk.md | 8 +- docs/models/referenceid.md | 17 + docs/models/requestsource.md | 15 +- docs/models/resourcevisibility.md | 21 +- docs/models/responseformats.md | 19 +- docs/models/role.md | 17 +- docs/models/sampletype.md | 23 +- docs/models/shareenum.md | 17 +- docs/models/source.md | 19 +- docs/models/ssetypes.md | 33 +- docs/models/supportedoperator.md | 51 +- docs/models/tableformat.md | 13 +- docs/models/timestampgranularity.md | 13 +- docs/models/toolchoiceenum.md | 21 +- docs/models/tooltypes.md | 15 +- docs/models/transcriptionstreameventtypes.md | 21 +- docs/models/typeenum.md | 27 +- docs/sdks/conversations/README.md | 18 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 6 +- src/mistralai/client/conversations.py | 36 - src/mistralai/client/models/__init__.py | 11 +- src/mistralai/client/models/agent.py | 2 +- .../client/models/agentconversation.py | 2 +- .../client/models/agenthandoffdoneevent.py | 2 +- .../client/models/agenthandoffentry.py | 2 +- .../client/models/agenthandoffstartedevent.py | 2 +- .../models/agents_api_v1_agents_getop.py | 2 +- .../agents_api_v1_agents_list_versionsop.py | 2 +- .../models/agents_api_v1_agents_listop.py | 2 +- .../agents_api_v1_conversations_listop.py | 2 +- .../client/models/agentscompletionrequest.py | 2 +- .../models/agentscompletionstreamrequest.py | 2 +- src/mistralai/client/models/annotations.py | 4 +- .../client/models/archivemodelresponse.py | 2 +- .../client/models/assistantmessage.py | 2 +- src/mistralai/client/models/audiocontent.py | 4 +- .../models/audiotranscriptionrequest.py | 2 +- .../models/audiotranscriptionrequeststream.py | 2 +- .../client/models/basefielddefinition.py | 2 +- src/mistralai/client/models/basemodelcard.py | 8 +- src/mistralai/client/models/batcherror.py | 2 +- src/mistralai/client/models/batchjob.py | 2 +- src/mistralai/client/models/batchrequest.py | 2 +- .../client/models/blobresourcecontents.py | 4 +- src/mistralai/client/models/campaign.py | 2 +- .../client/models/chatcompletionrequest.py | 2 +- .../models/chatcompletionstreamrequest.py | 2 +- .../client/models/classificationrequest.py | 2 +- .../client/models/classifierfinetunedmodel.py | 2 +- .../client/models/classifierfinetuningjob.py | 2 +- .../models/classifierfinetuningjobdetails.py | 2 +- .../client/models/classifiertarget.py | 2 +- .../models/classifiertrainingparameters.py | 2 +- .../client/models/codeinterpretertool.py | 2 +- src/mistralai/client/models/completionargs.py | 2 +- .../client/models/completionchunk.py | 2 +- .../client/models/completionfinetunedmodel.py | 2 +- .../client/models/completionfinetuningjob.py | 2 +- .../models/completionfinetuningjobdetails.py | 2 +- .../models/completionresponsestreamchoice.py | 2 +- .../models/completiontrainingparameters.py | 2 +- src/mistralai/client/models/connector.py | 2 +- .../client/models/connector_get_v1op.py | 2 +- .../client/models/connector_list_v1op.py | 2 +- .../client/models/connectorcalltoolrequest.py | 2 +- .../client/models/connectorsqueryfilters.py | 2 +- src/mistralai/client/models/connectortool.py | 2 +- .../models/connectortoolcallmetadata.py | 4 +- .../models/connectortoolcallresponse.py | 4 +- .../models/connectortoolresultmetadata.py | 4 +- .../models/conversationappendrequest.py | 20 +- .../models/conversationappendstreamrequest.py | 20 +- .../client/models/conversationhistory.py | 2 +- .../client/models/conversationmessages.py | 2 +- .../client/models/conversationrequest.py | 18 +- .../client/models/conversationresponse.py | 2 +- .../models/conversationrestartrequest.py | 20 +- .../conversationrestartstreamrequest.py | 20 +- .../models/conversationstreamrequest.py | 18 +- .../client/models/conversationusageinfo.py | 2 +- .../client/models/createagentrequest.py | 2 +- .../client/models/createbatchjobrequest.py | 2 +- .../client/models/createconnectorrequest.py | 2 +- .../client/models/createfileresponse.py | 2 +- .../models/createfinetuningjobrequest.py | 2 +- .../models/creategithubrepositoryrequest.py | 2 +- .../client/models/createlibraryrequest.py | 2 +- .../client/models/customconnector.py | 2 +- src/mistralai/client/models/dataset.py | 2 +- .../client/models/datasetimporttask.py | 2 +- src/mistralai/client/models/datasetpreview.py | 2 +- src/mistralai/client/models/datasetrecord.py | 2 +- .../client/models/deletemodelresponse.py | 2 +- src/mistralai/client/models/deltamessage.py | 2 +- src/mistralai/client/models/document.py | 2 +- .../client/models/documentlibrarytool.py | 2 +- .../client/models/documenturlchunk.py | 2 +- .../client/models/embeddedresource.py | 4 +- .../client/models/embeddingrequest.py | 2 +- .../client/models/embeddingresponsedata.py | 2 +- src/mistralai/client/models/event.py | 2 +- .../feedresultchatcompletioneventpreview.py | 2 +- ...fetchchatcompletionfieldoptionsresponse.py | 2 +- .../models/fetchfieldoptioncountsrequest.py | 2 +- src/mistralai/client/models/file.py | 2 +- src/mistralai/client/models/filechunk.py | 2 +- .../files_api_routes_get_signed_urlop.py | 2 +- .../models/files_api_routes_list_filesop.py | 2 +- .../models/files_api_routes_upload_fileop.py | 2 +- src/mistralai/client/models/fileschema.py | 2 +- src/mistralai/client/models/filtergroup.py | 2 +- src/mistralai/client/models/filterpayload.py | 2 +- .../client/models/fimcompletionrequest.py | 2 +- .../models/fimcompletionstreamrequest.py | 2 +- .../models/finetunedmodelcapabilities.py | 2 +- src/mistralai/client/models/ftmodelcard.py | 8 +- src/mistralai/client/models/function.py | 2 +- .../client/models/functioncallentry.py | 2 +- .../client/models/functioncallevent.py | 2 +- .../client/models/functionresultentry.py | 2 +- ...aigns_campaign_id_selected_events_getop.py | 2 +- ...paigns_v1_observability_campaigns_getop.py | 2 +- ...ty_chat_completion_events_search_postop.py | 2 +- ...ability_datasets_dataset_id_tasks_getop.py | 2 +- ...ility_datasets_dataset_id_records_getop.py | 2 +- ...atasets_v1_observability_datasets_getop.py | 2 +- ...et_judges_v1_observability_judges_getop.py | 2 +- .../client/models/getfileresponse.py | 2 +- .../client/models/githubrepository.py | 2 +- .../client/models/guardrailconfig.py | 2 +- src/mistralai/client/models/imagecontent.py | 4 +- .../client/models/imagegenerationtool.py | 2 +- src/mistralai/client/models/imageurl.py | 2 +- src/mistralai/client/models/imageurlchunk.py | 2 +- src/mistralai/client/models/jobmetadata.py | 2 +- .../jobs_api_routes_batch_get_batch_jobop.py | 2 +- .../jobs_api_routes_batch_get_batch_jobsop.py | 2 +- ...utes_fine_tuning_get_fine_tuning_jobsop.py | 2 +- src/mistralai/client/models/jsonschema.py | 2 +- src/mistralai/client/models/judge.py | 2 +- .../client/models/judgeregressionoutput.py | 2 +- .../client/models/legacyjobmetadata.py | 2 +- .../models/libraries_documents_list_v1op.py | 2 +- src/mistralai/client/models/library.py | 2 +- .../models/list_models_v1_models_getop.py | 2 +- .../client/models/listbatchjobsresponse.py | 2 +- .../client/models/listfilesresponse.py | 2 +- .../models/listfinetuningjobsresponse.py | 2 +- src/mistralai/client/models/mcpservericon.py | 4 +- .../client/models/messageinputentry.py | 2 +- .../client/models/messageoutputentry.py | 2 +- .../client/models/messageoutputevent.py | 2 +- src/mistralai/client/models/metric.py | 2 +- .../client/models/modelcapabilities.py | 18 +- .../client/models/modelconversation.py | 2 +- src/mistralai/client/models/modellist.py | 2 +- .../moderationllmv1categorythresholds.py | 2 +- .../client/models/moderationllmv1config.py | 2 +- .../moderationllmv2categorythresholds.py | 2 +- .../client/models/moderationllmv2config.py | 2 +- .../client/models/moderationobject.py | 2 +- .../client/models/observabilityerrordetail.py | 2 +- src/mistralai/client/models/ocrimageobject.py | 2 +- src/mistralai/client/models/ocrpageobject.py | 2 +- src/mistralai/client/models/ocrrequest.py | 2 +- src/mistralai/client/models/ocrresponse.py | 2 +- src/mistralai/client/models/ocrusageinfo.py | 2 +- .../models/paginatedresultcampaignpreview.py | 2 +- ...ginatedresultchatcompletioneventpreview.py | 2 +- .../paginatedresultdatasetimporttask.py | 2 +- .../models/paginatedresultdatasetpreview.py | 2 +- .../models/paginatedresultdatasetrecord.py | 2 +- .../models/paginatedresultjudgepreview.py | 2 +- .../client/models/paginationresponse.py | 2 +- src/mistralai/client/models/prediction.py | 2 +- .../models/realtimetranscriptionerror.py | 2 +- .../realtimetranscriptioninputaudioappend.py | 2 +- .../realtimetranscriptioninputaudioend.py | 2 +- .../realtimetranscriptioninputaudioflush.py | 2 +- .../models/realtimetranscriptionsession.py | 2 +- .../realtimetranscriptionsessioncreated.py | 2 +- .../realtimetranscriptionsessionupdated.py | 2 +- ...altimetranscriptionsessionupdatemessage.py | 2 +- ...altimetranscriptionsessionupdatepayload.py | 2 +- src/mistralai/client/models/referencechunk.py | 16 +- src/mistralai/client/models/resourcelink.py | 4 +- .../client/models/responsedoneevent.py | 2 +- .../client/models/responseerrorevent.py | 2 +- src/mistralai/client/models/responseformat.py | 2 +- .../client/models/responsestartedevent.py | 2 +- .../searchchatcompletioneventidsrequest.py | 2 +- .../searchchatcompletioneventsrequest.py | 2 +- src/mistralai/client/models/security.py | 2 +- src/mistralai/client/models/sharing.py | 2 +- src/mistralai/client/models/sharingdelete.py | 2 +- src/mistralai/client/models/sharingrequest.py | 2 +- src/mistralai/client/models/textchunk.py | 2 +- src/mistralai/client/models/textcontent.py | 4 +- .../client/models/textresourcecontents.py | 4 +- src/mistralai/client/models/thinkchunk.py | 2 +- src/mistralai/client/models/tool.py | 2 +- src/mistralai/client/models/toolcall.py | 2 +- src/mistralai/client/models/toolchoice.py | 2 +- .../client/models/toolconfiguration.py | 2 +- .../client/models/toolexecutiondeltaevent.py | 2 +- .../client/models/toolexecutiondoneevent.py | 2 +- .../client/models/toolexecutionentry.py | 2 +- .../models/toolexecutionstartedevent.py | 2 +- src/mistralai/client/models/toolfilechunk.py | 2 +- src/mistralai/client/models/toolmessage.py | 2 +- .../client/models/toolreferencechunk.py | 2 +- src/mistralai/client/models/trainingfile.py | 2 +- .../client/models/transcriptionresponse.py | 4 +- .../models/transcriptionsegmentchunk.py | 4 +- .../client/models/transcriptionstreamdone.py | 4 +- .../models/transcriptionstreamsegmentdelta.py | 4 +- .../client/models/unarchivemodelresponse.py | 2 +- .../client/models/updateagentrequest.py | 2 +- .../client/models/updateconnectorrequest.py | 2 +- .../client/models/updatedatasetrequest.py | 2 +- .../client/models/updatedocumentrequest.py | 2 +- .../client/models/updatelibraryrequest.py | 2 +- .../client/models/updatemodelrequest.py | 2 +- src/mistralai/client/models/usageinfo.py | 4 +- src/mistralai/client/models/usermessage.py | 2 +- .../client/models/validationerror.py | 2 +- .../client/models/wandbintegration.py | 2 +- .../client/models/wandbintegrationresult.py | 2 +- .../client/models/websearchpremiumtool.py | 2 +- src/mistralai/client/models/websearchtool.py | 2 +- src/mistralai/client/sdk.py | 2 +- src/mistralai/client/utils/eventstreaming.py | 41 +- uv.lock | 2 +- 290 files changed, 1946 insertions(+), 1381 deletions(-) create mode 100644 docs/models/referenceid.md diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8ba8ceff..b55995f2 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,39 +1,39 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 5009f43722321807dd58e322f7738cf4 + docChecksum: a28f11e05b4050a47313ba9e725c55c5 docVersion: 1.0.0 - speakeasyVersion: 1.729.0 - generationVersion: 2.841.0 - releaseVersion: 2.0.2 - configChecksum: 600f26a381bbc109a39342b9b900117e + speakeasyVersion: 1.754.0 + generationVersion: 2.862.0 + releaseVersion: 2.0.3 + configChecksum: cc3e7bf223cce3355d58aa70e4487807 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 844caeee-5cc5-4912-b4e9-794ec8780d23 - pristine_commit_hash: e13afd0003d7e5b8cdb9af2921f5d0e43d730272 - pristine_tree_hash: c5b3654933b6bea986d447829317550dc0b5f80b + generation_id: b5cdaabc-ba14-4abb-8080-6f4f928e4eb3 + pristine_commit_hash: 356e2bc15c5030be3633fae9afc292f221a450e0 + pristine_tree_hash: 683aa349d8c61cfbf8ede85bf8272b7ae49b3d4d features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.12 + core: 6.0.18 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 downloadStreams: 1.0.1 - enumUnions: 0.1.0 + enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 errors: 3.3.5 - examples: 3.0.2 + examples: 3.0.3 flatRequests: 1.0.1 flattening: 3.1.1 globalSecurity: 3.0.5 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.2.0 + globalServerURLs: 3.2.1 includes: 3.0.0 methodArguments: 1.0.2 multipartFileContentType: 1.0.0 @@ -43,7 +43,7 @@ features: responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 - serverEvents: 1.0.13 + serverEvents: 1.0.15 serverEventsSentinels: 0.1.0 serverIDs: 3.0.0 unions: 3.1.4 @@ -232,8 +232,8 @@ trackedFiles: pristine_git_object: 324a8e4e8656b3eef77355cc24c70ac0a2e1aa9c docs/models/apiendpoint.md: id: be613fd9b947 - last_write_checksum: sha1:4d984c11248f7da42c949164e69b53995d5942c4 - pristine_git_object: 8d83a26f19241da5ce626ff9526575c50e5d27be + last_write_checksum: sha1:843ebd98df60194f823ddcebeb1f1d334c2b16ce + pristine_git_object: e049d40ab3995e3442a009a9781ac98b4614091c docs/models/apikeyauth.md: id: 529789e1b079 last_write_checksum: sha1:edb801076d411a5d6c1f7a3f4fdb4c3612b12ab1 @@ -260,8 +260,8 @@ trackedFiles: pristine_git_object: 147708d9238e40e1cdb222beee15fbe8c1603050 docs/models/audience.md: id: 6a718c512c7f - last_write_checksum: sha1:9d46fde31c3f8f43af7288359d6de60bfa8dfe6c - pristine_git_object: ac325076feae9be8b54492d4bd85cb5c52828bc0 + last_write_checksum: sha1:67de107cad15a11c0edb9b6bc0d6a79fe85a6258 + pristine_git_object: 186d913ec0e78ad9f4ddf762e7aa24ec2c8122b4 docs/models/audiochunk.md: id: 88315a758fd4 last_write_checksum: sha1:b47b295122cea28d66212d75a1f0eccd70a248cc @@ -272,8 +272,8 @@ trackedFiles: pristine_git_object: 64ab6d26b5561e15722cab1eab3134c5a0688a91 docs/models/audioencoding.md: id: 1e0dfee9c2a0 - last_write_checksum: sha1:5d47cfaca916d7a47adbea71748595b3ab69a478 - pristine_git_object: feec8c71bf5a89a5c0099a9d075bc2bd36dd5f73 + last_write_checksum: sha1:d3f61fdb79969e41b9925f5788246d691ba39f39 + pristine_git_object: 34b80490a315851da7e8b9e1b5e32108d40609cc docs/models/audioformat.md: id: 41973dd397de last_write_checksum: sha1:b81fbaf4f8aa03937c91f76d371ad5860836a772 @@ -300,12 +300,12 @@ trackedFiles: pristine_git_object: 3f7abea981c142e1fb1ba993a10dbd0e347b2df2 docs/models/basemodelcard.md: id: 2f62bfbd650e - last_write_checksum: sha1:4b29e0d24060b6724e82aeee05befe1cddb316f4 - pristine_git_object: 0f42504fd6446c0baf4686bfbb8481658b6789cd + last_write_checksum: sha1:d42dfe36b103ee95f55e91ac306e3179060dfb3f + pristine_git_object: 2a5e7515a0edc3f1a5de68ba28eae8bdec988bb1 docs/models/basetaskstatus.md: id: b709621d5c71 - last_write_checksum: sha1:3f78b970cb0c8ba22f100af3b8b6e1730a4f86f7 - pristine_git_object: 8fad1e10f1b631d75303dbd8a977f37cacd26a33 + last_write_checksum: sha1:19fd9c3fc71627d758635f9840be4508ffe8e361 + pristine_git_object: bb781fd1afc2b7a3587f1048e8d84d7814c21e51 docs/models/batcherror.md: id: 8053e29a3f26 last_write_checksum: sha1:23a12dc2e95f92a7a3691bd65a1b05012c669f0f @@ -316,8 +316,8 @@ trackedFiles: pristine_git_object: 162e2cff3a1132f2b89e57dcf1bf8b4c403b6453 docs/models/batchjobstatus.md: id: 7e6f034d3c91 - last_write_checksum: sha1:9e876b4b94255e1399bbb31feb51e08691bcb8fc - pristine_git_object: 64617b31488130f94bf47952ccaa4958670473c8 + last_write_checksum: sha1:42bf12df19501db1809543e898e7cf73e3cf2aad + pristine_git_object: 7473cb1f83e47b14598347d7909968b38cfe2b54 docs/models/batchrequest.md: id: b113ca846594 last_write_checksum: sha1:f9dc702c27b8257e008390519df744290e09c4b4 @@ -328,8 +328,8 @@ trackedFiles: pristine_git_object: c862e53730393d65a061ed63a96640859fe74adc docs/models/builtinconnectors.md: id: 9d14e972f08a - last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c - pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 + last_write_checksum: sha1:ad790344ffc177d10a7eff06482c39d722cd7b95 + pristine_git_object: 11dfd48a87d5341883fbcdf2aad1cfff8aed5587 docs/models/campaign.md: id: cc1272bc909c last_write_checksum: sha1:291f6152431f3f14c16df9005a4392907dbf03e2 @@ -344,8 +344,8 @@ trackedFiles: pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 - last_write_checksum: sha1:b894d3408cb801e072c3c302a5676ff939d59284 - pristine_git_object: b2f15ecbe88328de95b4961ddb3940fd8a6ee64b + last_write_checksum: sha1:160ff1297bfbaa9158e575b8bd7ab573533c8f9f + pristine_git_object: c289272622b137541843bb4ba9654d0e1405ffec docs/models/chatcompletionevent.md: id: fc1097c5bfe2 last_write_checksum: sha1:ef1f417581e943503acb38b503aedde3e157d934 @@ -456,16 +456,16 @@ trackedFiles: pristine_git_object: 438a35d9eb0e4250a9e6bcbb7dafeb26d74e018a docs/models/classifierfinetuningjobdetailsstatus.md: id: 87737e85b845 - last_write_checksum: sha1:2ff02df3efee0f9b5867045d43fc71025fb37129 - pristine_git_object: 058c65832188f7148d96ab320114d984d618efa1 + last_write_checksum: sha1:aad42f83c0ad41e64179d8e1d4c86f798bb3de51 + pristine_git_object: 3c6b1f52851559210efa6575832647d838aa80b0 docs/models/classifierfinetuningjobintegration.md: id: 91de20176a8c last_write_checksum: sha1:e49a7c082300eb4d3106e96b21ebc6860060b8c3 pristine_git_object: 820aee4c6fcf899341d869d796b1a61d4d4eab42 docs/models/classifierfinetuningjobstatus.md: id: e3c4e672dc88 - last_write_checksum: sha1:1bfd306ab633d3ea73272e56796c1f63843fce22 - pristine_git_object: ca829885de056c5ccafec0fe3a901743e56deb0c + last_write_checksum: sha1:7e33e8aa5e3c859ad992f198ae5789160874ef94 + pristine_git_object: c25d73a64d76a9cfded403a1ba84f2d3c5771a39 docs/models/classifiertarget.md: id: 4c5c0b3e0bc7 last_write_checksum: sha1:ad16823def0acb267543c4189df32406a27685aa @@ -520,8 +520,8 @@ trackedFiles: pristine_git_object: c6bd67cde1d1628aa3efc4a53fa8487a009aa129 docs/models/completionfinetuningjobdetailsstatus.md: id: b1b717a4e256 - last_write_checksum: sha1:97c8699f0979978ea4320da3388e18da6219cb87 - pristine_git_object: 94d795a9ba4ec743f274d4ab5666e8897d174c61 + last_write_checksum: sha1:bcb7e6d9345ba6eea99dc8e0d3b5e2de959e8a7a + pristine_git_object: 6c7a097932391e0524c15c50f989c9d4803aee22 docs/models/completionfinetuningjobintegration.md: id: 392ffc2cdef2 last_write_checksum: sha1:53540da44e0edbad5d4085f81ded159dbc582a6c @@ -532,24 +532,24 @@ trackedFiles: pristine_git_object: 54225e27204b703a6b33d2d66492e272559c3b3c docs/models/completionfinetuningjobstatus.md: id: 2ac420312815 - last_write_checksum: sha1:90f498cb04e89e8f4a424762c07231fd9030b326 - pristine_git_object: db151a1bd871a2bf231424a78c8c450b2a488099 + last_write_checksum: sha1:9cd1aec6125060ed45296636592818bf2ce2f2a8 + pristine_git_object: 1fd78b9dd551168e6dc32d737dfd3d5731002725 docs/models/completionresponsestreamchoice.md: id: d56824d615a6 last_write_checksum: sha1:0296a490df009dbfd04893fdebcc88dd6102a872 pristine_git_object: 1532c25b8fc065d486f52d4610a7f757e5340875 docs/models/completionresponsestreamchoicefinishreason.md: id: 5f1fbfc90b8e - last_write_checksum: sha1:20824b4a223cbd3658b32440973a7d47dcd108b9 - pristine_git_object: 0fece473297227c75db4e7ded63417a2f117cac0 + last_write_checksum: sha1:892588ab61324c6328100e402f1b219959ff4097 + pristine_git_object: 3e8c30ec1199363880991e0f8c631d32bb84a980 docs/models/completiontrainingparameters.md: id: b716b0195d39 last_write_checksum: sha1:1d8d7c469f933ea741ec15c8b9ef8b986e0ca95e pristine_git_object: 4746a95df18c78331f572425a16b2b3dcbc2df4c docs/models/confirmation.md: id: 19b9e48a3c2e - last_write_checksum: sha1:eb6494cb19f23c6df62afb009cc88ce38d24af86 - pristine_git_object: fd6e6aaa58cabba0cdec1b76ac50fb6e46f91b07 + last_write_checksum: sha1:6e199c756ce35e2bff3b67df5d97b4520518b271 + pristine_git_object: c87093846ca27940a08318fb090c60ce56a00651 docs/models/connector.md: id: cbf7c2c53983 last_write_checksum: sha1:477e81b9e908f8c40e22cffcf4e7cd6ae38fe34e @@ -616,20 +616,20 @@ trackedFiles: pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 docs/models/conversationappendrequest.md: id: 722746e5065c - last_write_checksum: sha1:c8a4a49f0a1fe5cdd2ef6264ef9c600cfc8f7beb - pristine_git_object: 78a96508e4e1c6f83de4556d0bfa3b10c875da37 + last_write_checksum: sha1:dbf638146381f10f00f8391fb6c7dac7f7cfb860 + pristine_git_object: 471fcc31a964e7aa6fbd3db59fd4a892f5a8a67e docs/models/conversationappendrequesthandoffexecution.md: id: e3f56d558037 - last_write_checksum: sha1:dc71c8db746bb08f6630e995cf6af9fda747e954 - pristine_git_object: 7418b36a55fab959639aec456a946600eb908efb + last_write_checksum: sha1:1290b8ac33f16e1cb22314469f2d739b3c525eae + pristine_git_object: 70cef2ede8392519f4c50cd695f8788cc6f81200 docs/models/conversationappendstreamrequest.md: id: e9f8131435e8 - last_write_checksum: sha1:3afe7eaafbf61abcd9341ee8fbca5c6d0c2db0ab - pristine_git_object: daea9c522a8a0693edce11b1bbeca1f2cba0781e + last_write_checksum: sha1:9a65015064014693b30ad789af8052fc99bca730 + pristine_git_object: a54d5d3e91c9fcb3819a93dee8ef177ff745e5aa docs/models/conversationappendstreamrequesthandoffexecution.md: id: 5739ea777905 - last_write_checksum: sha1:c85584b63c0c5d859ee5d46d6ae167a8ee44e279 - pristine_git_object: 1bbced3e61a521401ae93a7b1f73d0e9c061e5fd + last_write_checksum: sha1:f341a41c54f52a06f5ce748f7210cd33b3d0474d + pristine_git_object: dea519789f6493687a3f67a972757435ebf236b2 docs/models/conversationevents.md: id: be63cc7c526e last_write_checksum: sha1:1667c767ef53fd7aef90452fde2a8245ed2b2ae6 @@ -656,16 +656,16 @@ trackedFiles: pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:bfb3664fa8011fb44786d6e5c32cd5c0eed3058d - pristine_git_object: 903d13c1d92d31aa7db836bbd796fe0875892219 + last_write_checksum: sha1:fff53e06f2409c4de6fa8f6a56efad5c165b7685 + pristine_git_object: 6a5dc206ecd4bb115647270adfebcc955b59dcb8 docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 pristine_git_object: 9f2518211256762d03dec12c4c4464d48f7ed52c docs/models/conversationrequesthandoffexecution.md: id: 9733b1e121d1 - last_write_checksum: sha1:f7df210a46acf24abb1312123aebe9e595a190e8 - pristine_git_object: e7314f7e0080ff3f1a80afdbb229c78df5b008bb + last_write_checksum: sha1:a272071fc088868920874ac89efc6b2f320a8044 + pristine_git_object: de9dc287e1f885ad247b2b79517f127b1b147a38 docs/models/conversationrequesttool.md: id: bd1bb6fcea8b last_write_checksum: sha1:9c04dc1c7401b775671130cce7a1d85fbdf35957 @@ -680,44 +680,44 @@ trackedFiles: pristine_git_object: fe8ad1b5f8f3a48b48b9e2d09814af7df0ed3788 docs/models/conversationrestartrequest.md: id: 558e9daa00bd - last_write_checksum: sha1:40ca7ee3ad13bf14f19816a6f54e44a4088f8317 - pristine_git_object: 08f47bba0663f5d7ea4d9c8d604814de095c1c87 + last_write_checksum: sha1:0f7b4fdb5c945bbe8e49857965756c6bdc6f5ce4 + pristine_git_object: be0f2289b02395c888391b6f7e8e657c49343d47 docs/models/conversationrestartrequestagentversion.md: id: e6ea289c6b23 last_write_checksum: sha1:a5abf95a81b7e080bd3cadf65c2db38ca458573f pristine_git_object: 019ba301411729ec2c8078404adae998b3b9dacd docs/models/conversationrestartrequesthandoffexecution.md: id: faee86c7832c - last_write_checksum: sha1:44728be55e96193e6f433e2f46f8f749f1671097 - pristine_git_object: 5790624b82ce47ea99e5c25c825fbc25145bfb8e + last_write_checksum: sha1:1e94d552a7f00bbfa4ca2847b927ee0cd11b64f1 + pristine_git_object: 4e202d69ae83fa11798c8b88a34a0246a3d764fe docs/models/conversationrestartstreamrequest.md: id: 01b92ab1b56d - last_write_checksum: sha1:4f1ed18522112ed6b2c2f5def38b418d0c04dab3 - pristine_git_object: 3ad739aa8d254dba746590245e8490268c71dc51 + last_write_checksum: sha1:768a1d573b5fa034fefcf74e0ae9bc16f6558025 + pristine_git_object: f99a6e3404aea78062d2fd86652649ffd0f03d98 docs/models/conversationrestartstreamrequestagentversion.md: id: 395265f34ff6 last_write_checksum: sha1:ebf4e89a478ab40e1f8cd3f9a000e179426bda47 pristine_git_object: 9e0063003f1d8acce61cf4edda91ddbc23a3c69d docs/models/conversationrestartstreamrequesthandoffexecution.md: id: 3e9c4a9ab94d - last_write_checksum: sha1:300e197f11ad5efc654b51198b75049890258eef - pristine_git_object: 97266b43444f5ed50eeedf574abd99cb201199fd + last_write_checksum: sha1:41587c4d9516da340a0d55f79cdf9370bca9f4fa + pristine_git_object: 9d2c5633820affc1e265367f7e392ec5ffc35468 docs/models/conversationsource.md: id: b50fdc875f45 - last_write_checksum: sha1:7a3fd66a8fa02456465f6218559a73bf9ae5413e - pristine_git_object: 12bf7c1fa98223675c6b27f6010d05c9b78e7017 + last_write_checksum: sha1:9c5bbff0c90b33609939b6455be62e85e682eebc + pristine_git_object: ee88d9d4631c62e2845294950cc7e787316bf461 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:bfa762698bd078c1a046e0f17d0316299ae11288 - pristine_git_object: 8debea1c3e036e2fa7d21e6aa5f2883173b4988a + last_write_checksum: sha1:5e9f0e779acc11017dbce26e1a4d2be179cdca99 + pristine_git_object: af50989c156f08ea1781d2767be422662945e9c2 docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 pristine_git_object: 52ee96720abbb3fec822d0792dbde7020f9fb189 docs/models/conversationstreamrequesthandoffexecution.md: id: e6701e5f9f0c - last_write_checksum: sha1:ef2ebe8f23f27144e7403f0a522326a7e4f25f50 - pristine_git_object: c98e194c1d204c3a5d4234f0553712a7025d7f85 + last_write_checksum: sha1:05c7e19550d5c79d59a180422b49e710415fbf46 + pristine_git_object: 247bfd23c034c3e4c5c497e9e372c7ea8fea0dc0 docs/models/conversationstreamrequesttool.md: id: 71df6212ff44 last_write_checksum: sha1:04f89a30daec9bad78f99d0bcf28c8a717fc7833 @@ -880,8 +880,8 @@ trackedFiles: pristine_git_object: 102fca261d4ada514a7df14415383c1da9e59782 docs/models/embeddingdtype.md: id: 22786e732e28 - last_write_checksum: sha1:dbd16968cdecf706c890769d8d1557298f41ef71 - pristine_git_object: 01656b0a85aa87f19909b18100bb6981f89683fc + last_write_checksum: sha1:1f348c1b3dba72dd710c1eee3953556d051366f8 + pristine_git_object: 301585b20b8e5c433dbff021782a543c599e6115 docs/models/embeddingrequest.md: id: bebee24421b4 last_write_checksum: sha1:087230e81cfbbc539edc7cc1c0a490728276d217 @@ -900,12 +900,12 @@ trackedFiles: pristine_git_object: 20b50618ac99c63f7cf57fe4377840bfc1f85823 docs/models/encodingformat.md: id: 066e154e4d43 - last_write_checksum: sha1:8d6c4b29dea5ff7b0ae2b586951308fad99c60eb - pristine_git_object: 7d5941cfe6cea2e85b20d6fb0031e9b807bac471 + last_write_checksum: sha1:cc98abdb803d374146f58a6811c9e3f2b58ff5f3 + pristine_git_object: 8bc9e8c6bd3fdc8bd5a28edb381c662e74c86e72 docs/models/entitytype.md: id: 130a2f7038b0 - last_write_checksum: sha1:01c3c10e737bcd58be70b437f7ee74632972a983 - pristine_git_object: 7c040b382d4c1b6bc63f582566d938be75a5f954 + last_write_checksum: sha1:506be1dd51ec1f429246390757cbc0676677bd82 + pristine_git_object: 44fb9d6b281bd052273db94cbd60230e732e98a1 docs/models/entry.md: id: da9a99ab48ab last_write_checksum: sha1:4971db390327db09f88feff5d2b8a0b1e6c5b933 @@ -964,8 +964,8 @@ trackedFiles: pristine_git_object: 18217114060ac4e4b45fefabace4628684f27e5c docs/models/filepurpose.md: id: ed6216584490 - last_write_checksum: sha1:02767595f85228f7bfcf359f8384b8263580d53a - pristine_git_object: 14cab13ee191ae60e2c5e1e336d0a5abc13f778b + last_write_checksum: sha1:c38460a32b8a0a21aab0a298d62e5a26cde2339b + pristine_git_object: af6dc9fa4e02b1d385595a76b62721e214fb0c85 docs/models/filesapiroutesdeletefilerequest.md: id: 7fdf9a97320b last_write_checksum: sha1:411e38d0e08a499049796d1557f79d669fc65107 @@ -988,16 +988,16 @@ trackedFiles: pristine_git_object: 961bae1f51a4ae9df21b28fd7a5ca91dc7b3888b docs/models/filesapiroutesuploadfilefilevisibility.md: id: 7b934c9d9d25 - last_write_checksum: sha1:10c16a937f01a3eaa6b508ef2b8b4c99d968ed9e - pristine_git_object: 055f071b90f9a9d0e744f4fe1b4bead3e4647bf2 + last_write_checksum: sha1:5ae94156f76a9fc6aab082c29c0163eb8e182e11 + pristine_git_object: c1f89309c4233d5af34b6f2b71cc48bc8e94e487 docs/models/fileschema.md: id: 9a05a660399d last_write_checksum: sha1:e69c38d738bfba7e1d7cb5938c17fcbc56fecf4c pristine_git_object: 154548404d257f0b7339e2e3e74d2dcc23a98a4d docs/models/filevisibility.md: id: 2cdcd7761007 - last_write_checksum: sha1:61af0b14a6b504e9383cd7d68ad66eb0abc84e5f - pristine_git_object: 4ed11692a8773cb06edbfcd0b4afb14766d6807a + last_write_checksum: sha1:b63a786a0f73b0271e9eb2c70200939ebd9f13a7 + pristine_git_object: 4e6c9ed95a982f198a9efab4a841a41a23f0aad9 docs/models/filtercondition.md: id: dd561c647715 last_write_checksum: sha1:5ead258c0e3905e8a10b16e4e5b9b267e3a12747 @@ -1036,24 +1036,24 @@ trackedFiles: pristine_git_object: 5a9e2ff020d4939f7fd42c0673ea7bdd16cca99d docs/models/finetuneablemodeltype.md: id: e16926b57814 - last_write_checksum: sha1:52006811b756ff5af865ed6f74838d0903f0ee52 - pristine_git_object: 34b24bd4db1ad3f9e77e2c6a45a41d2fbc5cf7fd + last_write_checksum: sha1:8a107793e370a8dfc1e85e165dc9b18aeefc9460 + pristine_git_object: 9ec9634f0b486728071c4c360119508408c1d316 docs/models/finetunedmodelcapabilities.md: id: 3a6a0498ccf7 last_write_checksum: sha1:82fc7d3f4e0b591b757f202699bb645bc61c69ff pristine_git_object: d3203a2adccb7eb89c58395952c3e5a123a5b31b docs/models/format_.md: id: a17c22228eda - last_write_checksum: sha1:dad6de59fec6378d50356007602e2a0254d8d2e4 - pristine_git_object: 97d286a4ed7cff0a4058bbfa06c4573428182876 + last_write_checksum: sha1:72d2d0549cd18ea564007a268c13bfd1eba219ec + pristine_git_object: 5bf1ed0cfa19f2edd4c6a1a7c66c7f093043a700 docs/models/ftclassifierlossfunction.md: id: b546cfde5aa6 - last_write_checksum: sha1:752d9d238a90a3ef55205576fa38cee56ea1539e - pristine_git_object: 919cdd384315c99d4b590bc562298403733344ce + last_write_checksum: sha1:6d0c38aeb4e69eae579b0e65e2769c6ae8dcb30d + pristine_git_object: 36d3db18679569d21e6bacfe13bcd22715372297 docs/models/ftmodelcard.md: id: 15ed6f94deea - last_write_checksum: sha1:1c560ceaaacc1d109b2997c36de03192dfcda941 - pristine_git_object: 409f0526316a621b30dfbe45126c6b232e01fad4 + last_write_checksum: sha1:5873780bc2a828f1164818eb9c64c3f69c6618cc + pristine_git_object: f65ff6e888a460ac5f3ad3a4556ccdd8366960c0 docs/models/function.md: id: 416a80fba031 last_write_checksum: sha1:a9485076d430a7753558461ce87bf42d09e34511 @@ -1072,16 +1072,16 @@ trackedFiles: pristine_git_object: f1f6e39e724673556a57059a4dbda24f31a4d4b9 docs/models/functioncallentryconfirmationstatus.md: id: 18f36160d744 - last_write_checksum: sha1:cc3ea4e03d26a1b22f94d42a87bd5ae63535d266 - pristine_git_object: 8948beb6d9ac647ada655960284dfc7f6d1f5ca1 + last_write_checksum: sha1:3dc2f763ea0d74ebc781de4bf9e1b4e8d50382fc + pristine_git_object: 91231a0afa9b107636ca1446886ff2939d8dba5a docs/models/functioncallevent.md: id: cc9f2e603464 last_write_checksum: sha1:58c6ee00af0c63614fd7506345977f9f2d8838ec pristine_git_object: 0e3a36d6045a69e96c40836cdb586424225775af docs/models/functioncalleventconfirmationstatus.md: id: a33cc7957407 - last_write_checksum: sha1:36ac2d3442d83cbb1256e86f413134296bf8e90f - pristine_git_object: 4a3c8774d4eec4e1f5fea23a1827082e09f91669 + last_write_checksum: sha1:8cdbace8d072cd259dd11cc306b8c077065780a6 + pristine_git_object: 95bebe968adb78710b68ef68a3bee86b16673a9a docs/models/functionname.md: id: 4b3bd62c0f26 last_write_checksum: sha1:754fe32bdffe53c1057b302702f5516f4e551cfb @@ -1188,8 +1188,8 @@ trackedFiles: pristine_git_object: 5145469e26759e7df9477dce921c800b70af424b docs/models/imagedetail.md: id: f8217529b496 - last_write_checksum: sha1:fdf19ac9459f64616240955cb81a84ef03e775c8 - pristine_git_object: 1e5ba3fd405a14e5e2872cc85504584dca19b726 + last_write_checksum: sha1:f19cce37f0bdaa8c4e797690de19f01374ee4086 + pristine_git_object: bd7ea1fe08f2fcc737d6951a44584e22578ed9ba docs/models/imagegenerationtool.md: id: d5deb6b06d28 last_write_checksum: sha1:a1813ef99e4a0990fd073bb2311c475e88072029 @@ -1288,8 +1288,8 @@ trackedFiles: pristine_git_object: 23c52c342358ea889b25ee7b18b381b68519c6cf docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md: id: 8545ffb587d6 - last_write_checksum: sha1:bbc08ca53c2da180b96ed0347cf4954410c79311 - pristine_git_object: 40d57686aec11d9bdc4c116ea4c98183e0a6414c + last_write_checksum: sha1:97fd42195fa792d504b5adc89e4fd159ac5416b9 + pristine_git_object: 1436f6aef8b2a3c26bd084e7916f6a104bf9ddcb docs/models/jobsapiroutesfinetuningstartfinetuningjobrequest.md: id: b4e2b814d8c3 last_write_checksum: sha1:f13b5c8f2e74cc73b58a30d366032c764603f95e @@ -1348,8 +1348,8 @@ trackedFiles: pristine_git_object: 4abeffa50be5eb60802391062302e9106f1ccfd0 docs/models/judgeoutputtype.md: id: 49623b360404 - last_write_checksum: sha1:2bb675f4824785fdce67918e698eeec682a59e5d - pristine_git_object: 6e9dfd7200de7457590b9f68c2e95361e4ebf128 + last_write_checksum: sha1:d47557ab8f7ae50d94c597ea2e827b1e5a603a90 + pristine_git_object: 35a1a8373a8c072d90d7e93264209bd894ed92b5 docs/models/judgeoutputunion.md: id: 636200cea9aa last_write_checksum: sha1:382aa75d840423705f9477cb77ca2a5832a1ee69 @@ -1544,12 +1544,12 @@ trackedFiles: pristine_git_object: 7f86303651650177ece51b82d867cab858e830ae docs/models/mistralpromptmode.md: id: d17d5db4d3b6 - last_write_checksum: sha1:abcb7205c5086169c7d9449d15ac142448a7d258 - pristine_git_object: c3409d03b9646e21a3793372d06dcae6fef95463 + last_write_checksum: sha1:d7804c45f10f2e929276d4a00bf6c2b966a78fb5 + pristine_git_object: 9b234e3ea8fc13261897acf18ce4da3b14485f72 docs/models/modelcapabilities.md: id: 283fbc5fa32f - last_write_checksum: sha1:8a221e2334193907f84cf241ebaf6b86512bbd8b - pristine_git_object: c7dd2710011451c2db15f53ebc659770e786c4ca + last_write_checksum: sha1:98df9700314cc4ee6051e0e18d22dfaacb0ad648 + pristine_git_object: 7ff789ed85ae894b51ef2253e9a66aec558616d5 docs/models/modelconversation.md: id: 497521ee9bd6 last_write_checksum: sha1:aea6f51b6276c5e36447c828e78a30367f15a978 @@ -1568,8 +1568,8 @@ trackedFiles: pristine_git_object: b44e84a00d0c54f8df78650d45de0a409c901048 docs/models/moderationllmaction.md: id: 26373b4ad9cd - last_write_checksum: sha1:da6507feedd7db7e8e0c0d5ca3428e3f5a3aee9a - pristine_git_object: 951880b61ec0e40c30c427f9c2b5f68c5a89a7e2 + last_write_checksum: sha1:d8398d9c6b0da5f6a9947342c2cfc2d04e599519 + pristine_git_object: e46a30b4c3737fa2098d2502b896edb2c950b2c8 docs/models/moderationllmv1categorythresholds.md: id: b474ca28a6e7 last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 @@ -1604,8 +1604,8 @@ trackedFiles: pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:cba4ebf5b8b3007046c124504e1472bcd464f109 - pristine_git_object: 0c387f570c7b96c402c0e3d60108ee4cdcb22764 + last_write_checksum: sha1:406db6551a5ee4efba4b876239245c71f0d93822 + pristine_git_object: d121b2641c0f58c62c3b3cc73c5fdffe5e7c1d92 docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -1640,12 +1640,12 @@ trackedFiles: pristine_git_object: d9d79125cb02bc2b09d8dc543a5e2d4a6c55571c docs/models/op.md: id: 4f953e6b890f - last_write_checksum: sha1:ca76665f125d37edbcf87a36a2aaafdb722d03a4 - pristine_git_object: fa3e2f3a9e437f6bd82ad87e1589484392ccb68c + last_write_checksum: sha1:24b06144f98d9843f99402c3dc890fa911646e52 + pristine_git_object: da9031db6360c37490c3b30f9608bfb9776c38ca docs/models/operator.md: id: 1b6d3fc58add - last_write_checksum: sha1:e1008f48087ee8da75dd25be6207f7b2098fe131 - pristine_git_object: ca54debcf338366f66c540fdb2020e85959ef5b9 + last_write_checksum: sha1:98ac05cdbd6839c9ff93c4d805eebd7ba9f26dcd + pristine_git_object: 2790c574454daba86720666a2877ffa4467a4134 docs/models/option.md: id: b70901c8beab last_write_checksum: sha1:aeac15a068312b38625c3efcd08f5f179f607f92 @@ -1656,8 +1656,8 @@ trackedFiles: pristine_git_object: 2a2172695146be50782a3ef32815950d4829cf64 docs/models/orderby.md: id: 9e749ed80f72 - last_write_checksum: sha1:6ec002e3e59f37002ccb14e347b790ca4daef773 - pristine_git_object: bba50df10855a8d6acdf4b061ec2ffeb0279fd7f + last_write_checksum: sha1:4f6dd8e684dd11e4856d3d6cf2c0f2e2d1a01640 + pristine_git_object: d778621f6b1e6788aecbe25bd741d27a0d863990 docs/models/outputcontentchunks.md: id: f7e175c8e002 last_write_checksum: sha1:5094466110028801726cc825e8809f524fe1ee24 @@ -1728,8 +1728,8 @@ trackedFiles: pristine_git_object: 514caa50e524ae5afab802b8394cb27189b2bfbe docs/models/processstatus.md: id: "336054835357" - last_write_checksum: sha1:9b87de1980428307af6c29c2086c0e1f612ebd72 - pristine_git_object: 3a9c004e55cc31abb52d1f0bb450290465d42a1c + last_write_checksum: sha1:43253d2ef4badf3a5e8e5981becfb558c934359a + pristine_git_object: 68313743c4d926b2cb29037d0e59a2f9d8d25f1c docs/models/realtimetranscriptionerror.md: id: 4bc5e819565b last_write_checksum: sha1:c93e4b19a0aa68723ea69973a9f22a581c7b2ff6 @@ -1776,12 +1776,16 @@ trackedFiles: pristine_git_object: d6c6547d7895e53be15a0cce46b6524178acc3bc docs/models/referencechunk.md: id: 07895f9debfd - last_write_checksum: sha1:4384049375a2566c7567599f97ce1ec19e9f6276 - pristine_git_object: d847e24845a399c7ca93d54701832fb65e01b3ab + last_write_checksum: sha1:3d35227a4f7612301fd5f17a445c4c2b712f0bf1 + pristine_git_object: 0186d3c358e27d01617c982f61db0910039a049a + docs/models/referenceid.md: + id: 22fa492a467e + last_write_checksum: sha1:274c6c868426621086d623f14a1d5b146a7b7506 + pristine_git_object: f9769645cbbb8a59c30f60a4e0d0caec60d82ad0 docs/models/requestsource.md: id: 8857ab6025c4 - last_write_checksum: sha1:4b7ecc7c5327c74e46e2b98bd6e3814935cdecdf - pristine_git_object: c81c115992439350d56c91d2e3351a13df40676b + last_write_checksum: sha1:5634447d01c483713dad3d6d39df182007e6181b + pristine_git_object: b710cc1f394e04ecc93c9fc6daddddec366254ad docs/models/resource.md: id: 94a32a903140 last_write_checksum: sha1:0c141e37497f5b07d2da77a41777617ed3653582 @@ -1792,8 +1796,8 @@ trackedFiles: pristine_git_object: 074c573e64e98cbaf177fde279364f26df04a2bf docs/models/resourcevisibility.md: id: 891d464e9c47 - last_write_checksum: sha1:acf48cc74f27035f479f976e73897ea02d7eaaa8 - pristine_git_object: 9c06af2d034cb7de730aa39aa3a3188aac4bc764 + last_write_checksum: sha1:cb0eaebe4e984ab4d999745a142868d2359ab8e4 + pristine_git_object: 970211bb11b10aac688084845d1172e65d1ced1d docs/models/response.md: id: 583c991c7a30 last_write_checksum: sha1:0791cb4aa4045708ab64d42bf67bd6ab74bc7752 @@ -1812,8 +1816,8 @@ trackedFiles: pristine_git_object: 5cab22f2bf1c412699f6a7ed18ef801ecbc3ee4b docs/models/responseformats.md: id: cf1f250b82db - last_write_checksum: sha1:105e1f9181913104b554051838cbdd0f728aa2c4 - pristine_git_object: 2f5f1e5511b048323fee18a0ffdd506fe2b3d56f + last_write_checksum: sha1:c7fedb61c8c40d4ff6bebefa37133668e5a8582d + pristine_git_object: 12e5edd7ffaa05000f26cab5e92a7ea1570a94f9 docs/models/responseretrievemodelv1modelsmodelidget.md: id: 6143ec73bdd6 last_write_checksum: sha1:6bae62cbb18559065a53f0acdacb1f72f513467e @@ -1832,12 +1836,12 @@ trackedFiles: pristine_git_object: f1280f8862e9d3212a5cfccd9453884b4055710a docs/models/role.md: id: b694540a5b1e - last_write_checksum: sha1:c7ef39a81299f3156b701420ef634a8b4fab76f0 - pristine_git_object: 853c6257d9bdb4eda9cb37e677d35ab477dca812 + last_write_checksum: sha1:dd140bf891a9b08db014fde4a99af28839e10dfb + pristine_git_object: b16f5c3baef6a17d3900b3eddcc5034e37a12b01 docs/models/sampletype.md: id: 0e09775cd9d3 - last_write_checksum: sha1:33cef5c5b097ab7a9cd6232fe3f7bca65cd1187a - pristine_git_object: 34a6a012b1daeeb22626417650269e9376cc9170 + last_write_checksum: sha1:b77964a7b39ec1b74f70925a39c30b23fad6ac43 + pristine_git_object: 31f26c3c2869a453306fff5b062b40e95aa5f19a docs/models/searchchatcompletioneventidsrequest.md: id: ace22de1b563 last_write_checksum: sha1:0368a82e5b6399806252670aec01714e5bb78331 @@ -1860,8 +1864,8 @@ trackedFiles: pristine_git_object: 2e0839d06f821dd97780dc22f202dedf23e4efe1 docs/models/shareenum.md: id: 53a713500576 - last_write_checksum: sha1:9d45d4bd272e6c146c3a8a21fd759acf2ae22148 - pristine_git_object: dc5d2b68a810c2983b5a47fbff747dfc2cc17598 + last_write_checksum: sha1:de5c59ca89596a3b28134a9f7318fed3b3e6af02 + pristine_git_object: d471b7c3c6700146dc02e20d3aa6205a5025d134 docs/models/sharing.md: id: 9f1e88417a87 last_write_checksum: sha1:876fd514d08a6987646bf0fec636bf3fef89155b @@ -1876,16 +1880,16 @@ trackedFiles: pristine_git_object: 21b8ec1f74c1f903aa087cd3b4d13918c0ea9dad docs/models/source.md: id: 6541ef7b41e7 - last_write_checksum: sha1:d0015be42fe759d818ebd75b0cec9f83535a3b89 - pristine_git_object: bb1ed6124647b02c4350123bf257b0bf17fc38fd + last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 + pristine_git_object: 37ca338b6f2ba9d10209cbcd3c680b7589589767 docs/models/ssetypes.md: id: 6a902241137c - last_write_checksum: sha1:567027284c7572c0fa24132cd119e956386ff9d0 - pristine_git_object: ae06b5e870d31b10f17224c99af1628a7252bbc3 + last_write_checksum: sha1:6291d6bc7cbcd7640b83b03ac8ce353b95c1f913 + pristine_git_object: 372eafee6f22105d6f5fd31f2e04ea04f5abe641 docs/models/supportedoperator.md: id: 000f0770e0f9 - last_write_checksum: sha1:7702df7346f66b739b5a7e1d26b2d5ebc9d19c74 - pristine_git_object: 74cf9b8e6705059a24e7d1d0e311943ed1ce5c40 + last_write_checksum: sha1:ea71b0062712f8750234d8bd5313063589de1155 + pristine_git_object: 97dbd4b14b71389273583d142009548abca92e1f docs/models/systemmessage.md: id: fdb7963e1cdf last_write_checksum: sha1:c7603c5ce77ba2bcbda9eff65eeafdb1e9ecbec7 @@ -1900,8 +1904,8 @@ trackedFiles: pristine_git_object: 40030c170746d9953d25b979ab7e6f522018e230 docs/models/tableformat.md: id: d8cd08c55c3c - last_write_checksum: sha1:e0736ea9576466d71821aa1e67fc632cc5a85414 - pristine_git_object: 54f029b814fdcfa2e93e2b8b0594ef9e4eab792a + last_write_checksum: sha1:3ef23d504527602f2d0789d2cfb1a6629115f41a + pristine_git_object: 8321a3090910115b586be900bcf23da5baf4c245 docs/models/textchunk.md: id: 6cd12e0ef110 last_write_checksum: sha1:d9fe94c670c5e0578212752c11a0c405a9da8518 @@ -1924,8 +1928,8 @@ trackedFiles: pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/timestampgranularity.md: id: eb4d5a8e6f08 - last_write_checksum: sha1:e256a5e8c6010d500841295b89d88d0eface3b88 - pristine_git_object: d20012ea9925446c16c9162304642ba48391d34d + last_write_checksum: sha1:b423f56d3a6004ed89c356806002b2af3e5c5a56 + pristine_git_object: 4c84779c4d2e8bf2a2fe258c2b350b05d047f2e3 docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a @@ -1944,8 +1948,8 @@ trackedFiles: pristine_git_object: 373046bbbc834169293b4f4ae8b2e238f952ddde docs/models/toolchoiceenum.md: id: 15410de51ffc - last_write_checksum: sha1:ca0cf9bf128bebc8faedd9333cc6a56b30f58130 - pristine_git_object: 0be3d6c54b13a8bf30773398a2c12e0d30d3ae58 + last_write_checksum: sha1:cdff87c62661fcb902824fda8e305c5b1b98b3d8 + pristine_git_object: eb1f36298acfc2c3aa33224e95c87f17da9caf0d docs/models/toolconfiguration.md: id: 06bfa2c4e662 last_write_checksum: sha1:9b619977375f228c76f09d48d6e2833add6c07e2 @@ -2008,8 +2012,8 @@ trackedFiles: pristine_git_object: 999f7c34885015a687c4213d067b144f1585c946 docs/models/tooltypes.md: id: adb50fe63ea2 - last_write_checksum: sha1:f224c3d8732450b9c969b3e04027b7df7892694c - pristine_git_object: 84e49253c9b9bd1bd314e2a126106404cbb52f16 + last_write_checksum: sha1:d0d67b717773cbc99add6716e0287e64f04d24df + pristine_git_object: 345ee7dc07187e1ee06726ec63ffb75e1a34e736 docs/models/trainingfile.md: id: 4039958e8930 last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648 @@ -2036,8 +2040,8 @@ trackedFiles: pristine_git_object: eea8e9281634c56517e28f613afee38e0b0846ad docs/models/transcriptionstreameventtypes.md: id: 701782e8a63d - last_write_checksum: sha1:ff79dfb5d942c807b03c9e329a254bfa95b99a16 - pristine_git_object: e4eb25a6400dcc5a48b5eb5f65e96f7be91fa761 + last_write_checksum: sha1:7a6fc032e6dd63912472b9158c07cf20ceefe7e3 + pristine_git_object: 9e49384e399f15e70382050ee414a7446d1e4b70 docs/models/transcriptionstreamlanguage.md: id: 5e9df200153c last_write_checksum: sha1:d5626a53dde8d6736bab75f35cee4d6666a6b795 @@ -2052,8 +2056,8 @@ trackedFiles: pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d docs/models/typeenum.md: id: d306d1d601a4 - last_write_checksum: sha1:506e72f893c4cebf7bbeb59fd05fbe5caafdb68c - pristine_git_object: 80a66af314d5ba9f5a99b07f3db9760849edad53 + last_write_checksum: sha1:f0f0bfac75bf5e5fcd972d0cb196961d512d40ad + pristine_git_object: ec47cf9668f839469c9ab71c010f3e1975be929c docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 @@ -2192,8 +2196,8 @@ trackedFiles: pristine_git_object: b8150eb85d182af6e7ed8216cc4b4a535271a53a docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:3bc235805eff20efdb634834e11f519a5d09dd47 - pristine_git_object: 0803b39816e5393050f383407f162446eb0d455d + last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 + pristine_git_object: 63cd80a4a655a5c139be79239b0787c3f90cdea9 docs/sdks/datasets/README.md: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 @@ -2272,8 +2276,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:3d3edd7cc94ea5c606cee1b8f046cdc498e8605e - pristine_git_object: 131837b21ca2c493f2af563add51d8fe842799db + last_write_checksum: sha1:0e303dbbffd662c25a730fc8e8722335aa60bd56 + pristine_git_object: 4531730bf1c2d53c691ae836aff2478b6ffc0aa9 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -2328,8 +2332,8 @@ trackedFiles: pristine_git_object: 37e018330e85109692a83d97d62a5efe7a15ee6f src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:c13593e5cf9c7f7d5b4c32a874a0b8e1212d1e0f - pristine_git_object: 99f3a33e211ce45d8920baa60f0e8bc915cfb50f + last_write_checksum: sha1:cb25436bb3ae12c2f6b215b6d5e9de4e219cbe25 + pristine_git_object: fafcd5f5221d2177962f3d8239abda9a99b5f3a9 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 @@ -2404,32 +2408,32 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:8b1de8b199740065d159c3025c564dce74654e1a - pristine_git_object: 7b5eb3434b332c53ae32470c513f25fb606caf30 + last_write_checksum: sha1:c3fbb9ce09e935d3c6c987a519c080c4728f7dad + pristine_git_object: 361b16a917f8fd65d1ec57294f3168f3dbe0389e src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:6bd14cd797a902679111638ede8b3f8a6389ba87 - pristine_git_object: 068b32267ff9305d6431790bccee7b79fce3c1b5 + last_write_checksum: sha1:c650f57616b5455de2a6ff33c51f91b174586aee + pristine_git_object: 36cb26bfc19f17866330d709f82e15555b1a99e5 src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 pristine_git_object: 6972af2a4ae846e63d2c70b733ecd6c8370ee0cd src/mistralai/client/models/agentconversation.py: id: 1b7d73eddf51 - last_write_checksum: sha1:28718fb00dbe74241712b4f7a3fbce2d060f7e86 - pristine_git_object: da30c6634294cdaba459b68ca8877d867ee052fb + last_write_checksum: sha1:2619ac07a5b0642d5ea02b843bf38a7e32ec8cb1 + pristine_git_object: b52f5e5a96c497c731c19f32c6142ee50ed29367 src/mistralai/client/models/agenthandoffdoneevent.py: id: 82628bb5fcea - last_write_checksum: sha1:829c5a152e6d737ffd65a3b88b0b2890e6703764 - pristine_git_object: e2609e3d1fb62b132eb53112eb2bdc4ae855085f + last_write_checksum: sha1:2c8fbb608143ee836e675a0d9610a64b7b8ac99a + pristine_git_object: ea9cd6b2a64e6add14bcf1f87dc5a15f800dde61 src/mistralai/client/models/agenthandoffentry.py: id: 5030bcaa3a07 - last_write_checksum: sha1:c9544755ad6d3a3831f8afe446c6a9a523eb5137 - pristine_git_object: f92ef2cc7310d5df94436f3067a640d3848405f0 + last_write_checksum: sha1:dbbadef3757f8949c63cc0bf91ac8e72a2e42abb + pristine_git_object: 8d1c143eac305c79da8ce4566b51b399da91585c src/mistralai/client/models/agenthandoffstartedevent.py: id: 2f6093d9b222 - last_write_checksum: sha1:c9f86e01497c53f3c1806dbb9fdff6e2d9993323 - pristine_git_object: 2a4023419212fec8b3f0e83d506a25b17408a8b1 + last_write_checksum: sha1:b354f10f57b51aa515932ec403eba7034eaf9e9b + pristine_git_object: 9525bcf65ed318872e038078ec379f87794d6f84 src/mistralai/client/models/agents_api_v1_agents_create_or_update_aliasop.py: id: 23a832f8f175 last_write_checksum: sha1:237d6b4419615c9c26f96d49760732bd7b4617e7 @@ -2448,20 +2452,20 @@ trackedFiles: pristine_git_object: 941863d0f8143020200bb5566ce66d527c4369c8 src/mistralai/client/models/agents_api_v1_agents_getop.py: id: f5918c34f1c7 - last_write_checksum: sha1:b90285965e2aaccaf989e59b8f1db4a53ae8b31c - pristine_git_object: dd17580dd0041a979fc6c9c7349d14a3e200f5d3 + last_write_checksum: sha1:6a420e218b378015507acda1e8eb4de9fc865c06 + pristine_git_object: dee6a3475ff81f773f92f4473410639dacafd517 src/mistralai/client/models/agents_api_v1_agents_list_version_aliasesop.py: id: a04815e6c798 last_write_checksum: sha1:b4b5c4e8566f1d0c68a14aba94b7ffea257fd7ce pristine_git_object: bb1da6020386fabfbd606db9a098a0e9323ce3b0 src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py: id: 19e3310c3907 - last_write_checksum: sha1:6628e9ff747c579e11fa9a756cee3b11c57c476d - pristine_git_object: 54b62e90e23c1782a0b068460d6877cac3b28916 + last_write_checksum: sha1:14f86d6a09a6c3ee8579ef5b3f7ecbf0aa467c40 + pristine_git_object: 25ea29e31693b6352f0ab395b4f21352e46ab037 src/mistralai/client/models/agents_api_v1_agents_listop.py: id: 25a6460a6e19 - last_write_checksum: sha1:0abe889b85470b28917368a2b958a13303bd38f1 - pristine_git_object: 97b1c7f1a070be5e12e1a32ad56dbcfcb0f1cd68 + last_write_checksum: sha1:ff64974c26700e1b32ad90f7b7b8917aef73d985 + pristine_git_object: 100e0da71927900c796e294c5e7438138faaf647 src/mistralai/client/models/agents_api_v1_agents_update_versionop.py: id: 63f61b8891bf last_write_checksum: sha1:e9046cf75e008e856f00dda8725cbb16d83cd394 @@ -2492,8 +2496,8 @@ trackedFiles: pristine_git_object: ef0a4eb084de52d4bde435ee9751aaa12e61dcc3 src/mistralai/client/models/agents_api_v1_conversations_listop.py: id: 936e36181d36 - last_write_checksum: sha1:e3e52cf7967b9b78099db9449cb33e3ded34d111 - pristine_git_object: 8bf66aea23f16734c1f9e03629aaf7246e4e60b4 + last_write_checksum: sha1:dc0da883d6e6d045dc85f74032c50d7ae0c19669 + pristine_git_object: dd6276d9ececa4fd28f179c58adfc5b71043db86 src/mistralai/client/models/agents_api_v1_conversations_messagesop.py: id: b5141764a708 last_write_checksum: sha1:17fd503da7fb20198792c6e25f94dcc0a1e5db05 @@ -2508,16 +2512,16 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:5d81a0421184ed547208e8ea7cff47b18fc00788 - pristine_git_object: 6955f6acb023fd842d9ec46a694d270a66911c0e + last_write_checksum: sha1:9f4a0bafdbe8ebde528dc54eac074585d40e449a + pristine_git_object: 1cff8f9537636933d3fcabe4378ec471ff9115c0 src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:b46298a653359bca205b6b1975bcd1909e563dff - pristine_git_object: c2cf35522236f29ca1b9f2a438dfc79a59ca3e2a + last_write_checksum: sha1:0e6a229fc0e5f082f6fbaafeb759d5df5100c8bb + pristine_git_object: 32f13fb1ed7dcb68eed43166c24aee680030c59a src/mistralai/client/models/annotations.py: id: 3ae9e07de11d - last_write_checksum: sha1:a67ea607358e534448fe556c6008105a8cf89a07 - pristine_git_object: ba085e2c7784ca442c4a5da72dddf3561dda0d9d + last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 + pristine_git_object: f3f5c21c66dd570be71d8d87350ec7683478b545 src/mistralai/client/models/apiendpoint.py: id: 00b34ce0a24d last_write_checksum: sha1:733e852bf75956acd2c72a23443627abfa090b7b @@ -2528,20 +2532,20 @@ trackedFiles: pristine_git_object: 10cbaf589e2a4bc1e63b3a02689e76f4d7f1e88a src/mistralai/client/models/archivemodelresponse.py: id: 2d22c644df64 - last_write_checksum: sha1:d0f67fd2bc5a6e8de4f2b0a5742ceb4a1f7f5ab8 - pristine_git_object: f1116850c8bf0159c4146d4973988ea5d0fe7de7 + last_write_checksum: sha1:e55af09d03586d14e2a52292be9a0d6729f9e1e7 + pristine_git_object: c5ca8ff5d3a571bd8bc936eca1d361d09358b2f5 src/mistralai/client/models/assistantmessage.py: id: 2b49546e0742 - last_write_checksum: sha1:dcfa31c2aac95a0d7bd748e96bd87a5c85c0d1f6 - pristine_git_object: 26a778c70439d21b890e85f2c85dbb560e8bffef + last_write_checksum: sha1:0610c5a58e3aa264ba77f603e75adce29ecbe3c7 + pristine_git_object: f333a44422c7f6114797b63f1faf94e2bc9ef90e src/mistralai/client/models/audiochunk.py: id: ce5dce4dced2 last_write_checksum: sha1:d3c2e28583d661a9583c40c237430a1f63ea7631 pristine_git_object: 68866cd2c3c640cf56258f2f98b8a2385ea6fcdb src/mistralai/client/models/audiocontent.py: id: 8e39736e73f0 - last_write_checksum: sha1:9f96ac9f1b3035b66f0920df1b46a59df7c6bca8 - pristine_git_object: b0a9505b05c9fc27a5562aca4bf2d1de37eb3100 + last_write_checksum: sha1:8ae8d3af5ba655b4766f8710c34c31d8401cc18a + pristine_git_object: 2d38d2a1479327156434a5338229f48d7fae7df6 src/mistralai/client/models/audioencoding.py: id: b14e6a50f730 last_write_checksum: sha1:92ca06dce513cd39b2c7d9e5848cf426b40598ce @@ -2552,56 +2556,56 @@ trackedFiles: pristine_git_object: fef87ae76b31128ebd5ced4278e274c249181c23 src/mistralai/client/models/audiotranscriptionrequest.py: id: e4148b4d23e7 - last_write_checksum: sha1:a6ef85be4ae24aa79c8c3fa9dcaf055e0ba9b266 - pristine_git_object: fe4c79e3427fae3e022bd936236d2934eaa76b60 + last_write_checksum: sha1:ab55d16773cdd9d536999537908d5bb70c642cd1 + pristine_git_object: 734860d52b12c11e007faf8ef5d1c233d2a183c6 src/mistralai/client/models/audiotranscriptionrequeststream.py: id: 33a07317a3b3 - last_write_checksum: sha1:6e648ff58a70a0a3bd63a24676122b80eba4baf7 - pristine_git_object: 2d1e9269b51d84cd8b21643fe04accd00839b013 + last_write_checksum: sha1:c7e404caadd964924bb59372827f702acc7dd3f2 + pristine_git_object: 84c4dbcdf555b057190d53ac5a952b9b566ca3fc src/mistralai/client/models/authdata.py: id: b4d3fb07196e last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:0cd6a43a558734d38fbc39f1120a54c4cc825fe6 - pristine_git_object: f8b8faf759b795c4a9d072c2e4b50a4d22c80f7c + last_write_checksum: sha1:7d7b08ba19500836193c593bacc1dd6982c9ef71 + pristine_git_object: b57ff2cab05c7a2a7f10292ff1c017eb58a10f84 src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 - last_write_checksum: sha1:e2c3d1effee5b434fea9b958c0dd54fa96143924 - pristine_git_object: 9c9e9a2045a10f4606f11ee5886a19ccf03bbf0e + last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e + pristine_git_object: bb3c99ddb4495488b4e058cd32332808d6de08b9 src/mistralai/client/models/basetaskstatus.py: id: 7b381554d5c7 last_write_checksum: sha1:8124cb3871ff7565865cd8b06181b5b0a8eb3428 pristine_git_object: ff2f1c63a6dceceeabe6b8c6bc8bf1a7c64c70a0 src/mistralai/client/models/batcherror.py: id: 1563e2a576ec - last_write_checksum: sha1:51c9e9a4d306c2de45dc0879ade62daed3fc2972 - pristine_git_object: 8a353cd2dc06a8c6f2db3d6b613cfdca8278f57e + last_write_checksum: sha1:3bb5b8a9f479b888efc37cf1ba9731e5efc3d8d0 + pristine_git_object: a0add5ad71b1732849fe89de72227e846b3e3b1b src/mistralai/client/models/batchjob.py: id: 85cd28932cc7 - last_write_checksum: sha1:532a8c6ca8546052159e5e5174cf65ce17a62f3f - pristine_git_object: 80acac336883c23b621d0dc647fef20548bf061a + last_write_checksum: sha1:d9aab4f4058332de7f8e05ddc0719dbc9b054993 + pristine_git_object: 9cef43800cf382fe27d84fa958df493fe9624ea1 src/mistralai/client/models/batchjobstatus.py: id: 61e08cf5eea9 last_write_checksum: sha1:78934183519948464385245cbc89efb68ac00bfb pristine_git_object: bd77faa2fbed74b19a8d3884af6d43bc1b4806e0 src/mistralai/client/models/batchrequest.py: id: 6f36819eeb46 - last_write_checksum: sha1:b2a71163e37a9483e172dc13b6320749bee38f2f - pristine_git_object: 911a9a0554b9b8cb6dedcb3a86a06c39890b875e + last_write_checksum: sha1:f4ed16f0d2fef446bf1b4eb3023d4f38824ffe6d + pristine_git_object: dcc47bd25fd0b790677b3e175b3e62058c970327 src/mistralai/client/models/blobresourcecontents.py: id: fa924bc295ad - last_write_checksum: sha1:2d0d6f84e274e544e2d1535513726f547fc2d1b7 - pristine_git_object: c2a55f95a156006e86f5f945c70bee8025e38fea + last_write_checksum: sha1:e624129b00144d82726a5a2ac5d3a809061b76ae + pristine_git_object: bfae16fb641bbe2c6dfa8c3aab1a042182d9137e src/mistralai/client/models/builtinconnectors.py: id: 2d276ce938dc last_write_checksum: sha1:4ceb3182009b6535c07d652ccf46661b553b6272 pristine_git_object: ecf60d3c1a83028d9cf755d4c9d5459f6b56e72a src/mistralai/client/models/campaign.py: id: c91d862fb405 - last_write_checksum: sha1:def484a2eefa9be72db2bfa63d93201e2a07f554 - pristine_git_object: a52bfcb90d6d8d29f4e23f71c5e95564bf3c95ec + last_write_checksum: sha1:770d93cc4d9b8e23ea781592888be5b811533f21 + pristine_git_object: 62427fa0336eab3448064fc1a7a02427d44e309b src/mistralai/client/models/chatclassificationrequest.py: id: afd9cdc71834 last_write_checksum: sha1:a29088359142ebd6409f45569168b2096014119e @@ -2620,16 +2624,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:1f0390718ab06126a05e06797ef6af310ccab543 - pristine_git_object: e871bd92733ac400fdfeb2cf4f66fc32a7584103 + last_write_checksum: sha1:adeccdfdc69c077eb8ab783e82aabf898b80fa9a + pristine_git_object: 1b4bfb025c1ba2527943bd18219aeddd9de7f45b src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:c197792ed1dd78159ab0b970f8f76087ff2c4d6b - pristine_git_object: b7b2bff138cee9c130fa01d6157d8b6c21ea5a9c + last_write_checksum: sha1:077bc9c7a9afe2d10cd699aaf75997928b7eca1c + pristine_git_object: 75aab84cb34ded037561f4445b843e435350676a src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -2644,8 +2648,8 @@ trackedFiles: pristine_git_object: c24e433eb4787146620fb48b6d301f51a4db5067 src/mistralai/client/models/classificationrequest.py: id: 6942fe3de24a - last_write_checksum: sha1:7bd416d4b0e083efbf9324107263027140702ddb - pristine_git_object: 25b6941355cb9629abb9c0f09fb6fd191c56ffa6 + last_write_checksum: sha1:8b6f78592b6fe5c5a0e686f54ad1f99d3fdb78c5 + pristine_git_object: 4300f9ad559f6a2d87c726fd5f0b82d83e643481 src/mistralai/client/models/classificationresponse.py: id: eaf279db1109 last_write_checksum: sha1:64522aa2b0970e86a0133348411592f95163f374 @@ -2656,72 +2660,72 @@ trackedFiles: pristine_git_object: 6c7d6231d211977332100112900ea0f8cdf5d84c src/mistralai/client/models/classifierfinetunedmodel.py: id: 5a9a7a0153c8 - last_write_checksum: sha1:853bf1b3b941ec3aebeb17ac2caf38fa0dd094de - pristine_git_object: fbcf5892d7f0a3ed8b3872d71dd95ed3a25463d1 + last_write_checksum: sha1:64ba0eff2b87654e569f6a561ce09eb1d7377437 + pristine_git_object: 7c2bfc80c5881319692a54a13a78a479aa47604a src/mistralai/client/models/classifierfinetuningjob.py: id: a244d5f2afc5 - last_write_checksum: sha1:ceb13935702275025284bb77aa8bf5ccf926e19c - pristine_git_object: fb160cf8e16a1b4899f8bb2803b18ba1f55232ce + last_write_checksum: sha1:b65b4bab42100c8e00821e6f81e03d2efe039dde + pristine_git_object: 5a5f8a482b3eca6948bd58a550a81eda36da83e2 src/mistralai/client/models/classifierfinetuningjobdetails.py: id: 75c5dee8df2e - last_write_checksum: sha1:6b3f2f7ca3bd4e089591f5f9c59b7e28a00447f8 - pristine_git_object: 5d73f55ee0f1321fdeeb4db1971e144953e8e27f + last_write_checksum: sha1:a1f4c81b573aa48a3b1558b07fa43dc124fede88 + pristine_git_object: dcdd62b3d2311f633908cfc065701a6464557d30 src/mistralai/client/models/classifiertarget.py: id: 2177d51d9dcf - last_write_checksum: sha1:c801dacc31e2d7682285a9a41d8ef38fa2e38fb9 - pristine_git_object: 4d66d789a42a0bc8762998161f1ad801bd8d96d4 + last_write_checksum: sha1:ea159e369ba3dcaada53eec102ec37234fa14670 + pristine_git_object: bfd5646e92aa5ed41f5ac13787a6200896b3d37e src/mistralai/client/models/classifiertargetresult.py: id: 19c343844888 last_write_checksum: sha1:3f5b37de3585cb38a3e41f0ee49dc4b5a33bf925 pristine_git_object: 8ce7c0ca167b38ebaf1e5fc6393ab56d9f142cfa src/mistralai/client/models/classifiertrainingparameters.py: id: 4000b05e3b8d - last_write_checksum: sha1:d7ce2f1017463c52856b973d696c9abecf5f79e3 - pristine_git_object: 14fa4926f8b5b62aa6b5d8864c40d5acf66e7b15 + last_write_checksum: sha1:c2279b1a67b20f0f2643a0fbe5f1a01c6ba72f49 + pristine_git_object: 3a9576c830163d351b5d8f6b66bb612fca12b844 src/mistralai/client/models/codeinterpretertool.py: id: 950cd8f4ad49 - last_write_checksum: sha1:8c3d91805d6c5f5cc9d249216694781faf15ea68 - pristine_git_object: ce14265f6d312c3da52014d2a058b6a730d5c980 + last_write_checksum: sha1:248d6e6c1906303f03eb4f29429227a7d39679a2 + pristine_git_object: 4cf9d055c3aaee426d99071180ae6de21eb648cf src/mistralai/client/models/completionargs.py: id: 3db008bcddca - last_write_checksum: sha1:e3d36235610c0546d8a2f2bb0a1db0f953747d88 - pristine_git_object: ab5cf5ff2d4df92d00664803f9274696ae80216d + last_write_checksum: sha1:b922bb4464d2759c54aa6dd1a4fd82fba5595e9b + pristine_git_object: 76c4cf98ccb348c0d806a442ad7e3697b8e79d68 src/mistralai/client/models/completionargsstop.py: id: 5f339214501d last_write_checksum: sha1:744878976d33423327ea257defeff62073dad920 pristine_git_object: 39c858e66380044e11d3c7fd705334d130f39dea src/mistralai/client/models/completionchunk.py: id: d786b44926f4 - last_write_checksum: sha1:15f1b57b696b46bf6986c8f1a53d6bbf8d2351e2 - pristine_git_object: 5fd6c173ef29fb9bf2f570e0c2300268221e1ad3 + last_write_checksum: sha1:df78fa0e2374a4f39d8cc0489109a0b7eaf85ce5 + pristine_git_object: 27029b6f08ab42842022f04ddeebbf90154751da src/mistralai/client/models/completionevent.py: id: c68817e7e190 last_write_checksum: sha1:dc43ac751e4e9d9006b548e4374a5ec44729eea4 pristine_git_object: 3b90ab0c1ecac12f90e0ae3946a6b61410247e4f src/mistralai/client/models/completionfinetunedmodel.py: id: f08c10d149f5 - last_write_checksum: sha1:5fbd8c5475c250cbed1c2d2f47de372e8e92b128 - pristine_git_object: 54a1c1656aea1954288e9144670c939e29a83c47 + last_write_checksum: sha1:12ffb210273040ce9aa057a85d348643622c6b59 + pristine_git_object: e75b8d2f0cdaf38c8e1bc583f9b19278fdf04f86 src/mistralai/client/models/completionfinetuningjob.py: id: c242237efe9b - last_write_checksum: sha1:e4352be2411c7026c054a6fe380b87242183d4e4 - pristine_git_object: 1bf0a730c389be30bac2acfa17ffc6b5891e4918 + last_write_checksum: sha1:653d253e02c252ece805d0172d7e214c474fd074 + pristine_git_object: bbcf773217c3d7951b030b7d248b04b30dec17c8 src/mistralai/client/models/completionfinetuningjobdetails.py: id: e8379265af48 - last_write_checksum: sha1:b11c9bdc161da6a5cbd9f35f4bc5b51f0f3cea9c - pristine_git_object: cb7870219b261e260feceb6109088b0bbf8a6408 + last_write_checksum: sha1:71a05ed146d634c6aa3241a2eacbd3d4d4245a7d + pristine_git_object: 8aa8b75da38a73c3857d90d7f7a560a18905507b src/mistralai/client/models/completionresponsestreamchoice.py: id: 5969a6bc07f3 - last_write_checksum: sha1:59730cdaeeb3e95f4d38f63c34a4e491f40e6010 - pristine_git_object: a52ae892fcaafe54918160d055ee2badac31404e + last_write_checksum: sha1:4a1cd9adf6558faf84f873313210e9ae448c287b + pristine_git_object: ef1a106bdbde4eba5de9342a9418413daa08c0da src/mistralai/client/models/completiontrainingparameters.py: id: be202ea0d5a6 - last_write_checksum: sha1:1a797019770795edcd911ff5b3580bedb83c05f4 - pristine_git_object: ca50a7ad521b46f275dd3a39c98911f13ee527c8 + last_write_checksum: sha1:b0c6896368230fd499799cc42b25f9fd51a4d0a1 + pristine_git_object: b91ec9dfd51b8e6fa208ef54dc2a22437df3a22d src/mistralai/client/models/connector.py: id: 1a4facac922d - last_write_checksum: sha1:4acd40b285482f549ac76ef120aa32cd4ec2f171 - pristine_git_object: 967e454f870a44c9354a8ab1493800daeff35cac + last_write_checksum: sha1:2648e3e1647fa9ae857961ccda8b0f5f36a6cade + pristine_git_object: 55730274eaa98e7aa53d04ba4b9006a61e427740 src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:09dfd8f2d560f33fb12cba74cadcd505831d2389 @@ -2732,124 +2736,124 @@ trackedFiles: pristine_git_object: 74134361aeeaf83af57d7edc7d9ae26ab09d96fb src/mistralai/client/models/connector_get_v1op.py: id: 73ca3a446dcc - last_write_checksum: sha1:f3a7480774e8f826ba8bc509a0dce280a18ee855 - pristine_git_object: 5770ee096fe7924384a8cd31ed1e40a11eff3e35 + last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 + pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 - last_write_checksum: sha1:4460df62af1ad834656484e9d34dc3f612fa4d84 - pristine_git_object: a89da710092dbcd14522b0190ef9dbefe49ff76a + last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 + pristine_git_object: 3cb31bf7fe0b814606b4bbdfbf7e5cbf733984bf src/mistralai/client/models/connector_update_v1op.py: id: 6f884d18ac56 last_write_checksum: sha1:be8044958ac76ecfc486dc5cb5f0876e595dcc38 pristine_git_object: 6b00d0b0ca6d83b4ac1fce1ab204ac09ca5ceeb5 src/mistralai/client/models/connectorcalltoolrequest.py: id: 7dc7ec295301 - last_write_checksum: sha1:59caca0ee1ec5c43b8191087b1c202ea3ba3e2bc - pristine_git_object: 4e9a4d45dc4eb242ceda1c31736901e451dec862 + last_write_checksum: sha1:8af4bd44caa8ad09180139e7e8a68052c16dce11 + pristine_git_object: 85366bb6acaa0724a907803c689a2caeb431bf7b src/mistralai/client/models/connectorsqueryfilters.py: id: 3b9fc81aa726 - last_write_checksum: sha1:dc90b518462978d5bdba53a1cfcea59f8afe8612 - pristine_git_object: 1aea18b01273aa5b1321e138f1b79e5c50edee07 + last_write_checksum: sha1:399567eb362a40f1225f7d8adb820aabc6b9df99 + pristine_git_object: f10d689771d50077bc35193a39a94672a9f09ac2 src/mistralai/client/models/connectortool.py: id: 41ca596b44f8 - last_write_checksum: sha1:ead8ba36ca4a3b7c0edd06d38aff4a30aaddded2 - pristine_git_object: 26a8b7b75cb8283b00b379902b717c9e7d6e6329 + last_write_checksum: sha1:0306b9a607d59afe042aac018df6e2bc0cff0d8a + pristine_git_object: e8a036c7800ad7db3cdad18f4a61c9c3b8d050b8 src/mistralai/client/models/connectortoolcallmetadata.py: id: 2d27189e58e6 - last_write_checksum: sha1:3faa513be03ab9be9d9081976dab971e0dc2f231 - pristine_git_object: 9f3be6c4e6604f7ed2d2deeaf78569b61697ad45 + last_write_checksum: sha1:da057b97e36ab7b49f863ab92e1c20ccbf81fb45 + pristine_git_object: 0280eae009cd4fa8b91923f31bd607d74ce7f753 src/mistralai/client/models/connectortoolcallresponse.py: id: c4f7a932bd2e - last_write_checksum: sha1:2666a1fb1c6b6a67f9e3147ab84a0ad7340740fe - pristine_git_object: 47071a944e80a79053a14dc57f7a3dee28a8d173 + last_write_checksum: sha1:453f0382ecf925c483a6071130c61eb7b7326ee4 + pristine_git_object: 76abe558e5c558db157d743a6e90ef7c26038680 src/mistralai/client/models/connectortoollocale.py: id: 247ebe411537 last_write_checksum: sha1:e68370e4bcf2a1f5f2f9036416fc889821668244 pristine_git_object: ec1359c8ccf883bff066fd1500503f5e28913e05 src/mistralai/client/models/connectortoolresultmetadata.py: id: 86730e16aa67 - last_write_checksum: sha1:0b49abdb7cfdf461d225387ef03ed5e2413fdb2b - pristine_git_object: 520fb99b6430b317c326bdd9be86b63bd3822bd1 + last_write_checksum: sha1:fae6e84b040a1c8bcb25b94041f990525529472a + pristine_git_object: 8c92f2f8d4c25eac7f3c95e0ae425942829390d0 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea pristine_git_object: e3de7591a089a3739af17108cecdc2d4240f10bf src/mistralai/client/models/conversationappendrequest.py: id: 81ce529e0865 - last_write_checksum: sha1:bdae860241893ec3ab3f22bd57c45dede2927da3 - pristine_git_object: 386714fd6dcccff8abb2247d7474949d9e8e79f8 + last_write_checksum: sha1:1180d6092dc70b5c919529694623e7c5c2f8f470 + pristine_git_object: 6d310816dfe569850207a701a5ce84853702f8d1 src/mistralai/client/models/conversationappendstreamrequest.py: id: 27ada745e6ad - last_write_checksum: sha1:0a563cb146c4806ee6a133d10e7af8839e6f38dd - pristine_git_object: 32f6b148c647d3bac8edada3b941c51c17d78901 + last_write_checksum: sha1:7a5ac0f3f0e255d2ebf2005a9dc931b0fc8d4320 + pristine_git_object: b65f1e82f38099aad5f2a113a784ac706adbd8be src/mistralai/client/models/conversationevents.py: id: 8c8b08d853f6 last_write_checksum: sha1:2eedde1ecf31061fb13de0b1bdc9ea311897b570 pristine_git_object: 17812983f3aee3e675d44f46ca1b741315c2139a src/mistralai/client/models/conversationhistory.py: id: 60a51ff1682b - last_write_checksum: sha1:8984a0b12766e350022796a44baf6aac4c93f79b - pristine_git_object: ceef115b70ff02da05ac97571a177edf5b5f6cf6 + last_write_checksum: sha1:661d135eb6614a54ffbeb7d63320311821f9f23b + pristine_git_object: 2e812bb8b2945db91e534d74265482ce914a8975 src/mistralai/client/models/conversationinputs.py: id: 711b769f2c40 last_write_checksum: sha1:5fc688af61d6a49ede9c9709069f3db79f4dc615 pristine_git_object: 7ce3ffc3772926a259d714b13bfc4ee4e518f8f7 src/mistralai/client/models/conversationmessages.py: id: 011c39501c26 - last_write_checksum: sha1:95e3abe55199f2118e6fb7e5d8520af6a929449a - pristine_git_object: 84664b62337dcdc408bb01e0494fa598e6a86832 + last_write_checksum: sha1:83adcc316ff46085a7b02a4ce54b3cee7a848937 + pristine_git_object: a7e13c712fa0ac250929efdc10303ea7fd26c37d src/mistralai/client/models/conversationpayload.py: id: 4581218c84c1 last_write_checksum: sha1:51c3787091d7d2a09a0625d854a74db3c46d6a1a pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:3b21ed0d747df3b0917bcb1141e387b3c8eb8bd9 - pristine_git_object: 299b41fc79df3b8cd1221142aa693f77e060d757 + last_write_checksum: sha1:5d64abb831437c60c7e88a7dce2e08d03174ee1e + pristine_git_object: 94fcb03bb392ff4a369e0dfaa524644d611d2c49 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf - last_write_checksum: sha1:c668077dd7d22c87c075530bbca7f4625bee5d0c - pristine_git_object: d1f8ac4b89cb332d4b0b5e90ef936228f267f804 + last_write_checksum: sha1:cd45eec534ccd27052d9809f8aafedeee243d9f9 + pristine_git_object: 64437b23c7ff4cd50010e970832bed3567ae4bf0 src/mistralai/client/models/conversationrestartrequest.py: id: 681d90d50514 - last_write_checksum: sha1:9a015a4eb700aa97311231704da0f0eef4b4c7c3 - pristine_git_object: d5079689256f25d2d252aa3ad01ece94994b5abd + last_write_checksum: sha1:edc3713fa0be297da7c622f60775db3c617ab221 + pristine_git_object: b6b03f1faa89d72e4a4b3682f47692f301cfed9c src/mistralai/client/models/conversationrestartstreamrequest.py: id: 521c2b5bfb2b - last_write_checksum: sha1:42f885e4419853a2d5ee9766147b6c2c80cd1faf - pristine_git_object: 5cea41465634f71912cc2fdf79b63c7221939be0 + last_write_checksum: sha1:6fd47c92114693010c6014af6e2a347091985a87 + pristine_git_object: 41b7098f7086b41089432b183df664fb7539bfc1 src/mistralai/client/models/conversationsource.py: id: 24d6a0861d4b last_write_checksum: sha1:e28921788ab1b6d2b6daf08b714bf34b2047eb6c pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:6e503a49b1edf52b2f9ecad17c96d9607d689899 - pristine_git_object: 9404e32c3f3158d5c6d63728d8eaa07a86f69b6c + last_write_checksum: sha1:17f643578f395a5b4605710402f115eb25cae8b3 + pristine_git_object: a1afb2679b5c1e97995b78bbf2572cec489d28c5 src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 - last_write_checksum: sha1:3e0489836936a7a77fa3b41adde1eb459ecd176d - pristine_git_object: 1e80f89ee4f7a3d464df2bf39990b467029e86c1 + last_write_checksum: sha1:ee993afc39cece27caf99ee60258f45980d86cbc + pristine_git_object: e717284f15a4f3c88768f96d98007b95aa2b7922 src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py: id: 1ddc53a46c74 last_write_checksum: sha1:5df5b6676f6c115da0b1c242a6f3cc7f8c077927 pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:55adc884e1fa3ee169d34812516e541407648368 - pristine_git_object: 1e0cb7b6b86f791d17655aa36f38842992380a69 + last_write_checksum: sha1:da0d93f32efd9db292a83ccb8c0d18c02dbbb7ee + pristine_git_object: b434619d8c161f74453e2546986e24ea802269e8 src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 - last_write_checksum: sha1:e648017622cd6e860cb15e5dd2b29bf9f2a00572 - pristine_git_object: 9a901fefee0ea6a825274af6fd0aa5775a61c521 + last_write_checksum: sha1:9061e5f387d98c2c2f624efafd6ef178dfad6b43 + pristine_git_object: 6ff1e4964a7f37476074e40522d476920efd4249 src/mistralai/client/models/createcampaignrequest.py: id: 60012b559aee last_write_checksum: sha1:b45a2ee90bf901bec844aa20e9184ca1afba4172 pristine_git_object: b3957df9ef369ecc1746ee3efd1b463bc10b4be7 src/mistralai/client/models/createconnectorrequest.py: id: 3da192d6491a - last_write_checksum: sha1:c0ea3626315e622bb5ef9207662b2c58c420d9e2 - pristine_git_object: 8fd3d3abfdb32742bc8658b9f36a1463768da16d + last_write_checksum: sha1:dffda28118cdc6e4a30ac7d86cf28a73b77b7fd0 + pristine_git_object: 52ebc0be8a073fbc66143b258db778e7f1a33e80 src/mistralai/client/models/createdatasetrecordrequest.py: id: 9455e38a8c31 last_write_checksum: sha1:df3e8d7425500f23101c25267738e617eeb2d467 @@ -2860,44 +2864,44 @@ trackedFiles: pristine_git_object: ecffc52a82e3e0baca00cf94de047ff5124e3a04 src/mistralai/client/models/createfileresponse.py: id: fea5e4832dcc - last_write_checksum: sha1:934437a8c7b19b2642c1979f876ee49fc23c2529 - pristine_git_object: 1f03b275c79e47051f90b1b4cd471f3d291a714f + last_write_checksum: sha1:e0a0abb33411e145285db9d36c207812bf8f0587 + pristine_git_object: bafefc372e35f21c38e45b0055610f19e7efad44 src/mistralai/client/models/createfinetuningjobrequest.py: id: c60d2a45d66b - last_write_checksum: sha1:0f1f4f7ad97884415de5e340e8192df9ebd2fd34 - pristine_git_object: be97bd07039197523769ac30de2c42deb8c9a7eb + last_write_checksum: sha1:b89555bb4f30da8a31708140731c2d97964ec784 + pristine_git_object: 1f9c1e153eb75c4484021099f27a5364568e6250 src/mistralai/client/models/creategithubrepositoryrequest.py: id: 0814afcf63bb - last_write_checksum: sha1:22826d609c93b24b5088ac945f08f4af2ab9f3ea - pristine_git_object: 61ffde27d5b5dfbbf4c57c6bc8ae825ab866c0df + last_write_checksum: sha1:a69ba08cf88aedc6c478cc8083cdd33d4f0ca815 + pristine_git_object: a3f6cd61bec7eab9f734906b6ef1758525fd2d06 src/mistralai/client/models/createjudgerequest.py: id: e606837a626e last_write_checksum: sha1:d5c16104089075af1b8b2fe922006aea9d74b0e3 pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 - last_write_checksum: sha1:45fa65be82712ce99304027c88f953f0932bdae4 - pristine_git_object: 58874e014275b06ce19d145aaa34a48d11ca0950 + last_write_checksum: sha1:edc78f755094546142934c99ee3a97817e023520 + pristine_git_object: 28dda0cb8c5ba2462ed0f68f19747447c6ae401b src/mistralai/client/models/customconnector.py: id: 14f3643f7703 - last_write_checksum: sha1:1c452564f118d0efd906b7b7b62f3cac7b1fec2d - pristine_git_object: 23cddfc119ff3c2cf2d1a270c3830ce48c568f3a + last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d + pristine_git_object: f3a1e2ffb1a29e8798a2ac8c9c636ac3bada7413 src/mistralai/client/models/dataset.py: id: cbf14670ee00 - last_write_checksum: sha1:4636e54c4ca7825b93d55ef1f69b640557b26467 - pristine_git_object: 2acd911d010b2274f09061fa48c6849d0f5160d2 + last_write_checksum: sha1:012f85ebfbdb286436621efc3b5b1adb150871f3 + pristine_git_object: 08ce979e19eb6b852a0a565b38c5b8d4f25ba35c src/mistralai/client/models/datasetimporttask.py: id: c20f7db9633c - last_write_checksum: sha1:b288850d2a124aae3287ede5269d741a8b644d34 - pristine_git_object: 4ef52e9ec7ecd356360035bfcded7fbc9eec4f32 + last_write_checksum: sha1:0a1c92ca0b498fa04d5fac1d3857937d616a8b38 + pristine_git_object: e8d90f126fdeb041bb2cbce9709481c6174c6662 src/mistralai/client/models/datasetpreview.py: id: 128c29db3f37 - last_write_checksum: sha1:2e659243a524db189fe496969187c40986b3e87f - pristine_git_object: 55493568244a888f16b1c17dafd5f44f2629ed58 + last_write_checksum: sha1:5bd20ac7c1b179bd30489cf869ce9e71fd48c135 + pristine_git_object: 90676245b258a6c4217a730fb8b59a336e830afb src/mistralai/client/models/datasetrecord.py: id: 87ddebf2a0ce - last_write_checksum: sha1:07bbb2c5c2023511cc83ef27edc442300701b790 - pristine_git_object: 9c9f42e55ea1b26071c158b095f33815ac6b55a1 + last_write_checksum: sha1:399243f84e7f6488b7994cedc2db565d21c087d8 + pristine_git_object: 39c92cce7ee7f42878703c7983ebfe1c964e1d4e src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py: id: 3d1cd35fecc6 last_write_checksum: sha1:276676f082fa84f14ab74502302d32361277d4c8 @@ -2928,48 +2932,48 @@ trackedFiles: pristine_git_object: ffd0e0d015e38e5f6113da036ebeba98441444f4 src/mistralai/client/models/deletemodelresponse.py: id: 8957175b7482 - last_write_checksum: sha1:486183140d7fde18c05ae8a6c59303a23bd8627a - pristine_git_object: fac884bc1d833dbaeccc130873f3fea75ef851f5 + last_write_checksum: sha1:0b24f0b36dc12ccaac5ed628357aa9a9e3c30f27 + pristine_git_object: 4bc6c5e678b66ac04f9a08b27cf392a2903a96a6 src/mistralai/client/models/deltamessage.py: id: 68f53d67a140 - last_write_checksum: sha1:b18350de03a8685bea5ac52e1441415b5e58bdf4 - pristine_git_object: d9fa230e93d4e0886f21c836cf3813855eb8f9fd + last_write_checksum: sha1:f1b774b3febc9388ea8175d266f585aa2954af55 + pristine_git_object: 3823651b3030944520aad12c7e6f6b4e8bbf2a8c src/mistralai/client/models/document.py: id: fbbf7428328c - last_write_checksum: sha1:db2e184f7cc97b24e7ec80887c35c32222afd8a8 - pristine_git_object: fcc5bca541a814143b0489528fd20a69004104b1 + last_write_checksum: sha1:bc290f10562aaf9c24bd14ab3d2a31e62f535042 + pristine_git_object: 8d1aea883e579ff1677949573f43dddc362bd35d src/mistralai/client/models/documentlibrarytool.py: id: 3eb3c218f457 - last_write_checksum: sha1:d03a6136192b56778bd739d834d9bdc80a09cc23 - pristine_git_object: 642c3202b11c5bb8a2b41cf8ae0fe43f73aa2a81 + last_write_checksum: sha1:a84295aba7b9e7f70b68f279934d1a5ca0817f77 + pristine_git_object: 29f8d64a695342489d81bfe20ec2f8de60546ddd src/mistralai/client/models/documenttextcontent.py: id: e730005e44cb last_write_checksum: sha1:c86f4b15e8fda1cd5c173da01462342cd22b7286 pristine_git_object: b6904cb4267347b62a457a01b91a391500326da9 src/mistralai/client/models/documenturlchunk.py: id: 4309807f6048 - last_write_checksum: sha1:33cdaccb3a4f231730c7fa1db9f338a71e6311b2 - pristine_git_object: 43444d98b8b7fb430f9c33562c35072d9c79a263 + last_write_checksum: sha1:f45ecef78fb4412dc76ce54478fe536df0259048 + pristine_git_object: f7a99ff81ee01d256052920405ca4788d3a47f75 src/mistralai/client/models/embeddedresource.py: id: 94a23f656f72 - last_write_checksum: sha1:7984f6ed695b8df81ad70b72a27d481950453abe - pristine_git_object: 54cb17fdface0703cbe64079543bd399d7abebe0 + last_write_checksum: sha1:50375363269d68edd3ea1c0a31ba08c8bf9bd160 + pristine_git_object: e16fedf8362a19e55e7bfc6c273000f3446fe3ac src/mistralai/client/models/embeddingdtype.py: id: 77f9526a78df last_write_checksum: sha1:a4e2ce6d00e6d1db287a5d9f4254b0947227f337 pristine_git_object: 732c4ebe3678563ebcdbafd519f93317261586fb src/mistralai/client/models/embeddingrequest.py: id: eadbe3f9040c - last_write_checksum: sha1:3ef4e321a698c4a10389280f8b1c7d0da20f4faf - pristine_git_object: 5fa2d2f63796523e58e281f2d3bcc05a92111842 + last_write_checksum: sha1:00e4499575e7a8a4a5e879174b7f25a0f522fd8c + pristine_git_object: 2ef747d8ba91f824f0ad117d21c5a8487cc7ea80 src/mistralai/client/models/embeddingresponse.py: id: f7d790e84b65 last_write_checksum: sha1:9bb53a5a860c8e10d4d504648d84da73068c0a83 pristine_git_object: 6ffd68941f32f396998df9dded14ff8365926608 src/mistralai/client/models/embeddingresponsedata.py: id: 6d6ead6f3803 - last_write_checksum: sha1:ba5f38ee6e2b0436532229da01ba79ee49c20d12 - pristine_git_object: 098cfae06eae6a92830b4b5a26985f5d5950e512 + last_write_checksum: sha1:b0daee4bd21a441a2e8e47cf8ca8be32d2179869 + pristine_git_object: 03b23a7cba53c27ef02f3bc025f38f10d7b98e2d src/mistralai/client/models/encodingformat.py: id: b51ec296cc92 last_write_checksum: sha1:ea907f86b00323d99df37f7ff45d582aace798e7 @@ -2980,8 +2984,8 @@ trackedFiles: pristine_git_object: 56d82cbed237f32a8b00cfee4042dfe3e7053bcb src/mistralai/client/models/event.py: id: e5a68ac2dd57 - last_write_checksum: sha1:8ed848fe2e74c7f18ee8f4dcba39ad1c951c16d2 - pristine_git_object: c40ae2b1a1b8131a90c637e3268872b97b22683e + last_write_checksum: sha1:0711bc7d48998b1c01e7708e29ae5889f9bea7bc + pristine_git_object: 01157dfab89756ecfb587722270ef3cef8722807 src/mistralai/client/models/executionconfig.py: id: 14518c40a13b last_write_checksum: sha1:351fb4a74622cb70969b728ac65b62ca670fc7e5 @@ -2996,20 +3000,20 @@ trackedFiles: pristine_git_object: f1600cac74e1d50979277d3eb6830ea5e84b69ec src/mistralai/client/models/feedresultchatcompletioneventpreview.py: id: 19109368b436 - last_write_checksum: sha1:7ed72c5afeaa35a68bef880405b122db6ca1b57b - pristine_git_object: e87e007e571df43ab2453a5506b19836ed23698a + last_write_checksum: sha1:2dfbc8aa7110a57f892ad80002cc01bc4c94589d + pristine_git_object: bf248758026549d8e2395895dfb18eccf96cc31c src/mistralai/client/models/fetchcampaignstatusresponse.py: id: b74b57603a4c last_write_checksum: sha1:62b1fd7d42f79518e15abdb07b11cac817837e1e pristine_git_object: 6004892e377a9852e406bf911bd91afe891ea7b3 src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py: id: 2191cab4638b - last_write_checksum: sha1:971b32a645c582a4a2cccb5329481f29ed5e6792 - pristine_git_object: d3cbd653cc62ef4712fc41e2e64d74a12f413d17 + last_write_checksum: sha1:32526d8625f46e27b57f28483652f7d1a38f26f6 + pristine_git_object: 92c29e22eb942fc756d1926e7ed1b01582903f5c src/mistralai/client/models/fetchfieldoptioncountsrequest.py: id: 2fd8caa0697d - last_write_checksum: sha1:c3798f54e192e91552d0d8004002ede779899ce9 - pristine_git_object: 19698b9b475bd281ebc5488f8d529b0111afefc3 + last_write_checksum: sha1:e9b547f04bf87e5d6863bec706b96ff2d732512c + pristine_git_object: e310f6603d1a602c56da30a1e3a9971586a078c9 src/mistralai/client/models/fetchfieldoptioncountsresponse.py: id: 16ce9431fc7b last_write_checksum: sha1:a633398597cb0ccf0c3e36aca8566f679b527850 @@ -3024,12 +3028,12 @@ trackedFiles: pristine_git_object: 0b50c148c524f59fbc02d2b22ee961dc4f7a2d6f src/mistralai/client/models/file.py: id: f972c39edfcf - last_write_checksum: sha1:609381a40a4bfdda2e7e750a848cd2bb38d6ac0f - pristine_git_object: 1b0ea1d4a288d9723dcdd7cfda99d49c5cbd9e7c + last_write_checksum: sha1:bfcb027361112e24202716f02804699bc1dc5de0 + pristine_git_object: 528bc13a60e1ca006a54e1a9b20087651d10d470 src/mistralai/client/models/filechunk.py: id: ff3c2d33ab1e - last_write_checksum: sha1:d7561c39252b81007a8e079edb4f23989ffd510e - pristine_git_object: 5c8d2646dc0d5c732828bdd81c5a58e12fa92a42 + last_write_checksum: sha1:dc247ef441b0436a1444322bca312be8bfc8ded2 + pristine_git_object: 6c9c8b0e5772d51465f69950b55dd0ecc22be3b2 src/mistralai/client/models/filepurpose.py: id: a11e7f9f2d45 last_write_checksum: sha1:8b167c02f9f33e32d5fd1c6de894693924f4d940 @@ -3044,24 +3048,24 @@ trackedFiles: pristine_git_object: 83de8e73a3d50917e4a41bb92a828a10e646a632 src/mistralai/client/models/files_api_routes_get_signed_urlop.py: id: 0a1a18c6431e - last_write_checksum: sha1:ef4908b9d2e43c0256d25a5aa533c5bdc1205113 - pristine_git_object: 64cd6ac57b4f2de70403e11062307a8d8d5d94e7 + last_write_checksum: sha1:4cf67e8cafa1f448caf9b251dd9db3e9c87d062e + pristine_git_object: 326dd1d305261acc1407e6f70100b3b59dfcee5c src/mistralai/client/models/files_api_routes_list_filesop.py: id: b2e92f2a29b4 - last_write_checksum: sha1:71e67fc63f0df28c534d4bd03a6464ae88959dc2 - pristine_git_object: b03e2f886ce02d4beabca150302a924ae63ad507 + last_write_checksum: sha1:18f318488f01a9a919c8650ee1f5eb825c39c91d + pristine_git_object: e18eaa6a509344303c81599ac19ce2aa8e741060 src/mistralai/client/models/files_api_routes_retrieve_fileop.py: id: 5d5dbb8d5f7a last_write_checksum: sha1:d451d8d2b32f412158a074919cca1a72f79940cb pristine_git_object: 5f8de05f1bba07517dc2ee33a4f05122503b54b5 src/mistralai/client/models/files_api_routes_upload_fileop.py: id: f13b84de6fa7 - last_write_checksum: sha1:de49ee09350784e9d5c7adcafdfbf86c9ad7d659 - pristine_git_object: b66836391c8bc43e8535688c5829ad9cab04af49 + last_write_checksum: sha1:9f48f3a8ca29457de8d1109bca2e98985963f286 + pristine_git_object: 25efcff2ade46c116ddc622a3c5796c2b95e039f src/mistralai/client/models/fileschema.py: id: 19cde41ca32a - last_write_checksum: sha1:f65bf25e367c4e9be2be84af9b41e9d9c6719d0e - pristine_git_object: 11caa083108941befa3bc1e499bbcbf578811884 + last_write_checksum: sha1:c559713ad8602bc8f4a73268758f9a010a7fe8f1 + pristine_git_object: ce64a16bb54c33024580619fb15443f25473df8c src/mistralai/client/models/filevisibility.py: id: 11a670fa3b71 last_write_checksum: sha1:8d44761845eea1d9bb239864863fc058e7c09bf2 @@ -3072,68 +3076,68 @@ trackedFiles: pristine_git_object: fe62d6ddc1187e1177ac834a85bd4e1b6a86ee52 src/mistralai/client/models/filtergroup.py: id: dbc0c34fbc2f - last_write_checksum: sha1:074e2088caee0c3af4698927d840f5b00123074d - pristine_git_object: 06616a010b984e17c2a73aa6164120aa1a2ab5bf + last_write_checksum: sha1:f900312cfcea2b2a341d83e95ca2fce3e467fa03 + pristine_git_object: 4e9815b7387904b071645a9a4682a4ffbf23d488 src/mistralai/client/models/filterpayload.py: id: 56757b849f7a - last_write_checksum: sha1:4ef55aaa20ccfc57cad906558886d0920220ffcd - pristine_git_object: 188375f1070630f46f3950271322fb9bc1b64fed + last_write_checksum: sha1:1d9a513f9c5a33c5ae249fb4926dd70eeb5e02e5 + pristine_git_object: ced355f16abe74ce87d1770cebe761d0b26c35bc src/mistralai/client/models/fimcompletionrequest.py: id: cf3558adc3ab - last_write_checksum: sha1:20bca1f6a0ab6e84f48b6e332f0c3242da84ae45 - pristine_git_object: ea877213d1abe4811fee188eb7a60ccf1bb51f18 + last_write_checksum: sha1:ebb1c97108ecd51ee163dcec36e3d88ece4695bf + pristine_git_object: 2ca34598854f3777430de33d2acf2fc45f27fbcc src/mistralai/client/models/fimcompletionresponse.py: id: b860d2ba771e last_write_checksum: sha1:dffd5a7005999340f57eaa94e17b2c82ddc7fd90 pristine_git_object: 1345a116b7855ab4b824cf0369c0a5281e44ea97 src/mistralai/client/models/fimcompletionstreamrequest.py: id: 1d1ee09f1913 - last_write_checksum: sha1:aa8313ecdd852034aaf6ec23dc3f04f7ef8e28e5 - pristine_git_object: e80efc095feb2e2df87f6d3c3f9c56b6cbf347b3 + last_write_checksum: sha1:338c8d224fa5739296fe0e1ea1c00e65fba30b99 + pristine_git_object: 9c91083cc72cfa7ffa59d58e9255b16ac5983077 src/mistralai/client/models/finetuneablemodeltype.py: id: 05e097395df3 last_write_checksum: sha1:daf4cd1869da582981023dea1074268da071e16a pristine_git_object: 7b924bd7abc596f0607a513eee30e98cbf7ab57a src/mistralai/client/models/finetunedmodelcapabilities.py: id: 475c805eab95 - last_write_checksum: sha1:5919e48a6778f1a2360ce090d05b41b1bf33253f - pristine_git_object: 2f4cca0b8c0e3e379f5c2aa67953f2e55757f68d + last_write_checksum: sha1:91f720f910b01109b6216aa7de1b3f76d04108c9 + pristine_git_object: b9ad2f9e62486e5f54bc801ab547377114ca3f5c src/mistralai/client/models/ftclassifierlossfunction.py: id: d21e2a36ab1f last_write_checksum: sha1:ca90e2f1cd0b9054293bea304be0867c93f7fac2 pristine_git_object: ccb0f21b5a69f91119bec9db6e9f3d876e4c35af src/mistralai/client/models/ftmodelcard.py: id: c4f15eed2ca2 - last_write_checksum: sha1:b1b36ff994bcadd8c917880333627fd05976c991 - pristine_git_object: 2c26ff2f66faa55dc5a5a1743720e8f3f5d4d0f1 + last_write_checksum: sha1:1c3ab1bda3fa9e2df33b47a49d5e9b9e2d82a701 + pristine_git_object: bb7c52c881ceadccdeb3590104e774f3d2ad94d7 src/mistralai/client/models/function.py: id: 32275a9d8fee - last_write_checksum: sha1:ca24a512de22787932d7f4af005699621926d6c0 - pristine_git_object: 1da1dcc9b637d0a5b0fbb7cf2761f6d01eb3068f + last_write_checksum: sha1:c01c1ed54b3086859cde0dd3c3c466c78d8323ae + pristine_git_object: 8a3267e8b4b3fc78e64c46a0c05f7f9822bd3e3f src/mistralai/client/models/functioncall.py: id: 393fca552632 last_write_checksum: sha1:6e96e9abaa9b7625a9a30e376c31b596ee9defcb pristine_git_object: 527c3ad408e1e1ccfe6301a8860e7f751e1d312d src/mistralai/client/models/functioncallentry.py: id: cd058446c0aa - last_write_checksum: sha1:776f397d17f946bae2929998f14d991a1ccc99e0 - pristine_git_object: d05fad856729a76dd24f8aa4d050f8381e51ed6a + last_write_checksum: sha1:209dc38d13e7cab489dc99ecd2f400b259847ad2 + pristine_git_object: a88d87ab553d42a244cda26946dc10c44da3031a src/mistralai/client/models/functioncallentryarguments.py: id: 3df3767a7b93 last_write_checksum: sha1:9858feba8f7f01017f10477a77dec851a1d06e55 pristine_git_object: afe81b24e131a8ef879ee7f140271aa762b8ed2f src/mistralai/client/models/functioncallevent.py: id: 23b120b8f122 - last_write_checksum: sha1:62b5b94df4e5b6f945ead78871cdbfceb6cd40cf - pristine_git_object: 849eed76d08524e5e4d1e7cc1c3fa04386f5ef75 + last_write_checksum: sha1:57469e759f6d9100ca09e607a9687a4f59043bb0 + pristine_git_object: 6e3c0715818bf78d7cd90ab3cf1106aa5d31640f src/mistralai/client/models/functionname.py: id: 000acafdb0c0 last_write_checksum: sha1:4145b7b817b712b85dcbedb309416c7ba72d827e pristine_git_object: 07d98a0e65ccbcba330fb39c7f23e26d3ffc833c src/mistralai/client/models/functionresultentry.py: id: 213df39bd5e6 - last_write_checksum: sha1:3aa6834bf2beda061ac772a0a8a4d7ed5ad942a0 - pristine_git_object: 01e2e36fc0a9de6a2b06a4205004992baf0f9e43 + last_write_checksum: sha1:ec72ed10d5170484643db846ac32df5e3263ca4e + pristine_git_object: 115765225e6b0f1c166b7b9c89a41fade1ba90e6 src/mistralai/client/models/functiontool.py: id: 2e9ef5800117 last_write_checksum: sha1:bce744d77a3dac92d4776a37be497311674bdc7d @@ -3144,24 +3148,24 @@ trackedFiles: pristine_git_object: a8446737ead106f400900bc6b73d57db306bb47f src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py: id: 270800e2c264 - last_write_checksum: sha1:ceea6d622e9c62e38241a4819b771e78bf553b46 - pristine_git_object: e1b04950b7d7d5b738ce0244cbb04261fd7ee4b3 + last_write_checksum: sha1:080172a6bc5bdadf2a6cbdb2ad91f8fe49b4a6f2 + pristine_git_object: 9db415bff26597d2ebd8544f39b86e15ac244cff src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py: id: 853a43ee6b98 last_write_checksum: sha1:9e3fd0b27e1ff30e596fb2a81b0770cb6afbcf39 pristine_git_object: 57ac44905fd7db69e96533092c6d6e8bbe0eb083 src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py: id: 598a7340fc98 - last_write_checksum: sha1:ca0f08deb402ee817dafbcd3bf7b05b9d3b7c5a3 - pristine_git_object: a6a329c729b68f11c211f570beaab63c539fc257 + last_write_checksum: sha1:e439c5269ea0a59311a3e8ddc514836364744a35 + pristine_git_object: 4ff0c3075443875ffe8c0e13aa3f7bb6fb45d4c6 src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py: id: 98aff68bc7c7 last_write_checksum: sha1:dcdfebf2d374e5bbaa61e34c985d100b4a736581 pristine_git_object: f39b0f562ee8a75e611f6ad2929c43c83c230e99 src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py: id: 36957d0f73aa - last_write_checksum: sha1:cfd5144c778defd849d029ad13625e4674660a69 - pristine_git_object: 5a8b7450a685ade70cc728dc269a0f2577ba600d + last_write_checksum: sha1:9761398171c914a2b602c65e5e9a0beb69156aef + pristine_git_object: b4af68e0e0fee80dc3cde41e8e8324d6807e1b39 ? src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py : id: 0b1bd06b24af last_write_checksum: sha1:e3489181ee8230c478e5785e93c4f5270950fd33 @@ -3180,68 +3184,68 @@ trackedFiles: pristine_git_object: cf900d0e4ef6eff4114c5e7737d03d0ab0e07d6f src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py: id: 07ece48f664d - last_write_checksum: sha1:4cfeaf15f32193c8278759bf0274f5e4426ff057 - pristine_git_object: 43e0dc5b2f37ef1624547cd6bcc63e3780837629 + last_write_checksum: sha1:9156ce8891f5b9c0775f633316644afcf8984e6a + pristine_git_object: 8213c023c3d47e38d6f3cf14cf985e267529c600 src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py: id: 6ea6a0dab32f last_write_checksum: sha1:8a8027a201a49fa1fe6717a1dbae4a6c242b8dbe pristine_git_object: 0cb239dfd04d98488b8ce7ee143bb3cc589326e8 src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py: id: 77967c965aea - last_write_checksum: sha1:69e3467aa6225ce25c1f008649b683c43f6a34b8 - pristine_git_object: 7617a5d204f4f2fa66610ca711b803b1b5fbc0ad + last_write_checksum: sha1:831414ebd99ed826562864b2819fbe35180b6e50 + pristine_git_object: ed1778235ce208110598a165c5afc9fbfc1a20aa src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py: id: 3e4f4e2447ac - last_write_checksum: sha1:dc0305b848582ea310b935c15da10f044a832978 - pristine_git_object: ea52dd5180f5580cc5b94ecdbaa5ef67d89e5621 + last_write_checksum: sha1:c58e1c3e04892b5bfcadeec7c640c37c8d3da017 + pristine_git_object: 1d79f2d59fc1d0f38c66d85cf266bc9700087c37 src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py: id: 4201c3c5a891 last_write_checksum: sha1:44c9a7d21ea727e0f849cfc5dc4a02220bcf6e74 pristine_git_object: 375db2e9b8ff839f6ec3bdfdf06de9b7a24fbe7c src/mistralai/client/models/get_judges_v1_observability_judges_getop.py: id: fa04e3db7781 - last_write_checksum: sha1:bfc31bc3de6ddacf3a01cf3f5a74be3fea83b3a0 - pristine_git_object: 7228cfa13211d7bca8ccbca8f9a3137e7d6689d6 + last_write_checksum: sha1:d59740c9021cd891db4b81a7f4c6aeeecb9d6958 + pristine_git_object: b5d0980e197c19eaa70ac26f3b118a8e60364e3e ? src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f pristine_git_object: 7689415dd70da6eec8d0b416cbf020c4b9adeecf src/mistralai/client/models/getfileresponse.py: id: 81919086e371 - last_write_checksum: sha1:5a70dc35ee1dc2360eacda5e0dbe08b346f8b480 - pristine_git_object: 82280899020739d61aca44ef731d175e6a66f325 + last_write_checksum: sha1:a116c2fdef65748b5015804fc0eb9860fd2bc3b2 + pristine_git_object: 37c29bbb41ab44aa6d42ea7e7f094d52a210a5a8 src/mistralai/client/models/getsignedurlresponse.py: id: cee4e4197372 last_write_checksum: sha1:ab9adbc06e7f02e791dc549ad1850ce1b1a250a7 pristine_git_object: 4ba95894f2b89719fa58e7e397c28014dbd00316 src/mistralai/client/models/githubrepository.py: id: 4bc83ce18378 - last_write_checksum: sha1:21aa04bc426158ccbe1ded3bc65b46e6869e897d - pristine_git_object: 84b01078c2192de5d6668a6943d416a2ff30db5f + last_write_checksum: sha1:4c1358be59e667394757b01a5eeebb4b5ce134f4 + pristine_git_object: 4ec88aa827f1d813e4a01ed2f382b2d02a19dc3e src/mistralai/client/models/guardrailconfig.py: id: c72b74412547 - last_write_checksum: sha1:b66f91989a8aabd977bce2c8fd225e6f47dae60d - pristine_git_object: 4f8fe352e9d0abc23468ed6498ebf63c7e4df5b6 + last_write_checksum: sha1:1688b51dafa47d23ff048e88975b21f24932f6c0 + pristine_git_object: d152ec36741bb8302b0d4f72563e534ed7768cb6 src/mistralai/client/models/imagecontent.py: id: 3abe7faee278 - last_write_checksum: sha1:22229b74dd00ebe78ea3589964367e0785f8bcf0 - pristine_git_object: 13c3f449b20aff0da0325cb3c955c8e64aec61c6 + last_write_checksum: sha1:c0057cab50e78c45069bab3cbec065ab3dbbb50c + pristine_git_object: e6363daa7442b2f0b48bb99ceab76bff08680550 src/mistralai/client/models/imagedetail.py: id: c1084b549abb last_write_checksum: sha1:375db5c8fa87712dc37e46d0bf72283ae6cd6400 pristine_git_object: 1982d357277a92fc7ebea3b99146116596d99c78 src/mistralai/client/models/imagegenerationtool.py: id: e1532275faa0 - last_write_checksum: sha1:88a1347876f69960dc33f8e2cb9929ab1a90a224 - pristine_git_object: c1789b18028156ae683d0323e65e47a43694570f + last_write_checksum: sha1:0fcb9fdeffe252c88497f02164f7e753bea40ff1 + pristine_git_object: 0dd4a4d2a4671bb310410eb17bb85032638d817c src/mistralai/client/models/imageurl.py: id: e4bbf5881fbf - last_write_checksum: sha1:28ef2509fdb489ecf379b60e883e6957aebd2797 - pristine_git_object: ac1030f5d61144e393b2aa9f3ffea893faabb1f7 + last_write_checksum: sha1:a3e5c91291a5fcc24bda8fc1c96a2608965edae5 + pristine_git_object: 32efa67ba4a33ac90c1a16c153ef480e35d1bb67 src/mistralai/client/models/imageurlchunk.py: id: 746fde62f637 - last_write_checksum: sha1:0ac388d25cae5348ffb3821706c3a8b64e716ff5 - pristine_git_object: 7134b46e7428cee52eda859cb78387c99f7e1f5a + last_write_checksum: sha1:deae705ab4819d4a016ce04d61776ae378210b96 + pristine_git_object: 1e342fd6dc457d2b00f4dd0c78e38008c6c82e33 src/mistralai/client/models/importdatasetfromcampaignrequest.py: id: ee475b85bfc7 last_write_checksum: sha1:34367bb23d1528b87e67f36d06cc362a05a02c6b @@ -3276,20 +3280,20 @@ trackedFiles: pristine_git_object: e5f9cccf174d8e73c42e8ee4aa294b43e1ad6cf5 src/mistralai/client/models/jobmetadata.py: id: cfbdde7fc0a2 - last_write_checksum: sha1:e1b180a47ca888d0fd4cbc34b62000d3ac86c2b5 - pristine_git_object: f6e96fa104e7a6c8ce9a94538a3d00167a2ae341 + last_write_checksum: sha1:efe10ba4aad0a0e0befd94525b73ab2194e43be8 + pristine_git_object: 8409872bc3149d28558bfd23e85196169499c539 src/mistralai/client/models/jobs_api_routes_batch_cancel_batch_jobop.py: id: b56cb6c17c95 last_write_checksum: sha1:21b5794f110c53691654d7195201f9a4b7793f21 pristine_git_object: de2e63472ac53809cfeae200bd7d2f3dcbb70034 src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py: id: 36b5a6b3ceee - last_write_checksum: sha1:b41862f037d74bbdc44fb4df5f65cd402a16703b - pristine_git_object: d779e1d96c359b0d548d5dee17c06ae2a505cf47 + last_write_checksum: sha1:449dc131e1514edb32107ae1c699544732b313fb + pristine_git_object: 683da4af5412e7da90a4af83864c40dc53a9ed77 src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py: id: d8f0af99c94d - last_write_checksum: sha1:a50885f97cfd4d38bc3e3b0746c88bd602b88f94 - pristine_git_object: 89ac3c933347497b6fb1ec26fecb485802ef85fc + last_write_checksum: sha1:04082f4aa3dcf94708c1fab8c3114e690959d6d1 + pristine_git_object: e5869656d9666768dcbfd53883ed6706304fd565 src/mistralai/client/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py: id: 34f89d2af0ec last_write_checksum: sha1:3d5242f757ee9be10963af9cd5d47824fc83c71a @@ -3308,8 +3312,8 @@ trackedFiles: pristine_git_object: ddd9c1891356a7c272e0244a9aea3d3d6b2d00d6 src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py: id: cf43028824bf - last_write_checksum: sha1:36082bde6f3d932c66178729533e2a69040fdeab - pristine_git_object: ec80a158f45061b122f84ebaff89ae82ef8d98ef + last_write_checksum: sha1:80c2601bdbab567e7bdf72f1814c3ae58d477a22 + pristine_git_object: 9b9aeb51176498eeaa29bed80346f150d6b94573 src/mistralai/client/models/jobs_api_routes_fine_tuning_start_fine_tuning_jobop.py: id: e7ff4a4a4edb last_write_checksum: sha1:8cbfc309c09df806ad7d130004b4e1c2b89ede0a @@ -3324,12 +3328,12 @@ trackedFiles: pristine_git_object: 296070b426900305fe4596f03a3c9f081cdb2dcf src/mistralai/client/models/jsonschema.py: id: e1fc1d8a434a - last_write_checksum: sha1:d01507ab0a1f6067cbc65aaba199de340ccc68aa - pristine_git_object: dfababa694305c96f98ddebf2f09e448e737c855 + last_write_checksum: sha1:f6e3ddb37e55ff27b795389fce6d4f433e7d5639 + pristine_git_object: bc0bd6c41111937654fba20a16420b6867f7c92a src/mistralai/client/models/judge.py: id: d6adc687c2d9 - last_write_checksum: sha1:bce628dde18d918345c497037d6f2a9c2e60dda0 - pristine_git_object: 1fb1d3866bb719696e5c95d9cefc834f828c65e9 + last_write_checksum: sha1:fec0539aab8eb11de3815317c1a54d3e86957ba0 + pristine_git_object: 036aabb710e1d96af1bf69d563032ab05567b909 src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py: id: 98c823e7cc1b last_write_checksum: sha1:74dd8fba663c0338a24c497949572b5e5df7e494 @@ -3364,12 +3368,12 @@ trackedFiles: pristine_git_object: 4fa99498fb6a60e9d4d8358660eb0ecd57d34178 src/mistralai/client/models/judgeregressionoutput.py: id: c61d451066dc - last_write_checksum: sha1:0687cabd00d205ec50e238872e57547ee4a3dc3a - pristine_git_object: 63394d8bdc8aa95fa8bfe99b39ae3863aee01ff4 + last_write_checksum: sha1:2dd3b0dc5c82a977bac095aa6c45c7067bcc187c + pristine_git_object: 9bb8f9c1283b3de89bbf8b859a79d27054ee6074 src/mistralai/client/models/legacyjobmetadata.py: id: 0330b8930f65 - last_write_checksum: sha1:3c2f669a05cc01227f62d6a8da1840d9c458d52f - pristine_git_object: 5757675895b3c56d8aa7c174deb08567e596ecf8 + last_write_checksum: sha1:32265ed638a7675fb46c7de747bdb2a775a94505 + pristine_git_object: 143f0e7cb42b050da2ba7ef5ad1afd28397f7f00 src/mistralai/client/models/libraries_delete_v1op.py: id: b2e8bbd19baa last_write_checksum: sha1:ba41496bc99040f7598659c5b037b955b7f6d385 @@ -3400,8 +3404,8 @@ trackedFiles: pristine_git_object: 857dfbe60c57af8b0fa6655a049ed336d70fb941 src/mistralai/client/models/libraries_documents_list_v1op.py: id: 756f26de3cbe - last_write_checksum: sha1:5a1a9e025dc7a1fedaa5199d396a73c4986d4113 - pristine_git_object: da7d793b65139a3894b077a9665b392e8a44e8a2 + last_write_checksum: sha1:565872ef17a53cc9751fa2c8fc1267dac2d01e76 + pristine_git_object: afc474cbe6c571ac36fe0800d4c1e5ffd07eb207 src/mistralai/client/models/libraries_documents_reprocess_v1op.py: id: dbbeb02fc336 last_write_checksum: sha1:bd5013cb1581dd13642ce7edf1e701f5b0c967c4 @@ -3436,16 +3440,16 @@ trackedFiles: pristine_git_object: 54b0ab708c665ccb841b1c8d0f2748c390850506 src/mistralai/client/models/library.py: id: 028a34b08f9c - last_write_checksum: sha1:65f02f963a0540385681b88c7c7fba98d0d704f4 - pristine_git_object: 1953b6fbc6d7ad245ccacd9d665fb29853b00af7 + last_write_checksum: sha1:3ac8546f2ada4f9a24d8296e03b9ad61d5f2e372 + pristine_git_object: c26710ff4818c9719e08b67d147ee9bded3dc46d src/mistralai/client/models/list_models_v1_models_getop.py: id: 1843a7aa68e5 - last_write_checksum: sha1:7058318c4642e630886ba60d3a6dda7ff5dd909b - pristine_git_object: 70b0ab82a26bdbc6c2ea63e6ecb2b3b3046d7eb3 + last_write_checksum: sha1:018c32019aab6c4995285ace8abba54d88f41c0b + pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db src/mistralai/client/models/listbatchjobsresponse.py: id: 99d94c86a871 - last_write_checksum: sha1:7530be5f80a0756527be94758e800e8118e53210 - pristine_git_object: 35a348a1160dcf6d82d58c70cea07e11730359fb + last_write_checksum: sha1:01e5fd232c654b3c4a9d86c09f89cfef6f51805f + pristine_git_object: 77265322df4e5b13c7e2efaa9f7e3e2554387893 src/mistralai/client/models/listcampaignselectedeventsresponse.py: id: 8e28cb9aff1a last_write_checksum: sha1:7ada7958f9c87fa6ae7a329fd03cd626a279ca93 @@ -3476,12 +3480,12 @@ trackedFiles: pristine_git_object: c48b8c051ad0d1fb4aed8396697e57e782be5a40 src/mistralai/client/models/listfilesresponse.py: id: 85d6d24c1a19 - last_write_checksum: sha1:caf901685bfb6f13d707b89726aaf6e5116cd054 - pristine_git_object: 10a60126600343033a4b0511d717cac6f1924b4d + last_write_checksum: sha1:c47c2d220c41e4b467c25dfe2e94546a5b452138 + pristine_git_object: 37787dae3bc4016988b1f1edfdfeac4b2d4b0000 src/mistralai/client/models/listfinetuningjobsresponse.py: id: 118e05dbfbbd - last_write_checksum: sha1:f0582740a6777039e9695d97f072b5a3c34b483e - pristine_git_object: 1e434c5986bf577e2b42cca943cc6896a83d1fa2 + last_write_checksum: sha1:7943e1bfc9a400ef330284b8241c28f2e64259f5 + pristine_git_object: 39547d571d2e8ce8485f6cf41aa8ad4bfbc7398e src/mistralai/client/models/listjudgesresponse.py: id: db389a8abc34 last_write_checksum: sha1:4ba57c7b7966b7eb81472d8ecc0b5ce726458360 @@ -3496,8 +3500,8 @@ trackedFiles: pristine_git_object: f3e6dc8714311989d1e6c7275c8944e228f3f0c5 src/mistralai/client/models/mcpservericon.py: id: a5b508a322d7 - last_write_checksum: sha1:090bcf0f2856c453d32f00fd434988300572b811 - pristine_git_object: 6068c1c4b3b205b8e7e7db0c31a9b2dfbfbe1f7e + last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 + pristine_git_object: 293ab37505a1098241631dd83435a0e91d073551 src/mistralai/client/models/messageentries.py: id: e13f9009902b last_write_checksum: sha1:43aebdc9eaecc8341298dc6b281d0d57edf4e9e6 @@ -3508,68 +3512,68 @@ trackedFiles: pristine_git_object: 63cf14e7fcbc7c3969220b4f07109473b246bf49 src/mistralai/client/models/messageinputentry.py: id: c0a4b5179095 - last_write_checksum: sha1:b5bad18b88c0bfbbddfdafa6dc50a09e40a6ebd7 - pristine_git_object: c948a13e3cc2071dd1b3d11c419ea61d51470152 + last_write_checksum: sha1:715be926eadfd33538ac4241becd803411126479 + pristine_git_object: be271e317c5de4c52c83fc1c1091eef696e48458 src/mistralai/client/models/messageoutputcontentchunks.py: id: 2ed248515035 last_write_checksum: sha1:df4ef4d17ce48df271ff2b8cab297ae305aa08ec pristine_git_object: def7a4d27cd3d1479864a1d6af19e89bd57bff70 src/mistralai/client/models/messageoutputentry.py: id: a07577d2268d - last_write_checksum: sha1:38ad03422407925087835ab888c0be40bf5fa7fa - pristine_git_object: 6a9c52ed59af1497577be2538e7141d57eea4c8f + last_write_checksum: sha1:ceee2327568213ee455a42c07a5be6b64469b384 + pristine_git_object: fd683ad31afb5765535d87affc9ef2011c16d574 src/mistralai/client/models/messageoutputevent.py: id: a2bbf63615c6 - last_write_checksum: sha1:c3317ab9279c499dd7fb26f45799ca9369676ac7 - pristine_git_object: d765f4fd3c4e43c37063833368e4b21cc0bfbcf2 + last_write_checksum: sha1:7081a6aa27f0893b5628f16871bb1ae5dc23f2be + pristine_git_object: 8f5ecd4363fe23e96127bc5ffdd534f7c500496b src/mistralai/client/models/messageresponse.py: id: 6b388bc155dd last_write_checksum: sha1:14ce5842084a2086505dd80eaa6200638a278000 pristine_git_object: c8fbdff77b3464b630b0cd18f25d9179c5ff9eca src/mistralai/client/models/metric.py: id: c6a65acdd1a2 - last_write_checksum: sha1:5ef7c75b278f16b412b42889ff0f2fc19d87cb7d - pristine_git_object: 1413f589f7f23991a12c1367bc6f287b5e07d4a4 + last_write_checksum: sha1:0d7e4ebbf55f8dcc52facb894589ce44abb0c2fa + pristine_git_object: 8d05989420e1b8b68c90fef193bcaff4452c97fc src/mistralai/client/models/mistralpromptmode.py: id: 95abc4ec799a last_write_checksum: sha1:a1417b987bb34daeb73ca4e015c085814e6c8ad2 pristine_git_object: 9b91323e7545d636308064085ca16fc554eac904 src/mistralai/client/models/modelcapabilities.py: id: 64d8a422ea29 - last_write_checksum: sha1:0f733a45f06cb2c603b47134d999a2de4c0a7bb0 - pristine_git_object: d9293ccc163995cfe0419d05c90fe1ae8e75cf57 + last_write_checksum: sha1:352a8cf6dfa61eff04e37609272e0b1ab7a5ffee + pristine_git_object: 3267c7079218df12d78db6815fb6339fad0c6168 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:d08fe4b4bb63e20e51fed78f1bf376babe667179 - pristine_git_object: d7f765bf9657f7637da3ab00f545d0f3ce9d2614 + last_write_checksum: sha1:46ed83726fd34517bf05bf6fc1204a0134c38a06 + pristine_git_object: 72ca957f0eb33dfdfad8fb8074f93b066868f074 src/mistralai/client/models/modellist.py: id: 00693c7eec60 - last_write_checksum: sha1:de62fc6787f482e5df0ff0e70415f493f177b9a1 - pristine_git_object: 5fd835f24cd1098a153ebfb3e958038a183d28a7 + last_write_checksum: sha1:fedfe929f37d6d81248f8f2d6004454aaa35145f + pristine_git_object: a6020100124b5c6493cd1014bf576c439537502e src/mistralai/client/models/moderationllmaction.py: id: 7b18ccbd8ca9 last_write_checksum: sha1:0067c773f68e8c9a6fa9e802b1d5a5b97efa7d5b pristine_git_object: a2553f3041e129df165d49072a60fe31cd8b387b src/mistralai/client/models/moderationllmv1categorythresholds.py: id: 0c51d6766440 - last_write_checksum: sha1:17f74a67d19a59214e93c54e5cabc4132bdbee48 - pristine_git_object: 0451ba3afcbff22d1cc41b784c896419bf49e5f5 + last_write_checksum: sha1:3eca62d031d924bc504a3963911d8f0894c1b4c0 + pristine_git_object: 9a947d111113c748df99d7a01a4c899962425dc7 src/mistralai/client/models/moderationllmv1config.py: id: 483378b56394 - last_write_checksum: sha1:b512a61a1513ac50731ccf154b85e8d746f965db - pristine_git_object: da7156eb30c23a89648d8cc7e674910b12a0c896 + last_write_checksum: sha1:bb2f92e87172e9ada69b1746f2b64ab41b550397 + pristine_git_object: fe597a9b9654ccdb37b35b673698ac8015796e6f src/mistralai/client/models/moderationllmv2categorythresholds.py: id: 4c2a8ff4d52b - last_write_checksum: sha1:2194db15a54038f89890c7d5b56aa50a2df0603c - pristine_git_object: 1754582b849a16dbf77fd9943edcc6f2f1c55ee2 + last_write_checksum: sha1:1b3e0e76b7f1b70a77cb7b24965d83f88188f306 + pristine_git_object: 2ca952c5264bd1e19c149802b380c3d82ec09ed6 src/mistralai/client/models/moderationllmv2config.py: id: bb511e7c628b - last_write_checksum: sha1:853c419e237e290057a6454ab99d492311d7b67b - pristine_git_object: df2b04bdfb831a71555a849209f10a1ef06d0564 + last_write_checksum: sha1:e77793718de35e58f2e6280126fc320b233cc365 + pristine_git_object: 5cd8b7ca1bd68540274db7a11286c200f4d57add src/mistralai/client/models/moderationobject.py: id: 132faad0549a - last_write_checksum: sha1:a8c1454a533e466216ef98dd198ae8959f51fa76 - pristine_git_object: e7ccd8f6f1f75704a973be7ebabc49617070c34a + last_write_checksum: sha1:5c551cc8657d3d9c3394638e6d336162563fc6ee + pristine_git_object: 66f6a84bf55703c7e4b46e4381e2b39a0b0eaaeb src/mistralai/client/models/moderationresponse.py: id: 06bab279cb31 last_write_checksum: sha1:b9158e575276c1e0a510c129347b9a98c5a70567 @@ -3584,36 +3588,36 @@ trackedFiles: pristine_git_object: 99360d410f7128756a7a7f6be6772238fa15c12f src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 - last_write_checksum: sha1:c3c57f0c1c7de0a90900ade464caebfc0b78694b - pristine_git_object: a6236b661f20569cba1ee394ebae24219e82f2d7 + last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 + pristine_git_object: f1535352af02c0d32c573f431b0440da4dab2fd6 src/mistralai/client/models/ocrimageobject.py: id: 685faeb41a80 - last_write_checksum: sha1:13f4e4d33d8fb5b0ee842695d4cc8329bd7ca382 - pristine_git_object: 365f062b5674141aad4b1601a85bec7a56db4cff + last_write_checksum: sha1:a848d782d09e7b899e4a801d8ea43505783c853f + pristine_git_object: 583cc38bf6046ff783ac2b5b2306fa42fa3c6fb5 src/mistralai/client/models/ocrpagedimensions.py: id: 02f763afbc9f last_write_checksum: sha1:f572ed8992ba1ba4d53b705c4e8c94c85ae1290e pristine_git_object: 847205c6c74a621dd2ee6d9eb18d1acba8395c50 src/mistralai/client/models/ocrpageobject.py: id: 07a099f89487 - last_write_checksum: sha1:5089ac3f02e4225d6c95cc9f05b74013694536da - pristine_git_object: ffc7b3b615e17a8e0d76fea4081249b143d8fe4d + last_write_checksum: sha1:8fd95a2a0b6a7a8090d7c0a6a480a4d091a2a9f2 + pristine_git_object: 40b70d8143410bebd0913ab9896584e6b252780d src/mistralai/client/models/ocrrequest.py: id: 36f204c64074 - last_write_checksum: sha1:9e9009dace9ff36cbff0cb8de408a1e0585147a7 - pristine_git_object: 4ad337ced23b3bdad21785b8dc3fcadbb868d4f0 + last_write_checksum: sha1:c3dd9da8c018858f849344c2d5d4da74d1a337ce + pristine_git_object: 6e405ee401e61f0aeb17ad0a49dea31499ec99da src/mistralai/client/models/ocrresponse.py: id: 2fdfc881ca56 - last_write_checksum: sha1:f1d18dbf4cd02f3598ae574d5033c30989fa6985 - pristine_git_object: e63eed987f4eb83f3406b15cf4d840fd43528a49 + last_write_checksum: sha1:8e496f6122ea0798df0d23f50ea3046a29f0f8db + pristine_git_object: ff4b96c30573a18c2e5665a6f3f10724f7a23f9a src/mistralai/client/models/ocrtableobject.py: id: d74dd0d2ddac last_write_checksum: sha1:492f8e4c30b61330592768b13cffcf9a9eb2c0fa pristine_git_object: 66bb050f30790c3fc51cdca1b73e847388fe50c5 src/mistralai/client/models/ocrusageinfo.py: id: 272b7e1785d5 - last_write_checksum: sha1:2b37766fdff72e7ec6e052f248362f7bb3989d2c - pristine_git_object: 2ec1322b29d7fe5246b9ad355a4997222b37970f + last_write_checksum: sha1:eb223a88b7e5175056197f64bb4bce2c88ccea19 + pristine_git_object: bfd748e0010e6acc404fdadfff40ee54ac52b9be src/mistralai/client/models/outputcontentchunks.py: id: 9ad9741f4975 last_write_checksum: sha1:afb76f3af2952c2afab5397e348ddfd6dbb56c4f @@ -3624,36 +3628,36 @@ trackedFiles: pristine_git_object: 291da1115294da17b7ca7babc8dc2d7ef672d709 src/mistralai/client/models/paginatedresultcampaignpreview.py: id: 6653cba0f982 - last_write_checksum: sha1:8b3d00eec103d4ee7b27cda1e08af9656c2c49c1 - pristine_git_object: d82ee741f4673fd96baaba619f437e348fc02379 + last_write_checksum: sha1:0f8d85739c71ececa1df8228ae827e1ebb9cfdcc + pristine_git_object: f6cfce379837e38cf5e42927ceb2d57c58325c67 src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py: id: 8c640682ccf9 - last_write_checksum: sha1:3b7e4de0836bccf0b3247962c17acc55a6caab35 - pristine_git_object: 97bbfea7c0901cf5487cf3a1743417a81232c254 + last_write_checksum: sha1:43b669ef54761d35893eb433c7089d1c350848cf + pristine_git_object: e08443c16e0d23cde396bd6465d92f1ae9a93777 src/mistralai/client/models/paginatedresultdatasetimporttask.py: id: 8fd0a8bad4e7 - last_write_checksum: sha1:f16cfea21df8209caea5b9f8e786a8793b2def50 - pristine_git_object: 9d6dcd052bbedb3e8cb618ce28db9bba1da3c54e + last_write_checksum: sha1:27afb85f9e813c8d9674bdac0892bda94d66659f + pristine_git_object: 4b9f48817baacc32672225b1c08642b4988f17f6 src/mistralai/client/models/paginatedresultdatasetpreview.py: id: bf20489474ce - last_write_checksum: sha1:80544bb270892461e255c9697decace639c1f8ec - pristine_git_object: 51566cc5899b587d7005aadaa05314429285585f + last_write_checksum: sha1:57f86606669135792e8ed1bd7065028380e689ed + pristine_git_object: 81746f355996c52df14778f2d402932a59c983a3 src/mistralai/client/models/paginatedresultdatasetrecord.py: id: 2556a91b48c4 - last_write_checksum: sha1:3e797b6e84b02e62b7db248cbc605a7c723ed370 - pristine_git_object: 1d6e15c1fb7df86cb66cf4263907b9a5ac19d8b6 + last_write_checksum: sha1:bd99e30e61b7487ef86acae66cdd44669b811355 + pristine_git_object: d9aa8c8e810767d749c8588fe801beba7cf77e65 src/mistralai/client/models/paginatedresultjudgepreview.py: id: 4d5aab2705a0 - last_write_checksum: sha1:77371c66e748507206fe1b00b228ba378e89f387 - pristine_git_object: 57dbc1e5dea2e462036ec2b5f48bf3fa18099edb + last_write_checksum: sha1:16667401828bb23b61f284c0ed934eeb78e1eaec + pristine_git_object: c61382f99c27190203d05aa304f8a9eecaebbdb6 src/mistralai/client/models/paginationinfo.py: id: 48851e82d67e last_write_checksum: sha1:166961e2c0f573ba0677ee803820bb944a8a5efb pristine_git_object: 2b9dab6258249f7be87e1d4a73a2502e21fe1f0d src/mistralai/client/models/paginationresponse.py: id: d64678967bf0 - last_write_checksum: sha1:683972d8248b032e3f30489c8aa3cdcdcc728862 - pristine_git_object: f05ee380b8a7e95f67545a61d333fe28956585ae + last_write_checksum: sha1:693e9b575e0da721b15363db1e381d19f8766efb + pristine_git_object: a60640aae96b54f7f8e7561029fda45a165007c4 ? src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py : id: 3e8e390b7fa1 last_write_checksum: sha1:7785e0e41ffed189357a2f5682a0158fbcfe80ca @@ -3676,8 +3680,8 @@ trackedFiles: pristine_git_object: 7423375af779911d2842ff9736452fc19a385daf src/mistralai/client/models/prediction.py: id: 1cc842a069a5 - last_write_checksum: sha1:3ee24375eb7f00cea0c9db6eebc564ce7067f295 - pristine_git_object: 0c6f4182ca8140e595f601b12fbd582034257587 + last_write_checksum: sha1:3ccc14b40fd70f3b4a5cdae3eebcc557b96aea8e + pristine_git_object: 614f481174e58eb7ba28cae5238b532d1d66ef9c src/mistralai/client/models/processingstatus.py: id: 28146eaecfcf last_write_checksum: sha1:a3e3ebeae169441cf430c302c9fe278de79ce215 @@ -3688,80 +3692,80 @@ trackedFiles: pristine_git_object: 15bdce2056f2f642096fbbdb2ac32ce1e5b8c9cf src/mistralai/client/models/realtimetranscriptionerror.py: id: 8c2267378f48 - last_write_checksum: sha1:78637de61d6fc3bc1fff8e95c0a6f5ffc1a3e111 - pristine_git_object: c661e46100752119521f63045e8ebe79105ecc01 + last_write_checksum: sha1:8bfdc2564fc416b0e1a4cc2e2a3a5437b26cea85 + pristine_git_object: 8ea1d4259df73f29096dd469dc24f668a4af0066 src/mistralai/client/models/realtimetranscriptionerrordetail.py: id: 5bd25cdf9c7a last_write_checksum: sha1:a226b10718b1fe4a661311cbd98ea3b1d1ac4163 pristine_git_object: cec1f6eabd44ceab4e58694a0862c9c90ea2f264 src/mistralai/client/models/realtimetranscriptioninputaudioappend.py: id: 8b03cde6e115 - last_write_checksum: sha1:abcf48a48b077e836e2ae5647d93bd61007b9aa7 - pristine_git_object: 8156a2704bd95b74875f7a9ac17191e026f08993 + last_write_checksum: sha1:292ec325423d102ac2ff89071dd814625359ee09 + pristine_git_object: 82ce59fccfe6347876f83a7bcfb78858915eca8c src/mistralai/client/models/realtimetranscriptioninputaudioend.py: id: c187ba1b551d - last_write_checksum: sha1:fa96156774481ca3b98f8c0f99b3b1db01280b37 - pristine_git_object: 473eedb744141faa3447929865a76129d5e96432 + last_write_checksum: sha1:7edc5617574a354fd3eb67a16086b5cd0d52cfbb + pristine_git_object: 9b0a87099103480379794727fa12bf1face16c6b src/mistralai/client/models/realtimetranscriptioninputaudioflush.py: id: b27b600c310e - last_write_checksum: sha1:8a8eb7de4137cf8cd810d93d984009bf8dff51c4 - pristine_git_object: 553d14c7720b3d1388901989d8160f0e3318ba56 + last_write_checksum: sha1:a7ad72a1bbae2f4f8c79aa277fd8beca6db2e1d2 + pristine_git_object: fe7286330722a27859c647d1c4f66f501e5fdd03 src/mistralai/client/models/realtimetranscriptionsession.py: id: 02517fa5411a - last_write_checksum: sha1:eb9a23fb89e0bdb3bb6168f512488a98bd626bc1 - pristine_git_object: a74a457b1e54deb1fcd203ce5ff2c57691f16b18 + last_write_checksum: sha1:3932d73a512a963ba7b8ed77ebaeb614785d7d1a + pristine_git_object: e23c07ec9df36495b4482a4fd9592867db2d0b3b src/mistralai/client/models/realtimetranscriptionsessioncreated.py: id: 4e3731f63a3c - last_write_checksum: sha1:6997848cf22dc90b10597eaf9f0dd966ace969af - pristine_git_object: bb96875ab913f3d6ff241a00d94a87e877637782 + last_write_checksum: sha1:daf7843f9d775a7c915e55f34213f3db2620044c + pristine_git_object: 88da8764f123cb42d6476c8f0cd60c9e7d2b07ae src/mistralai/client/models/realtimetranscriptionsessionupdated.py: id: 686dc4f2450f - last_write_checksum: sha1:e023fe0c8c54da644fc797c25dfeb070b6f0fd1c - pristine_git_object: fea5db4a1b956cb8253e4f147463c47958bfd989 + last_write_checksum: sha1:ec6e2ddb086b80138cbb1492b013ae0a6dd11b9e + pristine_git_object: 474b2fa70798bd0fea65232fa5f32eb33dce4c69 src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py: id: 4e1b3fd7c5a3 - last_write_checksum: sha1:7da202e016b1d1dfc36a13ac03e3b419f0952cd2 - pristine_git_object: 07ad59a41f8a16b9c23c4e0be503a801ec0e2dd6 + last_write_checksum: sha1:2edad8c5170e38fc0968569bcd0cf1c51321f80b + pristine_git_object: 4013d63818394f0f2eff84b72bba5234fb139378 src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py: id: 7033fdb33ad4 - last_write_checksum: sha1:812f072a9effe1ce44e56094121ed10b3a83e39d - pristine_git_object: a89441e91dff4b7a78e8dd247b43243e89bf129d + last_write_checksum: sha1:0221d1f4df2e6f7c8e42c366d439ec54023e0b1d + pristine_git_object: d4ce43f77c6dd2e6691b04402523bee6b9d21ba6 src/mistralai/client/models/referencechunk.py: id: 921acd3a224a - last_write_checksum: sha1:a8bff06a2a040556bce8e6212973a774bee6bd34 - pristine_git_object: e0bbae4e08275e82010080d4ee84612e01a07f81 + last_write_checksum: sha1:2534e964c706b886e64fdedfe34b1cbf4cb23e76 + pristine_git_object: c0d7c06584814227621699df817971a4e6920e39 src/mistralai/client/models/requestsource.py: id: 3f2774d9e609 last_write_checksum: sha1:1ce68530a46793968f1122d29df722f0a5c9d267 pristine_git_object: fc4433cb4e657b06aa6a4c078094c2df342810e2 src/mistralai/client/models/resourcelink.py: id: 4251cc3c7797 - last_write_checksum: sha1:f2a70cf2edb98dc0ab7e71fc3bf6f26d28cfbba7 - pristine_git_object: 8ed5613cb6db09f80e7bd0fcb1d8b06c231390ac + last_write_checksum: sha1:fad9dd6a100450397ee358842a31804c3552ca06 + pristine_git_object: 890c5be1de611379c12d1525d596bc284e0e197d src/mistralai/client/models/resourcevisibility.py: id: b5819dd5f981 last_write_checksum: sha1:3c7e91baa8c8a0bb2ba55a6b7c14db04350278d7 pristine_git_object: 56f91f154594a121c988497332e5b978cee4264c src/mistralai/client/models/responsedoneevent.py: id: cf8a686bf82c - last_write_checksum: sha1:144a8bf407391948946f3f5362db78a33c45ee6c - pristine_git_object: be38fba81c08088303c4342c99ac3628c5957785 + last_write_checksum: sha1:598757cc2549972367c626143eb14864f40b4868 + pristine_git_object: 89a58bf77313bbddb0fe8d460374cdbe5d02cea6 src/mistralai/client/models/responseerrorevent.py: id: b286d74e8724 - last_write_checksum: sha1:df3f53344624082471c795131552689510946345 - pristine_git_object: fa4d0d01c1cb7f15d6f469279c2000d2fad8f459 + last_write_checksum: sha1:443a69babe18e95bcc4219423449e57b73bc6015 + pristine_git_object: 5326c4e8293d5bc7cd6572e4cf5511ae2bec97d7 src/mistralai/client/models/responseformat.py: id: 6ab8bc8d22c0 - last_write_checksum: sha1:0ab455566c6bb0b63e2cb1f61f300266021f5954 - pristine_git_object: b2971412549cc5b95c53b93425dbd5b6503a4df7 + last_write_checksum: sha1:8f0993a7f7eb6ef5264706320242ab0f0d939227 + pristine_git_object: 95141394226e21ab908efd7e3795c8132fc8fa38 src/mistralai/client/models/responseformats.py: id: c4462a05fb08 last_write_checksum: sha1:3cb82d44a4f9df5e9a3f51867be6eab1d439d87a pristine_git_object: 21345778ad2d41a3746292e67fec628f9ec2a84d src/mistralai/client/models/responsestartedevent.py: id: 24f54ee8b0f2 - last_write_checksum: sha1:f66a0a67444916e838ca9a63144fb661832b54b9 - pristine_git_object: 84abfcd9ac159b9bd9234ff015d5525d88d663f6 + last_write_checksum: sha1:bbe13695d5cde5f98635c01453057061d0167f99 + pristine_git_object: ca3750421f3dda97cd85a6783084a934ed4f0fd4 src/mistralai/client/models/retrieve_model_v1_models_model_id_getop.py: id: 6fefa90ca351 last_write_checksum: sha1:52775e73fb5c51d245362ce63672cec776e5b6bd @@ -3772,40 +3776,40 @@ trackedFiles: pristine_git_object: dfec7cce1e22ab607b6a9e947fa940284426086d src/mistralai/client/models/searchchatcompletioneventidsrequest.py: id: cabc8ef82d67 - last_write_checksum: sha1:39384c10e2da9806d984be7176a19eec16ed5482 - pristine_git_object: f84760811493458509eb34462254f6cfd09ac851 + last_write_checksum: sha1:3290793dcf229bffc16b16d32d2c599c9a54bf4a + pristine_git_object: 64bb8f9f9e55f9caac2621120465edad169629f7 src/mistralai/client/models/searchchatcompletioneventidsresponse.py: id: a5f0bad3ba10 last_write_checksum: sha1:a521e3466db8258702fe5c286698d9404cc22b8c pristine_git_object: f4751159faff30b92a979d6f03ecbfc0f780261e src/mistralai/client/models/searchchatcompletioneventsrequest.py: id: a437333780bc - last_write_checksum: sha1:5147c9776bb4d6f18b1af6fd6d4bf584710357e7 - pristine_git_object: 95524c5b6f497e4d2c0c58622661469e88dd550b + last_write_checksum: sha1:aa956fbf5e01e20644b0de20047539209ed4210f + pristine_git_object: bca27f166a5b9e55bec2811110b94570fd604588 src/mistralai/client/models/searchchatcompletioneventsresponse.py: id: f96acbcd45f7 last_write_checksum: sha1:539caf622ef9e7579fdc82e7986dcc3a2aedae53 pristine_git_object: 8b9b10b51fe76de43895168df11e5bbcdfc29a62 src/mistralai/client/models/security.py: id: c2ca0e2a36b7 - last_write_checksum: sha1:d74333517caae2a1aa58517e8e935e46913bcc66 - pristine_git_object: f3b3423e850a1afa3b0fa5fa6c94f6018ff70627 + last_write_checksum: sha1:28496d4ff921e8c2186072aad170c65836a4b8f8 + pristine_git_object: 36b129533187283e4fdf53a67019b379b1e251fa src/mistralai/client/models/shareenum.py: id: a0e2a7a16bf8 last_write_checksum: sha1:15a84d57ceeb74cfb37275f714954e42d8e9b3ba pristine_git_object: 08ffeb7e46fbbc28b7c93ef2aa4a49aff7c0d35e src/mistralai/client/models/sharing.py: id: 324f5ac27249 - last_write_checksum: sha1:be77302c873a36d561fb4594fcb7addac923c9c6 - pristine_git_object: d6142e839545fb6be9bbac5d53c34e333112d467 + last_write_checksum: sha1:b67aa68e320269e0f6da9da23ed35cd1c41f2879 + pristine_git_object: efa16203021055e1f704b2fd3683eeee0a49ba07 src/mistralai/client/models/sharingdelete.py: id: f5ecce372e06 - last_write_checksum: sha1:247d793bd1ddc0ad35d010c17e5b32eba826e3a1 - pristine_git_object: 33ccd7e71b8f65d2a9329d8632b5446ca0431d0a + last_write_checksum: sha1:f993f4cc819a14985a70a31af7896115ee80af8a + pristine_git_object: 3472a50637d4582fa8945ec70b57ed12de88b99d src/mistralai/client/models/sharingrequest.py: id: 2439b732dfae - last_write_checksum: sha1:bb79913b3b243cd32b13ae012f0fc3fcc1b457d8 - pristine_git_object: 76424b8ee6c9cc0cff7d96649cc7695be6e3ceec + last_write_checksum: sha1:05e36cba36203bcc579a3b02538aed570cf22352 + pristine_git_object: 7c2d435c363bcd98aba97e120954ec1357524e34 src/mistralai/client/models/source.py: id: fcee60a4ea0d last_write_checksum: sha1:4d4277d75f7ce001780a069898b38afa7c8addc0 @@ -3824,96 +3828,96 @@ trackedFiles: pristine_git_object: d480a219e935aaea91adc320de0003b562c0bbb5 src/mistralai/client/models/textchunk.py: id: 9c96fb86a9ab - last_write_checksum: sha1:89cbb66753d7a3585ce58c70219a349f770909cc - pristine_git_object: ac9f3137dddc15e1cd10aa6385b76510e6c23e33 + last_write_checksum: sha1:40fa1ea5dcbca9f4c534b58f7cb65bbaa5084521 + pristine_git_object: bae970f3cb1f7cfec74cd38b3f1f1b5171943e99 src/mistralai/client/models/textcontent.py: id: 60805b9f7050 - last_write_checksum: sha1:23e396fda502398565dfd996b39107332584f52a - pristine_git_object: 7468b046de5d72085e804e774575519732d60742 + last_write_checksum: sha1:072d40013e047296f98a8be455b30546c8ce0874 + pristine_git_object: 03de48d36befc3f89fb55a9d12c0a78e1ef8d8bd src/mistralai/client/models/textresourcecontents.py: id: 58fe427f427f - last_write_checksum: sha1:56009344486b16740ba6569103ec8d20a15f9601 - pristine_git_object: c497bb4dc9177047100914169fb0e5358efa2292 + last_write_checksum: sha1:7d9dd5965f048f07338c19d79147b09f41e1f96f + pristine_git_object: c3f26a65734775d166a1f5d27cab50933e1a4597 src/mistralai/client/models/thinkchunk.py: id: 294bfce193a4 - last_write_checksum: sha1:9107800bae26e36436296efa317e7b00197f105a - pristine_git_object: 03573f8e1d1a470ba6dc545089beb9b40cebad2a + last_write_checksum: sha1:4563b1759e8b64a9ed1de3843ea73ffb8f2e3285 + pristine_git_object: ae084a179c3227351d0ca8b10c926c6a61d21221 src/mistralai/client/models/timestampgranularity.py: id: 68ddf8d702ea last_write_checksum: sha1:64e7b198a75f026590e26758112651d31984076f pristine_git_object: 8d3773752444db865c0e2629ad9eed66eb7f2bc6 src/mistralai/client/models/tool.py: id: 48b4f6f50fe9 - last_write_checksum: sha1:7e33d7a0349e652b40926f6a51240b9a5c1a7dbd - pristine_git_object: 2b9965e571eeb494f8cf867818aab488198ecdb2 + last_write_checksum: sha1:ed3725d5da10e6a201f73724a2bbf618bdbb2a33 + pristine_git_object: 1d1c5ce557321c33b036949fa4c625fb25e38f95 src/mistralai/client/models/toolcall.py: id: fb34a1a3f3c2 - last_write_checksum: sha1:7d0275444dd6be291c091e908a2b7f2fc536f20f - pristine_git_object: 181cec33c904535c804de06c7357bd493647cd70 + last_write_checksum: sha1:a0e14e69a107d88239e1ee43d2e8fd498eb034a4 + pristine_git_object: 29f1149cd07dfc2744a1088d271af65e4ad70012 src/mistralai/client/models/toolcallconfirmation.py: id: f2e953cfb4fe last_write_checksum: sha1:554a2e073917ffb479efe5887c0b59a2f4967c6e pristine_git_object: fd6eca50a7ec2f4cca2ae20958717881660e0ac5 src/mistralai/client/models/toolchoice.py: id: 14f7e4cc35b6 - last_write_checksum: sha1:a787827a4f4ecf5b6a7068ba94fd1ff074898b51 - pristine_git_object: cb787df1b62190319c6e9679521228af28ee7204 + last_write_checksum: sha1:531f7ac1d7cd7d99b79756b9c673463dd33f2011 + pristine_git_object: ce84573ae34624b1e07f7001d3a00bf36d620e5f src/mistralai/client/models/toolchoiceenum.py: id: c7798801f860 last_write_checksum: sha1:5388b2a6fad842f8e4ae79e6257b4d14c122a6ff pristine_git_object: d66c3d07058eb87bcc3eec10de99a616b5f6638a src/mistralai/client/models/toolconfiguration.py: id: faec24b75066 - last_write_checksum: sha1:912c1c10e88053ae4ee44af763c9ab7c95339f5d - pristine_git_object: b903c8b6c13777b671faf5aa97994117734b3a8f + last_write_checksum: sha1:caa6c41ccb0825034bb9cab4e3fcd1a2547b66a9 + pristine_git_object: eb3d14e5517a60c1fbac1b1feb7d5daadd877a90 src/mistralai/client/models/toolexecutiondeltaevent.py: id: df8f17cf3e07 - last_write_checksum: sha1:2537a6e2dffde3760a064fdf92efa6cdc117ba2b - pristine_git_object: 5a977ca6fc5bfdeadd929f18037fb5c9a9582b40 + last_write_checksum: sha1:77da4c0bca920d4ea77a64faa039fb3c07df46ed + pristine_git_object: c2e4095072f7efc6854f0f666fc5d7d0efcfc30c src/mistralai/client/models/toolexecutiondoneevent.py: id: 514fdee7d99f - last_write_checksum: sha1:d62f57105e4816e03030bc9a2a5645482ea80c55 - pristine_git_object: 1c9b0ec92d87a8559ef050a21ba309e05f6b0314 + last_write_checksum: sha1:b58fd690c6f3a0e2eeca2433f454f4b21a77c3e3 + pristine_git_object: ec3b691835bb0c76e0c5b7d825ca7a4867831302 src/mistralai/client/models/toolexecutionentry.py: id: 76db69eebe41 - last_write_checksum: sha1:9a697fdad4178b95d7d1bd1eaee77ef948fb2d4f - pristine_git_object: 0d6f2a1305f262519ba719969c6e62ceb95e52b3 + last_write_checksum: sha1:d8167692473b2d2b01eb59a9bf83dcbb5ee3d93e + pristine_git_object: 226adce185a755d18a046803884b9194d3c42188 src/mistralai/client/models/toolexecutionstartedevent.py: id: 40fadb8e49a1 - last_write_checksum: sha1:9f6e43d5b2c807ca3b080ea7bd4878ba3ec2a788 - pristine_git_object: 21e5bfa8fea7fa27b7031b740f72a873760700cc + last_write_checksum: sha1:e419d7f40dcb9450710952a0be173830d09cabf4 + pristine_git_object: a4af27b854e7a0d2ce0a04f2e986c865bfaaf179 src/mistralai/client/models/toolfilechunk.py: id: 26c8aadf416a - last_write_checksum: sha1:89bb203aa600bf6a516fbe10e1787a132de9ca5a - pristine_git_object: 0708b3ff4c4f97a0e4c4359baeedc89ef0b10278 + last_write_checksum: sha1:a79863e37d5cf2d6b52fabea259ce401ed0c4697 + pristine_git_object: 1d9e6118a393cbdf9b4c0d2b47b367b9381beee9 src/mistralai/client/models/toolmessage.py: id: 15f1af161031 - last_write_checksum: sha1:cfa16352cf5bbcd6eedbfbf7f3002149fd989418 - pristine_git_object: 05a0ee636a4393e3ce65cc1b6e272ddf8ec79254 + last_write_checksum: sha1:9557c9f6b7be4b6ac94d3316eb605e42aa8dc03c + pristine_git_object: 0dc9e92f5dd27ff93d6de62a6879699ace4300a8 src/mistralai/client/models/toolreferencechunk.py: id: 822e9f3e70de - last_write_checksum: sha1:f5c9265e27fa2d4526e5ce50dff7f7bd641eb642 - pristine_git_object: 95454fe891dd3955121565431897c1b8f0c25083 + last_write_checksum: sha1:2e489c4b2360741a3e4a20710361511a0d9158ea + pristine_git_object: 391724edbb7eea3d3acd1a4b3302045970cb5e31 src/mistralai/client/models/tooltypes.py: id: 86c3b54272fd last_write_checksum: sha1:e90c15c1e645a5f207af0c7ac728cb0a521c6706 pristine_git_object: e601c1967c42ef8d0c2eea98bc5c0ca722cde066 src/mistralai/client/models/trainingfile.py: id: 2edf9bce227d - last_write_checksum: sha1:8fd6a2560554b3c2166daff2ff1a48bb49053489 - pristine_git_object: 2faeda8bfb38c810c5d80eb17cc9928c49c7caf5 + last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0 + pristine_git_object: bdaba37a65b2641c83bb8f2dee7c0680aabd0f2d src/mistralai/client/models/transcriptionresponse.py: id: 60896dbc6345 - last_write_checksum: sha1:e8a318798dfe4ebd64c9d64f487f7e3e8dd05532 - pristine_git_object: 70315463ff8e01c680aa80d68bdc32a7429ddb16 + last_write_checksum: sha1:c858aa031b871a7d0890b96c98aae07ce9d1d9d3 + pristine_git_object: c512a3453c16c329307e094a5758c223db1d7be9 src/mistralai/client/models/transcriptionsegmentchunk.py: id: d1e6f3bdc74b - last_write_checksum: sha1:ee56c437444cbfa7983ba950e3e166f392d208cb - pristine_git_object: b87bfc2f9de0a07d62e8cc1fe265a9c29f56f194 + last_write_checksum: sha1:c7e8305a3a49490c748f8c5ea16e7397be285be3 + pristine_git_object: 8a5a7162fbc5a70098f9b1eed79baf6d77968194 src/mistralai/client/models/transcriptionstreamdone.py: id: 066a9158ed09 - last_write_checksum: sha1:cb8ea2e34c712ef1694bd1b6a83e7eed9318b13b - pristine_git_object: e3c5016901a2400c222e5b821b5afb312af1a1e6 + last_write_checksum: sha1:6c3db3298e520c56131f2f42841530013fa2aed1 + pristine_git_object: 89357277ef90b00e5b8e86d924dc35d288f07948 src/mistralai/client/models/transcriptionstreamevents.py: id: b50b3d74f16f last_write_checksum: sha1:68f82eea8a0bcf1b8b65cedf9e276f34121d398b @@ -3928,16 +3932,16 @@ trackedFiles: pristine_git_object: b6c6190684eccdc3fe6ce4bc7b86f5ee6490a197 src/mistralai/client/models/transcriptionstreamsegmentdelta.py: id: c0a882ce57e5 - last_write_checksum: sha1:3507a0355027136e92ada0c9766277381d5dee96 - pristine_git_object: 32ef8f9b2aa34253ea10c830ae856a931306f658 + last_write_checksum: sha1:f849d8d9ddd3344a91ba23bdc40f55ed9388420d + pristine_git_object: 38e7b0a3142f4f1b4a4cc2c63729b3f51030300f src/mistralai/client/models/transcriptionstreamtextdelta.py: id: 6086dc081147 last_write_checksum: sha1:968b4bc32731be6c63be3fd90eb26f4357f891a3 pristine_git_object: 42f0ffb7f16bee4f68f9db9807aa4ec3d9ae5176 src/mistralai/client/models/unarchivemodelresponse.py: id: 22e2ccbb0c80 - last_write_checksum: sha1:a69d8dc8636f3326eb61892b85a9b60044b457fe - pristine_git_object: 5c75d30edaade853f085533da0f9f5de221b6e44 + last_write_checksum: sha1:8ebdd49f2bef3c5934395808bf71701b46e512be + pristine_git_object: 5cab4c2ef093236cacdc2a9e24b27c1a6c643ee9 src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py: id: fa5d55a9d6cf last_write_checksum: sha1:5cf094a6617b1900745deece2e34edfb1b040905 @@ -3956,12 +3960,12 @@ trackedFiles: pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:8f522b8d81152da1248a00073265d927c43ecae5 - pristine_git_object: 584c034c988dbc50e7889b207118eb5f4545b09e + last_write_checksum: sha1:db80a8f0b630acf98be5c27caa7bb448a4e58237 + pristine_git_object: 7bb9686b9b542c47ac25fb6780017b5739829b1e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 - last_write_checksum: sha1:cd461734ab9df9ca0d254c69a552b74b8f63f20e - pristine_git_object: 2fe42ba8b72ab5d851fed49ddbe5d5cfeeb022bd + last_write_checksum: sha1:cdf3aa496722d84b0a76d52ce76133cfaafb0073 + pristine_git_object: 3540d02bd8e8bf45ba3fe33d0d080510c099ac14 src/mistralai/client/models/updatedatasetrecordpayloadrequest.py: id: bd45f357a538 last_write_checksum: sha1:774ba70d9f417e84b546b9f4c5c85eb2876dd56d @@ -3972,52 +3976,52 @@ trackedFiles: pristine_git_object: ccba4a5c71aa8717c4fcb1af61f4f10c17b84ebd src/mistralai/client/models/updatedatasetrequest.py: id: bbb067caa23f - last_write_checksum: sha1:1045b7f77b20e9ede79240467927bac20b9d54f5 - pristine_git_object: 0297408982cd4204c15447204e539cef16b82a01 + last_write_checksum: sha1:4ae8e1ea4a6a9ec5ed559bef8fe21d11af2b0ed3 + pristine_git_object: ddbaad1237d2056476c4fe7f8a6caba06a65f744 src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 - last_write_checksum: sha1:c644725ae379f22550d00b42baefb511d1cc3667 - pristine_git_object: 61e696555c0654208b0d9dcd63fc475ad85297d4 + last_write_checksum: sha1:57b5a2c77ddcf2e09a8eead6b4f5e5c694e21844 + pristine_git_object: 12d9c89b9ab67f6d7e69c26c31da76e7aaf1e817 src/mistralai/client/models/updatejudgerequest.py: id: f6ad6fb901a0 last_write_checksum: sha1:0cc5d951aa36d1ba6cf82020d9ade4ac85bc3a94 pristine_git_object: 04c86ab65599b96478f9b6a0cfa6ce3af1a489bb src/mistralai/client/models/updatelibraryrequest.py: id: 51bc63885337 - last_write_checksum: sha1:622d6a7af58d2e86d7d2dd4e312883d11ce5a8a8 - pristine_git_object: 91cbf2a1c76361c9c5ee1554c80f1507ff5ee50b + last_write_checksum: sha1:3fb7d575fff336485bb48158b082e1e27e4848a2 + pristine_git_object: d5183ac048c60522563532e48899cd0398d2effe src/mistralai/client/models/updatemodelrequest.py: id: fe649967751e - last_write_checksum: sha1:dbba8a6ccbfae36ac56808742f4c05ab99dd2c6c - pristine_git_object: f685cfcce1aa3669159fec902ba78034ef3141b8 + last_write_checksum: sha1:b5ce56ef430768ee806b45d9c2e4c405764a1ef5 + pristine_git_object: 0179ba140d7d598a4a363ddfab67197e56857964 src/mistralai/client/models/usageinfo.py: id: 54adb9a3af16 - last_write_checksum: sha1:04705526057c43495284fe9c50cf7df2af7b49fd - pristine_git_object: 31cbf07e3e38df4452da320e44f3fa9aef17c196 + last_write_checksum: sha1:108b7cd220312ff96d298981e7ada5bc05921cc9 + pristine_git_object: f23699d0223579e3477a1a010063f3a7a985b07c src/mistralai/client/models/usermessage.py: id: cb583483acf4 - last_write_checksum: sha1:0060ee5f5fbbd78073cd56546127a021354a8072 - pristine_git_object: 63e7679246a11fe8e7a3db06e382779c05c64366 + last_write_checksum: sha1:b97161e1abd159d5a0c5757cac2a97bd6a5f1ef0 + pristine_git_object: 7b4b55630022708db7a53476dc7111416594df46 src/mistralai/client/models/validationerror.py: id: 15df3c7368ab - last_write_checksum: sha1:feacaef605de97f7eec36e69c5dda2a10e5b75ac - pristine_git_object: d856e24c3ac25fb6d2802ca7038ab6947ac6a2da + last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 + pristine_git_object: 5fe796db923badd9fb85dc4080a30496ed2b419b src/mistralai/client/models/wandbintegration.py: id: 4823c1e80942 - last_write_checksum: sha1:cc0a7ce49756928f4d261375526a3498b9e4f05d - pristine_git_object: f0df2c77845b2741802730fcd4f3c5d31b7ddd8e + last_write_checksum: sha1:b836b2c829f16a00221354c44f55b672eefc3aa0 + pristine_git_object: 0e444becfc1e90daa3b5f2393975a530c95a7a36 src/mistralai/client/models/wandbintegrationresult.py: id: 8787b4ad5458 - last_write_checksum: sha1:6ba506e01333a3084f63fbfccb459235b6560554 - pristine_git_object: 575cbd42297f02a54542c7eda3a4cabaa28dda23 + last_write_checksum: sha1:80cb8d2eb89889ff54ab967b449c580e28c3f627 + pristine_git_object: e64bb27c9142d3fe312e8d7476893382dab20722 src/mistralai/client/models/websearchpremiumtool.py: id: bfe88af887e3 - last_write_checksum: sha1:ceb073d3b3916b2ff8f7b7e5eb01692893024d68 - pristine_git_object: 00d4a4b427331660d29513ec43e68fc7cf8afcfb + last_write_checksum: sha1:bdb724b386fe512c2b6db6bd2931ea71c796dbc9 + pristine_git_object: 5c929e94c20159cf394a9f95ef990a926643f0ea src/mistralai/client/models/websearchtool.py: id: 26b0903423e5 - last_write_checksum: sha1:a07d7ace2d68c944c686e69053bef8d84231814b - pristine_git_object: 6871080f6279ef42a0525c1e26368baafc98fbb7 + last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f + pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 @@ -4040,8 +4044,8 @@ trackedFiles: pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:365709e35dc4e450a2c4931e75dcbd04568ab361 - pristine_git_object: 80bf25a749eb3b36035aaafa15f059bcf403ec80 + last_write_checksum: sha1:9ee656529530717c0215e75c03509c9962a1e54e + pristine_git_object: b775fe1ccd75f703756b7746383c0e53e5d7e725 src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e @@ -4080,8 +4084,8 @@ trackedFiles: pristine_git_object: d897495f053459106144501c67f2215251d52a27 src/mistralai/client/utils/eventstreaming.py: id: 3263d7502030 - last_write_checksum: sha1:24af3168dafe6b8d860cffb121fac11cd0e9d930 - pristine_git_object: 19a121529f180968f655baffbe446e5c1d6c2abb + last_write_checksum: sha1:10fa278190f52e6acacabf3b1bab6a82d3459a96 + pristine_git_object: 93287ab457d4944394425eb197caec54280dfbd3 src/mistralai/client/utils/forms.py: id: 58842e905fce last_write_checksum: sha1:d68ca0257e0e8bdc5cdc450f3e70a7ba789859f5 @@ -4153,7 +4157,7 @@ examples: model_id: "ft:open-mistral-7b:587a6b29:20240514:7e773925" responses: "200": - application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": true, "function_calling": true, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} + application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": true, "function_calling": true, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false, "audio_transcription_realtime": false, "audio_speech": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} "422": application/json: {} userExample: @@ -4162,7 +4166,7 @@ examples: model_id: "ft:open-mistral-7b:587a6b29:20240514:7e773925" responses: "200": - application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": false, "function_calling": false, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} + application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": false, "function_calling": false, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false, "audio_transcription_realtime": false, "audio_speech": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} delete_model_v1_models__model_id__delete: speakeasy-default-delete-model-v1-models-model-id-delete: parameters: @@ -6045,11 +6049,7 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.beta.conversations.start()`: `response.guardrails[]` **Changed** (Breaking ⚠️) - * `mistral.beta.conversations.append()`: `response.guardrails[]` **Changed** (Breaking ⚠️) - * `mistral.beta.conversations.restart()`: `response.guardrails[]` **Changed** (Breaking ⚠️) +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.append_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.append()`: \n * `request.inputs.union(Array)[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get_history()`: `response.entries[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get_messages()`: `response.messages[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(user).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(tool).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request.messages[].union(tool).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.models.list()`: `response.data[].union(base).capabilities` **Changed**\n* `mistral.models.retrieve()`: `response.union(base).capabilities` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index d98e2074..ddfd6c0b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.2 + version: 2.0.3 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 17e7db75..3b5a904d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.729.0 +speakeasyVersion: 1.754.0 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure @@ -16,11 +16,10 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8e520bf6342e9820336a36b3b1f0308513c31f537579c630c1a48424d5f4caac - sourceBlobDigest: sha256:1353b6824cfc37c4033c16d8c9d291ea06b123d7ee3e095936b2c93a31fefed0 + sourceRevisionDigest: sha256:430c8c8196f530e54f438a623547c32d06017080aac046b240edbaeff28a2ebd + sourceBlobDigest: sha256:3fb3b90d358c986a52bbf12154853ba827cd614548d494c95569bedda3e57fe4 tags: - latest - - speakeasy-sdk-regen-1773407111 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8e520bf6342e9820336a36b3b1f0308513c31f537579c630c1a48424d5f4caac - sourceBlobDigest: sha256:1353b6824cfc37c4033c16d8c9d291ea06b123d7ee3e095936b2c93a31fefed0 + sourceRevisionDigest: sha256:430c8c8196f530e54f438a623547c32d06017080aac046b240edbaeff28a2ebd + sourceBlobDigest: sha256:3fb3b90d358c986a52bbf12154853ba827cd614548d494c95569bedda3e57fe4 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:5e5b3cfb6d3b5e303545a9aebbaaf38e7dbb865000ca11e38232dcc659083d25 + codeSamplesRevisionDigest: sha256:966edb4cf55689daff001456afa27a7370113efcc5c0ba0896782f65b1e6fba5 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.729.0 diff --git a/README-PYPI.md b/README-PYPI.md index ef6a3bc5..96a721dd 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -683,7 +683,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], stream=True, completion_args={ + ], completion_args={ "response_format": { "type": "text", }, diff --git a/README.md b/README.md index 5bdcf8e2..e33cc821 100644 --- a/README.md +++ b/README.md @@ -683,7 +683,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], stream=True, completion_args={ + ], completion_args={ "response_format": { "type": "text", }, diff --git a/RELEASES.md b/RELEASES.md index 39f9be11..0cb8573f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -418,4 +418,14 @@ Based on: ### Generated - [python v2.0.2] . ### Releases -- [PyPI v2.0.2] https://pypi.org/project/mistralai/2.0.2 - . \ No newline at end of file +- [PyPI v2.0.2] https://pypi.org/project/mistralai/2.0.2 - . + +## 2026-03-13 19:33:58 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.3] . +### Releases +- [PyPI v2.0.3] https://pypi.org/project/mistralai/2.0.3 - . \ No newline at end of file diff --git a/docs/models/apiendpoint.md b/docs/models/apiendpoint.md index 8d83a26f..e049d40a 100644 --- a/docs/models/apiendpoint.md +++ b/docs/models/apiendpoint.md @@ -1,17 +1,26 @@ # APIEndpoint +## Example Usage + +```python +from mistralai.client.models import APIEndpoint + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: APIEndpoint = "/v1/chat/completions" +``` + ## Values -| Name | Value | -| ------------------------------ | ------------------------------ | -| `ROOT_V1_CHAT_COMPLETIONS` | /v1/chat/completions | -| `ROOT_V1_EMBEDDINGS` | /v1/embeddings | -| `ROOT_V1_FIM_COMPLETIONS` | /v1/fim/completions | -| `ROOT_V1_MODERATIONS` | /v1/moderations | -| `ROOT_V1_CHAT_MODERATIONS` | /v1/chat/moderations | -| `ROOT_V1_OCR` | /v1/ocr | -| `ROOT_V1_CLASSIFICATIONS` | /v1/classifications | -| `ROOT_V1_CHAT_CLASSIFICATIONS` | /v1/chat/classifications | -| `ROOT_V1_CONVERSATIONS` | /v1/conversations | -| `ROOT_V1_AUDIO_TRANSCRIPTIONS` | /v1/audio/transcriptions | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"/v1/chat/completions"` +- `"/v1/embeddings"` +- `"/v1/fim/completions"` +- `"/v1/moderations"` +- `"/v1/chat/moderations"` +- `"/v1/ocr"` +- `"/v1/classifications"` +- `"/v1/chat/classifications"` +- `"/v1/conversations"` +- `"/v1/audio/transcriptions"` diff --git a/docs/models/audience.md b/docs/models/audience.md index ac325076..186d913e 100644 --- a/docs/models/audience.md +++ b/docs/models/audience.md @@ -1,9 +1,18 @@ # Audience +## Example Usage + +```python +from mistralai.client.models import Audience + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Audience = "user" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `USER` | user | -| `ASSISTANT` | assistant | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"user"` +- `"assistant"` diff --git a/docs/models/audioencoding.md b/docs/models/audioencoding.md index feec8c71..34b80490 100644 --- a/docs/models/audioencoding.md +++ b/docs/models/audioencoding.md @@ -1,13 +1,22 @@ # AudioEncoding +## Example Usage + +```python +from mistralai.client.models import AudioEncoding + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: AudioEncoding = "pcm_s16le" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `PCM_S16LE` | pcm_s16le | -| `PCM_S32LE` | pcm_s32le | -| `PCM_F16LE` | pcm_f16le | -| `PCM_F32LE` | pcm_f32le | -| `PCM_MULAW` | pcm_mulaw | -| `PCM_ALAW` | pcm_alaw | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pcm_s16le"` +- `"pcm_s32le"` +- `"pcm_f16le"` +- `"pcm_f32le"` +- `"pcm_mulaw"` +- `"pcm_alaw"` diff --git a/docs/models/basemodelcard.md b/docs/models/basemodelcard.md index 0f42504f..2a5e7515 100644 --- a/docs/models/basemodelcard.md +++ b/docs/models/basemodelcard.md @@ -3,18 +3,18 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `object` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `created` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `owned_by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `capabilities` | [models.ModelCapabilities](../models/modelcapabilities.md) | :heavy_check_mark: | N/A | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `max_context_length` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `aliases` | List[*str*] | :heavy_minus_sign: | N/A | -| `deprecation` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | -| `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `type` | *Literal["base"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `object` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `created` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `owned_by` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `capabilities` | [models.ModelCapabilities](../models/modelcapabilities.md) | :heavy_check_mark: | This is populated by Harmattan, but some fields have a name
that we don't want to expose in the API. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `max_context_length` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `aliases` | List[*str*] | :heavy_minus_sign: | N/A | +| `deprecation` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `type` | *Literal["base"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/basetaskstatus.md b/docs/models/basetaskstatus.md index 8fad1e10..bb781fd1 100644 --- a/docs/models/basetaskstatus.md +++ b/docs/models/basetaskstatus.md @@ -1,15 +1,24 @@ # BaseTaskStatus +## Example Usage + +```python +from mistralai.client.models import BaseTaskStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: BaseTaskStatus = "RUNNING" +``` + ## Values -| Name | Value | -| ------------------ | ------------------ | -| `RUNNING` | RUNNING | -| `COMPLETED` | COMPLETED | -| `FAILED` | FAILED | -| `CANCELED` | CANCELED | -| `TERMINATED` | TERMINATED | -| `CONTINUED_AS_NEW` | CONTINUED_AS_NEW | -| `TIMED_OUT` | TIMED_OUT | -| `UNKNOWN` | UNKNOWN | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"RUNNING"` +- `"COMPLETED"` +- `"FAILED"` +- `"CANCELED"` +- `"TERMINATED"` +- `"CONTINUED_AS_NEW"` +- `"TIMED_OUT"` +- `"UNKNOWN"` diff --git a/docs/models/batchjobstatus.md b/docs/models/batchjobstatus.md index 64617b31..7473cb1f 100644 --- a/docs/models/batchjobstatus.md +++ b/docs/models/batchjobstatus.md @@ -1,14 +1,23 @@ # BatchJobStatus +## Example Usage + +```python +from mistralai.client.models import BatchJobStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: BatchJobStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `RUNNING` | RUNNING | -| `SUCCESS` | SUCCESS | -| `FAILED` | FAILED | -| `TIMEOUT_EXCEEDED` | TIMEOUT_EXCEEDED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | -| `CANCELLED` | CANCELLED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"RUNNING"` +- `"SUCCESS"` +- `"FAILED"` +- `"TIMEOUT_EXCEEDED"` +- `"CANCELLATION_REQUESTED"` +- `"CANCELLED"` diff --git a/docs/models/builtinconnectors.md b/docs/models/builtinconnectors.md index f96f5044..11dfd48a 100644 --- a/docs/models/builtinconnectors.md +++ b/docs/models/builtinconnectors.md @@ -1,12 +1,21 @@ # BuiltInConnectors +## Example Usage + +```python +from mistralai.client.models import BuiltInConnectors + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: BuiltInConnectors = "web_search" +``` + ## Values -| Name | Value | -| -------------------- | -------------------- | -| `WEB_SEARCH` | web_search | -| `WEB_SEARCH_PREMIUM` | web_search_premium | -| `CODE_INTERPRETER` | code_interpreter | -| `IMAGE_GENERATION` | image_generation | -| `DOCUMENT_LIBRARY` | document_library | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"web_search"` +- `"web_search_premium"` +- `"code_interpreter"` +- `"image_generation"` +- `"document_library"` diff --git a/docs/models/chatcompletionchoicefinishreason.md b/docs/models/chatcompletionchoicefinishreason.md index b2f15ecb..c2892726 100644 --- a/docs/models/chatcompletionchoicefinishreason.md +++ b/docs/models/chatcompletionchoicefinishreason.md @@ -1,12 +1,21 @@ # ChatCompletionChoiceFinishReason +## Example Usage + +```python +from mistralai.client.models import ChatCompletionChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ChatCompletionChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `STOP` | stop | -| `LENGTH` | length | -| `MODEL_LENGTH` | model_length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"model_length"` +- `"error"` +- `"tool_calls"` diff --git a/docs/models/classifierfinetuningjobdetailsstatus.md b/docs/models/classifierfinetuningjobdetailsstatus.md index 058c6583..3c6b1f52 100644 --- a/docs/models/classifierfinetuningjobdetailsstatus.md +++ b/docs/models/classifierfinetuningjobdetailsstatus.md @@ -1,17 +1,26 @@ # ClassifierFineTuningJobDetailsStatus +## Example Usage + +```python +from mistralai.client.models import ClassifierFineTuningJobDetailsStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ClassifierFineTuningJobDetailsStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/classifierfinetuningjobstatus.md b/docs/models/classifierfinetuningjobstatus.md index ca829885..c25d73a6 100644 --- a/docs/models/classifierfinetuningjobstatus.md +++ b/docs/models/classifierfinetuningjobstatus.md @@ -2,18 +2,27 @@ The current status of the fine-tuning job. +## Example Usage + +```python +from mistralai.client.models import ClassifierFineTuningJobStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ClassifierFineTuningJobStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/completionfinetuningjobdetailsstatus.md b/docs/models/completionfinetuningjobdetailsstatus.md index 94d795a9..6c7a0979 100644 --- a/docs/models/completionfinetuningjobdetailsstatus.md +++ b/docs/models/completionfinetuningjobdetailsstatus.md @@ -1,17 +1,26 @@ # CompletionFineTuningJobDetailsStatus +## Example Usage + +```python +from mistralai.client.models import CompletionFineTuningJobDetailsStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionFineTuningJobDetailsStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/completionfinetuningjobstatus.md b/docs/models/completionfinetuningjobstatus.md index db151a1b..1fd78b9d 100644 --- a/docs/models/completionfinetuningjobstatus.md +++ b/docs/models/completionfinetuningjobstatus.md @@ -2,18 +2,27 @@ The current status of the fine-tuning job. +## Example Usage + +```python +from mistralai.client.models import CompletionFineTuningJobStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionFineTuningJobStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/completionresponsestreamchoicefinishreason.md b/docs/models/completionresponsestreamchoicefinishreason.md index 0fece473..3e8c30ec 100644 --- a/docs/models/completionresponsestreamchoicefinishreason.md +++ b/docs/models/completionresponsestreamchoicefinishreason.md @@ -1,11 +1,20 @@ # CompletionResponseStreamChoiceFinishReason +## Example Usage + +```python +from mistralai.client.models import CompletionResponseStreamChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionResponseStreamChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `STOP` | stop | -| `LENGTH` | length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"error"` +- `"tool_calls"` diff --git a/docs/models/confirmation.md b/docs/models/confirmation.md index fd6e6aaa..c8709384 100644 --- a/docs/models/confirmation.md +++ b/docs/models/confirmation.md @@ -1,9 +1,14 @@ # Confirmation +## Example Usage + +```python +from mistralai.client.models import Confirmation +value: Confirmation = "allow" +``` + ## Values -| Name | Value | -| ------- | ------- | -| `ALLOW` | allow | -| `DENY` | deny | \ No newline at end of file +- `"allow"` +- `"deny"` diff --git a/docs/models/conversationappendrequest.md b/docs/models/conversationappendrequest.md index 78a96508..471fcc31 100644 --- a/docs/models/conversationappendrequest.md +++ b/docs/models/conversationappendrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendRequestHandoffExecution]](../models/conversationappendrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationappendrequesthandoffexecution.md b/docs/models/conversationappendrequesthandoffexecution.md index 7418b36a..70cef2ed 100644 --- a/docs/models/conversationappendrequesthandoffexecution.md +++ b/docs/models/conversationappendrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationAppendRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationAppendRequestHandoffExecution +value: ConversationAppendRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationappendstreamrequest.md b/docs/models/conversationappendstreamrequest.md index daea9c52..a54d5d3e 100644 --- a/docs/models/conversationappendstreamrequest.md +++ b/docs/models/conversationappendstreamrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendStreamRequestHandoffExecution]](../models/conversationappendstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationappendstreamrequesthandoffexecution.md b/docs/models/conversationappendstreamrequesthandoffexecution.md index 1bbced3e..dea51978 100644 --- a/docs/models/conversationappendstreamrequesthandoffexecution.md +++ b/docs/models/conversationappendstreamrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationAppendStreamRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationAppendStreamRequestHandoffExecution +value: ConversationAppendStreamRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index 903d13c1..6a5dc206 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationrequesthandoffexecution.md b/docs/models/conversationrequesthandoffexecution.md index e7314f7e..de9dc287 100644 --- a/docs/models/conversationrequesthandoffexecution.md +++ b/docs/models/conversationrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationRequestHandoffExecution +value: ConversationRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationrestartrequest.md b/docs/models/conversationrestartrequest.md index 08f47bba..be0f2289 100644 --- a/docs/models/conversationrestartrequest.md +++ b/docs/models/conversationrestartrequest.md @@ -8,7 +8,7 @@ Request to restart a new conversation from a given entry in the conversation. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationrestartrequesthandoffexecution.md b/docs/models/conversationrestartrequesthandoffexecution.md index 5790624b..4e202d69 100644 --- a/docs/models/conversationrestartrequesthandoffexecution.md +++ b/docs/models/conversationrestartrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationRestartRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationRestartRequestHandoffExecution +value: ConversationRestartRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationrestartstreamrequest.md b/docs/models/conversationrestartstreamrequest.md index 3ad739aa..f99a6e34 100644 --- a/docs/models/conversationrestartstreamrequest.md +++ b/docs/models/conversationrestartstreamrequest.md @@ -8,7 +8,7 @@ Request to restart a new conversation from a given entry in the conversation. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationrestartstreamrequesthandoffexecution.md b/docs/models/conversationrestartstreamrequesthandoffexecution.md index 97266b43..9d2c5633 100644 --- a/docs/models/conversationrestartstreamrequesthandoffexecution.md +++ b/docs/models/conversationrestartstreamrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationRestartStreamRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationRestartStreamRequestHandoffExecution +value: ConversationRestartStreamRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationsource.md b/docs/models/conversationsource.md index 12bf7c1f..ee88d9d4 100644 --- a/docs/models/conversationsource.md +++ b/docs/models/conversationsource.md @@ -1,11 +1,20 @@ # ConversationSource +## Example Usage + +```python +from mistralai.client.models import ConversationSource + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ConversationSource = "EXPLORER" +``` + ## Values -| Name | Value | -| --------------- | --------------- | -| `EXPLORER` | EXPLORER | -| `UPLOADED_FILE` | UPLOADED_FILE | -| `DIRECT_INPUT` | DIRECT_INPUT | -| `PLAYGROUND` | PLAYGROUND | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"EXPLORER"` +- `"UPLOADED_FILE"` +- `"DIRECT_INPUT"` +- `"PLAYGROUND"` diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index 8debea1c..af50989c 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationstreamrequesthandoffexecution.md b/docs/models/conversationstreamrequesthandoffexecution.md index c98e194c..247bfd23 100644 --- a/docs/models/conversationstreamrequesthandoffexecution.md +++ b/docs/models/conversationstreamrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationStreamRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationStreamRequestHandoffExecution +value: ConversationStreamRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/embeddingdtype.md b/docs/models/embeddingdtype.md index 01656b0a..301585b2 100644 --- a/docs/models/embeddingdtype.md +++ b/docs/models/embeddingdtype.md @@ -1,12 +1,17 @@ # EmbeddingDtype +## Example Usage + +```python +from mistralai.client.models import EmbeddingDtype +value: EmbeddingDtype = "float" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `FLOAT` | float | -| `INT8` | int8 | -| `UINT8` | uint8 | -| `BINARY` | binary | -| `UBINARY` | ubinary | \ No newline at end of file +- `"float"` +- `"int8"` +- `"uint8"` +- `"binary"` +- `"ubinary"` diff --git a/docs/models/encodingformat.md b/docs/models/encodingformat.md index 7d5941cf..8bc9e8c6 100644 --- a/docs/models/encodingformat.md +++ b/docs/models/encodingformat.md @@ -1,9 +1,14 @@ # EncodingFormat +## Example Usage + +```python +from mistralai.client.models import EncodingFormat +value: EncodingFormat = "float" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `FLOAT` | float | -| `BASE64` | base64 | \ No newline at end of file +- `"float"` +- `"base64"` diff --git a/docs/models/entitytype.md b/docs/models/entitytype.md index 7c040b38..44fb9d6b 100644 --- a/docs/models/entitytype.md +++ b/docs/models/entitytype.md @@ -2,11 +2,20 @@ The type of entity, used to share a library. +## Example Usage + +```python +from mistralai.client.models import EntityType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: EntityType = "User" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `USER` | User | -| `WORKSPACE` | Workspace | -| `ORG` | Org | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"User"` +- `"Workspace"` +- `"Org"` diff --git a/docs/models/filepurpose.md b/docs/models/filepurpose.md index 14cab13e..af6dc9fa 100644 --- a/docs/models/filepurpose.md +++ b/docs/models/filepurpose.md @@ -1,10 +1,19 @@ # FilePurpose +## Example Usage + +```python +from mistralai.client.models import FilePurpose + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FilePurpose = "fine-tune" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `FINE_TUNE` | fine-tune | -| `BATCH` | batch | -| `OCR` | ocr | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"fine-tune"` +- `"batch"` +- `"ocr"` diff --git a/docs/models/filesapiroutesuploadfilefilevisibility.md b/docs/models/filesapiroutesuploadfilefilevisibility.md index 055f071b..c1f89309 100644 --- a/docs/models/filesapiroutesuploadfilefilevisibility.md +++ b/docs/models/filesapiroutesuploadfilefilevisibility.md @@ -1,9 +1,14 @@ # FilesAPIRoutesUploadFileFileVisibility +## Example Usage + +```python +from mistralai.client.models import FilesAPIRoutesUploadFileFileVisibility +value: FilesAPIRoutesUploadFileFileVisibility = "workspace" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `WORKSPACE` | workspace | -| `USER` | user | \ No newline at end of file +- `"workspace"` +- `"user"` diff --git a/docs/models/filevisibility.md b/docs/models/filevisibility.md index 4ed11692..4e6c9ed9 100644 --- a/docs/models/filevisibility.md +++ b/docs/models/filevisibility.md @@ -1,9 +1,18 @@ # FileVisibility +## Example Usage + +```python +from mistralai.client.models import FileVisibility + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FileVisibility = "workspace" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `WORKSPACE` | workspace | -| `USER` | user | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"workspace"` +- `"user"` diff --git a/docs/models/finetuneablemodeltype.md b/docs/models/finetuneablemodeltype.md index 34b24bd4..9ec9634f 100644 --- a/docs/models/finetuneablemodeltype.md +++ b/docs/models/finetuneablemodeltype.md @@ -1,9 +1,14 @@ # FineTuneableModelType +## Example Usage + +```python +from mistralai.client.models import FineTuneableModelType +value: FineTuneableModelType = "completion" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `COMPLETION` | completion | -| `CLASSIFIER` | classifier | \ No newline at end of file +- `"completion"` +- `"classifier"` diff --git a/docs/models/format_.md b/docs/models/format_.md index 97d286a4..5bf1ed0c 100644 --- a/docs/models/format_.md +++ b/docs/models/format_.md @@ -2,10 +2,19 @@ Format of the table +## Example Usage + +```python +from mistralai.client.models import Format + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Format = "markdown" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `MARKDOWN` | markdown | -| `HTML` | html | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"markdown"` +- `"html"` diff --git a/docs/models/ftclassifierlossfunction.md b/docs/models/ftclassifierlossfunction.md index 919cdd38..36d3db18 100644 --- a/docs/models/ftclassifierlossfunction.md +++ b/docs/models/ftclassifierlossfunction.md @@ -1,9 +1,18 @@ # FTClassifierLossFunction +## Example Usage + +```python +from mistralai.client.models import FTClassifierLossFunction + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FTClassifierLossFunction = "single_class" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `SINGLE_CLASS` | single_class | -| `MULTI_CLASS` | multi_class | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"single_class"` +- `"multi_class"` diff --git a/docs/models/ftmodelcard.md b/docs/models/ftmodelcard.md index 409f0526..f65ff6e8 100644 --- a/docs/models/ftmodelcard.md +++ b/docs/models/ftmodelcard.md @@ -5,21 +5,21 @@ Extra fields for fine-tuned models. ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `object` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `created` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `owned_by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `capabilities` | [models.ModelCapabilities](../models/modelcapabilities.md) | :heavy_check_mark: | N/A | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `max_context_length` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `aliases` | List[*str*] | :heavy_minus_sign: | N/A | -| `deprecation` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | -| `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `type` | *Literal["fine-tuned"]* | :heavy_check_mark: | N/A | -| `job` | *str* | :heavy_check_mark: | N/A | -| `root` | *str* | :heavy_check_mark: | N/A | -| `archived` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `object` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `created` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `owned_by` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `capabilities` | [models.ModelCapabilities](../models/modelcapabilities.md) | :heavy_check_mark: | This is populated by Harmattan, but some fields have a name
that we don't want to expose in the API. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `max_context_length` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `aliases` | List[*str*] | :heavy_minus_sign: | N/A | +| `deprecation` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `type` | *Literal["fine-tuned"]* | :heavy_check_mark: | N/A | +| `job` | *str* | :heavy_check_mark: | N/A | +| `root` | *str* | :heavy_check_mark: | N/A | +| `archived` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/functioncallentryconfirmationstatus.md b/docs/models/functioncallentryconfirmationstatus.md index 8948beb6..91231a0a 100644 --- a/docs/models/functioncallentryconfirmationstatus.md +++ b/docs/models/functioncallentryconfirmationstatus.md @@ -1,10 +1,19 @@ # FunctionCallEntryConfirmationStatus +## Example Usage + +```python +from mistralai.client.models import FunctionCallEntryConfirmationStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FunctionCallEntryConfirmationStatus = "pending" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `PENDING` | pending | -| `ALLOWED` | allowed | -| `DENIED` | denied | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pending"` +- `"allowed"` +- `"denied"` diff --git a/docs/models/functioncalleventconfirmationstatus.md b/docs/models/functioncalleventconfirmationstatus.md index 4a3c8774..95bebe96 100644 --- a/docs/models/functioncalleventconfirmationstatus.md +++ b/docs/models/functioncalleventconfirmationstatus.md @@ -1,10 +1,19 @@ # FunctionCallEventConfirmationStatus +## Example Usage + +```python +from mistralai.client.models import FunctionCallEventConfirmationStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FunctionCallEventConfirmationStatus = "pending" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `PENDING` | pending | -| `ALLOWED` | allowed | -| `DENIED` | denied | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pending"` +- `"allowed"` +- `"denied"` diff --git a/docs/models/imagedetail.md b/docs/models/imagedetail.md index 1e5ba3fd..bd7ea1fe 100644 --- a/docs/models/imagedetail.md +++ b/docs/models/imagedetail.md @@ -1,10 +1,19 @@ # ImageDetail +## Example Usage + +```python +from mistralai.client.models import ImageDetail + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ImageDetail = "low" +``` + ## Values -| Name | Value | -| ------ | ------ | -| `LOW` | low | -| `AUTO` | auto | -| `HIGH` | high | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"low"` +- `"auto"` +- `"high"` diff --git a/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md b/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md index 40d57686..1436f6ae 100644 --- a/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md +++ b/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md @@ -2,18 +2,23 @@ The current job state to filter on. When set, the other results are not displayed. +## Example Usage + +```python +from mistralai.client.models import JobsAPIRoutesFineTuningGetFineTuningJobsStatus +value: JobsAPIRoutesFineTuningGetFineTuningJobsStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/judgeoutputtype.md b/docs/models/judgeoutputtype.md index 6e9dfd72..35a1a837 100644 --- a/docs/models/judgeoutputtype.md +++ b/docs/models/judgeoutputtype.md @@ -1,9 +1,14 @@ # JudgeOutputType +## Example Usage + +```python +from mistralai.client.models import JudgeOutputType +value: JudgeOutputType = "REGRESSION" +``` + ## Values -| Name | Value | -| ---------------- | ---------------- | -| `REGRESSION` | REGRESSION | -| `CLASSIFICATION` | CLASSIFICATION | \ No newline at end of file +- `"REGRESSION"` +- `"CLASSIFICATION"` diff --git a/docs/models/mistralpromptmode.md b/docs/models/mistralpromptmode.md index c3409d03..9b234e3e 100644 --- a/docs/models/mistralpromptmode.md +++ b/docs/models/mistralpromptmode.md @@ -4,9 +4,18 @@ Available options to the prompt_mode argument on the chat completion endpoint. Values represent high-level intent. Assignment to actual SPs is handled internally. System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelines, etc. +## Example Usage + +```python +from mistralai.client.models import MistralPromptMode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MistralPromptMode = "reasoning" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `REASONING` | reasoning | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"reasoning"` diff --git a/docs/models/modelcapabilities.md b/docs/models/modelcapabilities.md index c7dd2710..7ff789ed 100644 --- a/docs/models/modelcapabilities.md +++ b/docs/models/modelcapabilities.md @@ -1,17 +1,22 @@ # ModelCapabilities +This is populated by Harmattan, but some fields have a name +that we don't want to expose in the API. + ## Fields -| Field | Type | Required | Description | -| --------------------- | --------------------- | --------------------- | --------------------- | -| `completion_chat` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `function_calling` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `completion_fim` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `fine_tuning` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `vision` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `ocr` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `classification` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `moderation` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `audio` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `audio_transcription` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `completion_chat` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `function_calling` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `completion_fim` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `fine_tuning` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `vision` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `ocr` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `classification` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `moderation` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `audio` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `audio_transcription` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `audio_transcription_realtime` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `audio_speech` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/moderationllmaction.md b/docs/models/moderationllmaction.md index 951880b6..e46a30b4 100644 --- a/docs/models/moderationllmaction.md +++ b/docs/models/moderationllmaction.md @@ -1,9 +1,18 @@ # ModerationLLMAction +## Example Usage + +```python +from mistralai.client.models import ModerationLLMAction + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ModerationLLMAction = "none" +``` + ## Values -| Name | Value | -| ------- | ------- | -| `NONE` | none | -| `BLOCK` | block | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"none"` +- `"block"` diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index 0c387f57..d121b264 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -1,50 +1,59 @@ # ObservabilityErrorCode +## Example Usage + +```python +from mistralai.client.models import ObservabilityErrorCode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ObservabilityErrorCode = "UNKNOWN_ERROR" +``` + ## Values -| Name | Value | -| ---------------------------------------------- | ---------------------------------------------- | -| `UNKNOWN_ERROR` | UNKNOWN_ERROR | -| `VALIDATION_ERROR` | VALIDATION_ERROR | -| `AUTH_FORBIDDEN` | AUTH_FORBIDDEN | -| `AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN` | AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN | -| `AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND` | AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND | -| `AUTH_FORBIDDEN_ROLE_NOT_FOUND` | AUTH_FORBIDDEN_ROLE_NOT_FOUND | -| `AUTH_FORBIDDEN_ORG_NOT_WHITELISTED` | AUTH_FORBIDDEN_ORG_NOT_WHITELISTED | -| `AUTH_UNAUTHORIZED` | AUTH_UNAUTHORIZED | -| `FEATURE_NOT_SUPPORTED` | FEATURE_NOT_SUPPORTED | -| `FIELDS_BAD_REQUEST` | FIELDS_BAD_REQUEST | -| `FIELDS_NOT_FOUND` | FIELDS_NOT_FOUND | -| `SEARCH_NOT_FOUND` | SEARCH_NOT_FOUND | -| `SEARCH_BAD_REQUEST` | SEARCH_BAD_REQUEST | -| `SEARCH_SERVICE_UNAVAILABLE` | SEARCH_SERVICE_UNAVAILABLE | -| `DATABASE_ERROR` | DATABASE_ERROR | -| `DATABASE_TIMEOUT` | DATABASE_TIMEOUT | -| `DATABASE_UNAVAILABLE` | DATABASE_UNAVAILABLE | -| `DATABASE_QUERY_ERROR` | DATABASE_QUERY_ERROR | -| `SEARCH_FILTER_TO_SQL_CONVERSION_ERROR` | SEARCH_FILTER_TO_SQL_CONVERSION_ERROR | -| `JUDGE_CONVERSATION_FORMAT_ERROR` | JUDGE_CONVERSATION_FORMAT_ERROR | -| `JUDGE_MISTRAL_API_ERROR` | JUDGE_MISTRAL_API_ERROR | -| `JUDGE_MISTRAL_API_TIMEOUT` | JUDGE_MISTRAL_API_TIMEOUT | -| `JUDGE_NAME_ALREADY_EXISTS` | JUDGE_NAME_ALREADY_EXISTS | -| `JUDGE_NOT_FOUND` | JUDGE_NOT_FOUND | -| `JUDGE_ALREADY_HAS_NEW_VERSION` | JUDGE_ALREADY_HAS_NEW_VERSION | -| `JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED` | JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED | -| `JUDGE_DID_NOT_CHANGE` | JUDGE_DID_NOT_CHANGE | -| `CAMPAIGN_NOT_FOUND` | CAMPAIGN_NOT_FOUND | -| `CAMPAIGN_NO_MATCHING_EVENTS` | CAMPAIGN_NO_MATCHING_EVENTS | -| `DATASET_NOT_FOUND` | DATASET_NOT_FOUND | -| `DATASET_TASK_NOT_FOUND` | DATASET_TASK_NOT_FOUND | -| `DATASET_RECORD_NOT_FOUND` | DATASET_RECORD_NOT_FOUND | -| `DATASET_RECORD_FORMAT_ERROR` | DATASET_RECORD_FORMAT_ERROR | -| `AGENT_NOT_FOUND` | AGENT_NOT_FOUND | -| `AGENT_MISTRAL_API_ERROR` | AGENT_MISTRAL_API_ERROR | -| `EVALUATION_NOT_FOUND` | EVALUATION_NOT_FOUND | -| `EVALUATION_CURRENTLY_RUNNING` | EVALUATION_CURRENTLY_RUNNING | -| `EVALUATION_RECORD_NOT_FOUND` | EVALUATION_RECORD_NOT_FOUND | -| `EVALUATION_RUN_NOT_FOUND` | EVALUATION_RUN_NOT_FOUND | -| `EVALUATION_RUN_TRANSITION_IS_INVALID` | EVALUATION_RUN_TRANSITION_IS_INVALID | -| `EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY` | EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY | -| `EVALUATION_RUN_TRANSITION_ERROR` | EVALUATION_RUN_TRANSITION_ERROR | -| `TEMPLATE_SYNTAX_ERROR` | TEMPLATE_SYNTAX_ERROR | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"UNKNOWN_ERROR"` +- `"VALIDATION_ERROR"` +- `"AUTH_FORBIDDEN"` +- `"AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN"` +- `"AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND"` +- `"AUTH_FORBIDDEN_ROLE_NOT_FOUND"` +- `"AUTH_FORBIDDEN_ORG_NOT_WHITELISTED"` +- `"AUTH_UNAUTHORIZED"` +- `"FEATURE_NOT_SUPPORTED"` +- `"FIELDS_BAD_REQUEST"` +- `"FIELDS_NOT_FOUND"` +- `"SEARCH_NOT_FOUND"` +- `"SEARCH_BAD_REQUEST"` +- `"SEARCH_SERVICE_UNAVAILABLE"` +- `"DATABASE_ERROR"` +- `"DATABASE_TIMEOUT"` +- `"DATABASE_UNAVAILABLE"` +- `"DATABASE_QUERY_ERROR"` +- `"SEARCH_FILTER_TO_SQL_CONVERSION_ERROR"` +- `"JUDGE_CONVERSATION_FORMAT_ERROR"` +- `"JUDGE_MISTRAL_API_ERROR"` +- `"JUDGE_MISTRAL_API_TIMEOUT"` +- `"JUDGE_NAME_ALREADY_EXISTS"` +- `"JUDGE_NOT_FOUND"` +- `"JUDGE_ALREADY_HAS_NEW_VERSION"` +- `"JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED"` +- `"JUDGE_DID_NOT_CHANGE"` +- `"CAMPAIGN_NOT_FOUND"` +- `"CAMPAIGN_NO_MATCHING_EVENTS"` +- `"DATASET_NOT_FOUND"` +- `"DATASET_TASK_NOT_FOUND"` +- `"DATASET_RECORD_NOT_FOUND"` +- `"DATASET_RECORD_FORMAT_ERROR"` +- `"AGENT_NOT_FOUND"` +- `"AGENT_MISTRAL_API_ERROR"` +- `"EVALUATION_NOT_FOUND"` +- `"EVALUATION_CURRENTLY_RUNNING"` +- `"EVALUATION_RECORD_NOT_FOUND"` +- `"EVALUATION_RUN_NOT_FOUND"` +- `"EVALUATION_RUN_TRANSITION_IS_INVALID"` +- `"EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY"` +- `"EVALUATION_RUN_TRANSITION_ERROR"` +- `"TEMPLATE_SYNTAX_ERROR"` diff --git a/docs/models/op.md b/docs/models/op.md index fa3e2f3a..da9031db 100644 --- a/docs/models/op.md +++ b/docs/models/op.md @@ -1,26 +1,35 @@ # Op +## Example Usage + +```python +from mistralai.client.models import Op + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Op = "lt" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `LT` | lt | -| `LTE` | lte | -| `GT` | gt | -| `GTE` | gte | -| `STARTSWITH` | startswith | -| `ISTARTSWITH` | istartswith | -| `ENDSWITH` | endswith | -| `IENDSWITH` | iendswith | -| `CONTAINS` | contains | -| `ICONTAINS` | icontains | -| `MATCHES` | matches | -| `NOTCONTAINS` | notcontains | -| `INOTCONTAINS` | inotcontains | -| `EQ` | eq | -| `NEQ` | neq | -| `ISNULL` | isnull | -| `INCLUDES` | includes | -| `EXCLUDES` | excludes | -| `LEN_EQ` | len_eq | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"lt"` +- `"lte"` +- `"gt"` +- `"gte"` +- `"startswith"` +- `"istartswith"` +- `"endswith"` +- `"iendswith"` +- `"contains"` +- `"icontains"` +- `"matches"` +- `"notcontains"` +- `"inotcontains"` +- `"eq"` +- `"neq"` +- `"isnull"` +- `"includes"` +- `"excludes"` +- `"len_eq"` diff --git a/docs/models/operator.md b/docs/models/operator.md index ca54debc..2790c574 100644 --- a/docs/models/operator.md +++ b/docs/models/operator.md @@ -2,27 +2,32 @@ The operator to use for filtering options +## Example Usage + +```python +from mistralai.client.models import Operator +value: Operator = "lt" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `LT` | lt | -| `LTE` | lte | -| `GT` | gt | -| `GTE` | gte | -| `STARTSWITH` | startswith | -| `ISTARTSWITH` | istartswith | -| `ENDSWITH` | endswith | -| `IENDSWITH` | iendswith | -| `CONTAINS` | contains | -| `ICONTAINS` | icontains | -| `MATCHES` | matches | -| `NOTCONTAINS` | notcontains | -| `INOTCONTAINS` | inotcontains | -| `EQ` | eq | -| `NEQ` | neq | -| `ISNULL` | isnull | -| `INCLUDES` | includes | -| `EXCLUDES` | excludes | -| `LEN_EQ` | len_eq | \ No newline at end of file +- `"lt"` +- `"lte"` +- `"gt"` +- `"gte"` +- `"startswith"` +- `"istartswith"` +- `"endswith"` +- `"iendswith"` +- `"contains"` +- `"icontains"` +- `"matches"` +- `"notcontains"` +- `"inotcontains"` +- `"eq"` +- `"neq"` +- `"isnull"` +- `"includes"` +- `"excludes"` +- `"len_eq"` diff --git a/docs/models/orderby.md b/docs/models/orderby.md index bba50df1..d778621f 100644 --- a/docs/models/orderby.md +++ b/docs/models/orderby.md @@ -1,9 +1,14 @@ # OrderBy +## Example Usage + +```python +from mistralai.client.models import OrderBy +value: OrderBy = "created" +``` + ## Values -| Name | Value | -| --------------- | --------------- | -| `CREATED` | created | -| `MINUS_CREATED` | -created | \ No newline at end of file +- `"created"` +- `"-created"` diff --git a/docs/models/processstatus.md b/docs/models/processstatus.md index 3a9c004e..68313743 100644 --- a/docs/models/processstatus.md +++ b/docs/models/processstatus.md @@ -1,15 +1,24 @@ # ProcessStatus +## Example Usage + +```python +from mistralai.client.models import ProcessStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ProcessStatus = "self_managed" +``` + ## Values -| Name | Value | -| ---------------------- | ---------------------- | -| `SELF_MANAGED` | self_managed | -| `MISSING_CONTENT` | missing_content | -| `NOOP` | noop | -| `DONE` | done | -| `TODO` | todo | -| `IN_PROGRESS` | in_progress | -| `ERROR` | error | -| `WAITING_FOR_CAPACITY` | waiting_for_capacity | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"self_managed"` +- `"missing_content"` +- `"noop"` +- `"done"` +- `"todo"` +- `"in_progress"` +- `"error"` +- `"waiting_for_capacity"` diff --git a/docs/models/referencechunk.md b/docs/models/referencechunk.md index d847e248..0186d3c3 100644 --- a/docs/models/referencechunk.md +++ b/docs/models/referencechunk.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `type` | *Optional[Literal["reference"]]* | :heavy_minus_sign: | N/A | -| `reference_ids` | List[*int*] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *Optional[Literal["reference"]]* | :heavy_minus_sign: | N/A | +| `reference_ids` | List[[models.ReferenceID](../models/referenceid.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/referenceid.md b/docs/models/referenceid.md new file mode 100644 index 00000000..f9769645 --- /dev/null +++ b/docs/models/referenceid.md @@ -0,0 +1,17 @@ +# ReferenceID + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + diff --git a/docs/models/requestsource.md b/docs/models/requestsource.md index c81c1159..b710cc1f 100644 --- a/docs/models/requestsource.md +++ b/docs/models/requestsource.md @@ -1,10 +1,15 @@ # RequestSource +## Example Usage + +```python +from mistralai.client.models import RequestSource +value: RequestSource = "api" +``` + ## Values -| Name | Value | -| ------------------ | ------------------ | -| `API` | api | -| `PLAYGROUND` | playground | -| `AGENT_BUILDER_V1` | agent_builder_v1 | \ No newline at end of file +- `"api"` +- `"playground"` +- `"agent_builder_v1"` diff --git a/docs/models/resourcevisibility.md b/docs/models/resourcevisibility.md index 9c06af2d..970211bb 100644 --- a/docs/models/resourcevisibility.md +++ b/docs/models/resourcevisibility.md @@ -1,11 +1,20 @@ # ResourceVisibility +## Example Usage + +```python +from mistralai.client.models import ResourceVisibility + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ResourceVisibility = "shared_global" +``` + ## Values -| Name | Value | -| ------------------ | ------------------ | -| `SHARED_GLOBAL` | shared_global | -| `SHARED_ORG` | shared_org | -| `SHARED_WORKSPACE` | shared_workspace | -| `PRIVATE` | private | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"shared_global"` +- `"shared_org"` +- `"shared_workspace"` +- `"private"` diff --git a/docs/models/responseformats.md b/docs/models/responseformats.md index 2f5f1e55..12e5edd7 100644 --- a/docs/models/responseformats.md +++ b/docs/models/responseformats.md @@ -1,10 +1,19 @@ # ResponseFormats +## Example Usage + +```python +from mistralai.client.models import ResponseFormats + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ResponseFormats = "text" +``` + ## Values -| Name | Value | -| ------------- | ------------- | -| `TEXT` | text | -| `JSON_OBJECT` | json_object | -| `JSON_SCHEMA` | json_schema | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"text"` +- `"json_object"` +- `"json_schema"` diff --git a/docs/models/role.md b/docs/models/role.md index 853c6257..b16f5c3b 100644 --- a/docs/models/role.md +++ b/docs/models/role.md @@ -1,9 +1,18 @@ # Role +## Example Usage + +```python +from mistralai.client.models import Role + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Role = "assistant" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `ASSISTANT` | assistant | -| `USER` | user | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"assistant"` +- `"user"` diff --git a/docs/models/sampletype.md b/docs/models/sampletype.md index 34a6a012..31f26c3c 100644 --- a/docs/models/sampletype.md +++ b/docs/models/sampletype.md @@ -1,12 +1,21 @@ # SampleType +## Example Usage + +```python +from mistralai.client.models import SampleType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SampleType = "pretrain" +``` + ## Values -| Name | Value | -| --------------- | --------------- | -| `PRETRAIN` | pretrain | -| `INSTRUCT` | instruct | -| `BATCH_REQUEST` | batch_request | -| `BATCH_RESULT` | batch_result | -| `BATCH_ERROR` | batch_error | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pretrain"` +- `"instruct"` +- `"batch_request"` +- `"batch_result"` +- `"batch_error"` diff --git a/docs/models/shareenum.md b/docs/models/shareenum.md index dc5d2b68..d471b7c3 100644 --- a/docs/models/shareenum.md +++ b/docs/models/shareenum.md @@ -1,9 +1,18 @@ # ShareEnum +## Example Usage + +```python +from mistralai.client.models import ShareEnum + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ShareEnum = "Viewer" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `VIEWER` | Viewer | -| `EDITOR` | Editor | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"Viewer"` +- `"Editor"` diff --git a/docs/models/source.md b/docs/models/source.md index bb1ed612..37ca338b 100644 --- a/docs/models/source.md +++ b/docs/models/source.md @@ -1,10 +1,19 @@ # Source +## Example Usage + +```python +from mistralai.client.models import Source + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Source = "upload" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `UPLOAD` | upload | -| `REPOSITORY` | repository | -| `MISTRAL` | mistral | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"upload"` +- `"repository"` +- `"mistral"` diff --git a/docs/models/ssetypes.md b/docs/models/ssetypes.md index ae06b5e8..372eafee 100644 --- a/docs/models/ssetypes.md +++ b/docs/models/ssetypes.md @@ -2,18 +2,27 @@ Server side events sent when streaming a conversation response. +## Example Usage + +```python +from mistralai.client.models import SSETypes + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SSETypes = "conversation.response.started" +``` + ## Values -| Name | Value | -| ------------------------------- | ------------------------------- | -| `CONVERSATION_RESPONSE_STARTED` | conversation.response.started | -| `CONVERSATION_RESPONSE_DONE` | conversation.response.done | -| `CONVERSATION_RESPONSE_ERROR` | conversation.response.error | -| `MESSAGE_OUTPUT_DELTA` | message.output.delta | -| `TOOL_EXECUTION_STARTED` | tool.execution.started | -| `TOOL_EXECUTION_DELTA` | tool.execution.delta | -| `TOOL_EXECUTION_DONE` | tool.execution.done | -| `AGENT_HANDOFF_STARTED` | agent.handoff.started | -| `AGENT_HANDOFF_DONE` | agent.handoff.done | -| `FUNCTION_CALL_DELTA` | function.call.delta | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"conversation.response.started"` +- `"conversation.response.done"` +- `"conversation.response.error"` +- `"message.output.delta"` +- `"tool.execution.started"` +- `"tool.execution.delta"` +- `"tool.execution.done"` +- `"agent.handoff.started"` +- `"agent.handoff.done"` +- `"function.call.delta"` diff --git a/docs/models/supportedoperator.md b/docs/models/supportedoperator.md index 74cf9b8e..97dbd4b1 100644 --- a/docs/models/supportedoperator.md +++ b/docs/models/supportedoperator.md @@ -1,26 +1,35 @@ # SupportedOperator +## Example Usage + +```python +from mistralai.client.models import SupportedOperator + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SupportedOperator = "lt" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `LT` | lt | -| `LTE` | lte | -| `GT` | gt | -| `GTE` | gte | -| `STARTSWITH` | startswith | -| `ISTARTSWITH` | istartswith | -| `ENDSWITH` | endswith | -| `IENDSWITH` | iendswith | -| `CONTAINS` | contains | -| `ICONTAINS` | icontains | -| `MATCHES` | matches | -| `NOTCONTAINS` | notcontains | -| `INOTCONTAINS` | inotcontains | -| `EQ` | eq | -| `NEQ` | neq | -| `ISNULL` | isnull | -| `INCLUDES` | includes | -| `EXCLUDES` | excludes | -| `LEN_EQ` | len_eq | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"lt"` +- `"lte"` +- `"gt"` +- `"gte"` +- `"startswith"` +- `"istartswith"` +- `"endswith"` +- `"iendswith"` +- `"contains"` +- `"icontains"` +- `"matches"` +- `"notcontains"` +- `"inotcontains"` +- `"eq"` +- `"neq"` +- `"isnull"` +- `"includes"` +- `"excludes"` +- `"len_eq"` diff --git a/docs/models/tableformat.md b/docs/models/tableformat.md index 54f029b8..8321a309 100644 --- a/docs/models/tableformat.md +++ b/docs/models/tableformat.md @@ -1,9 +1,14 @@ # TableFormat +## Example Usage + +```python +from mistralai.client.models import TableFormat +value: TableFormat = "markdown" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `MARKDOWN` | markdown | -| `HTML` | html | \ No newline at end of file +- `"markdown"` +- `"html"` diff --git a/docs/models/timestampgranularity.md b/docs/models/timestampgranularity.md index d20012ea..4c84779c 100644 --- a/docs/models/timestampgranularity.md +++ b/docs/models/timestampgranularity.md @@ -1,9 +1,14 @@ # TimestampGranularity +## Example Usage + +```python +from mistralai.client.models import TimestampGranularity +value: TimestampGranularity = "segment" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `SEGMENT` | segment | -| `WORD` | word | \ No newline at end of file +- `"segment"` +- `"word"` diff --git a/docs/models/toolchoiceenum.md b/docs/models/toolchoiceenum.md index 0be3d6c5..eb1f3629 100644 --- a/docs/models/toolchoiceenum.md +++ b/docs/models/toolchoiceenum.md @@ -1,11 +1,20 @@ # ToolChoiceEnum +## Example Usage + +```python +from mistralai.client.models import ToolChoiceEnum + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ToolChoiceEnum = "auto" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `AUTO` | auto | -| `NONE` | none | -| `ANY` | any | -| `REQUIRED` | required | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"auto"` +- `"none"` +- `"any"` +- `"required"` diff --git a/docs/models/tooltypes.md b/docs/models/tooltypes.md index 84e49253..345ee7dc 100644 --- a/docs/models/tooltypes.md +++ b/docs/models/tooltypes.md @@ -1,8 +1,17 @@ # ToolTypes +## Example Usage + +```python +from mistralai.client.models import ToolTypes + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ToolTypes = "function" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"function"` diff --git a/docs/models/transcriptionstreameventtypes.md b/docs/models/transcriptionstreameventtypes.md index e4eb25a6..9e49384e 100644 --- a/docs/models/transcriptionstreameventtypes.md +++ b/docs/models/transcriptionstreameventtypes.md @@ -1,11 +1,20 @@ # TranscriptionStreamEventTypes +## Example Usage + +```python +from mistralai.client.models import TranscriptionStreamEventTypes + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TranscriptionStreamEventTypes = "transcription.language" +``` + ## Values -| Name | Value | -| -------------------------- | -------------------------- | -| `TRANSCRIPTION_LANGUAGE` | transcription.language | -| `TRANSCRIPTION_SEGMENT` | transcription.segment | -| `TRANSCRIPTION_TEXT_DELTA` | transcription.text.delta | -| `TRANSCRIPTION_DONE` | transcription.done | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"transcription.language"` +- `"transcription.segment"` +- `"transcription.text.delta"` +- `"transcription.done"` diff --git a/docs/models/typeenum.md b/docs/models/typeenum.md index 80a66af3..ec47cf96 100644 --- a/docs/models/typeenum.md +++ b/docs/models/typeenum.md @@ -1,14 +1,23 @@ # TypeEnum +## Example Usage + +```python +from mistralai.client.models import TypeEnum + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TypeEnum = "ENUM" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `ENUM` | ENUM | -| `TEXT` | TEXT | -| `INT` | INT | -| `FLOAT` | FLOAT | -| `BOOL` | BOOL | -| `TIMESTAMP` | TIMESTAMP | -| `ARRAY` | ARRAY | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"ENUM"` +- `"TEXT"` +- `"INT"` +- `"FLOAT"` +- `"BOOL"` +- `"TIMESTAMP"` +- `"ARRAY"` diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 12d94765..e6c73e23 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -34,7 +34,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.start(inputs="", stream=False, completion_args={ + res = mistral.beta.conversations.start(inputs="", completion_args={ "response_format": { "type": "text", }, @@ -50,7 +50,6 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -212,7 +211,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.append(conversation_id="", stream=False, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.append(conversation_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -229,7 +228,6 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `conversation_id` | *str* | :heavy_check_mark: | ID of the conversation to which we append entries. | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendRequestHandoffExecution]](../../models/conversationappendrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -345,7 +343,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.restart(conversation_id="", from_entry_id="", stream=False, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.restart(conversation_id="", from_entry_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -363,7 +361,6 @@ with Mistral( | `conversation_id` | *str* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -406,7 +403,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], stream=True, completion_args={ + ], completion_args={ "response_format": { "type": "text", }, @@ -424,7 +421,6 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -466,7 +462,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.append_stream(conversation_id="", stream=True, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.append_stream(conversation_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -485,7 +481,6 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `conversation_id` | *str* | :heavy_check_mark: | ID of the conversation to which we append entries. | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendStreamRequestHandoffExecution]](../../models/conversationappendstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -519,7 +514,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.restart_stream(conversation_id="", from_entry_id="", stream=True, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.restart_stream(conversation_id="", from_entry_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -539,7 +534,6 @@ with Mistral( | `conversation_id` | *str* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/pyproject.toml b/pyproject.toml index 59922b83..b81833ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.2" +version = "2.0.3" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 131837b2..4531730b 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.2" +__version__: str = "2.0.3" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.2 2.841.0 1.0.0 mistralai" +__gen_version__: str = "2.862.0" +__user_agent__: str = "speakeasy-sdk/python 2.0.3 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 99f3a33e..fafcd5f5 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -229,7 +229,6 @@ def start( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = False, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationRequestHandoffExecution @@ -268,7 +267,6 @@ def start( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -298,7 +296,6 @@ def start( request = models.ConversationRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -383,7 +380,6 @@ async def start_async( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = False, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationRequestHandoffExecution @@ -422,7 +418,6 @@ async def start_async( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -452,7 +447,6 @@ async def start_async( request = models.ConversationRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -1096,7 +1090,6 @@ def append( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendRequestHandoffExecution @@ -1121,7 +1114,6 @@ def append( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1147,7 +1139,6 @@ def append( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1231,7 +1222,6 @@ async def append_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendRequestHandoffExecution @@ -1256,7 +1246,6 @@ async def append_async( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1282,7 +1271,6 @@ async def append_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1727,7 +1715,6 @@ def restart( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartRequestHandoffExecution @@ -1757,7 +1744,6 @@ def restart( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1785,7 +1771,6 @@ def restart( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1872,7 +1857,6 @@ async def restart_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartRequestHandoffExecution @@ -1902,7 +1886,6 @@ async def restart_async( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1930,7 +1913,6 @@ async def restart_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2013,7 +1995,6 @@ def start_stream( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = True, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationStreamRequestHandoffExecution @@ -2052,7 +2033,6 @@ def start_stream( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -2082,7 +2062,6 @@ def start_stream( request = models.ConversationStreamRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -2174,7 +2153,6 @@ async def start_stream_async( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = True, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationStreamRequestHandoffExecution @@ -2213,7 +2191,6 @@ async def start_stream_async( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -2243,7 +2220,6 @@ async def start_stream_async( request = models.ConversationStreamRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -2338,7 +2314,6 @@ def append_stream( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendStreamRequestHandoffExecution @@ -2363,7 +2338,6 @@ def append_stream( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2389,7 +2363,6 @@ def append_stream( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2480,7 +2453,6 @@ async def append_stream_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendStreamRequestHandoffExecution @@ -2505,7 +2477,6 @@ async def append_stream_async( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2531,7 +2502,6 @@ async def append_stream_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2623,7 +2593,6 @@ def restart_stream( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartStreamRequestHandoffExecution @@ -2653,7 +2622,6 @@ def restart_stream( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2681,7 +2649,6 @@ def restart_stream( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2775,7 +2742,6 @@ async def restart_stream_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartStreamRequestHandoffExecution @@ -2805,7 +2771,6 @@ async def restart_stream_async( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2833,7 +2798,6 @@ async def restart_stream_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 7b5eb343..361b16a9 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -1198,7 +1198,12 @@ RealtimeTranscriptionSessionUpdatePayload, RealtimeTranscriptionSessionUpdatePayloadTypedDict, ) - from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict + from .referencechunk import ( + ReferenceChunk, + ReferenceChunkTypedDict, + ReferenceID, + ReferenceIDTypedDict, + ) from .requestsource import RequestSource from .resourcelink import ResourceLink, ResourceLinkTypedDict from .resourcevisibility import ResourceVisibility @@ -2249,6 +2254,8 @@ "RealtimeTranscriptionSessionUpdatedTypedDict", "ReferenceChunk", "ReferenceChunkTypedDict", + "ReferenceID", + "ReferenceIDTypedDict", "RequestSource", "Resource", "ResourceLink", @@ -3275,6 +3282,8 @@ "RealtimeTranscriptionSessionUpdatePayloadTypedDict": ".realtimetranscriptionsessionupdatepayload", "ReferenceChunk": ".referencechunk", "ReferenceChunkTypedDict": ".referencechunk", + "ReferenceID": ".referencechunk", + "ReferenceIDTypedDict": ".referencechunk", "RequestSource": ".requestsource", "ResourceLink": ".resourcelink", "ResourceLinkTypedDict": ".resourcelink", diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 068b3226..36cb26bf 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -184,7 +184,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentconversation.py b/src/mistralai/client/models/agentconversation.py index da30c663..b52f5e5a 100644 --- a/src/mistralai/client/models/agentconversation.py +++ b/src/mistralai/client/models/agentconversation.py @@ -82,7 +82,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agenthandoffdoneevent.py b/src/mistralai/client/models/agenthandoffdoneevent.py index e2609e3d..ea9cd6b2 100644 --- a/src/mistralai/client/models/agenthandoffdoneevent.py +++ b/src/mistralai/client/models/agenthandoffdoneevent.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agenthandoffentry.py b/src/mistralai/client/models/agenthandoffentry.py index f92ef2cc..8d1c143e 100644 --- a/src/mistralai/client/models/agenthandoffentry.py +++ b/src/mistralai/client/models/agenthandoffentry.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agenthandoffstartedevent.py b/src/mistralai/client/models/agenthandoffstartedevent.py index 2a402341..9525bcf6 100644 --- a/src/mistralai/client/models/agenthandoffstartedevent.py +++ b/src/mistralai/client/models/agenthandoffstartedevent.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agents_api_v1_agents_getop.py b/src/mistralai/client/models/agents_api_v1_agents_getop.py index dd17580d..dee6a347 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_getop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_getop.py @@ -49,7 +49,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py b/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py index 54b62e90..25ea29e3 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agents_api_v1_agents_listop.py b/src/mistralai/client/models/agents_api_v1_agents_listop.py index 97b1c7f1..100e0da7 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_listop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_listop.py @@ -98,7 +98,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agents_api_v1_conversations_listop.py b/src/mistralai/client/models/agents_api_v1_conversations_listop.py index 8bf66aea..dd6276d9 100644 --- a/src/mistralai/client/models/agents_api_v1_conversations_listop.py +++ b/src/mistralai/client/models/agents_api_v1_conversations_listop.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index 6955f6ac..1cff8f95 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -174,7 +174,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index c2cf3552..32f13fb1 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -172,7 +172,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/annotations.py b/src/mistralai/client/models/annotations.py index ba085e2c..f3f5c21c 100644 --- a/src/mistralai/client/models/annotations.py +++ b/src/mistralai/client/models/annotations.py @@ -57,8 +57,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/archivemodelresponse.py b/src/mistralai/client/models/archivemodelresponse.py index f1116850..c5ca8ff5 100644 --- a/src/mistralai/client/models/archivemodelresponse.py +++ b/src/mistralai/client/models/archivemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/assistantmessage.py b/src/mistralai/client/models/assistantmessage.py index 26a778c7..f333a444 100644 --- a/src/mistralai/client/models/assistantmessage.py +++ b/src/mistralai/client/models/assistantmessage.py @@ -61,7 +61,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiocontent.py b/src/mistralai/client/models/audiocontent.py index b0a9505b..2d38d2a1 100644 --- a/src/mistralai/client/models/audiocontent.py +++ b/src/mistralai/client/models/audiocontent.py @@ -68,8 +68,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiotranscriptionrequest.py b/src/mistralai/client/models/audiotranscriptionrequest.py index fe4c79e3..734860d5 100644 --- a/src/mistralai/client/models/audiotranscriptionrequest.py +++ b/src/mistralai/client/models/audiotranscriptionrequest.py @@ -94,7 +94,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiotranscriptionrequeststream.py b/src/mistralai/client/models/audiotranscriptionrequeststream.py index 2d1e9269..84c4dbcd 100644 --- a/src/mistralai/client/models/audiotranscriptionrequeststream.py +++ b/src/mistralai/client/models/audiotranscriptionrequeststream.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index f8b8faf7..b57ff2ca 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -83,7 +83,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/basemodelcard.py b/src/mistralai/client/models/basemodelcard.py index 9c9e9a20..bb3c99dd 100644 --- a/src/mistralai/client/models/basemodelcard.py +++ b/src/mistralai/client/models/basemodelcard.py @@ -22,6 +22,9 @@ class BaseModelCardTypedDict(TypedDict): id: str capabilities: ModelCapabilitiesTypedDict + r"""This is populated by Harmattan, but some fields have a name + that we don't want to expose in the API. + """ object: NotRequired[str] created: NotRequired[int] owned_by: NotRequired[str] @@ -39,6 +42,9 @@ class BaseModelCard(BaseModel): id: str capabilities: ModelCapabilities + r"""This is populated by Harmattan, but some fields have a name + that we don't want to expose in the API. + """ object: Optional[str] = "model" @@ -95,7 +101,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/batcherror.py b/src/mistralai/client/models/batcherror.py index 8a353cd2..a0add5ad 100644 --- a/src/mistralai/client/models/batcherror.py +++ b/src/mistralai/client/models/batcherror.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/batchjob.py b/src/mistralai/client/models/batchjob.py index 80acac33..9cef4380 100644 --- a/src/mistralai/client/models/batchjob.py +++ b/src/mistralai/client/models/batchjob.py @@ -115,7 +115,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/batchrequest.py b/src/mistralai/client/models/batchrequest.py index 911a9a05..dcc47bd2 100644 --- a/src/mistralai/client/models/batchrequest.py +++ b/src/mistralai/client/models/batchrequest.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/blobresourcecontents.py b/src/mistralai/client/models/blobresourcecontents.py index c2a55f95..bfae16fb 100644 --- a/src/mistralai/client/models/blobresourcecontents.py +++ b/src/mistralai/client/models/blobresourcecontents.py @@ -61,8 +61,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/campaign.py b/src/mistralai/client/models/campaign.py index a52bfcb9..62427fa0 100644 --- a/src/mistralai/client/models/campaign.py +++ b/src/mistralai/client/models/campaign.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index e871bd92..1b4bfb02 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -208,7 +208,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index b7b2bff1..75aab84c 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -206,7 +206,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classificationrequest.py b/src/mistralai/client/models/classificationrequest.py index 25b69413..4300f9ad 100644 --- a/src/mistralai/client/models/classificationrequest.py +++ b/src/mistralai/client/models/classificationrequest.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetunedmodel.py b/src/mistralai/client/models/classifierfinetunedmodel.py index fbcf5892..7c2bfc80 100644 --- a/src/mistralai/client/models/classifierfinetunedmodel.py +++ b/src/mistralai/client/models/classifierfinetunedmodel.py @@ -94,7 +94,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetuningjob.py b/src/mistralai/client/models/classifierfinetuningjob.py index fb160cf8..5a5f8a48 100644 --- a/src/mistralai/client/models/classifierfinetuningjob.py +++ b/src/mistralai/client/models/classifierfinetuningjob.py @@ -178,7 +178,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetuningjobdetails.py b/src/mistralai/client/models/classifierfinetuningjobdetails.py index 5d73f55e..dcdd62b3 100644 --- a/src/mistralai/client/models/classifierfinetuningjobdetails.py +++ b/src/mistralai/client/models/classifierfinetuningjobdetails.py @@ -174,7 +174,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifiertarget.py b/src/mistralai/client/models/classifiertarget.py index 4d66d789..bfd5646e 100644 --- a/src/mistralai/client/models/classifiertarget.py +++ b/src/mistralai/client/models/classifiertarget.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifiertrainingparameters.py b/src/mistralai/client/models/classifiertrainingparameters.py index 14fa4926..3a9576c8 100644 --- a/src/mistralai/client/models/classifiertrainingparameters.py +++ b/src/mistralai/client/models/classifiertrainingparameters.py @@ -56,7 +56,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/codeinterpretertool.py b/src/mistralai/client/models/codeinterpretertool.py index ce14265f..4cf9d055 100644 --- a/src/mistralai/client/models/codeinterpretertool.py +++ b/src/mistralai/client/models/codeinterpretertool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionargs.py b/src/mistralai/client/models/completionargs.py index ab5cf5ff..76c4cf98 100644 --- a/src/mistralai/client/models/completionargs.py +++ b/src/mistralai/client/models/completionargs.py @@ -90,7 +90,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionchunk.py b/src/mistralai/client/models/completionchunk.py index 5fd6c173..27029b6f 100644 --- a/src/mistralai/client/models/completionchunk.py +++ b/src/mistralai/client/models/completionchunk.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/completionfinetunedmodel.py b/src/mistralai/client/models/completionfinetunedmodel.py index 54a1c165..e75b8d2f 100644 --- a/src/mistralai/client/models/completionfinetunedmodel.py +++ b/src/mistralai/client/models/completionfinetunedmodel.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionfinetuningjob.py b/src/mistralai/client/models/completionfinetuningjob.py index 1bf0a730..bbcf7732 100644 --- a/src/mistralai/client/models/completionfinetuningjob.py +++ b/src/mistralai/client/models/completionfinetuningjob.py @@ -204,7 +204,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionfinetuningjobdetails.py b/src/mistralai/client/models/completionfinetuningjobdetails.py index cb787021..8aa8b75d 100644 --- a/src/mistralai/client/models/completionfinetuningjobdetails.py +++ b/src/mistralai/client/models/completionfinetuningjobdetails.py @@ -193,7 +193,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionresponsestreamchoice.py b/src/mistralai/client/models/completionresponsestreamchoice.py index a52ae892..ef1a106b 100644 --- a/src/mistralai/client/models/completionresponsestreamchoice.py +++ b/src/mistralai/client/models/completionresponsestreamchoice.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/completiontrainingparameters.py b/src/mistralai/client/models/completiontrainingparameters.py index ca50a7ad..b91ec9df 100644 --- a/src/mistralai/client/models/completiontrainingparameters.py +++ b/src/mistralai/client/models/completiontrainingparameters.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py index 967e454f..55730274 100644 --- a/src/mistralai/client/models/connector.py +++ b/src/mistralai/client/models/connector.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connector_get_v1op.py b/src/mistralai/client/models/connector_get_v1op.py index 5770ee09..780afac9 100644 --- a/src/mistralai/client/models/connector_get_v1op.py +++ b/src/mistralai/client/models/connector_get_v1op.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/connector_list_v1op.py b/src/mistralai/client/models/connector_list_v1op.py index a89da710..3cb31bf7 100644 --- a/src/mistralai/client/models/connector_list_v1op.py +++ b/src/mistralai/client/models/connector_list_v1op.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectorcalltoolrequest.py b/src/mistralai/client/models/connectorcalltoolrequest.py index 4e9a4d45..85366bb6 100644 --- a/src/mistralai/client/models/connectorcalltoolrequest.py +++ b/src/mistralai/client/models/connectorcalltoolrequest.py @@ -27,7 +27,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/connectorsqueryfilters.py b/src/mistralai/client/models/connectorsqueryfilters.py index 1aea18b0..f10d6897 100644 --- a/src/mistralai/client/models/connectorsqueryfilters.py +++ b/src/mistralai/client/models/connectorsqueryfilters.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortool.py b/src/mistralai/client/models/connectortool.py index 26a8b7b7..e8a036c7 100644 --- a/src/mistralai/client/models/connectortool.py +++ b/src/mistralai/client/models/connectortool.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolcallmetadata.py b/src/mistralai/client/models/connectortoolcallmetadata.py index 9f3be6c4..0280eae0 100644 --- a/src/mistralai/client/models/connectortoolcallmetadata.py +++ b/src/mistralai/client/models/connectortoolcallmetadata.py @@ -60,8 +60,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolcallresponse.py b/src/mistralai/client/models/connectortoolcallresponse.py index 47071a94..76abe558 100644 --- a/src/mistralai/client/models/connectortoolcallresponse.py +++ b/src/mistralai/client/models/connectortoolcallresponse.py @@ -129,8 +129,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolresultmetadata.py b/src/mistralai/client/models/connectortoolresultmetadata.py index 520fb99b..8c92f2f8 100644 --- a/src/mistralai/client/models/connectortoolresultmetadata.py +++ b/src/mistralai/client/models/connectortoolresultmetadata.py @@ -58,8 +58,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/conversationappendrequest.py b/src/mistralai/client/models/conversationappendrequest.py index 386714fd..6d310816 100644 --- a/src/mistralai/client/models/conversationappendrequest.py +++ b/src/mistralai/client/models/conversationappendrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict ConversationAppendRequestHandoffExecution = Literal[ @@ -25,7 +28,7 @@ class ConversationAppendRequestTypedDict(TypedDict): inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[False] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationAppendRequestHandoffExecution] @@ -37,7 +40,10 @@ class ConversationAppendRequestTypedDict(TypedDict): class ConversationAppendRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = False + stream: Annotated[ + Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], + pydantic.Field(alias="stream"), + ] = False store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -67,7 +73,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -82,3 +88,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationAppendRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationappendstreamrequest.py b/src/mistralai/client/models/conversationappendstreamrequest.py index 32f6b148..b65f1e82 100644 --- a/src/mistralai/client/models/conversationappendstreamrequest.py +++ b/src/mistralai/client/models/conversationappendstreamrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict ConversationAppendStreamRequestHandoffExecution = Literal[ @@ -25,7 +28,7 @@ class ConversationAppendStreamRequestTypedDict(TypedDict): inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[True] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationAppendStreamRequestHandoffExecution] @@ -37,7 +40,10 @@ class ConversationAppendStreamRequestTypedDict(TypedDict): class ConversationAppendStreamRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = True + stream: Annotated[ + Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], + pydantic.Field(alias="stream"), + ] = True store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -69,7 +75,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -84,3 +90,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationAppendStreamRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationhistory.py b/src/mistralai/client/models/conversationhistory.py index ceef115b..2e812bb8 100644 --- a/src/mistralai/client/models/conversationhistory.py +++ b/src/mistralai/client/models/conversationhistory.py @@ -74,7 +74,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/conversationmessages.py b/src/mistralai/client/models/conversationmessages.py index 84664b62..a7e13c71 100644 --- a/src/mistralai/client/models/conversationmessages.py +++ b/src/mistralai/client/models/conversationmessages.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index 299b41fc..94fcb03b 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -19,7 +19,10 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import Field, model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -70,7 +73,7 @@ class ConversationRequestTypedDict(TypedDict): inputs: ConversationInputsTypedDict - stream: NotRequired[bool] + stream: Literal[False] store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] @@ -88,7 +91,10 @@ class ConversationRequestTypedDict(TypedDict): class ConversationRequest(BaseModel): inputs: ConversationInputs - stream: Optional[bool] = False + stream: Annotated[ + Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], + pydantic.Field(alias="stream"), + ] = False store: OptionalNullable[bool] = UNSET @@ -154,7 +160,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -169,3 +175,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationresponse.py b/src/mistralai/client/models/conversationresponse.py index d1f8ac4b..64437b23 100644 --- a/src/mistralai/client/models/conversationresponse.py +++ b/src/mistralai/client/models/conversationresponse.py @@ -77,7 +77,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/conversationrestartrequest.py b/src/mistralai/client/models/conversationrestartrequest.py index d5079689..b6b03f1f 100644 --- a/src/mistralai/client/models/conversationrestartrequest.py +++ b/src/mistralai/client/models/conversationrestartrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict ConversationRestartRequestHandoffExecution = Literal[ @@ -40,7 +43,7 @@ class ConversationRestartRequestTypedDict(TypedDict): from_entry_id: str inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[False] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationRestartRequestHandoffExecution] @@ -62,7 +65,10 @@ class ConversationRestartRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = False + stream: Annotated[ + Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], + pydantic.Field(alias="stream"), + ] = False store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -100,7 +106,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -115,3 +121,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationRestartRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationrestartstreamrequest.py b/src/mistralai/client/models/conversationrestartstreamrequest.py index 5cea4146..41b7098f 100644 --- a/src/mistralai/client/models/conversationrestartstreamrequest.py +++ b/src/mistralai/client/models/conversationrestartstreamrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict ConversationRestartStreamRequestHandoffExecution = Literal[ @@ -40,7 +43,7 @@ class ConversationRestartStreamRequestTypedDict(TypedDict): from_entry_id: str inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[True] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationRestartStreamRequestHandoffExecution] @@ -62,7 +65,10 @@ class ConversationRestartStreamRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = True + stream: Annotated[ + Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], + pydantic.Field(alias="stream"), + ] = True store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -104,7 +110,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -119,3 +125,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationRestartStreamRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index 9404e32c..a1afb267 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -19,7 +19,10 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import Field, model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -70,7 +73,7 @@ class ConversationStreamRequestTypedDict(TypedDict): inputs: ConversationInputsTypedDict - stream: NotRequired[bool] + stream: Literal[True] store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationStreamRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] @@ -88,7 +91,10 @@ class ConversationStreamRequestTypedDict(TypedDict): class ConversationStreamRequest(BaseModel): inputs: ConversationInputs - stream: Optional[bool] = True + stream: Annotated[ + Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], + pydantic.Field(alias="stream"), + ] = True store: OptionalNullable[bool] = UNSET @@ -156,7 +162,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -171,3 +177,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationStreamRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationusageinfo.py b/src/mistralai/client/models/conversationusageinfo.py index 1e80f89e..e717284f 100644 --- a/src/mistralai/client/models/conversationusageinfo.py +++ b/src/mistralai/client/models/conversationusageinfo.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index 1e0cb7b6..b434619d 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -120,7 +120,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createbatchjobrequest.py b/src/mistralai/client/models/createbatchjobrequest.py index 9a901fef..6ff1e496 100644 --- a/src/mistralai/client/models/createbatchjobrequest.py +++ b/src/mistralai/client/models/createbatchjobrequest.py @@ -71,7 +71,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createconnectorrequest.py b/src/mistralai/client/models/createconnectorrequest.py index 8fd3d3ab..52ebc0be 100644 --- a/src/mistralai/client/models/createconnectorrequest.py +++ b/src/mistralai/client/models/createconnectorrequest.py @@ -69,7 +69,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createfileresponse.py b/src/mistralai/client/models/createfileresponse.py index 1f03b275..bafefc37 100644 --- a/src/mistralai/client/models/createfileresponse.py +++ b/src/mistralai/client/models/createfileresponse.py @@ -84,7 +84,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createfinetuningjobrequest.py b/src/mistralai/client/models/createfinetuningjobrequest.py index be97bd07..1f9c1e15 100644 --- a/src/mistralai/client/models/createfinetuningjobrequest.py +++ b/src/mistralai/client/models/createfinetuningjobrequest.py @@ -132,7 +132,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/creategithubrepositoryrequest.py b/src/mistralai/client/models/creategithubrepositoryrequest.py index 61ffde27..a3f6cd61 100644 --- a/src/mistralai/client/models/creategithubrepositoryrequest.py +++ b/src/mistralai/client/models/creategithubrepositoryrequest.py @@ -51,7 +51,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createlibraryrequest.py b/src/mistralai/client/models/createlibraryrequest.py index 58874e01..28dda0cb 100644 --- a/src/mistralai/client/models/createlibraryrequest.py +++ b/src/mistralai/client/models/createlibraryrequest.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/customconnector.py b/src/mistralai/client/models/customconnector.py index 23cddfc1..f3a1e2ff 100644 --- a/src/mistralai/client/models/customconnector.py +++ b/src/mistralai/client/models/customconnector.py @@ -85,7 +85,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/dataset.py b/src/mistralai/client/models/dataset.py index 2acd911d..08ce979e 100644 --- a/src/mistralai/client/models/dataset.py +++ b/src/mistralai/client/models/dataset.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/datasetimporttask.py b/src/mistralai/client/models/datasetimporttask.py index 4ef52e9e..e8d90f12 100644 --- a/src/mistralai/client/models/datasetimporttask.py +++ b/src/mistralai/client/models/datasetimporttask.py @@ -58,7 +58,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/datasetpreview.py b/src/mistralai/client/models/datasetpreview.py index 55493568..90676245 100644 --- a/src/mistralai/client/models/datasetpreview.py +++ b/src/mistralai/client/models/datasetpreview.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/datasetrecord.py b/src/mistralai/client/models/datasetrecord.py index 9c9f42e5..39c92cce 100644 --- a/src/mistralai/client/models/datasetrecord.py +++ b/src/mistralai/client/models/datasetrecord.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/deletemodelresponse.py b/src/mistralai/client/models/deletemodelresponse.py index fac884bc..4bc6c5e6 100644 --- a/src/mistralai/client/models/deletemodelresponse.py +++ b/src/mistralai/client/models/deletemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/deltamessage.py b/src/mistralai/client/models/deltamessage.py index d9fa230e..3823651b 100644 --- a/src/mistralai/client/models/deltamessage.py +++ b/src/mistralai/client/models/deltamessage.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/document.py b/src/mistralai/client/models/document.py index fcc5bca5..8d1aea88 100644 --- a/src/mistralai/client/models/document.py +++ b/src/mistralai/client/models/document.py @@ -114,7 +114,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/documentlibrarytool.py b/src/mistralai/client/models/documentlibrarytool.py index 642c3202..29f8d64a 100644 --- a/src/mistralai/client/models/documentlibrarytool.py +++ b/src/mistralai/client/models/documentlibrarytool.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/documenturlchunk.py b/src/mistralai/client/models/documenturlchunk.py index 43444d98..f7a99ff8 100644 --- a/src/mistralai/client/models/documenturlchunk.py +++ b/src/mistralai/client/models/documenturlchunk.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddedresource.py b/src/mistralai/client/models/embeddedresource.py index 54cb17fd..e16fedf8 100644 --- a/src/mistralai/client/models/embeddedresource.py +++ b/src/mistralai/client/models/embeddedresource.py @@ -84,8 +84,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddingrequest.py b/src/mistralai/client/models/embeddingrequest.py index 5fa2d2f6..2ef747d8 100644 --- a/src/mistralai/client/models/embeddingrequest.py +++ b/src/mistralai/client/models/embeddingrequest.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddingresponsedata.py b/src/mistralai/client/models/embeddingresponsedata.py index 098cfae0..03b23a7c 100644 --- a/src/mistralai/client/models/embeddingresponsedata.py +++ b/src/mistralai/client/models/embeddingresponsedata.py @@ -29,7 +29,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/event.py b/src/mistralai/client/models/event.py index c40ae2b1..01157dfa 100644 --- a/src/mistralai/client/models/event.py +++ b/src/mistralai/client/models/event.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/feedresultchatcompletioneventpreview.py b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py index e87e007e..bf248758 100644 --- a/src/mistralai/client/models/feedresultchatcompletioneventpreview.py +++ b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py index d3cbd653..92c29e22 100644 --- a/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py +++ b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fetchfieldoptioncountsrequest.py b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py index 19698b9b..e310f660 100644 --- a/src/mistralai/client/models/fetchfieldoptioncountsrequest.py +++ b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/file.py b/src/mistralai/client/models/file.py index 1b0ea1d4..528bc13a 100644 --- a/src/mistralai/client/models/file.py +++ b/src/mistralai/client/models/file.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/filechunk.py b/src/mistralai/client/models/filechunk.py index 5c8d2646..6c9c8b0e 100644 --- a/src/mistralai/client/models/filechunk.py +++ b/src/mistralai/client/models/filechunk.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py index 64cd6ac5..326dd1d3 100644 --- a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py +++ b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/files_api_routes_list_filesop.py b/src/mistralai/client/models/files_api_routes_list_filesop.py index b03e2f88..e18eaa6a 100644 --- a/src/mistralai/client/models/files_api_routes_list_filesop.py +++ b/src/mistralai/client/models/files_api_routes_list_filesop.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/files_api_routes_upload_fileop.py b/src/mistralai/client/models/files_api_routes_upload_fileop.py index b6683639..25efcff2 100644 --- a/src/mistralai/client/models/files_api_routes_upload_fileop.py +++ b/src/mistralai/client/models/files_api_routes_upload_fileop.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fileschema.py b/src/mistralai/client/models/fileschema.py index 11caa083..ce64a16b 100644 --- a/src/mistralai/client/models/fileschema.py +++ b/src/mistralai/client/models/fileschema.py @@ -84,7 +84,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/filtergroup.py b/src/mistralai/client/models/filtergroup.py index 06616a01..4e9815b7 100644 --- a/src/mistralai/client/models/filtergroup.py +++ b/src/mistralai/client/models/filtergroup.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/filterpayload.py b/src/mistralai/client/models/filterpayload.py index 188375f1..ced355f1 100644 --- a/src/mistralai/client/models/filterpayload.py +++ b/src/mistralai/client/models/filterpayload.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/fimcompletionrequest.py b/src/mistralai/client/models/fimcompletionrequest.py index ea877213..2ca34598 100644 --- a/src/mistralai/client/models/fimcompletionrequest.py +++ b/src/mistralai/client/models/fimcompletionrequest.py @@ -113,7 +113,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fimcompletionstreamrequest.py b/src/mistralai/client/models/fimcompletionstreamrequest.py index e80efc09..9c91083c 100644 --- a/src/mistralai/client/models/fimcompletionstreamrequest.py +++ b/src/mistralai/client/models/fimcompletionstreamrequest.py @@ -111,7 +111,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/finetunedmodelcapabilities.py b/src/mistralai/client/models/finetunedmodelcapabilities.py index 2f4cca0b..b9ad2f9e 100644 --- a/src/mistralai/client/models/finetunedmodelcapabilities.py +++ b/src/mistralai/client/models/finetunedmodelcapabilities.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/ftmodelcard.py b/src/mistralai/client/models/ftmodelcard.py index 2c26ff2f..bb7c52c8 100644 --- a/src/mistralai/client/models/ftmodelcard.py +++ b/src/mistralai/client/models/ftmodelcard.py @@ -24,6 +24,9 @@ class FTModelCardTypedDict(TypedDict): id: str capabilities: ModelCapabilitiesTypedDict + r"""This is populated by Harmattan, but some fields have a name + that we don't want to expose in the API. + """ job: str root: str object: NotRequired[str] @@ -46,6 +49,9 @@ class FTModelCard(BaseModel): id: str capabilities: ModelCapabilities + r"""This is populated by Harmattan, but some fields have a name + that we don't want to expose in the API. + """ job: str @@ -109,7 +115,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/function.py b/src/mistralai/client/models/function.py index 1da1dcc9..8a3267e8 100644 --- a/src/mistralai/client/models/function.py +++ b/src/mistralai/client/models/function.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/functioncallentry.py b/src/mistralai/client/models/functioncallentry.py index d05fad85..a88d87ab 100644 --- a/src/mistralai/client/models/functioncallentry.py +++ b/src/mistralai/client/models/functioncallentry.py @@ -101,7 +101,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/functioncallevent.py b/src/mistralai/client/models/functioncallevent.py index 849eed76..6e3c0715 100644 --- a/src/mistralai/client/models/functioncallevent.py +++ b/src/mistralai/client/models/functioncallevent.py @@ -80,7 +80,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/functionresultentry.py b/src/mistralai/client/models/functionresultentry.py index 01e2e36f..11576522 100644 --- a/src/mistralai/client/models/functionresultentry.py +++ b/src/mistralai/client/models/functionresultentry.py @@ -61,7 +61,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py index e1b04950..9db415bf 100644 --- a/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py +++ b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py index a6a329c7..4ff0c307 100644 --- a/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py +++ b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py index 5a8b7450..b4af68e0 100644 --- a/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py +++ b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py index 43e0dc5b..8213c023 100644 --- a/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py +++ b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py index 7617a5d2..ed177823 100644 --- a/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py +++ b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py index ea52dd51..1d79f2d5 100644 --- a/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py +++ b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py index 7228cfa1..b5d0980e 100644 --- a/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py +++ b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py @@ -63,7 +63,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/getfileresponse.py b/src/mistralai/client/models/getfileresponse.py index 82280899..37c29bbb 100644 --- a/src/mistralai/client/models/getfileresponse.py +++ b/src/mistralai/client/models/getfileresponse.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/githubrepository.py b/src/mistralai/client/models/githubrepository.py index 84b01078..4ec88aa8 100644 --- a/src/mistralai/client/models/githubrepository.py +++ b/src/mistralai/client/models/githubrepository.py @@ -51,7 +51,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/guardrailconfig.py b/src/mistralai/client/models/guardrailconfig.py index 4f8fe352..d152ec36 100644 --- a/src/mistralai/client/models/guardrailconfig.py +++ b/src/mistralai/client/models/guardrailconfig.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imagecontent.py b/src/mistralai/client/models/imagecontent.py index 13c3f449..e6363daa 100644 --- a/src/mistralai/client/models/imagecontent.py +++ b/src/mistralai/client/models/imagecontent.py @@ -68,8 +68,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imagegenerationtool.py b/src/mistralai/client/models/imagegenerationtool.py index c1789b18..0dd4a4d2 100644 --- a/src/mistralai/client/models/imagegenerationtool.py +++ b/src/mistralai/client/models/imagegenerationtool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imageurl.py b/src/mistralai/client/models/imageurl.py index ac1030f5..32efa67b 100644 --- a/src/mistralai/client/models/imageurl.py +++ b/src/mistralai/client/models/imageurl.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imageurlchunk.py b/src/mistralai/client/models/imageurlchunk.py index 7134b46e..1e342fd6 100644 --- a/src/mistralai/client/models/imageurlchunk.py +++ b/src/mistralai/client/models/imageurlchunk.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/jobmetadata.py b/src/mistralai/client/models/jobmetadata.py index f6e96fa1..8409872b 100644 --- a/src/mistralai/client/models/jobmetadata.py +++ b/src/mistralai/client/models/jobmetadata.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py index d779e1d9..683da4af 100644 --- a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py +++ b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py index 89ac3c93..e5869656 100644 --- a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py +++ b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py @@ -104,7 +104,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py b/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py index ec80a158..9b9aeb51 100644 --- a/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +++ b/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py @@ -145,7 +145,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jsonschema.py b/src/mistralai/client/models/jsonschema.py index dfababa6..bc0bd6c4 100644 --- a/src/mistralai/client/models/jsonschema.py +++ b/src/mistralai/client/models/jsonschema.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/judge.py b/src/mistralai/client/models/judge.py index 1fb1d386..036aabb7 100644 --- a/src/mistralai/client/models/judge.py +++ b/src/mistralai/client/models/judge.py @@ -119,7 +119,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/judgeregressionoutput.py b/src/mistralai/client/models/judgeregressionoutput.py index 63394d8b..9bb8f9c1 100644 --- a/src/mistralai/client/models/judgeregressionoutput.py +++ b/src/mistralai/client/models/judgeregressionoutput.py @@ -41,7 +41,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/legacyjobmetadata.py b/src/mistralai/client/models/legacyjobmetadata.py index 57576758..143f0e7c 100644 --- a/src/mistralai/client/models/legacyjobmetadata.py +++ b/src/mistralai/client/models/legacyjobmetadata.py @@ -114,7 +114,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/libraries_documents_list_v1op.py b/src/mistralai/client/models/libraries_documents_list_v1op.py index da7d793b..afc474cb 100644 --- a/src/mistralai/client/models/libraries_documents_list_v1op.py +++ b/src/mistralai/client/models/libraries_documents_list_v1op.py @@ -78,7 +78,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/library.py b/src/mistralai/client/models/library.py index 1953b6fb..c26710ff 100644 --- a/src/mistralai/client/models/library.py +++ b/src/mistralai/client/models/library.py @@ -99,7 +99,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/list_models_v1_models_getop.py b/src/mistralai/client/models/list_models_v1_models_getop.py index 70b0ab82..1a42d9b0 100644 --- a/src/mistralai/client/models/list_models_v1_models_getop.py +++ b/src/mistralai/client/models/list_models_v1_models_getop.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/listbatchjobsresponse.py b/src/mistralai/client/models/listbatchjobsresponse.py index 35a348a1..77265322 100644 --- a/src/mistralai/client/models/listbatchjobsresponse.py +++ b/src/mistralai/client/models/listbatchjobsresponse.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/listfilesresponse.py b/src/mistralai/client/models/listfilesresponse.py index 10a60126..37787dae 100644 --- a/src/mistralai/client/models/listfilesresponse.py +++ b/src/mistralai/client/models/listfilesresponse.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/listfinetuningjobsresponse.py b/src/mistralai/client/models/listfinetuningjobsresponse.py index 1e434c59..39547d57 100644 --- a/src/mistralai/client/models/listfinetuningjobsresponse.py +++ b/src/mistralai/client/models/listfinetuningjobsresponse.py @@ -85,7 +85,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/mcpservericon.py b/src/mistralai/client/models/mcpservericon.py index 6068c1c4..293ab375 100644 --- a/src/mistralai/client/models/mcpservericon.py +++ b/src/mistralai/client/models/mcpservericon.py @@ -56,8 +56,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageinputentry.py b/src/mistralai/client/models/messageinputentry.py index c948a13e..be271e31 100644 --- a/src/mistralai/client/models/messageinputentry.py +++ b/src/mistralai/client/models/messageinputentry.py @@ -95,7 +95,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageoutputentry.py b/src/mistralai/client/models/messageoutputentry.py index 6a9c52ed..fd683ad3 100644 --- a/src/mistralai/client/models/messageoutputentry.py +++ b/src/mistralai/client/models/messageoutputentry.py @@ -98,7 +98,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageoutputevent.py b/src/mistralai/client/models/messageoutputevent.py index d765f4fd..8f5ecd43 100644 --- a/src/mistralai/client/models/messageoutputevent.py +++ b/src/mistralai/client/models/messageoutputevent.py @@ -82,7 +82,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/metric.py b/src/mistralai/client/models/metric.py index 1413f589..8d059894 100644 --- a/src/mistralai/client/models/metric.py +++ b/src/mistralai/client/models/metric.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/modelcapabilities.py b/src/mistralai/client/models/modelcapabilities.py index d9293ccc..3267c707 100644 --- a/src/mistralai/client/models/modelcapabilities.py +++ b/src/mistralai/client/models/modelcapabilities.py @@ -9,6 +9,10 @@ class ModelCapabilitiesTypedDict(TypedDict): + r"""This is populated by Harmattan, but some fields have a name + that we don't want to expose in the API. + """ + completion_chat: NotRequired[bool] function_calling: NotRequired[bool] completion_fim: NotRequired[bool] @@ -19,9 +23,15 @@ class ModelCapabilitiesTypedDict(TypedDict): moderation: NotRequired[bool] audio: NotRequired[bool] audio_transcription: NotRequired[bool] + audio_transcription_realtime: NotRequired[bool] + audio_speech: NotRequired[bool] class ModelCapabilities(BaseModel): + r"""This is populated by Harmattan, but some fields have a name + that we don't want to expose in the API. + """ + completion_chat: Optional[bool] = False function_calling: Optional[bool] = False @@ -42,6 +52,10 @@ class ModelCapabilities(BaseModel): audio_transcription: Optional[bool] = False + audio_transcription_realtime: Optional[bool] = False + + audio_speech: Optional[bool] = False + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -56,6 +70,8 @@ def serialize_model(self, handler): "moderation", "audio", "audio_transcription", + "audio_transcription_realtime", + "audio_speech", ] ) serialized = handler(self) @@ -63,7 +79,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index d7f765bf..72ca957f 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -167,7 +167,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/modellist.py b/src/mistralai/client/models/modellist.py index 5fd835f2..a6020100 100644 --- a/src/mistralai/client/models/modellist.py +++ b/src/mistralai/client/models/modellist.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/moderationllmv1categorythresholds.py b/src/mistralai/client/models/moderationllmv1categorythresholds.py index 0451ba3a..9a947d11 100644 --- a/src/mistralai/client/models/moderationllmv1categorythresholds.py +++ b/src/mistralai/client/models/moderationllmv1categorythresholds.py @@ -77,7 +77,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv1config.py b/src/mistralai/client/models/moderationllmv1config.py index da7156eb..fe597a9b 100644 --- a/src/mistralai/client/models/moderationllmv1config.py +++ b/src/mistralai/client/models/moderationllmv1config.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv2categorythresholds.py b/src/mistralai/client/models/moderationllmv2categorythresholds.py index 1754582b..2ca952c5 100644 --- a/src/mistralai/client/models/moderationllmv2categorythresholds.py +++ b/src/mistralai/client/models/moderationllmv2categorythresholds.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv2config.py b/src/mistralai/client/models/moderationllmv2config.py index df2b04bd..5cd8b7ca 100644 --- a/src/mistralai/client/models/moderationllmv2config.py +++ b/src/mistralai/client/models/moderationllmv2config.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationobject.py b/src/mistralai/client/models/moderationobject.py index e7ccd8f6..66f6a84b 100644 --- a/src/mistralai/client/models/moderationobject.py +++ b/src/mistralai/client/models/moderationobject.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/observabilityerrordetail.py b/src/mistralai/client/models/observabilityerrordetail.py index a6236b66..f1535352 100644 --- a/src/mistralai/client/models/observabilityerrordetail.py +++ b/src/mistralai/client/models/observabilityerrordetail.py @@ -25,7 +25,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/ocrimageobject.py b/src/mistralai/client/models/ocrimageobject.py index 365f062b..583cc38b 100644 --- a/src/mistralai/client/models/ocrimageobject.py +++ b/src/mistralai/client/models/ocrimageobject.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrpageobject.py b/src/mistralai/client/models/ocrpageobject.py index ffc7b3b6..40b70d81 100644 --- a/src/mistralai/client/models/ocrpageobject.py +++ b/src/mistralai/client/models/ocrpageobject.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrrequest.py b/src/mistralai/client/models/ocrrequest.py index 4ad337ce..6e405ee4 100644 --- a/src/mistralai/client/models/ocrrequest.py +++ b/src/mistralai/client/models/ocrrequest.py @@ -131,7 +131,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrresponse.py b/src/mistralai/client/models/ocrresponse.py index e63eed98..ff4b96c3 100644 --- a/src/mistralai/client/models/ocrresponse.py +++ b/src/mistralai/client/models/ocrresponse.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrusageinfo.py b/src/mistralai/client/models/ocrusageinfo.py index 2ec1322b..bfd748e0 100644 --- a/src/mistralai/client/models/ocrusageinfo.py +++ b/src/mistralai/client/models/ocrusageinfo.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultcampaignpreview.py b/src/mistralai/client/models/paginatedresultcampaignpreview.py index d82ee741..f6cfce37 100644 --- a/src/mistralai/client/models/paginatedresultcampaignpreview.py +++ b/src/mistralai/client/models/paginatedresultcampaignpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py index 97bbfea7..e08443c1 100644 --- a/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py +++ b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetimporttask.py b/src/mistralai/client/models/paginatedresultdatasetimporttask.py index 9d6dcd05..4b9f4881 100644 --- a/src/mistralai/client/models/paginatedresultdatasetimporttask.py +++ b/src/mistralai/client/models/paginatedresultdatasetimporttask.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetpreview.py b/src/mistralai/client/models/paginatedresultdatasetpreview.py index 51566cc5..81746f35 100644 --- a/src/mistralai/client/models/paginatedresultdatasetpreview.py +++ b/src/mistralai/client/models/paginatedresultdatasetpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetrecord.py b/src/mistralai/client/models/paginatedresultdatasetrecord.py index 1d6e15c1..d9aa8c8e 100644 --- a/src/mistralai/client/models/paginatedresultdatasetrecord.py +++ b/src/mistralai/client/models/paginatedresultdatasetrecord.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultjudgepreview.py b/src/mistralai/client/models/paginatedresultjudgepreview.py index 57dbc1e5..c61382f9 100644 --- a/src/mistralai/client/models/paginatedresultjudgepreview.py +++ b/src/mistralai/client/models/paginatedresultjudgepreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginationresponse.py b/src/mistralai/client/models/paginationresponse.py index f05ee380..a60640aa 100644 --- a/src/mistralai/client/models/paginationresponse.py +++ b/src/mistralai/client/models/paginationresponse.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/prediction.py b/src/mistralai/client/models/prediction.py index 0c6f4182..614f4811 100644 --- a/src/mistralai/client/models/prediction.py +++ b/src/mistralai/client/models/prediction.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionerror.py b/src/mistralai/client/models/realtimetranscriptionerror.py index c661e461..8ea1d425 100644 --- a/src/mistralai/client/models/realtimetranscriptionerror.py +++ b/src/mistralai/client/models/realtimetranscriptionerror.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py b/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py index 8156a270..82ce59fc 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioend.py b/src/mistralai/client/models/realtimetranscriptioninputaudioend.py index 473eedb7..9b0a8709 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioend.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioend.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py b/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py index 553d14c7..fe728633 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsession.py b/src/mistralai/client/models/realtimetranscriptionsession.py index a74a457b..e23c07ec 100644 --- a/src/mistralai/client/models/realtimetranscriptionsession.py +++ b/src/mistralai/client/models/realtimetranscriptionsession.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/realtimetranscriptionsessioncreated.py b/src/mistralai/client/models/realtimetranscriptionsessioncreated.py index bb96875a..88da8764 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessioncreated.py +++ b/src/mistralai/client/models/realtimetranscriptionsessioncreated.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdated.py b/src/mistralai/client/models/realtimetranscriptionsessionupdated.py index fea5db4a..474b2fa7 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdated.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdated.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py b/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py index 07ad59a4..4013d638 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py index a89441e9..d4ce43f7 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/referencechunk.py b/src/mistralai/client/models/referencechunk.py index e0bbae4e..c0d7c065 100644 --- a/src/mistralai/client/models/referencechunk.py +++ b/src/mistralai/client/models/referencechunk.py @@ -7,17 +7,23 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional -from typing_extensions import Annotated, TypedDict +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +ReferenceIDTypedDict = TypeAliasType("ReferenceIDTypedDict", Union[str, int]) + + +ReferenceID = TypeAliasType("ReferenceID", Union[str, int]) class ReferenceChunkTypedDict(TypedDict): - reference_ids: List[int] + reference_ids: List[ReferenceIDTypedDict] type: Literal["reference"] class ReferenceChunk(BaseModel): - reference_ids: List[int] + reference_ids: List[ReferenceID] type: Annotated[ Annotated[ @@ -34,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/resourcelink.py b/src/mistralai/client/models/resourcelink.py index 8ed5613c..890c5be1 100644 --- a/src/mistralai/client/models/resourcelink.py +++ b/src/mistralai/client/models/resourcelink.py @@ -114,8 +114,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/responsedoneevent.py b/src/mistralai/client/models/responsedoneevent.py index be38fba8..89a58bf7 100644 --- a/src/mistralai/client/models/responsedoneevent.py +++ b/src/mistralai/client/models/responsedoneevent.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/responseerrorevent.py b/src/mistralai/client/models/responseerrorevent.py index fa4d0d01..5326c4e8 100644 --- a/src/mistralai/client/models/responseerrorevent.py +++ b/src/mistralai/client/models/responseerrorevent.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/responseformat.py b/src/mistralai/client/models/responseformat.py index b2971412..95141394 100644 --- a/src/mistralai/client/models/responseformat.py +++ b/src/mistralai/client/models/responseformat.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/responsestartedevent.py b/src/mistralai/client/models/responsestartedevent.py index 84abfcd9..ca375042 100644 --- a/src/mistralai/client/models/responsestartedevent.py +++ b/src/mistralai/client/models/responsestartedevent.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/searchchatcompletioneventidsrequest.py b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py index f8476081..64bb8f9f 100644 --- a/src/mistralai/client/models/searchchatcompletioneventidsrequest.py +++ b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/searchchatcompletioneventsrequest.py b/src/mistralai/client/models/searchchatcompletioneventsrequest.py index 95524c5b..bca27f16 100644 --- a/src/mistralai/client/models/searchchatcompletioneventsrequest.py +++ b/src/mistralai/client/models/searchchatcompletioneventsrequest.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/security.py b/src/mistralai/client/models/security.py index f3b3423e..36b12953 100644 --- a/src/mistralai/client/models/security.py +++ b/src/mistralai/client/models/security.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/sharing.py b/src/mistralai/client/models/sharing.py index d6142e83..efa16203 100644 --- a/src/mistralai/client/models/sharing.py +++ b/src/mistralai/client/models/sharing.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/sharingdelete.py b/src/mistralai/client/models/sharingdelete.py index 33ccd7e7..3472a506 100644 --- a/src/mistralai/client/models/sharingdelete.py +++ b/src/mistralai/client/models/sharingdelete.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/sharingrequest.py b/src/mistralai/client/models/sharingrequest.py index 76424b8e..7c2d435c 100644 --- a/src/mistralai/client/models/sharingrequest.py +++ b/src/mistralai/client/models/sharingrequest.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/textchunk.py b/src/mistralai/client/models/textchunk.py index ac9f3137..bae970f3 100644 --- a/src/mistralai/client/models/textchunk.py +++ b/src/mistralai/client/models/textchunk.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/textcontent.py b/src/mistralai/client/models/textcontent.py index 7468b046..03de48d3 100644 --- a/src/mistralai/client/models/textcontent.py +++ b/src/mistralai/client/models/textcontent.py @@ -65,8 +65,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/textresourcecontents.py b/src/mistralai/client/models/textresourcecontents.py index c497bb4d..c3f26a65 100644 --- a/src/mistralai/client/models/textresourcecontents.py +++ b/src/mistralai/client/models/textresourcecontents.py @@ -61,8 +61,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/thinkchunk.py b/src/mistralai/client/models/thinkchunk.py index 03573f8e..ae084a17 100644 --- a/src/mistralai/client/models/thinkchunk.py +++ b/src/mistralai/client/models/thinkchunk.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/tool.py b/src/mistralai/client/models/tool.py index 2b9965e5..1d1c5ce5 100644 --- a/src/mistralai/client/models/tool.py +++ b/src/mistralai/client/models/tool.py @@ -28,7 +28,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolcall.py b/src/mistralai/client/models/toolcall.py index 181cec33..29f1149c 100644 --- a/src/mistralai/client/models/toolcall.py +++ b/src/mistralai/client/models/toolcall.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolchoice.py b/src/mistralai/client/models/toolchoice.py index cb787df1..ce84573a 100644 --- a/src/mistralai/client/models/toolchoice.py +++ b/src/mistralai/client/models/toolchoice.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolconfiguration.py b/src/mistralai/client/models/toolconfiguration.py index b903c8b6..eb3d14e5 100644 --- a/src/mistralai/client/models/toolconfiguration.py +++ b/src/mistralai/client/models/toolconfiguration.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolexecutiondeltaevent.py b/src/mistralai/client/models/toolexecutiondeltaevent.py index 5a977ca6..c2e40950 100644 --- a/src/mistralai/client/models/toolexecutiondeltaevent.py +++ b/src/mistralai/client/models/toolexecutiondeltaevent.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolexecutiondoneevent.py b/src/mistralai/client/models/toolexecutiondoneevent.py index 1c9b0ec9..ec3b6918 100644 --- a/src/mistralai/client/models/toolexecutiondoneevent.py +++ b/src/mistralai/client/models/toolexecutiondoneevent.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolexecutionentry.py b/src/mistralai/client/models/toolexecutionentry.py index 0d6f2a13..226adce1 100644 --- a/src/mistralai/client/models/toolexecutionentry.py +++ b/src/mistralai/client/models/toolexecutionentry.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolexecutionstartedevent.py b/src/mistralai/client/models/toolexecutionstartedevent.py index 21e5bfa8..a4af27b8 100644 --- a/src/mistralai/client/models/toolexecutionstartedevent.py +++ b/src/mistralai/client/models/toolexecutionstartedevent.py @@ -72,7 +72,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolfilechunk.py b/src/mistralai/client/models/toolfilechunk.py index 0708b3ff..1d9e6118 100644 --- a/src/mistralai/client/models/toolfilechunk.py +++ b/src/mistralai/client/models/toolfilechunk.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolmessage.py b/src/mistralai/client/models/toolmessage.py index 05a0ee63..0dc9e92f 100644 --- a/src/mistralai/client/models/toolmessage.py +++ b/src/mistralai/client/models/toolmessage.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolreferencechunk.py b/src/mistralai/client/models/toolreferencechunk.py index 95454fe8..391724ed 100644 --- a/src/mistralai/client/models/toolreferencechunk.py +++ b/src/mistralai/client/models/toolreferencechunk.py @@ -65,7 +65,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/trainingfile.py b/src/mistralai/client/models/trainingfile.py index 2faeda8b..bdaba37a 100644 --- a/src/mistralai/client/models/trainingfile.py +++ b/src/mistralai/client/models/trainingfile.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/transcriptionresponse.py b/src/mistralai/client/models/transcriptionresponse.py index 70315463..c512a345 100644 --- a/src/mistralai/client/models/transcriptionresponse.py +++ b/src/mistralai/client/models/transcriptionresponse.py @@ -55,8 +55,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionsegmentchunk.py b/src/mistralai/client/models/transcriptionsegmentchunk.py index b87bfc2f..8a5a7162 100644 --- a/src/mistralai/client/models/transcriptionsegmentchunk.py +++ b/src/mistralai/client/models/transcriptionsegmentchunk.py @@ -67,8 +67,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionstreamdone.py b/src/mistralai/client/models/transcriptionstreamdone.py index e3c50169..89357277 100644 --- a/src/mistralai/client/models/transcriptionstreamdone.py +++ b/src/mistralai/client/models/transcriptionstreamdone.py @@ -66,8 +66,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionstreamsegmentdelta.py b/src/mistralai/client/models/transcriptionstreamsegmentdelta.py index 32ef8f9b..38e7b0a3 100644 --- a/src/mistralai/client/models/transcriptionstreamsegmentdelta.py +++ b/src/mistralai/client/models/transcriptionstreamsegmentdelta.py @@ -64,8 +64,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/unarchivemodelresponse.py b/src/mistralai/client/models/unarchivemodelresponse.py index 5c75d30e..5cab4c2e 100644 --- a/src/mistralai/client/models/unarchivemodelresponse.py +++ b/src/mistralai/client/models/unarchivemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index 584c034c..7bb9686b 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -129,7 +129,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updateconnectorrequest.py b/src/mistralai/client/models/updateconnectorrequest.py index 2fe42ba8..3540d02b 100644 --- a/src/mistralai/client/models/updateconnectorrequest.py +++ b/src/mistralai/client/models/updateconnectorrequest.py @@ -97,7 +97,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatedatasetrequest.py b/src/mistralai/client/models/updatedatasetrequest.py index 02974089..ddbaad12 100644 --- a/src/mistralai/client/models/updatedatasetrequest.py +++ b/src/mistralai/client/models/updatedatasetrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatedocumentrequest.py b/src/mistralai/client/models/updatedocumentrequest.py index 61e69655..12d9c89b 100644 --- a/src/mistralai/client/models/updatedocumentrequest.py +++ b/src/mistralai/client/models/updatedocumentrequest.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatelibraryrequest.py b/src/mistralai/client/models/updatelibraryrequest.py index 91cbf2a1..d5183ac0 100644 --- a/src/mistralai/client/models/updatelibraryrequest.py +++ b/src/mistralai/client/models/updatelibraryrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatemodelrequest.py b/src/mistralai/client/models/updatemodelrequest.py index f685cfcc..0179ba14 100644 --- a/src/mistralai/client/models/updatemodelrequest.py +++ b/src/mistralai/client/models/updatemodelrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/usageinfo.py b/src/mistralai/client/models/usageinfo.py index 31cbf07e..f23699d0 100644 --- a/src/mistralai/client/models/usageinfo.py +++ b/src/mistralai/client/models/usageinfo.py @@ -60,8 +60,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/usermessage.py b/src/mistralai/client/models/usermessage.py index 63e76792..7b4b5563 100644 --- a/src/mistralai/client/models/usermessage.py +++ b/src/mistralai/client/models/usermessage.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/validationerror.py b/src/mistralai/client/models/validationerror.py index d856e24c..5fe796db 100644 --- a/src/mistralai/client/models/validationerror.py +++ b/src/mistralai/client/models/validationerror.py @@ -49,7 +49,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/wandbintegration.py b/src/mistralai/client/models/wandbintegration.py index f0df2c77..0e444bec 100644 --- a/src/mistralai/client/models/wandbintegration.py +++ b/src/mistralai/client/models/wandbintegration.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/wandbintegrationresult.py b/src/mistralai/client/models/wandbintegrationresult.py index 575cbd42..e64bb27c 100644 --- a/src/mistralai/client/models/wandbintegrationresult.py +++ b/src/mistralai/client/models/wandbintegrationresult.py @@ -52,7 +52,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/websearchpremiumtool.py b/src/mistralai/client/models/websearchpremiumtool.py index 00d4a4b4..5c929e94 100644 --- a/src/mistralai/client/models/websearchpremiumtool.py +++ b/src/mistralai/client/models/websearchpremiumtool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/websearchtool.py b/src/mistralai/client/models/websearchtool.py index 6871080f..f82b6ec1 100644 --- a/src/mistralai/client/models/websearchtool.py +++ b/src/mistralai/client/models/websearchtool.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index 80bf25a7..b775fe1c 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -72,8 +72,8 @@ def __init__( self, api_key: Optional[Union[Optional[str], Callable[[], Optional[str]]]] = None, server: Optional[str] = None, - server_url: Optional[str] = None, url_params: Optional[Dict[str, str]] = None, + server_url: Optional[str] = None, client: Optional[HttpClient] = None, async_client: Optional[AsyncHttpClient] = None, retry_config: OptionalNullable[RetryConfig] = UNSET, diff --git a/src/mistralai/client/utils/eventstreaming.py b/src/mistralai/client/utils/eventstreaming.py index 19a12152..93287ab4 100644 --- a/src/mistralai/client/utils/eventstreaming.py +++ b/src/mistralai/client/utils/eventstreaming.py @@ -33,9 +33,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events(response, decoder, sentinel) + self.generator = stream_events( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -69,9 +72,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events_async(response, decoder, sentinel) + self.generator = stream_events_async( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -117,6 +123,7 @@ async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 @@ -139,7 +146,11 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -152,7 +163,11 @@ async def stream_events_async( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -162,6 +177,7 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 @@ -184,7 +200,11 @@ def stream_events( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -197,7 +217,11 @@ def stream_events( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -209,6 +233,7 @@ def _parse_event( decoder: Callable[[str], T], sentinel: Optional[str] = None, event_id: Optional[str] = None, + data_required: bool = True, ) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) @@ -251,6 +276,10 @@ def _parse_event( if sentinel and data == f"{sentinel}\n": return None, True, event_id + # Skip data-less events when data is required + if not data and publish and data_required: + return None, False, event_id + if data: data = data[:-1] try: diff --git a/uv.lock b/uv.lock index ff717007..32493803 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.2" +version = "2.0.3" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 1f25e814edb9faf8b200e8f0f8b56d2745d5f84d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 15:28:15 +0000 Subject: [PATCH 17/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.0.4=20(#426)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.observability.judges.judge_conversation()`: **Added** * `mistral.chat.complete()`: `request.guardrails` **Added** * `mistral.chat.stream()`: `request.guardrails` **Added** * `mistral.agents.complete()`: `request.guardrails` **Added** * `mistral.agents.stream()`: `request.guardrails` **Added** * chore: align pyproject.toml and uv.lock to version 2.0.4 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 1222 +++++++++-------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 13 +- README-PYPI.md | 7 +- README.md | 7 +- RELEASES.md | 12 +- docs/models/agentscompletionrequest.md | 1 + docs/models/agentscompletionstreamrequest.md | 1 + docs/models/apiendpoint.md | 33 +- docs/models/audience.md | 17 +- docs/models/audioencoding.md | 25 +- docs/models/basetaskstatus.md | 29 +- docs/models/batchjobstatus.md | 27 +- docs/models/builtinconnectors.md | 23 +- .../chatcompletionchoicefinishreason.md | 23 +- docs/models/chatcompletionrequest.md | 1 + docs/models/chatcompletionstreamrequest.md | 1 + .../classifierfinetuningjobdetailsstatus.md | 33 +- docs/models/classifierfinetuningjobstatus.md | 33 +- .../completionfinetuningjobdetailsstatus.md | 33 +- docs/models/completionfinetuningjobstatus.md | 33 +- ...pletionresponsestreamchoicefinishreason.md | 21 +- docs/models/confirmation.md | 13 +- docs/models/conversationappendrequest.md | 2 +- ...nversationappendrequesthandoffexecution.md | 13 +- .../models/conversationappendstreamrequest.md | 2 +- ...tionappendstreamrequesthandoffexecution.md | 13 +- docs/models/conversationrequest.md | 2 +- .../conversationrequesthandoffexecution.md | 13 +- docs/models/conversationrestartrequest.md | 2 +- ...versationrestartrequesthandoffexecution.md | 13 +- .../conversationrestartstreamrequest.md | 2 +- ...ionrestartstreamrequesthandoffexecution.md | 13 +- docs/models/conversationsource.md | 21 +- docs/models/conversationstreamrequest.md | 2 +- ...nversationstreamrequesthandoffexecution.md | 13 +- docs/models/embeddingdtype.md | 19 +- docs/models/encodingformat.md | 13 +- docs/models/entitytype.md | 19 +- docs/models/filepurpose.md | 19 +- .../filesapiroutesuploadfilefilevisibility.md | 13 +- docs/models/filevisibility.md | 17 +- docs/models/finetuneablemodeltype.md | 13 +- docs/models/format_.md | 17 +- docs/models/ftclassifierlossfunction.md | 17 +- .../functioncallentryconfirmationstatus.md | 19 +- .../functioncalleventconfirmationstatus.md | 19 +- docs/models/imagedetail.md | 19 +- docs/models/imageurlchunk.md | 2 +- docs/models/instructrequest.md | 2 + ...routesfinetuninggetfinetuningjobsstatus.md | 29 +- docs/models/judgeconversationrequest.md | 9 + ...lityjudgesjudgeidlivejudgingpostrequest.md | 9 + docs/models/judgeoutputtype.md | 13 +- docs/models/mistralpromptmode.md | 15 +- docs/models/moderationllmaction.md | 17 +- docs/models/observabilityerrorcode.md | 99 +- docs/models/op.md | 51 +- docs/models/operator.md | 47 +- docs/models/orderby.md | 13 +- docs/models/processstatus.md | 29 +- docs/models/requestsource.md | 15 +- docs/models/resourcevisibility.md | 21 +- docs/models/responseformats.md | 19 +- docs/models/role.md | 17 +- docs/models/sampletype.md | 23 +- docs/models/shareenum.md | 17 +- docs/models/source.md | 19 +- docs/models/ssetypes.md | 33 +- docs/models/supportedoperator.md | 51 +- docs/models/tableformat.md | 13 +- docs/models/timestampgranularity.md | 13 +- docs/models/toolchoiceenum.md | 21 +- docs/models/tooltypes.md | 15 +- docs/models/transcriptionstreameventtypes.md | 21 +- docs/models/typeenum.md | 27 +- docs/sdks/agents/README.md | 2 + docs/sdks/chat/README.md | 2 + docs/sdks/conversations/README.md | 18 +- docs/sdks/judges/README.md | 44 + pyproject.toml | 2 +- src/mistralai/client/_version.py | 6 +- src/mistralai/client/agents.py | 28 + src/mistralai/client/chat.py | 28 + src/mistralai/client/conversations.py | 36 + src/mistralai/client/judges.py | 216 ++- src/mistralai/client/models/__init__.py | 16 + src/mistralai/client/models/agent.py | 2 +- .../client/models/agentconversation.py | 2 +- .../client/models/agenthandoffdoneevent.py | 2 +- .../client/models/agenthandoffentry.py | 2 +- .../client/models/agenthandoffstartedevent.py | 2 +- .../models/agents_api_v1_agents_getop.py | 2 +- .../agents_api_v1_agents_list_versionsop.py | 2 +- .../models/agents_api_v1_agents_listop.py | 2 +- .../agents_api_v1_conversations_listop.py | 2 +- .../client/models/agentscompletionrequest.py | 17 +- .../models/agentscompletionstreamrequest.py | 17 +- src/mistralai/client/models/annotations.py | 4 +- .../client/models/archivemodelresponse.py | 2 +- .../client/models/assistantmessage.py | 2 +- src/mistralai/client/models/audiocontent.py | 4 +- .../models/audiotranscriptionrequest.py | 2 +- .../models/audiotranscriptionrequeststream.py | 2 +- .../client/models/basefielddefinition.py | 2 +- src/mistralai/client/models/basemodelcard.py | 2 +- src/mistralai/client/models/batcherror.py | 2 +- src/mistralai/client/models/batchjob.py | 2 +- src/mistralai/client/models/batchrequest.py | 2 +- .../client/models/blobresourcecontents.py | 4 +- src/mistralai/client/models/campaign.py | 2 +- .../client/models/chatcompletionrequest.py | 8 +- .../models/chatcompletionstreamrequest.py | 8 +- .../client/models/classificationrequest.py | 2 +- .../client/models/classifierfinetunedmodel.py | 2 +- .../client/models/classifierfinetuningjob.py | 2 +- .../models/classifierfinetuningjobdetails.py | 2 +- .../client/models/classifiertarget.py | 2 +- .../models/classifiertrainingparameters.py | 2 +- .../client/models/codeinterpretertool.py | 2 +- src/mistralai/client/models/completionargs.py | 2 +- .../client/models/completionchunk.py | 2 +- .../client/models/completionfinetunedmodel.py | 2 +- .../client/models/completionfinetuningjob.py | 2 +- .../models/completionfinetuningjobdetails.py | 2 +- .../models/completionresponsestreamchoice.py | 2 +- .../models/completiontrainingparameters.py | 2 +- src/mistralai/client/models/connector.py | 2 +- .../client/models/connector_get_v1op.py | 2 +- .../client/models/connector_list_v1op.py | 2 +- .../client/models/connectorcalltoolrequest.py | 2 +- .../client/models/connectorsqueryfilters.py | 2 +- src/mistralai/client/models/connectortool.py | 2 +- .../models/connectortoolcallmetadata.py | 4 +- .../models/connectortoolcallresponse.py | 4 +- .../models/connectortoolresultmetadata.py | 4 +- .../models/conversationappendrequest.py | 20 +- .../models/conversationappendstreamrequest.py | 20 +- .../client/models/conversationhistory.py | 2 +- .../client/models/conversationmessages.py | 2 +- .../client/models/conversationrequest.py | 18 +- .../client/models/conversationresponse.py | 2 +- .../models/conversationrestartrequest.py | 20 +- .../conversationrestartstreamrequest.py | 20 +- .../models/conversationstreamrequest.py | 18 +- .../client/models/conversationusageinfo.py | 2 +- .../client/models/createagentrequest.py | 2 +- .../client/models/createbatchjobrequest.py | 2 +- .../client/models/createconnectorrequest.py | 2 +- .../client/models/createfileresponse.py | 2 +- .../models/createfinetuningjobrequest.py | 2 +- .../models/creategithubrepositoryrequest.py | 2 +- .../client/models/createlibraryrequest.py | 2 +- .../client/models/customconnector.py | 2 +- src/mistralai/client/models/dataset.py | 2 +- .../client/models/datasetimporttask.py | 2 +- src/mistralai/client/models/datasetpreview.py | 2 +- src/mistralai/client/models/datasetrecord.py | 2 +- .../client/models/deletemodelresponse.py | 2 +- src/mistralai/client/models/deltamessage.py | 2 +- src/mistralai/client/models/document.py | 2 +- .../client/models/documentlibrarytool.py | 2 +- .../client/models/documenturlchunk.py | 2 +- .../client/models/embeddedresource.py | 4 +- .../client/models/embeddingrequest.py | 2 +- .../client/models/embeddingresponsedata.py | 2 +- src/mistralai/client/models/event.py | 2 +- .../feedresultchatcompletioneventpreview.py | 2 +- ...fetchchatcompletionfieldoptionsresponse.py | 2 +- .../models/fetchfieldoptioncountsrequest.py | 2 +- src/mistralai/client/models/file.py | 2 +- src/mistralai/client/models/filechunk.py | 2 +- .../files_api_routes_get_signed_urlop.py | 2 +- .../models/files_api_routes_list_filesop.py | 2 +- .../models/files_api_routes_upload_fileop.py | 2 +- src/mistralai/client/models/fileschema.py | 2 +- src/mistralai/client/models/filtergroup.py | 2 +- src/mistralai/client/models/filterpayload.py | 2 +- .../client/models/fimcompletionrequest.py | 2 +- .../models/fimcompletionstreamrequest.py | 2 +- .../models/finetunedmodelcapabilities.py | 2 +- src/mistralai/client/models/ftmodelcard.py | 2 +- src/mistralai/client/models/function.py | 2 +- .../client/models/functioncallentry.py | 2 +- .../client/models/functioncallevent.py | 2 +- .../client/models/functionresultentry.py | 2 +- ...aigns_campaign_id_selected_events_getop.py | 2 +- ...paigns_v1_observability_campaigns_getop.py | 2 +- ...ty_chat_completion_events_search_postop.py | 2 +- ...ability_datasets_dataset_id_tasks_getop.py | 2 +- ...ility_datasets_dataset_id_records_getop.py | 2 +- ...atasets_v1_observability_datasets_getop.py | 2 +- ...et_judges_v1_observability_judges_getop.py | 2 +- .../client/models/getfileresponse.py | 2 +- .../client/models/githubrepository.py | 2 +- .../client/models/guardrailconfig.py | 2 +- src/mistralai/client/models/imagecontent.py | 4 +- .../client/models/imagegenerationtool.py | 2 +- src/mistralai/client/models/imageurl.py | 2 +- src/mistralai/client/models/imageurlchunk.py | 6 +- .../client/models/instructrequest.py | 4 + src/mistralai/client/models/jobmetadata.py | 2 +- .../jobs_api_routes_batch_get_batch_jobop.py | 2 +- .../jobs_api_routes_batch_get_batch_jobsop.py | 2 +- ...utes_fine_tuning_get_fine_tuning_jobsop.py | 2 +- src/mistralai/client/models/jsonschema.py | 2 +- src/mistralai/client/models/judge.py | 2 +- ...ity_judges_judge_id_live_judging_postop.py | 29 + .../client/models/judgeconversationrequest.py | 50 + .../client/models/judgeregressionoutput.py | 2 +- .../client/models/legacyjobmetadata.py | 2 +- .../models/libraries_documents_list_v1op.py | 2 +- src/mistralai/client/models/library.py | 2 +- .../models/list_models_v1_models_getop.py | 2 +- .../client/models/listbatchjobsresponse.py | 2 +- .../client/models/listfilesresponse.py | 2 +- .../models/listfinetuningjobsresponse.py | 2 +- src/mistralai/client/models/mcpservericon.py | 4 +- .../client/models/messageinputentry.py | 2 +- .../client/models/messageoutputentry.py | 2 +- .../client/models/messageoutputevent.py | 2 +- src/mistralai/client/models/metric.py | 2 +- .../client/models/modelcapabilities.py | 2 +- .../client/models/modelconversation.py | 2 +- src/mistralai/client/models/modellist.py | 2 +- .../moderationllmv1categorythresholds.py | 2 +- .../client/models/moderationllmv1config.py | 2 +- .../moderationllmv2categorythresholds.py | 2 +- .../client/models/moderationllmv2config.py | 2 +- .../client/models/moderationobject.py | 2 +- .../client/models/observabilityerrordetail.py | 2 +- src/mistralai/client/models/ocrimageobject.py | 2 +- src/mistralai/client/models/ocrpageobject.py | 2 +- src/mistralai/client/models/ocrrequest.py | 2 +- src/mistralai/client/models/ocrresponse.py | 2 +- src/mistralai/client/models/ocrusageinfo.py | 2 +- .../models/paginatedresultcampaignpreview.py | 2 +- ...ginatedresultchatcompletioneventpreview.py | 2 +- .../paginatedresultdatasetimporttask.py | 2 +- .../models/paginatedresultdatasetpreview.py | 2 +- .../models/paginatedresultdatasetrecord.py | 2 +- .../models/paginatedresultjudgepreview.py | 2 +- .../client/models/paginationresponse.py | 2 +- src/mistralai/client/models/prediction.py | 2 +- .../models/realtimetranscriptionerror.py | 2 +- .../realtimetranscriptioninputaudioappend.py | 2 +- .../realtimetranscriptioninputaudioend.py | 2 +- .../realtimetranscriptioninputaudioflush.py | 2 +- .../models/realtimetranscriptionsession.py | 2 +- .../realtimetranscriptionsessioncreated.py | 2 +- .../realtimetranscriptionsessionupdated.py | 2 +- ...altimetranscriptionsessionupdatemessage.py | 2 +- ...altimetranscriptionsessionupdatepayload.py | 2 +- src/mistralai/client/models/referencechunk.py | 2 +- src/mistralai/client/models/resourcelink.py | 4 +- .../client/models/responsedoneevent.py | 2 +- .../client/models/responseerrorevent.py | 2 +- src/mistralai/client/models/responseformat.py | 2 +- .../client/models/responsestartedevent.py | 2 +- .../searchchatcompletioneventidsrequest.py | 2 +- .../searchchatcompletioneventsrequest.py | 2 +- src/mistralai/client/models/security.py | 2 +- src/mistralai/client/models/sharing.py | 2 +- src/mistralai/client/models/sharingdelete.py | 2 +- src/mistralai/client/models/sharingrequest.py | 2 +- src/mistralai/client/models/textchunk.py | 2 +- src/mistralai/client/models/textcontent.py | 4 +- .../client/models/textresourcecontents.py | 4 +- src/mistralai/client/models/thinkchunk.py | 2 +- src/mistralai/client/models/tool.py | 2 +- src/mistralai/client/models/toolcall.py | 2 +- src/mistralai/client/models/toolchoice.py | 2 +- .../client/models/toolconfiguration.py | 2 +- .../client/models/toolexecutiondeltaevent.py | 2 +- .../client/models/toolexecutiondoneevent.py | 2 +- .../client/models/toolexecutionentry.py | 2 +- .../models/toolexecutionstartedevent.py | 2 +- src/mistralai/client/models/toolfilechunk.py | 2 +- src/mistralai/client/models/toolmessage.py | 2 +- .../client/models/toolreferencechunk.py | 2 +- src/mistralai/client/models/trainingfile.py | 2 +- .../client/models/transcriptionresponse.py | 4 +- .../models/transcriptionsegmentchunk.py | 4 +- .../client/models/transcriptionstreamdone.py | 4 +- .../models/transcriptionstreamsegmentdelta.py | 4 +- .../client/models/unarchivemodelresponse.py | 2 +- .../client/models/updateagentrequest.py | 2 +- .../client/models/updateconnectorrequest.py | 2 +- .../client/models/updatedatasetrequest.py | 2 +- .../client/models/updatedocumentrequest.py | 2 +- .../client/models/updatelibraryrequest.py | 2 +- .../client/models/updatemodelrequest.py | 2 +- src/mistralai/client/models/usageinfo.py | 4 +- src/mistralai/client/models/usermessage.py | 2 +- .../client/models/validationerror.py | 2 +- .../client/models/wandbintegration.py | 2 +- .../client/models/wandbintegrationresult.py | 2 +- .../client/models/websearchpremiumtool.py | 2 +- src/mistralai/client/models/websearchtool.py | 2 +- src/mistralai/client/sdk.py | 2 +- src/mistralai/client/utils/eventstreaming.py | 41 +- uv.lock | 2 +- 302 files changed, 1874 insertions(+), 1839 deletions(-) create mode 100644 docs/models/judgeconversationrequest.md create mode 100644 docs/models/judgeconversationv1observabilityjudgesjudgeidlivejudgingpostrequest.md create mode 100644 src/mistralai/client/models/judge_conversation_v1_observability_judges_judge_id_live_judging_postop.py create mode 100644 src/mistralai/client/models/judgeconversationrequest.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b55995f2..bb9cb105 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,39 +1,39 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: a28f11e05b4050a47313ba9e725c55c5 + docChecksum: 08b0a109c2cd72be260f8fbb93bf2cb6 docVersion: 1.0.0 - speakeasyVersion: 1.754.0 - generationVersion: 2.862.0 - releaseVersion: 2.0.3 - configChecksum: cc3e7bf223cce3355d58aa70e4487807 + speakeasyVersion: 1.729.0 + generationVersion: 2.841.0 + releaseVersion: 2.0.4 + configChecksum: 0964286b9eba516a737f07bc6df48ae0 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: b5cdaabc-ba14-4abb-8080-6f4f928e4eb3 - pristine_commit_hash: 356e2bc15c5030be3633fae9afc292f221a450e0 - pristine_tree_hash: 683aa349d8c61cfbf8ede85bf8272b7ae49b3d4d + generation_id: 6dcdb026-3cbd-407d-9f7e-d6f1c866b4b6 + pristine_commit_hash: f08cc49c462c044585ac6aaede160115dfc89c92 + pristine_tree_hash: 3341ab4a90b3703689ce70b2079e43e422b7f653 features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.18 + core: 6.0.12 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 downloadStreams: 1.0.1 - enumUnions: 0.1.1 + enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 errors: 3.3.5 - examples: 3.0.3 + examples: 3.0.2 flatRequests: 1.0.1 flattening: 3.1.1 globalSecurity: 3.0.5 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.2.1 + globalServerURLs: 3.2.0 includes: 3.0.0 methodArguments: 1.0.2 multipartFileContentType: 1.0.0 @@ -43,7 +43,7 @@ features: responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 - serverEvents: 1.0.15 + serverEvents: 1.0.13 serverEventsSentinels: 0.1.0 serverIDs: 3.0.0 unions: 3.1.4 @@ -184,8 +184,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:b5685a779b633823ccfe99d9740078e0aab50bde - pristine_git_object: 33435732b94c81c7bccff5cf1868b2f382223200 + last_write_checksum: sha1:9c5f4de69cfa954d329cac76e7186db6e31e03c6 + pristine_git_object: 63a26c0750a478e844aa4cc39ab52c6fd67717bf docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -200,8 +200,8 @@ trackedFiles: pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:9d506ac8f620f4cef54b4b7a1891fb17b8eaefa5 - pristine_git_object: 407be8e0c1264a31cc0d80c1059f3bd62c2eaceb + last_write_checksum: sha1:8e2b38627d5f03877a8e9ac43a1117456e7f717d + pristine_git_object: f9589a4299e9c834da81388941df16069587e9fc docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -232,8 +232,8 @@ trackedFiles: pristine_git_object: 324a8e4e8656b3eef77355cc24c70ac0a2e1aa9c docs/models/apiendpoint.md: id: be613fd9b947 - last_write_checksum: sha1:843ebd98df60194f823ddcebeb1f1d334c2b16ce - pristine_git_object: e049d40ab3995e3442a009a9781ac98b4614091c + last_write_checksum: sha1:4d984c11248f7da42c949164e69b53995d5942c4 + pristine_git_object: 8d83a26f19241da5ce626ff9526575c50e5d27be docs/models/apikeyauth.md: id: 529789e1b079 last_write_checksum: sha1:edb801076d411a5d6c1f7a3f4fdb4c3612b12ab1 @@ -260,8 +260,8 @@ trackedFiles: pristine_git_object: 147708d9238e40e1cdb222beee15fbe8c1603050 docs/models/audience.md: id: 6a718c512c7f - last_write_checksum: sha1:67de107cad15a11c0edb9b6bc0d6a79fe85a6258 - pristine_git_object: 186d913ec0e78ad9f4ddf762e7aa24ec2c8122b4 + last_write_checksum: sha1:9d46fde31c3f8f43af7288359d6de60bfa8dfe6c + pristine_git_object: ac325076feae9be8b54492d4bd85cb5c52828bc0 docs/models/audiochunk.md: id: 88315a758fd4 last_write_checksum: sha1:b47b295122cea28d66212d75a1f0eccd70a248cc @@ -272,8 +272,8 @@ trackedFiles: pristine_git_object: 64ab6d26b5561e15722cab1eab3134c5a0688a91 docs/models/audioencoding.md: id: 1e0dfee9c2a0 - last_write_checksum: sha1:d3f61fdb79969e41b9925f5788246d691ba39f39 - pristine_git_object: 34b80490a315851da7e8b9e1b5e32108d40609cc + last_write_checksum: sha1:5d47cfaca916d7a47adbea71748595b3ab69a478 + pristine_git_object: feec8c71bf5a89a5c0099a9d075bc2bd36dd5f73 docs/models/audioformat.md: id: 41973dd397de last_write_checksum: sha1:b81fbaf4f8aa03937c91f76d371ad5860836a772 @@ -304,8 +304,8 @@ trackedFiles: pristine_git_object: 2a5e7515a0edc3f1a5de68ba28eae8bdec988bb1 docs/models/basetaskstatus.md: id: b709621d5c71 - last_write_checksum: sha1:19fd9c3fc71627d758635f9840be4508ffe8e361 - pristine_git_object: bb781fd1afc2b7a3587f1048e8d84d7814c21e51 + last_write_checksum: sha1:3f78b970cb0c8ba22f100af3b8b6e1730a4f86f7 + pristine_git_object: 8fad1e10f1b631d75303dbd8a977f37cacd26a33 docs/models/batcherror.md: id: 8053e29a3f26 last_write_checksum: sha1:23a12dc2e95f92a7a3691bd65a1b05012c669f0f @@ -316,8 +316,8 @@ trackedFiles: pristine_git_object: 162e2cff3a1132f2b89e57dcf1bf8b4c403b6453 docs/models/batchjobstatus.md: id: 7e6f034d3c91 - last_write_checksum: sha1:42bf12df19501db1809543e898e7cf73e3cf2aad - pristine_git_object: 7473cb1f83e47b14598347d7909968b38cfe2b54 + last_write_checksum: sha1:9e876b4b94255e1399bbb31feb51e08691bcb8fc + pristine_git_object: 64617b31488130f94bf47952ccaa4958670473c8 docs/models/batchrequest.md: id: b113ca846594 last_write_checksum: sha1:f9dc702c27b8257e008390519df744290e09c4b4 @@ -328,8 +328,8 @@ trackedFiles: pristine_git_object: c862e53730393d65a061ed63a96640859fe74adc docs/models/builtinconnectors.md: id: 9d14e972f08a - last_write_checksum: sha1:ad790344ffc177d10a7eff06482c39d722cd7b95 - pristine_git_object: 11dfd48a87d5341883fbcdf2aad1cfff8aed5587 + last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c + pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 docs/models/campaign.md: id: cc1272bc909c last_write_checksum: sha1:291f6152431f3f14c16df9005a4392907dbf03e2 @@ -344,8 +344,8 @@ trackedFiles: pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 - last_write_checksum: sha1:160ff1297bfbaa9158e575b8bd7ab573533c8f9f - pristine_git_object: c289272622b137541843bb4ba9654d0e1405ffec + last_write_checksum: sha1:b894d3408cb801e072c3c302a5676ff939d59284 + pristine_git_object: b2f15ecbe88328de95b4961ddb3940fd8a6ee64b docs/models/chatcompletionevent.md: id: fc1097c5bfe2 last_write_checksum: sha1:ef1f417581e943503acb38b503aedde3e157d934 @@ -364,8 +364,8 @@ trackedFiles: pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:4980b698006c641b1c84495c5b601cc8662b05f6 - pristine_git_object: 921161faf38b2f4d4648d6d744c08a96ed38f0a6 + last_write_checksum: sha1:98ea9e1011aa7c27ff28f4bcc44d0c2f1a75a284 + pristine_git_object: d119d0cc28bd0b2f58838d06f251348f2dfa6248 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -384,8 +384,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:c54d4a32d0d65533b79c381174690e9b735b2800 - pristine_git_object: 8761f000d4249de86265bc63da785cd807c2e7a5 + last_write_checksum: sha1:2370e3e1175b08cc828619094a94237776f1d127 + pristine_git_object: ecb8309e3f0506de17e5cac7bdc23e0ef497e70b docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -456,16 +456,16 @@ trackedFiles: pristine_git_object: 438a35d9eb0e4250a9e6bcbb7dafeb26d74e018a docs/models/classifierfinetuningjobdetailsstatus.md: id: 87737e85b845 - last_write_checksum: sha1:aad42f83c0ad41e64179d8e1d4c86f798bb3de51 - pristine_git_object: 3c6b1f52851559210efa6575832647d838aa80b0 + last_write_checksum: sha1:2ff02df3efee0f9b5867045d43fc71025fb37129 + pristine_git_object: 058c65832188f7148d96ab320114d984d618efa1 docs/models/classifierfinetuningjobintegration.md: id: 91de20176a8c last_write_checksum: sha1:e49a7c082300eb4d3106e96b21ebc6860060b8c3 pristine_git_object: 820aee4c6fcf899341d869d796b1a61d4d4eab42 docs/models/classifierfinetuningjobstatus.md: id: e3c4e672dc88 - last_write_checksum: sha1:7e33e8aa5e3c859ad992f198ae5789160874ef94 - pristine_git_object: c25d73a64d76a9cfded403a1ba84f2d3c5771a39 + last_write_checksum: sha1:1bfd306ab633d3ea73272e56796c1f63843fce22 + pristine_git_object: ca829885de056c5ccafec0fe3a901743e56deb0c docs/models/classifiertarget.md: id: 4c5c0b3e0bc7 last_write_checksum: sha1:ad16823def0acb267543c4189df32406a27685aa @@ -520,8 +520,8 @@ trackedFiles: pristine_git_object: c6bd67cde1d1628aa3efc4a53fa8487a009aa129 docs/models/completionfinetuningjobdetailsstatus.md: id: b1b717a4e256 - last_write_checksum: sha1:bcb7e6d9345ba6eea99dc8e0d3b5e2de959e8a7a - pristine_git_object: 6c7a097932391e0524c15c50f989c9d4803aee22 + last_write_checksum: sha1:97c8699f0979978ea4320da3388e18da6219cb87 + pristine_git_object: 94d795a9ba4ec743f274d4ab5666e8897d174c61 docs/models/completionfinetuningjobintegration.md: id: 392ffc2cdef2 last_write_checksum: sha1:53540da44e0edbad5d4085f81ded159dbc582a6c @@ -532,24 +532,24 @@ trackedFiles: pristine_git_object: 54225e27204b703a6b33d2d66492e272559c3b3c docs/models/completionfinetuningjobstatus.md: id: 2ac420312815 - last_write_checksum: sha1:9cd1aec6125060ed45296636592818bf2ce2f2a8 - pristine_git_object: 1fd78b9dd551168e6dc32d737dfd3d5731002725 + last_write_checksum: sha1:90f498cb04e89e8f4a424762c07231fd9030b326 + pristine_git_object: db151a1bd871a2bf231424a78c8c450b2a488099 docs/models/completionresponsestreamchoice.md: id: d56824d615a6 last_write_checksum: sha1:0296a490df009dbfd04893fdebcc88dd6102a872 pristine_git_object: 1532c25b8fc065d486f52d4610a7f757e5340875 docs/models/completionresponsestreamchoicefinishreason.md: id: 5f1fbfc90b8e - last_write_checksum: sha1:892588ab61324c6328100e402f1b219959ff4097 - pristine_git_object: 3e8c30ec1199363880991e0f8c631d32bb84a980 + last_write_checksum: sha1:20824b4a223cbd3658b32440973a7d47dcd108b9 + pristine_git_object: 0fece473297227c75db4e7ded63417a2f117cac0 docs/models/completiontrainingparameters.md: id: b716b0195d39 last_write_checksum: sha1:1d8d7c469f933ea741ec15c8b9ef8b986e0ca95e pristine_git_object: 4746a95df18c78331f572425a16b2b3dcbc2df4c docs/models/confirmation.md: id: 19b9e48a3c2e - last_write_checksum: sha1:6e199c756ce35e2bff3b67df5d97b4520518b271 - pristine_git_object: c87093846ca27940a08318fb090c60ce56a00651 + last_write_checksum: sha1:eb6494cb19f23c6df62afb009cc88ce38d24af86 + pristine_git_object: fd6e6aaa58cabba0cdec1b76ac50fb6e46f91b07 docs/models/connector.md: id: cbf7c2c53983 last_write_checksum: sha1:477e81b9e908f8c40e22cffcf4e7cd6ae38fe34e @@ -616,20 +616,20 @@ trackedFiles: pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 docs/models/conversationappendrequest.md: id: 722746e5065c - last_write_checksum: sha1:dbf638146381f10f00f8391fb6c7dac7f7cfb860 - pristine_git_object: 471fcc31a964e7aa6fbd3db59fd4a892f5a8a67e + last_write_checksum: sha1:c8a4a49f0a1fe5cdd2ef6264ef9c600cfc8f7beb + pristine_git_object: 78a96508e4e1c6f83de4556d0bfa3b10c875da37 docs/models/conversationappendrequesthandoffexecution.md: id: e3f56d558037 - last_write_checksum: sha1:1290b8ac33f16e1cb22314469f2d739b3c525eae - pristine_git_object: 70cef2ede8392519f4c50cd695f8788cc6f81200 + last_write_checksum: sha1:dc71c8db746bb08f6630e995cf6af9fda747e954 + pristine_git_object: 7418b36a55fab959639aec456a946600eb908efb docs/models/conversationappendstreamrequest.md: id: e9f8131435e8 - last_write_checksum: sha1:9a65015064014693b30ad789af8052fc99bca730 - pristine_git_object: a54d5d3e91c9fcb3819a93dee8ef177ff745e5aa + last_write_checksum: sha1:3afe7eaafbf61abcd9341ee8fbca5c6d0c2db0ab + pristine_git_object: daea9c522a8a0693edce11b1bbeca1f2cba0781e docs/models/conversationappendstreamrequesthandoffexecution.md: id: 5739ea777905 - last_write_checksum: sha1:f341a41c54f52a06f5ce748f7210cd33b3d0474d - pristine_git_object: dea519789f6493687a3f67a972757435ebf236b2 + last_write_checksum: sha1:c85584b63c0c5d859ee5d46d6ae167a8ee44e279 + pristine_git_object: 1bbced3e61a521401ae93a7b1f73d0e9c061e5fd docs/models/conversationevents.md: id: be63cc7c526e last_write_checksum: sha1:1667c767ef53fd7aef90452fde2a8245ed2b2ae6 @@ -656,16 +656,16 @@ trackedFiles: pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:fff53e06f2409c4de6fa8f6a56efad5c165b7685 - pristine_git_object: 6a5dc206ecd4bb115647270adfebcc955b59dcb8 + last_write_checksum: sha1:bfb3664fa8011fb44786d6e5c32cd5c0eed3058d + pristine_git_object: 903d13c1d92d31aa7db836bbd796fe0875892219 docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 pristine_git_object: 9f2518211256762d03dec12c4c4464d48f7ed52c docs/models/conversationrequesthandoffexecution.md: id: 9733b1e121d1 - last_write_checksum: sha1:a272071fc088868920874ac89efc6b2f320a8044 - pristine_git_object: de9dc287e1f885ad247b2b79517f127b1b147a38 + last_write_checksum: sha1:f7df210a46acf24abb1312123aebe9e595a190e8 + pristine_git_object: e7314f7e0080ff3f1a80afdbb229c78df5b008bb docs/models/conversationrequesttool.md: id: bd1bb6fcea8b last_write_checksum: sha1:9c04dc1c7401b775671130cce7a1d85fbdf35957 @@ -680,44 +680,44 @@ trackedFiles: pristine_git_object: fe8ad1b5f8f3a48b48b9e2d09814af7df0ed3788 docs/models/conversationrestartrequest.md: id: 558e9daa00bd - last_write_checksum: sha1:0f7b4fdb5c945bbe8e49857965756c6bdc6f5ce4 - pristine_git_object: be0f2289b02395c888391b6f7e8e657c49343d47 + last_write_checksum: sha1:40ca7ee3ad13bf14f19816a6f54e44a4088f8317 + pristine_git_object: 08f47bba0663f5d7ea4d9c8d604814de095c1c87 docs/models/conversationrestartrequestagentversion.md: id: e6ea289c6b23 last_write_checksum: sha1:a5abf95a81b7e080bd3cadf65c2db38ca458573f pristine_git_object: 019ba301411729ec2c8078404adae998b3b9dacd docs/models/conversationrestartrequesthandoffexecution.md: id: faee86c7832c - last_write_checksum: sha1:1e94d552a7f00bbfa4ca2847b927ee0cd11b64f1 - pristine_git_object: 4e202d69ae83fa11798c8b88a34a0246a3d764fe + last_write_checksum: sha1:44728be55e96193e6f433e2f46f8f749f1671097 + pristine_git_object: 5790624b82ce47ea99e5c25c825fbc25145bfb8e docs/models/conversationrestartstreamrequest.md: id: 01b92ab1b56d - last_write_checksum: sha1:768a1d573b5fa034fefcf74e0ae9bc16f6558025 - pristine_git_object: f99a6e3404aea78062d2fd86652649ffd0f03d98 + last_write_checksum: sha1:4f1ed18522112ed6b2c2f5def38b418d0c04dab3 + pristine_git_object: 3ad739aa8d254dba746590245e8490268c71dc51 docs/models/conversationrestartstreamrequestagentversion.md: id: 395265f34ff6 last_write_checksum: sha1:ebf4e89a478ab40e1f8cd3f9a000e179426bda47 pristine_git_object: 9e0063003f1d8acce61cf4edda91ddbc23a3c69d docs/models/conversationrestartstreamrequesthandoffexecution.md: id: 3e9c4a9ab94d - last_write_checksum: sha1:41587c4d9516da340a0d55f79cdf9370bca9f4fa - pristine_git_object: 9d2c5633820affc1e265367f7e392ec5ffc35468 + last_write_checksum: sha1:300e197f11ad5efc654b51198b75049890258eef + pristine_git_object: 97266b43444f5ed50eeedf574abd99cb201199fd docs/models/conversationsource.md: id: b50fdc875f45 - last_write_checksum: sha1:9c5bbff0c90b33609939b6455be62e85e682eebc - pristine_git_object: ee88d9d4631c62e2845294950cc7e787316bf461 + last_write_checksum: sha1:7a3fd66a8fa02456465f6218559a73bf9ae5413e + pristine_git_object: 12bf7c1fa98223675c6b27f6010d05c9b78e7017 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:5e9f0e779acc11017dbce26e1a4d2be179cdca99 - pristine_git_object: af50989c156f08ea1781d2767be422662945e9c2 + last_write_checksum: sha1:bfa762698bd078c1a046e0f17d0316299ae11288 + pristine_git_object: 8debea1c3e036e2fa7d21e6aa5f2883173b4988a docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 pristine_git_object: 52ee96720abbb3fec822d0792dbde7020f9fb189 docs/models/conversationstreamrequesthandoffexecution.md: id: e6701e5f9f0c - last_write_checksum: sha1:05c7e19550d5c79d59a180422b49e710415fbf46 - pristine_git_object: 247bfd23c034c3e4c5c497e9e372c7ea8fea0dc0 + last_write_checksum: sha1:ef2ebe8f23f27144e7403f0a522326a7e4f25f50 + pristine_git_object: c98e194c1d204c3a5d4234f0553712a7025d7f85 docs/models/conversationstreamrequesttool.md: id: 71df6212ff44 last_write_checksum: sha1:04f89a30daec9bad78f99d0bcf28c8a717fc7833 @@ -880,8 +880,8 @@ trackedFiles: pristine_git_object: 102fca261d4ada514a7df14415383c1da9e59782 docs/models/embeddingdtype.md: id: 22786e732e28 - last_write_checksum: sha1:1f348c1b3dba72dd710c1eee3953556d051366f8 - pristine_git_object: 301585b20b8e5c433dbff021782a543c599e6115 + last_write_checksum: sha1:dbd16968cdecf706c890769d8d1557298f41ef71 + pristine_git_object: 01656b0a85aa87f19909b18100bb6981f89683fc docs/models/embeddingrequest.md: id: bebee24421b4 last_write_checksum: sha1:087230e81cfbbc539edc7cc1c0a490728276d217 @@ -900,12 +900,12 @@ trackedFiles: pristine_git_object: 20b50618ac99c63f7cf57fe4377840bfc1f85823 docs/models/encodingformat.md: id: 066e154e4d43 - last_write_checksum: sha1:cc98abdb803d374146f58a6811c9e3f2b58ff5f3 - pristine_git_object: 8bc9e8c6bd3fdc8bd5a28edb381c662e74c86e72 + last_write_checksum: sha1:8d6c4b29dea5ff7b0ae2b586951308fad99c60eb + pristine_git_object: 7d5941cfe6cea2e85b20d6fb0031e9b807bac471 docs/models/entitytype.md: id: 130a2f7038b0 - last_write_checksum: sha1:506be1dd51ec1f429246390757cbc0676677bd82 - pristine_git_object: 44fb9d6b281bd052273db94cbd60230e732e98a1 + last_write_checksum: sha1:01c3c10e737bcd58be70b437f7ee74632972a983 + pristine_git_object: 7c040b382d4c1b6bc63f582566d938be75a5f954 docs/models/entry.md: id: da9a99ab48ab last_write_checksum: sha1:4971db390327db09f88feff5d2b8a0b1e6c5b933 @@ -964,8 +964,8 @@ trackedFiles: pristine_git_object: 18217114060ac4e4b45fefabace4628684f27e5c docs/models/filepurpose.md: id: ed6216584490 - last_write_checksum: sha1:c38460a32b8a0a21aab0a298d62e5a26cde2339b - pristine_git_object: af6dc9fa4e02b1d385595a76b62721e214fb0c85 + last_write_checksum: sha1:02767595f85228f7bfcf359f8384b8263580d53a + pristine_git_object: 14cab13ee191ae60e2c5e1e336d0a5abc13f778b docs/models/filesapiroutesdeletefilerequest.md: id: 7fdf9a97320b last_write_checksum: sha1:411e38d0e08a499049796d1557f79d669fc65107 @@ -988,16 +988,16 @@ trackedFiles: pristine_git_object: 961bae1f51a4ae9df21b28fd7a5ca91dc7b3888b docs/models/filesapiroutesuploadfilefilevisibility.md: id: 7b934c9d9d25 - last_write_checksum: sha1:5ae94156f76a9fc6aab082c29c0163eb8e182e11 - pristine_git_object: c1f89309c4233d5af34b6f2b71cc48bc8e94e487 + last_write_checksum: sha1:10c16a937f01a3eaa6b508ef2b8b4c99d968ed9e + pristine_git_object: 055f071b90f9a9d0e744f4fe1b4bead3e4647bf2 docs/models/fileschema.md: id: 9a05a660399d last_write_checksum: sha1:e69c38d738bfba7e1d7cb5938c17fcbc56fecf4c pristine_git_object: 154548404d257f0b7339e2e3e74d2dcc23a98a4d docs/models/filevisibility.md: id: 2cdcd7761007 - last_write_checksum: sha1:b63a786a0f73b0271e9eb2c70200939ebd9f13a7 - pristine_git_object: 4e6c9ed95a982f198a9efab4a841a41a23f0aad9 + last_write_checksum: sha1:61af0b14a6b504e9383cd7d68ad66eb0abc84e5f + pristine_git_object: 4ed11692a8773cb06edbfcd0b4afb14766d6807a docs/models/filtercondition.md: id: dd561c647715 last_write_checksum: sha1:5ead258c0e3905e8a10b16e4e5b9b267e3a12747 @@ -1036,20 +1036,20 @@ trackedFiles: pristine_git_object: 5a9e2ff020d4939f7fd42c0673ea7bdd16cca99d docs/models/finetuneablemodeltype.md: id: e16926b57814 - last_write_checksum: sha1:8a107793e370a8dfc1e85e165dc9b18aeefc9460 - pristine_git_object: 9ec9634f0b486728071c4c360119508408c1d316 + last_write_checksum: sha1:52006811b756ff5af865ed6f74838d0903f0ee52 + pristine_git_object: 34b24bd4db1ad3f9e77e2c6a45a41d2fbc5cf7fd docs/models/finetunedmodelcapabilities.md: id: 3a6a0498ccf7 last_write_checksum: sha1:82fc7d3f4e0b591b757f202699bb645bc61c69ff pristine_git_object: d3203a2adccb7eb89c58395952c3e5a123a5b31b docs/models/format_.md: id: a17c22228eda - last_write_checksum: sha1:72d2d0549cd18ea564007a268c13bfd1eba219ec - pristine_git_object: 5bf1ed0cfa19f2edd4c6a1a7c66c7f093043a700 + last_write_checksum: sha1:dad6de59fec6378d50356007602e2a0254d8d2e4 + pristine_git_object: 97d286a4ed7cff0a4058bbfa06c4573428182876 docs/models/ftclassifierlossfunction.md: id: b546cfde5aa6 - last_write_checksum: sha1:6d0c38aeb4e69eae579b0e65e2769c6ae8dcb30d - pristine_git_object: 36d3db18679569d21e6bacfe13bcd22715372297 + last_write_checksum: sha1:752d9d238a90a3ef55205576fa38cee56ea1539e + pristine_git_object: 919cdd384315c99d4b590bc562298403733344ce docs/models/ftmodelcard.md: id: 15ed6f94deea last_write_checksum: sha1:5873780bc2a828f1164818eb9c64c3f69c6618cc @@ -1072,16 +1072,16 @@ trackedFiles: pristine_git_object: f1f6e39e724673556a57059a4dbda24f31a4d4b9 docs/models/functioncallentryconfirmationstatus.md: id: 18f36160d744 - last_write_checksum: sha1:3dc2f763ea0d74ebc781de4bf9e1b4e8d50382fc - pristine_git_object: 91231a0afa9b107636ca1446886ff2939d8dba5a + last_write_checksum: sha1:cc3ea4e03d26a1b22f94d42a87bd5ae63535d266 + pristine_git_object: 8948beb6d9ac647ada655960284dfc7f6d1f5ca1 docs/models/functioncallevent.md: id: cc9f2e603464 last_write_checksum: sha1:58c6ee00af0c63614fd7506345977f9f2d8838ec pristine_git_object: 0e3a36d6045a69e96c40836cdb586424225775af docs/models/functioncalleventconfirmationstatus.md: id: a33cc7957407 - last_write_checksum: sha1:8cdbace8d072cd259dd11cc306b8c077065780a6 - pristine_git_object: 95bebe968adb78710b68ef68a3bee86b16673a9a + last_write_checksum: sha1:36ac2d3442d83cbb1256e86f413134296bf8e90f + pristine_git_object: 4a3c8774d4eec4e1f5fea23a1827082e09f91669 docs/models/functionname.md: id: 4b3bd62c0f26 last_write_checksum: sha1:754fe32bdffe53c1057b302702f5516f4e551cfb @@ -1188,8 +1188,8 @@ trackedFiles: pristine_git_object: 5145469e26759e7df9477dce921c800b70af424b docs/models/imagedetail.md: id: f8217529b496 - last_write_checksum: sha1:f19cce37f0bdaa8c4e797690de19f01374ee4086 - pristine_git_object: bd7ea1fe08f2fcc737d6951a44584e22578ed9ba + last_write_checksum: sha1:fdf19ac9459f64616240955cb81a84ef03e775c8 + pristine_git_object: 1e5ba3fd405a14e5e2872cc85504584dca19b726 docs/models/imagegenerationtool.md: id: d5deb6b06d28 last_write_checksum: sha1:a1813ef99e4a0990fd073bb2311c475e88072029 @@ -1200,8 +1200,8 @@ trackedFiles: pristine_git_object: 6358e0acb2dea4816203413842243704ca955783 docs/models/imageurlchunk.md: id: 4407097bfff3 - last_write_checksum: sha1:da7a792f7b649f311062338dfbf3d25ff55fe6c5 - pristine_git_object: db0c53d22e29fa25222edb86b264e5135879a029 + last_write_checksum: sha1:05e0c3053720c6ad6c663237a3f3621e0e9fed9f + pristine_git_object: 6d238e255d368c1b12ddc231dc5f8dc11279d47e docs/models/imageurlunion.md: id: 9d3c691a9db0 last_write_checksum: sha1:4e32bcd7d44746d2ddbfafbef96152bb2bdb2a15 @@ -1236,8 +1236,8 @@ trackedFiles: pristine_git_object: d5771207d9725f04ca2ab1be692fc089360a58f4 docs/models/instructrequest.md: id: a0034d7349a2 - last_write_checksum: sha1:34a81411110cbb7a099c45e482f5d1702ae48fd3 - pristine_git_object: 5f0cdfff135fb72d3b1a81999a30b720c044e3d4 + last_write_checksum: sha1:45632a9226f6539dc978eb46cdda7bffce624838 + pristine_git_object: 1bd5eb649ba747cced7bb4ec89ce5d48c303ef0b docs/models/instructrequestmessage.md: id: 380503708a09 last_write_checksum: sha1:551b5d6dd3ba0b39cad32478213a9eb7549f0023 @@ -1288,8 +1288,8 @@ trackedFiles: pristine_git_object: 23c52c342358ea889b25ee7b18b381b68519c6cf docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md: id: 8545ffb587d6 - last_write_checksum: sha1:97fd42195fa792d504b5adc89e4fd159ac5416b9 - pristine_git_object: 1436f6aef8b2a3c26bd084e7916f6a104bf9ddcb + last_write_checksum: sha1:bbc08ca53c2da180b96ed0347cf4954410c79311 + pristine_git_object: 40d57686aec11d9bdc4c116ea4c98183e0a6414c docs/models/jobsapiroutesfinetuningstartfinetuningjobrequest.md: id: b4e2b814d8c3 last_write_checksum: sha1:f13b5c8f2e74cc73b58a30d366032c764603f95e @@ -1334,6 +1334,14 @@ trackedFiles: id: 41dde6c5cf31 last_write_checksum: sha1:25cc262d748a2c9285cccdc8ed6c3d1572016a2b pristine_git_object: 67e08ed21124756e4fe471bba5deccfc9bc7ebd2 + docs/models/judgeconversationrequest.md: + id: d2a3c6b8ddd3 + last_write_checksum: sha1:b40e607d37edf7fca7f1fb19a05688da61bf6400 + pristine_git_object: 491c3b3459b508d7573daa77ac46a8aedfb78161 + docs/models/judgeconversationv1observabilityjudgesjudgeidlivejudgingpostrequest.md: + id: c5ca3ccf1640 + last_write_checksum: sha1:946d24c242aff90e205bae751cc62c42db1585f7 + pristine_git_object: 4d36242330ae3b9d49984151f0cef6793b2cb1e2 docs/models/judgedatasetrecordrequest.md: id: 8b53c13e8af5 last_write_checksum: sha1:6f636ff57171c21f214b012dbde5400be91057c4 @@ -1348,8 +1356,8 @@ trackedFiles: pristine_git_object: 4abeffa50be5eb60802391062302e9106f1ccfd0 docs/models/judgeoutputtype.md: id: 49623b360404 - last_write_checksum: sha1:d47557ab8f7ae50d94c597ea2e827b1e5a603a90 - pristine_git_object: 35a1a8373a8c072d90d7e93264209bd894ed92b5 + last_write_checksum: sha1:2bb675f4824785fdce67918e698eeec682a59e5d + pristine_git_object: 6e9dfd7200de7457590b9f68c2e95361e4ebf128 docs/models/judgeoutputunion.md: id: 636200cea9aa last_write_checksum: sha1:382aa75d840423705f9477cb77ca2a5832a1ee69 @@ -1544,8 +1552,8 @@ trackedFiles: pristine_git_object: 7f86303651650177ece51b82d867cab858e830ae docs/models/mistralpromptmode.md: id: d17d5db4d3b6 - last_write_checksum: sha1:d7804c45f10f2e929276d4a00bf6c2b966a78fb5 - pristine_git_object: 9b234e3ea8fc13261897acf18ce4da3b14485f72 + last_write_checksum: sha1:abcb7205c5086169c7d9449d15ac142448a7d258 + pristine_git_object: c3409d03b9646e21a3793372d06dcae6fef95463 docs/models/modelcapabilities.md: id: 283fbc5fa32f last_write_checksum: sha1:98df9700314cc4ee6051e0e18d22dfaacb0ad648 @@ -1568,8 +1576,8 @@ trackedFiles: pristine_git_object: b44e84a00d0c54f8df78650d45de0a409c901048 docs/models/moderationllmaction.md: id: 26373b4ad9cd - last_write_checksum: sha1:d8398d9c6b0da5f6a9947342c2cfc2d04e599519 - pristine_git_object: e46a30b4c3737fa2098d2502b896edb2c950b2c8 + last_write_checksum: sha1:da6507feedd7db7e8e0c0d5ca3428e3f5a3aee9a + pristine_git_object: 951880b61ec0e40c30c427f9c2b5f68c5a89a7e2 docs/models/moderationllmv1categorythresholds.md: id: b474ca28a6e7 last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 @@ -1604,8 +1612,8 @@ trackedFiles: pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:406db6551a5ee4efba4b876239245c71f0d93822 - pristine_git_object: d121b2641c0f58c62c3b3cc73c5fdffe5e7c1d92 + last_write_checksum: sha1:cba4ebf5b8b3007046c124504e1472bcd464f109 + pristine_git_object: 0c387f570c7b96c402c0e3d60108ee4cdcb22764 docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -1640,12 +1648,12 @@ trackedFiles: pristine_git_object: d9d79125cb02bc2b09d8dc543a5e2d4a6c55571c docs/models/op.md: id: 4f953e6b890f - last_write_checksum: sha1:24b06144f98d9843f99402c3dc890fa911646e52 - pristine_git_object: da9031db6360c37490c3b30f9608bfb9776c38ca + last_write_checksum: sha1:ca76665f125d37edbcf87a36a2aaafdb722d03a4 + pristine_git_object: fa3e2f3a9e437f6bd82ad87e1589484392ccb68c docs/models/operator.md: id: 1b6d3fc58add - last_write_checksum: sha1:98ac05cdbd6839c9ff93c4d805eebd7ba9f26dcd - pristine_git_object: 2790c574454daba86720666a2877ffa4467a4134 + last_write_checksum: sha1:e1008f48087ee8da75dd25be6207f7b2098fe131 + pristine_git_object: ca54debcf338366f66c540fdb2020e85959ef5b9 docs/models/option.md: id: b70901c8beab last_write_checksum: sha1:aeac15a068312b38625c3efcd08f5f179f607f92 @@ -1656,8 +1664,8 @@ trackedFiles: pristine_git_object: 2a2172695146be50782a3ef32815950d4829cf64 docs/models/orderby.md: id: 9e749ed80f72 - last_write_checksum: sha1:4f6dd8e684dd11e4856d3d6cf2c0f2e2d1a01640 - pristine_git_object: d778621f6b1e6788aecbe25bd741d27a0d863990 + last_write_checksum: sha1:6ec002e3e59f37002ccb14e347b790ca4daef773 + pristine_git_object: bba50df10855a8d6acdf4b061ec2ffeb0279fd7f docs/models/outputcontentchunks.md: id: f7e175c8e002 last_write_checksum: sha1:5094466110028801726cc825e8809f524fe1ee24 @@ -1728,8 +1736,8 @@ trackedFiles: pristine_git_object: 514caa50e524ae5afab802b8394cb27189b2bfbe docs/models/processstatus.md: id: "336054835357" - last_write_checksum: sha1:43253d2ef4badf3a5e8e5981becfb558c934359a - pristine_git_object: 68313743c4d926b2cb29037d0e59a2f9d8d25f1c + last_write_checksum: sha1:9b87de1980428307af6c29c2086c0e1f612ebd72 + pristine_git_object: 3a9c004e55cc31abb52d1f0bb450290465d42a1c docs/models/realtimetranscriptionerror.md: id: 4bc5e819565b last_write_checksum: sha1:c93e4b19a0aa68723ea69973a9f22a581c7b2ff6 @@ -1784,8 +1792,8 @@ trackedFiles: pristine_git_object: f9769645cbbb8a59c30f60a4e0d0caec60d82ad0 docs/models/requestsource.md: id: 8857ab6025c4 - last_write_checksum: sha1:5634447d01c483713dad3d6d39df182007e6181b - pristine_git_object: b710cc1f394e04ecc93c9fc6daddddec366254ad + last_write_checksum: sha1:4b7ecc7c5327c74e46e2b98bd6e3814935cdecdf + pristine_git_object: c81c115992439350d56c91d2e3351a13df40676b docs/models/resource.md: id: 94a32a903140 last_write_checksum: sha1:0c141e37497f5b07d2da77a41777617ed3653582 @@ -1796,8 +1804,8 @@ trackedFiles: pristine_git_object: 074c573e64e98cbaf177fde279364f26df04a2bf docs/models/resourcevisibility.md: id: 891d464e9c47 - last_write_checksum: sha1:cb0eaebe4e984ab4d999745a142868d2359ab8e4 - pristine_git_object: 970211bb11b10aac688084845d1172e65d1ced1d + last_write_checksum: sha1:acf48cc74f27035f479f976e73897ea02d7eaaa8 + pristine_git_object: 9c06af2d034cb7de730aa39aa3a3188aac4bc764 docs/models/response.md: id: 583c991c7a30 last_write_checksum: sha1:0791cb4aa4045708ab64d42bf67bd6ab74bc7752 @@ -1816,8 +1824,8 @@ trackedFiles: pristine_git_object: 5cab22f2bf1c412699f6a7ed18ef801ecbc3ee4b docs/models/responseformats.md: id: cf1f250b82db - last_write_checksum: sha1:c7fedb61c8c40d4ff6bebefa37133668e5a8582d - pristine_git_object: 12e5edd7ffaa05000f26cab5e92a7ea1570a94f9 + last_write_checksum: sha1:105e1f9181913104b554051838cbdd0f728aa2c4 + pristine_git_object: 2f5f1e5511b048323fee18a0ffdd506fe2b3d56f docs/models/responseretrievemodelv1modelsmodelidget.md: id: 6143ec73bdd6 last_write_checksum: sha1:6bae62cbb18559065a53f0acdacb1f72f513467e @@ -1836,12 +1844,12 @@ trackedFiles: pristine_git_object: f1280f8862e9d3212a5cfccd9453884b4055710a docs/models/role.md: id: b694540a5b1e - last_write_checksum: sha1:dd140bf891a9b08db014fde4a99af28839e10dfb - pristine_git_object: b16f5c3baef6a17d3900b3eddcc5034e37a12b01 + last_write_checksum: sha1:c7ef39a81299f3156b701420ef634a8b4fab76f0 + pristine_git_object: 853c6257d9bdb4eda9cb37e677d35ab477dca812 docs/models/sampletype.md: id: 0e09775cd9d3 - last_write_checksum: sha1:b77964a7b39ec1b74f70925a39c30b23fad6ac43 - pristine_git_object: 31f26c3c2869a453306fff5b062b40e95aa5f19a + last_write_checksum: sha1:33cef5c5b097ab7a9cd6232fe3f7bca65cd1187a + pristine_git_object: 34a6a012b1daeeb22626417650269e9376cc9170 docs/models/searchchatcompletioneventidsrequest.md: id: ace22de1b563 last_write_checksum: sha1:0368a82e5b6399806252670aec01714e5bb78331 @@ -1864,8 +1872,8 @@ trackedFiles: pristine_git_object: 2e0839d06f821dd97780dc22f202dedf23e4efe1 docs/models/shareenum.md: id: 53a713500576 - last_write_checksum: sha1:de5c59ca89596a3b28134a9f7318fed3b3e6af02 - pristine_git_object: d471b7c3c6700146dc02e20d3aa6205a5025d134 + last_write_checksum: sha1:9d45d4bd272e6c146c3a8a21fd759acf2ae22148 + pristine_git_object: dc5d2b68a810c2983b5a47fbff747dfc2cc17598 docs/models/sharing.md: id: 9f1e88417a87 last_write_checksum: sha1:876fd514d08a6987646bf0fec636bf3fef89155b @@ -1880,16 +1888,16 @@ trackedFiles: pristine_git_object: 21b8ec1f74c1f903aa087cd3b4d13918c0ea9dad docs/models/source.md: id: 6541ef7b41e7 - last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 - pristine_git_object: 37ca338b6f2ba9d10209cbcd3c680b7589589767 + last_write_checksum: sha1:d0015be42fe759d818ebd75b0cec9f83535a3b89 + pristine_git_object: bb1ed6124647b02c4350123bf257b0bf17fc38fd docs/models/ssetypes.md: id: 6a902241137c - last_write_checksum: sha1:6291d6bc7cbcd7640b83b03ac8ce353b95c1f913 - pristine_git_object: 372eafee6f22105d6f5fd31f2e04ea04f5abe641 + last_write_checksum: sha1:567027284c7572c0fa24132cd119e956386ff9d0 + pristine_git_object: ae06b5e870d31b10f17224c99af1628a7252bbc3 docs/models/supportedoperator.md: id: 000f0770e0f9 - last_write_checksum: sha1:ea71b0062712f8750234d8bd5313063589de1155 - pristine_git_object: 97dbd4b14b71389273583d142009548abca92e1f + last_write_checksum: sha1:7702df7346f66b739b5a7e1d26b2d5ebc9d19c74 + pristine_git_object: 74cf9b8e6705059a24e7d1d0e311943ed1ce5c40 docs/models/systemmessage.md: id: fdb7963e1cdf last_write_checksum: sha1:c7603c5ce77ba2bcbda9eff65eeafdb1e9ecbec7 @@ -1904,8 +1912,8 @@ trackedFiles: pristine_git_object: 40030c170746d9953d25b979ab7e6f522018e230 docs/models/tableformat.md: id: d8cd08c55c3c - last_write_checksum: sha1:3ef23d504527602f2d0789d2cfb1a6629115f41a - pristine_git_object: 8321a3090910115b586be900bcf23da5baf4c245 + last_write_checksum: sha1:e0736ea9576466d71821aa1e67fc632cc5a85414 + pristine_git_object: 54f029b814fdcfa2e93e2b8b0594ef9e4eab792a docs/models/textchunk.md: id: 6cd12e0ef110 last_write_checksum: sha1:d9fe94c670c5e0578212752c11a0c405a9da8518 @@ -1928,8 +1936,8 @@ trackedFiles: pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/timestampgranularity.md: id: eb4d5a8e6f08 - last_write_checksum: sha1:b423f56d3a6004ed89c356806002b2af3e5c5a56 - pristine_git_object: 4c84779c4d2e8bf2a2fe258c2b350b05d047f2e3 + last_write_checksum: sha1:e256a5e8c6010d500841295b89d88d0eface3b88 + pristine_git_object: d20012ea9925446c16c9162304642ba48391d34d docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a @@ -1948,8 +1956,8 @@ trackedFiles: pristine_git_object: 373046bbbc834169293b4f4ae8b2e238f952ddde docs/models/toolchoiceenum.md: id: 15410de51ffc - last_write_checksum: sha1:cdff87c62661fcb902824fda8e305c5b1b98b3d8 - pristine_git_object: eb1f36298acfc2c3aa33224e95c87f17da9caf0d + last_write_checksum: sha1:ca0cf9bf128bebc8faedd9333cc6a56b30f58130 + pristine_git_object: 0be3d6c54b13a8bf30773398a2c12e0d30d3ae58 docs/models/toolconfiguration.md: id: 06bfa2c4e662 last_write_checksum: sha1:9b619977375f228c76f09d48d6e2833add6c07e2 @@ -2012,8 +2020,8 @@ trackedFiles: pristine_git_object: 999f7c34885015a687c4213d067b144f1585c946 docs/models/tooltypes.md: id: adb50fe63ea2 - last_write_checksum: sha1:d0d67b717773cbc99add6716e0287e64f04d24df - pristine_git_object: 345ee7dc07187e1ee06726ec63ffb75e1a34e736 + last_write_checksum: sha1:f224c3d8732450b9c969b3e04027b7df7892694c + pristine_git_object: 84e49253c9b9bd1bd314e2a126106404cbb52f16 docs/models/trainingfile.md: id: 4039958e8930 last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648 @@ -2040,8 +2048,8 @@ trackedFiles: pristine_git_object: eea8e9281634c56517e28f613afee38e0b0846ad docs/models/transcriptionstreameventtypes.md: id: 701782e8a63d - last_write_checksum: sha1:7a6fc032e6dd63912472b9158c07cf20ceefe7e3 - pristine_git_object: 9e49384e399f15e70382050ee414a7446d1e4b70 + last_write_checksum: sha1:ff79dfb5d942c807b03c9e329a254bfa95b99a16 + pristine_git_object: e4eb25a6400dcc5a48b5eb5f65e96f7be91fa761 docs/models/transcriptionstreamlanguage.md: id: 5e9df200153c last_write_checksum: sha1:d5626a53dde8d6736bab75f35cee4d6666a6b795 @@ -2056,8 +2064,8 @@ trackedFiles: pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d docs/models/typeenum.md: id: d306d1d601a4 - last_write_checksum: sha1:f0f0bfac75bf5e5fcd972d0cb196961d512d40ad - pristine_git_object: ec47cf9668f839469c9ab71c010f3e1975be929c + last_write_checksum: sha1:506e72f893c4cebf7bbeb59fd05fbe5caafdb68c + pristine_git_object: 80a66af314d5ba9f5a99b07f3db9760849edad53 docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 @@ -2164,8 +2172,8 @@ trackedFiles: pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:a73ae6719acef32b47be55ea5c5684e91f7eda68 - pristine_git_object: 8a60837030b9e5dd0adca0d07d9f0266158b080f + last_write_checksum: sha1:506e1f1951252f82f5ef804ec53acbfd9d67f767 + pristine_git_object: 5a47f54e738a99dab0eddff3837effb4e0413ecc docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:b4b3123ff210545048e2b0c729f2b7e5f7460f4e @@ -2180,8 +2188,8 @@ trackedFiles: pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:5e7a43def5636140d70a7c781ed417e527ce9819 - pristine_git_object: 1bf4aeadc762f5d696c278eefaa759f35993e9d5 + last_write_checksum: sha1:d89d55ed51fe1729187fc4f1376ec21bb53f8120 + pristine_git_object: 64e47d344d1d1b40cfd120a313ecf0551fff3598 docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -2196,8 +2204,8 @@ trackedFiles: pristine_git_object: b8150eb85d182af6e7ed8216cc4b4a535271a53a docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 - pristine_git_object: 63cd80a4a655a5c139be79239b0787c3f90cdea9 + last_write_checksum: sha1:3bc235805eff20efdb634834e11f519a5d09dd47 + pristine_git_object: 0803b39816e5393050f383407f162446eb0d455d docs/sdks/datasets/README.md: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 @@ -2228,8 +2236,8 @@ trackedFiles: pristine_git_object: 4262b3a9833180ce86da43a26ee7ab27403f2cd0 docs/sdks/judges/README.md: id: 330e067ff8b7 - last_write_checksum: sha1:270582ab7a4200c44b0c865afb6b82d6e0c95182 - pristine_git_object: f1187518e46b00d8fb1b2bb0c4c72f51cd828a2b + last_write_checksum: sha1:e21c7f2201ab3e2ed14c5be687e5291f7c6ee9cb + pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 last_write_checksum: sha1:e3eb0e9efb3f758fdf830aa1752c942d59a4f72b @@ -2276,16 +2284,16 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:0e303dbbffd662c25a730fc8e8722335aa60bd56 - pristine_git_object: 4531730bf1c2d53c691ae836aff2478b6ffc0aa9 + last_write_checksum: sha1:ae762d069de61230d0fe491f5194768ca4c53599 + pristine_git_object: 42d3fa9d7791607d6d915253ae1bdb4c0a9032ef src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:7049cab7c308888c88b0341fb29f0132e154e3cb - pristine_git_object: 2b70d1520663d999773159d89b1f9dc96f7fbf97 + last_write_checksum: sha1:f60f8126ec99df039b1c9480366089a88fcc31bc + pristine_git_object: aecd1430c3b00c05ad2858d47cd70aa455097bb6 src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:e202d775d24c0303053e0548af83fcb04e2748f4 @@ -2316,8 +2324,8 @@ trackedFiles: pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:520b0da011d63c60bd0d3a960a410a8f4a6a3e22 - pristine_git_object: 13b9c01f035c4fd6f60b78f20a1801bedf3b582b + last_write_checksum: sha1:16fb3809cfe47630f0a6869dcd2d80a99fc977ec + pristine_git_object: f53c346fec153219910bf9cf5e2ccccc2faadb3c src/mistralai/client/chat_completion_events.py: id: 1813f339625b last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 @@ -2332,8 +2340,8 @@ trackedFiles: pristine_git_object: 37e018330e85109692a83d97d62a5efe7a15ee6f src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:cb25436bb3ae12c2f6b215b6d5e9de4e219cbe25 - pristine_git_object: fafcd5f5221d2177962f3d8239abda9a99b5f3a9 + last_write_checksum: sha1:c13593e5cf9c7f7d5b4c32a874a0b8e1212d1e0f + pristine_git_object: 99f3a33e211ce45d8920baa60f0e8bc915cfb50f src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 @@ -2400,40 +2408,40 @@ trackedFiles: pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 src/mistralai/client/judges.py: id: b6024a41ecb4 - last_write_checksum: sha1:83cf149e1f7ccd75799da72bcc11f6ec99515c13 - pristine_git_object: e5dacd7fad62473a2b946afc4b05f34e3789c722 + last_write_checksum: sha1:4179fabb26ef8b8a9af00a95672f39d6ea87073e + pristine_git_object: b0eb1ea0965f63efb681d8364ac456b96f1e3983 src/mistralai/client/libraries.py: id: d43a5f78045f last_write_checksum: sha1:6440b3df71fe557ecba5c23768d115efd4ceb26f pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:c3fbb9ce09e935d3c6c987a519c080c4728f7dad - pristine_git_object: 361b16a917f8fd65d1ec57294f3168f3dbe0389e + last_write_checksum: sha1:5229fd903cba2fca3054f0444c96155e9b87c92d + pristine_git_object: 82bb5c99a48b483bf0ebb93779fb0d6c2caf165d src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:c650f57616b5455de2a6ff33c51f91b174586aee - pristine_git_object: 36cb26bfc19f17866330d709f82e15555b1a99e5 + last_write_checksum: sha1:6bd14cd797a902679111638ede8b3f8a6389ba87 + pristine_git_object: 068b32267ff9305d6431790bccee7b79fce3c1b5 src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 pristine_git_object: 6972af2a4ae846e63d2c70b733ecd6c8370ee0cd src/mistralai/client/models/agentconversation.py: id: 1b7d73eddf51 - last_write_checksum: sha1:2619ac07a5b0642d5ea02b843bf38a7e32ec8cb1 - pristine_git_object: b52f5e5a96c497c731c19f32c6142ee50ed29367 + last_write_checksum: sha1:28718fb00dbe74241712b4f7a3fbce2d060f7e86 + pristine_git_object: da30c6634294cdaba459b68ca8877d867ee052fb src/mistralai/client/models/agenthandoffdoneevent.py: id: 82628bb5fcea - last_write_checksum: sha1:2c8fbb608143ee836e675a0d9610a64b7b8ac99a - pristine_git_object: ea9cd6b2a64e6add14bcf1f87dc5a15f800dde61 + last_write_checksum: sha1:829c5a152e6d737ffd65a3b88b0b2890e6703764 + pristine_git_object: e2609e3d1fb62b132eb53112eb2bdc4ae855085f src/mistralai/client/models/agenthandoffentry.py: id: 5030bcaa3a07 - last_write_checksum: sha1:dbbadef3757f8949c63cc0bf91ac8e72a2e42abb - pristine_git_object: 8d1c143eac305c79da8ce4566b51b399da91585c + last_write_checksum: sha1:c9544755ad6d3a3831f8afe446c6a9a523eb5137 + pristine_git_object: f92ef2cc7310d5df94436f3067a640d3848405f0 src/mistralai/client/models/agenthandoffstartedevent.py: id: 2f6093d9b222 - last_write_checksum: sha1:b354f10f57b51aa515932ec403eba7034eaf9e9b - pristine_git_object: 9525bcf65ed318872e038078ec379f87794d6f84 + last_write_checksum: sha1:c9f86e01497c53f3c1806dbb9fdff6e2d9993323 + pristine_git_object: 2a4023419212fec8b3f0e83d506a25b17408a8b1 src/mistralai/client/models/agents_api_v1_agents_create_or_update_aliasop.py: id: 23a832f8f175 last_write_checksum: sha1:237d6b4419615c9c26f96d49760732bd7b4617e7 @@ -2452,20 +2460,20 @@ trackedFiles: pristine_git_object: 941863d0f8143020200bb5566ce66d527c4369c8 src/mistralai/client/models/agents_api_v1_agents_getop.py: id: f5918c34f1c7 - last_write_checksum: sha1:6a420e218b378015507acda1e8eb4de9fc865c06 - pristine_git_object: dee6a3475ff81f773f92f4473410639dacafd517 + last_write_checksum: sha1:b90285965e2aaccaf989e59b8f1db4a53ae8b31c + pristine_git_object: dd17580dd0041a979fc6c9c7349d14a3e200f5d3 src/mistralai/client/models/agents_api_v1_agents_list_version_aliasesop.py: id: a04815e6c798 last_write_checksum: sha1:b4b5c4e8566f1d0c68a14aba94b7ffea257fd7ce pristine_git_object: bb1da6020386fabfbd606db9a098a0e9323ce3b0 src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py: id: 19e3310c3907 - last_write_checksum: sha1:14f86d6a09a6c3ee8579ef5b3f7ecbf0aa467c40 - pristine_git_object: 25ea29e31693b6352f0ab395b4f21352e46ab037 + last_write_checksum: sha1:6628e9ff747c579e11fa9a756cee3b11c57c476d + pristine_git_object: 54b62e90e23c1782a0b068460d6877cac3b28916 src/mistralai/client/models/agents_api_v1_agents_listop.py: id: 25a6460a6e19 - last_write_checksum: sha1:ff64974c26700e1b32ad90f7b7b8917aef73d985 - pristine_git_object: 100e0da71927900c796e294c5e7438138faaf647 + last_write_checksum: sha1:0abe889b85470b28917368a2b958a13303bd38f1 + pristine_git_object: 97b1c7f1a070be5e12e1a32ad56dbcfcb0f1cd68 src/mistralai/client/models/agents_api_v1_agents_update_versionop.py: id: 63f61b8891bf last_write_checksum: sha1:e9046cf75e008e856f00dda8725cbb16d83cd394 @@ -2496,8 +2504,8 @@ trackedFiles: pristine_git_object: ef0a4eb084de52d4bde435ee9751aaa12e61dcc3 src/mistralai/client/models/agents_api_v1_conversations_listop.py: id: 936e36181d36 - last_write_checksum: sha1:dc0da883d6e6d045dc85f74032c50d7ae0c19669 - pristine_git_object: dd6276d9ececa4fd28f179c58adfc5b71043db86 + last_write_checksum: sha1:e3e52cf7967b9b78099db9449cb33e3ded34d111 + pristine_git_object: 8bf66aea23f16734c1f9e03629aaf7246e4e60b4 src/mistralai/client/models/agents_api_v1_conversations_messagesop.py: id: b5141764a708 last_write_checksum: sha1:17fd503da7fb20198792c6e25f94dcc0a1e5db05 @@ -2512,16 +2520,16 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:9f4a0bafdbe8ebde528dc54eac074585d40e449a - pristine_git_object: 1cff8f9537636933d3fcabe4378ec471ff9115c0 + last_write_checksum: sha1:474ae2d3bfcc65c37a61b6ca7d6bcade5f38746b + pristine_git_object: 7d38f6b0559294cc84bdd3cec6d6f5ad67154686 src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:0e6a229fc0e5f082f6fbaafeb759d5df5100c8bb - pristine_git_object: 32f13fb1ed7dcb68eed43166c24aee680030c59a + last_write_checksum: sha1:7e9782422cb79117bd2b5ea762ec545d42dc0fc8 + pristine_git_object: ea83a8ff5604622951ddca23f5d4596f49c468dc src/mistralai/client/models/annotations.py: id: 3ae9e07de11d - last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 - pristine_git_object: f3f5c21c66dd570be71d8d87350ec7683478b545 + last_write_checksum: sha1:a67ea607358e534448fe556c6008105a8cf89a07 + pristine_git_object: ba085e2c7784ca442c4a5da72dddf3561dda0d9d src/mistralai/client/models/apiendpoint.py: id: 00b34ce0a24d last_write_checksum: sha1:733e852bf75956acd2c72a23443627abfa090b7b @@ -2532,20 +2540,20 @@ trackedFiles: pristine_git_object: 10cbaf589e2a4bc1e63b3a02689e76f4d7f1e88a src/mistralai/client/models/archivemodelresponse.py: id: 2d22c644df64 - last_write_checksum: sha1:e55af09d03586d14e2a52292be9a0d6729f9e1e7 - pristine_git_object: c5ca8ff5d3a571bd8bc936eca1d361d09358b2f5 + last_write_checksum: sha1:d0f67fd2bc5a6e8de4f2b0a5742ceb4a1f7f5ab8 + pristine_git_object: f1116850c8bf0159c4146d4973988ea5d0fe7de7 src/mistralai/client/models/assistantmessage.py: id: 2b49546e0742 - last_write_checksum: sha1:0610c5a58e3aa264ba77f603e75adce29ecbe3c7 - pristine_git_object: f333a44422c7f6114797b63f1faf94e2bc9ef90e + last_write_checksum: sha1:dcfa31c2aac95a0d7bd748e96bd87a5c85c0d1f6 + pristine_git_object: 26a778c70439d21b890e85f2c85dbb560e8bffef src/mistralai/client/models/audiochunk.py: id: ce5dce4dced2 last_write_checksum: sha1:d3c2e28583d661a9583c40c237430a1f63ea7631 pristine_git_object: 68866cd2c3c640cf56258f2f98b8a2385ea6fcdb src/mistralai/client/models/audiocontent.py: id: 8e39736e73f0 - last_write_checksum: sha1:8ae8d3af5ba655b4766f8710c34c31d8401cc18a - pristine_git_object: 2d38d2a1479327156434a5338229f48d7fae7df6 + last_write_checksum: sha1:9f96ac9f1b3035b66f0920df1b46a59df7c6bca8 + pristine_git_object: b0a9505b05c9fc27a5562aca4bf2d1de37eb3100 src/mistralai/client/models/audioencoding.py: id: b14e6a50f730 last_write_checksum: sha1:92ca06dce513cd39b2c7d9e5848cf426b40598ce @@ -2556,56 +2564,56 @@ trackedFiles: pristine_git_object: fef87ae76b31128ebd5ced4278e274c249181c23 src/mistralai/client/models/audiotranscriptionrequest.py: id: e4148b4d23e7 - last_write_checksum: sha1:ab55d16773cdd9d536999537908d5bb70c642cd1 - pristine_git_object: 734860d52b12c11e007faf8ef5d1c233d2a183c6 + last_write_checksum: sha1:a6ef85be4ae24aa79c8c3fa9dcaf055e0ba9b266 + pristine_git_object: fe4c79e3427fae3e022bd936236d2934eaa76b60 src/mistralai/client/models/audiotranscriptionrequeststream.py: id: 33a07317a3b3 - last_write_checksum: sha1:c7e404caadd964924bb59372827f702acc7dd3f2 - pristine_git_object: 84c4dbcdf555b057190d53ac5a952b9b566ca3fc + last_write_checksum: sha1:6e648ff58a70a0a3bd63a24676122b80eba4baf7 + pristine_git_object: 2d1e9269b51d84cd8b21643fe04accd00839b013 src/mistralai/client/models/authdata.py: id: b4d3fb07196e last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:7d7b08ba19500836193c593bacc1dd6982c9ef71 - pristine_git_object: b57ff2cab05c7a2a7f10292ff1c017eb58a10f84 + last_write_checksum: sha1:0cd6a43a558734d38fbc39f1120a54c4cc825fe6 + pristine_git_object: f8b8faf759b795c4a9d072c2e4b50a4d22c80f7c src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 - last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e - pristine_git_object: bb3c99ddb4495488b4e058cd32332808d6de08b9 + last_write_checksum: sha1:e911218547dd6ef1679774a451db925de2c0bc61 + pristine_git_object: 6a1c7bc2de3dbc83edf03a3b4ffd3c5b332e1008 src/mistralai/client/models/basetaskstatus.py: id: 7b381554d5c7 last_write_checksum: sha1:8124cb3871ff7565865cd8b06181b5b0a8eb3428 pristine_git_object: ff2f1c63a6dceceeabe6b8c6bc8bf1a7c64c70a0 src/mistralai/client/models/batcherror.py: id: 1563e2a576ec - last_write_checksum: sha1:3bb5b8a9f479b888efc37cf1ba9731e5efc3d8d0 - pristine_git_object: a0add5ad71b1732849fe89de72227e846b3e3b1b + last_write_checksum: sha1:51c9e9a4d306c2de45dc0879ade62daed3fc2972 + pristine_git_object: 8a353cd2dc06a8c6f2db3d6b613cfdca8278f57e src/mistralai/client/models/batchjob.py: id: 85cd28932cc7 - last_write_checksum: sha1:d9aab4f4058332de7f8e05ddc0719dbc9b054993 - pristine_git_object: 9cef43800cf382fe27d84fa958df493fe9624ea1 + last_write_checksum: sha1:532a8c6ca8546052159e5e5174cf65ce17a62f3f + pristine_git_object: 80acac336883c23b621d0dc647fef20548bf061a src/mistralai/client/models/batchjobstatus.py: id: 61e08cf5eea9 last_write_checksum: sha1:78934183519948464385245cbc89efb68ac00bfb pristine_git_object: bd77faa2fbed74b19a8d3884af6d43bc1b4806e0 src/mistralai/client/models/batchrequest.py: id: 6f36819eeb46 - last_write_checksum: sha1:f4ed16f0d2fef446bf1b4eb3023d4f38824ffe6d - pristine_git_object: dcc47bd25fd0b790677b3e175b3e62058c970327 + last_write_checksum: sha1:b2a71163e37a9483e172dc13b6320749bee38f2f + pristine_git_object: 911a9a0554b9b8cb6dedcb3a86a06c39890b875e src/mistralai/client/models/blobresourcecontents.py: id: fa924bc295ad - last_write_checksum: sha1:e624129b00144d82726a5a2ac5d3a809061b76ae - pristine_git_object: bfae16fb641bbe2c6dfa8c3aab1a042182d9137e + last_write_checksum: sha1:2d0d6f84e274e544e2d1535513726f547fc2d1b7 + pristine_git_object: c2a55f95a156006e86f5f945c70bee8025e38fea src/mistralai/client/models/builtinconnectors.py: id: 2d276ce938dc last_write_checksum: sha1:4ceb3182009b6535c07d652ccf46661b553b6272 pristine_git_object: ecf60d3c1a83028d9cf755d4c9d5459f6b56e72a src/mistralai/client/models/campaign.py: id: c91d862fb405 - last_write_checksum: sha1:770d93cc4d9b8e23ea781592888be5b811533f21 - pristine_git_object: 62427fa0336eab3448064fc1a7a02427d44e309b + last_write_checksum: sha1:def484a2eefa9be72db2bfa63d93201e2a07f554 + pristine_git_object: a52bfcb90d6d8d29f4e23f71c5e95564bf3c95ec src/mistralai/client/models/chatclassificationrequest.py: id: afd9cdc71834 last_write_checksum: sha1:a29088359142ebd6409f45569168b2096014119e @@ -2624,16 +2632,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:adeccdfdc69c077eb8ab783e82aabf898b80fa9a - pristine_git_object: 1b4bfb025c1ba2527943bd18219aeddd9de7f45b + last_write_checksum: sha1:0745c53b825bca22c42a943183d8c24641cdb531 + pristine_git_object: a0e1b9ed4ee7324baf818d97bf13004d7370e227 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:077bc9c7a9afe2d10cd699aaf75997928b7eca1c - pristine_git_object: 75aab84cb34ded037561f4445b843e435350676a + last_write_checksum: sha1:1dd23fea1ccd4871a0c3ed2a35a42d0d2e1bb1c2 + pristine_git_object: 32b49e80ef5e21bfa25801c2ccc95d4f7c0d2565 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -2648,8 +2656,8 @@ trackedFiles: pristine_git_object: c24e433eb4787146620fb48b6d301f51a4db5067 src/mistralai/client/models/classificationrequest.py: id: 6942fe3de24a - last_write_checksum: sha1:8b6f78592b6fe5c5a0e686f54ad1f99d3fdb78c5 - pristine_git_object: 4300f9ad559f6a2d87c726fd5f0b82d83e643481 + last_write_checksum: sha1:7bd416d4b0e083efbf9324107263027140702ddb + pristine_git_object: 25b6941355cb9629abb9c0f09fb6fd191c56ffa6 src/mistralai/client/models/classificationresponse.py: id: eaf279db1109 last_write_checksum: sha1:64522aa2b0970e86a0133348411592f95163f374 @@ -2660,72 +2668,72 @@ trackedFiles: pristine_git_object: 6c7d6231d211977332100112900ea0f8cdf5d84c src/mistralai/client/models/classifierfinetunedmodel.py: id: 5a9a7a0153c8 - last_write_checksum: sha1:64ba0eff2b87654e569f6a561ce09eb1d7377437 - pristine_git_object: 7c2bfc80c5881319692a54a13a78a479aa47604a + last_write_checksum: sha1:853bf1b3b941ec3aebeb17ac2caf38fa0dd094de + pristine_git_object: fbcf5892d7f0a3ed8b3872d71dd95ed3a25463d1 src/mistralai/client/models/classifierfinetuningjob.py: id: a244d5f2afc5 - last_write_checksum: sha1:b65b4bab42100c8e00821e6f81e03d2efe039dde - pristine_git_object: 5a5f8a482b3eca6948bd58a550a81eda36da83e2 + last_write_checksum: sha1:ceb13935702275025284bb77aa8bf5ccf926e19c + pristine_git_object: fb160cf8e16a1b4899f8bb2803b18ba1f55232ce src/mistralai/client/models/classifierfinetuningjobdetails.py: id: 75c5dee8df2e - last_write_checksum: sha1:a1f4c81b573aa48a3b1558b07fa43dc124fede88 - pristine_git_object: dcdd62b3d2311f633908cfc065701a6464557d30 + last_write_checksum: sha1:6b3f2f7ca3bd4e089591f5f9c59b7e28a00447f8 + pristine_git_object: 5d73f55ee0f1321fdeeb4db1971e144953e8e27f src/mistralai/client/models/classifiertarget.py: id: 2177d51d9dcf - last_write_checksum: sha1:ea159e369ba3dcaada53eec102ec37234fa14670 - pristine_git_object: bfd5646e92aa5ed41f5ac13787a6200896b3d37e + last_write_checksum: sha1:c801dacc31e2d7682285a9a41d8ef38fa2e38fb9 + pristine_git_object: 4d66d789a42a0bc8762998161f1ad801bd8d96d4 src/mistralai/client/models/classifiertargetresult.py: id: 19c343844888 last_write_checksum: sha1:3f5b37de3585cb38a3e41f0ee49dc4b5a33bf925 pristine_git_object: 8ce7c0ca167b38ebaf1e5fc6393ab56d9f142cfa src/mistralai/client/models/classifiertrainingparameters.py: id: 4000b05e3b8d - last_write_checksum: sha1:c2279b1a67b20f0f2643a0fbe5f1a01c6ba72f49 - pristine_git_object: 3a9576c830163d351b5d8f6b66bb612fca12b844 + last_write_checksum: sha1:d7ce2f1017463c52856b973d696c9abecf5f79e3 + pristine_git_object: 14fa4926f8b5b62aa6b5d8864c40d5acf66e7b15 src/mistralai/client/models/codeinterpretertool.py: id: 950cd8f4ad49 - last_write_checksum: sha1:248d6e6c1906303f03eb4f29429227a7d39679a2 - pristine_git_object: 4cf9d055c3aaee426d99071180ae6de21eb648cf + last_write_checksum: sha1:8c3d91805d6c5f5cc9d249216694781faf15ea68 + pristine_git_object: ce14265f6d312c3da52014d2a058b6a730d5c980 src/mistralai/client/models/completionargs.py: id: 3db008bcddca - last_write_checksum: sha1:b922bb4464d2759c54aa6dd1a4fd82fba5595e9b - pristine_git_object: 76c4cf98ccb348c0d806a442ad7e3697b8e79d68 + last_write_checksum: sha1:e3d36235610c0546d8a2f2bb0a1db0f953747d88 + pristine_git_object: ab5cf5ff2d4df92d00664803f9274696ae80216d src/mistralai/client/models/completionargsstop.py: id: 5f339214501d last_write_checksum: sha1:744878976d33423327ea257defeff62073dad920 pristine_git_object: 39c858e66380044e11d3c7fd705334d130f39dea src/mistralai/client/models/completionchunk.py: id: d786b44926f4 - last_write_checksum: sha1:df78fa0e2374a4f39d8cc0489109a0b7eaf85ce5 - pristine_git_object: 27029b6f08ab42842022f04ddeebbf90154751da + last_write_checksum: sha1:15f1b57b696b46bf6986c8f1a53d6bbf8d2351e2 + pristine_git_object: 5fd6c173ef29fb9bf2f570e0c2300268221e1ad3 src/mistralai/client/models/completionevent.py: id: c68817e7e190 last_write_checksum: sha1:dc43ac751e4e9d9006b548e4374a5ec44729eea4 pristine_git_object: 3b90ab0c1ecac12f90e0ae3946a6b61410247e4f src/mistralai/client/models/completionfinetunedmodel.py: id: f08c10d149f5 - last_write_checksum: sha1:12ffb210273040ce9aa057a85d348643622c6b59 - pristine_git_object: e75b8d2f0cdaf38c8e1bc583f9b19278fdf04f86 + last_write_checksum: sha1:5fbd8c5475c250cbed1c2d2f47de372e8e92b128 + pristine_git_object: 54a1c1656aea1954288e9144670c939e29a83c47 src/mistralai/client/models/completionfinetuningjob.py: id: c242237efe9b - last_write_checksum: sha1:653d253e02c252ece805d0172d7e214c474fd074 - pristine_git_object: bbcf773217c3d7951b030b7d248b04b30dec17c8 + last_write_checksum: sha1:e4352be2411c7026c054a6fe380b87242183d4e4 + pristine_git_object: 1bf0a730c389be30bac2acfa17ffc6b5891e4918 src/mistralai/client/models/completionfinetuningjobdetails.py: id: e8379265af48 - last_write_checksum: sha1:71a05ed146d634c6aa3241a2eacbd3d4d4245a7d - pristine_git_object: 8aa8b75da38a73c3857d90d7f7a560a18905507b + last_write_checksum: sha1:b11c9bdc161da6a5cbd9f35f4bc5b51f0f3cea9c + pristine_git_object: cb7870219b261e260feceb6109088b0bbf8a6408 src/mistralai/client/models/completionresponsestreamchoice.py: id: 5969a6bc07f3 - last_write_checksum: sha1:4a1cd9adf6558faf84f873313210e9ae448c287b - pristine_git_object: ef1a106bdbde4eba5de9342a9418413daa08c0da + last_write_checksum: sha1:59730cdaeeb3e95f4d38f63c34a4e491f40e6010 + pristine_git_object: a52ae892fcaafe54918160d055ee2badac31404e src/mistralai/client/models/completiontrainingparameters.py: id: be202ea0d5a6 - last_write_checksum: sha1:b0c6896368230fd499799cc42b25f9fd51a4d0a1 - pristine_git_object: b91ec9dfd51b8e6fa208ef54dc2a22437df3a22d + last_write_checksum: sha1:1a797019770795edcd911ff5b3580bedb83c05f4 + pristine_git_object: ca50a7ad521b46f275dd3a39c98911f13ee527c8 src/mistralai/client/models/connector.py: id: 1a4facac922d - last_write_checksum: sha1:2648e3e1647fa9ae857961ccda8b0f5f36a6cade - pristine_git_object: 55730274eaa98e7aa53d04ba4b9006a61e427740 + last_write_checksum: sha1:4acd40b285482f549ac76ef120aa32cd4ec2f171 + pristine_git_object: 967e454f870a44c9354a8ab1493800daeff35cac src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:09dfd8f2d560f33fb12cba74cadcd505831d2389 @@ -2736,124 +2744,124 @@ trackedFiles: pristine_git_object: 74134361aeeaf83af57d7edc7d9ae26ab09d96fb src/mistralai/client/models/connector_get_v1op.py: id: 73ca3a446dcc - last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 - pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 + last_write_checksum: sha1:f3a7480774e8f826ba8bc509a0dce280a18ee855 + pristine_git_object: 5770ee096fe7924384a8cd31ed1e40a11eff3e35 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 - last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 - pristine_git_object: 3cb31bf7fe0b814606b4bbdfbf7e5cbf733984bf + last_write_checksum: sha1:4460df62af1ad834656484e9d34dc3f612fa4d84 + pristine_git_object: a89da710092dbcd14522b0190ef9dbefe49ff76a src/mistralai/client/models/connector_update_v1op.py: id: 6f884d18ac56 last_write_checksum: sha1:be8044958ac76ecfc486dc5cb5f0876e595dcc38 pristine_git_object: 6b00d0b0ca6d83b4ac1fce1ab204ac09ca5ceeb5 src/mistralai/client/models/connectorcalltoolrequest.py: id: 7dc7ec295301 - last_write_checksum: sha1:8af4bd44caa8ad09180139e7e8a68052c16dce11 - pristine_git_object: 85366bb6acaa0724a907803c689a2caeb431bf7b + last_write_checksum: sha1:59caca0ee1ec5c43b8191087b1c202ea3ba3e2bc + pristine_git_object: 4e9a4d45dc4eb242ceda1c31736901e451dec862 src/mistralai/client/models/connectorsqueryfilters.py: id: 3b9fc81aa726 - last_write_checksum: sha1:399567eb362a40f1225f7d8adb820aabc6b9df99 - pristine_git_object: f10d689771d50077bc35193a39a94672a9f09ac2 + last_write_checksum: sha1:dc90b518462978d5bdba53a1cfcea59f8afe8612 + pristine_git_object: 1aea18b01273aa5b1321e138f1b79e5c50edee07 src/mistralai/client/models/connectortool.py: id: 41ca596b44f8 - last_write_checksum: sha1:0306b9a607d59afe042aac018df6e2bc0cff0d8a - pristine_git_object: e8a036c7800ad7db3cdad18f4a61c9c3b8d050b8 + last_write_checksum: sha1:ead8ba36ca4a3b7c0edd06d38aff4a30aaddded2 + pristine_git_object: 26a8b7b75cb8283b00b379902b717c9e7d6e6329 src/mistralai/client/models/connectortoolcallmetadata.py: id: 2d27189e58e6 - last_write_checksum: sha1:da057b97e36ab7b49f863ab92e1c20ccbf81fb45 - pristine_git_object: 0280eae009cd4fa8b91923f31bd607d74ce7f753 + last_write_checksum: sha1:3faa513be03ab9be9d9081976dab971e0dc2f231 + pristine_git_object: 9f3be6c4e6604f7ed2d2deeaf78569b61697ad45 src/mistralai/client/models/connectortoolcallresponse.py: id: c4f7a932bd2e - last_write_checksum: sha1:453f0382ecf925c483a6071130c61eb7b7326ee4 - pristine_git_object: 76abe558e5c558db157d743a6e90ef7c26038680 + last_write_checksum: sha1:2666a1fb1c6b6a67f9e3147ab84a0ad7340740fe + pristine_git_object: 47071a944e80a79053a14dc57f7a3dee28a8d173 src/mistralai/client/models/connectortoollocale.py: id: 247ebe411537 last_write_checksum: sha1:e68370e4bcf2a1f5f2f9036416fc889821668244 pristine_git_object: ec1359c8ccf883bff066fd1500503f5e28913e05 src/mistralai/client/models/connectortoolresultmetadata.py: id: 86730e16aa67 - last_write_checksum: sha1:fae6e84b040a1c8bcb25b94041f990525529472a - pristine_git_object: 8c92f2f8d4c25eac7f3c95e0ae425942829390d0 + last_write_checksum: sha1:0b49abdb7cfdf461d225387ef03ed5e2413fdb2b + pristine_git_object: 520fb99b6430b317c326bdd9be86b63bd3822bd1 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea pristine_git_object: e3de7591a089a3739af17108cecdc2d4240f10bf src/mistralai/client/models/conversationappendrequest.py: id: 81ce529e0865 - last_write_checksum: sha1:1180d6092dc70b5c919529694623e7c5c2f8f470 - pristine_git_object: 6d310816dfe569850207a701a5ce84853702f8d1 + last_write_checksum: sha1:bdae860241893ec3ab3f22bd57c45dede2927da3 + pristine_git_object: 386714fd6dcccff8abb2247d7474949d9e8e79f8 src/mistralai/client/models/conversationappendstreamrequest.py: id: 27ada745e6ad - last_write_checksum: sha1:7a5ac0f3f0e255d2ebf2005a9dc931b0fc8d4320 - pristine_git_object: b65f1e82f38099aad5f2a113a784ac706adbd8be + last_write_checksum: sha1:0a563cb146c4806ee6a133d10e7af8839e6f38dd + pristine_git_object: 32f6b148c647d3bac8edada3b941c51c17d78901 src/mistralai/client/models/conversationevents.py: id: 8c8b08d853f6 last_write_checksum: sha1:2eedde1ecf31061fb13de0b1bdc9ea311897b570 pristine_git_object: 17812983f3aee3e675d44f46ca1b741315c2139a src/mistralai/client/models/conversationhistory.py: id: 60a51ff1682b - last_write_checksum: sha1:661d135eb6614a54ffbeb7d63320311821f9f23b - pristine_git_object: 2e812bb8b2945db91e534d74265482ce914a8975 + last_write_checksum: sha1:8984a0b12766e350022796a44baf6aac4c93f79b + pristine_git_object: ceef115b70ff02da05ac97571a177edf5b5f6cf6 src/mistralai/client/models/conversationinputs.py: id: 711b769f2c40 last_write_checksum: sha1:5fc688af61d6a49ede9c9709069f3db79f4dc615 pristine_git_object: 7ce3ffc3772926a259d714b13bfc4ee4e518f8f7 src/mistralai/client/models/conversationmessages.py: id: 011c39501c26 - last_write_checksum: sha1:83adcc316ff46085a7b02a4ce54b3cee7a848937 - pristine_git_object: a7e13c712fa0ac250929efdc10303ea7fd26c37d + last_write_checksum: sha1:95e3abe55199f2118e6fb7e5d8520af6a929449a + pristine_git_object: 84664b62337dcdc408bb01e0494fa598e6a86832 src/mistralai/client/models/conversationpayload.py: id: 4581218c84c1 last_write_checksum: sha1:51c3787091d7d2a09a0625d854a74db3c46d6a1a pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:5d64abb831437c60c7e88a7dce2e08d03174ee1e - pristine_git_object: 94fcb03bb392ff4a369e0dfaa524644d611d2c49 + last_write_checksum: sha1:3b21ed0d747df3b0917bcb1141e387b3c8eb8bd9 + pristine_git_object: 299b41fc79df3b8cd1221142aa693f77e060d757 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf - last_write_checksum: sha1:cd45eec534ccd27052d9809f8aafedeee243d9f9 - pristine_git_object: 64437b23c7ff4cd50010e970832bed3567ae4bf0 + last_write_checksum: sha1:c668077dd7d22c87c075530bbca7f4625bee5d0c + pristine_git_object: d1f8ac4b89cb332d4b0b5e90ef936228f267f804 src/mistralai/client/models/conversationrestartrequest.py: id: 681d90d50514 - last_write_checksum: sha1:edc3713fa0be297da7c622f60775db3c617ab221 - pristine_git_object: b6b03f1faa89d72e4a4b3682f47692f301cfed9c + last_write_checksum: sha1:9a015a4eb700aa97311231704da0f0eef4b4c7c3 + pristine_git_object: d5079689256f25d2d252aa3ad01ece94994b5abd src/mistralai/client/models/conversationrestartstreamrequest.py: id: 521c2b5bfb2b - last_write_checksum: sha1:6fd47c92114693010c6014af6e2a347091985a87 - pristine_git_object: 41b7098f7086b41089432b183df664fb7539bfc1 + last_write_checksum: sha1:42f885e4419853a2d5ee9766147b6c2c80cd1faf + pristine_git_object: 5cea41465634f71912cc2fdf79b63c7221939be0 src/mistralai/client/models/conversationsource.py: id: 24d6a0861d4b last_write_checksum: sha1:e28921788ab1b6d2b6daf08b714bf34b2047eb6c pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:17f643578f395a5b4605710402f115eb25cae8b3 - pristine_git_object: a1afb2679b5c1e97995b78bbf2572cec489d28c5 + last_write_checksum: sha1:6e503a49b1edf52b2f9ecad17c96d9607d689899 + pristine_git_object: 9404e32c3f3158d5c6d63728d8eaa07a86f69b6c src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 - last_write_checksum: sha1:ee993afc39cece27caf99ee60258f45980d86cbc - pristine_git_object: e717284f15a4f3c88768f96d98007b95aa2b7922 + last_write_checksum: sha1:3e0489836936a7a77fa3b41adde1eb459ecd176d + pristine_git_object: 1e80f89ee4f7a3d464df2bf39990b467029e86c1 src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py: id: 1ddc53a46c74 last_write_checksum: sha1:5df5b6676f6c115da0b1c242a6f3cc7f8c077927 pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:da0d93f32efd9db292a83ccb8c0d18c02dbbb7ee - pristine_git_object: b434619d8c161f74453e2546986e24ea802269e8 + last_write_checksum: sha1:55adc884e1fa3ee169d34812516e541407648368 + pristine_git_object: 1e0cb7b6b86f791d17655aa36f38842992380a69 src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 - last_write_checksum: sha1:9061e5f387d98c2c2f624efafd6ef178dfad6b43 - pristine_git_object: 6ff1e4964a7f37476074e40522d476920efd4249 + last_write_checksum: sha1:e648017622cd6e860cb15e5dd2b29bf9f2a00572 + pristine_git_object: 9a901fefee0ea6a825274af6fd0aa5775a61c521 src/mistralai/client/models/createcampaignrequest.py: id: 60012b559aee last_write_checksum: sha1:b45a2ee90bf901bec844aa20e9184ca1afba4172 pristine_git_object: b3957df9ef369ecc1746ee3efd1b463bc10b4be7 src/mistralai/client/models/createconnectorrequest.py: id: 3da192d6491a - last_write_checksum: sha1:dffda28118cdc6e4a30ac7d86cf28a73b77b7fd0 - pristine_git_object: 52ebc0be8a073fbc66143b258db778e7f1a33e80 + last_write_checksum: sha1:c0ea3626315e622bb5ef9207662b2c58c420d9e2 + pristine_git_object: 8fd3d3abfdb32742bc8658b9f36a1463768da16d src/mistralai/client/models/createdatasetrecordrequest.py: id: 9455e38a8c31 last_write_checksum: sha1:df3e8d7425500f23101c25267738e617eeb2d467 @@ -2864,44 +2872,44 @@ trackedFiles: pristine_git_object: ecffc52a82e3e0baca00cf94de047ff5124e3a04 src/mistralai/client/models/createfileresponse.py: id: fea5e4832dcc - last_write_checksum: sha1:e0a0abb33411e145285db9d36c207812bf8f0587 - pristine_git_object: bafefc372e35f21c38e45b0055610f19e7efad44 + last_write_checksum: sha1:934437a8c7b19b2642c1979f876ee49fc23c2529 + pristine_git_object: 1f03b275c79e47051f90b1b4cd471f3d291a714f src/mistralai/client/models/createfinetuningjobrequest.py: id: c60d2a45d66b - last_write_checksum: sha1:b89555bb4f30da8a31708140731c2d97964ec784 - pristine_git_object: 1f9c1e153eb75c4484021099f27a5364568e6250 + last_write_checksum: sha1:0f1f4f7ad97884415de5e340e8192df9ebd2fd34 + pristine_git_object: be97bd07039197523769ac30de2c42deb8c9a7eb src/mistralai/client/models/creategithubrepositoryrequest.py: id: 0814afcf63bb - last_write_checksum: sha1:a69ba08cf88aedc6c478cc8083cdd33d4f0ca815 - pristine_git_object: a3f6cd61bec7eab9f734906b6ef1758525fd2d06 + last_write_checksum: sha1:22826d609c93b24b5088ac945f08f4af2ab9f3ea + pristine_git_object: 61ffde27d5b5dfbbf4c57c6bc8ae825ab866c0df src/mistralai/client/models/createjudgerequest.py: id: e606837a626e last_write_checksum: sha1:d5c16104089075af1b8b2fe922006aea9d74b0e3 pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 - last_write_checksum: sha1:edc78f755094546142934c99ee3a97817e023520 - pristine_git_object: 28dda0cb8c5ba2462ed0f68f19747447c6ae401b + last_write_checksum: sha1:45fa65be82712ce99304027c88f953f0932bdae4 + pristine_git_object: 58874e014275b06ce19d145aaa34a48d11ca0950 src/mistralai/client/models/customconnector.py: id: 14f3643f7703 - last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d - pristine_git_object: f3a1e2ffb1a29e8798a2ac8c9c636ac3bada7413 + last_write_checksum: sha1:1c452564f118d0efd906b7b7b62f3cac7b1fec2d + pristine_git_object: 23cddfc119ff3c2cf2d1a270c3830ce48c568f3a src/mistralai/client/models/dataset.py: id: cbf14670ee00 - last_write_checksum: sha1:012f85ebfbdb286436621efc3b5b1adb150871f3 - pristine_git_object: 08ce979e19eb6b852a0a565b38c5b8d4f25ba35c + last_write_checksum: sha1:4636e54c4ca7825b93d55ef1f69b640557b26467 + pristine_git_object: 2acd911d010b2274f09061fa48c6849d0f5160d2 src/mistralai/client/models/datasetimporttask.py: id: c20f7db9633c - last_write_checksum: sha1:0a1c92ca0b498fa04d5fac1d3857937d616a8b38 - pristine_git_object: e8d90f126fdeb041bb2cbce9709481c6174c6662 + last_write_checksum: sha1:b288850d2a124aae3287ede5269d741a8b644d34 + pristine_git_object: 4ef52e9ec7ecd356360035bfcded7fbc9eec4f32 src/mistralai/client/models/datasetpreview.py: id: 128c29db3f37 - last_write_checksum: sha1:5bd20ac7c1b179bd30489cf869ce9e71fd48c135 - pristine_git_object: 90676245b258a6c4217a730fb8b59a336e830afb + last_write_checksum: sha1:2e659243a524db189fe496969187c40986b3e87f + pristine_git_object: 55493568244a888f16b1c17dafd5f44f2629ed58 src/mistralai/client/models/datasetrecord.py: id: 87ddebf2a0ce - last_write_checksum: sha1:399243f84e7f6488b7994cedc2db565d21c087d8 - pristine_git_object: 39c92cce7ee7f42878703c7983ebfe1c964e1d4e + last_write_checksum: sha1:07bbb2c5c2023511cc83ef27edc442300701b790 + pristine_git_object: 9c9f42e55ea1b26071c158b095f33815ac6b55a1 src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py: id: 3d1cd35fecc6 last_write_checksum: sha1:276676f082fa84f14ab74502302d32361277d4c8 @@ -2932,48 +2940,48 @@ trackedFiles: pristine_git_object: ffd0e0d015e38e5f6113da036ebeba98441444f4 src/mistralai/client/models/deletemodelresponse.py: id: 8957175b7482 - last_write_checksum: sha1:0b24f0b36dc12ccaac5ed628357aa9a9e3c30f27 - pristine_git_object: 4bc6c5e678b66ac04f9a08b27cf392a2903a96a6 + last_write_checksum: sha1:486183140d7fde18c05ae8a6c59303a23bd8627a + pristine_git_object: fac884bc1d833dbaeccc130873f3fea75ef851f5 src/mistralai/client/models/deltamessage.py: id: 68f53d67a140 - last_write_checksum: sha1:f1b774b3febc9388ea8175d266f585aa2954af55 - pristine_git_object: 3823651b3030944520aad12c7e6f6b4e8bbf2a8c + last_write_checksum: sha1:b18350de03a8685bea5ac52e1441415b5e58bdf4 + pristine_git_object: d9fa230e93d4e0886f21c836cf3813855eb8f9fd src/mistralai/client/models/document.py: id: fbbf7428328c - last_write_checksum: sha1:bc290f10562aaf9c24bd14ab3d2a31e62f535042 - pristine_git_object: 8d1aea883e579ff1677949573f43dddc362bd35d + last_write_checksum: sha1:db2e184f7cc97b24e7ec80887c35c32222afd8a8 + pristine_git_object: fcc5bca541a814143b0489528fd20a69004104b1 src/mistralai/client/models/documentlibrarytool.py: id: 3eb3c218f457 - last_write_checksum: sha1:a84295aba7b9e7f70b68f279934d1a5ca0817f77 - pristine_git_object: 29f8d64a695342489d81bfe20ec2f8de60546ddd + last_write_checksum: sha1:d03a6136192b56778bd739d834d9bdc80a09cc23 + pristine_git_object: 642c3202b11c5bb8a2b41cf8ae0fe43f73aa2a81 src/mistralai/client/models/documenttextcontent.py: id: e730005e44cb last_write_checksum: sha1:c86f4b15e8fda1cd5c173da01462342cd22b7286 pristine_git_object: b6904cb4267347b62a457a01b91a391500326da9 src/mistralai/client/models/documenturlchunk.py: id: 4309807f6048 - last_write_checksum: sha1:f45ecef78fb4412dc76ce54478fe536df0259048 - pristine_git_object: f7a99ff81ee01d256052920405ca4788d3a47f75 + last_write_checksum: sha1:33cdaccb3a4f231730c7fa1db9f338a71e6311b2 + pristine_git_object: 43444d98b8b7fb430f9c33562c35072d9c79a263 src/mistralai/client/models/embeddedresource.py: id: 94a23f656f72 - last_write_checksum: sha1:50375363269d68edd3ea1c0a31ba08c8bf9bd160 - pristine_git_object: e16fedf8362a19e55e7bfc6c273000f3446fe3ac + last_write_checksum: sha1:7984f6ed695b8df81ad70b72a27d481950453abe + pristine_git_object: 54cb17fdface0703cbe64079543bd399d7abebe0 src/mistralai/client/models/embeddingdtype.py: id: 77f9526a78df last_write_checksum: sha1:a4e2ce6d00e6d1db287a5d9f4254b0947227f337 pristine_git_object: 732c4ebe3678563ebcdbafd519f93317261586fb src/mistralai/client/models/embeddingrequest.py: id: eadbe3f9040c - last_write_checksum: sha1:00e4499575e7a8a4a5e879174b7f25a0f522fd8c - pristine_git_object: 2ef747d8ba91f824f0ad117d21c5a8487cc7ea80 + last_write_checksum: sha1:3ef4e321a698c4a10389280f8b1c7d0da20f4faf + pristine_git_object: 5fa2d2f63796523e58e281f2d3bcc05a92111842 src/mistralai/client/models/embeddingresponse.py: id: f7d790e84b65 last_write_checksum: sha1:9bb53a5a860c8e10d4d504648d84da73068c0a83 pristine_git_object: 6ffd68941f32f396998df9dded14ff8365926608 src/mistralai/client/models/embeddingresponsedata.py: id: 6d6ead6f3803 - last_write_checksum: sha1:b0daee4bd21a441a2e8e47cf8ca8be32d2179869 - pristine_git_object: 03b23a7cba53c27ef02f3bc025f38f10d7b98e2d + last_write_checksum: sha1:ba5f38ee6e2b0436532229da01ba79ee49c20d12 + pristine_git_object: 098cfae06eae6a92830b4b5a26985f5d5950e512 src/mistralai/client/models/encodingformat.py: id: b51ec296cc92 last_write_checksum: sha1:ea907f86b00323d99df37f7ff45d582aace798e7 @@ -2984,8 +2992,8 @@ trackedFiles: pristine_git_object: 56d82cbed237f32a8b00cfee4042dfe3e7053bcb src/mistralai/client/models/event.py: id: e5a68ac2dd57 - last_write_checksum: sha1:0711bc7d48998b1c01e7708e29ae5889f9bea7bc - pristine_git_object: 01157dfab89756ecfb587722270ef3cef8722807 + last_write_checksum: sha1:8ed848fe2e74c7f18ee8f4dcba39ad1c951c16d2 + pristine_git_object: c40ae2b1a1b8131a90c637e3268872b97b22683e src/mistralai/client/models/executionconfig.py: id: 14518c40a13b last_write_checksum: sha1:351fb4a74622cb70969b728ac65b62ca670fc7e5 @@ -3000,20 +3008,20 @@ trackedFiles: pristine_git_object: f1600cac74e1d50979277d3eb6830ea5e84b69ec src/mistralai/client/models/feedresultchatcompletioneventpreview.py: id: 19109368b436 - last_write_checksum: sha1:2dfbc8aa7110a57f892ad80002cc01bc4c94589d - pristine_git_object: bf248758026549d8e2395895dfb18eccf96cc31c + last_write_checksum: sha1:7ed72c5afeaa35a68bef880405b122db6ca1b57b + pristine_git_object: e87e007e571df43ab2453a5506b19836ed23698a src/mistralai/client/models/fetchcampaignstatusresponse.py: id: b74b57603a4c last_write_checksum: sha1:62b1fd7d42f79518e15abdb07b11cac817837e1e pristine_git_object: 6004892e377a9852e406bf911bd91afe891ea7b3 src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py: id: 2191cab4638b - last_write_checksum: sha1:32526d8625f46e27b57f28483652f7d1a38f26f6 - pristine_git_object: 92c29e22eb942fc756d1926e7ed1b01582903f5c + last_write_checksum: sha1:971b32a645c582a4a2cccb5329481f29ed5e6792 + pristine_git_object: d3cbd653cc62ef4712fc41e2e64d74a12f413d17 src/mistralai/client/models/fetchfieldoptioncountsrequest.py: id: 2fd8caa0697d - last_write_checksum: sha1:e9b547f04bf87e5d6863bec706b96ff2d732512c - pristine_git_object: e310f6603d1a602c56da30a1e3a9971586a078c9 + last_write_checksum: sha1:c3798f54e192e91552d0d8004002ede779899ce9 + pristine_git_object: 19698b9b475bd281ebc5488f8d529b0111afefc3 src/mistralai/client/models/fetchfieldoptioncountsresponse.py: id: 16ce9431fc7b last_write_checksum: sha1:a633398597cb0ccf0c3e36aca8566f679b527850 @@ -3028,12 +3036,12 @@ trackedFiles: pristine_git_object: 0b50c148c524f59fbc02d2b22ee961dc4f7a2d6f src/mistralai/client/models/file.py: id: f972c39edfcf - last_write_checksum: sha1:bfcb027361112e24202716f02804699bc1dc5de0 - pristine_git_object: 528bc13a60e1ca006a54e1a9b20087651d10d470 + last_write_checksum: sha1:609381a40a4bfdda2e7e750a848cd2bb38d6ac0f + pristine_git_object: 1b0ea1d4a288d9723dcdd7cfda99d49c5cbd9e7c src/mistralai/client/models/filechunk.py: id: ff3c2d33ab1e - last_write_checksum: sha1:dc247ef441b0436a1444322bca312be8bfc8ded2 - pristine_git_object: 6c9c8b0e5772d51465f69950b55dd0ecc22be3b2 + last_write_checksum: sha1:d7561c39252b81007a8e079edb4f23989ffd510e + pristine_git_object: 5c8d2646dc0d5c732828bdd81c5a58e12fa92a42 src/mistralai/client/models/filepurpose.py: id: a11e7f9f2d45 last_write_checksum: sha1:8b167c02f9f33e32d5fd1c6de894693924f4d940 @@ -3048,24 +3056,24 @@ trackedFiles: pristine_git_object: 83de8e73a3d50917e4a41bb92a828a10e646a632 src/mistralai/client/models/files_api_routes_get_signed_urlop.py: id: 0a1a18c6431e - last_write_checksum: sha1:4cf67e8cafa1f448caf9b251dd9db3e9c87d062e - pristine_git_object: 326dd1d305261acc1407e6f70100b3b59dfcee5c + last_write_checksum: sha1:ef4908b9d2e43c0256d25a5aa533c5bdc1205113 + pristine_git_object: 64cd6ac57b4f2de70403e11062307a8d8d5d94e7 src/mistralai/client/models/files_api_routes_list_filesop.py: id: b2e92f2a29b4 - last_write_checksum: sha1:18f318488f01a9a919c8650ee1f5eb825c39c91d - pristine_git_object: e18eaa6a509344303c81599ac19ce2aa8e741060 + last_write_checksum: sha1:71e67fc63f0df28c534d4bd03a6464ae88959dc2 + pristine_git_object: b03e2f886ce02d4beabca150302a924ae63ad507 src/mistralai/client/models/files_api_routes_retrieve_fileop.py: id: 5d5dbb8d5f7a last_write_checksum: sha1:d451d8d2b32f412158a074919cca1a72f79940cb pristine_git_object: 5f8de05f1bba07517dc2ee33a4f05122503b54b5 src/mistralai/client/models/files_api_routes_upload_fileop.py: id: f13b84de6fa7 - last_write_checksum: sha1:9f48f3a8ca29457de8d1109bca2e98985963f286 - pristine_git_object: 25efcff2ade46c116ddc622a3c5796c2b95e039f + last_write_checksum: sha1:de49ee09350784e9d5c7adcafdfbf86c9ad7d659 + pristine_git_object: b66836391c8bc43e8535688c5829ad9cab04af49 src/mistralai/client/models/fileschema.py: id: 19cde41ca32a - last_write_checksum: sha1:c559713ad8602bc8f4a73268758f9a010a7fe8f1 - pristine_git_object: ce64a16bb54c33024580619fb15443f25473df8c + last_write_checksum: sha1:f65bf25e367c4e9be2be84af9b41e9d9c6719d0e + pristine_git_object: 11caa083108941befa3bc1e499bbcbf578811884 src/mistralai/client/models/filevisibility.py: id: 11a670fa3b71 last_write_checksum: sha1:8d44761845eea1d9bb239864863fc058e7c09bf2 @@ -3076,68 +3084,68 @@ trackedFiles: pristine_git_object: fe62d6ddc1187e1177ac834a85bd4e1b6a86ee52 src/mistralai/client/models/filtergroup.py: id: dbc0c34fbc2f - last_write_checksum: sha1:f900312cfcea2b2a341d83e95ca2fce3e467fa03 - pristine_git_object: 4e9815b7387904b071645a9a4682a4ffbf23d488 + last_write_checksum: sha1:074e2088caee0c3af4698927d840f5b00123074d + pristine_git_object: 06616a010b984e17c2a73aa6164120aa1a2ab5bf src/mistralai/client/models/filterpayload.py: id: 56757b849f7a - last_write_checksum: sha1:1d9a513f9c5a33c5ae249fb4926dd70eeb5e02e5 - pristine_git_object: ced355f16abe74ce87d1770cebe761d0b26c35bc + last_write_checksum: sha1:4ef55aaa20ccfc57cad906558886d0920220ffcd + pristine_git_object: 188375f1070630f46f3950271322fb9bc1b64fed src/mistralai/client/models/fimcompletionrequest.py: id: cf3558adc3ab - last_write_checksum: sha1:ebb1c97108ecd51ee163dcec36e3d88ece4695bf - pristine_git_object: 2ca34598854f3777430de33d2acf2fc45f27fbcc + last_write_checksum: sha1:20bca1f6a0ab6e84f48b6e332f0c3242da84ae45 + pristine_git_object: ea877213d1abe4811fee188eb7a60ccf1bb51f18 src/mistralai/client/models/fimcompletionresponse.py: id: b860d2ba771e last_write_checksum: sha1:dffd5a7005999340f57eaa94e17b2c82ddc7fd90 pristine_git_object: 1345a116b7855ab4b824cf0369c0a5281e44ea97 src/mistralai/client/models/fimcompletionstreamrequest.py: id: 1d1ee09f1913 - last_write_checksum: sha1:338c8d224fa5739296fe0e1ea1c00e65fba30b99 - pristine_git_object: 9c91083cc72cfa7ffa59d58e9255b16ac5983077 + last_write_checksum: sha1:aa8313ecdd852034aaf6ec23dc3f04f7ef8e28e5 + pristine_git_object: e80efc095feb2e2df87f6d3c3f9c56b6cbf347b3 src/mistralai/client/models/finetuneablemodeltype.py: id: 05e097395df3 last_write_checksum: sha1:daf4cd1869da582981023dea1074268da071e16a pristine_git_object: 7b924bd7abc596f0607a513eee30e98cbf7ab57a src/mistralai/client/models/finetunedmodelcapabilities.py: id: 475c805eab95 - last_write_checksum: sha1:91f720f910b01109b6216aa7de1b3f76d04108c9 - pristine_git_object: b9ad2f9e62486e5f54bc801ab547377114ca3f5c + last_write_checksum: sha1:5919e48a6778f1a2360ce090d05b41b1bf33253f + pristine_git_object: 2f4cca0b8c0e3e379f5c2aa67953f2e55757f68d src/mistralai/client/models/ftclassifierlossfunction.py: id: d21e2a36ab1f last_write_checksum: sha1:ca90e2f1cd0b9054293bea304be0867c93f7fac2 pristine_git_object: ccb0f21b5a69f91119bec9db6e9f3d876e4c35af src/mistralai/client/models/ftmodelcard.py: id: c4f15eed2ca2 - last_write_checksum: sha1:1c3ab1bda3fa9e2df33b47a49d5e9b9e2d82a701 - pristine_git_object: bb7c52c881ceadccdeb3590104e774f3d2ad94d7 + last_write_checksum: sha1:5875feeb3513b87853c52320b0fab4c36667fbda + pristine_git_object: 3874cec2aa027a56493d3ac33b44b6b83b5a7374 src/mistralai/client/models/function.py: id: 32275a9d8fee - last_write_checksum: sha1:c01c1ed54b3086859cde0dd3c3c466c78d8323ae - pristine_git_object: 8a3267e8b4b3fc78e64c46a0c05f7f9822bd3e3f + last_write_checksum: sha1:ca24a512de22787932d7f4af005699621926d6c0 + pristine_git_object: 1da1dcc9b637d0a5b0fbb7cf2761f6d01eb3068f src/mistralai/client/models/functioncall.py: id: 393fca552632 last_write_checksum: sha1:6e96e9abaa9b7625a9a30e376c31b596ee9defcb pristine_git_object: 527c3ad408e1e1ccfe6301a8860e7f751e1d312d src/mistralai/client/models/functioncallentry.py: id: cd058446c0aa - last_write_checksum: sha1:209dc38d13e7cab489dc99ecd2f400b259847ad2 - pristine_git_object: a88d87ab553d42a244cda26946dc10c44da3031a + last_write_checksum: sha1:776f397d17f946bae2929998f14d991a1ccc99e0 + pristine_git_object: d05fad856729a76dd24f8aa4d050f8381e51ed6a src/mistralai/client/models/functioncallentryarguments.py: id: 3df3767a7b93 last_write_checksum: sha1:9858feba8f7f01017f10477a77dec851a1d06e55 pristine_git_object: afe81b24e131a8ef879ee7f140271aa762b8ed2f src/mistralai/client/models/functioncallevent.py: id: 23b120b8f122 - last_write_checksum: sha1:57469e759f6d9100ca09e607a9687a4f59043bb0 - pristine_git_object: 6e3c0715818bf78d7cd90ab3cf1106aa5d31640f + last_write_checksum: sha1:62b5b94df4e5b6f945ead78871cdbfceb6cd40cf + pristine_git_object: 849eed76d08524e5e4d1e7cc1c3fa04386f5ef75 src/mistralai/client/models/functionname.py: id: 000acafdb0c0 last_write_checksum: sha1:4145b7b817b712b85dcbedb309416c7ba72d827e pristine_git_object: 07d98a0e65ccbcba330fb39c7f23e26d3ffc833c src/mistralai/client/models/functionresultentry.py: id: 213df39bd5e6 - last_write_checksum: sha1:ec72ed10d5170484643db846ac32df5e3263ca4e - pristine_git_object: 115765225e6b0f1c166b7b9c89a41fade1ba90e6 + last_write_checksum: sha1:3aa6834bf2beda061ac772a0a8a4d7ed5ad942a0 + pristine_git_object: 01e2e36fc0a9de6a2b06a4205004992baf0f9e43 src/mistralai/client/models/functiontool.py: id: 2e9ef5800117 last_write_checksum: sha1:bce744d77a3dac92d4776a37be497311674bdc7d @@ -3148,24 +3156,24 @@ trackedFiles: pristine_git_object: a8446737ead106f400900bc6b73d57db306bb47f src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py: id: 270800e2c264 - last_write_checksum: sha1:080172a6bc5bdadf2a6cbdb2ad91f8fe49b4a6f2 - pristine_git_object: 9db415bff26597d2ebd8544f39b86e15ac244cff + last_write_checksum: sha1:ceea6d622e9c62e38241a4819b771e78bf553b46 + pristine_git_object: e1b04950b7d7d5b738ce0244cbb04261fd7ee4b3 src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py: id: 853a43ee6b98 last_write_checksum: sha1:9e3fd0b27e1ff30e596fb2a81b0770cb6afbcf39 pristine_git_object: 57ac44905fd7db69e96533092c6d6e8bbe0eb083 src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py: id: 598a7340fc98 - last_write_checksum: sha1:e439c5269ea0a59311a3e8ddc514836364744a35 - pristine_git_object: 4ff0c3075443875ffe8c0e13aa3f7bb6fb45d4c6 + last_write_checksum: sha1:ca0f08deb402ee817dafbcd3bf7b05b9d3b7c5a3 + pristine_git_object: a6a329c729b68f11c211f570beaab63c539fc257 src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py: id: 98aff68bc7c7 last_write_checksum: sha1:dcdfebf2d374e5bbaa61e34c985d100b4a736581 pristine_git_object: f39b0f562ee8a75e611f6ad2929c43c83c230e99 src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py: id: 36957d0f73aa - last_write_checksum: sha1:9761398171c914a2b602c65e5e9a0beb69156aef - pristine_git_object: b4af68e0e0fee80dc3cde41e8e8324d6807e1b39 + last_write_checksum: sha1:cfd5144c778defd849d029ad13625e4674660a69 + pristine_git_object: 5a8b7450a685ade70cc728dc269a0f2577ba600d ? src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py : id: 0b1bd06b24af last_write_checksum: sha1:e3489181ee8230c478e5785e93c4f5270950fd33 @@ -3184,68 +3192,68 @@ trackedFiles: pristine_git_object: cf900d0e4ef6eff4114c5e7737d03d0ab0e07d6f src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py: id: 07ece48f664d - last_write_checksum: sha1:9156ce8891f5b9c0775f633316644afcf8984e6a - pristine_git_object: 8213c023c3d47e38d6f3cf14cf985e267529c600 + last_write_checksum: sha1:4cfeaf15f32193c8278759bf0274f5e4426ff057 + pristine_git_object: 43e0dc5b2f37ef1624547cd6bcc63e3780837629 src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py: id: 6ea6a0dab32f last_write_checksum: sha1:8a8027a201a49fa1fe6717a1dbae4a6c242b8dbe pristine_git_object: 0cb239dfd04d98488b8ce7ee143bb3cc589326e8 src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py: id: 77967c965aea - last_write_checksum: sha1:831414ebd99ed826562864b2819fbe35180b6e50 - pristine_git_object: ed1778235ce208110598a165c5afc9fbfc1a20aa + last_write_checksum: sha1:69e3467aa6225ce25c1f008649b683c43f6a34b8 + pristine_git_object: 7617a5d204f4f2fa66610ca711b803b1b5fbc0ad src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py: id: 3e4f4e2447ac - last_write_checksum: sha1:c58e1c3e04892b5bfcadeec7c640c37c8d3da017 - pristine_git_object: 1d79f2d59fc1d0f38c66d85cf266bc9700087c37 + last_write_checksum: sha1:dc0305b848582ea310b935c15da10f044a832978 + pristine_git_object: ea52dd5180f5580cc5b94ecdbaa5ef67d89e5621 src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py: id: 4201c3c5a891 last_write_checksum: sha1:44c9a7d21ea727e0f849cfc5dc4a02220bcf6e74 pristine_git_object: 375db2e9b8ff839f6ec3bdfdf06de9b7a24fbe7c src/mistralai/client/models/get_judges_v1_observability_judges_getop.py: id: fa04e3db7781 - last_write_checksum: sha1:d59740c9021cd891db4b81a7f4c6aeeecb9d6958 - pristine_git_object: b5d0980e197c19eaa70ac26f3b118a8e60364e3e + last_write_checksum: sha1:bfc31bc3de6ddacf3a01cf3f5a74be3fea83b3a0 + pristine_git_object: 7228cfa13211d7bca8ccbca8f9a3137e7d6689d6 ? src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f pristine_git_object: 7689415dd70da6eec8d0b416cbf020c4b9adeecf src/mistralai/client/models/getfileresponse.py: id: 81919086e371 - last_write_checksum: sha1:a116c2fdef65748b5015804fc0eb9860fd2bc3b2 - pristine_git_object: 37c29bbb41ab44aa6d42ea7e7f094d52a210a5a8 + last_write_checksum: sha1:5a70dc35ee1dc2360eacda5e0dbe08b346f8b480 + pristine_git_object: 82280899020739d61aca44ef731d175e6a66f325 src/mistralai/client/models/getsignedurlresponse.py: id: cee4e4197372 last_write_checksum: sha1:ab9adbc06e7f02e791dc549ad1850ce1b1a250a7 pristine_git_object: 4ba95894f2b89719fa58e7e397c28014dbd00316 src/mistralai/client/models/githubrepository.py: id: 4bc83ce18378 - last_write_checksum: sha1:4c1358be59e667394757b01a5eeebb4b5ce134f4 - pristine_git_object: 4ec88aa827f1d813e4a01ed2f382b2d02a19dc3e + last_write_checksum: sha1:21aa04bc426158ccbe1ded3bc65b46e6869e897d + pristine_git_object: 84b01078c2192de5d6668a6943d416a2ff30db5f src/mistralai/client/models/guardrailconfig.py: id: c72b74412547 - last_write_checksum: sha1:1688b51dafa47d23ff048e88975b21f24932f6c0 - pristine_git_object: d152ec36741bb8302b0d4f72563e534ed7768cb6 + last_write_checksum: sha1:b66f91989a8aabd977bce2c8fd225e6f47dae60d + pristine_git_object: 4f8fe352e9d0abc23468ed6498ebf63c7e4df5b6 src/mistralai/client/models/imagecontent.py: id: 3abe7faee278 - last_write_checksum: sha1:c0057cab50e78c45069bab3cbec065ab3dbbb50c - pristine_git_object: e6363daa7442b2f0b48bb99ceab76bff08680550 + last_write_checksum: sha1:22229b74dd00ebe78ea3589964367e0785f8bcf0 + pristine_git_object: 13c3f449b20aff0da0325cb3c955c8e64aec61c6 src/mistralai/client/models/imagedetail.py: id: c1084b549abb last_write_checksum: sha1:375db5c8fa87712dc37e46d0bf72283ae6cd6400 pristine_git_object: 1982d357277a92fc7ebea3b99146116596d99c78 src/mistralai/client/models/imagegenerationtool.py: id: e1532275faa0 - last_write_checksum: sha1:0fcb9fdeffe252c88497f02164f7e753bea40ff1 - pristine_git_object: 0dd4a4d2a4671bb310410eb17bb85032638d817c + last_write_checksum: sha1:88a1347876f69960dc33f8e2cb9929ab1a90a224 + pristine_git_object: c1789b18028156ae683d0323e65e47a43694570f src/mistralai/client/models/imageurl.py: id: e4bbf5881fbf - last_write_checksum: sha1:a3e5c91291a5fcc24bda8fc1c96a2608965edae5 - pristine_git_object: 32efa67ba4a33ac90c1a16c153ef480e35d1bb67 + last_write_checksum: sha1:28ef2509fdb489ecf379b60e883e6957aebd2797 + pristine_git_object: ac1030f5d61144e393b2aa9f3ffea893faabb1f7 src/mistralai/client/models/imageurlchunk.py: id: 746fde62f637 - last_write_checksum: sha1:deae705ab4819d4a016ce04d61776ae378210b96 - pristine_git_object: 1e342fd6dc457d2b00f4dd0c78e38008c6c82e33 + last_write_checksum: sha1:6cf26244c86ff4b43b134966aae4fa6ef91999e8 + pristine_git_object: 59ad96e9d0449f6a8a636d4959f18be626dc2434 src/mistralai/client/models/importdatasetfromcampaignrequest.py: id: ee475b85bfc7 last_write_checksum: sha1:34367bb23d1528b87e67f36d06cc362a05a02c6b @@ -3276,24 +3284,24 @@ trackedFiles: pristine_git_object: 9ecd7f484ea306b91a9ebf038a0addd80ccd57c4 src/mistralai/client/models/instructrequest.py: id: 6d3ad9f896c7 - last_write_checksum: sha1:b56a77442b50b50151adedaa5ec356dc96c56428 - pristine_git_object: e5f9cccf174d8e73c42e8ee4aa294b43e1ad6cf5 + last_write_checksum: sha1:d49d03f5a1d0e35668851aced62848ed3e20f001 + pristine_git_object: 2bda83781d24d3a999014d483ea92604c7509438 src/mistralai/client/models/jobmetadata.py: id: cfbdde7fc0a2 - last_write_checksum: sha1:efe10ba4aad0a0e0befd94525b73ab2194e43be8 - pristine_git_object: 8409872bc3149d28558bfd23e85196169499c539 + last_write_checksum: sha1:e1b180a47ca888d0fd4cbc34b62000d3ac86c2b5 + pristine_git_object: f6e96fa104e7a6c8ce9a94538a3d00167a2ae341 src/mistralai/client/models/jobs_api_routes_batch_cancel_batch_jobop.py: id: b56cb6c17c95 last_write_checksum: sha1:21b5794f110c53691654d7195201f9a4b7793f21 pristine_git_object: de2e63472ac53809cfeae200bd7d2f3dcbb70034 src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py: id: 36b5a6b3ceee - last_write_checksum: sha1:449dc131e1514edb32107ae1c699544732b313fb - pristine_git_object: 683da4af5412e7da90a4af83864c40dc53a9ed77 + last_write_checksum: sha1:b41862f037d74bbdc44fb4df5f65cd402a16703b + pristine_git_object: d779e1d96c359b0d548d5dee17c06ae2a505cf47 src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py: id: d8f0af99c94d - last_write_checksum: sha1:04082f4aa3dcf94708c1fab8c3114e690959d6d1 - pristine_git_object: e5869656d9666768dcbfd53883ed6706304fd565 + last_write_checksum: sha1:a50885f97cfd4d38bc3e3b0746c88bd602b88f94 + pristine_git_object: 89ac3c933347497b6fb1ec26fecb485802ef85fc src/mistralai/client/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py: id: 34f89d2af0ec last_write_checksum: sha1:3d5242f757ee9be10963af9cd5d47824fc83c71a @@ -3312,8 +3320,8 @@ trackedFiles: pristine_git_object: ddd9c1891356a7c272e0244a9aea3d3d6b2d00d6 src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py: id: cf43028824bf - last_write_checksum: sha1:80c2601bdbab567e7bdf72f1814c3ae58d477a22 - pristine_git_object: 9b9aeb51176498eeaa29bed80346f150d6b94573 + last_write_checksum: sha1:36082bde6f3d932c66178729533e2a69040fdeab + pristine_git_object: ec80a158f45061b122f84ebaff89ae82ef8d98ef src/mistralai/client/models/jobs_api_routes_fine_tuning_start_fine_tuning_jobop.py: id: e7ff4a4a4edb last_write_checksum: sha1:8cbfc309c09df806ad7d130004b4e1c2b89ede0a @@ -3328,16 +3336,20 @@ trackedFiles: pristine_git_object: 296070b426900305fe4596f03a3c9f081cdb2dcf src/mistralai/client/models/jsonschema.py: id: e1fc1d8a434a - last_write_checksum: sha1:f6e3ddb37e55ff27b795389fce6d4f433e7d5639 - pristine_git_object: bc0bd6c41111937654fba20a16420b6867f7c92a + last_write_checksum: sha1:d01507ab0a1f6067cbc65aaba199de340ccc68aa + pristine_git_object: dfababa694305c96f98ddebf2f09e448e737c855 src/mistralai/client/models/judge.py: id: d6adc687c2d9 - last_write_checksum: sha1:fec0539aab8eb11de3815317c1a54d3e86957ba0 - pristine_git_object: 036aabb710e1d96af1bf69d563032ab05567b909 + last_write_checksum: sha1:bce628dde18d918345c497037d6f2a9c2e60dda0 + pristine_git_object: 1fb1d3866bb719696e5c95d9cefc834f828c65e9 src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py: id: 98c823e7cc1b last_write_checksum: sha1:74dd8fba663c0338a24c497949572b5e5df7e494 pristine_git_object: a6b9c969d506481b3c3bf5c86611905f30f6ec88 + src/mistralai/client/models/judge_conversation_v1_observability_judges_judge_id_live_judging_postop.py: + id: a958f3e6b122 + last_write_checksum: sha1:21834ba5dc03705ebd02e5d449549cf1dcd2fd32 + pristine_git_object: 4f211dd3463eb2cbeffc67c22d17e43a083f9501 src/mistralai/client/models/judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop.py: id: 4749566fd16d last_write_checksum: sha1:cc2201d706b884e41bd83333d4db37970cf7bcd5 @@ -3354,6 +3366,10 @@ trackedFiles: id: c238f17d786b last_write_checksum: sha1:1adbac09caf15374b52b61f257d838db2e486690 pristine_git_object: 64fad49fa2336b0cbaa69dac7493a18593021275 + src/mistralai/client/models/judgeconversationrequest.py: + id: b8bfdade89a2 + last_write_checksum: sha1:8651a4749442af4efab446d3849684766173d0d0 + pristine_git_object: 4b8cff1b431ac484d654cca615db6af7e8a93e26 src/mistralai/client/models/judgedatasetrecordrequest.py: id: 9ad8915328dd last_write_checksum: sha1:c37f9c158061e4d3c6c6eda2d7ee8a5d5e7f5afa @@ -3368,12 +3384,12 @@ trackedFiles: pristine_git_object: 4fa99498fb6a60e9d4d8358660eb0ecd57d34178 src/mistralai/client/models/judgeregressionoutput.py: id: c61d451066dc - last_write_checksum: sha1:2dd3b0dc5c82a977bac095aa6c45c7067bcc187c - pristine_git_object: 9bb8f9c1283b3de89bbf8b859a79d27054ee6074 + last_write_checksum: sha1:0687cabd00d205ec50e238872e57547ee4a3dc3a + pristine_git_object: 63394d8bdc8aa95fa8bfe99b39ae3863aee01ff4 src/mistralai/client/models/legacyjobmetadata.py: id: 0330b8930f65 - last_write_checksum: sha1:32265ed638a7675fb46c7de747bdb2a775a94505 - pristine_git_object: 143f0e7cb42b050da2ba7ef5ad1afd28397f7f00 + last_write_checksum: sha1:3c2f669a05cc01227f62d6a8da1840d9c458d52f + pristine_git_object: 5757675895b3c56d8aa7c174deb08567e596ecf8 src/mistralai/client/models/libraries_delete_v1op.py: id: b2e8bbd19baa last_write_checksum: sha1:ba41496bc99040f7598659c5b037b955b7f6d385 @@ -3404,8 +3420,8 @@ trackedFiles: pristine_git_object: 857dfbe60c57af8b0fa6655a049ed336d70fb941 src/mistralai/client/models/libraries_documents_list_v1op.py: id: 756f26de3cbe - last_write_checksum: sha1:565872ef17a53cc9751fa2c8fc1267dac2d01e76 - pristine_git_object: afc474cbe6c571ac36fe0800d4c1e5ffd07eb207 + last_write_checksum: sha1:5a1a9e025dc7a1fedaa5199d396a73c4986d4113 + pristine_git_object: da7d793b65139a3894b077a9665b392e8a44e8a2 src/mistralai/client/models/libraries_documents_reprocess_v1op.py: id: dbbeb02fc336 last_write_checksum: sha1:bd5013cb1581dd13642ce7edf1e701f5b0c967c4 @@ -3440,16 +3456,16 @@ trackedFiles: pristine_git_object: 54b0ab708c665ccb841b1c8d0f2748c390850506 src/mistralai/client/models/library.py: id: 028a34b08f9c - last_write_checksum: sha1:3ac8546f2ada4f9a24d8296e03b9ad61d5f2e372 - pristine_git_object: c26710ff4818c9719e08b67d147ee9bded3dc46d + last_write_checksum: sha1:65f02f963a0540385681b88c7c7fba98d0d704f4 + pristine_git_object: 1953b6fbc6d7ad245ccacd9d665fb29853b00af7 src/mistralai/client/models/list_models_v1_models_getop.py: id: 1843a7aa68e5 - last_write_checksum: sha1:018c32019aab6c4995285ace8abba54d88f41c0b - pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db + last_write_checksum: sha1:7058318c4642e630886ba60d3a6dda7ff5dd909b + pristine_git_object: 70b0ab82a26bdbc6c2ea63e6ecb2b3b3046d7eb3 src/mistralai/client/models/listbatchjobsresponse.py: id: 99d94c86a871 - last_write_checksum: sha1:01e5fd232c654b3c4a9d86c09f89cfef6f51805f - pristine_git_object: 77265322df4e5b13c7e2efaa9f7e3e2554387893 + last_write_checksum: sha1:7530be5f80a0756527be94758e800e8118e53210 + pristine_git_object: 35a348a1160dcf6d82d58c70cea07e11730359fb src/mistralai/client/models/listcampaignselectedeventsresponse.py: id: 8e28cb9aff1a last_write_checksum: sha1:7ada7958f9c87fa6ae7a329fd03cd626a279ca93 @@ -3480,12 +3496,12 @@ trackedFiles: pristine_git_object: c48b8c051ad0d1fb4aed8396697e57e782be5a40 src/mistralai/client/models/listfilesresponse.py: id: 85d6d24c1a19 - last_write_checksum: sha1:c47c2d220c41e4b467c25dfe2e94546a5b452138 - pristine_git_object: 37787dae3bc4016988b1f1edfdfeac4b2d4b0000 + last_write_checksum: sha1:caf901685bfb6f13d707b89726aaf6e5116cd054 + pristine_git_object: 10a60126600343033a4b0511d717cac6f1924b4d src/mistralai/client/models/listfinetuningjobsresponse.py: id: 118e05dbfbbd - last_write_checksum: sha1:7943e1bfc9a400ef330284b8241c28f2e64259f5 - pristine_git_object: 39547d571d2e8ce8485f6cf41aa8ad4bfbc7398e + last_write_checksum: sha1:f0582740a6777039e9695d97f072b5a3c34b483e + pristine_git_object: 1e434c5986bf577e2b42cca943cc6896a83d1fa2 src/mistralai/client/models/listjudgesresponse.py: id: db389a8abc34 last_write_checksum: sha1:4ba57c7b7966b7eb81472d8ecc0b5ce726458360 @@ -3500,8 +3516,8 @@ trackedFiles: pristine_git_object: f3e6dc8714311989d1e6c7275c8944e228f3f0c5 src/mistralai/client/models/mcpservericon.py: id: a5b508a322d7 - last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 - pristine_git_object: 293ab37505a1098241631dd83435a0e91d073551 + last_write_checksum: sha1:090bcf0f2856c453d32f00fd434988300572b811 + pristine_git_object: 6068c1c4b3b205b8e7e7db0c31a9b2dfbfbe1f7e src/mistralai/client/models/messageentries.py: id: e13f9009902b last_write_checksum: sha1:43aebdc9eaecc8341298dc6b281d0d57edf4e9e6 @@ -3512,68 +3528,68 @@ trackedFiles: pristine_git_object: 63cf14e7fcbc7c3969220b4f07109473b246bf49 src/mistralai/client/models/messageinputentry.py: id: c0a4b5179095 - last_write_checksum: sha1:715be926eadfd33538ac4241becd803411126479 - pristine_git_object: be271e317c5de4c52c83fc1c1091eef696e48458 + last_write_checksum: sha1:b5bad18b88c0bfbbddfdafa6dc50a09e40a6ebd7 + pristine_git_object: c948a13e3cc2071dd1b3d11c419ea61d51470152 src/mistralai/client/models/messageoutputcontentchunks.py: id: 2ed248515035 last_write_checksum: sha1:df4ef4d17ce48df271ff2b8cab297ae305aa08ec pristine_git_object: def7a4d27cd3d1479864a1d6af19e89bd57bff70 src/mistralai/client/models/messageoutputentry.py: id: a07577d2268d - last_write_checksum: sha1:ceee2327568213ee455a42c07a5be6b64469b384 - pristine_git_object: fd683ad31afb5765535d87affc9ef2011c16d574 + last_write_checksum: sha1:38ad03422407925087835ab888c0be40bf5fa7fa + pristine_git_object: 6a9c52ed59af1497577be2538e7141d57eea4c8f src/mistralai/client/models/messageoutputevent.py: id: a2bbf63615c6 - last_write_checksum: sha1:7081a6aa27f0893b5628f16871bb1ae5dc23f2be - pristine_git_object: 8f5ecd4363fe23e96127bc5ffdd534f7c500496b + last_write_checksum: sha1:c3317ab9279c499dd7fb26f45799ca9369676ac7 + pristine_git_object: d765f4fd3c4e43c37063833368e4b21cc0bfbcf2 src/mistralai/client/models/messageresponse.py: id: 6b388bc155dd last_write_checksum: sha1:14ce5842084a2086505dd80eaa6200638a278000 pristine_git_object: c8fbdff77b3464b630b0cd18f25d9179c5ff9eca src/mistralai/client/models/metric.py: id: c6a65acdd1a2 - last_write_checksum: sha1:0d7e4ebbf55f8dcc52facb894589ce44abb0c2fa - pristine_git_object: 8d05989420e1b8b68c90fef193bcaff4452c97fc + last_write_checksum: sha1:5ef7c75b278f16b412b42889ff0f2fc19d87cb7d + pristine_git_object: 1413f589f7f23991a12c1367bc6f287b5e07d4a4 src/mistralai/client/models/mistralpromptmode.py: id: 95abc4ec799a last_write_checksum: sha1:a1417b987bb34daeb73ca4e015c085814e6c8ad2 pristine_git_object: 9b91323e7545d636308064085ca16fc554eac904 src/mistralai/client/models/modelcapabilities.py: id: 64d8a422ea29 - last_write_checksum: sha1:352a8cf6dfa61eff04e37609272e0b1ab7a5ffee - pristine_git_object: 3267c7079218df12d78db6815fb6339fad0c6168 + last_write_checksum: sha1:6e0ac449f1dedceccd33d0cac69e87733c8c87a2 + pristine_git_object: b9382047cf69cd2e79ac366cd2418c424442d207 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:46ed83726fd34517bf05bf6fc1204a0134c38a06 - pristine_git_object: 72ca957f0eb33dfdfad8fb8074f93b066868f074 + last_write_checksum: sha1:d08fe4b4bb63e20e51fed78f1bf376babe667179 + pristine_git_object: d7f765bf9657f7637da3ab00f545d0f3ce9d2614 src/mistralai/client/models/modellist.py: id: 00693c7eec60 - last_write_checksum: sha1:fedfe929f37d6d81248f8f2d6004454aaa35145f - pristine_git_object: a6020100124b5c6493cd1014bf576c439537502e + last_write_checksum: sha1:de62fc6787f482e5df0ff0e70415f493f177b9a1 + pristine_git_object: 5fd835f24cd1098a153ebfb3e958038a183d28a7 src/mistralai/client/models/moderationllmaction.py: id: 7b18ccbd8ca9 last_write_checksum: sha1:0067c773f68e8c9a6fa9e802b1d5a5b97efa7d5b pristine_git_object: a2553f3041e129df165d49072a60fe31cd8b387b src/mistralai/client/models/moderationllmv1categorythresholds.py: id: 0c51d6766440 - last_write_checksum: sha1:3eca62d031d924bc504a3963911d8f0894c1b4c0 - pristine_git_object: 9a947d111113c748df99d7a01a4c899962425dc7 + last_write_checksum: sha1:17f74a67d19a59214e93c54e5cabc4132bdbee48 + pristine_git_object: 0451ba3afcbff22d1cc41b784c896419bf49e5f5 src/mistralai/client/models/moderationllmv1config.py: id: 483378b56394 - last_write_checksum: sha1:bb2f92e87172e9ada69b1746f2b64ab41b550397 - pristine_git_object: fe597a9b9654ccdb37b35b673698ac8015796e6f + last_write_checksum: sha1:b512a61a1513ac50731ccf154b85e8d746f965db + pristine_git_object: da7156eb30c23a89648d8cc7e674910b12a0c896 src/mistralai/client/models/moderationllmv2categorythresholds.py: id: 4c2a8ff4d52b - last_write_checksum: sha1:1b3e0e76b7f1b70a77cb7b24965d83f88188f306 - pristine_git_object: 2ca952c5264bd1e19c149802b380c3d82ec09ed6 + last_write_checksum: sha1:2194db15a54038f89890c7d5b56aa50a2df0603c + pristine_git_object: 1754582b849a16dbf77fd9943edcc6f2f1c55ee2 src/mistralai/client/models/moderationllmv2config.py: id: bb511e7c628b - last_write_checksum: sha1:e77793718de35e58f2e6280126fc320b233cc365 - pristine_git_object: 5cd8b7ca1bd68540274db7a11286c200f4d57add + last_write_checksum: sha1:853c419e237e290057a6454ab99d492311d7b67b + pristine_git_object: df2b04bdfb831a71555a849209f10a1ef06d0564 src/mistralai/client/models/moderationobject.py: id: 132faad0549a - last_write_checksum: sha1:5c551cc8657d3d9c3394638e6d336162563fc6ee - pristine_git_object: 66f6a84bf55703c7e4b46e4381e2b39a0b0eaaeb + last_write_checksum: sha1:a8c1454a533e466216ef98dd198ae8959f51fa76 + pristine_git_object: e7ccd8f6f1f75704a973be7ebabc49617070c34a src/mistralai/client/models/moderationresponse.py: id: 06bab279cb31 last_write_checksum: sha1:b9158e575276c1e0a510c129347b9a98c5a70567 @@ -3588,36 +3604,36 @@ trackedFiles: pristine_git_object: 99360d410f7128756a7a7f6be6772238fa15c12f src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 - last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 - pristine_git_object: f1535352af02c0d32c573f431b0440da4dab2fd6 + last_write_checksum: sha1:c3c57f0c1c7de0a90900ade464caebfc0b78694b + pristine_git_object: a6236b661f20569cba1ee394ebae24219e82f2d7 src/mistralai/client/models/ocrimageobject.py: id: 685faeb41a80 - last_write_checksum: sha1:a848d782d09e7b899e4a801d8ea43505783c853f - pristine_git_object: 583cc38bf6046ff783ac2b5b2306fa42fa3c6fb5 + last_write_checksum: sha1:13f4e4d33d8fb5b0ee842695d4cc8329bd7ca382 + pristine_git_object: 365f062b5674141aad4b1601a85bec7a56db4cff src/mistralai/client/models/ocrpagedimensions.py: id: 02f763afbc9f last_write_checksum: sha1:f572ed8992ba1ba4d53b705c4e8c94c85ae1290e pristine_git_object: 847205c6c74a621dd2ee6d9eb18d1acba8395c50 src/mistralai/client/models/ocrpageobject.py: id: 07a099f89487 - last_write_checksum: sha1:8fd95a2a0b6a7a8090d7c0a6a480a4d091a2a9f2 - pristine_git_object: 40b70d8143410bebd0913ab9896584e6b252780d + last_write_checksum: sha1:5089ac3f02e4225d6c95cc9f05b74013694536da + pristine_git_object: ffc7b3b615e17a8e0d76fea4081249b143d8fe4d src/mistralai/client/models/ocrrequest.py: id: 36f204c64074 - last_write_checksum: sha1:c3dd9da8c018858f849344c2d5d4da74d1a337ce - pristine_git_object: 6e405ee401e61f0aeb17ad0a49dea31499ec99da + last_write_checksum: sha1:9e9009dace9ff36cbff0cb8de408a1e0585147a7 + pristine_git_object: 4ad337ced23b3bdad21785b8dc3fcadbb868d4f0 src/mistralai/client/models/ocrresponse.py: id: 2fdfc881ca56 - last_write_checksum: sha1:8e496f6122ea0798df0d23f50ea3046a29f0f8db - pristine_git_object: ff4b96c30573a18c2e5665a6f3f10724f7a23f9a + last_write_checksum: sha1:f1d18dbf4cd02f3598ae574d5033c30989fa6985 + pristine_git_object: e63eed987f4eb83f3406b15cf4d840fd43528a49 src/mistralai/client/models/ocrtableobject.py: id: d74dd0d2ddac last_write_checksum: sha1:492f8e4c30b61330592768b13cffcf9a9eb2c0fa pristine_git_object: 66bb050f30790c3fc51cdca1b73e847388fe50c5 src/mistralai/client/models/ocrusageinfo.py: id: 272b7e1785d5 - last_write_checksum: sha1:eb223a88b7e5175056197f64bb4bce2c88ccea19 - pristine_git_object: bfd748e0010e6acc404fdadfff40ee54ac52b9be + last_write_checksum: sha1:2b37766fdff72e7ec6e052f248362f7bb3989d2c + pristine_git_object: 2ec1322b29d7fe5246b9ad355a4997222b37970f src/mistralai/client/models/outputcontentchunks.py: id: 9ad9741f4975 last_write_checksum: sha1:afb76f3af2952c2afab5397e348ddfd6dbb56c4f @@ -3628,36 +3644,36 @@ trackedFiles: pristine_git_object: 291da1115294da17b7ca7babc8dc2d7ef672d709 src/mistralai/client/models/paginatedresultcampaignpreview.py: id: 6653cba0f982 - last_write_checksum: sha1:0f8d85739c71ececa1df8228ae827e1ebb9cfdcc - pristine_git_object: f6cfce379837e38cf5e42927ceb2d57c58325c67 + last_write_checksum: sha1:8b3d00eec103d4ee7b27cda1e08af9656c2c49c1 + pristine_git_object: d82ee741f4673fd96baaba619f437e348fc02379 src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py: id: 8c640682ccf9 - last_write_checksum: sha1:43b669ef54761d35893eb433c7089d1c350848cf - pristine_git_object: e08443c16e0d23cde396bd6465d92f1ae9a93777 + last_write_checksum: sha1:3b7e4de0836bccf0b3247962c17acc55a6caab35 + pristine_git_object: 97bbfea7c0901cf5487cf3a1743417a81232c254 src/mistralai/client/models/paginatedresultdatasetimporttask.py: id: 8fd0a8bad4e7 - last_write_checksum: sha1:27afb85f9e813c8d9674bdac0892bda94d66659f - pristine_git_object: 4b9f48817baacc32672225b1c08642b4988f17f6 + last_write_checksum: sha1:f16cfea21df8209caea5b9f8e786a8793b2def50 + pristine_git_object: 9d6dcd052bbedb3e8cb618ce28db9bba1da3c54e src/mistralai/client/models/paginatedresultdatasetpreview.py: id: bf20489474ce - last_write_checksum: sha1:57f86606669135792e8ed1bd7065028380e689ed - pristine_git_object: 81746f355996c52df14778f2d402932a59c983a3 + last_write_checksum: sha1:80544bb270892461e255c9697decace639c1f8ec + pristine_git_object: 51566cc5899b587d7005aadaa05314429285585f src/mistralai/client/models/paginatedresultdatasetrecord.py: id: 2556a91b48c4 - last_write_checksum: sha1:bd99e30e61b7487ef86acae66cdd44669b811355 - pristine_git_object: d9aa8c8e810767d749c8588fe801beba7cf77e65 + last_write_checksum: sha1:3e797b6e84b02e62b7db248cbc605a7c723ed370 + pristine_git_object: 1d6e15c1fb7df86cb66cf4263907b9a5ac19d8b6 src/mistralai/client/models/paginatedresultjudgepreview.py: id: 4d5aab2705a0 - last_write_checksum: sha1:16667401828bb23b61f284c0ed934eeb78e1eaec - pristine_git_object: c61382f99c27190203d05aa304f8a9eecaebbdb6 + last_write_checksum: sha1:77371c66e748507206fe1b00b228ba378e89f387 + pristine_git_object: 57dbc1e5dea2e462036ec2b5f48bf3fa18099edb src/mistralai/client/models/paginationinfo.py: id: 48851e82d67e last_write_checksum: sha1:166961e2c0f573ba0677ee803820bb944a8a5efb pristine_git_object: 2b9dab6258249f7be87e1d4a73a2502e21fe1f0d src/mistralai/client/models/paginationresponse.py: id: d64678967bf0 - last_write_checksum: sha1:693e9b575e0da721b15363db1e381d19f8766efb - pristine_git_object: a60640aae96b54f7f8e7561029fda45a165007c4 + last_write_checksum: sha1:683972d8248b032e3f30489c8aa3cdcdcc728862 + pristine_git_object: f05ee380b8a7e95f67545a61d333fe28956585ae ? src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py : id: 3e8e390b7fa1 last_write_checksum: sha1:7785e0e41ffed189357a2f5682a0158fbcfe80ca @@ -3680,8 +3696,8 @@ trackedFiles: pristine_git_object: 7423375af779911d2842ff9736452fc19a385daf src/mistralai/client/models/prediction.py: id: 1cc842a069a5 - last_write_checksum: sha1:3ccc14b40fd70f3b4a5cdae3eebcc557b96aea8e - pristine_git_object: 614f481174e58eb7ba28cae5238b532d1d66ef9c + last_write_checksum: sha1:3ee24375eb7f00cea0c9db6eebc564ce7067f295 + pristine_git_object: 0c6f4182ca8140e595f601b12fbd582034257587 src/mistralai/client/models/processingstatus.py: id: 28146eaecfcf last_write_checksum: sha1:a3e3ebeae169441cf430c302c9fe278de79ce215 @@ -3692,80 +3708,80 @@ trackedFiles: pristine_git_object: 15bdce2056f2f642096fbbdb2ac32ce1e5b8c9cf src/mistralai/client/models/realtimetranscriptionerror.py: id: 8c2267378f48 - last_write_checksum: sha1:8bfdc2564fc416b0e1a4cc2e2a3a5437b26cea85 - pristine_git_object: 8ea1d4259df73f29096dd469dc24f668a4af0066 + last_write_checksum: sha1:78637de61d6fc3bc1fff8e95c0a6f5ffc1a3e111 + pristine_git_object: c661e46100752119521f63045e8ebe79105ecc01 src/mistralai/client/models/realtimetranscriptionerrordetail.py: id: 5bd25cdf9c7a last_write_checksum: sha1:a226b10718b1fe4a661311cbd98ea3b1d1ac4163 pristine_git_object: cec1f6eabd44ceab4e58694a0862c9c90ea2f264 src/mistralai/client/models/realtimetranscriptioninputaudioappend.py: id: 8b03cde6e115 - last_write_checksum: sha1:292ec325423d102ac2ff89071dd814625359ee09 - pristine_git_object: 82ce59fccfe6347876f83a7bcfb78858915eca8c + last_write_checksum: sha1:abcf48a48b077e836e2ae5647d93bd61007b9aa7 + pristine_git_object: 8156a2704bd95b74875f7a9ac17191e026f08993 src/mistralai/client/models/realtimetranscriptioninputaudioend.py: id: c187ba1b551d - last_write_checksum: sha1:7edc5617574a354fd3eb67a16086b5cd0d52cfbb - pristine_git_object: 9b0a87099103480379794727fa12bf1face16c6b + last_write_checksum: sha1:fa96156774481ca3b98f8c0f99b3b1db01280b37 + pristine_git_object: 473eedb744141faa3447929865a76129d5e96432 src/mistralai/client/models/realtimetranscriptioninputaudioflush.py: id: b27b600c310e - last_write_checksum: sha1:a7ad72a1bbae2f4f8c79aa277fd8beca6db2e1d2 - pristine_git_object: fe7286330722a27859c647d1c4f66f501e5fdd03 + last_write_checksum: sha1:8a8eb7de4137cf8cd810d93d984009bf8dff51c4 + pristine_git_object: 553d14c7720b3d1388901989d8160f0e3318ba56 src/mistralai/client/models/realtimetranscriptionsession.py: id: 02517fa5411a - last_write_checksum: sha1:3932d73a512a963ba7b8ed77ebaeb614785d7d1a - pristine_git_object: e23c07ec9df36495b4482a4fd9592867db2d0b3b + last_write_checksum: sha1:eb9a23fb89e0bdb3bb6168f512488a98bd626bc1 + pristine_git_object: a74a457b1e54deb1fcd203ce5ff2c57691f16b18 src/mistralai/client/models/realtimetranscriptionsessioncreated.py: id: 4e3731f63a3c - last_write_checksum: sha1:daf7843f9d775a7c915e55f34213f3db2620044c - pristine_git_object: 88da8764f123cb42d6476c8f0cd60c9e7d2b07ae + last_write_checksum: sha1:6997848cf22dc90b10597eaf9f0dd966ace969af + pristine_git_object: bb96875ab913f3d6ff241a00d94a87e877637782 src/mistralai/client/models/realtimetranscriptionsessionupdated.py: id: 686dc4f2450f - last_write_checksum: sha1:ec6e2ddb086b80138cbb1492b013ae0a6dd11b9e - pristine_git_object: 474b2fa70798bd0fea65232fa5f32eb33dce4c69 + last_write_checksum: sha1:e023fe0c8c54da644fc797c25dfeb070b6f0fd1c + pristine_git_object: fea5db4a1b956cb8253e4f147463c47958bfd989 src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py: id: 4e1b3fd7c5a3 - last_write_checksum: sha1:2edad8c5170e38fc0968569bcd0cf1c51321f80b - pristine_git_object: 4013d63818394f0f2eff84b72bba5234fb139378 + last_write_checksum: sha1:7da202e016b1d1dfc36a13ac03e3b419f0952cd2 + pristine_git_object: 07ad59a41f8a16b9c23c4e0be503a801ec0e2dd6 src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py: id: 7033fdb33ad4 - last_write_checksum: sha1:0221d1f4df2e6f7c8e42c366d439ec54023e0b1d - pristine_git_object: d4ce43f77c6dd2e6691b04402523bee6b9d21ba6 + last_write_checksum: sha1:812f072a9effe1ce44e56094121ed10b3a83e39d + pristine_git_object: a89441e91dff4b7a78e8dd247b43243e89bf129d src/mistralai/client/models/referencechunk.py: id: 921acd3a224a - last_write_checksum: sha1:2534e964c706b886e64fdedfe34b1cbf4cb23e76 - pristine_git_object: c0d7c06584814227621699df817971a4e6920e39 + last_write_checksum: sha1:511db5ac8da2bdbad3b8a8b4b8b70348f2b9d143 + pristine_git_object: a5fa22f0d14318eab80e438710d413275e705e4b src/mistralai/client/models/requestsource.py: id: 3f2774d9e609 last_write_checksum: sha1:1ce68530a46793968f1122d29df722f0a5c9d267 pristine_git_object: fc4433cb4e657b06aa6a4c078094c2df342810e2 src/mistralai/client/models/resourcelink.py: id: 4251cc3c7797 - last_write_checksum: sha1:fad9dd6a100450397ee358842a31804c3552ca06 - pristine_git_object: 890c5be1de611379c12d1525d596bc284e0e197d + last_write_checksum: sha1:f2a70cf2edb98dc0ab7e71fc3bf6f26d28cfbba7 + pristine_git_object: 8ed5613cb6db09f80e7bd0fcb1d8b06c231390ac src/mistralai/client/models/resourcevisibility.py: id: b5819dd5f981 last_write_checksum: sha1:3c7e91baa8c8a0bb2ba55a6b7c14db04350278d7 pristine_git_object: 56f91f154594a121c988497332e5b978cee4264c src/mistralai/client/models/responsedoneevent.py: id: cf8a686bf82c - last_write_checksum: sha1:598757cc2549972367c626143eb14864f40b4868 - pristine_git_object: 89a58bf77313bbddb0fe8d460374cdbe5d02cea6 + last_write_checksum: sha1:144a8bf407391948946f3f5362db78a33c45ee6c + pristine_git_object: be38fba81c08088303c4342c99ac3628c5957785 src/mistralai/client/models/responseerrorevent.py: id: b286d74e8724 - last_write_checksum: sha1:443a69babe18e95bcc4219423449e57b73bc6015 - pristine_git_object: 5326c4e8293d5bc7cd6572e4cf5511ae2bec97d7 + last_write_checksum: sha1:df3f53344624082471c795131552689510946345 + pristine_git_object: fa4d0d01c1cb7f15d6f469279c2000d2fad8f459 src/mistralai/client/models/responseformat.py: id: 6ab8bc8d22c0 - last_write_checksum: sha1:8f0993a7f7eb6ef5264706320242ab0f0d939227 - pristine_git_object: 95141394226e21ab908efd7e3795c8132fc8fa38 + last_write_checksum: sha1:0ab455566c6bb0b63e2cb1f61f300266021f5954 + pristine_git_object: b2971412549cc5b95c53b93425dbd5b6503a4df7 src/mistralai/client/models/responseformats.py: id: c4462a05fb08 last_write_checksum: sha1:3cb82d44a4f9df5e9a3f51867be6eab1d439d87a pristine_git_object: 21345778ad2d41a3746292e67fec628f9ec2a84d src/mistralai/client/models/responsestartedevent.py: id: 24f54ee8b0f2 - last_write_checksum: sha1:bbe13695d5cde5f98635c01453057061d0167f99 - pristine_git_object: ca3750421f3dda97cd85a6783084a934ed4f0fd4 + last_write_checksum: sha1:f66a0a67444916e838ca9a63144fb661832b54b9 + pristine_git_object: 84abfcd9ac159b9bd9234ff015d5525d88d663f6 src/mistralai/client/models/retrieve_model_v1_models_model_id_getop.py: id: 6fefa90ca351 last_write_checksum: sha1:52775e73fb5c51d245362ce63672cec776e5b6bd @@ -3776,40 +3792,40 @@ trackedFiles: pristine_git_object: dfec7cce1e22ab607b6a9e947fa940284426086d src/mistralai/client/models/searchchatcompletioneventidsrequest.py: id: cabc8ef82d67 - last_write_checksum: sha1:3290793dcf229bffc16b16d32d2c599c9a54bf4a - pristine_git_object: 64bb8f9f9e55f9caac2621120465edad169629f7 + last_write_checksum: sha1:39384c10e2da9806d984be7176a19eec16ed5482 + pristine_git_object: f84760811493458509eb34462254f6cfd09ac851 src/mistralai/client/models/searchchatcompletioneventidsresponse.py: id: a5f0bad3ba10 last_write_checksum: sha1:a521e3466db8258702fe5c286698d9404cc22b8c pristine_git_object: f4751159faff30b92a979d6f03ecbfc0f780261e src/mistralai/client/models/searchchatcompletioneventsrequest.py: id: a437333780bc - last_write_checksum: sha1:aa956fbf5e01e20644b0de20047539209ed4210f - pristine_git_object: bca27f166a5b9e55bec2811110b94570fd604588 + last_write_checksum: sha1:5147c9776bb4d6f18b1af6fd6d4bf584710357e7 + pristine_git_object: 95524c5b6f497e4d2c0c58622661469e88dd550b src/mistralai/client/models/searchchatcompletioneventsresponse.py: id: f96acbcd45f7 last_write_checksum: sha1:539caf622ef9e7579fdc82e7986dcc3a2aedae53 pristine_git_object: 8b9b10b51fe76de43895168df11e5bbcdfc29a62 src/mistralai/client/models/security.py: id: c2ca0e2a36b7 - last_write_checksum: sha1:28496d4ff921e8c2186072aad170c65836a4b8f8 - pristine_git_object: 36b129533187283e4fdf53a67019b379b1e251fa + last_write_checksum: sha1:d74333517caae2a1aa58517e8e935e46913bcc66 + pristine_git_object: f3b3423e850a1afa3b0fa5fa6c94f6018ff70627 src/mistralai/client/models/shareenum.py: id: a0e2a7a16bf8 last_write_checksum: sha1:15a84d57ceeb74cfb37275f714954e42d8e9b3ba pristine_git_object: 08ffeb7e46fbbc28b7c93ef2aa4a49aff7c0d35e src/mistralai/client/models/sharing.py: id: 324f5ac27249 - last_write_checksum: sha1:b67aa68e320269e0f6da9da23ed35cd1c41f2879 - pristine_git_object: efa16203021055e1f704b2fd3683eeee0a49ba07 + last_write_checksum: sha1:be77302c873a36d561fb4594fcb7addac923c9c6 + pristine_git_object: d6142e839545fb6be9bbac5d53c34e333112d467 src/mistralai/client/models/sharingdelete.py: id: f5ecce372e06 - last_write_checksum: sha1:f993f4cc819a14985a70a31af7896115ee80af8a - pristine_git_object: 3472a50637d4582fa8945ec70b57ed12de88b99d + last_write_checksum: sha1:247d793bd1ddc0ad35d010c17e5b32eba826e3a1 + pristine_git_object: 33ccd7e71b8f65d2a9329d8632b5446ca0431d0a src/mistralai/client/models/sharingrequest.py: id: 2439b732dfae - last_write_checksum: sha1:05e36cba36203bcc579a3b02538aed570cf22352 - pristine_git_object: 7c2d435c363bcd98aba97e120954ec1357524e34 + last_write_checksum: sha1:bb79913b3b243cd32b13ae012f0fc3fcc1b457d8 + pristine_git_object: 76424b8ee6c9cc0cff7d96649cc7695be6e3ceec src/mistralai/client/models/source.py: id: fcee60a4ea0d last_write_checksum: sha1:4d4277d75f7ce001780a069898b38afa7c8addc0 @@ -3828,96 +3844,96 @@ trackedFiles: pristine_git_object: d480a219e935aaea91adc320de0003b562c0bbb5 src/mistralai/client/models/textchunk.py: id: 9c96fb86a9ab - last_write_checksum: sha1:40fa1ea5dcbca9f4c534b58f7cb65bbaa5084521 - pristine_git_object: bae970f3cb1f7cfec74cd38b3f1f1b5171943e99 + last_write_checksum: sha1:89cbb66753d7a3585ce58c70219a349f770909cc + pristine_git_object: ac9f3137dddc15e1cd10aa6385b76510e6c23e33 src/mistralai/client/models/textcontent.py: id: 60805b9f7050 - last_write_checksum: sha1:072d40013e047296f98a8be455b30546c8ce0874 - pristine_git_object: 03de48d36befc3f89fb55a9d12c0a78e1ef8d8bd + last_write_checksum: sha1:23e396fda502398565dfd996b39107332584f52a + pristine_git_object: 7468b046de5d72085e804e774575519732d60742 src/mistralai/client/models/textresourcecontents.py: id: 58fe427f427f - last_write_checksum: sha1:7d9dd5965f048f07338c19d79147b09f41e1f96f - pristine_git_object: c3f26a65734775d166a1f5d27cab50933e1a4597 + last_write_checksum: sha1:56009344486b16740ba6569103ec8d20a15f9601 + pristine_git_object: c497bb4dc9177047100914169fb0e5358efa2292 src/mistralai/client/models/thinkchunk.py: id: 294bfce193a4 - last_write_checksum: sha1:4563b1759e8b64a9ed1de3843ea73ffb8f2e3285 - pristine_git_object: ae084a179c3227351d0ca8b10c926c6a61d21221 + last_write_checksum: sha1:9107800bae26e36436296efa317e7b00197f105a + pristine_git_object: 03573f8e1d1a470ba6dc545089beb9b40cebad2a src/mistralai/client/models/timestampgranularity.py: id: 68ddf8d702ea last_write_checksum: sha1:64e7b198a75f026590e26758112651d31984076f pristine_git_object: 8d3773752444db865c0e2629ad9eed66eb7f2bc6 src/mistralai/client/models/tool.py: id: 48b4f6f50fe9 - last_write_checksum: sha1:ed3725d5da10e6a201f73724a2bbf618bdbb2a33 - pristine_git_object: 1d1c5ce557321c33b036949fa4c625fb25e38f95 + last_write_checksum: sha1:7e33d7a0349e652b40926f6a51240b9a5c1a7dbd + pristine_git_object: 2b9965e571eeb494f8cf867818aab488198ecdb2 src/mistralai/client/models/toolcall.py: id: fb34a1a3f3c2 - last_write_checksum: sha1:a0e14e69a107d88239e1ee43d2e8fd498eb034a4 - pristine_git_object: 29f1149cd07dfc2744a1088d271af65e4ad70012 + last_write_checksum: sha1:7d0275444dd6be291c091e908a2b7f2fc536f20f + pristine_git_object: 181cec33c904535c804de06c7357bd493647cd70 src/mistralai/client/models/toolcallconfirmation.py: id: f2e953cfb4fe last_write_checksum: sha1:554a2e073917ffb479efe5887c0b59a2f4967c6e pristine_git_object: fd6eca50a7ec2f4cca2ae20958717881660e0ac5 src/mistralai/client/models/toolchoice.py: id: 14f7e4cc35b6 - last_write_checksum: sha1:531f7ac1d7cd7d99b79756b9c673463dd33f2011 - pristine_git_object: ce84573ae34624b1e07f7001d3a00bf36d620e5f + last_write_checksum: sha1:a787827a4f4ecf5b6a7068ba94fd1ff074898b51 + pristine_git_object: cb787df1b62190319c6e9679521228af28ee7204 src/mistralai/client/models/toolchoiceenum.py: id: c7798801f860 last_write_checksum: sha1:5388b2a6fad842f8e4ae79e6257b4d14c122a6ff pristine_git_object: d66c3d07058eb87bcc3eec10de99a616b5f6638a src/mistralai/client/models/toolconfiguration.py: id: faec24b75066 - last_write_checksum: sha1:caa6c41ccb0825034bb9cab4e3fcd1a2547b66a9 - pristine_git_object: eb3d14e5517a60c1fbac1b1feb7d5daadd877a90 + last_write_checksum: sha1:912c1c10e88053ae4ee44af763c9ab7c95339f5d + pristine_git_object: b903c8b6c13777b671faf5aa97994117734b3a8f src/mistralai/client/models/toolexecutiondeltaevent.py: id: df8f17cf3e07 - last_write_checksum: sha1:77da4c0bca920d4ea77a64faa039fb3c07df46ed - pristine_git_object: c2e4095072f7efc6854f0f666fc5d7d0efcfc30c + last_write_checksum: sha1:2537a6e2dffde3760a064fdf92efa6cdc117ba2b + pristine_git_object: 5a977ca6fc5bfdeadd929f18037fb5c9a9582b40 src/mistralai/client/models/toolexecutiondoneevent.py: id: 514fdee7d99f - last_write_checksum: sha1:b58fd690c6f3a0e2eeca2433f454f4b21a77c3e3 - pristine_git_object: ec3b691835bb0c76e0c5b7d825ca7a4867831302 + last_write_checksum: sha1:d62f57105e4816e03030bc9a2a5645482ea80c55 + pristine_git_object: 1c9b0ec92d87a8559ef050a21ba309e05f6b0314 src/mistralai/client/models/toolexecutionentry.py: id: 76db69eebe41 - last_write_checksum: sha1:d8167692473b2d2b01eb59a9bf83dcbb5ee3d93e - pristine_git_object: 226adce185a755d18a046803884b9194d3c42188 + last_write_checksum: sha1:9a697fdad4178b95d7d1bd1eaee77ef948fb2d4f + pristine_git_object: 0d6f2a1305f262519ba719969c6e62ceb95e52b3 src/mistralai/client/models/toolexecutionstartedevent.py: id: 40fadb8e49a1 - last_write_checksum: sha1:e419d7f40dcb9450710952a0be173830d09cabf4 - pristine_git_object: a4af27b854e7a0d2ce0a04f2e986c865bfaaf179 + last_write_checksum: sha1:9f6e43d5b2c807ca3b080ea7bd4878ba3ec2a788 + pristine_git_object: 21e5bfa8fea7fa27b7031b740f72a873760700cc src/mistralai/client/models/toolfilechunk.py: id: 26c8aadf416a - last_write_checksum: sha1:a79863e37d5cf2d6b52fabea259ce401ed0c4697 - pristine_git_object: 1d9e6118a393cbdf9b4c0d2b47b367b9381beee9 + last_write_checksum: sha1:89bb203aa600bf6a516fbe10e1787a132de9ca5a + pristine_git_object: 0708b3ff4c4f97a0e4c4359baeedc89ef0b10278 src/mistralai/client/models/toolmessage.py: id: 15f1af161031 - last_write_checksum: sha1:9557c9f6b7be4b6ac94d3316eb605e42aa8dc03c - pristine_git_object: 0dc9e92f5dd27ff93d6de62a6879699ace4300a8 + last_write_checksum: sha1:cfa16352cf5bbcd6eedbfbf7f3002149fd989418 + pristine_git_object: 05a0ee636a4393e3ce65cc1b6e272ddf8ec79254 src/mistralai/client/models/toolreferencechunk.py: id: 822e9f3e70de - last_write_checksum: sha1:2e489c4b2360741a3e4a20710361511a0d9158ea - pristine_git_object: 391724edbb7eea3d3acd1a4b3302045970cb5e31 + last_write_checksum: sha1:f5c9265e27fa2d4526e5ce50dff7f7bd641eb642 + pristine_git_object: 95454fe891dd3955121565431897c1b8f0c25083 src/mistralai/client/models/tooltypes.py: id: 86c3b54272fd last_write_checksum: sha1:e90c15c1e645a5f207af0c7ac728cb0a521c6706 pristine_git_object: e601c1967c42ef8d0c2eea98bc5c0ca722cde066 src/mistralai/client/models/trainingfile.py: id: 2edf9bce227d - last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0 - pristine_git_object: bdaba37a65b2641c83bb8f2dee7c0680aabd0f2d + last_write_checksum: sha1:8fd6a2560554b3c2166daff2ff1a48bb49053489 + pristine_git_object: 2faeda8bfb38c810c5d80eb17cc9928c49c7caf5 src/mistralai/client/models/transcriptionresponse.py: id: 60896dbc6345 - last_write_checksum: sha1:c858aa031b871a7d0890b96c98aae07ce9d1d9d3 - pristine_git_object: c512a3453c16c329307e094a5758c223db1d7be9 + last_write_checksum: sha1:e8a318798dfe4ebd64c9d64f487f7e3e8dd05532 + pristine_git_object: 70315463ff8e01c680aa80d68bdc32a7429ddb16 src/mistralai/client/models/transcriptionsegmentchunk.py: id: d1e6f3bdc74b - last_write_checksum: sha1:c7e8305a3a49490c748f8c5ea16e7397be285be3 - pristine_git_object: 8a5a7162fbc5a70098f9b1eed79baf6d77968194 + last_write_checksum: sha1:ee56c437444cbfa7983ba950e3e166f392d208cb + pristine_git_object: b87bfc2f9de0a07d62e8cc1fe265a9c29f56f194 src/mistralai/client/models/transcriptionstreamdone.py: id: 066a9158ed09 - last_write_checksum: sha1:6c3db3298e520c56131f2f42841530013fa2aed1 - pristine_git_object: 89357277ef90b00e5b8e86d924dc35d288f07948 + last_write_checksum: sha1:cb8ea2e34c712ef1694bd1b6a83e7eed9318b13b + pristine_git_object: e3c5016901a2400c222e5b821b5afb312af1a1e6 src/mistralai/client/models/transcriptionstreamevents.py: id: b50b3d74f16f last_write_checksum: sha1:68f82eea8a0bcf1b8b65cedf9e276f34121d398b @@ -3932,16 +3948,16 @@ trackedFiles: pristine_git_object: b6c6190684eccdc3fe6ce4bc7b86f5ee6490a197 src/mistralai/client/models/transcriptionstreamsegmentdelta.py: id: c0a882ce57e5 - last_write_checksum: sha1:f849d8d9ddd3344a91ba23bdc40f55ed9388420d - pristine_git_object: 38e7b0a3142f4f1b4a4cc2c63729b3f51030300f + last_write_checksum: sha1:3507a0355027136e92ada0c9766277381d5dee96 + pristine_git_object: 32ef8f9b2aa34253ea10c830ae856a931306f658 src/mistralai/client/models/transcriptionstreamtextdelta.py: id: 6086dc081147 last_write_checksum: sha1:968b4bc32731be6c63be3fd90eb26f4357f891a3 pristine_git_object: 42f0ffb7f16bee4f68f9db9807aa4ec3d9ae5176 src/mistralai/client/models/unarchivemodelresponse.py: id: 22e2ccbb0c80 - last_write_checksum: sha1:8ebdd49f2bef3c5934395808bf71701b46e512be - pristine_git_object: 5cab4c2ef093236cacdc2a9e24b27c1a6c643ee9 + last_write_checksum: sha1:a69d8dc8636f3326eb61892b85a9b60044b457fe + pristine_git_object: 5c75d30edaade853f085533da0f9f5de221b6e44 src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py: id: fa5d55a9d6cf last_write_checksum: sha1:5cf094a6617b1900745deece2e34edfb1b040905 @@ -3960,12 +3976,12 @@ trackedFiles: pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:db80a8f0b630acf98be5c27caa7bb448a4e58237 - pristine_git_object: 7bb9686b9b542c47ac25fb6780017b5739829b1e + last_write_checksum: sha1:8f522b8d81152da1248a00073265d927c43ecae5 + pristine_git_object: 584c034c988dbc50e7889b207118eb5f4545b09e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 - last_write_checksum: sha1:cdf3aa496722d84b0a76d52ce76133cfaafb0073 - pristine_git_object: 3540d02bd8e8bf45ba3fe33d0d080510c099ac14 + last_write_checksum: sha1:cd461734ab9df9ca0d254c69a552b74b8f63f20e + pristine_git_object: 2fe42ba8b72ab5d851fed49ddbe5d5cfeeb022bd src/mistralai/client/models/updatedatasetrecordpayloadrequest.py: id: bd45f357a538 last_write_checksum: sha1:774ba70d9f417e84b546b9f4c5c85eb2876dd56d @@ -3976,52 +3992,52 @@ trackedFiles: pristine_git_object: ccba4a5c71aa8717c4fcb1af61f4f10c17b84ebd src/mistralai/client/models/updatedatasetrequest.py: id: bbb067caa23f - last_write_checksum: sha1:4ae8e1ea4a6a9ec5ed559bef8fe21d11af2b0ed3 - pristine_git_object: ddbaad1237d2056476c4fe7f8a6caba06a65f744 + last_write_checksum: sha1:1045b7f77b20e9ede79240467927bac20b9d54f5 + pristine_git_object: 0297408982cd4204c15447204e539cef16b82a01 src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 - last_write_checksum: sha1:57b5a2c77ddcf2e09a8eead6b4f5e5c694e21844 - pristine_git_object: 12d9c89b9ab67f6d7e69c26c31da76e7aaf1e817 + last_write_checksum: sha1:c644725ae379f22550d00b42baefb511d1cc3667 + pristine_git_object: 61e696555c0654208b0d9dcd63fc475ad85297d4 src/mistralai/client/models/updatejudgerequest.py: id: f6ad6fb901a0 last_write_checksum: sha1:0cc5d951aa36d1ba6cf82020d9ade4ac85bc3a94 pristine_git_object: 04c86ab65599b96478f9b6a0cfa6ce3af1a489bb src/mistralai/client/models/updatelibraryrequest.py: id: 51bc63885337 - last_write_checksum: sha1:3fb7d575fff336485bb48158b082e1e27e4848a2 - pristine_git_object: d5183ac048c60522563532e48899cd0398d2effe + last_write_checksum: sha1:622d6a7af58d2e86d7d2dd4e312883d11ce5a8a8 + pristine_git_object: 91cbf2a1c76361c9c5ee1554c80f1507ff5ee50b src/mistralai/client/models/updatemodelrequest.py: id: fe649967751e - last_write_checksum: sha1:b5ce56ef430768ee806b45d9c2e4c405764a1ef5 - pristine_git_object: 0179ba140d7d598a4a363ddfab67197e56857964 + last_write_checksum: sha1:dbba8a6ccbfae36ac56808742f4c05ab99dd2c6c + pristine_git_object: f685cfcce1aa3669159fec902ba78034ef3141b8 src/mistralai/client/models/usageinfo.py: id: 54adb9a3af16 - last_write_checksum: sha1:108b7cd220312ff96d298981e7ada5bc05921cc9 - pristine_git_object: f23699d0223579e3477a1a010063f3a7a985b07c + last_write_checksum: sha1:04705526057c43495284fe9c50cf7df2af7b49fd + pristine_git_object: 31cbf07e3e38df4452da320e44f3fa9aef17c196 src/mistralai/client/models/usermessage.py: id: cb583483acf4 - last_write_checksum: sha1:b97161e1abd159d5a0c5757cac2a97bd6a5f1ef0 - pristine_git_object: 7b4b55630022708db7a53476dc7111416594df46 + last_write_checksum: sha1:0060ee5f5fbbd78073cd56546127a021354a8072 + pristine_git_object: 63e7679246a11fe8e7a3db06e382779c05c64366 src/mistralai/client/models/validationerror.py: id: 15df3c7368ab - last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 - pristine_git_object: 5fe796db923badd9fb85dc4080a30496ed2b419b + last_write_checksum: sha1:feacaef605de97f7eec36e69c5dda2a10e5b75ac + pristine_git_object: d856e24c3ac25fb6d2802ca7038ab6947ac6a2da src/mistralai/client/models/wandbintegration.py: id: 4823c1e80942 - last_write_checksum: sha1:b836b2c829f16a00221354c44f55b672eefc3aa0 - pristine_git_object: 0e444becfc1e90daa3b5f2393975a530c95a7a36 + last_write_checksum: sha1:cc0a7ce49756928f4d261375526a3498b9e4f05d + pristine_git_object: f0df2c77845b2741802730fcd4f3c5d31b7ddd8e src/mistralai/client/models/wandbintegrationresult.py: id: 8787b4ad5458 - last_write_checksum: sha1:80cb8d2eb89889ff54ab967b449c580e28c3f627 - pristine_git_object: e64bb27c9142d3fe312e8d7476893382dab20722 + last_write_checksum: sha1:6ba506e01333a3084f63fbfccb459235b6560554 + pristine_git_object: 575cbd42297f02a54542c7eda3a4cabaa28dda23 src/mistralai/client/models/websearchpremiumtool.py: id: bfe88af887e3 - last_write_checksum: sha1:bdb724b386fe512c2b6db6bd2931ea71c796dbc9 - pristine_git_object: 5c929e94c20159cf394a9f95ef990a926643f0ea + last_write_checksum: sha1:ceb073d3b3916b2ff8f7b7e5eb01692893024d68 + pristine_git_object: 00d4a4b427331660d29513ec43e68fc7cf8afcfb src/mistralai/client/models/websearchtool.py: id: 26b0903423e5 - last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f - pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae + last_write_checksum: sha1:a07d7ace2d68c944c686e69053bef8d84231814b + pristine_git_object: 6871080f6279ef42a0525c1e26368baafc98fbb7 src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 @@ -4044,8 +4060,8 @@ trackedFiles: pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:9ee656529530717c0215e75c03509c9962a1e54e - pristine_git_object: b775fe1ccd75f703756b7746383c0e53e5d7e725 + last_write_checksum: sha1:365709e35dc4e450a2c4931e75dcbd04568ab361 + pristine_git_object: 80bf25a749eb3b36035aaafa15f059bcf403ec80 src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e @@ -4084,8 +4100,8 @@ trackedFiles: pristine_git_object: d897495f053459106144501c67f2215251d52a27 src/mistralai/client/utils/eventstreaming.py: id: 3263d7502030 - last_write_checksum: sha1:10fa278190f52e6acacabf3b1bab6a82d3459a96 - pristine_git_object: 93287ab457d4944394425eb197caec54280dfbd3 + last_write_checksum: sha1:24af3168dafe6b8d860cffb121fac11cd0e9d930 + pristine_git_object: 19a121529f180968f655baffbe446e5c1d6c2abb src/mistralai/client/utils/forms.py: id: 58842e905fce last_write_checksum: sha1:d68ca0257e0e8bdc5cdc450f3e70a7ba789859f5 @@ -6047,9 +6063,27 @@ examples: application/json: {"message": ""} "422": application/json: {} + judge_conversation_v1_observability_judges__judge_id__live_judging_post: + speakeasy-default-judge-conversation-v1-observability-judges-judge-id-live-judging-post: + parameters: + path: + judge_id: "7fb9f06a-22fb-45db-ad58-6a5715280755" + requestBody: + application/json: {"messages": []} + responses: + "200": + application/json: {"analysis": "", "answer": 4277.83} + "400": + application/json: {"detail": {"message": "", "error_code": "TEMPLATE_SYNTAX_ERROR"}} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.append_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.append()`: \n * `request.inputs.union(Array)[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get_history()`: `response.entries[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get_messages()`: `response.messages[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(user).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(tool).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request.messages[].union(tool).content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.choices[].message.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ReferenceChunk).reference_ids[]` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.content.union(Array)[].union(reference).reference_ids[]` **Changed** (Breaking ⚠️)\n* `mistral.models.list()`: `response.data[].union(base).capabilities` **Changed**\n* `mistral.models.retrieve()`: `response.union(base).capabilities` **Changed**\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.beta.observability.judges.judge_conversation()`: **Added** + * `mistral.chat.complete()`: `request.guardrails` **Added** + * `mistral.chat.stream()`: `request.guardrails` **Added** + * `mistral.agents.complete()`: `request.guardrails` **Added** + * `mistral.agents.stream()`: `request.guardrails` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ddfd6c0b..c04601ee 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.3 + version: 2.0.4 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 3b5a904d..64b6385e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.754.0 +speakeasyVersion: 1.729.0 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure @@ -16,10 +16,11 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:430c8c8196f530e54f438a623547c32d06017080aac046b240edbaeff28a2ebd - sourceBlobDigest: sha256:3fb3b90d358c986a52bbf12154853ba827cd614548d494c95569bedda3e57fe4 + sourceRevisionDigest: sha256:912f3562f7fdf81bc106ff05fb66439fb268a54baad2fb92ca056236a6fe6754 + sourceBlobDigest: sha256:27e5876fdfe7a37c2a566a8ce1d87b9d0de66f8377060801dc2d2068c636225f tags: - latest + - speakeasy-sdk-regen-1773674493 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -38,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:430c8c8196f530e54f438a623547c32d06017080aac046b240edbaeff28a2ebd - sourceBlobDigest: sha256:3fb3b90d358c986a52bbf12154853ba827cd614548d494c95569bedda3e57fe4 + sourceRevisionDigest: sha256:912f3562f7fdf81bc106ff05fb66439fb268a54baad2fb92ca056236a6fe6754 + sourceBlobDigest: sha256:27e5876fdfe7a37c2a566a8ce1d87b9d0de66f8377060801dc2d2068c636225f codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:966edb4cf55689daff001456afa27a7370113efcc5c0ba0896782f65b1e6fba5 + codeSamplesRevisionDigest: sha256:bfa28ff34d53c5ef36ff7e7c90b4f170cc1f1a2e47b7afe453f42084e1db74ad workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.729.0 diff --git a/README-PYPI.md b/README-PYPI.md index 96a721dd..f2eda32e 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -600,6 +600,7 @@ print(res.choices[0].message.content) * [fetch](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#fetch) - Get judge by id * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#delete) - Delete a judge * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#update) - Update a judge +* [judge_conversation](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#judge_conversation) - Run a saved judge on a conversation ### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) @@ -683,7 +684,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], completion_args={ + ], stream=True, completion_args={ "response_format": { "type": "text", }, @@ -835,8 +836,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 121 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 40 of 121 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 122 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 122 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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.
diff --git a/README.md b/README.md index e33cc821..a44ba5e2 100644 --- a/README.md +++ b/README.md @@ -600,6 +600,7 @@ print(res.choices[0].message.content) * [fetch](docs/sdks/judges/README.md#fetch) - Get judge by id * [delete](docs/sdks/judges/README.md#delete) - Delete a judge * [update](docs/sdks/judges/README.md#update) - Update a judge +* [judge_conversation](docs/sdks/judges/README.md#judge_conversation) - Run a saved judge on a conversation ### [Chat](docs/sdks/chat/README.md) @@ -683,7 +684,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], completion_args={ + ], stream=True, completion_args={ "response_format": { "type": "text", }, @@ -835,8 +836,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 121 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 40 of 121 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 122 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 122 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 0cb8573f..17d245e6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -428,4 +428,14 @@ Based on: ### Generated - [python v2.0.3] . ### Releases -- [PyPI v2.0.3] https://pypi.org/project/mistralai/2.0.3 - . \ No newline at end of file +- [PyPI v2.0.3] https://pypi.org/project/mistralai/2.0.3 - . + +## 2026-03-16 15:21:10 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.729.0 (2.841.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.4] . +### Releases +- [PyPI v2.0.4] https://pypi.org/project/mistralai/2.0.4 - . \ No newline at end of file diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 33435732..63a26c07 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -20,4 +20,5 @@ | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index 407be8e0..f9589a42 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -20,4 +20,5 @@ | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/apiendpoint.md b/docs/models/apiendpoint.md index e049d40a..8d83a26f 100644 --- a/docs/models/apiendpoint.md +++ b/docs/models/apiendpoint.md @@ -1,26 +1,17 @@ # APIEndpoint -## Example Usage - -```python -from mistralai.client.models import APIEndpoint - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: APIEndpoint = "/v1/chat/completions" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"/v1/chat/completions"` -- `"/v1/embeddings"` -- `"/v1/fim/completions"` -- `"/v1/moderations"` -- `"/v1/chat/moderations"` -- `"/v1/ocr"` -- `"/v1/classifications"` -- `"/v1/chat/classifications"` -- `"/v1/conversations"` -- `"/v1/audio/transcriptions"` +| Name | Value | +| ------------------------------ | ------------------------------ | +| `ROOT_V1_CHAT_COMPLETIONS` | /v1/chat/completions | +| `ROOT_V1_EMBEDDINGS` | /v1/embeddings | +| `ROOT_V1_FIM_COMPLETIONS` | /v1/fim/completions | +| `ROOT_V1_MODERATIONS` | /v1/moderations | +| `ROOT_V1_CHAT_MODERATIONS` | /v1/chat/moderations | +| `ROOT_V1_OCR` | /v1/ocr | +| `ROOT_V1_CLASSIFICATIONS` | /v1/classifications | +| `ROOT_V1_CHAT_CLASSIFICATIONS` | /v1/chat/classifications | +| `ROOT_V1_CONVERSATIONS` | /v1/conversations | +| `ROOT_V1_AUDIO_TRANSCRIPTIONS` | /v1/audio/transcriptions | \ No newline at end of file diff --git a/docs/models/audience.md b/docs/models/audience.md index 186d913e..ac325076 100644 --- a/docs/models/audience.md +++ b/docs/models/audience.md @@ -1,18 +1,9 @@ # Audience -## Example Usage - -```python -from mistralai.client.models import Audience - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: Audience = "user" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"user"` -- `"assistant"` +| Name | Value | +| ----------- | ----------- | +| `USER` | user | +| `ASSISTANT` | assistant | \ No newline at end of file diff --git a/docs/models/audioencoding.md b/docs/models/audioencoding.md index 34b80490..feec8c71 100644 --- a/docs/models/audioencoding.md +++ b/docs/models/audioencoding.md @@ -1,22 +1,13 @@ # AudioEncoding -## Example Usage - -```python -from mistralai.client.models import AudioEncoding - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: AudioEncoding = "pcm_s16le" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"pcm_s16le"` -- `"pcm_s32le"` -- `"pcm_f16le"` -- `"pcm_f32le"` -- `"pcm_mulaw"` -- `"pcm_alaw"` +| Name | Value | +| ----------- | ----------- | +| `PCM_S16LE` | pcm_s16le | +| `PCM_S32LE` | pcm_s32le | +| `PCM_F16LE` | pcm_f16le | +| `PCM_F32LE` | pcm_f32le | +| `PCM_MULAW` | pcm_mulaw | +| `PCM_ALAW` | pcm_alaw | \ No newline at end of file diff --git a/docs/models/basetaskstatus.md b/docs/models/basetaskstatus.md index bb781fd1..8fad1e10 100644 --- a/docs/models/basetaskstatus.md +++ b/docs/models/basetaskstatus.md @@ -1,24 +1,15 @@ # BaseTaskStatus -## Example Usage - -```python -from mistralai.client.models import BaseTaskStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: BaseTaskStatus = "RUNNING" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"RUNNING"` -- `"COMPLETED"` -- `"FAILED"` -- `"CANCELED"` -- `"TERMINATED"` -- `"CONTINUED_AS_NEW"` -- `"TIMED_OUT"` -- `"UNKNOWN"` +| Name | Value | +| ------------------ | ------------------ | +| `RUNNING` | RUNNING | +| `COMPLETED` | COMPLETED | +| `FAILED` | FAILED | +| `CANCELED` | CANCELED | +| `TERMINATED` | TERMINATED | +| `CONTINUED_AS_NEW` | CONTINUED_AS_NEW | +| `TIMED_OUT` | TIMED_OUT | +| `UNKNOWN` | UNKNOWN | \ No newline at end of file diff --git a/docs/models/batchjobstatus.md b/docs/models/batchjobstatus.md index 7473cb1f..64617b31 100644 --- a/docs/models/batchjobstatus.md +++ b/docs/models/batchjobstatus.md @@ -1,23 +1,14 @@ # BatchJobStatus -## Example Usage - -```python -from mistralai.client.models import BatchJobStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: BatchJobStatus = "QUEUED" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"QUEUED"` -- `"RUNNING"` -- `"SUCCESS"` -- `"FAILED"` -- `"TIMEOUT_EXCEEDED"` -- `"CANCELLATION_REQUESTED"` -- `"CANCELLED"` +| Name | Value | +| ------------------------ | ------------------------ | +| `QUEUED` | QUEUED | +| `RUNNING` | RUNNING | +| `SUCCESS` | SUCCESS | +| `FAILED` | FAILED | +| `TIMEOUT_EXCEEDED` | TIMEOUT_EXCEEDED | +| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | +| `CANCELLED` | CANCELLED | \ No newline at end of file diff --git a/docs/models/builtinconnectors.md b/docs/models/builtinconnectors.md index 11dfd48a..f96f5044 100644 --- a/docs/models/builtinconnectors.md +++ b/docs/models/builtinconnectors.md @@ -1,21 +1,12 @@ # BuiltInConnectors -## Example Usage - -```python -from mistralai.client.models import BuiltInConnectors - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: BuiltInConnectors = "web_search" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"web_search"` -- `"web_search_premium"` -- `"code_interpreter"` -- `"image_generation"` -- `"document_library"` +| Name | Value | +| -------------------- | -------------------- | +| `WEB_SEARCH` | web_search | +| `WEB_SEARCH_PREMIUM` | web_search_premium | +| `CODE_INTERPRETER` | code_interpreter | +| `IMAGE_GENERATION` | image_generation | +| `DOCUMENT_LIBRARY` | document_library | \ No newline at end of file diff --git a/docs/models/chatcompletionchoicefinishreason.md b/docs/models/chatcompletionchoicefinishreason.md index c2892726..b2f15ecb 100644 --- a/docs/models/chatcompletionchoicefinishreason.md +++ b/docs/models/chatcompletionchoicefinishreason.md @@ -1,21 +1,12 @@ # ChatCompletionChoiceFinishReason -## Example Usage - -```python -from mistralai.client.models import ChatCompletionChoiceFinishReason - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ChatCompletionChoiceFinishReason = "stop" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"stop"` -- `"length"` -- `"model_length"` -- `"error"` -- `"tool_calls"` +| Name | Value | +| -------------- | -------------- | +| `STOP` | stop | +| `LENGTH` | length | +| `MODEL_LENGTH` | model_length | +| `ERROR` | error | +| `TOOL_CALLS` | tool_calls | \ No newline at end of file diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 2752d73e..b6b62d2f 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -23,4 +23,5 @@ | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index e7d542a6..e74c21d0 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -23,4 +23,5 @@ | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/classifierfinetuningjobdetailsstatus.md b/docs/models/classifierfinetuningjobdetailsstatus.md index 3c6b1f52..058c6583 100644 --- a/docs/models/classifierfinetuningjobdetailsstatus.md +++ b/docs/models/classifierfinetuningjobdetailsstatus.md @@ -1,26 +1,17 @@ # ClassifierFineTuningJobDetailsStatus -## Example Usage - -```python -from mistralai.client.models import ClassifierFineTuningJobDetailsStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ClassifierFineTuningJobDetailsStatus = "QUEUED" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"QUEUED"` -- `"STARTED"` -- `"VALIDATING"` -- `"VALIDATED"` -- `"RUNNING"` -- `"FAILED_VALIDATION"` -- `"FAILED"` -- `"SUCCESS"` -- `"CANCELLED"` -- `"CANCELLATION_REQUESTED"` +| Name | Value | +| ------------------------ | ------------------------ | +| `QUEUED` | QUEUED | +| `STARTED` | STARTED | +| `VALIDATING` | VALIDATING | +| `VALIDATED` | VALIDATED | +| `RUNNING` | RUNNING | +| `FAILED_VALIDATION` | FAILED_VALIDATION | +| `FAILED` | FAILED | +| `SUCCESS` | SUCCESS | +| `CANCELLED` | CANCELLED | +| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file diff --git a/docs/models/classifierfinetuningjobstatus.md b/docs/models/classifierfinetuningjobstatus.md index c25d73a6..ca829885 100644 --- a/docs/models/classifierfinetuningjobstatus.md +++ b/docs/models/classifierfinetuningjobstatus.md @@ -2,27 +2,18 @@ The current status of the fine-tuning job. -## Example Usage - -```python -from mistralai.client.models import ClassifierFineTuningJobStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ClassifierFineTuningJobStatus = "QUEUED" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"QUEUED"` -- `"STARTED"` -- `"VALIDATING"` -- `"VALIDATED"` -- `"RUNNING"` -- `"FAILED_VALIDATION"` -- `"FAILED"` -- `"SUCCESS"` -- `"CANCELLED"` -- `"CANCELLATION_REQUESTED"` +| Name | Value | +| ------------------------ | ------------------------ | +| `QUEUED` | QUEUED | +| `STARTED` | STARTED | +| `VALIDATING` | VALIDATING | +| `VALIDATED` | VALIDATED | +| `RUNNING` | RUNNING | +| `FAILED_VALIDATION` | FAILED_VALIDATION | +| `FAILED` | FAILED | +| `SUCCESS` | SUCCESS | +| `CANCELLED` | CANCELLED | +| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file diff --git a/docs/models/completionfinetuningjobdetailsstatus.md b/docs/models/completionfinetuningjobdetailsstatus.md index 6c7a0979..94d795a9 100644 --- a/docs/models/completionfinetuningjobdetailsstatus.md +++ b/docs/models/completionfinetuningjobdetailsstatus.md @@ -1,26 +1,17 @@ # CompletionFineTuningJobDetailsStatus -## Example Usage - -```python -from mistralai.client.models import CompletionFineTuningJobDetailsStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: CompletionFineTuningJobDetailsStatus = "QUEUED" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"QUEUED"` -- `"STARTED"` -- `"VALIDATING"` -- `"VALIDATED"` -- `"RUNNING"` -- `"FAILED_VALIDATION"` -- `"FAILED"` -- `"SUCCESS"` -- `"CANCELLED"` -- `"CANCELLATION_REQUESTED"` +| Name | Value | +| ------------------------ | ------------------------ | +| `QUEUED` | QUEUED | +| `STARTED` | STARTED | +| `VALIDATING` | VALIDATING | +| `VALIDATED` | VALIDATED | +| `RUNNING` | RUNNING | +| `FAILED_VALIDATION` | FAILED_VALIDATION | +| `FAILED` | FAILED | +| `SUCCESS` | SUCCESS | +| `CANCELLED` | CANCELLED | +| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file diff --git a/docs/models/completionfinetuningjobstatus.md b/docs/models/completionfinetuningjobstatus.md index 1fd78b9d..db151a1b 100644 --- a/docs/models/completionfinetuningjobstatus.md +++ b/docs/models/completionfinetuningjobstatus.md @@ -2,27 +2,18 @@ The current status of the fine-tuning job. -## Example Usage - -```python -from mistralai.client.models import CompletionFineTuningJobStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: CompletionFineTuningJobStatus = "QUEUED" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"QUEUED"` -- `"STARTED"` -- `"VALIDATING"` -- `"VALIDATED"` -- `"RUNNING"` -- `"FAILED_VALIDATION"` -- `"FAILED"` -- `"SUCCESS"` -- `"CANCELLED"` -- `"CANCELLATION_REQUESTED"` +| Name | Value | +| ------------------------ | ------------------------ | +| `QUEUED` | QUEUED | +| `STARTED` | STARTED | +| `VALIDATING` | VALIDATING | +| `VALIDATED` | VALIDATED | +| `RUNNING` | RUNNING | +| `FAILED_VALIDATION` | FAILED_VALIDATION | +| `FAILED` | FAILED | +| `SUCCESS` | SUCCESS | +| `CANCELLED` | CANCELLED | +| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file diff --git a/docs/models/completionresponsestreamchoicefinishreason.md b/docs/models/completionresponsestreamchoicefinishreason.md index 3e8c30ec..0fece473 100644 --- a/docs/models/completionresponsestreamchoicefinishreason.md +++ b/docs/models/completionresponsestreamchoicefinishreason.md @@ -1,20 +1,11 @@ # CompletionResponseStreamChoiceFinishReason -## Example Usage - -```python -from mistralai.client.models import CompletionResponseStreamChoiceFinishReason - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: CompletionResponseStreamChoiceFinishReason = "stop" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"stop"` -- `"length"` -- `"error"` -- `"tool_calls"` +| Name | Value | +| ------------ | ------------ | +| `STOP` | stop | +| `LENGTH` | length | +| `ERROR` | error | +| `TOOL_CALLS` | tool_calls | \ No newline at end of file diff --git a/docs/models/confirmation.md b/docs/models/confirmation.md index c8709384..fd6e6aaa 100644 --- a/docs/models/confirmation.md +++ b/docs/models/confirmation.md @@ -1,14 +1,9 @@ # Confirmation -## Example Usage - -```python -from mistralai.client.models import Confirmation -value: Confirmation = "allow" -``` - ## Values -- `"allow"` -- `"deny"` +| Name | Value | +| ------- | ------- | +| `ALLOW` | allow | +| `DENY` | deny | \ No newline at end of file diff --git a/docs/models/conversationappendrequest.md b/docs/models/conversationappendrequest.md index 471fcc31..78a96508 100644 --- a/docs/models/conversationappendrequest.md +++ b/docs/models/conversationappendrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendRequestHandoffExecution]](../models/conversationappendrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationappendrequesthandoffexecution.md b/docs/models/conversationappendrequesthandoffexecution.md index 70cef2ed..7418b36a 100644 --- a/docs/models/conversationappendrequesthandoffexecution.md +++ b/docs/models/conversationappendrequesthandoffexecution.md @@ -1,14 +1,9 @@ # ConversationAppendRequestHandoffExecution -## Example Usage - -```python -from mistralai.client.models import ConversationAppendRequestHandoffExecution -value: ConversationAppendRequestHandoffExecution = "client" -``` - ## Values -- `"client"` -- `"server"` +| Name | Value | +| -------- | -------- | +| `CLIENT` | client | +| `SERVER` | server | \ No newline at end of file diff --git a/docs/models/conversationappendstreamrequest.md b/docs/models/conversationappendstreamrequest.md index a54d5d3e..daea9c52 100644 --- a/docs/models/conversationappendstreamrequest.md +++ b/docs/models/conversationappendstreamrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendStreamRequestHandoffExecution]](../models/conversationappendstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationappendstreamrequesthandoffexecution.md b/docs/models/conversationappendstreamrequesthandoffexecution.md index dea51978..1bbced3e 100644 --- a/docs/models/conversationappendstreamrequesthandoffexecution.md +++ b/docs/models/conversationappendstreamrequesthandoffexecution.md @@ -1,14 +1,9 @@ # ConversationAppendStreamRequestHandoffExecution -## Example Usage - -```python -from mistralai.client.models import ConversationAppendStreamRequestHandoffExecution -value: ConversationAppendStreamRequestHandoffExecution = "client" -``` - ## Values -- `"client"` -- `"server"` +| Name | Value | +| -------- | -------- | +| `CLIENT` | client | +| `SERVER` | server | \ No newline at end of file diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index 6a5dc206..903d13c1 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationrequesthandoffexecution.md b/docs/models/conversationrequesthandoffexecution.md index de9dc287..e7314f7e 100644 --- a/docs/models/conversationrequesthandoffexecution.md +++ b/docs/models/conversationrequesthandoffexecution.md @@ -1,14 +1,9 @@ # ConversationRequestHandoffExecution -## Example Usage - -```python -from mistralai.client.models import ConversationRequestHandoffExecution -value: ConversationRequestHandoffExecution = "client" -``` - ## Values -- `"client"` -- `"server"` +| Name | Value | +| -------- | -------- | +| `CLIENT` | client | +| `SERVER` | server | \ No newline at end of file diff --git a/docs/models/conversationrestartrequest.md b/docs/models/conversationrestartrequest.md index be0f2289..08f47bba 100644 --- a/docs/models/conversationrestartrequest.md +++ b/docs/models/conversationrestartrequest.md @@ -8,7 +8,7 @@ Request to restart a new conversation from a given entry in the conversation. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationrestartrequesthandoffexecution.md b/docs/models/conversationrestartrequesthandoffexecution.md index 4e202d69..5790624b 100644 --- a/docs/models/conversationrestartrequesthandoffexecution.md +++ b/docs/models/conversationrestartrequesthandoffexecution.md @@ -1,14 +1,9 @@ # ConversationRestartRequestHandoffExecution -## Example Usage - -```python -from mistralai.client.models import ConversationRestartRequestHandoffExecution -value: ConversationRestartRequestHandoffExecution = "client" -``` - ## Values -- `"client"` -- `"server"` +| Name | Value | +| -------- | -------- | +| `CLIENT` | client | +| `SERVER` | server | \ No newline at end of file diff --git a/docs/models/conversationrestartstreamrequest.md b/docs/models/conversationrestartstreamrequest.md index f99a6e34..3ad739aa 100644 --- a/docs/models/conversationrestartstreamrequest.md +++ b/docs/models/conversationrestartstreamrequest.md @@ -8,7 +8,7 @@ Request to restart a new conversation from a given entry in the conversation. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationrestartstreamrequesthandoffexecution.md b/docs/models/conversationrestartstreamrequesthandoffexecution.md index 9d2c5633..97266b43 100644 --- a/docs/models/conversationrestartstreamrequesthandoffexecution.md +++ b/docs/models/conversationrestartstreamrequesthandoffexecution.md @@ -1,14 +1,9 @@ # ConversationRestartStreamRequestHandoffExecution -## Example Usage - -```python -from mistralai.client.models import ConversationRestartStreamRequestHandoffExecution -value: ConversationRestartStreamRequestHandoffExecution = "client" -``` - ## Values -- `"client"` -- `"server"` +| Name | Value | +| -------- | -------- | +| `CLIENT` | client | +| `SERVER` | server | \ No newline at end of file diff --git a/docs/models/conversationsource.md b/docs/models/conversationsource.md index ee88d9d4..12bf7c1f 100644 --- a/docs/models/conversationsource.md +++ b/docs/models/conversationsource.md @@ -1,20 +1,11 @@ # ConversationSource -## Example Usage - -```python -from mistralai.client.models import ConversationSource - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ConversationSource = "EXPLORER" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"EXPLORER"` -- `"UPLOADED_FILE"` -- `"DIRECT_INPUT"` -- `"PLAYGROUND"` +| Name | Value | +| --------------- | --------------- | +| `EXPLORER` | EXPLORER | +| `UPLOADED_FILE` | UPLOADED_FILE | +| `DIRECT_INPUT` | DIRECT_INPUT | +| `PLAYGROUND` | PLAYGROUND | \ No newline at end of file diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index af50989c..8debea1c 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationstreamrequesthandoffexecution.md b/docs/models/conversationstreamrequesthandoffexecution.md index 247bfd23..c98e194c 100644 --- a/docs/models/conversationstreamrequesthandoffexecution.md +++ b/docs/models/conversationstreamrequesthandoffexecution.md @@ -1,14 +1,9 @@ # ConversationStreamRequestHandoffExecution -## Example Usage - -```python -from mistralai.client.models import ConversationStreamRequestHandoffExecution -value: ConversationStreamRequestHandoffExecution = "client" -``` - ## Values -- `"client"` -- `"server"` +| Name | Value | +| -------- | -------- | +| `CLIENT` | client | +| `SERVER` | server | \ No newline at end of file diff --git a/docs/models/embeddingdtype.md b/docs/models/embeddingdtype.md index 301585b2..01656b0a 100644 --- a/docs/models/embeddingdtype.md +++ b/docs/models/embeddingdtype.md @@ -1,17 +1,12 @@ # EmbeddingDtype -## Example Usage - -```python -from mistralai.client.models import EmbeddingDtype -value: EmbeddingDtype = "float" -``` - ## Values -- `"float"` -- `"int8"` -- `"uint8"` -- `"binary"` -- `"ubinary"` +| Name | Value | +| --------- | --------- | +| `FLOAT` | float | +| `INT8` | int8 | +| `UINT8` | uint8 | +| `BINARY` | binary | +| `UBINARY` | ubinary | \ No newline at end of file diff --git a/docs/models/encodingformat.md b/docs/models/encodingformat.md index 8bc9e8c6..7d5941cf 100644 --- a/docs/models/encodingformat.md +++ b/docs/models/encodingformat.md @@ -1,14 +1,9 @@ # EncodingFormat -## Example Usage - -```python -from mistralai.client.models import EncodingFormat -value: EncodingFormat = "float" -``` - ## Values -- `"float"` -- `"base64"` +| Name | Value | +| -------- | -------- | +| `FLOAT` | float | +| `BASE64` | base64 | \ No newline at end of file diff --git a/docs/models/entitytype.md b/docs/models/entitytype.md index 44fb9d6b..7c040b38 100644 --- a/docs/models/entitytype.md +++ b/docs/models/entitytype.md @@ -2,20 +2,11 @@ The type of entity, used to share a library. -## Example Usage - -```python -from mistralai.client.models import EntityType - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: EntityType = "User" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"User"` -- `"Workspace"` -- `"Org"` +| Name | Value | +| ----------- | ----------- | +| `USER` | User | +| `WORKSPACE` | Workspace | +| `ORG` | Org | \ No newline at end of file diff --git a/docs/models/filepurpose.md b/docs/models/filepurpose.md index af6dc9fa..14cab13e 100644 --- a/docs/models/filepurpose.md +++ b/docs/models/filepurpose.md @@ -1,19 +1,10 @@ # FilePurpose -## Example Usage - -```python -from mistralai.client.models import FilePurpose - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: FilePurpose = "fine-tune" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"fine-tune"` -- `"batch"` -- `"ocr"` +| Name | Value | +| ----------- | ----------- | +| `FINE_TUNE` | fine-tune | +| `BATCH` | batch | +| `OCR` | ocr | \ No newline at end of file diff --git a/docs/models/filesapiroutesuploadfilefilevisibility.md b/docs/models/filesapiroutesuploadfilefilevisibility.md index c1f89309..055f071b 100644 --- a/docs/models/filesapiroutesuploadfilefilevisibility.md +++ b/docs/models/filesapiroutesuploadfilefilevisibility.md @@ -1,14 +1,9 @@ # FilesAPIRoutesUploadFileFileVisibility -## Example Usage - -```python -from mistralai.client.models import FilesAPIRoutesUploadFileFileVisibility -value: FilesAPIRoutesUploadFileFileVisibility = "workspace" -``` - ## Values -- `"workspace"` -- `"user"` +| Name | Value | +| ----------- | ----------- | +| `WORKSPACE` | workspace | +| `USER` | user | \ No newline at end of file diff --git a/docs/models/filevisibility.md b/docs/models/filevisibility.md index 4e6c9ed9..4ed11692 100644 --- a/docs/models/filevisibility.md +++ b/docs/models/filevisibility.md @@ -1,18 +1,9 @@ # FileVisibility -## Example Usage - -```python -from mistralai.client.models import FileVisibility - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: FileVisibility = "workspace" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"workspace"` -- `"user"` +| Name | Value | +| ----------- | ----------- | +| `WORKSPACE` | workspace | +| `USER` | user | \ No newline at end of file diff --git a/docs/models/finetuneablemodeltype.md b/docs/models/finetuneablemodeltype.md index 9ec9634f..34b24bd4 100644 --- a/docs/models/finetuneablemodeltype.md +++ b/docs/models/finetuneablemodeltype.md @@ -1,14 +1,9 @@ # FineTuneableModelType -## Example Usage - -```python -from mistralai.client.models import FineTuneableModelType -value: FineTuneableModelType = "completion" -``` - ## Values -- `"completion"` -- `"classifier"` +| Name | Value | +| ------------ | ------------ | +| `COMPLETION` | completion | +| `CLASSIFIER` | classifier | \ No newline at end of file diff --git a/docs/models/format_.md b/docs/models/format_.md index 5bf1ed0c..97d286a4 100644 --- a/docs/models/format_.md +++ b/docs/models/format_.md @@ -2,19 +2,10 @@ Format of the table -## Example Usage - -```python -from mistralai.client.models import Format - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: Format = "markdown" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"markdown"` -- `"html"` +| Name | Value | +| ---------- | ---------- | +| `MARKDOWN` | markdown | +| `HTML` | html | \ No newline at end of file diff --git a/docs/models/ftclassifierlossfunction.md b/docs/models/ftclassifierlossfunction.md index 36d3db18..919cdd38 100644 --- a/docs/models/ftclassifierlossfunction.md +++ b/docs/models/ftclassifierlossfunction.md @@ -1,18 +1,9 @@ # FTClassifierLossFunction -## Example Usage - -```python -from mistralai.client.models import FTClassifierLossFunction - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: FTClassifierLossFunction = "single_class" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"single_class"` -- `"multi_class"` +| Name | Value | +| -------------- | -------------- | +| `SINGLE_CLASS` | single_class | +| `MULTI_CLASS` | multi_class | \ No newline at end of file diff --git a/docs/models/functioncallentryconfirmationstatus.md b/docs/models/functioncallentryconfirmationstatus.md index 91231a0a..8948beb6 100644 --- a/docs/models/functioncallentryconfirmationstatus.md +++ b/docs/models/functioncallentryconfirmationstatus.md @@ -1,19 +1,10 @@ # FunctionCallEntryConfirmationStatus -## Example Usage - -```python -from mistralai.client.models import FunctionCallEntryConfirmationStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: FunctionCallEntryConfirmationStatus = "pending" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"pending"` -- `"allowed"` -- `"denied"` +| Name | Value | +| --------- | --------- | +| `PENDING` | pending | +| `ALLOWED` | allowed | +| `DENIED` | denied | \ No newline at end of file diff --git a/docs/models/functioncalleventconfirmationstatus.md b/docs/models/functioncalleventconfirmationstatus.md index 95bebe96..4a3c8774 100644 --- a/docs/models/functioncalleventconfirmationstatus.md +++ b/docs/models/functioncalleventconfirmationstatus.md @@ -1,19 +1,10 @@ # FunctionCallEventConfirmationStatus -## Example Usage - -```python -from mistralai.client.models import FunctionCallEventConfirmationStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: FunctionCallEventConfirmationStatus = "pending" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"pending"` -- `"allowed"` -- `"denied"` +| Name | Value | +| --------- | --------- | +| `PENDING` | pending | +| `ALLOWED` | allowed | +| `DENIED` | denied | \ No newline at end of file diff --git a/docs/models/imagedetail.md b/docs/models/imagedetail.md index bd7ea1fe..1e5ba3fd 100644 --- a/docs/models/imagedetail.md +++ b/docs/models/imagedetail.md @@ -1,19 +1,10 @@ # ImageDetail -## Example Usage - -```python -from mistralai.client.models import ImageDetail - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ImageDetail = "low" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"low"` -- `"auto"` -- `"high"` +| Name | Value | +| ------ | ------ | +| `LOW` | low | +| `AUTO` | auto | +| `HIGH` | high | \ No newline at end of file diff --git a/docs/models/imageurlchunk.md b/docs/models/imageurlchunk.md index db0c53d2..6d238e25 100644 --- a/docs/models/imageurlchunk.md +++ b/docs/models/imageurlchunk.md @@ -1,6 +1,6 @@ # ImageURLChunk -{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0 +{"type":"image_url","image_url":"data:image/png;base64,iVBORw0"} ## Fields diff --git a/docs/models/instructrequest.md b/docs/models/instructrequest.md index 5f0cdfff..1bd5eb64 100644 --- a/docs/models/instructrequest.md +++ b/docs/models/instructrequest.md @@ -1,5 +1,7 @@ # InstructRequest +A valid request to be tokenized + ## Fields diff --git a/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md b/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md index 1436f6ae..40d57686 100644 --- a/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md +++ b/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md @@ -2,23 +2,18 @@ The current job state to filter on. When set, the other results are not displayed. -## Example Usage - -```python -from mistralai.client.models import JobsAPIRoutesFineTuningGetFineTuningJobsStatus -value: JobsAPIRoutesFineTuningGetFineTuningJobsStatus = "QUEUED" -``` - ## Values -- `"QUEUED"` -- `"STARTED"` -- `"VALIDATING"` -- `"VALIDATED"` -- `"RUNNING"` -- `"FAILED_VALIDATION"` -- `"FAILED"` -- `"SUCCESS"` -- `"CANCELLED"` -- `"CANCELLATION_REQUESTED"` +| Name | Value | +| ------------------------ | ------------------------ | +| `QUEUED` | QUEUED | +| `STARTED` | STARTED | +| `VALIDATING` | VALIDATING | +| `VALIDATED` | VALIDATED | +| `RUNNING` | RUNNING | +| `FAILED_VALIDATION` | FAILED_VALIDATION | +| `FAILED` | FAILED | +| `SUCCESS` | SUCCESS | +| `CANCELLED` | CANCELLED | +| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file diff --git a/docs/models/judgeconversationrequest.md b/docs/models/judgeconversationrequest.md new file mode 100644 index 00000000..491c3b34 --- /dev/null +++ b/docs/models/judgeconversationrequest.md @@ -0,0 +1,9 @@ +# JudgeConversationRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `messages` | List[Dict[str, *Any*]] | :heavy_check_mark: | N/A | +| `properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/judgeconversationv1observabilityjudgesjudgeidlivejudgingpostrequest.md b/docs/models/judgeconversationv1observabilityjudgesjudgeidlivejudgingpostrequest.md new file mode 100644 index 00000000..4d362423 --- /dev/null +++ b/docs/models/judgeconversationv1observabilityjudgesjudgeidlivejudgingpostrequest.md @@ -0,0 +1,9 @@ +# JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `judge_conversation_request` | [models.JudgeConversationRequest](../models/judgeconversationrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/judgeoutputtype.md b/docs/models/judgeoutputtype.md index 35a1a837..6e9dfd72 100644 --- a/docs/models/judgeoutputtype.md +++ b/docs/models/judgeoutputtype.md @@ -1,14 +1,9 @@ # JudgeOutputType -## Example Usage - -```python -from mistralai.client.models import JudgeOutputType -value: JudgeOutputType = "REGRESSION" -``` - ## Values -- `"REGRESSION"` -- `"CLASSIFICATION"` +| Name | Value | +| ---------------- | ---------------- | +| `REGRESSION` | REGRESSION | +| `CLASSIFICATION` | CLASSIFICATION | \ No newline at end of file diff --git a/docs/models/mistralpromptmode.md b/docs/models/mistralpromptmode.md index 9b234e3e..c3409d03 100644 --- a/docs/models/mistralpromptmode.md +++ b/docs/models/mistralpromptmode.md @@ -4,18 +4,9 @@ Available options to the prompt_mode argument on the chat completion endpoint. Values represent high-level intent. Assignment to actual SPs is handled internally. System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelines, etc. -## Example Usage - -```python -from mistralai.client.models import MistralPromptMode - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: MistralPromptMode = "reasoning" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"reasoning"` +| Name | Value | +| ----------- | ----------- | +| `REASONING` | reasoning | \ No newline at end of file diff --git a/docs/models/moderationllmaction.md b/docs/models/moderationllmaction.md index e46a30b4..951880b6 100644 --- a/docs/models/moderationllmaction.md +++ b/docs/models/moderationllmaction.md @@ -1,18 +1,9 @@ # ModerationLLMAction -## Example Usage - -```python -from mistralai.client.models import ModerationLLMAction - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ModerationLLMAction = "none" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"none"` -- `"block"` +| Name | Value | +| ------- | ------- | +| `NONE` | none | +| `BLOCK` | block | \ No newline at end of file diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index d121b264..0c387f57 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -1,59 +1,50 @@ # ObservabilityErrorCode -## Example Usage - -```python -from mistralai.client.models import ObservabilityErrorCode - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ObservabilityErrorCode = "UNKNOWN_ERROR" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"UNKNOWN_ERROR"` -- `"VALIDATION_ERROR"` -- `"AUTH_FORBIDDEN"` -- `"AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN"` -- `"AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND"` -- `"AUTH_FORBIDDEN_ROLE_NOT_FOUND"` -- `"AUTH_FORBIDDEN_ORG_NOT_WHITELISTED"` -- `"AUTH_UNAUTHORIZED"` -- `"FEATURE_NOT_SUPPORTED"` -- `"FIELDS_BAD_REQUEST"` -- `"FIELDS_NOT_FOUND"` -- `"SEARCH_NOT_FOUND"` -- `"SEARCH_BAD_REQUEST"` -- `"SEARCH_SERVICE_UNAVAILABLE"` -- `"DATABASE_ERROR"` -- `"DATABASE_TIMEOUT"` -- `"DATABASE_UNAVAILABLE"` -- `"DATABASE_QUERY_ERROR"` -- `"SEARCH_FILTER_TO_SQL_CONVERSION_ERROR"` -- `"JUDGE_CONVERSATION_FORMAT_ERROR"` -- `"JUDGE_MISTRAL_API_ERROR"` -- `"JUDGE_MISTRAL_API_TIMEOUT"` -- `"JUDGE_NAME_ALREADY_EXISTS"` -- `"JUDGE_NOT_FOUND"` -- `"JUDGE_ALREADY_HAS_NEW_VERSION"` -- `"JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED"` -- `"JUDGE_DID_NOT_CHANGE"` -- `"CAMPAIGN_NOT_FOUND"` -- `"CAMPAIGN_NO_MATCHING_EVENTS"` -- `"DATASET_NOT_FOUND"` -- `"DATASET_TASK_NOT_FOUND"` -- `"DATASET_RECORD_NOT_FOUND"` -- `"DATASET_RECORD_FORMAT_ERROR"` -- `"AGENT_NOT_FOUND"` -- `"AGENT_MISTRAL_API_ERROR"` -- `"EVALUATION_NOT_FOUND"` -- `"EVALUATION_CURRENTLY_RUNNING"` -- `"EVALUATION_RECORD_NOT_FOUND"` -- `"EVALUATION_RUN_NOT_FOUND"` -- `"EVALUATION_RUN_TRANSITION_IS_INVALID"` -- `"EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY"` -- `"EVALUATION_RUN_TRANSITION_ERROR"` -- `"TEMPLATE_SYNTAX_ERROR"` +| Name | Value | +| ---------------------------------------------- | ---------------------------------------------- | +| `UNKNOWN_ERROR` | UNKNOWN_ERROR | +| `VALIDATION_ERROR` | VALIDATION_ERROR | +| `AUTH_FORBIDDEN` | AUTH_FORBIDDEN | +| `AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN` | AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN | +| `AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND` | AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND | +| `AUTH_FORBIDDEN_ROLE_NOT_FOUND` | AUTH_FORBIDDEN_ROLE_NOT_FOUND | +| `AUTH_FORBIDDEN_ORG_NOT_WHITELISTED` | AUTH_FORBIDDEN_ORG_NOT_WHITELISTED | +| `AUTH_UNAUTHORIZED` | AUTH_UNAUTHORIZED | +| `FEATURE_NOT_SUPPORTED` | FEATURE_NOT_SUPPORTED | +| `FIELDS_BAD_REQUEST` | FIELDS_BAD_REQUEST | +| `FIELDS_NOT_FOUND` | FIELDS_NOT_FOUND | +| `SEARCH_NOT_FOUND` | SEARCH_NOT_FOUND | +| `SEARCH_BAD_REQUEST` | SEARCH_BAD_REQUEST | +| `SEARCH_SERVICE_UNAVAILABLE` | SEARCH_SERVICE_UNAVAILABLE | +| `DATABASE_ERROR` | DATABASE_ERROR | +| `DATABASE_TIMEOUT` | DATABASE_TIMEOUT | +| `DATABASE_UNAVAILABLE` | DATABASE_UNAVAILABLE | +| `DATABASE_QUERY_ERROR` | DATABASE_QUERY_ERROR | +| `SEARCH_FILTER_TO_SQL_CONVERSION_ERROR` | SEARCH_FILTER_TO_SQL_CONVERSION_ERROR | +| `JUDGE_CONVERSATION_FORMAT_ERROR` | JUDGE_CONVERSATION_FORMAT_ERROR | +| `JUDGE_MISTRAL_API_ERROR` | JUDGE_MISTRAL_API_ERROR | +| `JUDGE_MISTRAL_API_TIMEOUT` | JUDGE_MISTRAL_API_TIMEOUT | +| `JUDGE_NAME_ALREADY_EXISTS` | JUDGE_NAME_ALREADY_EXISTS | +| `JUDGE_NOT_FOUND` | JUDGE_NOT_FOUND | +| `JUDGE_ALREADY_HAS_NEW_VERSION` | JUDGE_ALREADY_HAS_NEW_VERSION | +| `JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED` | JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED | +| `JUDGE_DID_NOT_CHANGE` | JUDGE_DID_NOT_CHANGE | +| `CAMPAIGN_NOT_FOUND` | CAMPAIGN_NOT_FOUND | +| `CAMPAIGN_NO_MATCHING_EVENTS` | CAMPAIGN_NO_MATCHING_EVENTS | +| `DATASET_NOT_FOUND` | DATASET_NOT_FOUND | +| `DATASET_TASK_NOT_FOUND` | DATASET_TASK_NOT_FOUND | +| `DATASET_RECORD_NOT_FOUND` | DATASET_RECORD_NOT_FOUND | +| `DATASET_RECORD_FORMAT_ERROR` | DATASET_RECORD_FORMAT_ERROR | +| `AGENT_NOT_FOUND` | AGENT_NOT_FOUND | +| `AGENT_MISTRAL_API_ERROR` | AGENT_MISTRAL_API_ERROR | +| `EVALUATION_NOT_FOUND` | EVALUATION_NOT_FOUND | +| `EVALUATION_CURRENTLY_RUNNING` | EVALUATION_CURRENTLY_RUNNING | +| `EVALUATION_RECORD_NOT_FOUND` | EVALUATION_RECORD_NOT_FOUND | +| `EVALUATION_RUN_NOT_FOUND` | EVALUATION_RUN_NOT_FOUND | +| `EVALUATION_RUN_TRANSITION_IS_INVALID` | EVALUATION_RUN_TRANSITION_IS_INVALID | +| `EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY` | EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY | +| `EVALUATION_RUN_TRANSITION_ERROR` | EVALUATION_RUN_TRANSITION_ERROR | +| `TEMPLATE_SYNTAX_ERROR` | TEMPLATE_SYNTAX_ERROR | \ No newline at end of file diff --git a/docs/models/op.md b/docs/models/op.md index da9031db..fa3e2f3a 100644 --- a/docs/models/op.md +++ b/docs/models/op.md @@ -1,35 +1,26 @@ # Op -## Example Usage - -```python -from mistralai.client.models import Op - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: Op = "lt" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"lt"` -- `"lte"` -- `"gt"` -- `"gte"` -- `"startswith"` -- `"istartswith"` -- `"endswith"` -- `"iendswith"` -- `"contains"` -- `"icontains"` -- `"matches"` -- `"notcontains"` -- `"inotcontains"` -- `"eq"` -- `"neq"` -- `"isnull"` -- `"includes"` -- `"excludes"` -- `"len_eq"` +| Name | Value | +| -------------- | -------------- | +| `LT` | lt | +| `LTE` | lte | +| `GT` | gt | +| `GTE` | gte | +| `STARTSWITH` | startswith | +| `ISTARTSWITH` | istartswith | +| `ENDSWITH` | endswith | +| `IENDSWITH` | iendswith | +| `CONTAINS` | contains | +| `ICONTAINS` | icontains | +| `MATCHES` | matches | +| `NOTCONTAINS` | notcontains | +| `INOTCONTAINS` | inotcontains | +| `EQ` | eq | +| `NEQ` | neq | +| `ISNULL` | isnull | +| `INCLUDES` | includes | +| `EXCLUDES` | excludes | +| `LEN_EQ` | len_eq | \ No newline at end of file diff --git a/docs/models/operator.md b/docs/models/operator.md index 2790c574..ca54debc 100644 --- a/docs/models/operator.md +++ b/docs/models/operator.md @@ -2,32 +2,27 @@ The operator to use for filtering options -## Example Usage - -```python -from mistralai.client.models import Operator -value: Operator = "lt" -``` - ## Values -- `"lt"` -- `"lte"` -- `"gt"` -- `"gte"` -- `"startswith"` -- `"istartswith"` -- `"endswith"` -- `"iendswith"` -- `"contains"` -- `"icontains"` -- `"matches"` -- `"notcontains"` -- `"inotcontains"` -- `"eq"` -- `"neq"` -- `"isnull"` -- `"includes"` -- `"excludes"` -- `"len_eq"` +| Name | Value | +| -------------- | -------------- | +| `LT` | lt | +| `LTE` | lte | +| `GT` | gt | +| `GTE` | gte | +| `STARTSWITH` | startswith | +| `ISTARTSWITH` | istartswith | +| `ENDSWITH` | endswith | +| `IENDSWITH` | iendswith | +| `CONTAINS` | contains | +| `ICONTAINS` | icontains | +| `MATCHES` | matches | +| `NOTCONTAINS` | notcontains | +| `INOTCONTAINS` | inotcontains | +| `EQ` | eq | +| `NEQ` | neq | +| `ISNULL` | isnull | +| `INCLUDES` | includes | +| `EXCLUDES` | excludes | +| `LEN_EQ` | len_eq | \ No newline at end of file diff --git a/docs/models/orderby.md b/docs/models/orderby.md index d778621f..bba50df1 100644 --- a/docs/models/orderby.md +++ b/docs/models/orderby.md @@ -1,14 +1,9 @@ # OrderBy -## Example Usage - -```python -from mistralai.client.models import OrderBy -value: OrderBy = "created" -``` - ## Values -- `"created"` -- `"-created"` +| Name | Value | +| --------------- | --------------- | +| `CREATED` | created | +| `MINUS_CREATED` | -created | \ No newline at end of file diff --git a/docs/models/processstatus.md b/docs/models/processstatus.md index 68313743..3a9c004e 100644 --- a/docs/models/processstatus.md +++ b/docs/models/processstatus.md @@ -1,24 +1,15 @@ # ProcessStatus -## Example Usage - -```python -from mistralai.client.models import ProcessStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ProcessStatus = "self_managed" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"self_managed"` -- `"missing_content"` -- `"noop"` -- `"done"` -- `"todo"` -- `"in_progress"` -- `"error"` -- `"waiting_for_capacity"` +| Name | Value | +| ---------------------- | ---------------------- | +| `SELF_MANAGED` | self_managed | +| `MISSING_CONTENT` | missing_content | +| `NOOP` | noop | +| `DONE` | done | +| `TODO` | todo | +| `IN_PROGRESS` | in_progress | +| `ERROR` | error | +| `WAITING_FOR_CAPACITY` | waiting_for_capacity | \ No newline at end of file diff --git a/docs/models/requestsource.md b/docs/models/requestsource.md index b710cc1f..c81c1159 100644 --- a/docs/models/requestsource.md +++ b/docs/models/requestsource.md @@ -1,15 +1,10 @@ # RequestSource -## Example Usage - -```python -from mistralai.client.models import RequestSource -value: RequestSource = "api" -``` - ## Values -- `"api"` -- `"playground"` -- `"agent_builder_v1"` +| Name | Value | +| ------------------ | ------------------ | +| `API` | api | +| `PLAYGROUND` | playground | +| `AGENT_BUILDER_V1` | agent_builder_v1 | \ No newline at end of file diff --git a/docs/models/resourcevisibility.md b/docs/models/resourcevisibility.md index 970211bb..9c06af2d 100644 --- a/docs/models/resourcevisibility.md +++ b/docs/models/resourcevisibility.md @@ -1,20 +1,11 @@ # ResourceVisibility -## Example Usage - -```python -from mistralai.client.models import ResourceVisibility - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ResourceVisibility = "shared_global" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"shared_global"` -- `"shared_org"` -- `"shared_workspace"` -- `"private"` +| Name | Value | +| ------------------ | ------------------ | +| `SHARED_GLOBAL` | shared_global | +| `SHARED_ORG` | shared_org | +| `SHARED_WORKSPACE` | shared_workspace | +| `PRIVATE` | private | \ No newline at end of file diff --git a/docs/models/responseformats.md b/docs/models/responseformats.md index 12e5edd7..2f5f1e55 100644 --- a/docs/models/responseformats.md +++ b/docs/models/responseformats.md @@ -1,19 +1,10 @@ # ResponseFormats -## Example Usage - -```python -from mistralai.client.models import ResponseFormats - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ResponseFormats = "text" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"text"` -- `"json_object"` -- `"json_schema"` +| Name | Value | +| ------------- | ------------- | +| `TEXT` | text | +| `JSON_OBJECT` | json_object | +| `JSON_SCHEMA` | json_schema | \ No newline at end of file diff --git a/docs/models/role.md b/docs/models/role.md index b16f5c3b..853c6257 100644 --- a/docs/models/role.md +++ b/docs/models/role.md @@ -1,18 +1,9 @@ # Role -## Example Usage - -```python -from mistralai.client.models import Role - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: Role = "assistant" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"assistant"` -- `"user"` +| Name | Value | +| ----------- | ----------- | +| `ASSISTANT` | assistant | +| `USER` | user | \ No newline at end of file diff --git a/docs/models/sampletype.md b/docs/models/sampletype.md index 31f26c3c..34a6a012 100644 --- a/docs/models/sampletype.md +++ b/docs/models/sampletype.md @@ -1,21 +1,12 @@ # SampleType -## Example Usage - -```python -from mistralai.client.models import SampleType - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: SampleType = "pretrain" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"pretrain"` -- `"instruct"` -- `"batch_request"` -- `"batch_result"` -- `"batch_error"` +| Name | Value | +| --------------- | --------------- | +| `PRETRAIN` | pretrain | +| `INSTRUCT` | instruct | +| `BATCH_REQUEST` | batch_request | +| `BATCH_RESULT` | batch_result | +| `BATCH_ERROR` | batch_error | \ No newline at end of file diff --git a/docs/models/shareenum.md b/docs/models/shareenum.md index d471b7c3..dc5d2b68 100644 --- a/docs/models/shareenum.md +++ b/docs/models/shareenum.md @@ -1,18 +1,9 @@ # ShareEnum -## Example Usage - -```python -from mistralai.client.models import ShareEnum - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ShareEnum = "Viewer" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"Viewer"` -- `"Editor"` +| Name | Value | +| -------- | -------- | +| `VIEWER` | Viewer | +| `EDITOR` | Editor | \ No newline at end of file diff --git a/docs/models/source.md b/docs/models/source.md index 37ca338b..bb1ed612 100644 --- a/docs/models/source.md +++ b/docs/models/source.md @@ -1,19 +1,10 @@ # Source -## Example Usage - -```python -from mistralai.client.models import Source - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: Source = "upload" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"upload"` -- `"repository"` -- `"mistral"` +| Name | Value | +| ------------ | ------------ | +| `UPLOAD` | upload | +| `REPOSITORY` | repository | +| `MISTRAL` | mistral | \ No newline at end of file diff --git a/docs/models/ssetypes.md b/docs/models/ssetypes.md index 372eafee..ae06b5e8 100644 --- a/docs/models/ssetypes.md +++ b/docs/models/ssetypes.md @@ -2,27 +2,18 @@ Server side events sent when streaming a conversation response. -## Example Usage - -```python -from mistralai.client.models import SSETypes - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: SSETypes = "conversation.response.started" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"conversation.response.started"` -- `"conversation.response.done"` -- `"conversation.response.error"` -- `"message.output.delta"` -- `"tool.execution.started"` -- `"tool.execution.delta"` -- `"tool.execution.done"` -- `"agent.handoff.started"` -- `"agent.handoff.done"` -- `"function.call.delta"` +| Name | Value | +| ------------------------------- | ------------------------------- | +| `CONVERSATION_RESPONSE_STARTED` | conversation.response.started | +| `CONVERSATION_RESPONSE_DONE` | conversation.response.done | +| `CONVERSATION_RESPONSE_ERROR` | conversation.response.error | +| `MESSAGE_OUTPUT_DELTA` | message.output.delta | +| `TOOL_EXECUTION_STARTED` | tool.execution.started | +| `TOOL_EXECUTION_DELTA` | tool.execution.delta | +| `TOOL_EXECUTION_DONE` | tool.execution.done | +| `AGENT_HANDOFF_STARTED` | agent.handoff.started | +| `AGENT_HANDOFF_DONE` | agent.handoff.done | +| `FUNCTION_CALL_DELTA` | function.call.delta | \ No newline at end of file diff --git a/docs/models/supportedoperator.md b/docs/models/supportedoperator.md index 97dbd4b1..74cf9b8e 100644 --- a/docs/models/supportedoperator.md +++ b/docs/models/supportedoperator.md @@ -1,35 +1,26 @@ # SupportedOperator -## Example Usage - -```python -from mistralai.client.models import SupportedOperator - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: SupportedOperator = "lt" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"lt"` -- `"lte"` -- `"gt"` -- `"gte"` -- `"startswith"` -- `"istartswith"` -- `"endswith"` -- `"iendswith"` -- `"contains"` -- `"icontains"` -- `"matches"` -- `"notcontains"` -- `"inotcontains"` -- `"eq"` -- `"neq"` -- `"isnull"` -- `"includes"` -- `"excludes"` -- `"len_eq"` +| Name | Value | +| -------------- | -------------- | +| `LT` | lt | +| `LTE` | lte | +| `GT` | gt | +| `GTE` | gte | +| `STARTSWITH` | startswith | +| `ISTARTSWITH` | istartswith | +| `ENDSWITH` | endswith | +| `IENDSWITH` | iendswith | +| `CONTAINS` | contains | +| `ICONTAINS` | icontains | +| `MATCHES` | matches | +| `NOTCONTAINS` | notcontains | +| `INOTCONTAINS` | inotcontains | +| `EQ` | eq | +| `NEQ` | neq | +| `ISNULL` | isnull | +| `INCLUDES` | includes | +| `EXCLUDES` | excludes | +| `LEN_EQ` | len_eq | \ No newline at end of file diff --git a/docs/models/tableformat.md b/docs/models/tableformat.md index 8321a309..54f029b8 100644 --- a/docs/models/tableformat.md +++ b/docs/models/tableformat.md @@ -1,14 +1,9 @@ # TableFormat -## Example Usage - -```python -from mistralai.client.models import TableFormat -value: TableFormat = "markdown" -``` - ## Values -- `"markdown"` -- `"html"` +| Name | Value | +| ---------- | ---------- | +| `MARKDOWN` | markdown | +| `HTML` | html | \ No newline at end of file diff --git a/docs/models/timestampgranularity.md b/docs/models/timestampgranularity.md index 4c84779c..d20012ea 100644 --- a/docs/models/timestampgranularity.md +++ b/docs/models/timestampgranularity.md @@ -1,14 +1,9 @@ # TimestampGranularity -## Example Usage - -```python -from mistralai.client.models import TimestampGranularity -value: TimestampGranularity = "segment" -``` - ## Values -- `"segment"` -- `"word"` +| Name | Value | +| --------- | --------- | +| `SEGMENT` | segment | +| `WORD` | word | \ No newline at end of file diff --git a/docs/models/toolchoiceenum.md b/docs/models/toolchoiceenum.md index eb1f3629..0be3d6c5 100644 --- a/docs/models/toolchoiceenum.md +++ b/docs/models/toolchoiceenum.md @@ -1,20 +1,11 @@ # ToolChoiceEnum -## Example Usage - -```python -from mistralai.client.models import ToolChoiceEnum - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ToolChoiceEnum = "auto" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"auto"` -- `"none"` -- `"any"` -- `"required"` +| Name | Value | +| ---------- | ---------- | +| `AUTO` | auto | +| `NONE` | none | +| `ANY` | any | +| `REQUIRED` | required | \ No newline at end of file diff --git a/docs/models/tooltypes.md b/docs/models/tooltypes.md index 345ee7dc..84e49253 100644 --- a/docs/models/tooltypes.md +++ b/docs/models/tooltypes.md @@ -1,17 +1,8 @@ # ToolTypes -## Example Usage - -```python -from mistralai.client.models import ToolTypes - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ToolTypes = "function" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"function"` +| Name | Value | +| ---------- | ---------- | +| `FUNCTION` | function | \ No newline at end of file diff --git a/docs/models/transcriptionstreameventtypes.md b/docs/models/transcriptionstreameventtypes.md index 9e49384e..e4eb25a6 100644 --- a/docs/models/transcriptionstreameventtypes.md +++ b/docs/models/transcriptionstreameventtypes.md @@ -1,20 +1,11 @@ # TranscriptionStreamEventTypes -## Example Usage - -```python -from mistralai.client.models import TranscriptionStreamEventTypes - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: TranscriptionStreamEventTypes = "transcription.language" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"transcription.language"` -- `"transcription.segment"` -- `"transcription.text.delta"` -- `"transcription.done"` +| Name | Value | +| -------------------------- | -------------------------- | +| `TRANSCRIPTION_LANGUAGE` | transcription.language | +| `TRANSCRIPTION_SEGMENT` | transcription.segment | +| `TRANSCRIPTION_TEXT_DELTA` | transcription.text.delta | +| `TRANSCRIPTION_DONE` | transcription.done | \ No newline at end of file diff --git a/docs/models/typeenum.md b/docs/models/typeenum.md index ec47cf96..80a66af3 100644 --- a/docs/models/typeenum.md +++ b/docs/models/typeenum.md @@ -1,23 +1,14 @@ # TypeEnum -## Example Usage - -```python -from mistralai.client.models import TypeEnum - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: TypeEnum = "ENUM" -``` - ## Values -This is an open enum. Unrecognized values will not fail type checks. - -- `"ENUM"` -- `"TEXT"` -- `"INT"` -- `"FLOAT"` -- `"BOOL"` -- `"TIMESTAMP"` -- `"ARRAY"` +| Name | Value | +| ----------- | ----------- | +| `ENUM` | ENUM | +| `TEXT` | TEXT | +| `INT` | INT | +| `FLOAT` | FLOAT | +| `BOOL` | BOOL | +| `TIMESTAMP` | TIMESTAMP | +| `ARRAY` | ARRAY | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index d39e72ee..7cd3ed4f 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -59,6 +59,7 @@ with Mistral( | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -124,6 +125,7 @@ with Mistral( | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index d43e42f2..5dac2d22 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -61,6 +61,7 @@ with Mistral( | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -129,6 +130,7 @@ with Mistral( | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index e6c73e23..12d94765 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -34,7 +34,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.start(inputs="", completion_args={ + res = mistral.beta.conversations.start(inputs="", stream=False, completion_args={ "response_format": { "type": "text", }, @@ -50,6 +50,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../../models/conversationinputs.md) | :heavy_check_mark: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -211,7 +212,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.append(conversation_id="", store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.append(conversation_id="", stream=False, store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -228,6 +229,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `conversation_id` | *str* | :heavy_check_mark: | ID of the conversation to which we append entries. | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendRequestHandoffExecution]](../../models/conversationappendrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -343,7 +345,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.restart(conversation_id="", from_entry_id="", store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.restart(conversation_id="", from_entry_id="", stream=False, store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -361,6 +363,7 @@ with Mistral( | `conversation_id` | *str* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -403,7 +406,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], completion_args={ + ], stream=True, completion_args={ "response_format": { "type": "text", }, @@ -421,6 +424,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../../models/conversationinputs.md) | :heavy_check_mark: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -462,7 +466,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.append_stream(conversation_id="", store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.append_stream(conversation_id="", stream=True, store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -481,6 +485,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `conversation_id` | *str* | :heavy_check_mark: | ID of the conversation to which we append entries. | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendStreamRequestHandoffExecution]](../../models/conversationappendstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -514,7 +519,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.restart_stream(conversation_id="", from_entry_id="", store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.restart_stream(conversation_id="", from_entry_id="", stream=True, store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -534,6 +539,7 @@ with Mistral( | `conversation_id` | *str* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/sdks/judges/README.md b/docs/sdks/judges/README.md index f1187518..34d16739 100644 --- a/docs/sdks/judges/README.md +++ b/docs/sdks/judges/README.md @@ -9,6 +9,7 @@ * [fetch](#fetch) - Get judge by id * [delete](#delete) - Delete a judge * [update](#update) - Update a judge +* [judge_conversation](#judge_conversation) - Run a saved judge on a conversation ## create @@ -230,6 +231,49 @@ with Mistral( ### Errors +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## judge_conversation + +Run a saved judge on a conversation + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.observability.judges.judge_conversation(judge_id="7fb9f06a-22fb-45db-ad58-6a5715280755", messages=[]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `judge_id` | *str* | :heavy_check_mark: | N/A | +| `messages` | List[Dict[str, *Any*]] | :heavy_check_mark: | N/A | +| `properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.JudgeOutput](../../models/judgeoutput.md)** + +### Errors + | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | | errors.ObservabilityError | 400, 404, 408, 409, 422 | application/json | diff --git a/pyproject.toml b/pyproject.toml index b81833ce..0a27366a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.3" +version = "2.0.4" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 4531730b..42d3fa9d 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.3" +__version__: str = "2.0.4" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.3 2.862.0 1.0.0 mistralai" +__gen_version__: str = "2.841.0" +__user_agent__: str = "speakeasy-sdk/python 2.0.4 2.841.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 2b70d152..aecd1430 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -51,6 +51,9 @@ def complete( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -74,6 +77,7 @@ def complete( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -113,6 +117,9 @@ def complete( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), agent_id=agent_id, ) @@ -214,6 +221,9 @@ async def complete_async( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -237,6 +247,7 @@ async def complete_async( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -276,6 +287,9 @@ async def complete_async( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), agent_id=agent_id, ) @@ -377,6 +391,9 @@ def stream( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -402,6 +419,7 @@ def stream( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -441,6 +459,9 @@ def stream( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), agent_id=agent_id, ) @@ -550,6 +571,9 @@ async def stream_async( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -575,6 +599,7 @@ async def stream_async( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -614,6 +639,9 @@ async def stream_async( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), agent_id=agent_id, ) diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index 13b9c01f..f53c346f 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -138,6 +138,9 @@ def complete( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -164,6 +167,7 @@ def complete( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -207,6 +211,9 @@ def complete( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) @@ -310,6 +317,9 @@ async def complete_async( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -336,6 +346,7 @@ async def complete_async( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -379,6 +390,9 @@ async def complete_async( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) @@ -482,6 +496,9 @@ def stream( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -510,6 +527,7 @@ def stream( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -553,6 +571,9 @@ def stream( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) @@ -664,6 +685,9 @@ async def stream_async( ] = None, parallel_tool_calls: Optional[bool] = None, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -692,6 +716,7 @@ async def stream_async( :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -735,6 +760,9 @@ async def stream_async( ), parallel_tool_calls=parallel_tool_calls, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index fafcd5f5..99f3a33e 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -229,6 +229,7 @@ def start( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], + stream: Optional[bool] = False, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationRequestHandoffExecution @@ -267,6 +268,7 @@ def start( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: + :param stream: :param store: :param handoff_execution: :param instructions: @@ -296,6 +298,7 @@ def start( request = models.ConversationRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), + stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -380,6 +383,7 @@ async def start_async( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], + stream: Optional[bool] = False, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationRequestHandoffExecution @@ -418,6 +422,7 @@ async def start_async( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: + :param stream: :param store: :param handoff_execution: :param instructions: @@ -447,6 +452,7 @@ async def start_async( request = models.ConversationRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), + stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -1090,6 +1096,7 @@ def append( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendRequestHandoffExecution @@ -1114,6 +1121,7 @@ def append( :param conversation_id: ID of the conversation to which we append entries. :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1139,6 +1147,7 @@ def append( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1222,6 +1231,7 @@ async def append_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendRequestHandoffExecution @@ -1246,6 +1256,7 @@ async def append_async( :param conversation_id: ID of the conversation to which we append entries. :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1271,6 +1282,7 @@ async def append_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1715,6 +1727,7 @@ def restart( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartRequestHandoffExecution @@ -1744,6 +1757,7 @@ def restart( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1771,6 +1785,7 @@ def restart( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1857,6 +1872,7 @@ async def restart_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartRequestHandoffExecution @@ -1886,6 +1902,7 @@ async def restart_async( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1913,6 +1930,7 @@ async def restart_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1995,6 +2013,7 @@ def start_stream( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], + stream: Optional[bool] = True, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationStreamRequestHandoffExecution @@ -2033,6 +2052,7 @@ def start_stream( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: + :param stream: :param store: :param handoff_execution: :param instructions: @@ -2062,6 +2082,7 @@ def start_stream( request = models.ConversationStreamRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), + stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -2153,6 +2174,7 @@ async def start_stream_async( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], + stream: Optional[bool] = True, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationStreamRequestHandoffExecution @@ -2191,6 +2213,7 @@ async def start_stream_async( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: + :param stream: :param store: :param handoff_execution: :param instructions: @@ -2220,6 +2243,7 @@ async def start_stream_async( request = models.ConversationStreamRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), + stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -2314,6 +2338,7 @@ def append_stream( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendStreamRequestHandoffExecution @@ -2338,6 +2363,7 @@ def append_stream( :param conversation_id: ID of the conversation to which we append entries. :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2363,6 +2389,7 @@ def append_stream( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2453,6 +2480,7 @@ async def append_stream_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendStreamRequestHandoffExecution @@ -2477,6 +2505,7 @@ async def append_stream_async( :param conversation_id: ID of the conversation to which we append entries. :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2502,6 +2531,7 @@ async def append_stream_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2593,6 +2623,7 @@ def restart_stream( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartStreamRequestHandoffExecution @@ -2622,6 +2653,7 @@ def restart_stream( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2649,6 +2681,7 @@ def restart_stream( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2742,6 +2775,7 @@ async def restart_stream_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, + stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartStreamRequestHandoffExecution @@ -2771,6 +2805,7 @@ async def restart_stream_async( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: + :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2798,6 +2833,7 @@ async def restart_stream_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), + stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( diff --git a/src/mistralai/client/judges.py b/src/mistralai/client/judges.py index e5dacd7f..b0eb1ea0 100644 --- a/src/mistralai/client/judges.py +++ b/src/mistralai/client/judges.py @@ -7,7 +7,7 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional, Union +from typing import Any, Dict, List, Mapping, Optional, Union class Judges(BaseSDK): @@ -1036,3 +1036,217 @@ async def update_async( raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) + + def judge_conversation( + self, + *, + judge_id: str, + messages: List[Dict[str, Any]], + properties: OptionalNullable[Dict[str, Any]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.JudgeOutput: + r"""Run a saved judge on a conversation + + :param judge_id: + :param messages: + :param properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequest( + judge_id=judge_id, + judge_conversation_request=models.JudgeConversationRequest( + messages=messages, + properties=properties, + ), + ) + ) + + req = self._build_request( + method="POST", + path="/v1/observability/judges/{judge_id}/live-judging", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.judge_conversation_request, + False, + False, + "json", + models.JudgeConversationRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="judge_conversation_v1_observability_judges__judge_id__live_judging_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.JudgeOutput, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def judge_conversation_async( + self, + *, + judge_id: str, + messages: List[Dict[str, Any]], + properties: OptionalNullable[Dict[str, Any]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.JudgeOutput: + r"""Run a saved judge on a conversation + + :param judge_id: + :param messages: + :param properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequest( + judge_id=judge_id, + judge_conversation_request=models.JudgeConversationRequest( + messages=messages, + properties=properties, + ), + ) + ) + + req = self._build_request_async( + method="POST", + path="/v1/observability/judges/{judge_id}/live-judging", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.judge_conversation_request, + False, + False, + "json", + models.JudgeConversationRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="judge_conversation_v1_observability_judges__judge_id__live_judging_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.JudgeOutput, http_res) + if utils.match_response( + http_res, ["400", "404", "408", "409", "422"], "application/json" + ): + response_data = unmarshal_json_response( + errors.ObservabilityErrorData, http_res + ) + raise errors.ObservabilityError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 361b16a9..82bb5c99 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -876,6 +876,10 @@ JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest, JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequestTypedDict, ) + from .judge_conversation_v1_observability_judges_judge_id_live_judging_postop import ( + JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequest, + JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequestTypedDict, + ) from .judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop import ( JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest, JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequestTypedDict, @@ -892,6 +896,10 @@ JudgeClassificationOutputOption, JudgeClassificationOutputOptionTypedDict, ) + from .judgeconversationrequest import ( + JudgeConversationRequest, + JudgeConversationRequestTypedDict, + ) from .judgedatasetrecordrequest import ( JudgeDatasetRecordRequest, JudgeDatasetRecordRequestTypedDict, @@ -2039,6 +2047,10 @@ "JudgeClassificationOutputOption", "JudgeClassificationOutputOptionTypedDict", "JudgeClassificationOutputTypedDict", + "JudgeConversationRequest", + "JudgeConversationRequestTypedDict", + "JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequest", + "JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequestTypedDict", "JudgeDatasetRecordRequest", "JudgeDatasetRecordRequestTypedDict", "JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest", @@ -3063,6 +3075,8 @@ "UnknownJudgeOutputUnion": ".judge", "JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequest": ".judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop", "JudgeChatCompletionEventV1ObservabilityChatCompletionEventsEventIDLiveJudgingPostRequestTypedDict": ".judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop", + "JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequest": ".judge_conversation_v1_observability_judges_judge_id_live_judging_postop", + "JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequestTypedDict": ".judge_conversation_v1_observability_judges_judge_id_live_judging_postop", "JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequest": ".judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop", "JudgeDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDLiveJudgingPostRequestTypedDict": ".judge_dataset_record_v1_observability_dataset_records_dataset_record_id_live_judging_postop", "JudgeChatCompletionEventRequest": ".judgechatcompletioneventrequest", @@ -3071,6 +3085,8 @@ "JudgeClassificationOutputTypedDict": ".judgeclassificationoutput", "JudgeClassificationOutputOption": ".judgeclassificationoutputoption", "JudgeClassificationOutputOptionTypedDict": ".judgeclassificationoutputoption", + "JudgeConversationRequest": ".judgeconversationrequest", + "JudgeConversationRequestTypedDict": ".judgeconversationrequest", "JudgeDatasetRecordRequest": ".judgedatasetrecordrequest", "JudgeDatasetRecordRequestTypedDict": ".judgedatasetrecordrequest", "Answer": ".judgeoutput", diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 36cb26bf..068b3226 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -184,7 +184,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentconversation.py b/src/mistralai/client/models/agentconversation.py index b52f5e5a..da30c663 100644 --- a/src/mistralai/client/models/agentconversation.py +++ b/src/mistralai/client/models/agentconversation.py @@ -82,7 +82,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agenthandoffdoneevent.py b/src/mistralai/client/models/agenthandoffdoneevent.py index ea9cd6b2..e2609e3d 100644 --- a/src/mistralai/client/models/agenthandoffdoneevent.py +++ b/src/mistralai/client/models/agenthandoffdoneevent.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agenthandoffentry.py b/src/mistralai/client/models/agenthandoffentry.py index 8d1c143e..f92ef2cc 100644 --- a/src/mistralai/client/models/agenthandoffentry.py +++ b/src/mistralai/client/models/agenthandoffentry.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agenthandoffstartedevent.py b/src/mistralai/client/models/agenthandoffstartedevent.py index 9525bcf6..2a402341 100644 --- a/src/mistralai/client/models/agenthandoffstartedevent.py +++ b/src/mistralai/client/models/agenthandoffstartedevent.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agents_api_v1_agents_getop.py b/src/mistralai/client/models/agents_api_v1_agents_getop.py index dee6a347..dd17580d 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_getop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_getop.py @@ -49,7 +49,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py b/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py index 25ea29e3..54b62e90 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agents_api_v1_agents_listop.py b/src/mistralai/client/models/agents_api_v1_agents_listop.py index 100e0da7..97b1c7f1 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_listop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_listop.py @@ -98,7 +98,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agents_api_v1_conversations_listop.py b/src/mistralai/client/models/agents_api_v1_conversations_listop.py index dd6276d9..8bf66aea 100644 --- a/src/mistralai/client/models/agents_api_v1_conversations_listop.py +++ b/src/mistralai/client/models/agents_api_v1_conversations_listop.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index 1cff8f95..7d38f6b0 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -3,6 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .responseformat import ResponseFormat, ResponseFormatTypedDict @@ -99,6 +100,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): parallel_tool_calls: NotRequired[bool] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] class AgentsCompletionRequest(BaseModel): @@ -146,6 +148,8 @@ class AgentsCompletionRequest(BaseModel): prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -164,17 +168,26 @@ def serialize_model(self, handler): "prediction", "parallel_tool_calls", "prompt_mode", + "guardrails", ] ) nullable_fields = set( - ["max_tokens", "random_seed", "metadata", "tools", "n", "prompt_mode"] + [ + "max_tokens", + "random_seed", + "metadata", + "tools", + "n", + "prompt_mode", + "guardrails", + ] ) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index 32f13fb1..ea83a8ff 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -3,6 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .responseformat import ResponseFormat, ResponseFormatTypedDict @@ -98,6 +99,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): parallel_tool_calls: NotRequired[bool] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] class AgentsCompletionStreamRequest(BaseModel): @@ -144,6 +146,8 @@ class AgentsCompletionStreamRequest(BaseModel): prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -162,17 +166,26 @@ def serialize_model(self, handler): "prediction", "parallel_tool_calls", "prompt_mode", + "guardrails", ] ) nullable_fields = set( - ["max_tokens", "random_seed", "metadata", "tools", "n", "prompt_mode"] + [ + "max_tokens", + "random_seed", + "metadata", + "tools", + "n", + "prompt_mode", + "guardrails", + ] ) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/annotations.py b/src/mistralai/client/models/annotations.py index f3f5c21c..ba085e2c 100644 --- a/src/mistralai/client/models/annotations.py +++ b/src/mistralai/client/models/annotations.py @@ -57,8 +57,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/archivemodelresponse.py b/src/mistralai/client/models/archivemodelresponse.py index c5ca8ff5..f1116850 100644 --- a/src/mistralai/client/models/archivemodelresponse.py +++ b/src/mistralai/client/models/archivemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/assistantmessage.py b/src/mistralai/client/models/assistantmessage.py index f333a444..26a778c7 100644 --- a/src/mistralai/client/models/assistantmessage.py +++ b/src/mistralai/client/models/assistantmessage.py @@ -61,7 +61,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiocontent.py b/src/mistralai/client/models/audiocontent.py index 2d38d2a1..b0a9505b 100644 --- a/src/mistralai/client/models/audiocontent.py +++ b/src/mistralai/client/models/audiocontent.py @@ -68,8 +68,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiotranscriptionrequest.py b/src/mistralai/client/models/audiotranscriptionrequest.py index 734860d5..fe4c79e3 100644 --- a/src/mistralai/client/models/audiotranscriptionrequest.py +++ b/src/mistralai/client/models/audiotranscriptionrequest.py @@ -94,7 +94,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiotranscriptionrequeststream.py b/src/mistralai/client/models/audiotranscriptionrequeststream.py index 84c4dbcd..2d1e9269 100644 --- a/src/mistralai/client/models/audiotranscriptionrequeststream.py +++ b/src/mistralai/client/models/audiotranscriptionrequeststream.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index b57ff2ca..f8b8faf7 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -83,7 +83,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/basemodelcard.py b/src/mistralai/client/models/basemodelcard.py index bb3c99dd..6a1c7bc2 100644 --- a/src/mistralai/client/models/basemodelcard.py +++ b/src/mistralai/client/models/basemodelcard.py @@ -101,7 +101,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/batcherror.py b/src/mistralai/client/models/batcherror.py index a0add5ad..8a353cd2 100644 --- a/src/mistralai/client/models/batcherror.py +++ b/src/mistralai/client/models/batcherror.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/batchjob.py b/src/mistralai/client/models/batchjob.py index 9cef4380..80acac33 100644 --- a/src/mistralai/client/models/batchjob.py +++ b/src/mistralai/client/models/batchjob.py @@ -115,7 +115,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/batchrequest.py b/src/mistralai/client/models/batchrequest.py index dcc47bd2..911a9a05 100644 --- a/src/mistralai/client/models/batchrequest.py +++ b/src/mistralai/client/models/batchrequest.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/blobresourcecontents.py b/src/mistralai/client/models/blobresourcecontents.py index bfae16fb..c2a55f95 100644 --- a/src/mistralai/client/models/blobresourcecontents.py +++ b/src/mistralai/client/models/blobresourcecontents.py @@ -61,8 +61,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/campaign.py b/src/mistralai/client/models/campaign.py index 62427fa0..a52bfcb9 100644 --- a/src/mistralai/client/models/campaign.py +++ b/src/mistralai/client/models/campaign.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index 1b4bfb02..a0e1b9ed 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -3,6 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .responseformat import ResponseFormat, ResponseFormatTypedDict @@ -108,6 +109,7 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -166,6 +168,8 @@ class ChatCompletionRequest(BaseModel): prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -189,6 +193,7 @@ def serialize_model(self, handler): "prediction", "parallel_tool_calls", "prompt_mode", + "guardrails", "safe_prompt", ] ) @@ -201,6 +206,7 @@ def serialize_model(self, handler): "tools", "n", "prompt_mode", + "guardrails", ] ) serialized = handler(self) @@ -208,7 +214,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index 75aab84c..32b49e80 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -3,6 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .responseformat import ResponseFormat, ResponseFormatTypedDict @@ -107,6 +108,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -164,6 +166,8 @@ class ChatCompletionStreamRequest(BaseModel): prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -187,6 +191,7 @@ def serialize_model(self, handler): "prediction", "parallel_tool_calls", "prompt_mode", + "guardrails", "safe_prompt", ] ) @@ -199,6 +204,7 @@ def serialize_model(self, handler): "tools", "n", "prompt_mode", + "guardrails", ] ) serialized = handler(self) @@ -206,7 +212,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classificationrequest.py b/src/mistralai/client/models/classificationrequest.py index 4300f9ad..25b69413 100644 --- a/src/mistralai/client/models/classificationrequest.py +++ b/src/mistralai/client/models/classificationrequest.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetunedmodel.py b/src/mistralai/client/models/classifierfinetunedmodel.py index 7c2bfc80..fbcf5892 100644 --- a/src/mistralai/client/models/classifierfinetunedmodel.py +++ b/src/mistralai/client/models/classifierfinetunedmodel.py @@ -94,7 +94,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetuningjob.py b/src/mistralai/client/models/classifierfinetuningjob.py index 5a5f8a48..fb160cf8 100644 --- a/src/mistralai/client/models/classifierfinetuningjob.py +++ b/src/mistralai/client/models/classifierfinetuningjob.py @@ -178,7 +178,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetuningjobdetails.py b/src/mistralai/client/models/classifierfinetuningjobdetails.py index dcdd62b3..5d73f55e 100644 --- a/src/mistralai/client/models/classifierfinetuningjobdetails.py +++ b/src/mistralai/client/models/classifierfinetuningjobdetails.py @@ -174,7 +174,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifiertarget.py b/src/mistralai/client/models/classifiertarget.py index bfd5646e..4d66d789 100644 --- a/src/mistralai/client/models/classifiertarget.py +++ b/src/mistralai/client/models/classifiertarget.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifiertrainingparameters.py b/src/mistralai/client/models/classifiertrainingparameters.py index 3a9576c8..14fa4926 100644 --- a/src/mistralai/client/models/classifiertrainingparameters.py +++ b/src/mistralai/client/models/classifiertrainingparameters.py @@ -56,7 +56,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/codeinterpretertool.py b/src/mistralai/client/models/codeinterpretertool.py index 4cf9d055..ce14265f 100644 --- a/src/mistralai/client/models/codeinterpretertool.py +++ b/src/mistralai/client/models/codeinterpretertool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionargs.py b/src/mistralai/client/models/completionargs.py index 76c4cf98..ab5cf5ff 100644 --- a/src/mistralai/client/models/completionargs.py +++ b/src/mistralai/client/models/completionargs.py @@ -90,7 +90,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionchunk.py b/src/mistralai/client/models/completionchunk.py index 27029b6f..5fd6c173 100644 --- a/src/mistralai/client/models/completionchunk.py +++ b/src/mistralai/client/models/completionchunk.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/completionfinetunedmodel.py b/src/mistralai/client/models/completionfinetunedmodel.py index e75b8d2f..54a1c165 100644 --- a/src/mistralai/client/models/completionfinetunedmodel.py +++ b/src/mistralai/client/models/completionfinetunedmodel.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionfinetuningjob.py b/src/mistralai/client/models/completionfinetuningjob.py index bbcf7732..1bf0a730 100644 --- a/src/mistralai/client/models/completionfinetuningjob.py +++ b/src/mistralai/client/models/completionfinetuningjob.py @@ -204,7 +204,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionfinetuningjobdetails.py b/src/mistralai/client/models/completionfinetuningjobdetails.py index 8aa8b75d..cb787021 100644 --- a/src/mistralai/client/models/completionfinetuningjobdetails.py +++ b/src/mistralai/client/models/completionfinetuningjobdetails.py @@ -193,7 +193,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionresponsestreamchoice.py b/src/mistralai/client/models/completionresponsestreamchoice.py index ef1a106b..a52ae892 100644 --- a/src/mistralai/client/models/completionresponsestreamchoice.py +++ b/src/mistralai/client/models/completionresponsestreamchoice.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/completiontrainingparameters.py b/src/mistralai/client/models/completiontrainingparameters.py index b91ec9df..ca50a7ad 100644 --- a/src/mistralai/client/models/completiontrainingparameters.py +++ b/src/mistralai/client/models/completiontrainingparameters.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py index 55730274..967e454f 100644 --- a/src/mistralai/client/models/connector.py +++ b/src/mistralai/client/models/connector.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connector_get_v1op.py b/src/mistralai/client/models/connector_get_v1op.py index 780afac9..5770ee09 100644 --- a/src/mistralai/client/models/connector_get_v1op.py +++ b/src/mistralai/client/models/connector_get_v1op.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/connector_list_v1op.py b/src/mistralai/client/models/connector_list_v1op.py index 3cb31bf7..a89da710 100644 --- a/src/mistralai/client/models/connector_list_v1op.py +++ b/src/mistralai/client/models/connector_list_v1op.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectorcalltoolrequest.py b/src/mistralai/client/models/connectorcalltoolrequest.py index 85366bb6..4e9a4d45 100644 --- a/src/mistralai/client/models/connectorcalltoolrequest.py +++ b/src/mistralai/client/models/connectorcalltoolrequest.py @@ -27,7 +27,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/connectorsqueryfilters.py b/src/mistralai/client/models/connectorsqueryfilters.py index f10d6897..1aea18b0 100644 --- a/src/mistralai/client/models/connectorsqueryfilters.py +++ b/src/mistralai/client/models/connectorsqueryfilters.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortool.py b/src/mistralai/client/models/connectortool.py index e8a036c7..26a8b7b7 100644 --- a/src/mistralai/client/models/connectortool.py +++ b/src/mistralai/client/models/connectortool.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolcallmetadata.py b/src/mistralai/client/models/connectortoolcallmetadata.py index 0280eae0..9f3be6c4 100644 --- a/src/mistralai/client/models/connectortoolcallmetadata.py +++ b/src/mistralai/client/models/connectortoolcallmetadata.py @@ -60,8 +60,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolcallresponse.py b/src/mistralai/client/models/connectortoolcallresponse.py index 76abe558..47071a94 100644 --- a/src/mistralai/client/models/connectortoolcallresponse.py +++ b/src/mistralai/client/models/connectortoolcallresponse.py @@ -129,8 +129,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolresultmetadata.py b/src/mistralai/client/models/connectortoolresultmetadata.py index 8c92f2f8..520fb99b 100644 --- a/src/mistralai/client/models/connectortoolresultmetadata.py +++ b/src/mistralai/client/models/connectortoolresultmetadata.py @@ -58,8 +58,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/conversationappendrequest.py b/src/mistralai/client/models/conversationappendrequest.py index 6d310816..386714fd 100644 --- a/src/mistralai/client/models/conversationappendrequest.py +++ b/src/mistralai/client/models/conversationappendrequest.py @@ -12,12 +12,9 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from typing_extensions import NotRequired, TypedDict ConversationAppendRequestHandoffExecution = Literal[ @@ -28,7 +25,7 @@ class ConversationAppendRequestTypedDict(TypedDict): inputs: NotRequired[ConversationInputsTypedDict] - stream: Literal[False] + stream: NotRequired[bool] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationAppendRequestHandoffExecution] @@ -40,10 +37,7 @@ class ConversationAppendRequestTypedDict(TypedDict): class ConversationAppendRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Annotated[ - Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], - pydantic.Field(alias="stream"), - ] = False + stream: Optional[bool] = False store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -73,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -88,9 +82,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - ConversationAppendRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/conversationappendstreamrequest.py b/src/mistralai/client/models/conversationappendstreamrequest.py index b65f1e82..32f6b148 100644 --- a/src/mistralai/client/models/conversationappendstreamrequest.py +++ b/src/mistralai/client/models/conversationappendstreamrequest.py @@ -12,12 +12,9 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict +from typing_extensions import NotRequired, TypedDict ConversationAppendStreamRequestHandoffExecution = Literal[ @@ -28,7 +25,7 @@ class ConversationAppendStreamRequestTypedDict(TypedDict): inputs: NotRequired[ConversationInputsTypedDict] - stream: Literal[True] + stream: NotRequired[bool] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationAppendStreamRequestHandoffExecution] @@ -40,10 +37,7 @@ class ConversationAppendStreamRequestTypedDict(TypedDict): class ConversationAppendStreamRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Annotated[ - Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], - pydantic.Field(alias="stream"), - ] = True + stream: Optional[bool] = True store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -75,7 +69,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -90,9 +84,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - ConversationAppendStreamRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/conversationhistory.py b/src/mistralai/client/models/conversationhistory.py index 2e812bb8..ceef115b 100644 --- a/src/mistralai/client/models/conversationhistory.py +++ b/src/mistralai/client/models/conversationhistory.py @@ -74,7 +74,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/conversationmessages.py b/src/mistralai/client/models/conversationmessages.py index a7e13c71..84664b62 100644 --- a/src/mistralai/client/models/conversationmessages.py +++ b/src/mistralai/client/models/conversationmessages.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index 94fcb03b..299b41fc 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -19,10 +19,7 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import Field, model_serializer -from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -73,7 +70,7 @@ class ConversationRequestTypedDict(TypedDict): inputs: ConversationInputsTypedDict - stream: Literal[False] + stream: NotRequired[bool] store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] @@ -91,10 +88,7 @@ class ConversationRequestTypedDict(TypedDict): class ConversationRequest(BaseModel): inputs: ConversationInputs - stream: Annotated[ - Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], - pydantic.Field(alias="stream"), - ] = False + stream: Optional[bool] = False store: OptionalNullable[bool] = UNSET @@ -160,7 +154,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -175,9 +169,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - ConversationRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/conversationresponse.py b/src/mistralai/client/models/conversationresponse.py index 64437b23..d1f8ac4b 100644 --- a/src/mistralai/client/models/conversationresponse.py +++ b/src/mistralai/client/models/conversationresponse.py @@ -77,7 +77,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/conversationrestartrequest.py b/src/mistralai/client/models/conversationrestartrequest.py index b6b03f1f..d5079689 100644 --- a/src/mistralai/client/models/conversationrestartrequest.py +++ b/src/mistralai/client/models/conversationrestartrequest.py @@ -12,12 +12,9 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict +from typing_extensions import NotRequired, TypeAliasType, TypedDict ConversationRestartRequestHandoffExecution = Literal[ @@ -43,7 +40,7 @@ class ConversationRestartRequestTypedDict(TypedDict): from_entry_id: str inputs: NotRequired[ConversationInputsTypedDict] - stream: Literal[False] + stream: NotRequired[bool] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationRestartRequestHandoffExecution] @@ -65,10 +62,7 @@ class ConversationRestartRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Annotated[ - Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], - pydantic.Field(alias="stream"), - ] = False + stream: Optional[bool] = False store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -106,7 +100,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -121,9 +115,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - ConversationRestartRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/conversationrestartstreamrequest.py b/src/mistralai/client/models/conversationrestartstreamrequest.py index 41b7098f..5cea4146 100644 --- a/src/mistralai/client/models/conversationrestartstreamrequest.py +++ b/src/mistralai/client/models/conversationrestartstreamrequest.py @@ -12,12 +12,9 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict +from typing_extensions import NotRequired, TypeAliasType, TypedDict ConversationRestartStreamRequestHandoffExecution = Literal[ @@ -43,7 +40,7 @@ class ConversationRestartStreamRequestTypedDict(TypedDict): from_entry_id: str inputs: NotRequired[ConversationInputsTypedDict] - stream: Literal[True] + stream: NotRequired[bool] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationRestartStreamRequestHandoffExecution] @@ -65,10 +62,7 @@ class ConversationRestartStreamRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Annotated[ - Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], - pydantic.Field(alias="stream"), - ] = True + stream: Optional[bool] = True store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -110,7 +104,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -125,9 +119,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - ConversationRestartStreamRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index a1afb267..9404e32c 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -19,10 +19,7 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import Field, model_serializer -from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -73,7 +70,7 @@ class ConversationStreamRequestTypedDict(TypedDict): inputs: ConversationInputsTypedDict - stream: Literal[True] + stream: NotRequired[bool] store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationStreamRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] @@ -91,10 +88,7 @@ class ConversationStreamRequestTypedDict(TypedDict): class ConversationStreamRequest(BaseModel): inputs: ConversationInputs - stream: Annotated[ - Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], - pydantic.Field(alias="stream"), - ] = True + stream: Optional[bool] = True store: OptionalNullable[bool] = UNSET @@ -162,7 +156,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -177,9 +171,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - ConversationStreamRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/conversationusageinfo.py b/src/mistralai/client/models/conversationusageinfo.py index e717284f..1e80f89e 100644 --- a/src/mistralai/client/models/conversationusageinfo.py +++ b/src/mistralai/client/models/conversationusageinfo.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index b434619d..1e0cb7b6 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -120,7 +120,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createbatchjobrequest.py b/src/mistralai/client/models/createbatchjobrequest.py index 6ff1e496..9a901fef 100644 --- a/src/mistralai/client/models/createbatchjobrequest.py +++ b/src/mistralai/client/models/createbatchjobrequest.py @@ -71,7 +71,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createconnectorrequest.py b/src/mistralai/client/models/createconnectorrequest.py index 52ebc0be..8fd3d3ab 100644 --- a/src/mistralai/client/models/createconnectorrequest.py +++ b/src/mistralai/client/models/createconnectorrequest.py @@ -69,7 +69,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createfileresponse.py b/src/mistralai/client/models/createfileresponse.py index bafefc37..1f03b275 100644 --- a/src/mistralai/client/models/createfileresponse.py +++ b/src/mistralai/client/models/createfileresponse.py @@ -84,7 +84,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createfinetuningjobrequest.py b/src/mistralai/client/models/createfinetuningjobrequest.py index 1f9c1e15..be97bd07 100644 --- a/src/mistralai/client/models/createfinetuningjobrequest.py +++ b/src/mistralai/client/models/createfinetuningjobrequest.py @@ -132,7 +132,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/creategithubrepositoryrequest.py b/src/mistralai/client/models/creategithubrepositoryrequest.py index a3f6cd61..61ffde27 100644 --- a/src/mistralai/client/models/creategithubrepositoryrequest.py +++ b/src/mistralai/client/models/creategithubrepositoryrequest.py @@ -51,7 +51,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createlibraryrequest.py b/src/mistralai/client/models/createlibraryrequest.py index 28dda0cb..58874e01 100644 --- a/src/mistralai/client/models/createlibraryrequest.py +++ b/src/mistralai/client/models/createlibraryrequest.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/customconnector.py b/src/mistralai/client/models/customconnector.py index f3a1e2ff..23cddfc1 100644 --- a/src/mistralai/client/models/customconnector.py +++ b/src/mistralai/client/models/customconnector.py @@ -85,7 +85,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/dataset.py b/src/mistralai/client/models/dataset.py index 08ce979e..2acd911d 100644 --- a/src/mistralai/client/models/dataset.py +++ b/src/mistralai/client/models/dataset.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/datasetimporttask.py b/src/mistralai/client/models/datasetimporttask.py index e8d90f12..4ef52e9e 100644 --- a/src/mistralai/client/models/datasetimporttask.py +++ b/src/mistralai/client/models/datasetimporttask.py @@ -58,7 +58,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/datasetpreview.py b/src/mistralai/client/models/datasetpreview.py index 90676245..55493568 100644 --- a/src/mistralai/client/models/datasetpreview.py +++ b/src/mistralai/client/models/datasetpreview.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/datasetrecord.py b/src/mistralai/client/models/datasetrecord.py index 39c92cce..9c9f42e5 100644 --- a/src/mistralai/client/models/datasetrecord.py +++ b/src/mistralai/client/models/datasetrecord.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/deletemodelresponse.py b/src/mistralai/client/models/deletemodelresponse.py index 4bc6c5e6..fac884bc 100644 --- a/src/mistralai/client/models/deletemodelresponse.py +++ b/src/mistralai/client/models/deletemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/deltamessage.py b/src/mistralai/client/models/deltamessage.py index 3823651b..d9fa230e 100644 --- a/src/mistralai/client/models/deltamessage.py +++ b/src/mistralai/client/models/deltamessage.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/document.py b/src/mistralai/client/models/document.py index 8d1aea88..fcc5bca5 100644 --- a/src/mistralai/client/models/document.py +++ b/src/mistralai/client/models/document.py @@ -114,7 +114,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/documentlibrarytool.py b/src/mistralai/client/models/documentlibrarytool.py index 29f8d64a..642c3202 100644 --- a/src/mistralai/client/models/documentlibrarytool.py +++ b/src/mistralai/client/models/documentlibrarytool.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/documenturlchunk.py b/src/mistralai/client/models/documenturlchunk.py index f7a99ff8..43444d98 100644 --- a/src/mistralai/client/models/documenturlchunk.py +++ b/src/mistralai/client/models/documenturlchunk.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddedresource.py b/src/mistralai/client/models/embeddedresource.py index e16fedf8..54cb17fd 100644 --- a/src/mistralai/client/models/embeddedresource.py +++ b/src/mistralai/client/models/embeddedresource.py @@ -84,8 +84,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddingrequest.py b/src/mistralai/client/models/embeddingrequest.py index 2ef747d8..5fa2d2f6 100644 --- a/src/mistralai/client/models/embeddingrequest.py +++ b/src/mistralai/client/models/embeddingrequest.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddingresponsedata.py b/src/mistralai/client/models/embeddingresponsedata.py index 03b23a7c..098cfae0 100644 --- a/src/mistralai/client/models/embeddingresponsedata.py +++ b/src/mistralai/client/models/embeddingresponsedata.py @@ -29,7 +29,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/event.py b/src/mistralai/client/models/event.py index 01157dfa..c40ae2b1 100644 --- a/src/mistralai/client/models/event.py +++ b/src/mistralai/client/models/event.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/feedresultchatcompletioneventpreview.py b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py index bf248758..e87e007e 100644 --- a/src/mistralai/client/models/feedresultchatcompletioneventpreview.py +++ b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py index 92c29e22..d3cbd653 100644 --- a/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py +++ b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fetchfieldoptioncountsrequest.py b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py index e310f660..19698b9b 100644 --- a/src/mistralai/client/models/fetchfieldoptioncountsrequest.py +++ b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/file.py b/src/mistralai/client/models/file.py index 528bc13a..1b0ea1d4 100644 --- a/src/mistralai/client/models/file.py +++ b/src/mistralai/client/models/file.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/filechunk.py b/src/mistralai/client/models/filechunk.py index 6c9c8b0e..5c8d2646 100644 --- a/src/mistralai/client/models/filechunk.py +++ b/src/mistralai/client/models/filechunk.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py index 326dd1d3..64cd6ac5 100644 --- a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py +++ b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/files_api_routes_list_filesop.py b/src/mistralai/client/models/files_api_routes_list_filesop.py index e18eaa6a..b03e2f88 100644 --- a/src/mistralai/client/models/files_api_routes_list_filesop.py +++ b/src/mistralai/client/models/files_api_routes_list_filesop.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/files_api_routes_upload_fileop.py b/src/mistralai/client/models/files_api_routes_upload_fileop.py index 25efcff2..b6683639 100644 --- a/src/mistralai/client/models/files_api_routes_upload_fileop.py +++ b/src/mistralai/client/models/files_api_routes_upload_fileop.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fileschema.py b/src/mistralai/client/models/fileschema.py index ce64a16b..11caa083 100644 --- a/src/mistralai/client/models/fileschema.py +++ b/src/mistralai/client/models/fileschema.py @@ -84,7 +84,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/filtergroup.py b/src/mistralai/client/models/filtergroup.py index 4e9815b7..06616a01 100644 --- a/src/mistralai/client/models/filtergroup.py +++ b/src/mistralai/client/models/filtergroup.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/filterpayload.py b/src/mistralai/client/models/filterpayload.py index ced355f1..188375f1 100644 --- a/src/mistralai/client/models/filterpayload.py +++ b/src/mistralai/client/models/filterpayload.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/fimcompletionrequest.py b/src/mistralai/client/models/fimcompletionrequest.py index 2ca34598..ea877213 100644 --- a/src/mistralai/client/models/fimcompletionrequest.py +++ b/src/mistralai/client/models/fimcompletionrequest.py @@ -113,7 +113,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fimcompletionstreamrequest.py b/src/mistralai/client/models/fimcompletionstreamrequest.py index 9c91083c..e80efc09 100644 --- a/src/mistralai/client/models/fimcompletionstreamrequest.py +++ b/src/mistralai/client/models/fimcompletionstreamrequest.py @@ -111,7 +111,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/finetunedmodelcapabilities.py b/src/mistralai/client/models/finetunedmodelcapabilities.py index b9ad2f9e..2f4cca0b 100644 --- a/src/mistralai/client/models/finetunedmodelcapabilities.py +++ b/src/mistralai/client/models/finetunedmodelcapabilities.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/ftmodelcard.py b/src/mistralai/client/models/ftmodelcard.py index bb7c52c8..3874cec2 100644 --- a/src/mistralai/client/models/ftmodelcard.py +++ b/src/mistralai/client/models/ftmodelcard.py @@ -115,7 +115,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/function.py b/src/mistralai/client/models/function.py index 8a3267e8..1da1dcc9 100644 --- a/src/mistralai/client/models/function.py +++ b/src/mistralai/client/models/function.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/functioncallentry.py b/src/mistralai/client/models/functioncallentry.py index a88d87ab..d05fad85 100644 --- a/src/mistralai/client/models/functioncallentry.py +++ b/src/mistralai/client/models/functioncallentry.py @@ -101,7 +101,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/functioncallevent.py b/src/mistralai/client/models/functioncallevent.py index 6e3c0715..849eed76 100644 --- a/src/mistralai/client/models/functioncallevent.py +++ b/src/mistralai/client/models/functioncallevent.py @@ -80,7 +80,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/functionresultentry.py b/src/mistralai/client/models/functionresultentry.py index 11576522..01e2e36f 100644 --- a/src/mistralai/client/models/functionresultentry.py +++ b/src/mistralai/client/models/functionresultentry.py @@ -61,7 +61,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py index 9db415bf..e1b04950 100644 --- a/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py +++ b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py index 4ff0c307..a6a329c7 100644 --- a/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py +++ b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py index b4af68e0..5a8b7450 100644 --- a/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py +++ b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py index 8213c023..43e0dc5b 100644 --- a/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py +++ b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py index ed177823..7617a5d2 100644 --- a/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py +++ b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py index 1d79f2d5..ea52dd51 100644 --- a/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py +++ b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py index b5d0980e..7228cfa1 100644 --- a/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py +++ b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py @@ -63,7 +63,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/getfileresponse.py b/src/mistralai/client/models/getfileresponse.py index 37c29bbb..82280899 100644 --- a/src/mistralai/client/models/getfileresponse.py +++ b/src/mistralai/client/models/getfileresponse.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/githubrepository.py b/src/mistralai/client/models/githubrepository.py index 4ec88aa8..84b01078 100644 --- a/src/mistralai/client/models/githubrepository.py +++ b/src/mistralai/client/models/githubrepository.py @@ -51,7 +51,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/guardrailconfig.py b/src/mistralai/client/models/guardrailconfig.py index d152ec36..4f8fe352 100644 --- a/src/mistralai/client/models/guardrailconfig.py +++ b/src/mistralai/client/models/guardrailconfig.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imagecontent.py b/src/mistralai/client/models/imagecontent.py index e6363daa..13c3f449 100644 --- a/src/mistralai/client/models/imagecontent.py +++ b/src/mistralai/client/models/imagecontent.py @@ -68,8 +68,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imagegenerationtool.py b/src/mistralai/client/models/imagegenerationtool.py index 0dd4a4d2..c1789b18 100644 --- a/src/mistralai/client/models/imagegenerationtool.py +++ b/src/mistralai/client/models/imagegenerationtool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imageurl.py b/src/mistralai/client/models/imageurl.py index 32efa67b..ac1030f5 100644 --- a/src/mistralai/client/models/imageurl.py +++ b/src/mistralai/client/models/imageurl.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imageurlchunk.py b/src/mistralai/client/models/imageurlchunk.py index 1e342fd6..59ad96e9 100644 --- a/src/mistralai/client/models/imageurlchunk.py +++ b/src/mistralai/client/models/imageurlchunk.py @@ -21,14 +21,14 @@ class ImageURLChunkTypedDict(TypedDict): - r"""{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0""" + r"""{\"type\":\"image_url\",\"image_url\":\"data:image/png;base64,iVBORw0\"}""" image_url: ImageURLUnionTypedDict type: Literal["image_url"] class ImageURLChunk(BaseModel): - r"""{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0""" + r"""{\"type\":\"image_url\",\"image_url\":\"data:image/png;base64,iVBORw0\"}""" image_url: ImageURLUnion @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/instructrequest.py b/src/mistralai/client/models/instructrequest.py index e5f9cccf..2bda8378 100644 --- a/src/mistralai/client/models/instructrequest.py +++ b/src/mistralai/client/models/instructrequest.py @@ -36,8 +36,12 @@ class InstructRequestTypedDict(TypedDict): + r"""A valid request to be tokenized""" + messages: List[InstructRequestMessageTypedDict] class InstructRequest(BaseModel): + r"""A valid request to be tokenized""" + messages: List[InstructRequestMessage] diff --git a/src/mistralai/client/models/jobmetadata.py b/src/mistralai/client/models/jobmetadata.py index 8409872b..f6e96fa1 100644 --- a/src/mistralai/client/models/jobmetadata.py +++ b/src/mistralai/client/models/jobmetadata.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py index 683da4af..d779e1d9 100644 --- a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py +++ b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py index e5869656..89ac3c93 100644 --- a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py +++ b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py @@ -104,7 +104,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py b/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py index 9b9aeb51..ec80a158 100644 --- a/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +++ b/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py @@ -145,7 +145,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jsonschema.py b/src/mistralai/client/models/jsonschema.py index bc0bd6c4..dfababa6 100644 --- a/src/mistralai/client/models/jsonschema.py +++ b/src/mistralai/client/models/jsonschema.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/judge.py b/src/mistralai/client/models/judge.py index 036aabb7..1fb1d386 100644 --- a/src/mistralai/client/models/judge.py +++ b/src/mistralai/client/models/judge.py @@ -119,7 +119,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/judge_conversation_v1_observability_judges_judge_id_live_judging_postop.py b/src/mistralai/client/models/judge_conversation_v1_observability_judges_judge_id_live_judging_postop.py new file mode 100644 index 00000000..4f211dd3 --- /dev/null +++ b/src/mistralai/client/models/judge_conversation_v1_observability_judges_judge_id_live_judging_postop.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a958f3e6b122 + +from __future__ import annotations +from .judgeconversationrequest import ( + JudgeConversationRequest, + JudgeConversationRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequestTypedDict( + TypedDict +): + judge_id: str + judge_conversation_request: JudgeConversationRequestTypedDict + + +class JudgeConversationV1ObservabilityJudgesJudgeIDLiveJudgingPostRequest(BaseModel): + judge_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + judge_conversation_request: Annotated[ + JudgeConversationRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/judgeconversationrequest.py b/src/mistralai/client/models/judgeconversationrequest.py new file mode 100644 index 00000000..4b8cff1b --- /dev/null +++ b/src/mistralai/client/models/judgeconversationrequest.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b8bfdade89a2 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict, List +from typing_extensions import NotRequired, TypedDict + + +class JudgeConversationRequestTypedDict(TypedDict): + messages: List[Dict[str, Any]] + properties: NotRequired[Nullable[Dict[str, Any]]] + + +class JudgeConversationRequest(BaseModel): + messages: List[Dict[str, Any]] + + properties: OptionalNullable[Dict[str, Any]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["properties"]) + nullable_fields = set(["properties"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/judgeregressionoutput.py b/src/mistralai/client/models/judgeregressionoutput.py index 9bb8f9c1..63394d8b 100644 --- a/src/mistralai/client/models/judgeregressionoutput.py +++ b/src/mistralai/client/models/judgeregressionoutput.py @@ -41,7 +41,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/legacyjobmetadata.py b/src/mistralai/client/models/legacyjobmetadata.py index 143f0e7c..57576758 100644 --- a/src/mistralai/client/models/legacyjobmetadata.py +++ b/src/mistralai/client/models/legacyjobmetadata.py @@ -114,7 +114,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/libraries_documents_list_v1op.py b/src/mistralai/client/models/libraries_documents_list_v1op.py index afc474cb..da7d793b 100644 --- a/src/mistralai/client/models/libraries_documents_list_v1op.py +++ b/src/mistralai/client/models/libraries_documents_list_v1op.py @@ -78,7 +78,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/library.py b/src/mistralai/client/models/library.py index c26710ff..1953b6fb 100644 --- a/src/mistralai/client/models/library.py +++ b/src/mistralai/client/models/library.py @@ -99,7 +99,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/list_models_v1_models_getop.py b/src/mistralai/client/models/list_models_v1_models_getop.py index 1a42d9b0..70b0ab82 100644 --- a/src/mistralai/client/models/list_models_v1_models_getop.py +++ b/src/mistralai/client/models/list_models_v1_models_getop.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/listbatchjobsresponse.py b/src/mistralai/client/models/listbatchjobsresponse.py index 77265322..35a348a1 100644 --- a/src/mistralai/client/models/listbatchjobsresponse.py +++ b/src/mistralai/client/models/listbatchjobsresponse.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/listfilesresponse.py b/src/mistralai/client/models/listfilesresponse.py index 37787dae..10a60126 100644 --- a/src/mistralai/client/models/listfilesresponse.py +++ b/src/mistralai/client/models/listfilesresponse.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/listfinetuningjobsresponse.py b/src/mistralai/client/models/listfinetuningjobsresponse.py index 39547d57..1e434c59 100644 --- a/src/mistralai/client/models/listfinetuningjobsresponse.py +++ b/src/mistralai/client/models/listfinetuningjobsresponse.py @@ -85,7 +85,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/mcpservericon.py b/src/mistralai/client/models/mcpservericon.py index 293ab375..6068c1c4 100644 --- a/src/mistralai/client/models/mcpservericon.py +++ b/src/mistralai/client/models/mcpservericon.py @@ -56,8 +56,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageinputentry.py b/src/mistralai/client/models/messageinputentry.py index be271e31..c948a13e 100644 --- a/src/mistralai/client/models/messageinputentry.py +++ b/src/mistralai/client/models/messageinputentry.py @@ -95,7 +95,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageoutputentry.py b/src/mistralai/client/models/messageoutputentry.py index fd683ad3..6a9c52ed 100644 --- a/src/mistralai/client/models/messageoutputentry.py +++ b/src/mistralai/client/models/messageoutputentry.py @@ -98,7 +98,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageoutputevent.py b/src/mistralai/client/models/messageoutputevent.py index 8f5ecd43..d765f4fd 100644 --- a/src/mistralai/client/models/messageoutputevent.py +++ b/src/mistralai/client/models/messageoutputevent.py @@ -82,7 +82,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/metric.py b/src/mistralai/client/models/metric.py index 8d059894..1413f589 100644 --- a/src/mistralai/client/models/metric.py +++ b/src/mistralai/client/models/metric.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/modelcapabilities.py b/src/mistralai/client/models/modelcapabilities.py index 3267c707..b9382047 100644 --- a/src/mistralai/client/models/modelcapabilities.py +++ b/src/mistralai/client/models/modelcapabilities.py @@ -79,7 +79,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index 72ca957f..d7f765bf 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -167,7 +167,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/modellist.py b/src/mistralai/client/models/modellist.py index a6020100..5fd835f2 100644 --- a/src/mistralai/client/models/modellist.py +++ b/src/mistralai/client/models/modellist.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/moderationllmv1categorythresholds.py b/src/mistralai/client/models/moderationllmv1categorythresholds.py index 9a947d11..0451ba3a 100644 --- a/src/mistralai/client/models/moderationllmv1categorythresholds.py +++ b/src/mistralai/client/models/moderationllmv1categorythresholds.py @@ -77,7 +77,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv1config.py b/src/mistralai/client/models/moderationllmv1config.py index fe597a9b..da7156eb 100644 --- a/src/mistralai/client/models/moderationllmv1config.py +++ b/src/mistralai/client/models/moderationllmv1config.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv2categorythresholds.py b/src/mistralai/client/models/moderationllmv2categorythresholds.py index 2ca952c5..1754582b 100644 --- a/src/mistralai/client/models/moderationllmv2categorythresholds.py +++ b/src/mistralai/client/models/moderationllmv2categorythresholds.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv2config.py b/src/mistralai/client/models/moderationllmv2config.py index 5cd8b7ca..df2b04bd 100644 --- a/src/mistralai/client/models/moderationllmv2config.py +++ b/src/mistralai/client/models/moderationllmv2config.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationobject.py b/src/mistralai/client/models/moderationobject.py index 66f6a84b..e7ccd8f6 100644 --- a/src/mistralai/client/models/moderationobject.py +++ b/src/mistralai/client/models/moderationobject.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/observabilityerrordetail.py b/src/mistralai/client/models/observabilityerrordetail.py index f1535352..a6236b66 100644 --- a/src/mistralai/client/models/observabilityerrordetail.py +++ b/src/mistralai/client/models/observabilityerrordetail.py @@ -25,7 +25,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/ocrimageobject.py b/src/mistralai/client/models/ocrimageobject.py index 583cc38b..365f062b 100644 --- a/src/mistralai/client/models/ocrimageobject.py +++ b/src/mistralai/client/models/ocrimageobject.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrpageobject.py b/src/mistralai/client/models/ocrpageobject.py index 40b70d81..ffc7b3b6 100644 --- a/src/mistralai/client/models/ocrpageobject.py +++ b/src/mistralai/client/models/ocrpageobject.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrrequest.py b/src/mistralai/client/models/ocrrequest.py index 6e405ee4..4ad337ce 100644 --- a/src/mistralai/client/models/ocrrequest.py +++ b/src/mistralai/client/models/ocrrequest.py @@ -131,7 +131,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrresponse.py b/src/mistralai/client/models/ocrresponse.py index ff4b96c3..e63eed98 100644 --- a/src/mistralai/client/models/ocrresponse.py +++ b/src/mistralai/client/models/ocrresponse.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrusageinfo.py b/src/mistralai/client/models/ocrusageinfo.py index bfd748e0..2ec1322b 100644 --- a/src/mistralai/client/models/ocrusageinfo.py +++ b/src/mistralai/client/models/ocrusageinfo.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultcampaignpreview.py b/src/mistralai/client/models/paginatedresultcampaignpreview.py index f6cfce37..d82ee741 100644 --- a/src/mistralai/client/models/paginatedresultcampaignpreview.py +++ b/src/mistralai/client/models/paginatedresultcampaignpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py index e08443c1..97bbfea7 100644 --- a/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py +++ b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetimporttask.py b/src/mistralai/client/models/paginatedresultdatasetimporttask.py index 4b9f4881..9d6dcd05 100644 --- a/src/mistralai/client/models/paginatedresultdatasetimporttask.py +++ b/src/mistralai/client/models/paginatedresultdatasetimporttask.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetpreview.py b/src/mistralai/client/models/paginatedresultdatasetpreview.py index 81746f35..51566cc5 100644 --- a/src/mistralai/client/models/paginatedresultdatasetpreview.py +++ b/src/mistralai/client/models/paginatedresultdatasetpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetrecord.py b/src/mistralai/client/models/paginatedresultdatasetrecord.py index d9aa8c8e..1d6e15c1 100644 --- a/src/mistralai/client/models/paginatedresultdatasetrecord.py +++ b/src/mistralai/client/models/paginatedresultdatasetrecord.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultjudgepreview.py b/src/mistralai/client/models/paginatedresultjudgepreview.py index c61382f9..57dbc1e5 100644 --- a/src/mistralai/client/models/paginatedresultjudgepreview.py +++ b/src/mistralai/client/models/paginatedresultjudgepreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginationresponse.py b/src/mistralai/client/models/paginationresponse.py index a60640aa..f05ee380 100644 --- a/src/mistralai/client/models/paginationresponse.py +++ b/src/mistralai/client/models/paginationresponse.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/prediction.py b/src/mistralai/client/models/prediction.py index 614f4811..0c6f4182 100644 --- a/src/mistralai/client/models/prediction.py +++ b/src/mistralai/client/models/prediction.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionerror.py b/src/mistralai/client/models/realtimetranscriptionerror.py index 8ea1d425..c661e461 100644 --- a/src/mistralai/client/models/realtimetranscriptionerror.py +++ b/src/mistralai/client/models/realtimetranscriptionerror.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py b/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py index 82ce59fc..8156a270 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioend.py b/src/mistralai/client/models/realtimetranscriptioninputaudioend.py index 9b0a8709..473eedb7 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioend.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioend.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py b/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py index fe728633..553d14c7 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsession.py b/src/mistralai/client/models/realtimetranscriptionsession.py index e23c07ec..a74a457b 100644 --- a/src/mistralai/client/models/realtimetranscriptionsession.py +++ b/src/mistralai/client/models/realtimetranscriptionsession.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/realtimetranscriptionsessioncreated.py b/src/mistralai/client/models/realtimetranscriptionsessioncreated.py index 88da8764..bb96875a 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessioncreated.py +++ b/src/mistralai/client/models/realtimetranscriptionsessioncreated.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdated.py b/src/mistralai/client/models/realtimetranscriptionsessionupdated.py index 474b2fa7..fea5db4a 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdated.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdated.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py b/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py index 4013d638..07ad59a4 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py index d4ce43f7..a89441e9 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/referencechunk.py b/src/mistralai/client/models/referencechunk.py index c0d7c065..a5fa22f0 100644 --- a/src/mistralai/client/models/referencechunk.py +++ b/src/mistralai/client/models/referencechunk.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/resourcelink.py b/src/mistralai/client/models/resourcelink.py index 890c5be1..8ed5613c 100644 --- a/src/mistralai/client/models/resourcelink.py +++ b/src/mistralai/client/models/resourcelink.py @@ -114,8 +114,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/responsedoneevent.py b/src/mistralai/client/models/responsedoneevent.py index 89a58bf7..be38fba8 100644 --- a/src/mistralai/client/models/responsedoneevent.py +++ b/src/mistralai/client/models/responsedoneevent.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/responseerrorevent.py b/src/mistralai/client/models/responseerrorevent.py index 5326c4e8..fa4d0d01 100644 --- a/src/mistralai/client/models/responseerrorevent.py +++ b/src/mistralai/client/models/responseerrorevent.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/responseformat.py b/src/mistralai/client/models/responseformat.py index 95141394..b2971412 100644 --- a/src/mistralai/client/models/responseformat.py +++ b/src/mistralai/client/models/responseformat.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/responsestartedevent.py b/src/mistralai/client/models/responsestartedevent.py index ca375042..84abfcd9 100644 --- a/src/mistralai/client/models/responsestartedevent.py +++ b/src/mistralai/client/models/responsestartedevent.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/searchchatcompletioneventidsrequest.py b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py index 64bb8f9f..f8476081 100644 --- a/src/mistralai/client/models/searchchatcompletioneventidsrequest.py +++ b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/searchchatcompletioneventsrequest.py b/src/mistralai/client/models/searchchatcompletioneventsrequest.py index bca27f16..95524c5b 100644 --- a/src/mistralai/client/models/searchchatcompletioneventsrequest.py +++ b/src/mistralai/client/models/searchchatcompletioneventsrequest.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/security.py b/src/mistralai/client/models/security.py index 36b12953..f3b3423e 100644 --- a/src/mistralai/client/models/security.py +++ b/src/mistralai/client/models/security.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/sharing.py b/src/mistralai/client/models/sharing.py index efa16203..d6142e83 100644 --- a/src/mistralai/client/models/sharing.py +++ b/src/mistralai/client/models/sharing.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/sharingdelete.py b/src/mistralai/client/models/sharingdelete.py index 3472a506..33ccd7e7 100644 --- a/src/mistralai/client/models/sharingdelete.py +++ b/src/mistralai/client/models/sharingdelete.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/sharingrequest.py b/src/mistralai/client/models/sharingrequest.py index 7c2d435c..76424b8e 100644 --- a/src/mistralai/client/models/sharingrequest.py +++ b/src/mistralai/client/models/sharingrequest.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/textchunk.py b/src/mistralai/client/models/textchunk.py index bae970f3..ac9f3137 100644 --- a/src/mistralai/client/models/textchunk.py +++ b/src/mistralai/client/models/textchunk.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/textcontent.py b/src/mistralai/client/models/textcontent.py index 03de48d3..7468b046 100644 --- a/src/mistralai/client/models/textcontent.py +++ b/src/mistralai/client/models/textcontent.py @@ -65,8 +65,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/textresourcecontents.py b/src/mistralai/client/models/textresourcecontents.py index c3f26a65..c497bb4d 100644 --- a/src/mistralai/client/models/textresourcecontents.py +++ b/src/mistralai/client/models/textresourcecontents.py @@ -61,8 +61,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/thinkchunk.py b/src/mistralai/client/models/thinkchunk.py index ae084a17..03573f8e 100644 --- a/src/mistralai/client/models/thinkchunk.py +++ b/src/mistralai/client/models/thinkchunk.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/tool.py b/src/mistralai/client/models/tool.py index 1d1c5ce5..2b9965e5 100644 --- a/src/mistralai/client/models/tool.py +++ b/src/mistralai/client/models/tool.py @@ -28,7 +28,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolcall.py b/src/mistralai/client/models/toolcall.py index 29f1149c..181cec33 100644 --- a/src/mistralai/client/models/toolcall.py +++ b/src/mistralai/client/models/toolcall.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolchoice.py b/src/mistralai/client/models/toolchoice.py index ce84573a..cb787df1 100644 --- a/src/mistralai/client/models/toolchoice.py +++ b/src/mistralai/client/models/toolchoice.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolconfiguration.py b/src/mistralai/client/models/toolconfiguration.py index eb3d14e5..b903c8b6 100644 --- a/src/mistralai/client/models/toolconfiguration.py +++ b/src/mistralai/client/models/toolconfiguration.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolexecutiondeltaevent.py b/src/mistralai/client/models/toolexecutiondeltaevent.py index c2e40950..5a977ca6 100644 --- a/src/mistralai/client/models/toolexecutiondeltaevent.py +++ b/src/mistralai/client/models/toolexecutiondeltaevent.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolexecutiondoneevent.py b/src/mistralai/client/models/toolexecutiondoneevent.py index ec3b6918..1c9b0ec9 100644 --- a/src/mistralai/client/models/toolexecutiondoneevent.py +++ b/src/mistralai/client/models/toolexecutiondoneevent.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolexecutionentry.py b/src/mistralai/client/models/toolexecutionentry.py index 226adce1..0d6f2a13 100644 --- a/src/mistralai/client/models/toolexecutionentry.py +++ b/src/mistralai/client/models/toolexecutionentry.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolexecutionstartedevent.py b/src/mistralai/client/models/toolexecutionstartedevent.py index a4af27b8..21e5bfa8 100644 --- a/src/mistralai/client/models/toolexecutionstartedevent.py +++ b/src/mistralai/client/models/toolexecutionstartedevent.py @@ -72,7 +72,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolfilechunk.py b/src/mistralai/client/models/toolfilechunk.py index 1d9e6118..0708b3ff 100644 --- a/src/mistralai/client/models/toolfilechunk.py +++ b/src/mistralai/client/models/toolfilechunk.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolmessage.py b/src/mistralai/client/models/toolmessage.py index 0dc9e92f..05a0ee63 100644 --- a/src/mistralai/client/models/toolmessage.py +++ b/src/mistralai/client/models/toolmessage.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolreferencechunk.py b/src/mistralai/client/models/toolreferencechunk.py index 391724ed..95454fe8 100644 --- a/src/mistralai/client/models/toolreferencechunk.py +++ b/src/mistralai/client/models/toolreferencechunk.py @@ -65,7 +65,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/trainingfile.py b/src/mistralai/client/models/trainingfile.py index bdaba37a..2faeda8b 100644 --- a/src/mistralai/client/models/trainingfile.py +++ b/src/mistralai/client/models/trainingfile.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/transcriptionresponse.py b/src/mistralai/client/models/transcriptionresponse.py index c512a345..70315463 100644 --- a/src/mistralai/client/models/transcriptionresponse.py +++ b/src/mistralai/client/models/transcriptionresponse.py @@ -55,8 +55,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionsegmentchunk.py b/src/mistralai/client/models/transcriptionsegmentchunk.py index 8a5a7162..b87bfc2f 100644 --- a/src/mistralai/client/models/transcriptionsegmentchunk.py +++ b/src/mistralai/client/models/transcriptionsegmentchunk.py @@ -67,8 +67,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionstreamdone.py b/src/mistralai/client/models/transcriptionstreamdone.py index 89357277..e3c50169 100644 --- a/src/mistralai/client/models/transcriptionstreamdone.py +++ b/src/mistralai/client/models/transcriptionstreamdone.py @@ -66,8 +66,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionstreamsegmentdelta.py b/src/mistralai/client/models/transcriptionstreamsegmentdelta.py index 38e7b0a3..32ef8f9b 100644 --- a/src/mistralai/client/models/transcriptionstreamsegmentdelta.py +++ b/src/mistralai/client/models/transcriptionstreamsegmentdelta.py @@ -64,8 +64,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/unarchivemodelresponse.py b/src/mistralai/client/models/unarchivemodelresponse.py index 5cab4c2e..5c75d30e 100644 --- a/src/mistralai/client/models/unarchivemodelresponse.py +++ b/src/mistralai/client/models/unarchivemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index 7bb9686b..584c034c 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -129,7 +129,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updateconnectorrequest.py b/src/mistralai/client/models/updateconnectorrequest.py index 3540d02b..2fe42ba8 100644 --- a/src/mistralai/client/models/updateconnectorrequest.py +++ b/src/mistralai/client/models/updateconnectorrequest.py @@ -97,7 +97,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatedatasetrequest.py b/src/mistralai/client/models/updatedatasetrequest.py index ddbaad12..02974089 100644 --- a/src/mistralai/client/models/updatedatasetrequest.py +++ b/src/mistralai/client/models/updatedatasetrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatedocumentrequest.py b/src/mistralai/client/models/updatedocumentrequest.py index 12d9c89b..61e69655 100644 --- a/src/mistralai/client/models/updatedocumentrequest.py +++ b/src/mistralai/client/models/updatedocumentrequest.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatelibraryrequest.py b/src/mistralai/client/models/updatelibraryrequest.py index d5183ac0..91cbf2a1 100644 --- a/src/mistralai/client/models/updatelibraryrequest.py +++ b/src/mistralai/client/models/updatelibraryrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatemodelrequest.py b/src/mistralai/client/models/updatemodelrequest.py index 0179ba14..f685cfcc 100644 --- a/src/mistralai/client/models/updatemodelrequest.py +++ b/src/mistralai/client/models/updatemodelrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/usageinfo.py b/src/mistralai/client/models/usageinfo.py index f23699d0..31cbf07e 100644 --- a/src/mistralai/client/models/usageinfo.py +++ b/src/mistralai/client/models/usageinfo.py @@ -60,8 +60,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) + val = serialized.get(k) + serialized.pop(k, None) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/usermessage.py b/src/mistralai/client/models/usermessage.py index 7b4b5563..63e76792 100644 --- a/src/mistralai/client/models/usermessage.py +++ b/src/mistralai/client/models/usermessage.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/validationerror.py b/src/mistralai/client/models/validationerror.py index 5fe796db..d856e24c 100644 --- a/src/mistralai/client/models/validationerror.py +++ b/src/mistralai/client/models/validationerror.py @@ -49,7 +49,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/wandbintegration.py b/src/mistralai/client/models/wandbintegration.py index 0e444bec..f0df2c77 100644 --- a/src/mistralai/client/models/wandbintegration.py +++ b/src/mistralai/client/models/wandbintegration.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/wandbintegrationresult.py b/src/mistralai/client/models/wandbintegrationresult.py index e64bb27c..575cbd42 100644 --- a/src/mistralai/client/models/wandbintegrationresult.py +++ b/src/mistralai/client/models/wandbintegrationresult.py @@ -52,7 +52,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/websearchpremiumtool.py b/src/mistralai/client/models/websearchpremiumtool.py index 5c929e94..00d4a4b4 100644 --- a/src/mistralai/client/models/websearchpremiumtool.py +++ b/src/mistralai/client/models/websearchpremiumtool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/websearchtool.py b/src/mistralai/client/models/websearchtool.py index f82b6ec1..6871080f 100644 --- a/src/mistralai/client/models/websearchtool.py +++ b/src/mistralai/client/models/websearchtool.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k, serialized.get(n)) + val = serialized.get(k) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index b775fe1c..80bf25a7 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -72,8 +72,8 @@ def __init__( self, api_key: Optional[Union[Optional[str], Callable[[], Optional[str]]]] = None, server: Optional[str] = None, - url_params: Optional[Dict[str, str]] = None, server_url: Optional[str] = None, + url_params: Optional[Dict[str, str]] = None, client: Optional[HttpClient] = None, async_client: Optional[AsyncHttpClient] = None, retry_config: OptionalNullable[RetryConfig] = UNSET, diff --git a/src/mistralai/client/utils/eventstreaming.py b/src/mistralai/client/utils/eventstreaming.py index 93287ab4..19a12152 100644 --- a/src/mistralai/client/utils/eventstreaming.py +++ b/src/mistralai/client/utils/eventstreaming.py @@ -33,12 +33,9 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, - data_required: bool = True, ): self.response = response - self.generator = stream_events( - response, decoder, sentinel, data_required=data_required - ) + self.generator = stream_events(response, decoder, sentinel) self.client_ref = client_ref self._closed = False @@ -72,12 +69,9 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, - data_required: bool = True, ): self.response = response - self.generator = stream_events_async( - response, decoder, sentinel, data_required=data_required - ) + self.generator = stream_events_async(response, decoder, sentinel) self.client_ref = client_ref self._closed = False @@ -123,7 +117,6 @@ async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, - data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 @@ -146,11 +139,7 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, + raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id ) if event is not None: yield event @@ -163,11 +152,7 @@ async def stream_events_async( position = 0 event, discard, _ = _parse_event( - raw=buffer, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, + raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id ) if event is not None: yield event @@ -177,7 +162,6 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, - data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 @@ -200,11 +184,7 @@ def stream_events( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, + raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id ) if event is not None: yield event @@ -217,11 +197,7 @@ def stream_events( position = 0 event, discard, _ = _parse_event( - raw=buffer, - decoder=decoder, - sentinel=sentinel, - event_id=event_id, - data_required=data_required, + raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id ) if event is not None: yield event @@ -233,7 +209,6 @@ def _parse_event( decoder: Callable[[str], T], sentinel: Optional[str] = None, event_id: Optional[str] = None, - data_required: bool = True, ) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) @@ -276,10 +251,6 @@ def _parse_event( if sentinel and data == f"{sentinel}\n": return None, True, event_id - # Skip data-less events when data is required - if not data and publish and data_required: - return None, False, event_id - if data: data = data[:-1] try: diff --git a/uv.lock b/uv.lock index 32493803..986436b9 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.3" +version = "2.0.4" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 95f440ad8e9021d98080248da30411b660523b1f Mon Sep 17 00:00:00 2001 From: Louis Sanna <85956496+louis-sanna-dev@users.noreply.github.com> Date: Tue, 17 Mar 2026 11:06:43 +0100 Subject: [PATCH 18/82] ci: pin Speakeasy CLI to 1.754.0 (#425) * ci: pin Speakeasy version to 1.754.0 * ci: source Speakeasy version from .speakeasy/workflow.yaml * ci: log resolved Speakeasy version in workflow --- .../sdk_generation_mistralai_azure_sdk.yaml | 23 ++++++++++++++++++- .../sdk_generation_mistralai_gcp_sdk.yaml | 23 ++++++++++++++++++- .../sdk_generation_mistralai_sdk.yaml | 23 ++++++++++++++++++- .speakeasy/workflow.yaml | 2 +- 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml index b5d0741b..f56e1d89 100644 --- a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml @@ -15,13 +15,34 @@ permissions: description: optionally set a specific SDK version type: string jobs: + resolve-speakeasy-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.resolve.outputs.version }} + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Resolve Speakeasy version from workflow config + id: resolve + run: | + set -euo pipefail + VERSION=$(awk '/^speakeasyVersion:/{print $2; exit}' .speakeasy/workflow.yaml | tr -d '"') + if [ -z "${VERSION:-}" ]; then + echo "Could not resolve speakeasyVersion from .speakeasy/workflow.yaml" + exit 1 + fi + echo "Resolved Speakeasy version: $VERSION" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + generate: + needs: resolve-speakeasy-version uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 with: force: ${{ github.event.inputs.force }} mode: pr set_version: ${{ github.event.inputs.set_version }} - speakeasy_version: latest + speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-azure-sdk secrets: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml index 05f88e25..2bf4e3dd 100644 --- a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml @@ -15,13 +15,34 @@ permissions: description: optionally set a specific SDK version type: string jobs: + resolve-speakeasy-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.resolve.outputs.version }} + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Resolve Speakeasy version from workflow config + id: resolve + run: | + set -euo pipefail + VERSION=$(awk '/^speakeasyVersion:/{print $2; exit}' .speakeasy/workflow.yaml | tr -d '"') + if [ -z "${VERSION:-}" ]; then + echo "Could not resolve speakeasyVersion from .speakeasy/workflow.yaml" + exit 1 + fi + echo "Resolved Speakeasy version: $VERSION" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + generate: + needs: resolve-speakeasy-version uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 with: force: ${{ github.event.inputs.force }} mode: pr set_version: ${{ github.event.inputs.set_version }} - speakeasy_version: latest + speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-gcp-sdk secrets: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sdk_generation_mistralai_sdk.yaml b/.github/workflows/sdk_generation_mistralai_sdk.yaml index 59fe1150..3f7f5f6c 100644 --- a/.github/workflows/sdk_generation_mistralai_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_sdk.yaml @@ -15,13 +15,34 @@ permissions: description: optionally set a specific SDK version type: string jobs: + resolve-speakeasy-version: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.resolve.outputs.version }} + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Resolve Speakeasy version from workflow config + id: resolve + run: | + set -euo pipefail + VERSION=$(awk '/^speakeasyVersion:/{print $2; exit}' .speakeasy/workflow.yaml | tr -d '"') + if [ -z "${VERSION:-}" ]; then + echo "Could not resolve speakeasyVersion from .speakeasy/workflow.yaml" + exit 1 + fi + echo "Resolved Speakeasy version: $VERSION" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + generate: + needs: resolve-speakeasy-version uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 with: force: ${{ github.event.inputs.force }} mode: pr set_version: ${{ github.event.inputs.set_version }} - speakeasy_version: latest + speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-sdk secrets: github_access_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 65d6d202..548733b0 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,5 +1,5 @@ workflowVersion: 1.0.0 -speakeasyVersion: 1.729.0 +speakeasyVersion: 1.754.0 sources: mistral-azure-source: inputs: From 3d9eb57bca520f6d3159aa9a08a215a9f5e9ee69 Mon Sep 17 00:00:00 2001 From: Simon Van de Kerckhove Date: Tue, 17 Mar 2026 17:05:05 +0100 Subject: [PATCH 19/82] feat(otel): read gen_ai.conversation.id from OTEL baggage and set as span attribute (#429) Read gen_ai.conversation.id from OTEL baggage in get_traced_request_and_span() and set it as an attribute on SDK-created spans. This allows callers that propagate conversation ID via standard OTEL baggage (opentelemetry.baggage) to have it automatically attached to descendant Mistral SDK spans, per GenAI semantic conventions. Generated by Mistral Vibe. Co-authored-by: Mistral Vibe --- src/mistralai/extra/observability/otel.py | 7 ++ .../extra/tests/test_otel_tracing.py | 73 +++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/src/mistralai/extra/observability/otel.py b/src/mistralai/extra/observability/otel.py index 45c33535..6ea37389 100644 --- a/src/mistralai/extra/observability/otel.py +++ b/src/mistralai/extra/observability/otel.py @@ -20,6 +20,7 @@ import opentelemetry.semconv.attributes.server_attributes as server_attributes from opentelemetry import context as context_api from opentelemetry import propagate, trace +from opentelemetry.baggage import get_baggage from opentelemetry.trace import Span, Status, StatusCode, Tracer, set_span_in_context from .serialization import ( @@ -453,6 +454,12 @@ def get_traced_request_and_span( try: span = tracer.start_span(name=operation_id) span.set_attributes({"agent.trace.public": ""}) + # Propagate gen_ai.conversation.id from OTEL baggage if present + conversation_id = get_baggage(gen_ai_attributes.GEN_AI_CONVERSATION_ID) + if conversation_id: + span.set_attribute( + gen_ai_attributes.GEN_AI_CONVERSATION_ID, str(conversation_id) + ) # Inject the span context into the request headers to be used by the backend service to continue the trace propagate.inject(request.headers, context=set_span_in_context(span)) span = enrich_span_from_request(span, operation_id, request) diff --git a/src/mistralai/extra/tests/test_otel_tracing.py b/src/mistralai/extra/tests/test_otel_tracing.py index 1c78e5b1..ff30ba0c 100644 --- a/src/mistralai/extra/tests/test_otel_tracing.py +++ b/src/mistralai/extra/tests/test_otel_tracing.py @@ -18,7 +18,9 @@ from unittest.mock import MagicMock import httpx +from opentelemetry import context as context_api from opentelemetry import trace +from opentelemetry.baggage import set_baggage from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import SimpleSpanProcessor from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter @@ -1525,5 +1527,76 @@ def failing_tool(x: int) -> str: ) + # -- Baggage propagation: gen_ai.conversation.id --------------------------- + + def test_conversation_id_from_baggage(self): + """When gen_ai.conversation.id is set in OTEL baggage, it must appear as a span attribute.""" + request = ChatCompletionRequest( + model="mistral-small-latest", + messages=[UserMessage(content="Hello")], + ) + response = ChatCompletionResponse( + id="cmpl-baggage-001", + object="chat.completion", + model="mistral-small-latest", + created=1700000010, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage(content="Hi!", tool_calls=None), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=5, completion_tokens=2, total_tokens=7), + ) + + # Attach baggage to the current context + ctx = set_baggage("gen_ai.conversation.id", "conv-from-baggage-123") + token = context_api.attach(ctx) + try: + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + finally: + context_api.detach(token) + + span = self._get_single_span() + self.assertEqual( + span.attributes["gen_ai.conversation.id"], "conv-from-baggage-123" + ) + + def test_no_conversation_id_without_baggage(self): + """When no baggage is set, gen_ai.conversation.id must NOT appear on a chat span.""" + request = ChatCompletionRequest( + model="mistral-small-latest", + messages=[UserMessage(content="Hello")], + ) + response = ChatCompletionResponse( + id="cmpl-nobag-001", + object="chat.completion", + model="mistral-small-latest", + created=1700000011, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage(content="Hi!", tool_calls=None), + finish_reason="stop", + ), + ], + usage=UsageInfo(prompt_tokens=5, completion_tokens=2, total_tokens=7), + ) + + self._run_hook_lifecycle( + "chat_completion_v1_chat_completions_post", + request, + response, + ) + + span = self._get_single_span() + self.assertNotIn("gen_ai.conversation.id", span.attributes) + + if __name__ == "__main__": unittest.main() From b2428fdd699c7ca48ad53a201d145c46aa199218 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 16:30:08 +0100 Subject: [PATCH 20/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.0.5=20(#434)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.connectors.get_auth_url()`: **Added** * `mistral.chat.complete()`: `request.reasoning_effort` **Added** * `mistral.chat.stream()`: `request.reasoning_effort` **Added** * `mistral.agents.complete()`: `request.reasoning_effort` **Added** * `mistral.agents.stream()`: `request.reasoning_effort` **Added** * chore: align pyproject.toml and uv.lock to version 2.0.5 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 1222 +++++++++-------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 15 +- README-PYPI.md | 7 +- README.md | 7 +- RELEASES.md | 12 +- docs/models/agentscompletionrequest.md | 1 + docs/models/agentscompletionstreamrequest.md | 1 + docs/models/apiendpoint.md | 33 +- docs/models/audience.md | 17 +- docs/models/audioencoding.md | 25 +- docs/models/authurlresponse.md | 9 + docs/models/basetaskstatus.md | 29 +- docs/models/batchjobstatus.md | 27 +- docs/models/builtinconnectors.md | 23 +- .../chatcompletionchoicefinishreason.md | 23 +- docs/models/chatcompletionrequest.md | 1 + docs/models/chatcompletionstreamrequest.md | 1 + .../classifierfinetuningjobdetailsstatus.md | 33 +- docs/models/classifierfinetuningjobstatus.md | 33 +- .../completionfinetuningjobdetailsstatus.md | 33 +- docs/models/completionfinetuningjobstatus.md | 33 +- ...pletionresponsestreamchoicefinishreason.md | 21 +- docs/models/confirmation.md | 13 +- docs/models/connectorgetauthurlv1request.md | 9 + docs/models/conversationappendrequest.md | 2 +- ...nversationappendrequesthandoffexecution.md | 13 +- .../models/conversationappendstreamrequest.md | 2 +- ...tionappendstreamrequesthandoffexecution.md | 13 +- docs/models/conversationrequest.md | 2 +- .../conversationrequesthandoffexecution.md | 13 +- docs/models/conversationrestartrequest.md | 2 +- ...versationrestartrequesthandoffexecution.md | 13 +- .../conversationrestartstreamrequest.md | 2 +- ...ionrestartstreamrequesthandoffexecution.md | 13 +- docs/models/conversationsource.md | 21 +- docs/models/conversationstreamrequest.md | 2 +- ...nversationstreamrequesthandoffexecution.md | 13 +- docs/models/embeddingdtype.md | 19 +- docs/models/encodingformat.md | 13 +- docs/models/entitytype.md | 19 +- docs/models/filepurpose.md | 19 +- .../filesapiroutesuploadfilefilevisibility.md | 13 +- docs/models/filevisibility.md | 17 +- docs/models/finetuneablemodeltype.md | 13 +- docs/models/format_.md | 17 +- docs/models/ftclassifierlossfunction.md | 17 +- .../functioncallentryconfirmationstatus.md | 19 +- .../functioncalleventconfirmationstatus.md | 19 +- docs/models/imagedetail.md | 19 +- ...routesfinetuninggetfinetuningjobsstatus.md | 29 +- docs/models/judgeoutputtype.md | 13 +- docs/models/mistralpromptmode.md | 15 +- docs/models/moderationllmaction.md | 17 +- docs/models/observabilityerrorcode.md | 99 +- docs/models/op.md | 51 +- docs/models/operator.md | 47 +- docs/models/orderby.md | 13 +- docs/models/processstatus.md | 29 +- docs/models/reasoningeffort.md | 14 + docs/models/requestsource.md | 15 +- docs/models/resourcevisibility.md | 21 +- docs/models/responseformats.md | 19 +- docs/models/role.md | 17 +- docs/models/sampletype.md | 23 +- docs/models/shareenum.md | 17 +- docs/models/source.md | 19 +- docs/models/ssetypes.md | 33 +- docs/models/supportedoperator.md | 51 +- docs/models/tableformat.md | 13 +- docs/models/timestampgranularity.md | 13 +- docs/models/toolchoiceenum.md | 21 +- docs/models/tooltypes.md | 15 +- docs/models/transcriptionstreameventtypes.md | 21 +- docs/models/typeenum.md | 27 +- docs/sdks/agents/README.md | 2 + docs/sdks/chat/README.md | 2 + docs/sdks/connectors/README.md | 43 + docs/sdks/conversations/README.md | 18 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 6 +- src/mistralai/client/agents.py | 12 + src/mistralai/client/chat.py | 12 + src/mistralai/client/connectors.py | 186 +++ src/mistralai/client/conversations.py | 36 - src/mistralai/client/models/__init__.py | 16 + src/mistralai/client/models/agent.py | 2 +- .../client/models/agentconversation.py | 2 +- .../client/models/agenthandoffdoneevent.py | 2 +- .../client/models/agenthandoffentry.py | 2 +- .../client/models/agenthandoffstartedevent.py | 2 +- .../models/agents_api_v1_agents_getop.py | 2 +- .../agents_api_v1_agents_list_versionsop.py | 2 +- .../models/agents_api_v1_agents_listop.py | 2 +- .../agents_api_v1_conversations_listop.py | 2 +- .../client/models/agentscompletionrequest.py | 8 +- .../models/agentscompletionstreamrequest.py | 8 +- src/mistralai/client/models/annotations.py | 4 +- .../client/models/archivemodelresponse.py | 2 +- .../client/models/assistantmessage.py | 2 +- src/mistralai/client/models/audiocontent.py | 4 +- .../models/audiotranscriptionrequest.py | 2 +- .../models/audiotranscriptionrequeststream.py | 2 +- .../client/models/authurlresponse.py | 17 + .../client/models/basefielddefinition.py | 2 +- src/mistralai/client/models/basemodelcard.py | 2 +- src/mistralai/client/models/batcherror.py | 2 +- src/mistralai/client/models/batchjob.py | 2 +- src/mistralai/client/models/batchrequest.py | 2 +- .../client/models/blobresourcecontents.py | 4 +- src/mistralai/client/models/campaign.py | 2 +- .../client/models/chatcompletionrequest.py | 8 +- .../models/chatcompletionstreamrequest.py | 8 +- .../client/models/classificationrequest.py | 2 +- .../client/models/classifierfinetunedmodel.py | 2 +- .../client/models/classifierfinetuningjob.py | 2 +- .../models/classifierfinetuningjobdetails.py | 2 +- .../client/models/classifiertarget.py | 2 +- .../models/classifiertrainingparameters.py | 2 +- .../client/models/codeinterpretertool.py | 2 +- src/mistralai/client/models/completionargs.py | 2 +- .../client/models/completionchunk.py | 2 +- .../client/models/completionfinetunedmodel.py | 2 +- .../client/models/completionfinetuningjob.py | 2 +- .../models/completionfinetuningjobdetails.py | 2 +- .../models/completionresponsestreamchoice.py | 2 +- .../models/completiontrainingparameters.py | 2 +- src/mistralai/client/models/connector.py | 2 +- .../models/connector_get_auth_url_v1op.py | 55 + .../client/models/connector_get_v1op.py | 2 +- .../client/models/connector_list_v1op.py | 2 +- .../client/models/connectorcalltoolrequest.py | 2 +- .../client/models/connectorsqueryfilters.py | 2 +- src/mistralai/client/models/connectortool.py | 2 +- .../models/connectortoolcallmetadata.py | 4 +- .../models/connectortoolcallresponse.py | 4 +- .../models/connectortoolresultmetadata.py | 4 +- .../models/conversationappendrequest.py | 20 +- .../models/conversationappendstreamrequest.py | 20 +- .../client/models/conversationhistory.py | 2 +- .../client/models/conversationmessages.py | 2 +- .../client/models/conversationrequest.py | 18 +- .../client/models/conversationresponse.py | 2 +- .../models/conversationrestartrequest.py | 20 +- .../conversationrestartstreamrequest.py | 20 +- .../models/conversationstreamrequest.py | 18 +- .../client/models/conversationusageinfo.py | 2 +- .../client/models/createagentrequest.py | 2 +- .../client/models/createbatchjobrequest.py | 2 +- .../client/models/createconnectorrequest.py | 2 +- .../client/models/createfileresponse.py | 2 +- .../models/createfinetuningjobrequest.py | 2 +- .../models/creategithubrepositoryrequest.py | 2 +- .../client/models/createlibraryrequest.py | 2 +- .../client/models/customconnector.py | 2 +- src/mistralai/client/models/dataset.py | 2 +- .../client/models/datasetimporttask.py | 2 +- src/mistralai/client/models/datasetpreview.py | 2 +- src/mistralai/client/models/datasetrecord.py | 2 +- .../client/models/deletemodelresponse.py | 2 +- src/mistralai/client/models/deltamessage.py | 2 +- src/mistralai/client/models/document.py | 2 +- .../client/models/documentlibrarytool.py | 2 +- .../client/models/documenturlchunk.py | 2 +- .../client/models/embeddedresource.py | 4 +- .../client/models/embeddingrequest.py | 2 +- .../client/models/embeddingresponsedata.py | 2 +- src/mistralai/client/models/event.py | 2 +- .../feedresultchatcompletioneventpreview.py | 2 +- ...fetchchatcompletionfieldoptionsresponse.py | 2 +- .../models/fetchfieldoptioncountsrequest.py | 2 +- src/mistralai/client/models/file.py | 2 +- src/mistralai/client/models/filechunk.py | 2 +- .../files_api_routes_get_signed_urlop.py | 2 +- .../models/files_api_routes_list_filesop.py | 2 +- .../models/files_api_routes_upload_fileop.py | 2 +- src/mistralai/client/models/fileschema.py | 2 +- src/mistralai/client/models/filtergroup.py | 2 +- src/mistralai/client/models/filterpayload.py | 2 +- .../client/models/fimcompletionrequest.py | 2 +- .../models/fimcompletionstreamrequest.py | 2 +- .../models/finetunedmodelcapabilities.py | 2 +- src/mistralai/client/models/ftmodelcard.py | 2 +- src/mistralai/client/models/function.py | 2 +- .../client/models/functioncallentry.py | 2 +- .../client/models/functioncallevent.py | 2 +- .../client/models/functionresultentry.py | 2 +- ...aigns_campaign_id_selected_events_getop.py | 2 +- ...paigns_v1_observability_campaigns_getop.py | 2 +- ...ty_chat_completion_events_search_postop.py | 2 +- ...ability_datasets_dataset_id_tasks_getop.py | 2 +- ...ility_datasets_dataset_id_records_getop.py | 2 +- ...atasets_v1_observability_datasets_getop.py | 2 +- ...et_judges_v1_observability_judges_getop.py | 2 +- .../client/models/getfileresponse.py | 2 +- .../client/models/githubrepository.py | 2 +- .../client/models/guardrailconfig.py | 2 +- src/mistralai/client/models/imagecontent.py | 4 +- .../client/models/imagegenerationtool.py | 2 +- src/mistralai/client/models/imageurl.py | 2 +- src/mistralai/client/models/imageurlchunk.py | 2 +- src/mistralai/client/models/jobmetadata.py | 2 +- .../jobs_api_routes_batch_get_batch_jobop.py | 2 +- .../jobs_api_routes_batch_get_batch_jobsop.py | 2 +- ...utes_fine_tuning_get_fine_tuning_jobsop.py | 2 +- src/mistralai/client/models/jsonschema.py | 2 +- src/mistralai/client/models/judge.py | 2 +- .../client/models/judgeconversationrequest.py | 2 +- .../client/models/judgeregressionoutput.py | 2 +- .../client/models/legacyjobmetadata.py | 2 +- .../models/libraries_documents_list_v1op.py | 2 +- src/mistralai/client/models/library.py | 2 +- .../models/list_models_v1_models_getop.py | 2 +- .../client/models/listbatchjobsresponse.py | 2 +- .../client/models/listfilesresponse.py | 2 +- .../models/listfinetuningjobsresponse.py | 2 +- src/mistralai/client/models/mcpservericon.py | 4 +- .../client/models/messageinputentry.py | 2 +- .../client/models/messageoutputentry.py | 2 +- .../client/models/messageoutputevent.py | 2 +- src/mistralai/client/models/metric.py | 2 +- .../client/models/modelcapabilities.py | 2 +- .../client/models/modelconversation.py | 2 +- src/mistralai/client/models/modellist.py | 2 +- .../moderationllmv1categorythresholds.py | 2 +- .../client/models/moderationllmv1config.py | 2 +- .../moderationllmv2categorythresholds.py | 2 +- .../client/models/moderationllmv2config.py | 2 +- .../client/models/moderationobject.py | 2 +- .../client/models/observabilityerrordetail.py | 2 +- src/mistralai/client/models/ocrimageobject.py | 2 +- src/mistralai/client/models/ocrpageobject.py | 2 +- src/mistralai/client/models/ocrrequest.py | 2 +- src/mistralai/client/models/ocrresponse.py | 2 +- src/mistralai/client/models/ocrusageinfo.py | 2 +- .../models/paginatedresultcampaignpreview.py | 2 +- ...ginatedresultchatcompletioneventpreview.py | 2 +- .../paginatedresultdatasetimporttask.py | 2 +- .../models/paginatedresultdatasetpreview.py | 2 +- .../models/paginatedresultdatasetrecord.py | 2 +- .../models/paginatedresultjudgepreview.py | 2 +- .../client/models/paginationresponse.py | 2 +- src/mistralai/client/models/prediction.py | 2 +- .../models/realtimetranscriptionerror.py | 2 +- .../realtimetranscriptioninputaudioappend.py | 2 +- .../realtimetranscriptioninputaudioend.py | 2 +- .../realtimetranscriptioninputaudioflush.py | 2 +- .../models/realtimetranscriptionsession.py | 2 +- .../realtimetranscriptionsessioncreated.py | 2 +- .../realtimetranscriptionsessionupdated.py | 2 +- ...altimetranscriptionsessionupdatemessage.py | 2 +- ...altimetranscriptionsessionupdatepayload.py | 2 +- .../client/models/reasoningeffort.py | 11 + src/mistralai/client/models/referencechunk.py | 2 +- src/mistralai/client/models/resourcelink.py | 4 +- .../client/models/responsedoneevent.py | 2 +- .../client/models/responseerrorevent.py | 2 +- src/mistralai/client/models/responseformat.py | 2 +- .../client/models/responsestartedevent.py | 2 +- .../searchchatcompletioneventidsrequest.py | 2 +- .../searchchatcompletioneventsrequest.py | 2 +- src/mistralai/client/models/security.py | 2 +- src/mistralai/client/models/sharing.py | 2 +- src/mistralai/client/models/sharingdelete.py | 2 +- src/mistralai/client/models/sharingrequest.py | 2 +- src/mistralai/client/models/textchunk.py | 2 +- src/mistralai/client/models/textcontent.py | 4 +- .../client/models/textresourcecontents.py | 4 +- src/mistralai/client/models/thinkchunk.py | 2 +- src/mistralai/client/models/tool.py | 2 +- src/mistralai/client/models/toolcall.py | 2 +- src/mistralai/client/models/toolchoice.py | 2 +- .../client/models/toolconfiguration.py | 2 +- .../client/models/toolexecutiondeltaevent.py | 2 +- .../client/models/toolexecutiondoneevent.py | 2 +- .../client/models/toolexecutionentry.py | 2 +- .../models/toolexecutionstartedevent.py | 2 +- src/mistralai/client/models/toolfilechunk.py | 2 +- src/mistralai/client/models/toolmessage.py | 2 +- .../client/models/toolreferencechunk.py | 2 +- src/mistralai/client/models/trainingfile.py | 2 +- .../client/models/transcriptionresponse.py | 4 +- .../models/transcriptionsegmentchunk.py | 4 +- .../client/models/transcriptionstreamdone.py | 4 +- .../models/transcriptionstreamsegmentdelta.py | 4 +- .../client/models/unarchivemodelresponse.py | 2 +- .../client/models/updateagentrequest.py | 2 +- .../client/models/updateconnectorrequest.py | 2 +- .../client/models/updatedatasetrequest.py | 2 +- .../client/models/updatedocumentrequest.py | 2 +- .../client/models/updatelibraryrequest.py | 2 +- .../client/models/updatemodelrequest.py | 2 +- src/mistralai/client/models/usageinfo.py | 4 +- src/mistralai/client/models/usermessage.py | 2 +- .../client/models/validationerror.py | 2 +- .../client/models/wandbintegration.py | 2 +- .../client/models/wandbintegrationresult.py | 2 +- .../client/models/websearchpremiumtool.py | 2 +- src/mistralai/client/models/websearchtool.py | 2 +- src/mistralai/client/sdk.py | 2 +- src/mistralai/client/utils/eventstreaming.py | 41 +- uv.lock | 2 +- 302 files changed, 2297 insertions(+), 1345 deletions(-) create mode 100644 docs/models/authurlresponse.md create mode 100644 docs/models/connectorgetauthurlv1request.md create mode 100644 docs/models/reasoningeffort.md create mode 100644 src/mistralai/client/models/authurlresponse.py create mode 100644 src/mistralai/client/models/connector_get_auth_url_v1op.py create mode 100644 src/mistralai/client/models/reasoningeffort.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index bb9cb105..c7d0b130 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,39 +1,39 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 08b0a109c2cd72be260f8fbb93bf2cb6 + docChecksum: 935dfa929e1e1ce9ce95e8113516b4d6 docVersion: 1.0.0 - speakeasyVersion: 1.729.0 - generationVersion: 2.841.0 - releaseVersion: 2.0.4 - configChecksum: 0964286b9eba516a737f07bc6df48ae0 + speakeasyVersion: 1.754.0 + generationVersion: 2.862.0 + releaseVersion: 2.0.5 + configChecksum: 3e3409f4ae2a461d1ac6804338d30297 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 6dcdb026-3cbd-407d-9f7e-d6f1c866b4b6 - pristine_commit_hash: f08cc49c462c044585ac6aaede160115dfc89c92 - pristine_tree_hash: 3341ab4a90b3703689ce70b2079e43e422b7f653 + generation_id: 89696261-5908-4dee-88ea-d37528273266 + pristine_commit_hash: e85fd7bfb52babb0a1d1e719b507e74434907135 + pristine_tree_hash: 47c226db0e18f3950f48ffd5a6a91205025e9ad1 features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.12 + core: 6.0.18 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 downloadStreams: 1.0.1 - enumUnions: 0.1.0 + enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 errors: 3.3.5 - examples: 3.0.2 + examples: 3.0.3 flatRequests: 1.0.1 flattening: 3.1.1 globalSecurity: 3.0.5 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.2.0 + globalServerURLs: 3.2.1 includes: 3.0.0 methodArguments: 1.0.2 multipartFileContentType: 1.0.0 @@ -43,7 +43,7 @@ features: responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 - serverEvents: 1.0.13 + serverEvents: 1.0.15 serverEventsSentinels: 0.1.0 serverIDs: 3.0.0 unions: 3.1.4 @@ -184,8 +184,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:9c5f4de69cfa954d329cac76e7186db6e31e03c6 - pristine_git_object: 63a26c0750a478e844aa4cc39ab52c6fd67717bf + last_write_checksum: sha1:7932ecb14b0e32f46e5a4b97c83581ecdca53ddf + pristine_git_object: 99f47f5cedb79f44393f0cdb3c9a26660500cdee docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -200,8 +200,8 @@ trackedFiles: pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:8e2b38627d5f03877a8e9ac43a1117456e7f717d - pristine_git_object: f9589a4299e9c834da81388941df16069587e9fc + last_write_checksum: sha1:021b53d01c8f46c2a074defbb08736752e99ad9c + pristine_git_object: d5455230b1b5d640c19e1ee0f1c29361674077a7 docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -232,8 +232,8 @@ trackedFiles: pristine_git_object: 324a8e4e8656b3eef77355cc24c70ac0a2e1aa9c docs/models/apiendpoint.md: id: be613fd9b947 - last_write_checksum: sha1:4d984c11248f7da42c949164e69b53995d5942c4 - pristine_git_object: 8d83a26f19241da5ce626ff9526575c50e5d27be + last_write_checksum: sha1:843ebd98df60194f823ddcebeb1f1d334c2b16ce + pristine_git_object: e049d40ab3995e3442a009a9781ac98b4614091c docs/models/apikeyauth.md: id: 529789e1b079 last_write_checksum: sha1:edb801076d411a5d6c1f7a3f4fdb4c3612b12ab1 @@ -260,8 +260,8 @@ trackedFiles: pristine_git_object: 147708d9238e40e1cdb222beee15fbe8c1603050 docs/models/audience.md: id: 6a718c512c7f - last_write_checksum: sha1:9d46fde31c3f8f43af7288359d6de60bfa8dfe6c - pristine_git_object: ac325076feae9be8b54492d4bd85cb5c52828bc0 + last_write_checksum: sha1:67de107cad15a11c0edb9b6bc0d6a79fe85a6258 + pristine_git_object: 186d913ec0e78ad9f4ddf762e7aa24ec2c8122b4 docs/models/audiochunk.md: id: 88315a758fd4 last_write_checksum: sha1:b47b295122cea28d66212d75a1f0eccd70a248cc @@ -272,8 +272,8 @@ trackedFiles: pristine_git_object: 64ab6d26b5561e15722cab1eab3134c5a0688a91 docs/models/audioencoding.md: id: 1e0dfee9c2a0 - last_write_checksum: sha1:5d47cfaca916d7a47adbea71748595b3ab69a478 - pristine_git_object: feec8c71bf5a89a5c0099a9d075bc2bd36dd5f73 + last_write_checksum: sha1:d3f61fdb79969e41b9925f5788246d691ba39f39 + pristine_git_object: 34b80490a315851da7e8b9e1b5e32108d40609cc docs/models/audioformat.md: id: 41973dd397de last_write_checksum: sha1:b81fbaf4f8aa03937c91f76d371ad5860836a772 @@ -294,6 +294,10 @@ trackedFiles: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e pristine_git_object: 11ea5c6a700e7b92f5cbd29e88e41b834f8b8ef4 + docs/models/authurlresponse.md: + id: df05a2481f48 + last_write_checksum: sha1:6e6e74a9ee75bf37dd08703aca9f8e6a5f95a431 + pristine_git_object: f8401a8e26c3d54aa47a1a6cc265050f0a4afc80 docs/models/basefielddefinition.md: id: f9e0bbae859b last_write_checksum: sha1:28a4d2774231873af97debedcf2fba4f49e83bf2 @@ -304,8 +308,8 @@ trackedFiles: pristine_git_object: 2a5e7515a0edc3f1a5de68ba28eae8bdec988bb1 docs/models/basetaskstatus.md: id: b709621d5c71 - last_write_checksum: sha1:3f78b970cb0c8ba22f100af3b8b6e1730a4f86f7 - pristine_git_object: 8fad1e10f1b631d75303dbd8a977f37cacd26a33 + last_write_checksum: sha1:19fd9c3fc71627d758635f9840be4508ffe8e361 + pristine_git_object: bb781fd1afc2b7a3587f1048e8d84d7814c21e51 docs/models/batcherror.md: id: 8053e29a3f26 last_write_checksum: sha1:23a12dc2e95f92a7a3691bd65a1b05012c669f0f @@ -316,8 +320,8 @@ trackedFiles: pristine_git_object: 162e2cff3a1132f2b89e57dcf1bf8b4c403b6453 docs/models/batchjobstatus.md: id: 7e6f034d3c91 - last_write_checksum: sha1:9e876b4b94255e1399bbb31feb51e08691bcb8fc - pristine_git_object: 64617b31488130f94bf47952ccaa4958670473c8 + last_write_checksum: sha1:42bf12df19501db1809543e898e7cf73e3cf2aad + pristine_git_object: 7473cb1f83e47b14598347d7909968b38cfe2b54 docs/models/batchrequest.md: id: b113ca846594 last_write_checksum: sha1:f9dc702c27b8257e008390519df744290e09c4b4 @@ -328,8 +332,8 @@ trackedFiles: pristine_git_object: c862e53730393d65a061ed63a96640859fe74adc docs/models/builtinconnectors.md: id: 9d14e972f08a - last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c - pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 + last_write_checksum: sha1:ad790344ffc177d10a7eff06482c39d722cd7b95 + pristine_git_object: 11dfd48a87d5341883fbcdf2aad1cfff8aed5587 docs/models/campaign.md: id: cc1272bc909c last_write_checksum: sha1:291f6152431f3f14c16df9005a4392907dbf03e2 @@ -344,8 +348,8 @@ trackedFiles: pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 - last_write_checksum: sha1:b894d3408cb801e072c3c302a5676ff939d59284 - pristine_git_object: b2f15ecbe88328de95b4961ddb3940fd8a6ee64b + last_write_checksum: sha1:160ff1297bfbaa9158e575b8bd7ab573533c8f9f + pristine_git_object: c289272622b137541843bb4ba9654d0e1405ffec docs/models/chatcompletionevent.md: id: fc1097c5bfe2 last_write_checksum: sha1:ef1f417581e943503acb38b503aedde3e157d934 @@ -364,8 +368,8 @@ trackedFiles: pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:98ea9e1011aa7c27ff28f4bcc44d0c2f1a75a284 - pristine_git_object: d119d0cc28bd0b2f58838d06f251348f2dfa6248 + last_write_checksum: sha1:9979175951fd1540db1660f0c3494217b80cde61 + pristine_git_object: d335f908276165dfc7d1b92f55ff246fcf6d2e8a docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -384,8 +388,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:2370e3e1175b08cc828619094a94237776f1d127 - pristine_git_object: ecb8309e3f0506de17e5cac7bdc23e0ef497e70b + last_write_checksum: sha1:213564d7a2848ad3d390419c7e12a6b11c79982a + pristine_git_object: 9d50902fe8205ab7fc646074509a1ebf5e480eab docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -456,16 +460,16 @@ trackedFiles: pristine_git_object: 438a35d9eb0e4250a9e6bcbb7dafeb26d74e018a docs/models/classifierfinetuningjobdetailsstatus.md: id: 87737e85b845 - last_write_checksum: sha1:2ff02df3efee0f9b5867045d43fc71025fb37129 - pristine_git_object: 058c65832188f7148d96ab320114d984d618efa1 + last_write_checksum: sha1:aad42f83c0ad41e64179d8e1d4c86f798bb3de51 + pristine_git_object: 3c6b1f52851559210efa6575832647d838aa80b0 docs/models/classifierfinetuningjobintegration.md: id: 91de20176a8c last_write_checksum: sha1:e49a7c082300eb4d3106e96b21ebc6860060b8c3 pristine_git_object: 820aee4c6fcf899341d869d796b1a61d4d4eab42 docs/models/classifierfinetuningjobstatus.md: id: e3c4e672dc88 - last_write_checksum: sha1:1bfd306ab633d3ea73272e56796c1f63843fce22 - pristine_git_object: ca829885de056c5ccafec0fe3a901743e56deb0c + last_write_checksum: sha1:7e33e8aa5e3c859ad992f198ae5789160874ef94 + pristine_git_object: c25d73a64d76a9cfded403a1ba84f2d3c5771a39 docs/models/classifiertarget.md: id: 4c5c0b3e0bc7 last_write_checksum: sha1:ad16823def0acb267543c4189df32406a27685aa @@ -520,8 +524,8 @@ trackedFiles: pristine_git_object: c6bd67cde1d1628aa3efc4a53fa8487a009aa129 docs/models/completionfinetuningjobdetailsstatus.md: id: b1b717a4e256 - last_write_checksum: sha1:97c8699f0979978ea4320da3388e18da6219cb87 - pristine_git_object: 94d795a9ba4ec743f274d4ab5666e8897d174c61 + last_write_checksum: sha1:bcb7e6d9345ba6eea99dc8e0d3b5e2de959e8a7a + pristine_git_object: 6c7a097932391e0524c15c50f989c9d4803aee22 docs/models/completionfinetuningjobintegration.md: id: 392ffc2cdef2 last_write_checksum: sha1:53540da44e0edbad5d4085f81ded159dbc582a6c @@ -532,24 +536,24 @@ trackedFiles: pristine_git_object: 54225e27204b703a6b33d2d66492e272559c3b3c docs/models/completionfinetuningjobstatus.md: id: 2ac420312815 - last_write_checksum: sha1:90f498cb04e89e8f4a424762c07231fd9030b326 - pristine_git_object: db151a1bd871a2bf231424a78c8c450b2a488099 + last_write_checksum: sha1:9cd1aec6125060ed45296636592818bf2ce2f2a8 + pristine_git_object: 1fd78b9dd551168e6dc32d737dfd3d5731002725 docs/models/completionresponsestreamchoice.md: id: d56824d615a6 last_write_checksum: sha1:0296a490df009dbfd04893fdebcc88dd6102a872 pristine_git_object: 1532c25b8fc065d486f52d4610a7f757e5340875 docs/models/completionresponsestreamchoicefinishreason.md: id: 5f1fbfc90b8e - last_write_checksum: sha1:20824b4a223cbd3658b32440973a7d47dcd108b9 - pristine_git_object: 0fece473297227c75db4e7ded63417a2f117cac0 + last_write_checksum: sha1:892588ab61324c6328100e402f1b219959ff4097 + pristine_git_object: 3e8c30ec1199363880991e0f8c631d32bb84a980 docs/models/completiontrainingparameters.md: id: b716b0195d39 last_write_checksum: sha1:1d8d7c469f933ea741ec15c8b9ef8b986e0ca95e pristine_git_object: 4746a95df18c78331f572425a16b2b3dcbc2df4c docs/models/confirmation.md: id: 19b9e48a3c2e - last_write_checksum: sha1:eb6494cb19f23c6df62afb009cc88ce38d24af86 - pristine_git_object: fd6e6aaa58cabba0cdec1b76ac50fb6e46f91b07 + last_write_checksum: sha1:6e199c756ce35e2bff3b67df5d97b4520518b271 + pristine_git_object: c87093846ca27940a08318fb090c60ce56a00651 docs/models/connector.md: id: cbf7c2c53983 last_write_checksum: sha1:477e81b9e908f8c40e22cffcf4e7cd6ae38fe34e @@ -566,6 +570,10 @@ trackedFiles: id: 8d5621ba6395 last_write_checksum: sha1:881b88b2e0788f7c16938115a6cada5f0ebe144b pristine_git_object: e50c7296f28bbf48daf724af3c848a50e8424ad7 + docs/models/connectorgetauthurlv1request.md: + id: 8a02a6af19ab + last_write_checksum: sha1:ab5433de19756f65450c4fa140a97198f35863dd + pristine_git_object: d041e0c23890973aea61f03901c73caf87d21e5a docs/models/connectorgetv1request.md: id: 844c1f489684 last_write_checksum: sha1:e36ac8ff28ee258340868f8aa4f3172ed3b82ef3 @@ -616,20 +624,20 @@ trackedFiles: pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 docs/models/conversationappendrequest.md: id: 722746e5065c - last_write_checksum: sha1:c8a4a49f0a1fe5cdd2ef6264ef9c600cfc8f7beb - pristine_git_object: 78a96508e4e1c6f83de4556d0bfa3b10c875da37 + last_write_checksum: sha1:dbf638146381f10f00f8391fb6c7dac7f7cfb860 + pristine_git_object: 471fcc31a964e7aa6fbd3db59fd4a892f5a8a67e docs/models/conversationappendrequesthandoffexecution.md: id: e3f56d558037 - last_write_checksum: sha1:dc71c8db746bb08f6630e995cf6af9fda747e954 - pristine_git_object: 7418b36a55fab959639aec456a946600eb908efb + last_write_checksum: sha1:1290b8ac33f16e1cb22314469f2d739b3c525eae + pristine_git_object: 70cef2ede8392519f4c50cd695f8788cc6f81200 docs/models/conversationappendstreamrequest.md: id: e9f8131435e8 - last_write_checksum: sha1:3afe7eaafbf61abcd9341ee8fbca5c6d0c2db0ab - pristine_git_object: daea9c522a8a0693edce11b1bbeca1f2cba0781e + last_write_checksum: sha1:9a65015064014693b30ad789af8052fc99bca730 + pristine_git_object: a54d5d3e91c9fcb3819a93dee8ef177ff745e5aa docs/models/conversationappendstreamrequesthandoffexecution.md: id: 5739ea777905 - last_write_checksum: sha1:c85584b63c0c5d859ee5d46d6ae167a8ee44e279 - pristine_git_object: 1bbced3e61a521401ae93a7b1f73d0e9c061e5fd + last_write_checksum: sha1:f341a41c54f52a06f5ce748f7210cd33b3d0474d + pristine_git_object: dea519789f6493687a3f67a972757435ebf236b2 docs/models/conversationevents.md: id: be63cc7c526e last_write_checksum: sha1:1667c767ef53fd7aef90452fde2a8245ed2b2ae6 @@ -656,16 +664,16 @@ trackedFiles: pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:bfb3664fa8011fb44786d6e5c32cd5c0eed3058d - pristine_git_object: 903d13c1d92d31aa7db836bbd796fe0875892219 + last_write_checksum: sha1:fff53e06f2409c4de6fa8f6a56efad5c165b7685 + pristine_git_object: 6a5dc206ecd4bb115647270adfebcc955b59dcb8 docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 pristine_git_object: 9f2518211256762d03dec12c4c4464d48f7ed52c docs/models/conversationrequesthandoffexecution.md: id: 9733b1e121d1 - last_write_checksum: sha1:f7df210a46acf24abb1312123aebe9e595a190e8 - pristine_git_object: e7314f7e0080ff3f1a80afdbb229c78df5b008bb + last_write_checksum: sha1:a272071fc088868920874ac89efc6b2f320a8044 + pristine_git_object: de9dc287e1f885ad247b2b79517f127b1b147a38 docs/models/conversationrequesttool.md: id: bd1bb6fcea8b last_write_checksum: sha1:9c04dc1c7401b775671130cce7a1d85fbdf35957 @@ -680,44 +688,44 @@ trackedFiles: pristine_git_object: fe8ad1b5f8f3a48b48b9e2d09814af7df0ed3788 docs/models/conversationrestartrequest.md: id: 558e9daa00bd - last_write_checksum: sha1:40ca7ee3ad13bf14f19816a6f54e44a4088f8317 - pristine_git_object: 08f47bba0663f5d7ea4d9c8d604814de095c1c87 + last_write_checksum: sha1:0f7b4fdb5c945bbe8e49857965756c6bdc6f5ce4 + pristine_git_object: be0f2289b02395c888391b6f7e8e657c49343d47 docs/models/conversationrestartrequestagentversion.md: id: e6ea289c6b23 last_write_checksum: sha1:a5abf95a81b7e080bd3cadf65c2db38ca458573f pristine_git_object: 019ba301411729ec2c8078404adae998b3b9dacd docs/models/conversationrestartrequesthandoffexecution.md: id: faee86c7832c - last_write_checksum: sha1:44728be55e96193e6f433e2f46f8f749f1671097 - pristine_git_object: 5790624b82ce47ea99e5c25c825fbc25145bfb8e + last_write_checksum: sha1:1e94d552a7f00bbfa4ca2847b927ee0cd11b64f1 + pristine_git_object: 4e202d69ae83fa11798c8b88a34a0246a3d764fe docs/models/conversationrestartstreamrequest.md: id: 01b92ab1b56d - last_write_checksum: sha1:4f1ed18522112ed6b2c2f5def38b418d0c04dab3 - pristine_git_object: 3ad739aa8d254dba746590245e8490268c71dc51 + last_write_checksum: sha1:768a1d573b5fa034fefcf74e0ae9bc16f6558025 + pristine_git_object: f99a6e3404aea78062d2fd86652649ffd0f03d98 docs/models/conversationrestartstreamrequestagentversion.md: id: 395265f34ff6 last_write_checksum: sha1:ebf4e89a478ab40e1f8cd3f9a000e179426bda47 pristine_git_object: 9e0063003f1d8acce61cf4edda91ddbc23a3c69d docs/models/conversationrestartstreamrequesthandoffexecution.md: id: 3e9c4a9ab94d - last_write_checksum: sha1:300e197f11ad5efc654b51198b75049890258eef - pristine_git_object: 97266b43444f5ed50eeedf574abd99cb201199fd + last_write_checksum: sha1:41587c4d9516da340a0d55f79cdf9370bca9f4fa + pristine_git_object: 9d2c5633820affc1e265367f7e392ec5ffc35468 docs/models/conversationsource.md: id: b50fdc875f45 - last_write_checksum: sha1:7a3fd66a8fa02456465f6218559a73bf9ae5413e - pristine_git_object: 12bf7c1fa98223675c6b27f6010d05c9b78e7017 + last_write_checksum: sha1:9c5bbff0c90b33609939b6455be62e85e682eebc + pristine_git_object: ee88d9d4631c62e2845294950cc7e787316bf461 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:bfa762698bd078c1a046e0f17d0316299ae11288 - pristine_git_object: 8debea1c3e036e2fa7d21e6aa5f2883173b4988a + last_write_checksum: sha1:5e9f0e779acc11017dbce26e1a4d2be179cdca99 + pristine_git_object: af50989c156f08ea1781d2767be422662945e9c2 docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 pristine_git_object: 52ee96720abbb3fec822d0792dbde7020f9fb189 docs/models/conversationstreamrequesthandoffexecution.md: id: e6701e5f9f0c - last_write_checksum: sha1:ef2ebe8f23f27144e7403f0a522326a7e4f25f50 - pristine_git_object: c98e194c1d204c3a5d4234f0553712a7025d7f85 + last_write_checksum: sha1:05c7e19550d5c79d59a180422b49e710415fbf46 + pristine_git_object: 247bfd23c034c3e4c5c497e9e372c7ea8fea0dc0 docs/models/conversationstreamrequesttool.md: id: 71df6212ff44 last_write_checksum: sha1:04f89a30daec9bad78f99d0bcf28c8a717fc7833 @@ -880,8 +888,8 @@ trackedFiles: pristine_git_object: 102fca261d4ada514a7df14415383c1da9e59782 docs/models/embeddingdtype.md: id: 22786e732e28 - last_write_checksum: sha1:dbd16968cdecf706c890769d8d1557298f41ef71 - pristine_git_object: 01656b0a85aa87f19909b18100bb6981f89683fc + last_write_checksum: sha1:1f348c1b3dba72dd710c1eee3953556d051366f8 + pristine_git_object: 301585b20b8e5c433dbff021782a543c599e6115 docs/models/embeddingrequest.md: id: bebee24421b4 last_write_checksum: sha1:087230e81cfbbc539edc7cc1c0a490728276d217 @@ -900,12 +908,12 @@ trackedFiles: pristine_git_object: 20b50618ac99c63f7cf57fe4377840bfc1f85823 docs/models/encodingformat.md: id: 066e154e4d43 - last_write_checksum: sha1:8d6c4b29dea5ff7b0ae2b586951308fad99c60eb - pristine_git_object: 7d5941cfe6cea2e85b20d6fb0031e9b807bac471 + last_write_checksum: sha1:cc98abdb803d374146f58a6811c9e3f2b58ff5f3 + pristine_git_object: 8bc9e8c6bd3fdc8bd5a28edb381c662e74c86e72 docs/models/entitytype.md: id: 130a2f7038b0 - last_write_checksum: sha1:01c3c10e737bcd58be70b437f7ee74632972a983 - pristine_git_object: 7c040b382d4c1b6bc63f582566d938be75a5f954 + last_write_checksum: sha1:506be1dd51ec1f429246390757cbc0676677bd82 + pristine_git_object: 44fb9d6b281bd052273db94cbd60230e732e98a1 docs/models/entry.md: id: da9a99ab48ab last_write_checksum: sha1:4971db390327db09f88feff5d2b8a0b1e6c5b933 @@ -964,8 +972,8 @@ trackedFiles: pristine_git_object: 18217114060ac4e4b45fefabace4628684f27e5c docs/models/filepurpose.md: id: ed6216584490 - last_write_checksum: sha1:02767595f85228f7bfcf359f8384b8263580d53a - pristine_git_object: 14cab13ee191ae60e2c5e1e336d0a5abc13f778b + last_write_checksum: sha1:c38460a32b8a0a21aab0a298d62e5a26cde2339b + pristine_git_object: af6dc9fa4e02b1d385595a76b62721e214fb0c85 docs/models/filesapiroutesdeletefilerequest.md: id: 7fdf9a97320b last_write_checksum: sha1:411e38d0e08a499049796d1557f79d669fc65107 @@ -988,16 +996,16 @@ trackedFiles: pristine_git_object: 961bae1f51a4ae9df21b28fd7a5ca91dc7b3888b docs/models/filesapiroutesuploadfilefilevisibility.md: id: 7b934c9d9d25 - last_write_checksum: sha1:10c16a937f01a3eaa6b508ef2b8b4c99d968ed9e - pristine_git_object: 055f071b90f9a9d0e744f4fe1b4bead3e4647bf2 + last_write_checksum: sha1:5ae94156f76a9fc6aab082c29c0163eb8e182e11 + pristine_git_object: c1f89309c4233d5af34b6f2b71cc48bc8e94e487 docs/models/fileschema.md: id: 9a05a660399d last_write_checksum: sha1:e69c38d738bfba7e1d7cb5938c17fcbc56fecf4c pristine_git_object: 154548404d257f0b7339e2e3e74d2dcc23a98a4d docs/models/filevisibility.md: id: 2cdcd7761007 - last_write_checksum: sha1:61af0b14a6b504e9383cd7d68ad66eb0abc84e5f - pristine_git_object: 4ed11692a8773cb06edbfcd0b4afb14766d6807a + last_write_checksum: sha1:b63a786a0f73b0271e9eb2c70200939ebd9f13a7 + pristine_git_object: 4e6c9ed95a982f198a9efab4a841a41a23f0aad9 docs/models/filtercondition.md: id: dd561c647715 last_write_checksum: sha1:5ead258c0e3905e8a10b16e4e5b9b267e3a12747 @@ -1036,20 +1044,20 @@ trackedFiles: pristine_git_object: 5a9e2ff020d4939f7fd42c0673ea7bdd16cca99d docs/models/finetuneablemodeltype.md: id: e16926b57814 - last_write_checksum: sha1:52006811b756ff5af865ed6f74838d0903f0ee52 - pristine_git_object: 34b24bd4db1ad3f9e77e2c6a45a41d2fbc5cf7fd + last_write_checksum: sha1:8a107793e370a8dfc1e85e165dc9b18aeefc9460 + pristine_git_object: 9ec9634f0b486728071c4c360119508408c1d316 docs/models/finetunedmodelcapabilities.md: id: 3a6a0498ccf7 last_write_checksum: sha1:82fc7d3f4e0b591b757f202699bb645bc61c69ff pristine_git_object: d3203a2adccb7eb89c58395952c3e5a123a5b31b docs/models/format_.md: id: a17c22228eda - last_write_checksum: sha1:dad6de59fec6378d50356007602e2a0254d8d2e4 - pristine_git_object: 97d286a4ed7cff0a4058bbfa06c4573428182876 + last_write_checksum: sha1:72d2d0549cd18ea564007a268c13bfd1eba219ec + pristine_git_object: 5bf1ed0cfa19f2edd4c6a1a7c66c7f093043a700 docs/models/ftclassifierlossfunction.md: id: b546cfde5aa6 - last_write_checksum: sha1:752d9d238a90a3ef55205576fa38cee56ea1539e - pristine_git_object: 919cdd384315c99d4b590bc562298403733344ce + last_write_checksum: sha1:6d0c38aeb4e69eae579b0e65e2769c6ae8dcb30d + pristine_git_object: 36d3db18679569d21e6bacfe13bcd22715372297 docs/models/ftmodelcard.md: id: 15ed6f94deea last_write_checksum: sha1:5873780bc2a828f1164818eb9c64c3f69c6618cc @@ -1072,16 +1080,16 @@ trackedFiles: pristine_git_object: f1f6e39e724673556a57059a4dbda24f31a4d4b9 docs/models/functioncallentryconfirmationstatus.md: id: 18f36160d744 - last_write_checksum: sha1:cc3ea4e03d26a1b22f94d42a87bd5ae63535d266 - pristine_git_object: 8948beb6d9ac647ada655960284dfc7f6d1f5ca1 + last_write_checksum: sha1:3dc2f763ea0d74ebc781de4bf9e1b4e8d50382fc + pristine_git_object: 91231a0afa9b107636ca1446886ff2939d8dba5a docs/models/functioncallevent.md: id: cc9f2e603464 last_write_checksum: sha1:58c6ee00af0c63614fd7506345977f9f2d8838ec pristine_git_object: 0e3a36d6045a69e96c40836cdb586424225775af docs/models/functioncalleventconfirmationstatus.md: id: a33cc7957407 - last_write_checksum: sha1:36ac2d3442d83cbb1256e86f413134296bf8e90f - pristine_git_object: 4a3c8774d4eec4e1f5fea23a1827082e09f91669 + last_write_checksum: sha1:8cdbace8d072cd259dd11cc306b8c077065780a6 + pristine_git_object: 95bebe968adb78710b68ef68a3bee86b16673a9a docs/models/functionname.md: id: 4b3bd62c0f26 last_write_checksum: sha1:754fe32bdffe53c1057b302702f5516f4e551cfb @@ -1188,8 +1196,8 @@ trackedFiles: pristine_git_object: 5145469e26759e7df9477dce921c800b70af424b docs/models/imagedetail.md: id: f8217529b496 - last_write_checksum: sha1:fdf19ac9459f64616240955cb81a84ef03e775c8 - pristine_git_object: 1e5ba3fd405a14e5e2872cc85504584dca19b726 + last_write_checksum: sha1:f19cce37f0bdaa8c4e797690de19f01374ee4086 + pristine_git_object: bd7ea1fe08f2fcc737d6951a44584e22578ed9ba docs/models/imagegenerationtool.md: id: d5deb6b06d28 last_write_checksum: sha1:a1813ef99e4a0990fd073bb2311c475e88072029 @@ -1288,8 +1296,8 @@ trackedFiles: pristine_git_object: 23c52c342358ea889b25ee7b18b381b68519c6cf docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md: id: 8545ffb587d6 - last_write_checksum: sha1:bbc08ca53c2da180b96ed0347cf4954410c79311 - pristine_git_object: 40d57686aec11d9bdc4c116ea4c98183e0a6414c + last_write_checksum: sha1:97fd42195fa792d504b5adc89e4fd159ac5416b9 + pristine_git_object: 1436f6aef8b2a3c26bd084e7916f6a104bf9ddcb docs/models/jobsapiroutesfinetuningstartfinetuningjobrequest.md: id: b4e2b814d8c3 last_write_checksum: sha1:f13b5c8f2e74cc73b58a30d366032c764603f95e @@ -1356,8 +1364,8 @@ trackedFiles: pristine_git_object: 4abeffa50be5eb60802391062302e9106f1ccfd0 docs/models/judgeoutputtype.md: id: 49623b360404 - last_write_checksum: sha1:2bb675f4824785fdce67918e698eeec682a59e5d - pristine_git_object: 6e9dfd7200de7457590b9f68c2e95361e4ebf128 + last_write_checksum: sha1:d47557ab8f7ae50d94c597ea2e827b1e5a603a90 + pristine_git_object: 35a1a8373a8c072d90d7e93264209bd894ed92b5 docs/models/judgeoutputunion.md: id: 636200cea9aa last_write_checksum: sha1:382aa75d840423705f9477cb77ca2a5832a1ee69 @@ -1552,8 +1560,8 @@ trackedFiles: pristine_git_object: 7f86303651650177ece51b82d867cab858e830ae docs/models/mistralpromptmode.md: id: d17d5db4d3b6 - last_write_checksum: sha1:abcb7205c5086169c7d9449d15ac142448a7d258 - pristine_git_object: c3409d03b9646e21a3793372d06dcae6fef95463 + last_write_checksum: sha1:d7804c45f10f2e929276d4a00bf6c2b966a78fb5 + pristine_git_object: 9b234e3ea8fc13261897acf18ce4da3b14485f72 docs/models/modelcapabilities.md: id: 283fbc5fa32f last_write_checksum: sha1:98df9700314cc4ee6051e0e18d22dfaacb0ad648 @@ -1576,8 +1584,8 @@ trackedFiles: pristine_git_object: b44e84a00d0c54f8df78650d45de0a409c901048 docs/models/moderationllmaction.md: id: 26373b4ad9cd - last_write_checksum: sha1:da6507feedd7db7e8e0c0d5ca3428e3f5a3aee9a - pristine_git_object: 951880b61ec0e40c30c427f9c2b5f68c5a89a7e2 + last_write_checksum: sha1:d8398d9c6b0da5f6a9947342c2cfc2d04e599519 + pristine_git_object: e46a30b4c3737fa2098d2502b896edb2c950b2c8 docs/models/moderationllmv1categorythresholds.md: id: b474ca28a6e7 last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 @@ -1612,8 +1620,8 @@ trackedFiles: pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:cba4ebf5b8b3007046c124504e1472bcd464f109 - pristine_git_object: 0c387f570c7b96c402c0e3d60108ee4cdcb22764 + last_write_checksum: sha1:406db6551a5ee4efba4b876239245c71f0d93822 + pristine_git_object: d121b2641c0f58c62c3b3cc73c5fdffe5e7c1d92 docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -1648,12 +1656,12 @@ trackedFiles: pristine_git_object: d9d79125cb02bc2b09d8dc543a5e2d4a6c55571c docs/models/op.md: id: 4f953e6b890f - last_write_checksum: sha1:ca76665f125d37edbcf87a36a2aaafdb722d03a4 - pristine_git_object: fa3e2f3a9e437f6bd82ad87e1589484392ccb68c + last_write_checksum: sha1:24b06144f98d9843f99402c3dc890fa911646e52 + pristine_git_object: da9031db6360c37490c3b30f9608bfb9776c38ca docs/models/operator.md: id: 1b6d3fc58add - last_write_checksum: sha1:e1008f48087ee8da75dd25be6207f7b2098fe131 - pristine_git_object: ca54debcf338366f66c540fdb2020e85959ef5b9 + last_write_checksum: sha1:98ac05cdbd6839c9ff93c4d805eebd7ba9f26dcd + pristine_git_object: 2790c574454daba86720666a2877ffa4467a4134 docs/models/option.md: id: b70901c8beab last_write_checksum: sha1:aeac15a068312b38625c3efcd08f5f179f607f92 @@ -1664,8 +1672,8 @@ trackedFiles: pristine_git_object: 2a2172695146be50782a3ef32815950d4829cf64 docs/models/orderby.md: id: 9e749ed80f72 - last_write_checksum: sha1:6ec002e3e59f37002ccb14e347b790ca4daef773 - pristine_git_object: bba50df10855a8d6acdf4b061ec2ffeb0279fd7f + last_write_checksum: sha1:4f6dd8e684dd11e4856d3d6cf2c0f2e2d1a01640 + pristine_git_object: d778621f6b1e6788aecbe25bd741d27a0d863990 docs/models/outputcontentchunks.md: id: f7e175c8e002 last_write_checksum: sha1:5094466110028801726cc825e8809f524fe1ee24 @@ -1736,8 +1744,8 @@ trackedFiles: pristine_git_object: 514caa50e524ae5afab802b8394cb27189b2bfbe docs/models/processstatus.md: id: "336054835357" - last_write_checksum: sha1:9b87de1980428307af6c29c2086c0e1f612ebd72 - pristine_git_object: 3a9c004e55cc31abb52d1f0bb450290465d42a1c + last_write_checksum: sha1:43253d2ef4badf3a5e8e5981becfb558c934359a + pristine_git_object: 68313743c4d926b2cb29037d0e59a2f9d8d25f1c docs/models/realtimetranscriptionerror.md: id: 4bc5e819565b last_write_checksum: sha1:c93e4b19a0aa68723ea69973a9f22a581c7b2ff6 @@ -1782,6 +1790,10 @@ trackedFiles: id: 3ddd5a95510a last_write_checksum: sha1:33bca4d547ca812d55ac49bf7b17851b2fecfc80 pristine_git_object: d6c6547d7895e53be15a0cce46b6524178acc3bc + docs/models/reasoningeffort.md: + id: c8fd630d3f07 + last_write_checksum: sha1:1419a2647967fd29a098941e8ca3d5d874ee6c71 + pristine_git_object: e0b17c8ba4d4f75b14f7dea9559514bde37ccb89 docs/models/referencechunk.md: id: 07895f9debfd last_write_checksum: sha1:3d35227a4f7612301fd5f17a445c4c2b712f0bf1 @@ -1792,8 +1804,8 @@ trackedFiles: pristine_git_object: f9769645cbbb8a59c30f60a4e0d0caec60d82ad0 docs/models/requestsource.md: id: 8857ab6025c4 - last_write_checksum: sha1:4b7ecc7c5327c74e46e2b98bd6e3814935cdecdf - pristine_git_object: c81c115992439350d56c91d2e3351a13df40676b + last_write_checksum: sha1:5634447d01c483713dad3d6d39df182007e6181b + pristine_git_object: b710cc1f394e04ecc93c9fc6daddddec366254ad docs/models/resource.md: id: 94a32a903140 last_write_checksum: sha1:0c141e37497f5b07d2da77a41777617ed3653582 @@ -1804,8 +1816,8 @@ trackedFiles: pristine_git_object: 074c573e64e98cbaf177fde279364f26df04a2bf docs/models/resourcevisibility.md: id: 891d464e9c47 - last_write_checksum: sha1:acf48cc74f27035f479f976e73897ea02d7eaaa8 - pristine_git_object: 9c06af2d034cb7de730aa39aa3a3188aac4bc764 + last_write_checksum: sha1:cb0eaebe4e984ab4d999745a142868d2359ab8e4 + pristine_git_object: 970211bb11b10aac688084845d1172e65d1ced1d docs/models/response.md: id: 583c991c7a30 last_write_checksum: sha1:0791cb4aa4045708ab64d42bf67bd6ab74bc7752 @@ -1824,8 +1836,8 @@ trackedFiles: pristine_git_object: 5cab22f2bf1c412699f6a7ed18ef801ecbc3ee4b docs/models/responseformats.md: id: cf1f250b82db - last_write_checksum: sha1:105e1f9181913104b554051838cbdd0f728aa2c4 - pristine_git_object: 2f5f1e5511b048323fee18a0ffdd506fe2b3d56f + last_write_checksum: sha1:c7fedb61c8c40d4ff6bebefa37133668e5a8582d + pristine_git_object: 12e5edd7ffaa05000f26cab5e92a7ea1570a94f9 docs/models/responseretrievemodelv1modelsmodelidget.md: id: 6143ec73bdd6 last_write_checksum: sha1:6bae62cbb18559065a53f0acdacb1f72f513467e @@ -1844,12 +1856,12 @@ trackedFiles: pristine_git_object: f1280f8862e9d3212a5cfccd9453884b4055710a docs/models/role.md: id: b694540a5b1e - last_write_checksum: sha1:c7ef39a81299f3156b701420ef634a8b4fab76f0 - pristine_git_object: 853c6257d9bdb4eda9cb37e677d35ab477dca812 + last_write_checksum: sha1:dd140bf891a9b08db014fde4a99af28839e10dfb + pristine_git_object: b16f5c3baef6a17d3900b3eddcc5034e37a12b01 docs/models/sampletype.md: id: 0e09775cd9d3 - last_write_checksum: sha1:33cef5c5b097ab7a9cd6232fe3f7bca65cd1187a - pristine_git_object: 34a6a012b1daeeb22626417650269e9376cc9170 + last_write_checksum: sha1:b77964a7b39ec1b74f70925a39c30b23fad6ac43 + pristine_git_object: 31f26c3c2869a453306fff5b062b40e95aa5f19a docs/models/searchchatcompletioneventidsrequest.md: id: ace22de1b563 last_write_checksum: sha1:0368a82e5b6399806252670aec01714e5bb78331 @@ -1872,8 +1884,8 @@ trackedFiles: pristine_git_object: 2e0839d06f821dd97780dc22f202dedf23e4efe1 docs/models/shareenum.md: id: 53a713500576 - last_write_checksum: sha1:9d45d4bd272e6c146c3a8a21fd759acf2ae22148 - pristine_git_object: dc5d2b68a810c2983b5a47fbff747dfc2cc17598 + last_write_checksum: sha1:de5c59ca89596a3b28134a9f7318fed3b3e6af02 + pristine_git_object: d471b7c3c6700146dc02e20d3aa6205a5025d134 docs/models/sharing.md: id: 9f1e88417a87 last_write_checksum: sha1:876fd514d08a6987646bf0fec636bf3fef89155b @@ -1888,16 +1900,16 @@ trackedFiles: pristine_git_object: 21b8ec1f74c1f903aa087cd3b4d13918c0ea9dad docs/models/source.md: id: 6541ef7b41e7 - last_write_checksum: sha1:d0015be42fe759d818ebd75b0cec9f83535a3b89 - pristine_git_object: bb1ed6124647b02c4350123bf257b0bf17fc38fd + last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 + pristine_git_object: 37ca338b6f2ba9d10209cbcd3c680b7589589767 docs/models/ssetypes.md: id: 6a902241137c - last_write_checksum: sha1:567027284c7572c0fa24132cd119e956386ff9d0 - pristine_git_object: ae06b5e870d31b10f17224c99af1628a7252bbc3 + last_write_checksum: sha1:6291d6bc7cbcd7640b83b03ac8ce353b95c1f913 + pristine_git_object: 372eafee6f22105d6f5fd31f2e04ea04f5abe641 docs/models/supportedoperator.md: id: 000f0770e0f9 - last_write_checksum: sha1:7702df7346f66b739b5a7e1d26b2d5ebc9d19c74 - pristine_git_object: 74cf9b8e6705059a24e7d1d0e311943ed1ce5c40 + last_write_checksum: sha1:ea71b0062712f8750234d8bd5313063589de1155 + pristine_git_object: 97dbd4b14b71389273583d142009548abca92e1f docs/models/systemmessage.md: id: fdb7963e1cdf last_write_checksum: sha1:c7603c5ce77ba2bcbda9eff65eeafdb1e9ecbec7 @@ -1912,8 +1924,8 @@ trackedFiles: pristine_git_object: 40030c170746d9953d25b979ab7e6f522018e230 docs/models/tableformat.md: id: d8cd08c55c3c - last_write_checksum: sha1:e0736ea9576466d71821aa1e67fc632cc5a85414 - pristine_git_object: 54f029b814fdcfa2e93e2b8b0594ef9e4eab792a + last_write_checksum: sha1:3ef23d504527602f2d0789d2cfb1a6629115f41a + pristine_git_object: 8321a3090910115b586be900bcf23da5baf4c245 docs/models/textchunk.md: id: 6cd12e0ef110 last_write_checksum: sha1:d9fe94c670c5e0578212752c11a0c405a9da8518 @@ -1936,8 +1948,8 @@ trackedFiles: pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/timestampgranularity.md: id: eb4d5a8e6f08 - last_write_checksum: sha1:e256a5e8c6010d500841295b89d88d0eface3b88 - pristine_git_object: d20012ea9925446c16c9162304642ba48391d34d + last_write_checksum: sha1:b423f56d3a6004ed89c356806002b2af3e5c5a56 + pristine_git_object: 4c84779c4d2e8bf2a2fe258c2b350b05d047f2e3 docs/models/tool.md: id: 8966139dbeed last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a @@ -1956,8 +1968,8 @@ trackedFiles: pristine_git_object: 373046bbbc834169293b4f4ae8b2e238f952ddde docs/models/toolchoiceenum.md: id: 15410de51ffc - last_write_checksum: sha1:ca0cf9bf128bebc8faedd9333cc6a56b30f58130 - pristine_git_object: 0be3d6c54b13a8bf30773398a2c12e0d30d3ae58 + last_write_checksum: sha1:cdff87c62661fcb902824fda8e305c5b1b98b3d8 + pristine_git_object: eb1f36298acfc2c3aa33224e95c87f17da9caf0d docs/models/toolconfiguration.md: id: 06bfa2c4e662 last_write_checksum: sha1:9b619977375f228c76f09d48d6e2833add6c07e2 @@ -2020,8 +2032,8 @@ trackedFiles: pristine_git_object: 999f7c34885015a687c4213d067b144f1585c946 docs/models/tooltypes.md: id: adb50fe63ea2 - last_write_checksum: sha1:f224c3d8732450b9c969b3e04027b7df7892694c - pristine_git_object: 84e49253c9b9bd1bd314e2a126106404cbb52f16 + last_write_checksum: sha1:d0d67b717773cbc99add6716e0287e64f04d24df + pristine_git_object: 345ee7dc07187e1ee06726ec63ffb75e1a34e736 docs/models/trainingfile.md: id: 4039958e8930 last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648 @@ -2048,8 +2060,8 @@ trackedFiles: pristine_git_object: eea8e9281634c56517e28f613afee38e0b0846ad docs/models/transcriptionstreameventtypes.md: id: 701782e8a63d - last_write_checksum: sha1:ff79dfb5d942c807b03c9e329a254bfa95b99a16 - pristine_git_object: e4eb25a6400dcc5a48b5eb5f65e96f7be91fa761 + last_write_checksum: sha1:7a6fc032e6dd63912472b9158c07cf20ceefe7e3 + pristine_git_object: 9e49384e399f15e70382050ee414a7446d1e4b70 docs/models/transcriptionstreamlanguage.md: id: 5e9df200153c last_write_checksum: sha1:d5626a53dde8d6736bab75f35cee4d6666a6b795 @@ -2064,8 +2076,8 @@ trackedFiles: pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d docs/models/typeenum.md: id: d306d1d601a4 - last_write_checksum: sha1:506e72f893c4cebf7bbeb59fd05fbe5caafdb68c - pristine_git_object: 80a66af314d5ba9f5a99b07f3db9760849edad53 + last_write_checksum: sha1:f0f0bfac75bf5e5fcd972d0cb196961d512d40ad + pristine_git_object: ec47cf9668f839469c9ab71c010f3e1975be929c docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 @@ -2172,8 +2184,8 @@ trackedFiles: pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:506e1f1951252f82f5ef804ec53acbfd9d67f767 - pristine_git_object: 5a47f54e738a99dab0eddff3837effb4e0413ecc + last_write_checksum: sha1:95844e1e50f850f71580e08ed9cd1ffdefa899bc + pristine_git_object: 46fb60ef4f92d61b2959f1b67e5f07e5bae55ba7 docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:b4b3123ff210545048e2b0c729f2b7e5f7460f4e @@ -2188,8 +2200,8 @@ trackedFiles: pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:d89d55ed51fe1729187fc4f1376ec21bb53f8120 - pristine_git_object: 64e47d344d1d1b40cfd120a313ecf0551fff3598 + last_write_checksum: sha1:8527d41d1095e052f0b71a9e5f7075f0a722447f + pristine_git_object: 61c8813f3f168bf958edadd985875498e5205497 docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -2200,12 +2212,12 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:1c6650e6d5511bc5eaafb0d05d78805d333f3704 - pristine_git_object: b8150eb85d182af6e7ed8216cc4b4a535271a53a + last_write_checksum: sha1:0b4056d65c780ae2b3a6e4a9ea71ca0c38e7ff42 + pristine_git_object: f23a09f780eaaed4aeb7ee8f4a0347ce5de3efd4 docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:3bc235805eff20efdb634834e11f519a5d09dd47 - pristine_git_object: 0803b39816e5393050f383407f162446eb0d455d + last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 + pristine_git_object: 63cd80a4a655a5c139be79239b0787c3f90cdea9 docs/sdks/datasets/README.md: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 @@ -2284,16 +2296,16 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:ae762d069de61230d0fe491f5194768ca4c53599 - pristine_git_object: 42d3fa9d7791607d6d915253ae1bdb4c0a9032ef + last_write_checksum: sha1:ac9ec8877b23bb3ae3a0e194d80d8ab722604054 + pristine_git_object: 03ef265bdb484ad28dc5d9813c04d71c3a6bdcdf src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:f60f8126ec99df039b1c9480366089a88fcc31bc - pristine_git_object: aecd1430c3b00c05ad2858d47cd70aa455097bb6 + last_write_checksum: sha1:bd526b7613c13f07adee931996ec7fed54e72f26 + pristine_git_object: 2e91dd04aa66e340db8fe61ee8f04abf67798eaf src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:e202d775d24c0303053e0548af83fcb04e2748f4 @@ -2324,8 +2336,8 @@ trackedFiles: pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:16fb3809cfe47630f0a6869dcd2d80a99fc977ec - pristine_git_object: f53c346fec153219910bf9cf5e2ccccc2faadb3c + last_write_checksum: sha1:dced89ea82a30a61e0c62db2f2a0c3be8a7ba099 + pristine_git_object: c11a53d1237c284ff74b5aba791bd405bac2d0ff src/mistralai/client/chat_completion_events.py: id: 1813f339625b last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 @@ -2336,12 +2348,12 @@ trackedFiles: pristine_git_object: 67199b601e38dff6fc6a4317eb845fbde6c25de0 src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:e407ace631bdafb1a0e62e292a4c27e5ce00bc38 - pristine_git_object: 37e018330e85109692a83d97d62a5efe7a15ee6f + last_write_checksum: sha1:80a42736f56e43ad286308010d494e0ed19597f0 + pristine_git_object: b72ca9a39a225cec099f6606afaf4463c294a97e src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:c13593e5cf9c7f7d5b4c32a874a0b8e1212d1e0f - pristine_git_object: 99f3a33e211ce45d8920baa60f0e8bc915cfb50f + last_write_checksum: sha1:cb25436bb3ae12c2f6b215b6d5e9de4e219cbe25 + pristine_git_object: fafcd5f5221d2177962f3d8239abda9a99b5f3a9 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 @@ -2416,32 +2428,32 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:5229fd903cba2fca3054f0444c96155e9b87c92d - pristine_git_object: 82bb5c99a48b483bf0ebb93779fb0d6c2caf165d + last_write_checksum: sha1:b532321abf9e0032f26cdc3dc81af0b6eb1b6839 + pristine_git_object: 7e9c7f60b7b6398e93662f8767ac6a629727233f src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:6bd14cd797a902679111638ede8b3f8a6389ba87 - pristine_git_object: 068b32267ff9305d6431790bccee7b79fce3c1b5 + last_write_checksum: sha1:c650f57616b5455de2a6ff33c51f91b174586aee + pristine_git_object: 36cb26bfc19f17866330d709f82e15555b1a99e5 src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 pristine_git_object: 6972af2a4ae846e63d2c70b733ecd6c8370ee0cd src/mistralai/client/models/agentconversation.py: id: 1b7d73eddf51 - last_write_checksum: sha1:28718fb00dbe74241712b4f7a3fbce2d060f7e86 - pristine_git_object: da30c6634294cdaba459b68ca8877d867ee052fb + last_write_checksum: sha1:2619ac07a5b0642d5ea02b843bf38a7e32ec8cb1 + pristine_git_object: b52f5e5a96c497c731c19f32c6142ee50ed29367 src/mistralai/client/models/agenthandoffdoneevent.py: id: 82628bb5fcea - last_write_checksum: sha1:829c5a152e6d737ffd65a3b88b0b2890e6703764 - pristine_git_object: e2609e3d1fb62b132eb53112eb2bdc4ae855085f + last_write_checksum: sha1:2c8fbb608143ee836e675a0d9610a64b7b8ac99a + pristine_git_object: ea9cd6b2a64e6add14bcf1f87dc5a15f800dde61 src/mistralai/client/models/agenthandoffentry.py: id: 5030bcaa3a07 - last_write_checksum: sha1:c9544755ad6d3a3831f8afe446c6a9a523eb5137 - pristine_git_object: f92ef2cc7310d5df94436f3067a640d3848405f0 + last_write_checksum: sha1:dbbadef3757f8949c63cc0bf91ac8e72a2e42abb + pristine_git_object: 8d1c143eac305c79da8ce4566b51b399da91585c src/mistralai/client/models/agenthandoffstartedevent.py: id: 2f6093d9b222 - last_write_checksum: sha1:c9f86e01497c53f3c1806dbb9fdff6e2d9993323 - pristine_git_object: 2a4023419212fec8b3f0e83d506a25b17408a8b1 + last_write_checksum: sha1:b354f10f57b51aa515932ec403eba7034eaf9e9b + pristine_git_object: 9525bcf65ed318872e038078ec379f87794d6f84 src/mistralai/client/models/agents_api_v1_agents_create_or_update_aliasop.py: id: 23a832f8f175 last_write_checksum: sha1:237d6b4419615c9c26f96d49760732bd7b4617e7 @@ -2460,20 +2472,20 @@ trackedFiles: pristine_git_object: 941863d0f8143020200bb5566ce66d527c4369c8 src/mistralai/client/models/agents_api_v1_agents_getop.py: id: f5918c34f1c7 - last_write_checksum: sha1:b90285965e2aaccaf989e59b8f1db4a53ae8b31c - pristine_git_object: dd17580dd0041a979fc6c9c7349d14a3e200f5d3 + last_write_checksum: sha1:6a420e218b378015507acda1e8eb4de9fc865c06 + pristine_git_object: dee6a3475ff81f773f92f4473410639dacafd517 src/mistralai/client/models/agents_api_v1_agents_list_version_aliasesop.py: id: a04815e6c798 last_write_checksum: sha1:b4b5c4e8566f1d0c68a14aba94b7ffea257fd7ce pristine_git_object: bb1da6020386fabfbd606db9a098a0e9323ce3b0 src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py: id: 19e3310c3907 - last_write_checksum: sha1:6628e9ff747c579e11fa9a756cee3b11c57c476d - pristine_git_object: 54b62e90e23c1782a0b068460d6877cac3b28916 + last_write_checksum: sha1:14f86d6a09a6c3ee8579ef5b3f7ecbf0aa467c40 + pristine_git_object: 25ea29e31693b6352f0ab395b4f21352e46ab037 src/mistralai/client/models/agents_api_v1_agents_listop.py: id: 25a6460a6e19 - last_write_checksum: sha1:0abe889b85470b28917368a2b958a13303bd38f1 - pristine_git_object: 97b1c7f1a070be5e12e1a32ad56dbcfcb0f1cd68 + last_write_checksum: sha1:ff64974c26700e1b32ad90f7b7b8917aef73d985 + pristine_git_object: 100e0da71927900c796e294c5e7438138faaf647 src/mistralai/client/models/agents_api_v1_agents_update_versionop.py: id: 63f61b8891bf last_write_checksum: sha1:e9046cf75e008e856f00dda8725cbb16d83cd394 @@ -2504,8 +2516,8 @@ trackedFiles: pristine_git_object: ef0a4eb084de52d4bde435ee9751aaa12e61dcc3 src/mistralai/client/models/agents_api_v1_conversations_listop.py: id: 936e36181d36 - last_write_checksum: sha1:e3e52cf7967b9b78099db9449cb33e3ded34d111 - pristine_git_object: 8bf66aea23f16734c1f9e03629aaf7246e4e60b4 + last_write_checksum: sha1:dc0da883d6e6d045dc85f74032c50d7ae0c19669 + pristine_git_object: dd6276d9ececa4fd28f179c58adfc5b71043db86 src/mistralai/client/models/agents_api_v1_conversations_messagesop.py: id: b5141764a708 last_write_checksum: sha1:17fd503da7fb20198792c6e25f94dcc0a1e5db05 @@ -2520,16 +2532,16 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:474ae2d3bfcc65c37a61b6ca7d6bcade5f38746b - pristine_git_object: 7d38f6b0559294cc84bdd3cec6d6f5ad67154686 + last_write_checksum: sha1:87237462a5289c5aac2d1ce59b8b766342dd5ccd + pristine_git_object: f4ce34cb614a992f5276a1664d05426b2b16766a src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:7e9782422cb79117bd2b5ea762ec545d42dc0fc8 - pristine_git_object: ea83a8ff5604622951ddca23f5d4596f49c468dc + last_write_checksum: sha1:a449cb9287617ba7337a73777b7ab50479e7cd87 + pristine_git_object: 0feb38038f5aec52bb393c633a0913b99b1579a7 src/mistralai/client/models/annotations.py: id: 3ae9e07de11d - last_write_checksum: sha1:a67ea607358e534448fe556c6008105a8cf89a07 - pristine_git_object: ba085e2c7784ca442c4a5da72dddf3561dda0d9d + last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 + pristine_git_object: f3f5c21c66dd570be71d8d87350ec7683478b545 src/mistralai/client/models/apiendpoint.py: id: 00b34ce0a24d last_write_checksum: sha1:733e852bf75956acd2c72a23443627abfa090b7b @@ -2540,20 +2552,20 @@ trackedFiles: pristine_git_object: 10cbaf589e2a4bc1e63b3a02689e76f4d7f1e88a src/mistralai/client/models/archivemodelresponse.py: id: 2d22c644df64 - last_write_checksum: sha1:d0f67fd2bc5a6e8de4f2b0a5742ceb4a1f7f5ab8 - pristine_git_object: f1116850c8bf0159c4146d4973988ea5d0fe7de7 + last_write_checksum: sha1:e55af09d03586d14e2a52292be9a0d6729f9e1e7 + pristine_git_object: c5ca8ff5d3a571bd8bc936eca1d361d09358b2f5 src/mistralai/client/models/assistantmessage.py: id: 2b49546e0742 - last_write_checksum: sha1:dcfa31c2aac95a0d7bd748e96bd87a5c85c0d1f6 - pristine_git_object: 26a778c70439d21b890e85f2c85dbb560e8bffef + last_write_checksum: sha1:0610c5a58e3aa264ba77f603e75adce29ecbe3c7 + pristine_git_object: f333a44422c7f6114797b63f1faf94e2bc9ef90e src/mistralai/client/models/audiochunk.py: id: ce5dce4dced2 last_write_checksum: sha1:d3c2e28583d661a9583c40c237430a1f63ea7631 pristine_git_object: 68866cd2c3c640cf56258f2f98b8a2385ea6fcdb src/mistralai/client/models/audiocontent.py: id: 8e39736e73f0 - last_write_checksum: sha1:9f96ac9f1b3035b66f0920df1b46a59df7c6bca8 - pristine_git_object: b0a9505b05c9fc27a5562aca4bf2d1de37eb3100 + last_write_checksum: sha1:8ae8d3af5ba655b4766f8710c34c31d8401cc18a + pristine_git_object: 2d38d2a1479327156434a5338229f48d7fae7df6 src/mistralai/client/models/audioencoding.py: id: b14e6a50f730 last_write_checksum: sha1:92ca06dce513cd39b2c7d9e5848cf426b40598ce @@ -2564,56 +2576,60 @@ trackedFiles: pristine_git_object: fef87ae76b31128ebd5ced4278e274c249181c23 src/mistralai/client/models/audiotranscriptionrequest.py: id: e4148b4d23e7 - last_write_checksum: sha1:a6ef85be4ae24aa79c8c3fa9dcaf055e0ba9b266 - pristine_git_object: fe4c79e3427fae3e022bd936236d2934eaa76b60 + last_write_checksum: sha1:ab55d16773cdd9d536999537908d5bb70c642cd1 + pristine_git_object: 734860d52b12c11e007faf8ef5d1c233d2a183c6 src/mistralai/client/models/audiotranscriptionrequeststream.py: id: 33a07317a3b3 - last_write_checksum: sha1:6e648ff58a70a0a3bd63a24676122b80eba4baf7 - pristine_git_object: 2d1e9269b51d84cd8b21643fe04accd00839b013 + last_write_checksum: sha1:c7e404caadd964924bb59372827f702acc7dd3f2 + pristine_git_object: 84c4dbcdf555b057190d53ac5a952b9b566ca3fc src/mistralai/client/models/authdata.py: id: b4d3fb07196e last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe + src/mistralai/client/models/authurlresponse.py: + id: a2b468c87a8a + last_write_checksum: sha1:8ffc0c770c51d7b0cb49770e6829486d0cb82741 + pristine_git_object: 1f5a6639b3fae3a5c96cf35bc4417d5d5151a37f src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:0cd6a43a558734d38fbc39f1120a54c4cc825fe6 - pristine_git_object: f8b8faf759b795c4a9d072c2e4b50a4d22c80f7c + last_write_checksum: sha1:7d7b08ba19500836193c593bacc1dd6982c9ef71 + pristine_git_object: b57ff2cab05c7a2a7f10292ff1c017eb58a10f84 src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 - last_write_checksum: sha1:e911218547dd6ef1679774a451db925de2c0bc61 - pristine_git_object: 6a1c7bc2de3dbc83edf03a3b4ffd3c5b332e1008 + last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e + pristine_git_object: bb3c99ddb4495488b4e058cd32332808d6de08b9 src/mistralai/client/models/basetaskstatus.py: id: 7b381554d5c7 last_write_checksum: sha1:8124cb3871ff7565865cd8b06181b5b0a8eb3428 pristine_git_object: ff2f1c63a6dceceeabe6b8c6bc8bf1a7c64c70a0 src/mistralai/client/models/batcherror.py: id: 1563e2a576ec - last_write_checksum: sha1:51c9e9a4d306c2de45dc0879ade62daed3fc2972 - pristine_git_object: 8a353cd2dc06a8c6f2db3d6b613cfdca8278f57e + last_write_checksum: sha1:3bb5b8a9f479b888efc37cf1ba9731e5efc3d8d0 + pristine_git_object: a0add5ad71b1732849fe89de72227e846b3e3b1b src/mistralai/client/models/batchjob.py: id: 85cd28932cc7 - last_write_checksum: sha1:532a8c6ca8546052159e5e5174cf65ce17a62f3f - pristine_git_object: 80acac336883c23b621d0dc647fef20548bf061a + last_write_checksum: sha1:d9aab4f4058332de7f8e05ddc0719dbc9b054993 + pristine_git_object: 9cef43800cf382fe27d84fa958df493fe9624ea1 src/mistralai/client/models/batchjobstatus.py: id: 61e08cf5eea9 last_write_checksum: sha1:78934183519948464385245cbc89efb68ac00bfb pristine_git_object: bd77faa2fbed74b19a8d3884af6d43bc1b4806e0 src/mistralai/client/models/batchrequest.py: id: 6f36819eeb46 - last_write_checksum: sha1:b2a71163e37a9483e172dc13b6320749bee38f2f - pristine_git_object: 911a9a0554b9b8cb6dedcb3a86a06c39890b875e + last_write_checksum: sha1:f4ed16f0d2fef446bf1b4eb3023d4f38824ffe6d + pristine_git_object: dcc47bd25fd0b790677b3e175b3e62058c970327 src/mistralai/client/models/blobresourcecontents.py: id: fa924bc295ad - last_write_checksum: sha1:2d0d6f84e274e544e2d1535513726f547fc2d1b7 - pristine_git_object: c2a55f95a156006e86f5f945c70bee8025e38fea + last_write_checksum: sha1:e624129b00144d82726a5a2ac5d3a809061b76ae + pristine_git_object: bfae16fb641bbe2c6dfa8c3aab1a042182d9137e src/mistralai/client/models/builtinconnectors.py: id: 2d276ce938dc last_write_checksum: sha1:4ceb3182009b6535c07d652ccf46661b553b6272 pristine_git_object: ecf60d3c1a83028d9cf755d4c9d5459f6b56e72a src/mistralai/client/models/campaign.py: id: c91d862fb405 - last_write_checksum: sha1:def484a2eefa9be72db2bfa63d93201e2a07f554 - pristine_git_object: a52bfcb90d6d8d29f4e23f71c5e95564bf3c95ec + last_write_checksum: sha1:770d93cc4d9b8e23ea781592888be5b811533f21 + pristine_git_object: 62427fa0336eab3448064fc1a7a02427d44e309b src/mistralai/client/models/chatclassificationrequest.py: id: afd9cdc71834 last_write_checksum: sha1:a29088359142ebd6409f45569168b2096014119e @@ -2632,16 +2648,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:0745c53b825bca22c42a943183d8c24641cdb531 - pristine_git_object: a0e1b9ed4ee7324baf818d97bf13004d7370e227 + last_write_checksum: sha1:bcc680ee202ce920823502f59f8549453cf4a999 + pristine_git_object: f1b0b2d61beae2827b9f66331d74850e7c56be91 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:1dd23fea1ccd4871a0c3ed2a35a42d0d2e1bb1c2 - pristine_git_object: 32b49e80ef5e21bfa25801c2ccc95d4f7c0d2565 + last_write_checksum: sha1:dd9dc2cd5d154e7a8e6cff928fe47582e0d4bd81 + pristine_git_object: d9f413c673b030a4ebd1cd363b0376a009b45540 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -2656,8 +2672,8 @@ trackedFiles: pristine_git_object: c24e433eb4787146620fb48b6d301f51a4db5067 src/mistralai/client/models/classificationrequest.py: id: 6942fe3de24a - last_write_checksum: sha1:7bd416d4b0e083efbf9324107263027140702ddb - pristine_git_object: 25b6941355cb9629abb9c0f09fb6fd191c56ffa6 + last_write_checksum: sha1:8b6f78592b6fe5c5a0e686f54ad1f99d3fdb78c5 + pristine_git_object: 4300f9ad559f6a2d87c726fd5f0b82d83e643481 src/mistralai/client/models/classificationresponse.py: id: eaf279db1109 last_write_checksum: sha1:64522aa2b0970e86a0133348411592f95163f374 @@ -2668,72 +2684,72 @@ trackedFiles: pristine_git_object: 6c7d6231d211977332100112900ea0f8cdf5d84c src/mistralai/client/models/classifierfinetunedmodel.py: id: 5a9a7a0153c8 - last_write_checksum: sha1:853bf1b3b941ec3aebeb17ac2caf38fa0dd094de - pristine_git_object: fbcf5892d7f0a3ed8b3872d71dd95ed3a25463d1 + last_write_checksum: sha1:64ba0eff2b87654e569f6a561ce09eb1d7377437 + pristine_git_object: 7c2bfc80c5881319692a54a13a78a479aa47604a src/mistralai/client/models/classifierfinetuningjob.py: id: a244d5f2afc5 - last_write_checksum: sha1:ceb13935702275025284bb77aa8bf5ccf926e19c - pristine_git_object: fb160cf8e16a1b4899f8bb2803b18ba1f55232ce + last_write_checksum: sha1:b65b4bab42100c8e00821e6f81e03d2efe039dde + pristine_git_object: 5a5f8a482b3eca6948bd58a550a81eda36da83e2 src/mistralai/client/models/classifierfinetuningjobdetails.py: id: 75c5dee8df2e - last_write_checksum: sha1:6b3f2f7ca3bd4e089591f5f9c59b7e28a00447f8 - pristine_git_object: 5d73f55ee0f1321fdeeb4db1971e144953e8e27f + last_write_checksum: sha1:a1f4c81b573aa48a3b1558b07fa43dc124fede88 + pristine_git_object: dcdd62b3d2311f633908cfc065701a6464557d30 src/mistralai/client/models/classifiertarget.py: id: 2177d51d9dcf - last_write_checksum: sha1:c801dacc31e2d7682285a9a41d8ef38fa2e38fb9 - pristine_git_object: 4d66d789a42a0bc8762998161f1ad801bd8d96d4 + last_write_checksum: sha1:ea159e369ba3dcaada53eec102ec37234fa14670 + pristine_git_object: bfd5646e92aa5ed41f5ac13787a6200896b3d37e src/mistralai/client/models/classifiertargetresult.py: id: 19c343844888 last_write_checksum: sha1:3f5b37de3585cb38a3e41f0ee49dc4b5a33bf925 pristine_git_object: 8ce7c0ca167b38ebaf1e5fc6393ab56d9f142cfa src/mistralai/client/models/classifiertrainingparameters.py: id: 4000b05e3b8d - last_write_checksum: sha1:d7ce2f1017463c52856b973d696c9abecf5f79e3 - pristine_git_object: 14fa4926f8b5b62aa6b5d8864c40d5acf66e7b15 + last_write_checksum: sha1:c2279b1a67b20f0f2643a0fbe5f1a01c6ba72f49 + pristine_git_object: 3a9576c830163d351b5d8f6b66bb612fca12b844 src/mistralai/client/models/codeinterpretertool.py: id: 950cd8f4ad49 - last_write_checksum: sha1:8c3d91805d6c5f5cc9d249216694781faf15ea68 - pristine_git_object: ce14265f6d312c3da52014d2a058b6a730d5c980 + last_write_checksum: sha1:248d6e6c1906303f03eb4f29429227a7d39679a2 + pristine_git_object: 4cf9d055c3aaee426d99071180ae6de21eb648cf src/mistralai/client/models/completionargs.py: id: 3db008bcddca - last_write_checksum: sha1:e3d36235610c0546d8a2f2bb0a1db0f953747d88 - pristine_git_object: ab5cf5ff2d4df92d00664803f9274696ae80216d + last_write_checksum: sha1:b922bb4464d2759c54aa6dd1a4fd82fba5595e9b + pristine_git_object: 76c4cf98ccb348c0d806a442ad7e3697b8e79d68 src/mistralai/client/models/completionargsstop.py: id: 5f339214501d last_write_checksum: sha1:744878976d33423327ea257defeff62073dad920 pristine_git_object: 39c858e66380044e11d3c7fd705334d130f39dea src/mistralai/client/models/completionchunk.py: id: d786b44926f4 - last_write_checksum: sha1:15f1b57b696b46bf6986c8f1a53d6bbf8d2351e2 - pristine_git_object: 5fd6c173ef29fb9bf2f570e0c2300268221e1ad3 + last_write_checksum: sha1:df78fa0e2374a4f39d8cc0489109a0b7eaf85ce5 + pristine_git_object: 27029b6f08ab42842022f04ddeebbf90154751da src/mistralai/client/models/completionevent.py: id: c68817e7e190 last_write_checksum: sha1:dc43ac751e4e9d9006b548e4374a5ec44729eea4 pristine_git_object: 3b90ab0c1ecac12f90e0ae3946a6b61410247e4f src/mistralai/client/models/completionfinetunedmodel.py: id: f08c10d149f5 - last_write_checksum: sha1:5fbd8c5475c250cbed1c2d2f47de372e8e92b128 - pristine_git_object: 54a1c1656aea1954288e9144670c939e29a83c47 + last_write_checksum: sha1:12ffb210273040ce9aa057a85d348643622c6b59 + pristine_git_object: e75b8d2f0cdaf38c8e1bc583f9b19278fdf04f86 src/mistralai/client/models/completionfinetuningjob.py: id: c242237efe9b - last_write_checksum: sha1:e4352be2411c7026c054a6fe380b87242183d4e4 - pristine_git_object: 1bf0a730c389be30bac2acfa17ffc6b5891e4918 + last_write_checksum: sha1:653d253e02c252ece805d0172d7e214c474fd074 + pristine_git_object: bbcf773217c3d7951b030b7d248b04b30dec17c8 src/mistralai/client/models/completionfinetuningjobdetails.py: id: e8379265af48 - last_write_checksum: sha1:b11c9bdc161da6a5cbd9f35f4bc5b51f0f3cea9c - pristine_git_object: cb7870219b261e260feceb6109088b0bbf8a6408 + last_write_checksum: sha1:71a05ed146d634c6aa3241a2eacbd3d4d4245a7d + pristine_git_object: 8aa8b75da38a73c3857d90d7f7a560a18905507b src/mistralai/client/models/completionresponsestreamchoice.py: id: 5969a6bc07f3 - last_write_checksum: sha1:59730cdaeeb3e95f4d38f63c34a4e491f40e6010 - pristine_git_object: a52ae892fcaafe54918160d055ee2badac31404e + last_write_checksum: sha1:4a1cd9adf6558faf84f873313210e9ae448c287b + pristine_git_object: ef1a106bdbde4eba5de9342a9418413daa08c0da src/mistralai/client/models/completiontrainingparameters.py: id: be202ea0d5a6 - last_write_checksum: sha1:1a797019770795edcd911ff5b3580bedb83c05f4 - pristine_git_object: ca50a7ad521b46f275dd3a39c98911f13ee527c8 + last_write_checksum: sha1:b0c6896368230fd499799cc42b25f9fd51a4d0a1 + pristine_git_object: b91ec9dfd51b8e6fa208ef54dc2a22437df3a22d src/mistralai/client/models/connector.py: id: 1a4facac922d - last_write_checksum: sha1:4acd40b285482f549ac76ef120aa32cd4ec2f171 - pristine_git_object: 967e454f870a44c9354a8ab1493800daeff35cac + last_write_checksum: sha1:2648e3e1647fa9ae857961ccda8b0f5f36a6cade + pristine_git_object: 55730274eaa98e7aa53d04ba4b9006a61e427740 src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:09dfd8f2d560f33fb12cba74cadcd505831d2389 @@ -2742,126 +2758,130 @@ trackedFiles: id: a377930b1435 last_write_checksum: sha1:2c9a501ab2e2b05829f2e3fd838f88a610d56781 pristine_git_object: 74134361aeeaf83af57d7edc7d9ae26ab09d96fb + src/mistralai/client/models/connector_get_auth_url_v1op.py: + id: 2e6b9ab43d1d + last_write_checksum: sha1:97d50ce0011177c9033bb436929fda3ee6109d61 + pristine_git_object: f8f5fd783243a7b6d5b1f14bda2fd6e8c3c43f2e src/mistralai/client/models/connector_get_v1op.py: id: 73ca3a446dcc - last_write_checksum: sha1:f3a7480774e8f826ba8bc509a0dce280a18ee855 - pristine_git_object: 5770ee096fe7924384a8cd31ed1e40a11eff3e35 + last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 + pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 - last_write_checksum: sha1:4460df62af1ad834656484e9d34dc3f612fa4d84 - pristine_git_object: a89da710092dbcd14522b0190ef9dbefe49ff76a + last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 + pristine_git_object: 3cb31bf7fe0b814606b4bbdfbf7e5cbf733984bf src/mistralai/client/models/connector_update_v1op.py: id: 6f884d18ac56 last_write_checksum: sha1:be8044958ac76ecfc486dc5cb5f0876e595dcc38 pristine_git_object: 6b00d0b0ca6d83b4ac1fce1ab204ac09ca5ceeb5 src/mistralai/client/models/connectorcalltoolrequest.py: id: 7dc7ec295301 - last_write_checksum: sha1:59caca0ee1ec5c43b8191087b1c202ea3ba3e2bc - pristine_git_object: 4e9a4d45dc4eb242ceda1c31736901e451dec862 + last_write_checksum: sha1:8af4bd44caa8ad09180139e7e8a68052c16dce11 + pristine_git_object: 85366bb6acaa0724a907803c689a2caeb431bf7b src/mistralai/client/models/connectorsqueryfilters.py: id: 3b9fc81aa726 - last_write_checksum: sha1:dc90b518462978d5bdba53a1cfcea59f8afe8612 - pristine_git_object: 1aea18b01273aa5b1321e138f1b79e5c50edee07 + last_write_checksum: sha1:399567eb362a40f1225f7d8adb820aabc6b9df99 + pristine_git_object: f10d689771d50077bc35193a39a94672a9f09ac2 src/mistralai/client/models/connectortool.py: id: 41ca596b44f8 - last_write_checksum: sha1:ead8ba36ca4a3b7c0edd06d38aff4a30aaddded2 - pristine_git_object: 26a8b7b75cb8283b00b379902b717c9e7d6e6329 + last_write_checksum: sha1:0306b9a607d59afe042aac018df6e2bc0cff0d8a + pristine_git_object: e8a036c7800ad7db3cdad18f4a61c9c3b8d050b8 src/mistralai/client/models/connectortoolcallmetadata.py: id: 2d27189e58e6 - last_write_checksum: sha1:3faa513be03ab9be9d9081976dab971e0dc2f231 - pristine_git_object: 9f3be6c4e6604f7ed2d2deeaf78569b61697ad45 + last_write_checksum: sha1:da057b97e36ab7b49f863ab92e1c20ccbf81fb45 + pristine_git_object: 0280eae009cd4fa8b91923f31bd607d74ce7f753 src/mistralai/client/models/connectortoolcallresponse.py: id: c4f7a932bd2e - last_write_checksum: sha1:2666a1fb1c6b6a67f9e3147ab84a0ad7340740fe - pristine_git_object: 47071a944e80a79053a14dc57f7a3dee28a8d173 + last_write_checksum: sha1:453f0382ecf925c483a6071130c61eb7b7326ee4 + pristine_git_object: 76abe558e5c558db157d743a6e90ef7c26038680 src/mistralai/client/models/connectortoollocale.py: id: 247ebe411537 last_write_checksum: sha1:e68370e4bcf2a1f5f2f9036416fc889821668244 pristine_git_object: ec1359c8ccf883bff066fd1500503f5e28913e05 src/mistralai/client/models/connectortoolresultmetadata.py: id: 86730e16aa67 - last_write_checksum: sha1:0b49abdb7cfdf461d225387ef03ed5e2413fdb2b - pristine_git_object: 520fb99b6430b317c326bdd9be86b63bd3822bd1 + last_write_checksum: sha1:fae6e84b040a1c8bcb25b94041f990525529472a + pristine_git_object: 8c92f2f8d4c25eac7f3c95e0ae425942829390d0 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea pristine_git_object: e3de7591a089a3739af17108cecdc2d4240f10bf src/mistralai/client/models/conversationappendrequest.py: id: 81ce529e0865 - last_write_checksum: sha1:bdae860241893ec3ab3f22bd57c45dede2927da3 - pristine_git_object: 386714fd6dcccff8abb2247d7474949d9e8e79f8 + last_write_checksum: sha1:1180d6092dc70b5c919529694623e7c5c2f8f470 + pristine_git_object: 6d310816dfe569850207a701a5ce84853702f8d1 src/mistralai/client/models/conversationappendstreamrequest.py: id: 27ada745e6ad - last_write_checksum: sha1:0a563cb146c4806ee6a133d10e7af8839e6f38dd - pristine_git_object: 32f6b148c647d3bac8edada3b941c51c17d78901 + last_write_checksum: sha1:7a5ac0f3f0e255d2ebf2005a9dc931b0fc8d4320 + pristine_git_object: b65f1e82f38099aad5f2a113a784ac706adbd8be src/mistralai/client/models/conversationevents.py: id: 8c8b08d853f6 last_write_checksum: sha1:2eedde1ecf31061fb13de0b1bdc9ea311897b570 pristine_git_object: 17812983f3aee3e675d44f46ca1b741315c2139a src/mistralai/client/models/conversationhistory.py: id: 60a51ff1682b - last_write_checksum: sha1:8984a0b12766e350022796a44baf6aac4c93f79b - pristine_git_object: ceef115b70ff02da05ac97571a177edf5b5f6cf6 + last_write_checksum: sha1:661d135eb6614a54ffbeb7d63320311821f9f23b + pristine_git_object: 2e812bb8b2945db91e534d74265482ce914a8975 src/mistralai/client/models/conversationinputs.py: id: 711b769f2c40 last_write_checksum: sha1:5fc688af61d6a49ede9c9709069f3db79f4dc615 pristine_git_object: 7ce3ffc3772926a259d714b13bfc4ee4e518f8f7 src/mistralai/client/models/conversationmessages.py: id: 011c39501c26 - last_write_checksum: sha1:95e3abe55199f2118e6fb7e5d8520af6a929449a - pristine_git_object: 84664b62337dcdc408bb01e0494fa598e6a86832 + last_write_checksum: sha1:83adcc316ff46085a7b02a4ce54b3cee7a848937 + pristine_git_object: a7e13c712fa0ac250929efdc10303ea7fd26c37d src/mistralai/client/models/conversationpayload.py: id: 4581218c84c1 last_write_checksum: sha1:51c3787091d7d2a09a0625d854a74db3c46d6a1a pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:3b21ed0d747df3b0917bcb1141e387b3c8eb8bd9 - pristine_git_object: 299b41fc79df3b8cd1221142aa693f77e060d757 + last_write_checksum: sha1:5d64abb831437c60c7e88a7dce2e08d03174ee1e + pristine_git_object: 94fcb03bb392ff4a369e0dfaa524644d611d2c49 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf - last_write_checksum: sha1:c668077dd7d22c87c075530bbca7f4625bee5d0c - pristine_git_object: d1f8ac4b89cb332d4b0b5e90ef936228f267f804 + last_write_checksum: sha1:cd45eec534ccd27052d9809f8aafedeee243d9f9 + pristine_git_object: 64437b23c7ff4cd50010e970832bed3567ae4bf0 src/mistralai/client/models/conversationrestartrequest.py: id: 681d90d50514 - last_write_checksum: sha1:9a015a4eb700aa97311231704da0f0eef4b4c7c3 - pristine_git_object: d5079689256f25d2d252aa3ad01ece94994b5abd + last_write_checksum: sha1:edc3713fa0be297da7c622f60775db3c617ab221 + pristine_git_object: b6b03f1faa89d72e4a4b3682f47692f301cfed9c src/mistralai/client/models/conversationrestartstreamrequest.py: id: 521c2b5bfb2b - last_write_checksum: sha1:42f885e4419853a2d5ee9766147b6c2c80cd1faf - pristine_git_object: 5cea41465634f71912cc2fdf79b63c7221939be0 + last_write_checksum: sha1:6fd47c92114693010c6014af6e2a347091985a87 + pristine_git_object: 41b7098f7086b41089432b183df664fb7539bfc1 src/mistralai/client/models/conversationsource.py: id: 24d6a0861d4b last_write_checksum: sha1:e28921788ab1b6d2b6daf08b714bf34b2047eb6c pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:6e503a49b1edf52b2f9ecad17c96d9607d689899 - pristine_git_object: 9404e32c3f3158d5c6d63728d8eaa07a86f69b6c + last_write_checksum: sha1:17f643578f395a5b4605710402f115eb25cae8b3 + pristine_git_object: a1afb2679b5c1e97995b78bbf2572cec489d28c5 src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 - last_write_checksum: sha1:3e0489836936a7a77fa3b41adde1eb459ecd176d - pristine_git_object: 1e80f89ee4f7a3d464df2bf39990b467029e86c1 + last_write_checksum: sha1:ee993afc39cece27caf99ee60258f45980d86cbc + pristine_git_object: e717284f15a4f3c88768f96d98007b95aa2b7922 src/mistralai/client/models/create_dataset_record_v1_observability_datasets_dataset_id_records_postop.py: id: 1ddc53a46c74 last_write_checksum: sha1:5df5b6676f6c115da0b1c242a6f3cc7f8c077927 pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:55adc884e1fa3ee169d34812516e541407648368 - pristine_git_object: 1e0cb7b6b86f791d17655aa36f38842992380a69 + last_write_checksum: sha1:da0d93f32efd9db292a83ccb8c0d18c02dbbb7ee + pristine_git_object: b434619d8c161f74453e2546986e24ea802269e8 src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 - last_write_checksum: sha1:e648017622cd6e860cb15e5dd2b29bf9f2a00572 - pristine_git_object: 9a901fefee0ea6a825274af6fd0aa5775a61c521 + last_write_checksum: sha1:9061e5f387d98c2c2f624efafd6ef178dfad6b43 + pristine_git_object: 6ff1e4964a7f37476074e40522d476920efd4249 src/mistralai/client/models/createcampaignrequest.py: id: 60012b559aee last_write_checksum: sha1:b45a2ee90bf901bec844aa20e9184ca1afba4172 pristine_git_object: b3957df9ef369ecc1746ee3efd1b463bc10b4be7 src/mistralai/client/models/createconnectorrequest.py: id: 3da192d6491a - last_write_checksum: sha1:c0ea3626315e622bb5ef9207662b2c58c420d9e2 - pristine_git_object: 8fd3d3abfdb32742bc8658b9f36a1463768da16d + last_write_checksum: sha1:dffda28118cdc6e4a30ac7d86cf28a73b77b7fd0 + pristine_git_object: 52ebc0be8a073fbc66143b258db778e7f1a33e80 src/mistralai/client/models/createdatasetrecordrequest.py: id: 9455e38a8c31 last_write_checksum: sha1:df3e8d7425500f23101c25267738e617eeb2d467 @@ -2872,44 +2892,44 @@ trackedFiles: pristine_git_object: ecffc52a82e3e0baca00cf94de047ff5124e3a04 src/mistralai/client/models/createfileresponse.py: id: fea5e4832dcc - last_write_checksum: sha1:934437a8c7b19b2642c1979f876ee49fc23c2529 - pristine_git_object: 1f03b275c79e47051f90b1b4cd471f3d291a714f + last_write_checksum: sha1:e0a0abb33411e145285db9d36c207812bf8f0587 + pristine_git_object: bafefc372e35f21c38e45b0055610f19e7efad44 src/mistralai/client/models/createfinetuningjobrequest.py: id: c60d2a45d66b - last_write_checksum: sha1:0f1f4f7ad97884415de5e340e8192df9ebd2fd34 - pristine_git_object: be97bd07039197523769ac30de2c42deb8c9a7eb + last_write_checksum: sha1:b89555bb4f30da8a31708140731c2d97964ec784 + pristine_git_object: 1f9c1e153eb75c4484021099f27a5364568e6250 src/mistralai/client/models/creategithubrepositoryrequest.py: id: 0814afcf63bb - last_write_checksum: sha1:22826d609c93b24b5088ac945f08f4af2ab9f3ea - pristine_git_object: 61ffde27d5b5dfbbf4c57c6bc8ae825ab866c0df + last_write_checksum: sha1:a69ba08cf88aedc6c478cc8083cdd33d4f0ca815 + pristine_git_object: a3f6cd61bec7eab9f734906b6ef1758525fd2d06 src/mistralai/client/models/createjudgerequest.py: id: e606837a626e last_write_checksum: sha1:d5c16104089075af1b8b2fe922006aea9d74b0e3 pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 - last_write_checksum: sha1:45fa65be82712ce99304027c88f953f0932bdae4 - pristine_git_object: 58874e014275b06ce19d145aaa34a48d11ca0950 + last_write_checksum: sha1:edc78f755094546142934c99ee3a97817e023520 + pristine_git_object: 28dda0cb8c5ba2462ed0f68f19747447c6ae401b src/mistralai/client/models/customconnector.py: id: 14f3643f7703 - last_write_checksum: sha1:1c452564f118d0efd906b7b7b62f3cac7b1fec2d - pristine_git_object: 23cddfc119ff3c2cf2d1a270c3830ce48c568f3a + last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d + pristine_git_object: f3a1e2ffb1a29e8798a2ac8c9c636ac3bada7413 src/mistralai/client/models/dataset.py: id: cbf14670ee00 - last_write_checksum: sha1:4636e54c4ca7825b93d55ef1f69b640557b26467 - pristine_git_object: 2acd911d010b2274f09061fa48c6849d0f5160d2 + last_write_checksum: sha1:012f85ebfbdb286436621efc3b5b1adb150871f3 + pristine_git_object: 08ce979e19eb6b852a0a565b38c5b8d4f25ba35c src/mistralai/client/models/datasetimporttask.py: id: c20f7db9633c - last_write_checksum: sha1:b288850d2a124aae3287ede5269d741a8b644d34 - pristine_git_object: 4ef52e9ec7ecd356360035bfcded7fbc9eec4f32 + last_write_checksum: sha1:0a1c92ca0b498fa04d5fac1d3857937d616a8b38 + pristine_git_object: e8d90f126fdeb041bb2cbce9709481c6174c6662 src/mistralai/client/models/datasetpreview.py: id: 128c29db3f37 - last_write_checksum: sha1:2e659243a524db189fe496969187c40986b3e87f - pristine_git_object: 55493568244a888f16b1c17dafd5f44f2629ed58 + last_write_checksum: sha1:5bd20ac7c1b179bd30489cf869ce9e71fd48c135 + pristine_git_object: 90676245b258a6c4217a730fb8b59a336e830afb src/mistralai/client/models/datasetrecord.py: id: 87ddebf2a0ce - last_write_checksum: sha1:07bbb2c5c2023511cc83ef27edc442300701b790 - pristine_git_object: 9c9f42e55ea1b26071c158b095f33815ac6b55a1 + last_write_checksum: sha1:399243f84e7f6488b7994cedc2db565d21c087d8 + pristine_git_object: 39c92cce7ee7f42878703c7983ebfe1c964e1d4e src/mistralai/client/models/delete_campaign_v1_observability_campaigns_campaign_id_deleteop.py: id: 3d1cd35fecc6 last_write_checksum: sha1:276676f082fa84f14ab74502302d32361277d4c8 @@ -2940,48 +2960,48 @@ trackedFiles: pristine_git_object: ffd0e0d015e38e5f6113da036ebeba98441444f4 src/mistralai/client/models/deletemodelresponse.py: id: 8957175b7482 - last_write_checksum: sha1:486183140d7fde18c05ae8a6c59303a23bd8627a - pristine_git_object: fac884bc1d833dbaeccc130873f3fea75ef851f5 + last_write_checksum: sha1:0b24f0b36dc12ccaac5ed628357aa9a9e3c30f27 + pristine_git_object: 4bc6c5e678b66ac04f9a08b27cf392a2903a96a6 src/mistralai/client/models/deltamessage.py: id: 68f53d67a140 - last_write_checksum: sha1:b18350de03a8685bea5ac52e1441415b5e58bdf4 - pristine_git_object: d9fa230e93d4e0886f21c836cf3813855eb8f9fd + last_write_checksum: sha1:f1b774b3febc9388ea8175d266f585aa2954af55 + pristine_git_object: 3823651b3030944520aad12c7e6f6b4e8bbf2a8c src/mistralai/client/models/document.py: id: fbbf7428328c - last_write_checksum: sha1:db2e184f7cc97b24e7ec80887c35c32222afd8a8 - pristine_git_object: fcc5bca541a814143b0489528fd20a69004104b1 + last_write_checksum: sha1:bc290f10562aaf9c24bd14ab3d2a31e62f535042 + pristine_git_object: 8d1aea883e579ff1677949573f43dddc362bd35d src/mistralai/client/models/documentlibrarytool.py: id: 3eb3c218f457 - last_write_checksum: sha1:d03a6136192b56778bd739d834d9bdc80a09cc23 - pristine_git_object: 642c3202b11c5bb8a2b41cf8ae0fe43f73aa2a81 + last_write_checksum: sha1:a84295aba7b9e7f70b68f279934d1a5ca0817f77 + pristine_git_object: 29f8d64a695342489d81bfe20ec2f8de60546ddd src/mistralai/client/models/documenttextcontent.py: id: e730005e44cb last_write_checksum: sha1:c86f4b15e8fda1cd5c173da01462342cd22b7286 pristine_git_object: b6904cb4267347b62a457a01b91a391500326da9 src/mistralai/client/models/documenturlchunk.py: id: 4309807f6048 - last_write_checksum: sha1:33cdaccb3a4f231730c7fa1db9f338a71e6311b2 - pristine_git_object: 43444d98b8b7fb430f9c33562c35072d9c79a263 + last_write_checksum: sha1:f45ecef78fb4412dc76ce54478fe536df0259048 + pristine_git_object: f7a99ff81ee01d256052920405ca4788d3a47f75 src/mistralai/client/models/embeddedresource.py: id: 94a23f656f72 - last_write_checksum: sha1:7984f6ed695b8df81ad70b72a27d481950453abe - pristine_git_object: 54cb17fdface0703cbe64079543bd399d7abebe0 + last_write_checksum: sha1:50375363269d68edd3ea1c0a31ba08c8bf9bd160 + pristine_git_object: e16fedf8362a19e55e7bfc6c273000f3446fe3ac src/mistralai/client/models/embeddingdtype.py: id: 77f9526a78df last_write_checksum: sha1:a4e2ce6d00e6d1db287a5d9f4254b0947227f337 pristine_git_object: 732c4ebe3678563ebcdbafd519f93317261586fb src/mistralai/client/models/embeddingrequest.py: id: eadbe3f9040c - last_write_checksum: sha1:3ef4e321a698c4a10389280f8b1c7d0da20f4faf - pristine_git_object: 5fa2d2f63796523e58e281f2d3bcc05a92111842 + last_write_checksum: sha1:00e4499575e7a8a4a5e879174b7f25a0f522fd8c + pristine_git_object: 2ef747d8ba91f824f0ad117d21c5a8487cc7ea80 src/mistralai/client/models/embeddingresponse.py: id: f7d790e84b65 last_write_checksum: sha1:9bb53a5a860c8e10d4d504648d84da73068c0a83 pristine_git_object: 6ffd68941f32f396998df9dded14ff8365926608 src/mistralai/client/models/embeddingresponsedata.py: id: 6d6ead6f3803 - last_write_checksum: sha1:ba5f38ee6e2b0436532229da01ba79ee49c20d12 - pristine_git_object: 098cfae06eae6a92830b4b5a26985f5d5950e512 + last_write_checksum: sha1:b0daee4bd21a441a2e8e47cf8ca8be32d2179869 + pristine_git_object: 03b23a7cba53c27ef02f3bc025f38f10d7b98e2d src/mistralai/client/models/encodingformat.py: id: b51ec296cc92 last_write_checksum: sha1:ea907f86b00323d99df37f7ff45d582aace798e7 @@ -2992,8 +3012,8 @@ trackedFiles: pristine_git_object: 56d82cbed237f32a8b00cfee4042dfe3e7053bcb src/mistralai/client/models/event.py: id: e5a68ac2dd57 - last_write_checksum: sha1:8ed848fe2e74c7f18ee8f4dcba39ad1c951c16d2 - pristine_git_object: c40ae2b1a1b8131a90c637e3268872b97b22683e + last_write_checksum: sha1:0711bc7d48998b1c01e7708e29ae5889f9bea7bc + pristine_git_object: 01157dfab89756ecfb587722270ef3cef8722807 src/mistralai/client/models/executionconfig.py: id: 14518c40a13b last_write_checksum: sha1:351fb4a74622cb70969b728ac65b62ca670fc7e5 @@ -3008,20 +3028,20 @@ trackedFiles: pristine_git_object: f1600cac74e1d50979277d3eb6830ea5e84b69ec src/mistralai/client/models/feedresultchatcompletioneventpreview.py: id: 19109368b436 - last_write_checksum: sha1:7ed72c5afeaa35a68bef880405b122db6ca1b57b - pristine_git_object: e87e007e571df43ab2453a5506b19836ed23698a + last_write_checksum: sha1:2dfbc8aa7110a57f892ad80002cc01bc4c94589d + pristine_git_object: bf248758026549d8e2395895dfb18eccf96cc31c src/mistralai/client/models/fetchcampaignstatusresponse.py: id: b74b57603a4c last_write_checksum: sha1:62b1fd7d42f79518e15abdb07b11cac817837e1e pristine_git_object: 6004892e377a9852e406bf911bd91afe891ea7b3 src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py: id: 2191cab4638b - last_write_checksum: sha1:971b32a645c582a4a2cccb5329481f29ed5e6792 - pristine_git_object: d3cbd653cc62ef4712fc41e2e64d74a12f413d17 + last_write_checksum: sha1:32526d8625f46e27b57f28483652f7d1a38f26f6 + pristine_git_object: 92c29e22eb942fc756d1926e7ed1b01582903f5c src/mistralai/client/models/fetchfieldoptioncountsrequest.py: id: 2fd8caa0697d - last_write_checksum: sha1:c3798f54e192e91552d0d8004002ede779899ce9 - pristine_git_object: 19698b9b475bd281ebc5488f8d529b0111afefc3 + last_write_checksum: sha1:e9b547f04bf87e5d6863bec706b96ff2d732512c + pristine_git_object: e310f6603d1a602c56da30a1e3a9971586a078c9 src/mistralai/client/models/fetchfieldoptioncountsresponse.py: id: 16ce9431fc7b last_write_checksum: sha1:a633398597cb0ccf0c3e36aca8566f679b527850 @@ -3036,12 +3056,12 @@ trackedFiles: pristine_git_object: 0b50c148c524f59fbc02d2b22ee961dc4f7a2d6f src/mistralai/client/models/file.py: id: f972c39edfcf - last_write_checksum: sha1:609381a40a4bfdda2e7e750a848cd2bb38d6ac0f - pristine_git_object: 1b0ea1d4a288d9723dcdd7cfda99d49c5cbd9e7c + last_write_checksum: sha1:bfcb027361112e24202716f02804699bc1dc5de0 + pristine_git_object: 528bc13a60e1ca006a54e1a9b20087651d10d470 src/mistralai/client/models/filechunk.py: id: ff3c2d33ab1e - last_write_checksum: sha1:d7561c39252b81007a8e079edb4f23989ffd510e - pristine_git_object: 5c8d2646dc0d5c732828bdd81c5a58e12fa92a42 + last_write_checksum: sha1:dc247ef441b0436a1444322bca312be8bfc8ded2 + pristine_git_object: 6c9c8b0e5772d51465f69950b55dd0ecc22be3b2 src/mistralai/client/models/filepurpose.py: id: a11e7f9f2d45 last_write_checksum: sha1:8b167c02f9f33e32d5fd1c6de894693924f4d940 @@ -3056,24 +3076,24 @@ trackedFiles: pristine_git_object: 83de8e73a3d50917e4a41bb92a828a10e646a632 src/mistralai/client/models/files_api_routes_get_signed_urlop.py: id: 0a1a18c6431e - last_write_checksum: sha1:ef4908b9d2e43c0256d25a5aa533c5bdc1205113 - pristine_git_object: 64cd6ac57b4f2de70403e11062307a8d8d5d94e7 + last_write_checksum: sha1:4cf67e8cafa1f448caf9b251dd9db3e9c87d062e + pristine_git_object: 326dd1d305261acc1407e6f70100b3b59dfcee5c src/mistralai/client/models/files_api_routes_list_filesop.py: id: b2e92f2a29b4 - last_write_checksum: sha1:71e67fc63f0df28c534d4bd03a6464ae88959dc2 - pristine_git_object: b03e2f886ce02d4beabca150302a924ae63ad507 + last_write_checksum: sha1:18f318488f01a9a919c8650ee1f5eb825c39c91d + pristine_git_object: e18eaa6a509344303c81599ac19ce2aa8e741060 src/mistralai/client/models/files_api_routes_retrieve_fileop.py: id: 5d5dbb8d5f7a last_write_checksum: sha1:d451d8d2b32f412158a074919cca1a72f79940cb pristine_git_object: 5f8de05f1bba07517dc2ee33a4f05122503b54b5 src/mistralai/client/models/files_api_routes_upload_fileop.py: id: f13b84de6fa7 - last_write_checksum: sha1:de49ee09350784e9d5c7adcafdfbf86c9ad7d659 - pristine_git_object: b66836391c8bc43e8535688c5829ad9cab04af49 + last_write_checksum: sha1:9f48f3a8ca29457de8d1109bca2e98985963f286 + pristine_git_object: 25efcff2ade46c116ddc622a3c5796c2b95e039f src/mistralai/client/models/fileschema.py: id: 19cde41ca32a - last_write_checksum: sha1:f65bf25e367c4e9be2be84af9b41e9d9c6719d0e - pristine_git_object: 11caa083108941befa3bc1e499bbcbf578811884 + last_write_checksum: sha1:c559713ad8602bc8f4a73268758f9a010a7fe8f1 + pristine_git_object: ce64a16bb54c33024580619fb15443f25473df8c src/mistralai/client/models/filevisibility.py: id: 11a670fa3b71 last_write_checksum: sha1:8d44761845eea1d9bb239864863fc058e7c09bf2 @@ -3084,68 +3104,68 @@ trackedFiles: pristine_git_object: fe62d6ddc1187e1177ac834a85bd4e1b6a86ee52 src/mistralai/client/models/filtergroup.py: id: dbc0c34fbc2f - last_write_checksum: sha1:074e2088caee0c3af4698927d840f5b00123074d - pristine_git_object: 06616a010b984e17c2a73aa6164120aa1a2ab5bf + last_write_checksum: sha1:f900312cfcea2b2a341d83e95ca2fce3e467fa03 + pristine_git_object: 4e9815b7387904b071645a9a4682a4ffbf23d488 src/mistralai/client/models/filterpayload.py: id: 56757b849f7a - last_write_checksum: sha1:4ef55aaa20ccfc57cad906558886d0920220ffcd - pristine_git_object: 188375f1070630f46f3950271322fb9bc1b64fed + last_write_checksum: sha1:1d9a513f9c5a33c5ae249fb4926dd70eeb5e02e5 + pristine_git_object: ced355f16abe74ce87d1770cebe761d0b26c35bc src/mistralai/client/models/fimcompletionrequest.py: id: cf3558adc3ab - last_write_checksum: sha1:20bca1f6a0ab6e84f48b6e332f0c3242da84ae45 - pristine_git_object: ea877213d1abe4811fee188eb7a60ccf1bb51f18 + last_write_checksum: sha1:ebb1c97108ecd51ee163dcec36e3d88ece4695bf + pristine_git_object: 2ca34598854f3777430de33d2acf2fc45f27fbcc src/mistralai/client/models/fimcompletionresponse.py: id: b860d2ba771e last_write_checksum: sha1:dffd5a7005999340f57eaa94e17b2c82ddc7fd90 pristine_git_object: 1345a116b7855ab4b824cf0369c0a5281e44ea97 src/mistralai/client/models/fimcompletionstreamrequest.py: id: 1d1ee09f1913 - last_write_checksum: sha1:aa8313ecdd852034aaf6ec23dc3f04f7ef8e28e5 - pristine_git_object: e80efc095feb2e2df87f6d3c3f9c56b6cbf347b3 + last_write_checksum: sha1:338c8d224fa5739296fe0e1ea1c00e65fba30b99 + pristine_git_object: 9c91083cc72cfa7ffa59d58e9255b16ac5983077 src/mistralai/client/models/finetuneablemodeltype.py: id: 05e097395df3 last_write_checksum: sha1:daf4cd1869da582981023dea1074268da071e16a pristine_git_object: 7b924bd7abc596f0607a513eee30e98cbf7ab57a src/mistralai/client/models/finetunedmodelcapabilities.py: id: 475c805eab95 - last_write_checksum: sha1:5919e48a6778f1a2360ce090d05b41b1bf33253f - pristine_git_object: 2f4cca0b8c0e3e379f5c2aa67953f2e55757f68d + last_write_checksum: sha1:91f720f910b01109b6216aa7de1b3f76d04108c9 + pristine_git_object: b9ad2f9e62486e5f54bc801ab547377114ca3f5c src/mistralai/client/models/ftclassifierlossfunction.py: id: d21e2a36ab1f last_write_checksum: sha1:ca90e2f1cd0b9054293bea304be0867c93f7fac2 pristine_git_object: ccb0f21b5a69f91119bec9db6e9f3d876e4c35af src/mistralai/client/models/ftmodelcard.py: id: c4f15eed2ca2 - last_write_checksum: sha1:5875feeb3513b87853c52320b0fab4c36667fbda - pristine_git_object: 3874cec2aa027a56493d3ac33b44b6b83b5a7374 + last_write_checksum: sha1:1c3ab1bda3fa9e2df33b47a49d5e9b9e2d82a701 + pristine_git_object: bb7c52c881ceadccdeb3590104e774f3d2ad94d7 src/mistralai/client/models/function.py: id: 32275a9d8fee - last_write_checksum: sha1:ca24a512de22787932d7f4af005699621926d6c0 - pristine_git_object: 1da1dcc9b637d0a5b0fbb7cf2761f6d01eb3068f + last_write_checksum: sha1:c01c1ed54b3086859cde0dd3c3c466c78d8323ae + pristine_git_object: 8a3267e8b4b3fc78e64c46a0c05f7f9822bd3e3f src/mistralai/client/models/functioncall.py: id: 393fca552632 last_write_checksum: sha1:6e96e9abaa9b7625a9a30e376c31b596ee9defcb pristine_git_object: 527c3ad408e1e1ccfe6301a8860e7f751e1d312d src/mistralai/client/models/functioncallentry.py: id: cd058446c0aa - last_write_checksum: sha1:776f397d17f946bae2929998f14d991a1ccc99e0 - pristine_git_object: d05fad856729a76dd24f8aa4d050f8381e51ed6a + last_write_checksum: sha1:209dc38d13e7cab489dc99ecd2f400b259847ad2 + pristine_git_object: a88d87ab553d42a244cda26946dc10c44da3031a src/mistralai/client/models/functioncallentryarguments.py: id: 3df3767a7b93 last_write_checksum: sha1:9858feba8f7f01017f10477a77dec851a1d06e55 pristine_git_object: afe81b24e131a8ef879ee7f140271aa762b8ed2f src/mistralai/client/models/functioncallevent.py: id: 23b120b8f122 - last_write_checksum: sha1:62b5b94df4e5b6f945ead78871cdbfceb6cd40cf - pristine_git_object: 849eed76d08524e5e4d1e7cc1c3fa04386f5ef75 + last_write_checksum: sha1:57469e759f6d9100ca09e607a9687a4f59043bb0 + pristine_git_object: 6e3c0715818bf78d7cd90ab3cf1106aa5d31640f src/mistralai/client/models/functionname.py: id: 000acafdb0c0 last_write_checksum: sha1:4145b7b817b712b85dcbedb309416c7ba72d827e pristine_git_object: 07d98a0e65ccbcba330fb39c7f23e26d3ffc833c src/mistralai/client/models/functionresultentry.py: id: 213df39bd5e6 - last_write_checksum: sha1:3aa6834bf2beda061ac772a0a8a4d7ed5ad942a0 - pristine_git_object: 01e2e36fc0a9de6a2b06a4205004992baf0f9e43 + last_write_checksum: sha1:ec72ed10d5170484643db846ac32df5e3263ca4e + pristine_git_object: 115765225e6b0f1c166b7b9c89a41fade1ba90e6 src/mistralai/client/models/functiontool.py: id: 2e9ef5800117 last_write_checksum: sha1:bce744d77a3dac92d4776a37be497311674bdc7d @@ -3156,24 +3176,24 @@ trackedFiles: pristine_git_object: a8446737ead106f400900bc6b73d57db306bb47f src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py: id: 270800e2c264 - last_write_checksum: sha1:ceea6d622e9c62e38241a4819b771e78bf553b46 - pristine_git_object: e1b04950b7d7d5b738ce0244cbb04261fd7ee4b3 + last_write_checksum: sha1:080172a6bc5bdadf2a6cbdb2ad91f8fe49b4a6f2 + pristine_git_object: 9db415bff26597d2ebd8544f39b86e15ac244cff src/mistralai/client/models/get_campaign_status_by_id_v1_observability_campaigns_campaign_id_status_getop.py: id: 853a43ee6b98 last_write_checksum: sha1:9e3fd0b27e1ff30e596fb2a81b0770cb6afbcf39 pristine_git_object: 57ac44905fd7db69e96533092c6d6e8bbe0eb083 src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py: id: 598a7340fc98 - last_write_checksum: sha1:ca0f08deb402ee817dafbcd3bf7b05b9d3b7c5a3 - pristine_git_object: a6a329c729b68f11c211f570beaab63c539fc257 + last_write_checksum: sha1:e439c5269ea0a59311a3e8ddc514836364744a35 + pristine_git_object: 4ff0c3075443875ffe8c0e13aa3f7bb6fb45d4c6 src/mistralai/client/models/get_chat_completion_event_v1_observability_chat_completion_events_event_id_getop.py: id: 98aff68bc7c7 last_write_checksum: sha1:dcdfebf2d374e5bbaa61e34c985d100b4a736581 pristine_git_object: f39b0f562ee8a75e611f6ad2929c43c83c230e99 src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py: id: 36957d0f73aa - last_write_checksum: sha1:cfd5144c778defd849d029ad13625e4674660a69 - pristine_git_object: 5a8b7450a685ade70cc728dc269a0f2577ba600d + last_write_checksum: sha1:9761398171c914a2b602c65e5e9a0beb69156aef + pristine_git_object: b4af68e0e0fee80dc3cde41e8e8324d6807e1b39 ? src/mistralai/client/models/get_chat_completion_field_options_counts_v1_observability_chat_completion_fields_field_name_options_counts_postop.py : id: 0b1bd06b24af last_write_checksum: sha1:e3489181ee8230c478e5785e93c4f5270950fd33 @@ -3192,68 +3212,68 @@ trackedFiles: pristine_git_object: cf900d0e4ef6eff4114c5e7737d03d0ab0e07d6f src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py: id: 07ece48f664d - last_write_checksum: sha1:4cfeaf15f32193c8278759bf0274f5e4426ff057 - pristine_git_object: 43e0dc5b2f37ef1624547cd6bcc63e3780837629 + last_write_checksum: sha1:9156ce8891f5b9c0775f633316644afcf8984e6a + pristine_git_object: 8213c023c3d47e38d6f3cf14cf985e267529c600 src/mistralai/client/models/get_dataset_record_v1_observability_dataset_records_dataset_record_id_getop.py: id: 6ea6a0dab32f last_write_checksum: sha1:8a8027a201a49fa1fe6717a1dbae4a6c242b8dbe pristine_git_object: 0cb239dfd04d98488b8ce7ee143bb3cc589326e8 src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py: id: 77967c965aea - last_write_checksum: sha1:69e3467aa6225ce25c1f008649b683c43f6a34b8 - pristine_git_object: 7617a5d204f4f2fa66610ca711b803b1b5fbc0ad + last_write_checksum: sha1:831414ebd99ed826562864b2819fbe35180b6e50 + pristine_git_object: ed1778235ce208110598a165c5afc9fbfc1a20aa src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py: id: 3e4f4e2447ac - last_write_checksum: sha1:dc0305b848582ea310b935c15da10f044a832978 - pristine_git_object: ea52dd5180f5580cc5b94ecdbaa5ef67d89e5621 + last_write_checksum: sha1:c58e1c3e04892b5bfcadeec7c640c37c8d3da017 + pristine_git_object: 1d79f2d59fc1d0f38c66d85cf266bc9700087c37 src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py: id: 4201c3c5a891 last_write_checksum: sha1:44c9a7d21ea727e0f849cfc5dc4a02220bcf6e74 pristine_git_object: 375db2e9b8ff839f6ec3bdfdf06de9b7a24fbe7c src/mistralai/client/models/get_judges_v1_observability_judges_getop.py: id: fa04e3db7781 - last_write_checksum: sha1:bfc31bc3de6ddacf3a01cf3f5a74be3fea83b3a0 - pristine_git_object: 7228cfa13211d7bca8ccbca8f9a3137e7d6689d6 + last_write_checksum: sha1:d59740c9021cd891db4b81a7f4c6aeeecb9d6958 + pristine_git_object: b5d0980e197c19eaa70ac26f3b118a8e60364e3e ? src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f pristine_git_object: 7689415dd70da6eec8d0b416cbf020c4b9adeecf src/mistralai/client/models/getfileresponse.py: id: 81919086e371 - last_write_checksum: sha1:5a70dc35ee1dc2360eacda5e0dbe08b346f8b480 - pristine_git_object: 82280899020739d61aca44ef731d175e6a66f325 + last_write_checksum: sha1:a116c2fdef65748b5015804fc0eb9860fd2bc3b2 + pristine_git_object: 37c29bbb41ab44aa6d42ea7e7f094d52a210a5a8 src/mistralai/client/models/getsignedurlresponse.py: id: cee4e4197372 last_write_checksum: sha1:ab9adbc06e7f02e791dc549ad1850ce1b1a250a7 pristine_git_object: 4ba95894f2b89719fa58e7e397c28014dbd00316 src/mistralai/client/models/githubrepository.py: id: 4bc83ce18378 - last_write_checksum: sha1:21aa04bc426158ccbe1ded3bc65b46e6869e897d - pristine_git_object: 84b01078c2192de5d6668a6943d416a2ff30db5f + last_write_checksum: sha1:4c1358be59e667394757b01a5eeebb4b5ce134f4 + pristine_git_object: 4ec88aa827f1d813e4a01ed2f382b2d02a19dc3e src/mistralai/client/models/guardrailconfig.py: id: c72b74412547 - last_write_checksum: sha1:b66f91989a8aabd977bce2c8fd225e6f47dae60d - pristine_git_object: 4f8fe352e9d0abc23468ed6498ebf63c7e4df5b6 + last_write_checksum: sha1:1688b51dafa47d23ff048e88975b21f24932f6c0 + pristine_git_object: d152ec36741bb8302b0d4f72563e534ed7768cb6 src/mistralai/client/models/imagecontent.py: id: 3abe7faee278 - last_write_checksum: sha1:22229b74dd00ebe78ea3589964367e0785f8bcf0 - pristine_git_object: 13c3f449b20aff0da0325cb3c955c8e64aec61c6 + last_write_checksum: sha1:c0057cab50e78c45069bab3cbec065ab3dbbb50c + pristine_git_object: e6363daa7442b2f0b48bb99ceab76bff08680550 src/mistralai/client/models/imagedetail.py: id: c1084b549abb last_write_checksum: sha1:375db5c8fa87712dc37e46d0bf72283ae6cd6400 pristine_git_object: 1982d357277a92fc7ebea3b99146116596d99c78 src/mistralai/client/models/imagegenerationtool.py: id: e1532275faa0 - last_write_checksum: sha1:88a1347876f69960dc33f8e2cb9929ab1a90a224 - pristine_git_object: c1789b18028156ae683d0323e65e47a43694570f + last_write_checksum: sha1:0fcb9fdeffe252c88497f02164f7e753bea40ff1 + pristine_git_object: 0dd4a4d2a4671bb310410eb17bb85032638d817c src/mistralai/client/models/imageurl.py: id: e4bbf5881fbf - last_write_checksum: sha1:28ef2509fdb489ecf379b60e883e6957aebd2797 - pristine_git_object: ac1030f5d61144e393b2aa9f3ffea893faabb1f7 + last_write_checksum: sha1:a3e5c91291a5fcc24bda8fc1c96a2608965edae5 + pristine_git_object: 32efa67ba4a33ac90c1a16c153ef480e35d1bb67 src/mistralai/client/models/imageurlchunk.py: id: 746fde62f637 - last_write_checksum: sha1:6cf26244c86ff4b43b134966aae4fa6ef91999e8 - pristine_git_object: 59ad96e9d0449f6a8a636d4959f18be626dc2434 + last_write_checksum: sha1:84122edbb655e6fb252dc37abbb14cdd59d8a488 + pristine_git_object: 55a2023ef775f06d586a50ac98e129950ef55d5d src/mistralai/client/models/importdatasetfromcampaignrequest.py: id: ee475b85bfc7 last_write_checksum: sha1:34367bb23d1528b87e67f36d06cc362a05a02c6b @@ -3288,20 +3308,20 @@ trackedFiles: pristine_git_object: 2bda83781d24d3a999014d483ea92604c7509438 src/mistralai/client/models/jobmetadata.py: id: cfbdde7fc0a2 - last_write_checksum: sha1:e1b180a47ca888d0fd4cbc34b62000d3ac86c2b5 - pristine_git_object: f6e96fa104e7a6c8ce9a94538a3d00167a2ae341 + last_write_checksum: sha1:efe10ba4aad0a0e0befd94525b73ab2194e43be8 + pristine_git_object: 8409872bc3149d28558bfd23e85196169499c539 src/mistralai/client/models/jobs_api_routes_batch_cancel_batch_jobop.py: id: b56cb6c17c95 last_write_checksum: sha1:21b5794f110c53691654d7195201f9a4b7793f21 pristine_git_object: de2e63472ac53809cfeae200bd7d2f3dcbb70034 src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py: id: 36b5a6b3ceee - last_write_checksum: sha1:b41862f037d74bbdc44fb4df5f65cd402a16703b - pristine_git_object: d779e1d96c359b0d548d5dee17c06ae2a505cf47 + last_write_checksum: sha1:449dc131e1514edb32107ae1c699544732b313fb + pristine_git_object: 683da4af5412e7da90a4af83864c40dc53a9ed77 src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py: id: d8f0af99c94d - last_write_checksum: sha1:a50885f97cfd4d38bc3e3b0746c88bd602b88f94 - pristine_git_object: 89ac3c933347497b6fb1ec26fecb485802ef85fc + last_write_checksum: sha1:04082f4aa3dcf94708c1fab8c3114e690959d6d1 + pristine_git_object: e5869656d9666768dcbfd53883ed6706304fd565 src/mistralai/client/models/jobs_api_routes_fine_tuning_archive_fine_tuned_modelop.py: id: 34f89d2af0ec last_write_checksum: sha1:3d5242f757ee9be10963af9cd5d47824fc83c71a @@ -3320,8 +3340,8 @@ trackedFiles: pristine_git_object: ddd9c1891356a7c272e0244a9aea3d3d6b2d00d6 src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py: id: cf43028824bf - last_write_checksum: sha1:36082bde6f3d932c66178729533e2a69040fdeab - pristine_git_object: ec80a158f45061b122f84ebaff89ae82ef8d98ef + last_write_checksum: sha1:80c2601bdbab567e7bdf72f1814c3ae58d477a22 + pristine_git_object: 9b9aeb51176498eeaa29bed80346f150d6b94573 src/mistralai/client/models/jobs_api_routes_fine_tuning_start_fine_tuning_jobop.py: id: e7ff4a4a4edb last_write_checksum: sha1:8cbfc309c09df806ad7d130004b4e1c2b89ede0a @@ -3336,12 +3356,12 @@ trackedFiles: pristine_git_object: 296070b426900305fe4596f03a3c9f081cdb2dcf src/mistralai/client/models/jsonschema.py: id: e1fc1d8a434a - last_write_checksum: sha1:d01507ab0a1f6067cbc65aaba199de340ccc68aa - pristine_git_object: dfababa694305c96f98ddebf2f09e448e737c855 + last_write_checksum: sha1:f6e3ddb37e55ff27b795389fce6d4f433e7d5639 + pristine_git_object: bc0bd6c41111937654fba20a16420b6867f7c92a src/mistralai/client/models/judge.py: id: d6adc687c2d9 - last_write_checksum: sha1:bce628dde18d918345c497037d6f2a9c2e60dda0 - pristine_git_object: 1fb1d3866bb719696e5c95d9cefc834f828c65e9 + last_write_checksum: sha1:fec0539aab8eb11de3815317c1a54d3e86957ba0 + pristine_git_object: 036aabb710e1d96af1bf69d563032ab05567b909 src/mistralai/client/models/judge_chat_completion_event_v1_observability_chat_completion_events_event_id_live_judging_postop.py: id: 98c823e7cc1b last_write_checksum: sha1:74dd8fba663c0338a24c497949572b5e5df7e494 @@ -3368,8 +3388,8 @@ trackedFiles: pristine_git_object: 64fad49fa2336b0cbaa69dac7493a18593021275 src/mistralai/client/models/judgeconversationrequest.py: id: b8bfdade89a2 - last_write_checksum: sha1:8651a4749442af4efab446d3849684766173d0d0 - pristine_git_object: 4b8cff1b431ac484d654cca615db6af7e8a93e26 + last_write_checksum: sha1:42873ec62a6e8f78beeeddc7c87b82b23fcb5532 + pristine_git_object: 2c93f7b7c2cb00f19eb3a7ce2cf3f5da76ba50af src/mistralai/client/models/judgedatasetrecordrequest.py: id: 9ad8915328dd last_write_checksum: sha1:c37f9c158061e4d3c6c6eda2d7ee8a5d5e7f5afa @@ -3384,12 +3404,12 @@ trackedFiles: pristine_git_object: 4fa99498fb6a60e9d4d8358660eb0ecd57d34178 src/mistralai/client/models/judgeregressionoutput.py: id: c61d451066dc - last_write_checksum: sha1:0687cabd00d205ec50e238872e57547ee4a3dc3a - pristine_git_object: 63394d8bdc8aa95fa8bfe99b39ae3863aee01ff4 + last_write_checksum: sha1:2dd3b0dc5c82a977bac095aa6c45c7067bcc187c + pristine_git_object: 9bb8f9c1283b3de89bbf8b859a79d27054ee6074 src/mistralai/client/models/legacyjobmetadata.py: id: 0330b8930f65 - last_write_checksum: sha1:3c2f669a05cc01227f62d6a8da1840d9c458d52f - pristine_git_object: 5757675895b3c56d8aa7c174deb08567e596ecf8 + last_write_checksum: sha1:32265ed638a7675fb46c7de747bdb2a775a94505 + pristine_git_object: 143f0e7cb42b050da2ba7ef5ad1afd28397f7f00 src/mistralai/client/models/libraries_delete_v1op.py: id: b2e8bbd19baa last_write_checksum: sha1:ba41496bc99040f7598659c5b037b955b7f6d385 @@ -3420,8 +3440,8 @@ trackedFiles: pristine_git_object: 857dfbe60c57af8b0fa6655a049ed336d70fb941 src/mistralai/client/models/libraries_documents_list_v1op.py: id: 756f26de3cbe - last_write_checksum: sha1:5a1a9e025dc7a1fedaa5199d396a73c4986d4113 - pristine_git_object: da7d793b65139a3894b077a9665b392e8a44e8a2 + last_write_checksum: sha1:565872ef17a53cc9751fa2c8fc1267dac2d01e76 + pristine_git_object: afc474cbe6c571ac36fe0800d4c1e5ffd07eb207 src/mistralai/client/models/libraries_documents_reprocess_v1op.py: id: dbbeb02fc336 last_write_checksum: sha1:bd5013cb1581dd13642ce7edf1e701f5b0c967c4 @@ -3456,16 +3476,16 @@ trackedFiles: pristine_git_object: 54b0ab708c665ccb841b1c8d0f2748c390850506 src/mistralai/client/models/library.py: id: 028a34b08f9c - last_write_checksum: sha1:65f02f963a0540385681b88c7c7fba98d0d704f4 - pristine_git_object: 1953b6fbc6d7ad245ccacd9d665fb29853b00af7 + last_write_checksum: sha1:3ac8546f2ada4f9a24d8296e03b9ad61d5f2e372 + pristine_git_object: c26710ff4818c9719e08b67d147ee9bded3dc46d src/mistralai/client/models/list_models_v1_models_getop.py: id: 1843a7aa68e5 - last_write_checksum: sha1:7058318c4642e630886ba60d3a6dda7ff5dd909b - pristine_git_object: 70b0ab82a26bdbc6c2ea63e6ecb2b3b3046d7eb3 + last_write_checksum: sha1:018c32019aab6c4995285ace8abba54d88f41c0b + pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db src/mistralai/client/models/listbatchjobsresponse.py: id: 99d94c86a871 - last_write_checksum: sha1:7530be5f80a0756527be94758e800e8118e53210 - pristine_git_object: 35a348a1160dcf6d82d58c70cea07e11730359fb + last_write_checksum: sha1:01e5fd232c654b3c4a9d86c09f89cfef6f51805f + pristine_git_object: 77265322df4e5b13c7e2efaa9f7e3e2554387893 src/mistralai/client/models/listcampaignselectedeventsresponse.py: id: 8e28cb9aff1a last_write_checksum: sha1:7ada7958f9c87fa6ae7a329fd03cd626a279ca93 @@ -3496,12 +3516,12 @@ trackedFiles: pristine_git_object: c48b8c051ad0d1fb4aed8396697e57e782be5a40 src/mistralai/client/models/listfilesresponse.py: id: 85d6d24c1a19 - last_write_checksum: sha1:caf901685bfb6f13d707b89726aaf6e5116cd054 - pristine_git_object: 10a60126600343033a4b0511d717cac6f1924b4d + last_write_checksum: sha1:c47c2d220c41e4b467c25dfe2e94546a5b452138 + pristine_git_object: 37787dae3bc4016988b1f1edfdfeac4b2d4b0000 src/mistralai/client/models/listfinetuningjobsresponse.py: id: 118e05dbfbbd - last_write_checksum: sha1:f0582740a6777039e9695d97f072b5a3c34b483e - pristine_git_object: 1e434c5986bf577e2b42cca943cc6896a83d1fa2 + last_write_checksum: sha1:7943e1bfc9a400ef330284b8241c28f2e64259f5 + pristine_git_object: 39547d571d2e8ce8485f6cf41aa8ad4bfbc7398e src/mistralai/client/models/listjudgesresponse.py: id: db389a8abc34 last_write_checksum: sha1:4ba57c7b7966b7eb81472d8ecc0b5ce726458360 @@ -3516,8 +3536,8 @@ trackedFiles: pristine_git_object: f3e6dc8714311989d1e6c7275c8944e228f3f0c5 src/mistralai/client/models/mcpservericon.py: id: a5b508a322d7 - last_write_checksum: sha1:090bcf0f2856c453d32f00fd434988300572b811 - pristine_git_object: 6068c1c4b3b205b8e7e7db0c31a9b2dfbfbe1f7e + last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 + pristine_git_object: 293ab37505a1098241631dd83435a0e91d073551 src/mistralai/client/models/messageentries.py: id: e13f9009902b last_write_checksum: sha1:43aebdc9eaecc8341298dc6b281d0d57edf4e9e6 @@ -3528,68 +3548,68 @@ trackedFiles: pristine_git_object: 63cf14e7fcbc7c3969220b4f07109473b246bf49 src/mistralai/client/models/messageinputentry.py: id: c0a4b5179095 - last_write_checksum: sha1:b5bad18b88c0bfbbddfdafa6dc50a09e40a6ebd7 - pristine_git_object: c948a13e3cc2071dd1b3d11c419ea61d51470152 + last_write_checksum: sha1:715be926eadfd33538ac4241becd803411126479 + pristine_git_object: be271e317c5de4c52c83fc1c1091eef696e48458 src/mistralai/client/models/messageoutputcontentchunks.py: id: 2ed248515035 last_write_checksum: sha1:df4ef4d17ce48df271ff2b8cab297ae305aa08ec pristine_git_object: def7a4d27cd3d1479864a1d6af19e89bd57bff70 src/mistralai/client/models/messageoutputentry.py: id: a07577d2268d - last_write_checksum: sha1:38ad03422407925087835ab888c0be40bf5fa7fa - pristine_git_object: 6a9c52ed59af1497577be2538e7141d57eea4c8f + last_write_checksum: sha1:ceee2327568213ee455a42c07a5be6b64469b384 + pristine_git_object: fd683ad31afb5765535d87affc9ef2011c16d574 src/mistralai/client/models/messageoutputevent.py: id: a2bbf63615c6 - last_write_checksum: sha1:c3317ab9279c499dd7fb26f45799ca9369676ac7 - pristine_git_object: d765f4fd3c4e43c37063833368e4b21cc0bfbcf2 + last_write_checksum: sha1:7081a6aa27f0893b5628f16871bb1ae5dc23f2be + pristine_git_object: 8f5ecd4363fe23e96127bc5ffdd534f7c500496b src/mistralai/client/models/messageresponse.py: id: 6b388bc155dd last_write_checksum: sha1:14ce5842084a2086505dd80eaa6200638a278000 pristine_git_object: c8fbdff77b3464b630b0cd18f25d9179c5ff9eca src/mistralai/client/models/metric.py: id: c6a65acdd1a2 - last_write_checksum: sha1:5ef7c75b278f16b412b42889ff0f2fc19d87cb7d - pristine_git_object: 1413f589f7f23991a12c1367bc6f287b5e07d4a4 + last_write_checksum: sha1:0d7e4ebbf55f8dcc52facb894589ce44abb0c2fa + pristine_git_object: 8d05989420e1b8b68c90fef193bcaff4452c97fc src/mistralai/client/models/mistralpromptmode.py: id: 95abc4ec799a last_write_checksum: sha1:a1417b987bb34daeb73ca4e015c085814e6c8ad2 pristine_git_object: 9b91323e7545d636308064085ca16fc554eac904 src/mistralai/client/models/modelcapabilities.py: id: 64d8a422ea29 - last_write_checksum: sha1:6e0ac449f1dedceccd33d0cac69e87733c8c87a2 - pristine_git_object: b9382047cf69cd2e79ac366cd2418c424442d207 + last_write_checksum: sha1:352a8cf6dfa61eff04e37609272e0b1ab7a5ffee + pristine_git_object: 3267c7079218df12d78db6815fb6339fad0c6168 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:d08fe4b4bb63e20e51fed78f1bf376babe667179 - pristine_git_object: d7f765bf9657f7637da3ab00f545d0f3ce9d2614 + last_write_checksum: sha1:46ed83726fd34517bf05bf6fc1204a0134c38a06 + pristine_git_object: 72ca957f0eb33dfdfad8fb8074f93b066868f074 src/mistralai/client/models/modellist.py: id: 00693c7eec60 - last_write_checksum: sha1:de62fc6787f482e5df0ff0e70415f493f177b9a1 - pristine_git_object: 5fd835f24cd1098a153ebfb3e958038a183d28a7 + last_write_checksum: sha1:fedfe929f37d6d81248f8f2d6004454aaa35145f + pristine_git_object: a6020100124b5c6493cd1014bf576c439537502e src/mistralai/client/models/moderationllmaction.py: id: 7b18ccbd8ca9 last_write_checksum: sha1:0067c773f68e8c9a6fa9e802b1d5a5b97efa7d5b pristine_git_object: a2553f3041e129df165d49072a60fe31cd8b387b src/mistralai/client/models/moderationllmv1categorythresholds.py: id: 0c51d6766440 - last_write_checksum: sha1:17f74a67d19a59214e93c54e5cabc4132bdbee48 - pristine_git_object: 0451ba3afcbff22d1cc41b784c896419bf49e5f5 + last_write_checksum: sha1:3eca62d031d924bc504a3963911d8f0894c1b4c0 + pristine_git_object: 9a947d111113c748df99d7a01a4c899962425dc7 src/mistralai/client/models/moderationllmv1config.py: id: 483378b56394 - last_write_checksum: sha1:b512a61a1513ac50731ccf154b85e8d746f965db - pristine_git_object: da7156eb30c23a89648d8cc7e674910b12a0c896 + last_write_checksum: sha1:bb2f92e87172e9ada69b1746f2b64ab41b550397 + pristine_git_object: fe597a9b9654ccdb37b35b673698ac8015796e6f src/mistralai/client/models/moderationllmv2categorythresholds.py: id: 4c2a8ff4d52b - last_write_checksum: sha1:2194db15a54038f89890c7d5b56aa50a2df0603c - pristine_git_object: 1754582b849a16dbf77fd9943edcc6f2f1c55ee2 + last_write_checksum: sha1:1b3e0e76b7f1b70a77cb7b24965d83f88188f306 + pristine_git_object: 2ca952c5264bd1e19c149802b380c3d82ec09ed6 src/mistralai/client/models/moderationllmv2config.py: id: bb511e7c628b - last_write_checksum: sha1:853c419e237e290057a6454ab99d492311d7b67b - pristine_git_object: df2b04bdfb831a71555a849209f10a1ef06d0564 + last_write_checksum: sha1:e77793718de35e58f2e6280126fc320b233cc365 + pristine_git_object: 5cd8b7ca1bd68540274db7a11286c200f4d57add src/mistralai/client/models/moderationobject.py: id: 132faad0549a - last_write_checksum: sha1:a8c1454a533e466216ef98dd198ae8959f51fa76 - pristine_git_object: e7ccd8f6f1f75704a973be7ebabc49617070c34a + last_write_checksum: sha1:5c551cc8657d3d9c3394638e6d336162563fc6ee + pristine_git_object: 66f6a84bf55703c7e4b46e4381e2b39a0b0eaaeb src/mistralai/client/models/moderationresponse.py: id: 06bab279cb31 last_write_checksum: sha1:b9158e575276c1e0a510c129347b9a98c5a70567 @@ -3604,36 +3624,36 @@ trackedFiles: pristine_git_object: 99360d410f7128756a7a7f6be6772238fa15c12f src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 - last_write_checksum: sha1:c3c57f0c1c7de0a90900ade464caebfc0b78694b - pristine_git_object: a6236b661f20569cba1ee394ebae24219e82f2d7 + last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 + pristine_git_object: f1535352af02c0d32c573f431b0440da4dab2fd6 src/mistralai/client/models/ocrimageobject.py: id: 685faeb41a80 - last_write_checksum: sha1:13f4e4d33d8fb5b0ee842695d4cc8329bd7ca382 - pristine_git_object: 365f062b5674141aad4b1601a85bec7a56db4cff + last_write_checksum: sha1:a848d782d09e7b899e4a801d8ea43505783c853f + pristine_git_object: 583cc38bf6046ff783ac2b5b2306fa42fa3c6fb5 src/mistralai/client/models/ocrpagedimensions.py: id: 02f763afbc9f last_write_checksum: sha1:f572ed8992ba1ba4d53b705c4e8c94c85ae1290e pristine_git_object: 847205c6c74a621dd2ee6d9eb18d1acba8395c50 src/mistralai/client/models/ocrpageobject.py: id: 07a099f89487 - last_write_checksum: sha1:5089ac3f02e4225d6c95cc9f05b74013694536da - pristine_git_object: ffc7b3b615e17a8e0d76fea4081249b143d8fe4d + last_write_checksum: sha1:8fd95a2a0b6a7a8090d7c0a6a480a4d091a2a9f2 + pristine_git_object: 40b70d8143410bebd0913ab9896584e6b252780d src/mistralai/client/models/ocrrequest.py: id: 36f204c64074 - last_write_checksum: sha1:9e9009dace9ff36cbff0cb8de408a1e0585147a7 - pristine_git_object: 4ad337ced23b3bdad21785b8dc3fcadbb868d4f0 + last_write_checksum: sha1:c3dd9da8c018858f849344c2d5d4da74d1a337ce + pristine_git_object: 6e405ee401e61f0aeb17ad0a49dea31499ec99da src/mistralai/client/models/ocrresponse.py: id: 2fdfc881ca56 - last_write_checksum: sha1:f1d18dbf4cd02f3598ae574d5033c30989fa6985 - pristine_git_object: e63eed987f4eb83f3406b15cf4d840fd43528a49 + last_write_checksum: sha1:8e496f6122ea0798df0d23f50ea3046a29f0f8db + pristine_git_object: ff4b96c30573a18c2e5665a6f3f10724f7a23f9a src/mistralai/client/models/ocrtableobject.py: id: d74dd0d2ddac last_write_checksum: sha1:492f8e4c30b61330592768b13cffcf9a9eb2c0fa pristine_git_object: 66bb050f30790c3fc51cdca1b73e847388fe50c5 src/mistralai/client/models/ocrusageinfo.py: id: 272b7e1785d5 - last_write_checksum: sha1:2b37766fdff72e7ec6e052f248362f7bb3989d2c - pristine_git_object: 2ec1322b29d7fe5246b9ad355a4997222b37970f + last_write_checksum: sha1:eb223a88b7e5175056197f64bb4bce2c88ccea19 + pristine_git_object: bfd748e0010e6acc404fdadfff40ee54ac52b9be src/mistralai/client/models/outputcontentchunks.py: id: 9ad9741f4975 last_write_checksum: sha1:afb76f3af2952c2afab5397e348ddfd6dbb56c4f @@ -3644,36 +3664,36 @@ trackedFiles: pristine_git_object: 291da1115294da17b7ca7babc8dc2d7ef672d709 src/mistralai/client/models/paginatedresultcampaignpreview.py: id: 6653cba0f982 - last_write_checksum: sha1:8b3d00eec103d4ee7b27cda1e08af9656c2c49c1 - pristine_git_object: d82ee741f4673fd96baaba619f437e348fc02379 + last_write_checksum: sha1:0f8d85739c71ececa1df8228ae827e1ebb9cfdcc + pristine_git_object: f6cfce379837e38cf5e42927ceb2d57c58325c67 src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py: id: 8c640682ccf9 - last_write_checksum: sha1:3b7e4de0836bccf0b3247962c17acc55a6caab35 - pristine_git_object: 97bbfea7c0901cf5487cf3a1743417a81232c254 + last_write_checksum: sha1:43b669ef54761d35893eb433c7089d1c350848cf + pristine_git_object: e08443c16e0d23cde396bd6465d92f1ae9a93777 src/mistralai/client/models/paginatedresultdatasetimporttask.py: id: 8fd0a8bad4e7 - last_write_checksum: sha1:f16cfea21df8209caea5b9f8e786a8793b2def50 - pristine_git_object: 9d6dcd052bbedb3e8cb618ce28db9bba1da3c54e + last_write_checksum: sha1:27afb85f9e813c8d9674bdac0892bda94d66659f + pristine_git_object: 4b9f48817baacc32672225b1c08642b4988f17f6 src/mistralai/client/models/paginatedresultdatasetpreview.py: id: bf20489474ce - last_write_checksum: sha1:80544bb270892461e255c9697decace639c1f8ec - pristine_git_object: 51566cc5899b587d7005aadaa05314429285585f + last_write_checksum: sha1:57f86606669135792e8ed1bd7065028380e689ed + pristine_git_object: 81746f355996c52df14778f2d402932a59c983a3 src/mistralai/client/models/paginatedresultdatasetrecord.py: id: 2556a91b48c4 - last_write_checksum: sha1:3e797b6e84b02e62b7db248cbc605a7c723ed370 - pristine_git_object: 1d6e15c1fb7df86cb66cf4263907b9a5ac19d8b6 + last_write_checksum: sha1:bd99e30e61b7487ef86acae66cdd44669b811355 + pristine_git_object: d9aa8c8e810767d749c8588fe801beba7cf77e65 src/mistralai/client/models/paginatedresultjudgepreview.py: id: 4d5aab2705a0 - last_write_checksum: sha1:77371c66e748507206fe1b00b228ba378e89f387 - pristine_git_object: 57dbc1e5dea2e462036ec2b5f48bf3fa18099edb + last_write_checksum: sha1:16667401828bb23b61f284c0ed934eeb78e1eaec + pristine_git_object: c61382f99c27190203d05aa304f8a9eecaebbdb6 src/mistralai/client/models/paginationinfo.py: id: 48851e82d67e last_write_checksum: sha1:166961e2c0f573ba0677ee803820bb944a8a5efb pristine_git_object: 2b9dab6258249f7be87e1d4a73a2502e21fe1f0d src/mistralai/client/models/paginationresponse.py: id: d64678967bf0 - last_write_checksum: sha1:683972d8248b032e3f30489c8aa3cdcdcc728862 - pristine_git_object: f05ee380b8a7e95f67545a61d333fe28956585ae + last_write_checksum: sha1:693e9b575e0da721b15363db1e381d19f8766efb + pristine_git_object: a60640aae96b54f7f8e7561029fda45a165007c4 ? src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py : id: 3e8e390b7fa1 last_write_checksum: sha1:7785e0e41ffed189357a2f5682a0158fbcfe80ca @@ -3696,8 +3716,8 @@ trackedFiles: pristine_git_object: 7423375af779911d2842ff9736452fc19a385daf src/mistralai/client/models/prediction.py: id: 1cc842a069a5 - last_write_checksum: sha1:3ee24375eb7f00cea0c9db6eebc564ce7067f295 - pristine_git_object: 0c6f4182ca8140e595f601b12fbd582034257587 + last_write_checksum: sha1:3ccc14b40fd70f3b4a5cdae3eebcc557b96aea8e + pristine_git_object: 614f481174e58eb7ba28cae5238b532d1d66ef9c src/mistralai/client/models/processingstatus.py: id: 28146eaecfcf last_write_checksum: sha1:a3e3ebeae169441cf430c302c9fe278de79ce215 @@ -3708,80 +3728,84 @@ trackedFiles: pristine_git_object: 15bdce2056f2f642096fbbdb2ac32ce1e5b8c9cf src/mistralai/client/models/realtimetranscriptionerror.py: id: 8c2267378f48 - last_write_checksum: sha1:78637de61d6fc3bc1fff8e95c0a6f5ffc1a3e111 - pristine_git_object: c661e46100752119521f63045e8ebe79105ecc01 + last_write_checksum: sha1:8bfdc2564fc416b0e1a4cc2e2a3a5437b26cea85 + pristine_git_object: 8ea1d4259df73f29096dd469dc24f668a4af0066 src/mistralai/client/models/realtimetranscriptionerrordetail.py: id: 5bd25cdf9c7a last_write_checksum: sha1:a226b10718b1fe4a661311cbd98ea3b1d1ac4163 pristine_git_object: cec1f6eabd44ceab4e58694a0862c9c90ea2f264 src/mistralai/client/models/realtimetranscriptioninputaudioappend.py: id: 8b03cde6e115 - last_write_checksum: sha1:abcf48a48b077e836e2ae5647d93bd61007b9aa7 - pristine_git_object: 8156a2704bd95b74875f7a9ac17191e026f08993 + last_write_checksum: sha1:292ec325423d102ac2ff89071dd814625359ee09 + pristine_git_object: 82ce59fccfe6347876f83a7bcfb78858915eca8c src/mistralai/client/models/realtimetranscriptioninputaudioend.py: id: c187ba1b551d - last_write_checksum: sha1:fa96156774481ca3b98f8c0f99b3b1db01280b37 - pristine_git_object: 473eedb744141faa3447929865a76129d5e96432 + last_write_checksum: sha1:7edc5617574a354fd3eb67a16086b5cd0d52cfbb + pristine_git_object: 9b0a87099103480379794727fa12bf1face16c6b src/mistralai/client/models/realtimetranscriptioninputaudioflush.py: id: b27b600c310e - last_write_checksum: sha1:8a8eb7de4137cf8cd810d93d984009bf8dff51c4 - pristine_git_object: 553d14c7720b3d1388901989d8160f0e3318ba56 + last_write_checksum: sha1:a7ad72a1bbae2f4f8c79aa277fd8beca6db2e1d2 + pristine_git_object: fe7286330722a27859c647d1c4f66f501e5fdd03 src/mistralai/client/models/realtimetranscriptionsession.py: id: 02517fa5411a - last_write_checksum: sha1:eb9a23fb89e0bdb3bb6168f512488a98bd626bc1 - pristine_git_object: a74a457b1e54deb1fcd203ce5ff2c57691f16b18 + last_write_checksum: sha1:3932d73a512a963ba7b8ed77ebaeb614785d7d1a + pristine_git_object: e23c07ec9df36495b4482a4fd9592867db2d0b3b src/mistralai/client/models/realtimetranscriptionsessioncreated.py: id: 4e3731f63a3c - last_write_checksum: sha1:6997848cf22dc90b10597eaf9f0dd966ace969af - pristine_git_object: bb96875ab913f3d6ff241a00d94a87e877637782 + last_write_checksum: sha1:daf7843f9d775a7c915e55f34213f3db2620044c + pristine_git_object: 88da8764f123cb42d6476c8f0cd60c9e7d2b07ae src/mistralai/client/models/realtimetranscriptionsessionupdated.py: id: 686dc4f2450f - last_write_checksum: sha1:e023fe0c8c54da644fc797c25dfeb070b6f0fd1c - pristine_git_object: fea5db4a1b956cb8253e4f147463c47958bfd989 + last_write_checksum: sha1:ec6e2ddb086b80138cbb1492b013ae0a6dd11b9e + pristine_git_object: 474b2fa70798bd0fea65232fa5f32eb33dce4c69 src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py: id: 4e1b3fd7c5a3 - last_write_checksum: sha1:7da202e016b1d1dfc36a13ac03e3b419f0952cd2 - pristine_git_object: 07ad59a41f8a16b9c23c4e0be503a801ec0e2dd6 + last_write_checksum: sha1:2edad8c5170e38fc0968569bcd0cf1c51321f80b + pristine_git_object: 4013d63818394f0f2eff84b72bba5234fb139378 src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py: id: 7033fdb33ad4 - last_write_checksum: sha1:812f072a9effe1ce44e56094121ed10b3a83e39d - pristine_git_object: a89441e91dff4b7a78e8dd247b43243e89bf129d + last_write_checksum: sha1:0221d1f4df2e6f7c8e42c366d439ec54023e0b1d + pristine_git_object: d4ce43f77c6dd2e6691b04402523bee6b9d21ba6 + src/mistralai/client/models/reasoningeffort.py: + id: b930a0a20654 + last_write_checksum: sha1:09493b60af60741211e5321d9350498f017db80a + pristine_git_object: e95b8fee4c0f502d9473887fd33f9b8dfb1177ea src/mistralai/client/models/referencechunk.py: id: 921acd3a224a - last_write_checksum: sha1:511db5ac8da2bdbad3b8a8b4b8b70348f2b9d143 - pristine_git_object: a5fa22f0d14318eab80e438710d413275e705e4b + last_write_checksum: sha1:2534e964c706b886e64fdedfe34b1cbf4cb23e76 + pristine_git_object: c0d7c06584814227621699df817971a4e6920e39 src/mistralai/client/models/requestsource.py: id: 3f2774d9e609 last_write_checksum: sha1:1ce68530a46793968f1122d29df722f0a5c9d267 pristine_git_object: fc4433cb4e657b06aa6a4c078094c2df342810e2 src/mistralai/client/models/resourcelink.py: id: 4251cc3c7797 - last_write_checksum: sha1:f2a70cf2edb98dc0ab7e71fc3bf6f26d28cfbba7 - pristine_git_object: 8ed5613cb6db09f80e7bd0fcb1d8b06c231390ac + last_write_checksum: sha1:fad9dd6a100450397ee358842a31804c3552ca06 + pristine_git_object: 890c5be1de611379c12d1525d596bc284e0e197d src/mistralai/client/models/resourcevisibility.py: id: b5819dd5f981 last_write_checksum: sha1:3c7e91baa8c8a0bb2ba55a6b7c14db04350278d7 pristine_git_object: 56f91f154594a121c988497332e5b978cee4264c src/mistralai/client/models/responsedoneevent.py: id: cf8a686bf82c - last_write_checksum: sha1:144a8bf407391948946f3f5362db78a33c45ee6c - pristine_git_object: be38fba81c08088303c4342c99ac3628c5957785 + last_write_checksum: sha1:598757cc2549972367c626143eb14864f40b4868 + pristine_git_object: 89a58bf77313bbddb0fe8d460374cdbe5d02cea6 src/mistralai/client/models/responseerrorevent.py: id: b286d74e8724 - last_write_checksum: sha1:df3f53344624082471c795131552689510946345 - pristine_git_object: fa4d0d01c1cb7f15d6f469279c2000d2fad8f459 + last_write_checksum: sha1:443a69babe18e95bcc4219423449e57b73bc6015 + pristine_git_object: 5326c4e8293d5bc7cd6572e4cf5511ae2bec97d7 src/mistralai/client/models/responseformat.py: id: 6ab8bc8d22c0 - last_write_checksum: sha1:0ab455566c6bb0b63e2cb1f61f300266021f5954 - pristine_git_object: b2971412549cc5b95c53b93425dbd5b6503a4df7 + last_write_checksum: sha1:8f0993a7f7eb6ef5264706320242ab0f0d939227 + pristine_git_object: 95141394226e21ab908efd7e3795c8132fc8fa38 src/mistralai/client/models/responseformats.py: id: c4462a05fb08 last_write_checksum: sha1:3cb82d44a4f9df5e9a3f51867be6eab1d439d87a pristine_git_object: 21345778ad2d41a3746292e67fec628f9ec2a84d src/mistralai/client/models/responsestartedevent.py: id: 24f54ee8b0f2 - last_write_checksum: sha1:f66a0a67444916e838ca9a63144fb661832b54b9 - pristine_git_object: 84abfcd9ac159b9bd9234ff015d5525d88d663f6 + last_write_checksum: sha1:bbe13695d5cde5f98635c01453057061d0167f99 + pristine_git_object: ca3750421f3dda97cd85a6783084a934ed4f0fd4 src/mistralai/client/models/retrieve_model_v1_models_model_id_getop.py: id: 6fefa90ca351 last_write_checksum: sha1:52775e73fb5c51d245362ce63672cec776e5b6bd @@ -3792,40 +3816,40 @@ trackedFiles: pristine_git_object: dfec7cce1e22ab607b6a9e947fa940284426086d src/mistralai/client/models/searchchatcompletioneventidsrequest.py: id: cabc8ef82d67 - last_write_checksum: sha1:39384c10e2da9806d984be7176a19eec16ed5482 - pristine_git_object: f84760811493458509eb34462254f6cfd09ac851 + last_write_checksum: sha1:3290793dcf229bffc16b16d32d2c599c9a54bf4a + pristine_git_object: 64bb8f9f9e55f9caac2621120465edad169629f7 src/mistralai/client/models/searchchatcompletioneventidsresponse.py: id: a5f0bad3ba10 last_write_checksum: sha1:a521e3466db8258702fe5c286698d9404cc22b8c pristine_git_object: f4751159faff30b92a979d6f03ecbfc0f780261e src/mistralai/client/models/searchchatcompletioneventsrequest.py: id: a437333780bc - last_write_checksum: sha1:5147c9776bb4d6f18b1af6fd6d4bf584710357e7 - pristine_git_object: 95524c5b6f497e4d2c0c58622661469e88dd550b + last_write_checksum: sha1:aa956fbf5e01e20644b0de20047539209ed4210f + pristine_git_object: bca27f166a5b9e55bec2811110b94570fd604588 src/mistralai/client/models/searchchatcompletioneventsresponse.py: id: f96acbcd45f7 last_write_checksum: sha1:539caf622ef9e7579fdc82e7986dcc3a2aedae53 pristine_git_object: 8b9b10b51fe76de43895168df11e5bbcdfc29a62 src/mistralai/client/models/security.py: id: c2ca0e2a36b7 - last_write_checksum: sha1:d74333517caae2a1aa58517e8e935e46913bcc66 - pristine_git_object: f3b3423e850a1afa3b0fa5fa6c94f6018ff70627 + last_write_checksum: sha1:28496d4ff921e8c2186072aad170c65836a4b8f8 + pristine_git_object: 36b129533187283e4fdf53a67019b379b1e251fa src/mistralai/client/models/shareenum.py: id: a0e2a7a16bf8 last_write_checksum: sha1:15a84d57ceeb74cfb37275f714954e42d8e9b3ba pristine_git_object: 08ffeb7e46fbbc28b7c93ef2aa4a49aff7c0d35e src/mistralai/client/models/sharing.py: id: 324f5ac27249 - last_write_checksum: sha1:be77302c873a36d561fb4594fcb7addac923c9c6 - pristine_git_object: d6142e839545fb6be9bbac5d53c34e333112d467 + last_write_checksum: sha1:b67aa68e320269e0f6da9da23ed35cd1c41f2879 + pristine_git_object: efa16203021055e1f704b2fd3683eeee0a49ba07 src/mistralai/client/models/sharingdelete.py: id: f5ecce372e06 - last_write_checksum: sha1:247d793bd1ddc0ad35d010c17e5b32eba826e3a1 - pristine_git_object: 33ccd7e71b8f65d2a9329d8632b5446ca0431d0a + last_write_checksum: sha1:f993f4cc819a14985a70a31af7896115ee80af8a + pristine_git_object: 3472a50637d4582fa8945ec70b57ed12de88b99d src/mistralai/client/models/sharingrequest.py: id: 2439b732dfae - last_write_checksum: sha1:bb79913b3b243cd32b13ae012f0fc3fcc1b457d8 - pristine_git_object: 76424b8ee6c9cc0cff7d96649cc7695be6e3ceec + last_write_checksum: sha1:05e36cba36203bcc579a3b02538aed570cf22352 + pristine_git_object: 7c2d435c363bcd98aba97e120954ec1357524e34 src/mistralai/client/models/source.py: id: fcee60a4ea0d last_write_checksum: sha1:4d4277d75f7ce001780a069898b38afa7c8addc0 @@ -3844,96 +3868,96 @@ trackedFiles: pristine_git_object: d480a219e935aaea91adc320de0003b562c0bbb5 src/mistralai/client/models/textchunk.py: id: 9c96fb86a9ab - last_write_checksum: sha1:89cbb66753d7a3585ce58c70219a349f770909cc - pristine_git_object: ac9f3137dddc15e1cd10aa6385b76510e6c23e33 + last_write_checksum: sha1:40fa1ea5dcbca9f4c534b58f7cb65bbaa5084521 + pristine_git_object: bae970f3cb1f7cfec74cd38b3f1f1b5171943e99 src/mistralai/client/models/textcontent.py: id: 60805b9f7050 - last_write_checksum: sha1:23e396fda502398565dfd996b39107332584f52a - pristine_git_object: 7468b046de5d72085e804e774575519732d60742 + last_write_checksum: sha1:072d40013e047296f98a8be455b30546c8ce0874 + pristine_git_object: 03de48d36befc3f89fb55a9d12c0a78e1ef8d8bd src/mistralai/client/models/textresourcecontents.py: id: 58fe427f427f - last_write_checksum: sha1:56009344486b16740ba6569103ec8d20a15f9601 - pristine_git_object: c497bb4dc9177047100914169fb0e5358efa2292 + last_write_checksum: sha1:7d9dd5965f048f07338c19d79147b09f41e1f96f + pristine_git_object: c3f26a65734775d166a1f5d27cab50933e1a4597 src/mistralai/client/models/thinkchunk.py: id: 294bfce193a4 - last_write_checksum: sha1:9107800bae26e36436296efa317e7b00197f105a - pristine_git_object: 03573f8e1d1a470ba6dc545089beb9b40cebad2a + last_write_checksum: sha1:4563b1759e8b64a9ed1de3843ea73ffb8f2e3285 + pristine_git_object: ae084a179c3227351d0ca8b10c926c6a61d21221 src/mistralai/client/models/timestampgranularity.py: id: 68ddf8d702ea last_write_checksum: sha1:64e7b198a75f026590e26758112651d31984076f pristine_git_object: 8d3773752444db865c0e2629ad9eed66eb7f2bc6 src/mistralai/client/models/tool.py: id: 48b4f6f50fe9 - last_write_checksum: sha1:7e33d7a0349e652b40926f6a51240b9a5c1a7dbd - pristine_git_object: 2b9965e571eeb494f8cf867818aab488198ecdb2 + last_write_checksum: sha1:ed3725d5da10e6a201f73724a2bbf618bdbb2a33 + pristine_git_object: 1d1c5ce557321c33b036949fa4c625fb25e38f95 src/mistralai/client/models/toolcall.py: id: fb34a1a3f3c2 - last_write_checksum: sha1:7d0275444dd6be291c091e908a2b7f2fc536f20f - pristine_git_object: 181cec33c904535c804de06c7357bd493647cd70 + last_write_checksum: sha1:a0e14e69a107d88239e1ee43d2e8fd498eb034a4 + pristine_git_object: 29f1149cd07dfc2744a1088d271af65e4ad70012 src/mistralai/client/models/toolcallconfirmation.py: id: f2e953cfb4fe last_write_checksum: sha1:554a2e073917ffb479efe5887c0b59a2f4967c6e pristine_git_object: fd6eca50a7ec2f4cca2ae20958717881660e0ac5 src/mistralai/client/models/toolchoice.py: id: 14f7e4cc35b6 - last_write_checksum: sha1:a787827a4f4ecf5b6a7068ba94fd1ff074898b51 - pristine_git_object: cb787df1b62190319c6e9679521228af28ee7204 + last_write_checksum: sha1:531f7ac1d7cd7d99b79756b9c673463dd33f2011 + pristine_git_object: ce84573ae34624b1e07f7001d3a00bf36d620e5f src/mistralai/client/models/toolchoiceenum.py: id: c7798801f860 last_write_checksum: sha1:5388b2a6fad842f8e4ae79e6257b4d14c122a6ff pristine_git_object: d66c3d07058eb87bcc3eec10de99a616b5f6638a src/mistralai/client/models/toolconfiguration.py: id: faec24b75066 - last_write_checksum: sha1:912c1c10e88053ae4ee44af763c9ab7c95339f5d - pristine_git_object: b903c8b6c13777b671faf5aa97994117734b3a8f + last_write_checksum: sha1:caa6c41ccb0825034bb9cab4e3fcd1a2547b66a9 + pristine_git_object: eb3d14e5517a60c1fbac1b1feb7d5daadd877a90 src/mistralai/client/models/toolexecutiondeltaevent.py: id: df8f17cf3e07 - last_write_checksum: sha1:2537a6e2dffde3760a064fdf92efa6cdc117ba2b - pristine_git_object: 5a977ca6fc5bfdeadd929f18037fb5c9a9582b40 + last_write_checksum: sha1:77da4c0bca920d4ea77a64faa039fb3c07df46ed + pristine_git_object: c2e4095072f7efc6854f0f666fc5d7d0efcfc30c src/mistralai/client/models/toolexecutiondoneevent.py: id: 514fdee7d99f - last_write_checksum: sha1:d62f57105e4816e03030bc9a2a5645482ea80c55 - pristine_git_object: 1c9b0ec92d87a8559ef050a21ba309e05f6b0314 + last_write_checksum: sha1:b58fd690c6f3a0e2eeca2433f454f4b21a77c3e3 + pristine_git_object: ec3b691835bb0c76e0c5b7d825ca7a4867831302 src/mistralai/client/models/toolexecutionentry.py: id: 76db69eebe41 - last_write_checksum: sha1:9a697fdad4178b95d7d1bd1eaee77ef948fb2d4f - pristine_git_object: 0d6f2a1305f262519ba719969c6e62ceb95e52b3 + last_write_checksum: sha1:d8167692473b2d2b01eb59a9bf83dcbb5ee3d93e + pristine_git_object: 226adce185a755d18a046803884b9194d3c42188 src/mistralai/client/models/toolexecutionstartedevent.py: id: 40fadb8e49a1 - last_write_checksum: sha1:9f6e43d5b2c807ca3b080ea7bd4878ba3ec2a788 - pristine_git_object: 21e5bfa8fea7fa27b7031b740f72a873760700cc + last_write_checksum: sha1:e419d7f40dcb9450710952a0be173830d09cabf4 + pristine_git_object: a4af27b854e7a0d2ce0a04f2e986c865bfaaf179 src/mistralai/client/models/toolfilechunk.py: id: 26c8aadf416a - last_write_checksum: sha1:89bb203aa600bf6a516fbe10e1787a132de9ca5a - pristine_git_object: 0708b3ff4c4f97a0e4c4359baeedc89ef0b10278 + last_write_checksum: sha1:a79863e37d5cf2d6b52fabea259ce401ed0c4697 + pristine_git_object: 1d9e6118a393cbdf9b4c0d2b47b367b9381beee9 src/mistralai/client/models/toolmessage.py: id: 15f1af161031 - last_write_checksum: sha1:cfa16352cf5bbcd6eedbfbf7f3002149fd989418 - pristine_git_object: 05a0ee636a4393e3ce65cc1b6e272ddf8ec79254 + last_write_checksum: sha1:9557c9f6b7be4b6ac94d3316eb605e42aa8dc03c + pristine_git_object: 0dc9e92f5dd27ff93d6de62a6879699ace4300a8 src/mistralai/client/models/toolreferencechunk.py: id: 822e9f3e70de - last_write_checksum: sha1:f5c9265e27fa2d4526e5ce50dff7f7bd641eb642 - pristine_git_object: 95454fe891dd3955121565431897c1b8f0c25083 + last_write_checksum: sha1:2e489c4b2360741a3e4a20710361511a0d9158ea + pristine_git_object: 391724edbb7eea3d3acd1a4b3302045970cb5e31 src/mistralai/client/models/tooltypes.py: id: 86c3b54272fd last_write_checksum: sha1:e90c15c1e645a5f207af0c7ac728cb0a521c6706 pristine_git_object: e601c1967c42ef8d0c2eea98bc5c0ca722cde066 src/mistralai/client/models/trainingfile.py: id: 2edf9bce227d - last_write_checksum: sha1:8fd6a2560554b3c2166daff2ff1a48bb49053489 - pristine_git_object: 2faeda8bfb38c810c5d80eb17cc9928c49c7caf5 + last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0 + pristine_git_object: bdaba37a65b2641c83bb8f2dee7c0680aabd0f2d src/mistralai/client/models/transcriptionresponse.py: id: 60896dbc6345 - last_write_checksum: sha1:e8a318798dfe4ebd64c9d64f487f7e3e8dd05532 - pristine_git_object: 70315463ff8e01c680aa80d68bdc32a7429ddb16 + last_write_checksum: sha1:c858aa031b871a7d0890b96c98aae07ce9d1d9d3 + pristine_git_object: c512a3453c16c329307e094a5758c223db1d7be9 src/mistralai/client/models/transcriptionsegmentchunk.py: id: d1e6f3bdc74b - last_write_checksum: sha1:ee56c437444cbfa7983ba950e3e166f392d208cb - pristine_git_object: b87bfc2f9de0a07d62e8cc1fe265a9c29f56f194 + last_write_checksum: sha1:c7e8305a3a49490c748f8c5ea16e7397be285be3 + pristine_git_object: 8a5a7162fbc5a70098f9b1eed79baf6d77968194 src/mistralai/client/models/transcriptionstreamdone.py: id: 066a9158ed09 - last_write_checksum: sha1:cb8ea2e34c712ef1694bd1b6a83e7eed9318b13b - pristine_git_object: e3c5016901a2400c222e5b821b5afb312af1a1e6 + last_write_checksum: sha1:6c3db3298e520c56131f2f42841530013fa2aed1 + pristine_git_object: 89357277ef90b00e5b8e86d924dc35d288f07948 src/mistralai/client/models/transcriptionstreamevents.py: id: b50b3d74f16f last_write_checksum: sha1:68f82eea8a0bcf1b8b65cedf9e276f34121d398b @@ -3948,16 +3972,16 @@ trackedFiles: pristine_git_object: b6c6190684eccdc3fe6ce4bc7b86f5ee6490a197 src/mistralai/client/models/transcriptionstreamsegmentdelta.py: id: c0a882ce57e5 - last_write_checksum: sha1:3507a0355027136e92ada0c9766277381d5dee96 - pristine_git_object: 32ef8f9b2aa34253ea10c830ae856a931306f658 + last_write_checksum: sha1:f849d8d9ddd3344a91ba23bdc40f55ed9388420d + pristine_git_object: 38e7b0a3142f4f1b4a4cc2c63729b3f51030300f src/mistralai/client/models/transcriptionstreamtextdelta.py: id: 6086dc081147 last_write_checksum: sha1:968b4bc32731be6c63be3fd90eb26f4357f891a3 pristine_git_object: 42f0ffb7f16bee4f68f9db9807aa4ec3d9ae5176 src/mistralai/client/models/unarchivemodelresponse.py: id: 22e2ccbb0c80 - last_write_checksum: sha1:a69d8dc8636f3326eb61892b85a9b60044b457fe - pristine_git_object: 5c75d30edaade853f085533da0f9f5de221b6e44 + last_write_checksum: sha1:8ebdd49f2bef3c5934395808bf71701b46e512be + pristine_git_object: 5cab4c2ef093236cacdc2a9e24b27c1a6c643ee9 src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py: id: fa5d55a9d6cf last_write_checksum: sha1:5cf094a6617b1900745deece2e34edfb1b040905 @@ -3976,12 +4000,12 @@ trackedFiles: pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:8f522b8d81152da1248a00073265d927c43ecae5 - pristine_git_object: 584c034c988dbc50e7889b207118eb5f4545b09e + last_write_checksum: sha1:db80a8f0b630acf98be5c27caa7bb448a4e58237 + pristine_git_object: 7bb9686b9b542c47ac25fb6780017b5739829b1e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 - last_write_checksum: sha1:cd461734ab9df9ca0d254c69a552b74b8f63f20e - pristine_git_object: 2fe42ba8b72ab5d851fed49ddbe5d5cfeeb022bd + last_write_checksum: sha1:cdf3aa496722d84b0a76d52ce76133cfaafb0073 + pristine_git_object: 3540d02bd8e8bf45ba3fe33d0d080510c099ac14 src/mistralai/client/models/updatedatasetrecordpayloadrequest.py: id: bd45f357a538 last_write_checksum: sha1:774ba70d9f417e84b546b9f4c5c85eb2876dd56d @@ -3992,52 +4016,52 @@ trackedFiles: pristine_git_object: ccba4a5c71aa8717c4fcb1af61f4f10c17b84ebd src/mistralai/client/models/updatedatasetrequest.py: id: bbb067caa23f - last_write_checksum: sha1:1045b7f77b20e9ede79240467927bac20b9d54f5 - pristine_git_object: 0297408982cd4204c15447204e539cef16b82a01 + last_write_checksum: sha1:4ae8e1ea4a6a9ec5ed559bef8fe21d11af2b0ed3 + pristine_git_object: ddbaad1237d2056476c4fe7f8a6caba06a65f744 src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 - last_write_checksum: sha1:c644725ae379f22550d00b42baefb511d1cc3667 - pristine_git_object: 61e696555c0654208b0d9dcd63fc475ad85297d4 + last_write_checksum: sha1:57b5a2c77ddcf2e09a8eead6b4f5e5c694e21844 + pristine_git_object: 12d9c89b9ab67f6d7e69c26c31da76e7aaf1e817 src/mistralai/client/models/updatejudgerequest.py: id: f6ad6fb901a0 last_write_checksum: sha1:0cc5d951aa36d1ba6cf82020d9ade4ac85bc3a94 pristine_git_object: 04c86ab65599b96478f9b6a0cfa6ce3af1a489bb src/mistralai/client/models/updatelibraryrequest.py: id: 51bc63885337 - last_write_checksum: sha1:622d6a7af58d2e86d7d2dd4e312883d11ce5a8a8 - pristine_git_object: 91cbf2a1c76361c9c5ee1554c80f1507ff5ee50b + last_write_checksum: sha1:3fb7d575fff336485bb48158b082e1e27e4848a2 + pristine_git_object: d5183ac048c60522563532e48899cd0398d2effe src/mistralai/client/models/updatemodelrequest.py: id: fe649967751e - last_write_checksum: sha1:dbba8a6ccbfae36ac56808742f4c05ab99dd2c6c - pristine_git_object: f685cfcce1aa3669159fec902ba78034ef3141b8 + last_write_checksum: sha1:b5ce56ef430768ee806b45d9c2e4c405764a1ef5 + pristine_git_object: 0179ba140d7d598a4a363ddfab67197e56857964 src/mistralai/client/models/usageinfo.py: id: 54adb9a3af16 - last_write_checksum: sha1:04705526057c43495284fe9c50cf7df2af7b49fd - pristine_git_object: 31cbf07e3e38df4452da320e44f3fa9aef17c196 + last_write_checksum: sha1:108b7cd220312ff96d298981e7ada5bc05921cc9 + pristine_git_object: f23699d0223579e3477a1a010063f3a7a985b07c src/mistralai/client/models/usermessage.py: id: cb583483acf4 - last_write_checksum: sha1:0060ee5f5fbbd78073cd56546127a021354a8072 - pristine_git_object: 63e7679246a11fe8e7a3db06e382779c05c64366 + last_write_checksum: sha1:b97161e1abd159d5a0c5757cac2a97bd6a5f1ef0 + pristine_git_object: 7b4b55630022708db7a53476dc7111416594df46 src/mistralai/client/models/validationerror.py: id: 15df3c7368ab - last_write_checksum: sha1:feacaef605de97f7eec36e69c5dda2a10e5b75ac - pristine_git_object: d856e24c3ac25fb6d2802ca7038ab6947ac6a2da + last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 + pristine_git_object: 5fe796db923badd9fb85dc4080a30496ed2b419b src/mistralai/client/models/wandbintegration.py: id: 4823c1e80942 - last_write_checksum: sha1:cc0a7ce49756928f4d261375526a3498b9e4f05d - pristine_git_object: f0df2c77845b2741802730fcd4f3c5d31b7ddd8e + last_write_checksum: sha1:b836b2c829f16a00221354c44f55b672eefc3aa0 + pristine_git_object: 0e444becfc1e90daa3b5f2393975a530c95a7a36 src/mistralai/client/models/wandbintegrationresult.py: id: 8787b4ad5458 - last_write_checksum: sha1:6ba506e01333a3084f63fbfccb459235b6560554 - pristine_git_object: 575cbd42297f02a54542c7eda3a4cabaa28dda23 + last_write_checksum: sha1:80cb8d2eb89889ff54ab967b449c580e28c3f627 + pristine_git_object: e64bb27c9142d3fe312e8d7476893382dab20722 src/mistralai/client/models/websearchpremiumtool.py: id: bfe88af887e3 - last_write_checksum: sha1:ceb073d3b3916b2ff8f7b7e5eb01692893024d68 - pristine_git_object: 00d4a4b427331660d29513ec43e68fc7cf8afcfb + last_write_checksum: sha1:bdb724b386fe512c2b6db6bd2931ea71c796dbc9 + pristine_git_object: 5c929e94c20159cf394a9f95ef990a926643f0ea src/mistralai/client/models/websearchtool.py: id: 26b0903423e5 - last_write_checksum: sha1:a07d7ace2d68c944c686e69053bef8d84231814b - pristine_git_object: 6871080f6279ef42a0525c1e26368baafc98fbb7 + last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f + pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 @@ -4060,8 +4084,8 @@ trackedFiles: pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:365709e35dc4e450a2c4931e75dcbd04568ab361 - pristine_git_object: 80bf25a749eb3b36035aaafa15f059bcf403ec80 + last_write_checksum: sha1:9ee656529530717c0215e75c03509c9962a1e54e + pristine_git_object: b775fe1ccd75f703756b7746383c0e53e5d7e725 src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e @@ -4100,8 +4124,8 @@ trackedFiles: pristine_git_object: d897495f053459106144501c67f2215251d52a27 src/mistralai/client/utils/eventstreaming.py: id: 3263d7502030 - last_write_checksum: sha1:24af3168dafe6b8d860cffb121fac11cd0e9d930 - pristine_git_object: 19a121529f180968f655baffbe446e5c1d6c2abb + last_write_checksum: sha1:10fa278190f52e6acacabf3b1bab6a82d3459a96 + pristine_git_object: 93287ab457d4944394425eb197caec54280dfbd3 src/mistralai/client/utils/forms.py: id: 58842e905fce last_write_checksum: sha1:d68ca0257e0e8bdc5cdc450f3e70a7ba789859f5 @@ -6075,15 +6099,25 @@ examples: application/json: {"analysis": "", "answer": 4277.83} "400": application/json: {"detail": {"message": "", "error_code": "TEMPLATE_SYNTAX_ERROR"}} + connector_get_auth_url_v1: + speakeasy-default-connector-get-auth-url-v1: + parameters: + path: + connector_id_or_name: "" + responses: + "200": + application/json: {"auth_url": "https://unlined-suv.com", "ttl": 786815} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Python SDK Changes: - * `mistral.beta.observability.judges.judge_conversation()`: **Added** - * `mistral.chat.complete()`: `request.guardrails` **Added** - * `mistral.chat.stream()`: `request.guardrails` **Added** - * `mistral.agents.complete()`: `request.guardrails` **Added** - * `mistral.agents.stream()`: `request.guardrails` **Added** + * `mistral.beta.connectors.get_auth_url()`: **Added** + * `mistral.chat.complete()`: `request.reasoning_effort` **Added** + * `mistral.chat.stream()`: `request.reasoning_effort` **Added** + * `mistral.agents.complete()`: `request.reasoning_effort` **Added** + * `mistral.agents.stream()`: `request.reasoning_effort` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index c04601ee..cfb00b47 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.4 + version: 2.0.5 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 64b6385e..a650ee39 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.729.0 +speakeasyVersion: 1.754.0 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure @@ -16,11 +16,10 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:912f3562f7fdf81bc106ff05fb66439fb268a54baad2fb92ca056236a6fe6754 - sourceBlobDigest: sha256:27e5876fdfe7a37c2a566a8ce1d87b9d0de66f8377060801dc2d2068c636225f + sourceRevisionDigest: sha256:6e4e97e1d1e48b8989a295b3161e6bfe2cc78610337579d0292a4aff56de4edb + sourceBlobDigest: sha256:c16444d5c5cb6979e05018e4e6c6479f2c3363d36b95d16f22b1eaf51ab8fbbf tags: - latest - - speakeasy-sdk-regen-1773674493 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -39,13 +38,13 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:912f3562f7fdf81bc106ff05fb66439fb268a54baad2fb92ca056236a6fe6754 - sourceBlobDigest: sha256:27e5876fdfe7a37c2a566a8ce1d87b9d0de66f8377060801dc2d2068c636225f + sourceRevisionDigest: sha256:6e4e97e1d1e48b8989a295b3161e6bfe2cc78610337579d0292a4aff56de4edb + sourceBlobDigest: sha256:c16444d5c5cb6979e05018e4e6c6479f2c3363d36b95d16f22b1eaf51ab8fbbf codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:bfa28ff34d53c5ef36ff7e7c90b4f170cc1f1a2e47b7afe453f42084e1db74ad + codeSamplesRevisionDigest: sha256:6aa689054ccc3a0e2c85b7b90b054c7122b506a34bfdb48ce30e15b687e17b97 workflow: workflowVersion: 1.0.0 - speakeasyVersion: 1.729.0 + speakeasyVersion: 1.754.0 sources: mistral-azure-source: inputs: diff --git a/README-PYPI.md b/README-PYPI.md index f2eda32e..c25b299b 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -497,6 +497,7 @@ print(res.choices[0].message.content) * [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create) - Create a new connector. * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list) - List all connectors. +* [get_auth_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get) - Get a connector. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#update) - Update a connector. @@ -684,7 +685,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], stream=True, completion_args={ + ], completion_args={ "response_format": { "type": "text", }, @@ -836,8 +837,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 122 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 122 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 61 of 123 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 123 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index a44ba5e2..337ea2a1 100644 --- a/README.md +++ b/README.md @@ -497,6 +497,7 @@ print(res.choices[0].message.content) * [create](docs/sdks/connectors/README.md#create) - Create a new connector. * [list](docs/sdks/connectors/README.md#list) - List all connectors. +* [get_auth_url](docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [get](docs/sdks/connectors/README.md#get) - Get a connector. * [update](docs/sdks/connectors/README.md#update) - Update a connector. @@ -684,7 +685,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], stream=True, completion_args={ + ], completion_args={ "response_format": { "type": "text", }, @@ -836,8 +837,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 60 of 122 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 122 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 61 of 123 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 123 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 17d245e6..114fdcc4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -438,4 +438,14 @@ Based on: ### Generated - [python v2.0.4] . ### Releases -- [PyPI v2.0.4] https://pypi.org/project/mistralai/2.0.4 - . \ No newline at end of file +- [PyPI v2.0.4] https://pypi.org/project/mistralai/2.0.4 - . + +## 2026-03-18 15:16:05 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.0.5] . +### Releases +- [PyPI v2.0.5] https://pypi.org/project/mistralai/2.0.5 - . \ No newline at end of file diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 63a26c07..99f47f5c 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -19,6 +19,7 @@ | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index f9589a42..d5455230 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -19,6 +19,7 @@ | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/apiendpoint.md b/docs/models/apiendpoint.md index 8d83a26f..e049d40a 100644 --- a/docs/models/apiendpoint.md +++ b/docs/models/apiendpoint.md @@ -1,17 +1,26 @@ # APIEndpoint +## Example Usage + +```python +from mistralai.client.models import APIEndpoint + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: APIEndpoint = "/v1/chat/completions" +``` + ## Values -| Name | Value | -| ------------------------------ | ------------------------------ | -| `ROOT_V1_CHAT_COMPLETIONS` | /v1/chat/completions | -| `ROOT_V1_EMBEDDINGS` | /v1/embeddings | -| `ROOT_V1_FIM_COMPLETIONS` | /v1/fim/completions | -| `ROOT_V1_MODERATIONS` | /v1/moderations | -| `ROOT_V1_CHAT_MODERATIONS` | /v1/chat/moderations | -| `ROOT_V1_OCR` | /v1/ocr | -| `ROOT_V1_CLASSIFICATIONS` | /v1/classifications | -| `ROOT_V1_CHAT_CLASSIFICATIONS` | /v1/chat/classifications | -| `ROOT_V1_CONVERSATIONS` | /v1/conversations | -| `ROOT_V1_AUDIO_TRANSCRIPTIONS` | /v1/audio/transcriptions | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"/v1/chat/completions"` +- `"/v1/embeddings"` +- `"/v1/fim/completions"` +- `"/v1/moderations"` +- `"/v1/chat/moderations"` +- `"/v1/ocr"` +- `"/v1/classifications"` +- `"/v1/chat/classifications"` +- `"/v1/conversations"` +- `"/v1/audio/transcriptions"` diff --git a/docs/models/audience.md b/docs/models/audience.md index ac325076..186d913e 100644 --- a/docs/models/audience.md +++ b/docs/models/audience.md @@ -1,9 +1,18 @@ # Audience +## Example Usage + +```python +from mistralai.client.models import Audience + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Audience = "user" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `USER` | user | -| `ASSISTANT` | assistant | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"user"` +- `"assistant"` diff --git a/docs/models/audioencoding.md b/docs/models/audioencoding.md index feec8c71..34b80490 100644 --- a/docs/models/audioencoding.md +++ b/docs/models/audioencoding.md @@ -1,13 +1,22 @@ # AudioEncoding +## Example Usage + +```python +from mistralai.client.models import AudioEncoding + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: AudioEncoding = "pcm_s16le" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `PCM_S16LE` | pcm_s16le | -| `PCM_S32LE` | pcm_s32le | -| `PCM_F16LE` | pcm_f16le | -| `PCM_F32LE` | pcm_f32le | -| `PCM_MULAW` | pcm_mulaw | -| `PCM_ALAW` | pcm_alaw | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pcm_s16le"` +- `"pcm_s32le"` +- `"pcm_f16le"` +- `"pcm_f32le"` +- `"pcm_mulaw"` +- `"pcm_alaw"` diff --git a/docs/models/authurlresponse.md b/docs/models/authurlresponse.md new file mode 100644 index 00000000..f8401a8e --- /dev/null +++ b/docs/models/authurlresponse.md @@ -0,0 +1,9 @@ +# AuthURLResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `auth_url` | *str* | :heavy_check_mark: | N/A | +| `ttl` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/basetaskstatus.md b/docs/models/basetaskstatus.md index 8fad1e10..bb781fd1 100644 --- a/docs/models/basetaskstatus.md +++ b/docs/models/basetaskstatus.md @@ -1,15 +1,24 @@ # BaseTaskStatus +## Example Usage + +```python +from mistralai.client.models import BaseTaskStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: BaseTaskStatus = "RUNNING" +``` + ## Values -| Name | Value | -| ------------------ | ------------------ | -| `RUNNING` | RUNNING | -| `COMPLETED` | COMPLETED | -| `FAILED` | FAILED | -| `CANCELED` | CANCELED | -| `TERMINATED` | TERMINATED | -| `CONTINUED_AS_NEW` | CONTINUED_AS_NEW | -| `TIMED_OUT` | TIMED_OUT | -| `UNKNOWN` | UNKNOWN | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"RUNNING"` +- `"COMPLETED"` +- `"FAILED"` +- `"CANCELED"` +- `"TERMINATED"` +- `"CONTINUED_AS_NEW"` +- `"TIMED_OUT"` +- `"UNKNOWN"` diff --git a/docs/models/batchjobstatus.md b/docs/models/batchjobstatus.md index 64617b31..7473cb1f 100644 --- a/docs/models/batchjobstatus.md +++ b/docs/models/batchjobstatus.md @@ -1,14 +1,23 @@ # BatchJobStatus +## Example Usage + +```python +from mistralai.client.models import BatchJobStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: BatchJobStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `RUNNING` | RUNNING | -| `SUCCESS` | SUCCESS | -| `FAILED` | FAILED | -| `TIMEOUT_EXCEEDED` | TIMEOUT_EXCEEDED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | -| `CANCELLED` | CANCELLED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"RUNNING"` +- `"SUCCESS"` +- `"FAILED"` +- `"TIMEOUT_EXCEEDED"` +- `"CANCELLATION_REQUESTED"` +- `"CANCELLED"` diff --git a/docs/models/builtinconnectors.md b/docs/models/builtinconnectors.md index f96f5044..11dfd48a 100644 --- a/docs/models/builtinconnectors.md +++ b/docs/models/builtinconnectors.md @@ -1,12 +1,21 @@ # BuiltInConnectors +## Example Usage + +```python +from mistralai.client.models import BuiltInConnectors + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: BuiltInConnectors = "web_search" +``` + ## Values -| Name | Value | -| -------------------- | -------------------- | -| `WEB_SEARCH` | web_search | -| `WEB_SEARCH_PREMIUM` | web_search_premium | -| `CODE_INTERPRETER` | code_interpreter | -| `IMAGE_GENERATION` | image_generation | -| `DOCUMENT_LIBRARY` | document_library | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"web_search"` +- `"web_search_premium"` +- `"code_interpreter"` +- `"image_generation"` +- `"document_library"` diff --git a/docs/models/chatcompletionchoicefinishreason.md b/docs/models/chatcompletionchoicefinishreason.md index b2f15ecb..c2892726 100644 --- a/docs/models/chatcompletionchoicefinishreason.md +++ b/docs/models/chatcompletionchoicefinishreason.md @@ -1,12 +1,21 @@ # ChatCompletionChoiceFinishReason +## Example Usage + +```python +from mistralai.client.models import ChatCompletionChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ChatCompletionChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `STOP` | stop | -| `LENGTH` | length | -| `MODEL_LENGTH` | model_length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"model_length"` +- `"error"` +- `"tool_calls"` diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index b6b62d2f..4e29ad05 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -22,6 +22,7 @@ | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index e74c21d0..7ece3742 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -22,6 +22,7 @@ | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/classifierfinetuningjobdetailsstatus.md b/docs/models/classifierfinetuningjobdetailsstatus.md index 058c6583..3c6b1f52 100644 --- a/docs/models/classifierfinetuningjobdetailsstatus.md +++ b/docs/models/classifierfinetuningjobdetailsstatus.md @@ -1,17 +1,26 @@ # ClassifierFineTuningJobDetailsStatus +## Example Usage + +```python +from mistralai.client.models import ClassifierFineTuningJobDetailsStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ClassifierFineTuningJobDetailsStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/classifierfinetuningjobstatus.md b/docs/models/classifierfinetuningjobstatus.md index ca829885..c25d73a6 100644 --- a/docs/models/classifierfinetuningjobstatus.md +++ b/docs/models/classifierfinetuningjobstatus.md @@ -2,18 +2,27 @@ The current status of the fine-tuning job. +## Example Usage + +```python +from mistralai.client.models import ClassifierFineTuningJobStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ClassifierFineTuningJobStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/completionfinetuningjobdetailsstatus.md b/docs/models/completionfinetuningjobdetailsstatus.md index 94d795a9..6c7a0979 100644 --- a/docs/models/completionfinetuningjobdetailsstatus.md +++ b/docs/models/completionfinetuningjobdetailsstatus.md @@ -1,17 +1,26 @@ # CompletionFineTuningJobDetailsStatus +## Example Usage + +```python +from mistralai.client.models import CompletionFineTuningJobDetailsStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionFineTuningJobDetailsStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/completionfinetuningjobstatus.md b/docs/models/completionfinetuningjobstatus.md index db151a1b..1fd78b9d 100644 --- a/docs/models/completionfinetuningjobstatus.md +++ b/docs/models/completionfinetuningjobstatus.md @@ -2,18 +2,27 @@ The current status of the fine-tuning job. +## Example Usage + +```python +from mistralai.client.models import CompletionFineTuningJobStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionFineTuningJobStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/completionresponsestreamchoicefinishreason.md b/docs/models/completionresponsestreamchoicefinishreason.md index 0fece473..3e8c30ec 100644 --- a/docs/models/completionresponsestreamchoicefinishreason.md +++ b/docs/models/completionresponsestreamchoicefinishreason.md @@ -1,11 +1,20 @@ # CompletionResponseStreamChoiceFinishReason +## Example Usage + +```python +from mistralai.client.models import CompletionResponseStreamChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionResponseStreamChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `STOP` | stop | -| `LENGTH` | length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"error"` +- `"tool_calls"` diff --git a/docs/models/confirmation.md b/docs/models/confirmation.md index fd6e6aaa..c8709384 100644 --- a/docs/models/confirmation.md +++ b/docs/models/confirmation.md @@ -1,9 +1,14 @@ # Confirmation +## Example Usage + +```python +from mistralai.client.models import Confirmation +value: Confirmation = "allow" +``` + ## Values -| Name | Value | -| ------- | ------- | -| `ALLOW` | allow | -| `DENY` | deny | \ No newline at end of file +- `"allow"` +- `"deny"` diff --git a/docs/models/connectorgetauthurlv1request.md b/docs/models/connectorgetauthurlv1request.md new file mode 100644 index 00000000..d041e0c2 --- /dev/null +++ b/docs/models/connectorgetauthurlv1request.md @@ -0,0 +1,9 @@ +# ConnectorGetAuthURLV1Request + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/conversationappendrequest.md b/docs/models/conversationappendrequest.md index 78a96508..471fcc31 100644 --- a/docs/models/conversationappendrequest.md +++ b/docs/models/conversationappendrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendRequestHandoffExecution]](../models/conversationappendrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationappendrequesthandoffexecution.md b/docs/models/conversationappendrequesthandoffexecution.md index 7418b36a..70cef2ed 100644 --- a/docs/models/conversationappendrequesthandoffexecution.md +++ b/docs/models/conversationappendrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationAppendRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationAppendRequestHandoffExecution +value: ConversationAppendRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationappendstreamrequest.md b/docs/models/conversationappendstreamrequest.md index daea9c52..a54d5d3e 100644 --- a/docs/models/conversationappendstreamrequest.md +++ b/docs/models/conversationappendstreamrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendStreamRequestHandoffExecution]](../models/conversationappendstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationappendstreamrequesthandoffexecution.md b/docs/models/conversationappendstreamrequesthandoffexecution.md index 1bbced3e..dea51978 100644 --- a/docs/models/conversationappendstreamrequesthandoffexecution.md +++ b/docs/models/conversationappendstreamrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationAppendStreamRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationAppendStreamRequestHandoffExecution +value: ConversationAppendStreamRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index 903d13c1..6a5dc206 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationrequesthandoffexecution.md b/docs/models/conversationrequesthandoffexecution.md index e7314f7e..de9dc287 100644 --- a/docs/models/conversationrequesthandoffexecution.md +++ b/docs/models/conversationrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationRequestHandoffExecution +value: ConversationRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationrestartrequest.md b/docs/models/conversationrestartrequest.md index 08f47bba..be0f2289 100644 --- a/docs/models/conversationrestartrequest.md +++ b/docs/models/conversationrestartrequest.md @@ -8,7 +8,7 @@ Request to restart a new conversation from a given entry in the conversation. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[False]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationrestartrequesthandoffexecution.md b/docs/models/conversationrestartrequesthandoffexecution.md index 5790624b..4e202d69 100644 --- a/docs/models/conversationrestartrequesthandoffexecution.md +++ b/docs/models/conversationrestartrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationRestartRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationRestartRequestHandoffExecution +value: ConversationRestartRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationrestartstreamrequest.md b/docs/models/conversationrestartstreamrequest.md index 3ad739aa..f99a6e34 100644 --- a/docs/models/conversationrestartstreamrequest.md +++ b/docs/models/conversationrestartstreamrequest.md @@ -8,7 +8,7 @@ Request to restart a new conversation from a given entry in the conversation. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [Optional[models.ConversationInputs]](../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/docs/models/conversationrestartstreamrequesthandoffexecution.md b/docs/models/conversationrestartstreamrequesthandoffexecution.md index 97266b43..9d2c5633 100644 --- a/docs/models/conversationrestartstreamrequesthandoffexecution.md +++ b/docs/models/conversationrestartstreamrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationRestartStreamRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationRestartStreamRequestHandoffExecution +value: ConversationRestartStreamRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/conversationsource.md b/docs/models/conversationsource.md index 12bf7c1f..ee88d9d4 100644 --- a/docs/models/conversationsource.md +++ b/docs/models/conversationsource.md @@ -1,11 +1,20 @@ # ConversationSource +## Example Usage + +```python +from mistralai.client.models import ConversationSource + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ConversationSource = "EXPLORER" +``` + ## Values -| Name | Value | -| --------------- | --------------- | -| `EXPLORER` | EXPLORER | -| `UPLOADED_FILE` | UPLOADED_FILE | -| `DIRECT_INPUT` | DIRECT_INPUT | -| `PLAYGROUND` | PLAYGROUND | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"EXPLORER"` +- `"UPLOADED_FILE"` +- `"DIRECT_INPUT"` +- `"PLAYGROUND"` diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index 8debea1c..af50989c 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[Literal[True]]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/conversationstreamrequesthandoffexecution.md b/docs/models/conversationstreamrequesthandoffexecution.md index c98e194c..247bfd23 100644 --- a/docs/models/conversationstreamrequesthandoffexecution.md +++ b/docs/models/conversationstreamrequesthandoffexecution.md @@ -1,9 +1,14 @@ # ConversationStreamRequestHandoffExecution +## Example Usage + +```python +from mistralai.client.models import ConversationStreamRequestHandoffExecution +value: ConversationStreamRequestHandoffExecution = "client" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `CLIENT` | client | -| `SERVER` | server | \ No newline at end of file +- `"client"` +- `"server"` diff --git a/docs/models/embeddingdtype.md b/docs/models/embeddingdtype.md index 01656b0a..301585b2 100644 --- a/docs/models/embeddingdtype.md +++ b/docs/models/embeddingdtype.md @@ -1,12 +1,17 @@ # EmbeddingDtype +## Example Usage + +```python +from mistralai.client.models import EmbeddingDtype +value: EmbeddingDtype = "float" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `FLOAT` | float | -| `INT8` | int8 | -| `UINT8` | uint8 | -| `BINARY` | binary | -| `UBINARY` | ubinary | \ No newline at end of file +- `"float"` +- `"int8"` +- `"uint8"` +- `"binary"` +- `"ubinary"` diff --git a/docs/models/encodingformat.md b/docs/models/encodingformat.md index 7d5941cf..8bc9e8c6 100644 --- a/docs/models/encodingformat.md +++ b/docs/models/encodingformat.md @@ -1,9 +1,14 @@ # EncodingFormat +## Example Usage + +```python +from mistralai.client.models import EncodingFormat +value: EncodingFormat = "float" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `FLOAT` | float | -| `BASE64` | base64 | \ No newline at end of file +- `"float"` +- `"base64"` diff --git a/docs/models/entitytype.md b/docs/models/entitytype.md index 7c040b38..44fb9d6b 100644 --- a/docs/models/entitytype.md +++ b/docs/models/entitytype.md @@ -2,11 +2,20 @@ The type of entity, used to share a library. +## Example Usage + +```python +from mistralai.client.models import EntityType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: EntityType = "User" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `USER` | User | -| `WORKSPACE` | Workspace | -| `ORG` | Org | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"User"` +- `"Workspace"` +- `"Org"` diff --git a/docs/models/filepurpose.md b/docs/models/filepurpose.md index 14cab13e..af6dc9fa 100644 --- a/docs/models/filepurpose.md +++ b/docs/models/filepurpose.md @@ -1,10 +1,19 @@ # FilePurpose +## Example Usage + +```python +from mistralai.client.models import FilePurpose + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FilePurpose = "fine-tune" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `FINE_TUNE` | fine-tune | -| `BATCH` | batch | -| `OCR` | ocr | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"fine-tune"` +- `"batch"` +- `"ocr"` diff --git a/docs/models/filesapiroutesuploadfilefilevisibility.md b/docs/models/filesapiroutesuploadfilefilevisibility.md index 055f071b..c1f89309 100644 --- a/docs/models/filesapiroutesuploadfilefilevisibility.md +++ b/docs/models/filesapiroutesuploadfilefilevisibility.md @@ -1,9 +1,14 @@ # FilesAPIRoutesUploadFileFileVisibility +## Example Usage + +```python +from mistralai.client.models import FilesAPIRoutesUploadFileFileVisibility +value: FilesAPIRoutesUploadFileFileVisibility = "workspace" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `WORKSPACE` | workspace | -| `USER` | user | \ No newline at end of file +- `"workspace"` +- `"user"` diff --git a/docs/models/filevisibility.md b/docs/models/filevisibility.md index 4ed11692..4e6c9ed9 100644 --- a/docs/models/filevisibility.md +++ b/docs/models/filevisibility.md @@ -1,9 +1,18 @@ # FileVisibility +## Example Usage + +```python +from mistralai.client.models import FileVisibility + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FileVisibility = "workspace" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `WORKSPACE` | workspace | -| `USER` | user | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"workspace"` +- `"user"` diff --git a/docs/models/finetuneablemodeltype.md b/docs/models/finetuneablemodeltype.md index 34b24bd4..9ec9634f 100644 --- a/docs/models/finetuneablemodeltype.md +++ b/docs/models/finetuneablemodeltype.md @@ -1,9 +1,14 @@ # FineTuneableModelType +## Example Usage + +```python +from mistralai.client.models import FineTuneableModelType +value: FineTuneableModelType = "completion" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `COMPLETION` | completion | -| `CLASSIFIER` | classifier | \ No newline at end of file +- `"completion"` +- `"classifier"` diff --git a/docs/models/format_.md b/docs/models/format_.md index 97d286a4..5bf1ed0c 100644 --- a/docs/models/format_.md +++ b/docs/models/format_.md @@ -2,10 +2,19 @@ Format of the table +## Example Usage + +```python +from mistralai.client.models import Format + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Format = "markdown" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `MARKDOWN` | markdown | -| `HTML` | html | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"markdown"` +- `"html"` diff --git a/docs/models/ftclassifierlossfunction.md b/docs/models/ftclassifierlossfunction.md index 919cdd38..36d3db18 100644 --- a/docs/models/ftclassifierlossfunction.md +++ b/docs/models/ftclassifierlossfunction.md @@ -1,9 +1,18 @@ # FTClassifierLossFunction +## Example Usage + +```python +from mistralai.client.models import FTClassifierLossFunction + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FTClassifierLossFunction = "single_class" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `SINGLE_CLASS` | single_class | -| `MULTI_CLASS` | multi_class | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"single_class"` +- `"multi_class"` diff --git a/docs/models/functioncallentryconfirmationstatus.md b/docs/models/functioncallentryconfirmationstatus.md index 8948beb6..91231a0a 100644 --- a/docs/models/functioncallentryconfirmationstatus.md +++ b/docs/models/functioncallentryconfirmationstatus.md @@ -1,10 +1,19 @@ # FunctionCallEntryConfirmationStatus +## Example Usage + +```python +from mistralai.client.models import FunctionCallEntryConfirmationStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FunctionCallEntryConfirmationStatus = "pending" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `PENDING` | pending | -| `ALLOWED` | allowed | -| `DENIED` | denied | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pending"` +- `"allowed"` +- `"denied"` diff --git a/docs/models/functioncalleventconfirmationstatus.md b/docs/models/functioncalleventconfirmationstatus.md index 4a3c8774..95bebe96 100644 --- a/docs/models/functioncalleventconfirmationstatus.md +++ b/docs/models/functioncalleventconfirmationstatus.md @@ -1,10 +1,19 @@ # FunctionCallEventConfirmationStatus +## Example Usage + +```python +from mistralai.client.models import FunctionCallEventConfirmationStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: FunctionCallEventConfirmationStatus = "pending" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `PENDING` | pending | -| `ALLOWED` | allowed | -| `DENIED` | denied | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pending"` +- `"allowed"` +- `"denied"` diff --git a/docs/models/imagedetail.md b/docs/models/imagedetail.md index 1e5ba3fd..bd7ea1fe 100644 --- a/docs/models/imagedetail.md +++ b/docs/models/imagedetail.md @@ -1,10 +1,19 @@ # ImageDetail +## Example Usage + +```python +from mistralai.client.models import ImageDetail + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ImageDetail = "low" +``` + ## Values -| Name | Value | -| ------ | ------ | -| `LOW` | low | -| `AUTO` | auto | -| `HIGH` | high | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"low"` +- `"auto"` +- `"high"` diff --git a/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md b/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md index 40d57686..1436f6ae 100644 --- a/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md +++ b/docs/models/jobsapiroutesfinetuninggetfinetuningjobsstatus.md @@ -2,18 +2,23 @@ The current job state to filter on. When set, the other results are not displayed. +## Example Usage + +```python +from mistralai.client.models import JobsAPIRoutesFineTuningGetFineTuningJobsStatus +value: JobsAPIRoutesFineTuningGetFineTuningJobsStatus = "QUEUED" +``` + ## Values -| Name | Value | -| ------------------------ | ------------------------ | -| `QUEUED` | QUEUED | -| `STARTED` | STARTED | -| `VALIDATING` | VALIDATING | -| `VALIDATED` | VALIDATED | -| `RUNNING` | RUNNING | -| `FAILED_VALIDATION` | FAILED_VALIDATION | -| `FAILED` | FAILED | -| `SUCCESS` | SUCCESS | -| `CANCELLED` | CANCELLED | -| `CANCELLATION_REQUESTED` | CANCELLATION_REQUESTED | \ No newline at end of file +- `"QUEUED"` +- `"STARTED"` +- `"VALIDATING"` +- `"VALIDATED"` +- `"RUNNING"` +- `"FAILED_VALIDATION"` +- `"FAILED"` +- `"SUCCESS"` +- `"CANCELLED"` +- `"CANCELLATION_REQUESTED"` diff --git a/docs/models/judgeoutputtype.md b/docs/models/judgeoutputtype.md index 6e9dfd72..35a1a837 100644 --- a/docs/models/judgeoutputtype.md +++ b/docs/models/judgeoutputtype.md @@ -1,9 +1,14 @@ # JudgeOutputType +## Example Usage + +```python +from mistralai.client.models import JudgeOutputType +value: JudgeOutputType = "REGRESSION" +``` + ## Values -| Name | Value | -| ---------------- | ---------------- | -| `REGRESSION` | REGRESSION | -| `CLASSIFICATION` | CLASSIFICATION | \ No newline at end of file +- `"REGRESSION"` +- `"CLASSIFICATION"` diff --git a/docs/models/mistralpromptmode.md b/docs/models/mistralpromptmode.md index c3409d03..9b234e3e 100644 --- a/docs/models/mistralpromptmode.md +++ b/docs/models/mistralpromptmode.md @@ -4,9 +4,18 @@ Available options to the prompt_mode argument on the chat completion endpoint. Values represent high-level intent. Assignment to actual SPs is handled internally. System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelines, etc. +## Example Usage + +```python +from mistralai.client.models import MistralPromptMode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MistralPromptMode = "reasoning" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `REASONING` | reasoning | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"reasoning"` diff --git a/docs/models/moderationllmaction.md b/docs/models/moderationllmaction.md index 951880b6..e46a30b4 100644 --- a/docs/models/moderationllmaction.md +++ b/docs/models/moderationllmaction.md @@ -1,9 +1,18 @@ # ModerationLLMAction +## Example Usage + +```python +from mistralai.client.models import ModerationLLMAction + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ModerationLLMAction = "none" +``` + ## Values -| Name | Value | -| ------- | ------- | -| `NONE` | none | -| `BLOCK` | block | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"none"` +- `"block"` diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index 0c387f57..d121b264 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -1,50 +1,59 @@ # ObservabilityErrorCode +## Example Usage + +```python +from mistralai.client.models import ObservabilityErrorCode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ObservabilityErrorCode = "UNKNOWN_ERROR" +``` + ## Values -| Name | Value | -| ---------------------------------------------- | ---------------------------------------------- | -| `UNKNOWN_ERROR` | UNKNOWN_ERROR | -| `VALIDATION_ERROR` | VALIDATION_ERROR | -| `AUTH_FORBIDDEN` | AUTH_FORBIDDEN | -| `AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN` | AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN | -| `AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND` | AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND | -| `AUTH_FORBIDDEN_ROLE_NOT_FOUND` | AUTH_FORBIDDEN_ROLE_NOT_FOUND | -| `AUTH_FORBIDDEN_ORG_NOT_WHITELISTED` | AUTH_FORBIDDEN_ORG_NOT_WHITELISTED | -| `AUTH_UNAUTHORIZED` | AUTH_UNAUTHORIZED | -| `FEATURE_NOT_SUPPORTED` | FEATURE_NOT_SUPPORTED | -| `FIELDS_BAD_REQUEST` | FIELDS_BAD_REQUEST | -| `FIELDS_NOT_FOUND` | FIELDS_NOT_FOUND | -| `SEARCH_NOT_FOUND` | SEARCH_NOT_FOUND | -| `SEARCH_BAD_REQUEST` | SEARCH_BAD_REQUEST | -| `SEARCH_SERVICE_UNAVAILABLE` | SEARCH_SERVICE_UNAVAILABLE | -| `DATABASE_ERROR` | DATABASE_ERROR | -| `DATABASE_TIMEOUT` | DATABASE_TIMEOUT | -| `DATABASE_UNAVAILABLE` | DATABASE_UNAVAILABLE | -| `DATABASE_QUERY_ERROR` | DATABASE_QUERY_ERROR | -| `SEARCH_FILTER_TO_SQL_CONVERSION_ERROR` | SEARCH_FILTER_TO_SQL_CONVERSION_ERROR | -| `JUDGE_CONVERSATION_FORMAT_ERROR` | JUDGE_CONVERSATION_FORMAT_ERROR | -| `JUDGE_MISTRAL_API_ERROR` | JUDGE_MISTRAL_API_ERROR | -| `JUDGE_MISTRAL_API_TIMEOUT` | JUDGE_MISTRAL_API_TIMEOUT | -| `JUDGE_NAME_ALREADY_EXISTS` | JUDGE_NAME_ALREADY_EXISTS | -| `JUDGE_NOT_FOUND` | JUDGE_NOT_FOUND | -| `JUDGE_ALREADY_HAS_NEW_VERSION` | JUDGE_ALREADY_HAS_NEW_VERSION | -| `JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED` | JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED | -| `JUDGE_DID_NOT_CHANGE` | JUDGE_DID_NOT_CHANGE | -| `CAMPAIGN_NOT_FOUND` | CAMPAIGN_NOT_FOUND | -| `CAMPAIGN_NO_MATCHING_EVENTS` | CAMPAIGN_NO_MATCHING_EVENTS | -| `DATASET_NOT_FOUND` | DATASET_NOT_FOUND | -| `DATASET_TASK_NOT_FOUND` | DATASET_TASK_NOT_FOUND | -| `DATASET_RECORD_NOT_FOUND` | DATASET_RECORD_NOT_FOUND | -| `DATASET_RECORD_FORMAT_ERROR` | DATASET_RECORD_FORMAT_ERROR | -| `AGENT_NOT_FOUND` | AGENT_NOT_FOUND | -| `AGENT_MISTRAL_API_ERROR` | AGENT_MISTRAL_API_ERROR | -| `EVALUATION_NOT_FOUND` | EVALUATION_NOT_FOUND | -| `EVALUATION_CURRENTLY_RUNNING` | EVALUATION_CURRENTLY_RUNNING | -| `EVALUATION_RECORD_NOT_FOUND` | EVALUATION_RECORD_NOT_FOUND | -| `EVALUATION_RUN_NOT_FOUND` | EVALUATION_RUN_NOT_FOUND | -| `EVALUATION_RUN_TRANSITION_IS_INVALID` | EVALUATION_RUN_TRANSITION_IS_INVALID | -| `EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY` | EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY | -| `EVALUATION_RUN_TRANSITION_ERROR` | EVALUATION_RUN_TRANSITION_ERROR | -| `TEMPLATE_SYNTAX_ERROR` | TEMPLATE_SYNTAX_ERROR | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"UNKNOWN_ERROR"` +- `"VALIDATION_ERROR"` +- `"AUTH_FORBIDDEN"` +- `"AUTH_FORBIDDEN_NOT_WORKSPACE_ADMIN"` +- `"AUTH_FORBIDDEN_WORKSPACE_NOT_FOUND"` +- `"AUTH_FORBIDDEN_ROLE_NOT_FOUND"` +- `"AUTH_FORBIDDEN_ORG_NOT_WHITELISTED"` +- `"AUTH_UNAUTHORIZED"` +- `"FEATURE_NOT_SUPPORTED"` +- `"FIELDS_BAD_REQUEST"` +- `"FIELDS_NOT_FOUND"` +- `"SEARCH_NOT_FOUND"` +- `"SEARCH_BAD_REQUEST"` +- `"SEARCH_SERVICE_UNAVAILABLE"` +- `"DATABASE_ERROR"` +- `"DATABASE_TIMEOUT"` +- `"DATABASE_UNAVAILABLE"` +- `"DATABASE_QUERY_ERROR"` +- `"SEARCH_FILTER_TO_SQL_CONVERSION_ERROR"` +- `"JUDGE_CONVERSATION_FORMAT_ERROR"` +- `"JUDGE_MISTRAL_API_ERROR"` +- `"JUDGE_MISTRAL_API_TIMEOUT"` +- `"JUDGE_NAME_ALREADY_EXISTS"` +- `"JUDGE_NOT_FOUND"` +- `"JUDGE_ALREADY_HAS_NEW_VERSION"` +- `"JUDGE_USED_IN_CAMPAIGN_CANNOT_BE_UPDATED"` +- `"JUDGE_DID_NOT_CHANGE"` +- `"CAMPAIGN_NOT_FOUND"` +- `"CAMPAIGN_NO_MATCHING_EVENTS"` +- `"DATASET_NOT_FOUND"` +- `"DATASET_TASK_NOT_FOUND"` +- `"DATASET_RECORD_NOT_FOUND"` +- `"DATASET_RECORD_FORMAT_ERROR"` +- `"AGENT_NOT_FOUND"` +- `"AGENT_MISTRAL_API_ERROR"` +- `"EVALUATION_NOT_FOUND"` +- `"EVALUATION_CURRENTLY_RUNNING"` +- `"EVALUATION_RECORD_NOT_FOUND"` +- `"EVALUATION_RUN_NOT_FOUND"` +- `"EVALUATION_RUN_TRANSITION_IS_INVALID"` +- `"EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY"` +- `"EVALUATION_RUN_TRANSITION_ERROR"` +- `"TEMPLATE_SYNTAX_ERROR"` diff --git a/docs/models/op.md b/docs/models/op.md index fa3e2f3a..da9031db 100644 --- a/docs/models/op.md +++ b/docs/models/op.md @@ -1,26 +1,35 @@ # Op +## Example Usage + +```python +from mistralai.client.models import Op + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Op = "lt" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `LT` | lt | -| `LTE` | lte | -| `GT` | gt | -| `GTE` | gte | -| `STARTSWITH` | startswith | -| `ISTARTSWITH` | istartswith | -| `ENDSWITH` | endswith | -| `IENDSWITH` | iendswith | -| `CONTAINS` | contains | -| `ICONTAINS` | icontains | -| `MATCHES` | matches | -| `NOTCONTAINS` | notcontains | -| `INOTCONTAINS` | inotcontains | -| `EQ` | eq | -| `NEQ` | neq | -| `ISNULL` | isnull | -| `INCLUDES` | includes | -| `EXCLUDES` | excludes | -| `LEN_EQ` | len_eq | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"lt"` +- `"lte"` +- `"gt"` +- `"gte"` +- `"startswith"` +- `"istartswith"` +- `"endswith"` +- `"iendswith"` +- `"contains"` +- `"icontains"` +- `"matches"` +- `"notcontains"` +- `"inotcontains"` +- `"eq"` +- `"neq"` +- `"isnull"` +- `"includes"` +- `"excludes"` +- `"len_eq"` diff --git a/docs/models/operator.md b/docs/models/operator.md index ca54debc..2790c574 100644 --- a/docs/models/operator.md +++ b/docs/models/operator.md @@ -2,27 +2,32 @@ The operator to use for filtering options +## Example Usage + +```python +from mistralai.client.models import Operator +value: Operator = "lt" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `LT` | lt | -| `LTE` | lte | -| `GT` | gt | -| `GTE` | gte | -| `STARTSWITH` | startswith | -| `ISTARTSWITH` | istartswith | -| `ENDSWITH` | endswith | -| `IENDSWITH` | iendswith | -| `CONTAINS` | contains | -| `ICONTAINS` | icontains | -| `MATCHES` | matches | -| `NOTCONTAINS` | notcontains | -| `INOTCONTAINS` | inotcontains | -| `EQ` | eq | -| `NEQ` | neq | -| `ISNULL` | isnull | -| `INCLUDES` | includes | -| `EXCLUDES` | excludes | -| `LEN_EQ` | len_eq | \ No newline at end of file +- `"lt"` +- `"lte"` +- `"gt"` +- `"gte"` +- `"startswith"` +- `"istartswith"` +- `"endswith"` +- `"iendswith"` +- `"contains"` +- `"icontains"` +- `"matches"` +- `"notcontains"` +- `"inotcontains"` +- `"eq"` +- `"neq"` +- `"isnull"` +- `"includes"` +- `"excludes"` +- `"len_eq"` diff --git a/docs/models/orderby.md b/docs/models/orderby.md index bba50df1..d778621f 100644 --- a/docs/models/orderby.md +++ b/docs/models/orderby.md @@ -1,9 +1,14 @@ # OrderBy +## Example Usage + +```python +from mistralai.client.models import OrderBy +value: OrderBy = "created" +``` + ## Values -| Name | Value | -| --------------- | --------------- | -| `CREATED` | created | -| `MINUS_CREATED` | -created | \ No newline at end of file +- `"created"` +- `"-created"` diff --git a/docs/models/processstatus.md b/docs/models/processstatus.md index 3a9c004e..68313743 100644 --- a/docs/models/processstatus.md +++ b/docs/models/processstatus.md @@ -1,15 +1,24 @@ # ProcessStatus +## Example Usage + +```python +from mistralai.client.models import ProcessStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ProcessStatus = "self_managed" +``` + ## Values -| Name | Value | -| ---------------------- | ---------------------- | -| `SELF_MANAGED` | self_managed | -| `MISSING_CONTENT` | missing_content | -| `NOOP` | noop | -| `DONE` | done | -| `TODO` | todo | -| `IN_PROGRESS` | in_progress | -| `ERROR` | error | -| `WAITING_FOR_CAPACITY` | waiting_for_capacity | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"self_managed"` +- `"missing_content"` +- `"noop"` +- `"done"` +- `"todo"` +- `"in_progress"` +- `"error"` +- `"waiting_for_capacity"` diff --git a/docs/models/reasoningeffort.md b/docs/models/reasoningeffort.md new file mode 100644 index 00000000..e0b17c8b --- /dev/null +++ b/docs/models/reasoningeffort.md @@ -0,0 +1,14 @@ +# ReasoningEffort + +## Example Usage + +```python +from mistralai.client.models import ReasoningEffort +value: ReasoningEffort = "none" +``` + + +## Values + +- `"none"` +- `"high"` diff --git a/docs/models/requestsource.md b/docs/models/requestsource.md index c81c1159..b710cc1f 100644 --- a/docs/models/requestsource.md +++ b/docs/models/requestsource.md @@ -1,10 +1,15 @@ # RequestSource +## Example Usage + +```python +from mistralai.client.models import RequestSource +value: RequestSource = "api" +``` + ## Values -| Name | Value | -| ------------------ | ------------------ | -| `API` | api | -| `PLAYGROUND` | playground | -| `AGENT_BUILDER_V1` | agent_builder_v1 | \ No newline at end of file +- `"api"` +- `"playground"` +- `"agent_builder_v1"` diff --git a/docs/models/resourcevisibility.md b/docs/models/resourcevisibility.md index 9c06af2d..970211bb 100644 --- a/docs/models/resourcevisibility.md +++ b/docs/models/resourcevisibility.md @@ -1,11 +1,20 @@ # ResourceVisibility +## Example Usage + +```python +from mistralai.client.models import ResourceVisibility + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ResourceVisibility = "shared_global" +``` + ## Values -| Name | Value | -| ------------------ | ------------------ | -| `SHARED_GLOBAL` | shared_global | -| `SHARED_ORG` | shared_org | -| `SHARED_WORKSPACE` | shared_workspace | -| `PRIVATE` | private | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"shared_global"` +- `"shared_org"` +- `"shared_workspace"` +- `"private"` diff --git a/docs/models/responseformats.md b/docs/models/responseformats.md index 2f5f1e55..12e5edd7 100644 --- a/docs/models/responseformats.md +++ b/docs/models/responseformats.md @@ -1,10 +1,19 @@ # ResponseFormats +## Example Usage + +```python +from mistralai.client.models import ResponseFormats + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ResponseFormats = "text" +``` + ## Values -| Name | Value | -| ------------- | ------------- | -| `TEXT` | text | -| `JSON_OBJECT` | json_object | -| `JSON_SCHEMA` | json_schema | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"text"` +- `"json_object"` +- `"json_schema"` diff --git a/docs/models/role.md b/docs/models/role.md index 853c6257..b16f5c3b 100644 --- a/docs/models/role.md +++ b/docs/models/role.md @@ -1,9 +1,18 @@ # Role +## Example Usage + +```python +from mistralai.client.models import Role + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Role = "assistant" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `ASSISTANT` | assistant | -| `USER` | user | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"assistant"` +- `"user"` diff --git a/docs/models/sampletype.md b/docs/models/sampletype.md index 34a6a012..31f26c3c 100644 --- a/docs/models/sampletype.md +++ b/docs/models/sampletype.md @@ -1,12 +1,21 @@ # SampleType +## Example Usage + +```python +from mistralai.client.models import SampleType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SampleType = "pretrain" +``` + ## Values -| Name | Value | -| --------------- | --------------- | -| `PRETRAIN` | pretrain | -| `INSTRUCT` | instruct | -| `BATCH_REQUEST` | batch_request | -| `BATCH_RESULT` | batch_result | -| `BATCH_ERROR` | batch_error | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"pretrain"` +- `"instruct"` +- `"batch_request"` +- `"batch_result"` +- `"batch_error"` diff --git a/docs/models/shareenum.md b/docs/models/shareenum.md index dc5d2b68..d471b7c3 100644 --- a/docs/models/shareenum.md +++ b/docs/models/shareenum.md @@ -1,9 +1,18 @@ # ShareEnum +## Example Usage + +```python +from mistralai.client.models import ShareEnum + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ShareEnum = "Viewer" +``` + ## Values -| Name | Value | -| -------- | -------- | -| `VIEWER` | Viewer | -| `EDITOR` | Editor | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"Viewer"` +- `"Editor"` diff --git a/docs/models/source.md b/docs/models/source.md index bb1ed612..37ca338b 100644 --- a/docs/models/source.md +++ b/docs/models/source.md @@ -1,10 +1,19 @@ # Source +## Example Usage + +```python +from mistralai.client.models import Source + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Source = "upload" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `UPLOAD` | upload | -| `REPOSITORY` | repository | -| `MISTRAL` | mistral | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"upload"` +- `"repository"` +- `"mistral"` diff --git a/docs/models/ssetypes.md b/docs/models/ssetypes.md index ae06b5e8..372eafee 100644 --- a/docs/models/ssetypes.md +++ b/docs/models/ssetypes.md @@ -2,18 +2,27 @@ Server side events sent when streaming a conversation response. +## Example Usage + +```python +from mistralai.client.models import SSETypes + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SSETypes = "conversation.response.started" +``` + ## Values -| Name | Value | -| ------------------------------- | ------------------------------- | -| `CONVERSATION_RESPONSE_STARTED` | conversation.response.started | -| `CONVERSATION_RESPONSE_DONE` | conversation.response.done | -| `CONVERSATION_RESPONSE_ERROR` | conversation.response.error | -| `MESSAGE_OUTPUT_DELTA` | message.output.delta | -| `TOOL_EXECUTION_STARTED` | tool.execution.started | -| `TOOL_EXECUTION_DELTA` | tool.execution.delta | -| `TOOL_EXECUTION_DONE` | tool.execution.done | -| `AGENT_HANDOFF_STARTED` | agent.handoff.started | -| `AGENT_HANDOFF_DONE` | agent.handoff.done | -| `FUNCTION_CALL_DELTA` | function.call.delta | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"conversation.response.started"` +- `"conversation.response.done"` +- `"conversation.response.error"` +- `"message.output.delta"` +- `"tool.execution.started"` +- `"tool.execution.delta"` +- `"tool.execution.done"` +- `"agent.handoff.started"` +- `"agent.handoff.done"` +- `"function.call.delta"` diff --git a/docs/models/supportedoperator.md b/docs/models/supportedoperator.md index 74cf9b8e..97dbd4b1 100644 --- a/docs/models/supportedoperator.md +++ b/docs/models/supportedoperator.md @@ -1,26 +1,35 @@ # SupportedOperator +## Example Usage + +```python +from mistralai.client.models import SupportedOperator + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SupportedOperator = "lt" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `LT` | lt | -| `LTE` | lte | -| `GT` | gt | -| `GTE` | gte | -| `STARTSWITH` | startswith | -| `ISTARTSWITH` | istartswith | -| `ENDSWITH` | endswith | -| `IENDSWITH` | iendswith | -| `CONTAINS` | contains | -| `ICONTAINS` | icontains | -| `MATCHES` | matches | -| `NOTCONTAINS` | notcontains | -| `INOTCONTAINS` | inotcontains | -| `EQ` | eq | -| `NEQ` | neq | -| `ISNULL` | isnull | -| `INCLUDES` | includes | -| `EXCLUDES` | excludes | -| `LEN_EQ` | len_eq | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"lt"` +- `"lte"` +- `"gt"` +- `"gte"` +- `"startswith"` +- `"istartswith"` +- `"endswith"` +- `"iendswith"` +- `"contains"` +- `"icontains"` +- `"matches"` +- `"notcontains"` +- `"inotcontains"` +- `"eq"` +- `"neq"` +- `"isnull"` +- `"includes"` +- `"excludes"` +- `"len_eq"` diff --git a/docs/models/tableformat.md b/docs/models/tableformat.md index 54f029b8..8321a309 100644 --- a/docs/models/tableformat.md +++ b/docs/models/tableformat.md @@ -1,9 +1,14 @@ # TableFormat +## Example Usage + +```python +from mistralai.client.models import TableFormat +value: TableFormat = "markdown" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `MARKDOWN` | markdown | -| `HTML` | html | \ No newline at end of file +- `"markdown"` +- `"html"` diff --git a/docs/models/timestampgranularity.md b/docs/models/timestampgranularity.md index d20012ea..4c84779c 100644 --- a/docs/models/timestampgranularity.md +++ b/docs/models/timestampgranularity.md @@ -1,9 +1,14 @@ # TimestampGranularity +## Example Usage + +```python +from mistralai.client.models import TimestampGranularity +value: TimestampGranularity = "segment" +``` + ## Values -| Name | Value | -| --------- | --------- | -| `SEGMENT` | segment | -| `WORD` | word | \ No newline at end of file +- `"segment"` +- `"word"` diff --git a/docs/models/toolchoiceenum.md b/docs/models/toolchoiceenum.md index 0be3d6c5..eb1f3629 100644 --- a/docs/models/toolchoiceenum.md +++ b/docs/models/toolchoiceenum.md @@ -1,11 +1,20 @@ # ToolChoiceEnum +## Example Usage + +```python +from mistralai.client.models import ToolChoiceEnum + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ToolChoiceEnum = "auto" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `AUTO` | auto | -| `NONE` | none | -| `ANY` | any | -| `REQUIRED` | required | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"auto"` +- `"none"` +- `"any"` +- `"required"` diff --git a/docs/models/tooltypes.md b/docs/models/tooltypes.md index 84e49253..345ee7dc 100644 --- a/docs/models/tooltypes.md +++ b/docs/models/tooltypes.md @@ -1,8 +1,17 @@ # ToolTypes +## Example Usage + +```python +from mistralai.client.models import ToolTypes + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ToolTypes = "function" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"function"` diff --git a/docs/models/transcriptionstreameventtypes.md b/docs/models/transcriptionstreameventtypes.md index e4eb25a6..9e49384e 100644 --- a/docs/models/transcriptionstreameventtypes.md +++ b/docs/models/transcriptionstreameventtypes.md @@ -1,11 +1,20 @@ # TranscriptionStreamEventTypes +## Example Usage + +```python +from mistralai.client.models import TranscriptionStreamEventTypes + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TranscriptionStreamEventTypes = "transcription.language" +``` + ## Values -| Name | Value | -| -------------------------- | -------------------------- | -| `TRANSCRIPTION_LANGUAGE` | transcription.language | -| `TRANSCRIPTION_SEGMENT` | transcription.segment | -| `TRANSCRIPTION_TEXT_DELTA` | transcription.text.delta | -| `TRANSCRIPTION_DONE` | transcription.done | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"transcription.language"` +- `"transcription.segment"` +- `"transcription.text.delta"` +- `"transcription.done"` diff --git a/docs/models/typeenum.md b/docs/models/typeenum.md index 80a66af3..ec47cf96 100644 --- a/docs/models/typeenum.md +++ b/docs/models/typeenum.md @@ -1,14 +1,23 @@ # TypeEnum +## Example Usage + +```python +from mistralai.client.models import TypeEnum + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TypeEnum = "ENUM" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `ENUM` | ENUM | -| `TEXT` | TEXT | -| `INT` | INT | -| `FLOAT` | FLOAT | -| `BOOL` | BOOL | -| `TIMESTAMP` | TIMESTAMP | -| `ARRAY` | ARRAY | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"ENUM"` +- `"TEXT"` +- `"INT"` +- `"FLOAT"` +- `"BOOL"` +- `"TIMESTAMP"` +- `"ARRAY"` diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index 7cd3ed4f..b1b80bdf 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -58,6 +58,7 @@ with Mistral( | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -124,6 +125,7 @@ with Mistral( | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index 5dac2d22..afbbeae4 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -60,6 +60,7 @@ with Mistral( | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | @@ -129,6 +130,7 @@ with Mistral( | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index b8150eb8..f23a09f7 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -8,6 +8,7 @@ * [create](#create) - Create a new connector. * [list](#list) - List all connectors. +* [get_auth_url](#get_auth_url) - Get the auth URL for a connector. * [call_tool](#call_tool) - Call Connector Tool * [get](#get) - Get a connector. * [update](#update) - Update a connector. @@ -104,6 +105,48 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## get_auth_url + +Get the OAuth2 authorization URL for a connector to initiate user authentication. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.get_auth_url(connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.AuthURLResponse](../../models/authurlresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## call_tool Call a tool on an MCP connector. diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 12d94765..e6c73e23 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -34,7 +34,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.start(inputs="", stream=False, completion_args={ + res = mistral.beta.conversations.start(inputs="", completion_args={ "response_format": { "type": "text", }, @@ -50,7 +50,6 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationRequestHandoffExecution]](../../models/conversationrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -212,7 +211,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.append(conversation_id="", stream=False, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.append(conversation_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -229,7 +228,6 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `conversation_id` | *str* | :heavy_check_mark: | ID of the conversation to which we append entries. | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendRequestHandoffExecution]](../../models/conversationappendrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -345,7 +343,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.restart(conversation_id="", from_entry_id="", stream=False, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.restart(conversation_id="", from_entry_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -363,7 +361,6 @@ with Mistral( | `conversation_id` | *str* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -406,7 +403,7 @@ with Mistral( "tool_call_id": "", "result": "", }, - ], stream=True, completion_args={ + ], completion_args={ "response_format": { "type": "text", }, @@ -424,7 +421,6 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | `inputs` | [models.ConversationInputs](../../models/conversationinputs.md) | :heavy_check_mark: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | | `handoff_execution` | [OptionalNullable[models.ConversationStreamRequestHandoffExecution]](../../models/conversationstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `instructions` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -466,7 +462,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.append_stream(conversation_id="", stream=True, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.append_stream(conversation_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -485,7 +481,6 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | `conversation_id` | *str* | :heavy_check_mark: | ID of the conversation to which we append entries. | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationAppendStreamRequestHandoffExecution]](../../models/conversationappendstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | @@ -519,7 +514,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.restart_stream(conversation_id="", from_entry_id="", stream=True, store=True, handoff_execution="server", completion_args={ + res = mistral.beta.conversations.restart_stream(conversation_id="", from_entry_id="", store=True, handoff_execution="server", completion_args={ "response_format": { "type": "text", }, @@ -539,7 +534,6 @@ with Mistral( | `conversation_id` | *str* | :heavy_check_mark: | ID of the original conversation which is being restarted. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `inputs` | [Optional[models.ConversationInputs]](../../models/conversationinputs.md) | :heavy_minus_sign: | N/A | -| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `store` | *Optional[bool]* | :heavy_minus_sign: | Whether to store the results into our servers or not. | | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | diff --git a/pyproject.toml b/pyproject.toml index 0a27366a..e646a5d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.4" +version = "2.0.5" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 42d3fa9d..03ef265b 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.4" +__version__: str = "2.0.5" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.4 2.841.0 1.0.0 mistralai" +__gen_version__: str = "2.862.0" +__user_agent__: str = "speakeasy-sdk/python 2.0.5 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index aecd1430..2e91dd04 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -50,6 +50,7 @@ def complete( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -76,6 +77,7 @@ def complete( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param retries: Override the default retry configuration for this method @@ -116,6 +118,7 @@ def complete( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] @@ -220,6 +223,7 @@ async def complete_async( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -246,6 +250,7 @@ async def complete_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param retries: Override the default retry configuration for this method @@ -286,6 +291,7 @@ async def complete_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] @@ -390,6 +396,7 @@ def stream( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -418,6 +425,7 @@ def stream( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param retries: Override the default retry configuration for this method @@ -458,6 +466,7 @@ def stream( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] @@ -570,6 +579,7 @@ async def stream_async( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -598,6 +608,7 @@ async def stream_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param retries: Override the default retry configuration for this method @@ -638,6 +649,7 @@ async def stream_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index f53c346f..c11a53d1 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -137,6 +137,7 @@ def complete( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -166,6 +167,7 @@ def complete( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. @@ -210,6 +212,7 @@ def complete( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] @@ -316,6 +319,7 @@ async def complete_async( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -345,6 +349,7 @@ async def complete_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. @@ -389,6 +394,7 @@ async def complete_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] @@ -495,6 +501,7 @@ def stream( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -526,6 +533,7 @@ def stream( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. @@ -570,6 +578,7 @@ def stream( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] @@ -684,6 +693,7 @@ async def stream_async( Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] @@ -715,6 +725,7 @@ async def stream_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. @@ -759,6 +770,7 @@ async def stream_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 37e01833..b72ca9a3 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -449,6 +449,192 @@ async def list_async( raise errors.SDKError("Unexpected response received", http_res) + def get_auth_url( + self, + *, + connector_id_or_name: str, + app_return_url: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AuthURLResponse: + r"""Get the auth URL for a connector. + + Get the OAuth2 authorization URL for a connector to initiate user authentication. + + :param connector_id_or_name: + :param app_return_url: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetAuthURLV1Request( + app_return_url=app_return_url, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/auth_url", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_auth_url_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.AuthURLResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_auth_url_async( + self, + *, + connector_id_or_name: str, + app_return_url: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AuthURLResponse: + r"""Get the auth URL for a connector. + + Get the OAuth2 authorization URL for a connector to initiate user authentication. + + :param connector_id_or_name: + :param app_return_url: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetAuthURLV1Request( + app_return_url=app_return_url, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/auth_url", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_auth_url_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.AuthURLResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def call_tool( self, *, diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 99f3a33e..fafcd5f5 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -229,7 +229,6 @@ def start( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = False, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationRequestHandoffExecution @@ -268,7 +267,6 @@ def start( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -298,7 +296,6 @@ def start( request = models.ConversationRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -383,7 +380,6 @@ async def start_async( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = False, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationRequestHandoffExecution @@ -422,7 +418,6 @@ async def start_async( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -452,7 +447,6 @@ async def start_async( request = models.ConversationRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -1096,7 +1090,6 @@ def append( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendRequestHandoffExecution @@ -1121,7 +1114,6 @@ def append( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1147,7 +1139,6 @@ def append( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1231,7 +1222,6 @@ async def append_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendRequestHandoffExecution @@ -1256,7 +1246,6 @@ async def append_async( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1282,7 +1271,6 @@ async def append_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1727,7 +1715,6 @@ def restart( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartRequestHandoffExecution @@ -1757,7 +1744,6 @@ def restart( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1785,7 +1771,6 @@ def restart( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -1872,7 +1857,6 @@ async def restart_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = False, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartRequestHandoffExecution @@ -1902,7 +1886,6 @@ async def restart_async( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -1930,7 +1913,6 @@ async def restart_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2013,7 +1995,6 @@ def start_stream( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = True, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationStreamRequestHandoffExecution @@ -2052,7 +2033,6 @@ def start_stream( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -2082,7 +2062,6 @@ def start_stream( request = models.ConversationStreamRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -2174,7 +2153,6 @@ async def start_stream_async( self, *, inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], - stream: Optional[bool] = True, store: OptionalNullable[bool] = UNSET, handoff_execution: OptionalNullable[ models.ConversationStreamRequestHandoffExecution @@ -2213,7 +2191,6 @@ async def start_stream_async( Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation. :param inputs: - :param stream: :param store: :param handoff_execution: :param instructions: @@ -2243,7 +2220,6 @@ async def start_stream_async( request = models.ConversationStreamRequest( inputs=utils.get_pydantic_model(inputs, models.ConversationInputs), - stream=stream, store=store, handoff_execution=handoff_execution, instructions=instructions, @@ -2338,7 +2314,6 @@ def append_stream( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendStreamRequestHandoffExecution @@ -2363,7 +2338,6 @@ def append_stream( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2389,7 +2363,6 @@ def append_stream( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2480,7 +2453,6 @@ async def append_stream_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationAppendStreamRequestHandoffExecution @@ -2505,7 +2477,6 @@ async def append_stream_async( :param conversation_id: ID of the conversation to which we append entries. :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2531,7 +2502,6 @@ async def append_stream_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2623,7 +2593,6 @@ def restart_stream( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartStreamRequestHandoffExecution @@ -2653,7 +2622,6 @@ def restart_stream( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2681,7 +2649,6 @@ def restart_stream( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( @@ -2775,7 +2742,6 @@ async def restart_stream_async( inputs: Optional[ Union[models.ConversationInputs, models.ConversationInputsTypedDict] ] = None, - stream: Optional[bool] = True, store: Optional[bool] = True, handoff_execution: Optional[ models.ConversationRestartStreamRequestHandoffExecution @@ -2805,7 +2771,6 @@ async def restart_stream_async( :param conversation_id: ID of the original conversation which is being restarted. :param from_entry_id: :param inputs: - :param stream: :param store: Whether to store the results into our servers or not. :param handoff_execution: :param completion_args: White-listed arguments from the completion API @@ -2833,7 +2798,6 @@ async def restart_stream_async( inputs=utils.get_pydantic_model( inputs, Optional[models.ConversationInputs] ), - stream=stream, store=store, handoff_execution=handoff_execution, completion_args=utils.get_pydantic_model( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 82bb5c99..7e9c7f60 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -165,6 +165,7 @@ AudioTranscriptionRequestStreamTypedDict, ) from .authdata import AuthData, AuthDataTypedDict + from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, BaseFieldDefinitionTypedDict, @@ -335,6 +336,10 @@ ConnectorDeleteV1Request, ConnectorDeleteV1RequestTypedDict, ) + from .connector_get_auth_url_v1op import ( + ConnectorGetAuthURLV1Request, + ConnectorGetAuthURLV1RequestTypedDict, + ) from .connector_get_v1op import ( ConnectorGetV1Request, ConnectorGetV1RequestTypedDict, @@ -1206,6 +1211,7 @@ RealtimeTranscriptionSessionUpdatePayload, RealtimeTranscriptionSessionUpdatePayloadTypedDict, ) + from .reasoningeffort import ReasoningEffort from .referencechunk import ( ReferenceChunk, ReferenceChunkTypedDict, @@ -1556,6 +1562,8 @@ "AudioTranscriptionRequestTypedDict", "AuthData", "AuthDataTypedDict", + "AuthURLResponse", + "AuthURLResponseTypedDict", "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", @@ -1683,6 +1691,8 @@ "ConnectorCallToolV1RequestTypedDict", "ConnectorDeleteV1Request", "ConnectorDeleteV1RequestTypedDict", + "ConnectorGetAuthURLV1Request", + "ConnectorGetAuthURLV1RequestTypedDict", "ConnectorGetV1Request", "ConnectorGetV1RequestTypedDict", "ConnectorListV1Request", @@ -2264,6 +2274,7 @@ "RealtimeTranscriptionSessionUpdatePayloadTypedDict", "RealtimeTranscriptionSessionUpdated", "RealtimeTranscriptionSessionUpdatedTypedDict", + "ReasoningEffort", "ReferenceChunk", "ReferenceChunkTypedDict", "ReferenceID", @@ -2566,6 +2577,8 @@ "AudioTranscriptionRequestStreamTypedDict": ".audiotranscriptionrequeststream", "AuthData": ".authdata", "AuthDataTypedDict": ".authdata", + "AuthURLResponse": ".authurlresponse", + "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", "BaseFieldDefinitionTypedDict": ".basefielddefinition", "SupportedOperator": ".basefielddefinition", @@ -2697,6 +2710,8 @@ "ConnectorCallToolV1RequestTypedDict": ".connector_call_tool_v1op", "ConnectorDeleteV1Request": ".connector_delete_v1op", "ConnectorDeleteV1RequestTypedDict": ".connector_delete_v1op", + "ConnectorGetAuthURLV1Request": ".connector_get_auth_url_v1op", + "ConnectorGetAuthURLV1RequestTypedDict": ".connector_get_auth_url_v1op", "ConnectorGetV1Request": ".connector_get_v1op", "ConnectorGetV1RequestTypedDict": ".connector_get_v1op", "ConnectorListV1Request": ".connector_list_v1op", @@ -3296,6 +3311,7 @@ "RealtimeTranscriptionSessionUpdateMessageTypedDict": ".realtimetranscriptionsessionupdatemessage", "RealtimeTranscriptionSessionUpdatePayload": ".realtimetranscriptionsessionupdatepayload", "RealtimeTranscriptionSessionUpdatePayloadTypedDict": ".realtimetranscriptionsessionupdatepayload", + "ReasoningEffort": ".reasoningeffort", "ReferenceChunk": ".referencechunk", "ReferenceChunkTypedDict": ".referencechunk", "ReferenceID": ".referencechunk", diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 068b3226..36cb26bf 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -184,7 +184,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentconversation.py b/src/mistralai/client/models/agentconversation.py index da30c663..b52f5e5a 100644 --- a/src/mistralai/client/models/agentconversation.py +++ b/src/mistralai/client/models/agentconversation.py @@ -82,7 +82,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agenthandoffdoneevent.py b/src/mistralai/client/models/agenthandoffdoneevent.py index e2609e3d..ea9cd6b2 100644 --- a/src/mistralai/client/models/agenthandoffdoneevent.py +++ b/src/mistralai/client/models/agenthandoffdoneevent.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agenthandoffentry.py b/src/mistralai/client/models/agenthandoffentry.py index f92ef2cc..8d1c143e 100644 --- a/src/mistralai/client/models/agenthandoffentry.py +++ b/src/mistralai/client/models/agenthandoffentry.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agenthandoffstartedevent.py b/src/mistralai/client/models/agenthandoffstartedevent.py index 2a402341..9525bcf6 100644 --- a/src/mistralai/client/models/agenthandoffstartedevent.py +++ b/src/mistralai/client/models/agenthandoffstartedevent.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agents_api_v1_agents_getop.py b/src/mistralai/client/models/agents_api_v1_agents_getop.py index dd17580d..dee6a347 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_getop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_getop.py @@ -49,7 +49,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py b/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py index 54b62e90..25ea29e3 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_list_versionsop.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/agents_api_v1_agents_listop.py b/src/mistralai/client/models/agents_api_v1_agents_listop.py index 97b1c7f1..100e0da7 100644 --- a/src/mistralai/client/models/agents_api_v1_agents_listop.py +++ b/src/mistralai/client/models/agents_api_v1_agents_listop.py @@ -98,7 +98,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agents_api_v1_conversations_listop.py b/src/mistralai/client/models/agents_api_v1_conversations_listop.py index 8bf66aea..dd6276d9 100644 --- a/src/mistralai/client/models/agents_api_v1_conversations_listop.py +++ b/src/mistralai/client/models/agents_api_v1_conversations_listop.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index 7d38f6b0..f4ce34cb 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -6,6 +6,7 @@ from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -98,6 +99,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): prediction: NotRequired[PredictionTypedDict] r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] @@ -145,6 +147,8 @@ class AgentsCompletionRequest(BaseModel): parallel_tool_calls: Optional[bool] = None + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" @@ -167,6 +171,7 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", "guardrails", ] @@ -178,6 +183,7 @@ def serialize_model(self, handler): "metadata", "tools", "n", + "reasoning_effort", "prompt_mode", "guardrails", ] @@ -187,7 +193,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index ea83a8ff..0feb3803 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -6,6 +6,7 @@ from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -97,6 +98,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): prediction: NotRequired[PredictionTypedDict] r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] @@ -143,6 +145,8 @@ class AgentsCompletionStreamRequest(BaseModel): parallel_tool_calls: Optional[bool] = None + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" @@ -165,6 +169,7 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", "guardrails", ] @@ -176,6 +181,7 @@ def serialize_model(self, handler): "metadata", "tools", "n", + "reasoning_effort", "prompt_mode", "guardrails", ] @@ -185,7 +191,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/annotations.py b/src/mistralai/client/models/annotations.py index ba085e2c..f3f5c21c 100644 --- a/src/mistralai/client/models/annotations.py +++ b/src/mistralai/client/models/annotations.py @@ -57,8 +57,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/archivemodelresponse.py b/src/mistralai/client/models/archivemodelresponse.py index f1116850..c5ca8ff5 100644 --- a/src/mistralai/client/models/archivemodelresponse.py +++ b/src/mistralai/client/models/archivemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/assistantmessage.py b/src/mistralai/client/models/assistantmessage.py index 26a778c7..f333a444 100644 --- a/src/mistralai/client/models/assistantmessage.py +++ b/src/mistralai/client/models/assistantmessage.py @@ -61,7 +61,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiocontent.py b/src/mistralai/client/models/audiocontent.py index b0a9505b..2d38d2a1 100644 --- a/src/mistralai/client/models/audiocontent.py +++ b/src/mistralai/client/models/audiocontent.py @@ -68,8 +68,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiotranscriptionrequest.py b/src/mistralai/client/models/audiotranscriptionrequest.py index fe4c79e3..734860d5 100644 --- a/src/mistralai/client/models/audiotranscriptionrequest.py +++ b/src/mistralai/client/models/audiotranscriptionrequest.py @@ -94,7 +94,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/audiotranscriptionrequeststream.py b/src/mistralai/client/models/audiotranscriptionrequeststream.py index 2d1e9269..84c4dbcd 100644 --- a/src/mistralai/client/models/audiotranscriptionrequeststream.py +++ b/src/mistralai/client/models/audiotranscriptionrequeststream.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/authurlresponse.py b/src/mistralai/client/models/authurlresponse.py new file mode 100644 index 00000000..1f5a6639 --- /dev/null +++ b/src/mistralai/client/models/authurlresponse.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a2b468c87a8a + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class AuthURLResponseTypedDict(TypedDict): + auth_url: str + ttl: int + + +class AuthURLResponse(BaseModel): + auth_url: str + + ttl: int diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index f8b8faf7..b57ff2ca 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -83,7 +83,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/basemodelcard.py b/src/mistralai/client/models/basemodelcard.py index 6a1c7bc2..bb3c99dd 100644 --- a/src/mistralai/client/models/basemodelcard.py +++ b/src/mistralai/client/models/basemodelcard.py @@ -101,7 +101,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/batcherror.py b/src/mistralai/client/models/batcherror.py index 8a353cd2..a0add5ad 100644 --- a/src/mistralai/client/models/batcherror.py +++ b/src/mistralai/client/models/batcherror.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/batchjob.py b/src/mistralai/client/models/batchjob.py index 80acac33..9cef4380 100644 --- a/src/mistralai/client/models/batchjob.py +++ b/src/mistralai/client/models/batchjob.py @@ -115,7 +115,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/batchrequest.py b/src/mistralai/client/models/batchrequest.py index 911a9a05..dcc47bd2 100644 --- a/src/mistralai/client/models/batchrequest.py +++ b/src/mistralai/client/models/batchrequest.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/blobresourcecontents.py b/src/mistralai/client/models/blobresourcecontents.py index c2a55f95..bfae16fb 100644 --- a/src/mistralai/client/models/blobresourcecontents.py +++ b/src/mistralai/client/models/blobresourcecontents.py @@ -61,8 +61,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/campaign.py b/src/mistralai/client/models/campaign.py index a52bfcb9..62427fa0 100644 --- a/src/mistralai/client/models/campaign.py +++ b/src/mistralai/client/models/campaign.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index a0e1b9ed..f1b0b2d6 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -6,6 +6,7 @@ from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -107,6 +108,7 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] @@ -165,6 +167,8 @@ class ChatCompletionRequest(BaseModel): parallel_tool_calls: Optional[bool] = None r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" @@ -192,6 +196,7 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", "guardrails", "safe_prompt", @@ -205,6 +210,7 @@ def serialize_model(self, handler): "metadata", "tools", "n", + "reasoning_effort", "prompt_mode", "guardrails", ] @@ -214,7 +220,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index 32b49e80..d9f413c6 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -6,6 +6,7 @@ from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -106,6 +107,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] @@ -163,6 +165,8 @@ class ChatCompletionStreamRequest(BaseModel): parallel_tool_calls: Optional[bool] = None r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" @@ -190,6 +194,7 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", "guardrails", "safe_prompt", @@ -203,6 +208,7 @@ def serialize_model(self, handler): "metadata", "tools", "n", + "reasoning_effort", "prompt_mode", "guardrails", ] @@ -212,7 +218,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classificationrequest.py b/src/mistralai/client/models/classificationrequest.py index 25b69413..4300f9ad 100644 --- a/src/mistralai/client/models/classificationrequest.py +++ b/src/mistralai/client/models/classificationrequest.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetunedmodel.py b/src/mistralai/client/models/classifierfinetunedmodel.py index fbcf5892..7c2bfc80 100644 --- a/src/mistralai/client/models/classifierfinetunedmodel.py +++ b/src/mistralai/client/models/classifierfinetunedmodel.py @@ -94,7 +94,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetuningjob.py b/src/mistralai/client/models/classifierfinetuningjob.py index fb160cf8..5a5f8a48 100644 --- a/src/mistralai/client/models/classifierfinetuningjob.py +++ b/src/mistralai/client/models/classifierfinetuningjob.py @@ -178,7 +178,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifierfinetuningjobdetails.py b/src/mistralai/client/models/classifierfinetuningjobdetails.py index 5d73f55e..dcdd62b3 100644 --- a/src/mistralai/client/models/classifierfinetuningjobdetails.py +++ b/src/mistralai/client/models/classifierfinetuningjobdetails.py @@ -174,7 +174,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifiertarget.py b/src/mistralai/client/models/classifiertarget.py index 4d66d789..bfd5646e 100644 --- a/src/mistralai/client/models/classifiertarget.py +++ b/src/mistralai/client/models/classifiertarget.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/classifiertrainingparameters.py b/src/mistralai/client/models/classifiertrainingparameters.py index 14fa4926..3a9576c8 100644 --- a/src/mistralai/client/models/classifiertrainingparameters.py +++ b/src/mistralai/client/models/classifiertrainingparameters.py @@ -56,7 +56,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/codeinterpretertool.py b/src/mistralai/client/models/codeinterpretertool.py index ce14265f..4cf9d055 100644 --- a/src/mistralai/client/models/codeinterpretertool.py +++ b/src/mistralai/client/models/codeinterpretertool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionargs.py b/src/mistralai/client/models/completionargs.py index ab5cf5ff..76c4cf98 100644 --- a/src/mistralai/client/models/completionargs.py +++ b/src/mistralai/client/models/completionargs.py @@ -90,7 +90,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionchunk.py b/src/mistralai/client/models/completionchunk.py index 5fd6c173..27029b6f 100644 --- a/src/mistralai/client/models/completionchunk.py +++ b/src/mistralai/client/models/completionchunk.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/completionfinetunedmodel.py b/src/mistralai/client/models/completionfinetunedmodel.py index 54a1c165..e75b8d2f 100644 --- a/src/mistralai/client/models/completionfinetunedmodel.py +++ b/src/mistralai/client/models/completionfinetunedmodel.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionfinetuningjob.py b/src/mistralai/client/models/completionfinetuningjob.py index 1bf0a730..bbcf7732 100644 --- a/src/mistralai/client/models/completionfinetuningjob.py +++ b/src/mistralai/client/models/completionfinetuningjob.py @@ -204,7 +204,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionfinetuningjobdetails.py b/src/mistralai/client/models/completionfinetuningjobdetails.py index cb787021..8aa8b75d 100644 --- a/src/mistralai/client/models/completionfinetuningjobdetails.py +++ b/src/mistralai/client/models/completionfinetuningjobdetails.py @@ -193,7 +193,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/completionresponsestreamchoice.py b/src/mistralai/client/models/completionresponsestreamchoice.py index a52ae892..ef1a106b 100644 --- a/src/mistralai/client/models/completionresponsestreamchoice.py +++ b/src/mistralai/client/models/completionresponsestreamchoice.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/completiontrainingparameters.py b/src/mistralai/client/models/completiontrainingparameters.py index ca50a7ad..b91ec9df 100644 --- a/src/mistralai/client/models/completiontrainingparameters.py +++ b/src/mistralai/client/models/completiontrainingparameters.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py index 967e454f..55730274 100644 --- a/src/mistralai/client/models/connector.py +++ b/src/mistralai/client/models/connector.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connector_get_auth_url_v1op.py b/src/mistralai/client/models/connector_get_auth_url_v1op.py new file mode 100644 index 00000000..f8f5fd78 --- /dev/null +++ b/src/mistralai/client/models/connector_get_auth_url_v1op.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2e6b9ab43d1d + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorGetAuthURLV1RequestTypedDict(TypedDict): + connector_id_or_name: str + app_return_url: NotRequired[Nullable[str]] + + +class ConnectorGetAuthURLV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + app_return_url: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["app_return_url"]) + nullable_fields = set(["app_return_url"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_get_v1op.py b/src/mistralai/client/models/connector_get_v1op.py index 5770ee09..780afac9 100644 --- a/src/mistralai/client/models/connector_get_v1op.py +++ b/src/mistralai/client/models/connector_get_v1op.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/connector_list_v1op.py b/src/mistralai/client/models/connector_list_v1op.py index a89da710..3cb31bf7 100644 --- a/src/mistralai/client/models/connector_list_v1op.py +++ b/src/mistralai/client/models/connector_list_v1op.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectorcalltoolrequest.py b/src/mistralai/client/models/connectorcalltoolrequest.py index 4e9a4d45..85366bb6 100644 --- a/src/mistralai/client/models/connectorcalltoolrequest.py +++ b/src/mistralai/client/models/connectorcalltoolrequest.py @@ -27,7 +27,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/connectorsqueryfilters.py b/src/mistralai/client/models/connectorsqueryfilters.py index 1aea18b0..f10d6897 100644 --- a/src/mistralai/client/models/connectorsqueryfilters.py +++ b/src/mistralai/client/models/connectorsqueryfilters.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortool.py b/src/mistralai/client/models/connectortool.py index 26a8b7b7..e8a036c7 100644 --- a/src/mistralai/client/models/connectortool.py +++ b/src/mistralai/client/models/connectortool.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolcallmetadata.py b/src/mistralai/client/models/connectortoolcallmetadata.py index 9f3be6c4..0280eae0 100644 --- a/src/mistralai/client/models/connectortoolcallmetadata.py +++ b/src/mistralai/client/models/connectortoolcallmetadata.py @@ -60,8 +60,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolcallresponse.py b/src/mistralai/client/models/connectortoolcallresponse.py index 47071a94..76abe558 100644 --- a/src/mistralai/client/models/connectortoolcallresponse.py +++ b/src/mistralai/client/models/connectortoolcallresponse.py @@ -129,8 +129,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/connectortoolresultmetadata.py b/src/mistralai/client/models/connectortoolresultmetadata.py index 520fb99b..8c92f2f8 100644 --- a/src/mistralai/client/models/connectortoolresultmetadata.py +++ b/src/mistralai/client/models/connectortoolresultmetadata.py @@ -58,8 +58,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/conversationappendrequest.py b/src/mistralai/client/models/conversationappendrequest.py index 386714fd..6d310816 100644 --- a/src/mistralai/client/models/conversationappendrequest.py +++ b/src/mistralai/client/models/conversationappendrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict ConversationAppendRequestHandoffExecution = Literal[ @@ -25,7 +28,7 @@ class ConversationAppendRequestTypedDict(TypedDict): inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[False] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationAppendRequestHandoffExecution] @@ -37,7 +40,10 @@ class ConversationAppendRequestTypedDict(TypedDict): class ConversationAppendRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = False + stream: Annotated[ + Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], + pydantic.Field(alias="stream"), + ] = False store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -67,7 +73,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -82,3 +88,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationAppendRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationappendstreamrequest.py b/src/mistralai/client/models/conversationappendstreamrequest.py index 32f6b148..b65f1e82 100644 --- a/src/mistralai/client/models/conversationappendstreamrequest.py +++ b/src/mistralai/client/models/conversationappendstreamrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict ConversationAppendStreamRequestHandoffExecution = Literal[ @@ -25,7 +28,7 @@ class ConversationAppendStreamRequestTypedDict(TypedDict): inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[True] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationAppendStreamRequestHandoffExecution] @@ -37,7 +40,10 @@ class ConversationAppendStreamRequestTypedDict(TypedDict): class ConversationAppendStreamRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = True + stream: Annotated[ + Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], + pydantic.Field(alias="stream"), + ] = True store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -69,7 +75,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -84,3 +90,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationAppendStreamRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationhistory.py b/src/mistralai/client/models/conversationhistory.py index ceef115b..2e812bb8 100644 --- a/src/mistralai/client/models/conversationhistory.py +++ b/src/mistralai/client/models/conversationhistory.py @@ -74,7 +74,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/conversationmessages.py b/src/mistralai/client/models/conversationmessages.py index 84664b62..a7e13c71 100644 --- a/src/mistralai/client/models/conversationmessages.py +++ b/src/mistralai/client/models/conversationmessages.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index 299b41fc..94fcb03b 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -19,7 +19,10 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import Field, model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -70,7 +73,7 @@ class ConversationRequestTypedDict(TypedDict): inputs: ConversationInputsTypedDict - stream: NotRequired[bool] + stream: Literal[False] store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] @@ -88,7 +91,10 @@ class ConversationRequestTypedDict(TypedDict): class ConversationRequest(BaseModel): inputs: ConversationInputs - stream: Optional[bool] = False + stream: Annotated[ + Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], + pydantic.Field(alias="stream"), + ] = False store: OptionalNullable[bool] = UNSET @@ -154,7 +160,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -169,3 +175,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationresponse.py b/src/mistralai/client/models/conversationresponse.py index d1f8ac4b..64437b23 100644 --- a/src/mistralai/client/models/conversationresponse.py +++ b/src/mistralai/client/models/conversationresponse.py @@ -77,7 +77,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/conversationrestartrequest.py b/src/mistralai/client/models/conversationrestartrequest.py index d5079689..b6b03f1f 100644 --- a/src/mistralai/client/models/conversationrestartrequest.py +++ b/src/mistralai/client/models/conversationrestartrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict ConversationRestartRequestHandoffExecution = Literal[ @@ -40,7 +43,7 @@ class ConversationRestartRequestTypedDict(TypedDict): from_entry_id: str inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[False] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationRestartRequestHandoffExecution] @@ -62,7 +65,10 @@ class ConversationRestartRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = False + stream: Annotated[ + Annotated[Optional[Literal[False]], AfterValidator(validate_const(False))], + pydantic.Field(alias="stream"), + ] = False store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -100,7 +106,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -115,3 +121,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationRestartRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationrestartstreamrequest.py b/src/mistralai/client/models/conversationrestartstreamrequest.py index 5cea4146..41b7098f 100644 --- a/src/mistralai/client/models/conversationrestartstreamrequest.py +++ b/src/mistralai/client/models/conversationrestartstreamrequest.py @@ -12,9 +12,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict ConversationRestartStreamRequestHandoffExecution = Literal[ @@ -40,7 +43,7 @@ class ConversationRestartStreamRequestTypedDict(TypedDict): from_entry_id: str inputs: NotRequired[ConversationInputsTypedDict] - stream: NotRequired[bool] + stream: Literal[True] store: NotRequired[bool] r"""Whether to store the results into our servers or not.""" handoff_execution: NotRequired[ConversationRestartStreamRequestHandoffExecution] @@ -62,7 +65,10 @@ class ConversationRestartStreamRequest(BaseModel): inputs: Optional[ConversationInputs] = None - stream: Optional[bool] = True + stream: Annotated[ + Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], + pydantic.Field(alias="stream"), + ] = True store: Optional[bool] = True r"""Whether to store the results into our servers or not.""" @@ -104,7 +110,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -119,3 +125,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationRestartStreamRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index 9404e32c..a1afb267 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -19,7 +19,10 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import Field, model_serializer +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -70,7 +73,7 @@ class ConversationStreamRequestTypedDict(TypedDict): inputs: ConversationInputsTypedDict - stream: NotRequired[bool] + stream: Literal[True] store: NotRequired[Nullable[bool]] handoff_execution: NotRequired[Nullable[ConversationStreamRequestHandoffExecution]] instructions: NotRequired[Nullable[str]] @@ -88,7 +91,10 @@ class ConversationStreamRequestTypedDict(TypedDict): class ConversationStreamRequest(BaseModel): inputs: ConversationInputs - stream: Optional[bool] = True + stream: Annotated[ + Annotated[Optional[Literal[True]], AfterValidator(validate_const(True))], + pydantic.Field(alias="stream"), + ] = True store: OptionalNullable[bool] = UNSET @@ -156,7 +162,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -171,3 +177,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ConversationStreamRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationusageinfo.py b/src/mistralai/client/models/conversationusageinfo.py index 1e80f89e..e717284f 100644 --- a/src/mistralai/client/models/conversationusageinfo.py +++ b/src/mistralai/client/models/conversationusageinfo.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index 1e0cb7b6..b434619d 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -120,7 +120,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createbatchjobrequest.py b/src/mistralai/client/models/createbatchjobrequest.py index 9a901fef..6ff1e496 100644 --- a/src/mistralai/client/models/createbatchjobrequest.py +++ b/src/mistralai/client/models/createbatchjobrequest.py @@ -71,7 +71,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createconnectorrequest.py b/src/mistralai/client/models/createconnectorrequest.py index 8fd3d3ab..52ebc0be 100644 --- a/src/mistralai/client/models/createconnectorrequest.py +++ b/src/mistralai/client/models/createconnectorrequest.py @@ -69,7 +69,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createfileresponse.py b/src/mistralai/client/models/createfileresponse.py index 1f03b275..bafefc37 100644 --- a/src/mistralai/client/models/createfileresponse.py +++ b/src/mistralai/client/models/createfileresponse.py @@ -84,7 +84,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createfinetuningjobrequest.py b/src/mistralai/client/models/createfinetuningjobrequest.py index be97bd07..1f9c1e15 100644 --- a/src/mistralai/client/models/createfinetuningjobrequest.py +++ b/src/mistralai/client/models/createfinetuningjobrequest.py @@ -132,7 +132,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/creategithubrepositoryrequest.py b/src/mistralai/client/models/creategithubrepositoryrequest.py index 61ffde27..a3f6cd61 100644 --- a/src/mistralai/client/models/creategithubrepositoryrequest.py +++ b/src/mistralai/client/models/creategithubrepositoryrequest.py @@ -51,7 +51,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/createlibraryrequest.py b/src/mistralai/client/models/createlibraryrequest.py index 58874e01..28dda0cb 100644 --- a/src/mistralai/client/models/createlibraryrequest.py +++ b/src/mistralai/client/models/createlibraryrequest.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/customconnector.py b/src/mistralai/client/models/customconnector.py index 23cddfc1..f3a1e2ff 100644 --- a/src/mistralai/client/models/customconnector.py +++ b/src/mistralai/client/models/customconnector.py @@ -85,7 +85,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/dataset.py b/src/mistralai/client/models/dataset.py index 2acd911d..08ce979e 100644 --- a/src/mistralai/client/models/dataset.py +++ b/src/mistralai/client/models/dataset.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/datasetimporttask.py b/src/mistralai/client/models/datasetimporttask.py index 4ef52e9e..e8d90f12 100644 --- a/src/mistralai/client/models/datasetimporttask.py +++ b/src/mistralai/client/models/datasetimporttask.py @@ -58,7 +58,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/datasetpreview.py b/src/mistralai/client/models/datasetpreview.py index 55493568..90676245 100644 --- a/src/mistralai/client/models/datasetpreview.py +++ b/src/mistralai/client/models/datasetpreview.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/datasetrecord.py b/src/mistralai/client/models/datasetrecord.py index 9c9f42e5..39c92cce 100644 --- a/src/mistralai/client/models/datasetrecord.py +++ b/src/mistralai/client/models/datasetrecord.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/deletemodelresponse.py b/src/mistralai/client/models/deletemodelresponse.py index fac884bc..4bc6c5e6 100644 --- a/src/mistralai/client/models/deletemodelresponse.py +++ b/src/mistralai/client/models/deletemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/deltamessage.py b/src/mistralai/client/models/deltamessage.py index d9fa230e..3823651b 100644 --- a/src/mistralai/client/models/deltamessage.py +++ b/src/mistralai/client/models/deltamessage.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/document.py b/src/mistralai/client/models/document.py index fcc5bca5..8d1aea88 100644 --- a/src/mistralai/client/models/document.py +++ b/src/mistralai/client/models/document.py @@ -114,7 +114,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/documentlibrarytool.py b/src/mistralai/client/models/documentlibrarytool.py index 642c3202..29f8d64a 100644 --- a/src/mistralai/client/models/documentlibrarytool.py +++ b/src/mistralai/client/models/documentlibrarytool.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/documenturlchunk.py b/src/mistralai/client/models/documenturlchunk.py index 43444d98..f7a99ff8 100644 --- a/src/mistralai/client/models/documenturlchunk.py +++ b/src/mistralai/client/models/documenturlchunk.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddedresource.py b/src/mistralai/client/models/embeddedresource.py index 54cb17fd..e16fedf8 100644 --- a/src/mistralai/client/models/embeddedresource.py +++ b/src/mistralai/client/models/embeddedresource.py @@ -84,8 +84,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddingrequest.py b/src/mistralai/client/models/embeddingrequest.py index 5fa2d2f6..2ef747d8 100644 --- a/src/mistralai/client/models/embeddingrequest.py +++ b/src/mistralai/client/models/embeddingrequest.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/embeddingresponsedata.py b/src/mistralai/client/models/embeddingresponsedata.py index 098cfae0..03b23a7c 100644 --- a/src/mistralai/client/models/embeddingresponsedata.py +++ b/src/mistralai/client/models/embeddingresponsedata.py @@ -29,7 +29,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/event.py b/src/mistralai/client/models/event.py index c40ae2b1..01157dfa 100644 --- a/src/mistralai/client/models/event.py +++ b/src/mistralai/client/models/event.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/feedresultchatcompletioneventpreview.py b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py index e87e007e..bf248758 100644 --- a/src/mistralai/client/models/feedresultchatcompletioneventpreview.py +++ b/src/mistralai/client/models/feedresultchatcompletioneventpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py index d3cbd653..92c29e22 100644 --- a/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py +++ b/src/mistralai/client/models/fetchchatcompletionfieldoptionsresponse.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fetchfieldoptioncountsrequest.py b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py index 19698b9b..e310f660 100644 --- a/src/mistralai/client/models/fetchfieldoptioncountsrequest.py +++ b/src/mistralai/client/models/fetchfieldoptioncountsrequest.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/file.py b/src/mistralai/client/models/file.py index 1b0ea1d4..528bc13a 100644 --- a/src/mistralai/client/models/file.py +++ b/src/mistralai/client/models/file.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/filechunk.py b/src/mistralai/client/models/filechunk.py index 5c8d2646..6c9c8b0e 100644 --- a/src/mistralai/client/models/filechunk.py +++ b/src/mistralai/client/models/filechunk.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py index 64cd6ac5..326dd1d3 100644 --- a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py +++ b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/files_api_routes_list_filesop.py b/src/mistralai/client/models/files_api_routes_list_filesop.py index b03e2f88..e18eaa6a 100644 --- a/src/mistralai/client/models/files_api_routes_list_filesop.py +++ b/src/mistralai/client/models/files_api_routes_list_filesop.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/files_api_routes_upload_fileop.py b/src/mistralai/client/models/files_api_routes_upload_fileop.py index b6683639..25efcff2 100644 --- a/src/mistralai/client/models/files_api_routes_upload_fileop.py +++ b/src/mistralai/client/models/files_api_routes_upload_fileop.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fileschema.py b/src/mistralai/client/models/fileschema.py index 11caa083..ce64a16b 100644 --- a/src/mistralai/client/models/fileschema.py +++ b/src/mistralai/client/models/fileschema.py @@ -84,7 +84,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/filtergroup.py b/src/mistralai/client/models/filtergroup.py index 06616a01..4e9815b7 100644 --- a/src/mistralai/client/models/filtergroup.py +++ b/src/mistralai/client/models/filtergroup.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/filterpayload.py b/src/mistralai/client/models/filterpayload.py index 188375f1..ced355f1 100644 --- a/src/mistralai/client/models/filterpayload.py +++ b/src/mistralai/client/models/filterpayload.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/fimcompletionrequest.py b/src/mistralai/client/models/fimcompletionrequest.py index ea877213..2ca34598 100644 --- a/src/mistralai/client/models/fimcompletionrequest.py +++ b/src/mistralai/client/models/fimcompletionrequest.py @@ -113,7 +113,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/fimcompletionstreamrequest.py b/src/mistralai/client/models/fimcompletionstreamrequest.py index e80efc09..9c91083c 100644 --- a/src/mistralai/client/models/fimcompletionstreamrequest.py +++ b/src/mistralai/client/models/fimcompletionstreamrequest.py @@ -111,7 +111,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/finetunedmodelcapabilities.py b/src/mistralai/client/models/finetunedmodelcapabilities.py index 2f4cca0b..b9ad2f9e 100644 --- a/src/mistralai/client/models/finetunedmodelcapabilities.py +++ b/src/mistralai/client/models/finetunedmodelcapabilities.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/ftmodelcard.py b/src/mistralai/client/models/ftmodelcard.py index 3874cec2..bb7c52c8 100644 --- a/src/mistralai/client/models/ftmodelcard.py +++ b/src/mistralai/client/models/ftmodelcard.py @@ -115,7 +115,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/function.py b/src/mistralai/client/models/function.py index 1da1dcc9..8a3267e8 100644 --- a/src/mistralai/client/models/function.py +++ b/src/mistralai/client/models/function.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/functioncallentry.py b/src/mistralai/client/models/functioncallentry.py index d05fad85..a88d87ab 100644 --- a/src/mistralai/client/models/functioncallentry.py +++ b/src/mistralai/client/models/functioncallentry.py @@ -101,7 +101,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/functioncallevent.py b/src/mistralai/client/models/functioncallevent.py index 849eed76..6e3c0715 100644 --- a/src/mistralai/client/models/functioncallevent.py +++ b/src/mistralai/client/models/functioncallevent.py @@ -80,7 +80,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/functionresultentry.py b/src/mistralai/client/models/functionresultentry.py index 01e2e36f..11576522 100644 --- a/src/mistralai/client/models/functionresultentry.py +++ b/src/mistralai/client/models/functionresultentry.py @@ -61,7 +61,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py index e1b04950..9db415bf 100644 --- a/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py +++ b/src/mistralai/client/models/get_campaign_selected_events_v1_observability_campaigns_campaign_id_selected_events_getop.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py index a6a329c7..4ff0c307 100644 --- a/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py +++ b/src/mistralai/client/models/get_campaigns_v1_observability_campaigns_getop.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py index 5a8b7450..b4af68e0 100644 --- a/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py +++ b/src/mistralai/client/models/get_chat_completion_events_v1_observability_chat_completion_events_search_postop.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py index 43e0dc5b..8213c023 100644 --- a/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py +++ b/src/mistralai/client/models/get_dataset_import_tasks_v1_observability_datasets_dataset_id_tasks_getop.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py index 7617a5d2..ed177823 100644 --- a/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py +++ b/src/mistralai/client/models/get_dataset_records_v1_observability_datasets_dataset_id_records_getop.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py index ea52dd51..1d79f2d5 100644 --- a/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py +++ b/src/mistralai/client/models/get_datasets_v1_observability_datasets_getop.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py index 7228cfa1..b5d0980e 100644 --- a/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py +++ b/src/mistralai/client/models/get_judges_v1_observability_judges_getop.py @@ -63,7 +63,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/getfileresponse.py b/src/mistralai/client/models/getfileresponse.py index 82280899..37c29bbb 100644 --- a/src/mistralai/client/models/getfileresponse.py +++ b/src/mistralai/client/models/getfileresponse.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/githubrepository.py b/src/mistralai/client/models/githubrepository.py index 84b01078..4ec88aa8 100644 --- a/src/mistralai/client/models/githubrepository.py +++ b/src/mistralai/client/models/githubrepository.py @@ -51,7 +51,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/guardrailconfig.py b/src/mistralai/client/models/guardrailconfig.py index 4f8fe352..d152ec36 100644 --- a/src/mistralai/client/models/guardrailconfig.py +++ b/src/mistralai/client/models/guardrailconfig.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imagecontent.py b/src/mistralai/client/models/imagecontent.py index 13c3f449..e6363daa 100644 --- a/src/mistralai/client/models/imagecontent.py +++ b/src/mistralai/client/models/imagecontent.py @@ -68,8 +68,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imagegenerationtool.py b/src/mistralai/client/models/imagegenerationtool.py index c1789b18..0dd4a4d2 100644 --- a/src/mistralai/client/models/imagegenerationtool.py +++ b/src/mistralai/client/models/imagegenerationtool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imageurl.py b/src/mistralai/client/models/imageurl.py index ac1030f5..32efa67b 100644 --- a/src/mistralai/client/models/imageurl.py +++ b/src/mistralai/client/models/imageurl.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/imageurlchunk.py b/src/mistralai/client/models/imageurlchunk.py index 59ad96e9..55a2023e 100644 --- a/src/mistralai/client/models/imageurlchunk.py +++ b/src/mistralai/client/models/imageurlchunk.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/jobmetadata.py b/src/mistralai/client/models/jobmetadata.py index f6e96fa1..8409872b 100644 --- a/src/mistralai/client/models/jobmetadata.py +++ b/src/mistralai/client/models/jobmetadata.py @@ -67,7 +67,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py index d779e1d9..683da4af 100644 --- a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py +++ b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py index 89ac3c93..e5869656 100644 --- a/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py +++ b/src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobsop.py @@ -104,7 +104,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py b/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py index ec80a158..9b9aeb51 100644 --- a/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py +++ b/src/mistralai/client/models/jobs_api_routes_fine_tuning_get_fine_tuning_jobsop.py @@ -145,7 +145,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/jsonschema.py b/src/mistralai/client/models/jsonschema.py index dfababa6..bc0bd6c4 100644 --- a/src/mistralai/client/models/jsonschema.py +++ b/src/mistralai/client/models/jsonschema.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/judge.py b/src/mistralai/client/models/judge.py index 1fb1d386..036aabb7 100644 --- a/src/mistralai/client/models/judge.py +++ b/src/mistralai/client/models/judge.py @@ -119,7 +119,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/judgeconversationrequest.py b/src/mistralai/client/models/judgeconversationrequest.py index 4b8cff1b..2c93f7b7 100644 --- a/src/mistralai/client/models/judgeconversationrequest.py +++ b/src/mistralai/client/models/judgeconversationrequest.py @@ -33,7 +33,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/judgeregressionoutput.py b/src/mistralai/client/models/judgeregressionoutput.py index 63394d8b..9bb8f9c1 100644 --- a/src/mistralai/client/models/judgeregressionoutput.py +++ b/src/mistralai/client/models/judgeregressionoutput.py @@ -41,7 +41,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/legacyjobmetadata.py b/src/mistralai/client/models/legacyjobmetadata.py index 57576758..143f0e7c 100644 --- a/src/mistralai/client/models/legacyjobmetadata.py +++ b/src/mistralai/client/models/legacyjobmetadata.py @@ -114,7 +114,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/libraries_documents_list_v1op.py b/src/mistralai/client/models/libraries_documents_list_v1op.py index da7d793b..afc474cb 100644 --- a/src/mistralai/client/models/libraries_documents_list_v1op.py +++ b/src/mistralai/client/models/libraries_documents_list_v1op.py @@ -78,7 +78,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/library.py b/src/mistralai/client/models/library.py index 1953b6fb..c26710ff 100644 --- a/src/mistralai/client/models/library.py +++ b/src/mistralai/client/models/library.py @@ -99,7 +99,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/list_models_v1_models_getop.py b/src/mistralai/client/models/list_models_v1_models_getop.py index 70b0ab82..1a42d9b0 100644 --- a/src/mistralai/client/models/list_models_v1_models_getop.py +++ b/src/mistralai/client/models/list_models_v1_models_getop.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/listbatchjobsresponse.py b/src/mistralai/client/models/listbatchjobsresponse.py index 35a348a1..77265322 100644 --- a/src/mistralai/client/models/listbatchjobsresponse.py +++ b/src/mistralai/client/models/listbatchjobsresponse.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/listfilesresponse.py b/src/mistralai/client/models/listfilesresponse.py index 10a60126..37787dae 100644 --- a/src/mistralai/client/models/listfilesresponse.py +++ b/src/mistralai/client/models/listfilesresponse.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/listfinetuningjobsresponse.py b/src/mistralai/client/models/listfinetuningjobsresponse.py index 1e434c59..39547d57 100644 --- a/src/mistralai/client/models/listfinetuningjobsresponse.py +++ b/src/mistralai/client/models/listfinetuningjobsresponse.py @@ -85,7 +85,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/mcpservericon.py b/src/mistralai/client/models/mcpservericon.py index 6068c1c4..293ab375 100644 --- a/src/mistralai/client/models/mcpservericon.py +++ b/src/mistralai/client/models/mcpservericon.py @@ -56,8 +56,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageinputentry.py b/src/mistralai/client/models/messageinputentry.py index c948a13e..be271e31 100644 --- a/src/mistralai/client/models/messageinputentry.py +++ b/src/mistralai/client/models/messageinputentry.py @@ -95,7 +95,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageoutputentry.py b/src/mistralai/client/models/messageoutputentry.py index 6a9c52ed..fd683ad3 100644 --- a/src/mistralai/client/models/messageoutputentry.py +++ b/src/mistralai/client/models/messageoutputentry.py @@ -98,7 +98,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/messageoutputevent.py b/src/mistralai/client/models/messageoutputevent.py index d765f4fd..8f5ecd43 100644 --- a/src/mistralai/client/models/messageoutputevent.py +++ b/src/mistralai/client/models/messageoutputevent.py @@ -82,7 +82,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/metric.py b/src/mistralai/client/models/metric.py index 1413f589..8d059894 100644 --- a/src/mistralai/client/models/metric.py +++ b/src/mistralai/client/models/metric.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/modelcapabilities.py b/src/mistralai/client/models/modelcapabilities.py index b9382047..3267c707 100644 --- a/src/mistralai/client/models/modelcapabilities.py +++ b/src/mistralai/client/models/modelcapabilities.py @@ -79,7 +79,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index d7f765bf..72ca957f 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -167,7 +167,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/modellist.py b/src/mistralai/client/models/modellist.py index 5fd835f2..a6020100 100644 --- a/src/mistralai/client/models/modellist.py +++ b/src/mistralai/client/models/modellist.py @@ -66,7 +66,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/moderationllmv1categorythresholds.py b/src/mistralai/client/models/moderationllmv1categorythresholds.py index 0451ba3a..9a947d11 100644 --- a/src/mistralai/client/models/moderationllmv1categorythresholds.py +++ b/src/mistralai/client/models/moderationllmv1categorythresholds.py @@ -77,7 +77,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv1config.py b/src/mistralai/client/models/moderationllmv1config.py index da7156eb..fe597a9b 100644 --- a/src/mistralai/client/models/moderationllmv1config.py +++ b/src/mistralai/client/models/moderationllmv1config.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv2categorythresholds.py b/src/mistralai/client/models/moderationllmv2categorythresholds.py index 1754582b..2ca952c5 100644 --- a/src/mistralai/client/models/moderationllmv2categorythresholds.py +++ b/src/mistralai/client/models/moderationllmv2categorythresholds.py @@ -87,7 +87,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationllmv2config.py b/src/mistralai/client/models/moderationllmv2config.py index df2b04bd..5cd8b7ca 100644 --- a/src/mistralai/client/models/moderationllmv2config.py +++ b/src/mistralai/client/models/moderationllmv2config.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/moderationobject.py b/src/mistralai/client/models/moderationobject.py index e7ccd8f6..66f6a84b 100644 --- a/src/mistralai/client/models/moderationobject.py +++ b/src/mistralai/client/models/moderationobject.py @@ -30,7 +30,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/observabilityerrordetail.py b/src/mistralai/client/models/observabilityerrordetail.py index a6236b66..f1535352 100644 --- a/src/mistralai/client/models/observabilityerrordetail.py +++ b/src/mistralai/client/models/observabilityerrordetail.py @@ -25,7 +25,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/ocrimageobject.py b/src/mistralai/client/models/ocrimageobject.py index 365f062b..583cc38b 100644 --- a/src/mistralai/client/models/ocrimageobject.py +++ b/src/mistralai/client/models/ocrimageobject.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrpageobject.py b/src/mistralai/client/models/ocrpageobject.py index ffc7b3b6..40b70d81 100644 --- a/src/mistralai/client/models/ocrpageobject.py +++ b/src/mistralai/client/models/ocrpageobject.py @@ -70,7 +70,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrrequest.py b/src/mistralai/client/models/ocrrequest.py index 4ad337ce..6e405ee4 100644 --- a/src/mistralai/client/models/ocrrequest.py +++ b/src/mistralai/client/models/ocrrequest.py @@ -131,7 +131,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrresponse.py b/src/mistralai/client/models/ocrresponse.py index e63eed98..ff4b96c3 100644 --- a/src/mistralai/client/models/ocrresponse.py +++ b/src/mistralai/client/models/ocrresponse.py @@ -47,7 +47,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/ocrusageinfo.py b/src/mistralai/client/models/ocrusageinfo.py index 2ec1322b..bfd748e0 100644 --- a/src/mistralai/client/models/ocrusageinfo.py +++ b/src/mistralai/client/models/ocrusageinfo.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultcampaignpreview.py b/src/mistralai/client/models/paginatedresultcampaignpreview.py index d82ee741..f6cfce37 100644 --- a/src/mistralai/client/models/paginatedresultcampaignpreview.py +++ b/src/mistralai/client/models/paginatedresultcampaignpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py index 97bbfea7..e08443c1 100644 --- a/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py +++ b/src/mistralai/client/models/paginatedresultchatcompletioneventpreview.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetimporttask.py b/src/mistralai/client/models/paginatedresultdatasetimporttask.py index 9d6dcd05..4b9f4881 100644 --- a/src/mistralai/client/models/paginatedresultdatasetimporttask.py +++ b/src/mistralai/client/models/paginatedresultdatasetimporttask.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetpreview.py b/src/mistralai/client/models/paginatedresultdatasetpreview.py index 51566cc5..81746f35 100644 --- a/src/mistralai/client/models/paginatedresultdatasetpreview.py +++ b/src/mistralai/client/models/paginatedresultdatasetpreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultdatasetrecord.py b/src/mistralai/client/models/paginatedresultdatasetrecord.py index 1d6e15c1..d9aa8c8e 100644 --- a/src/mistralai/client/models/paginatedresultdatasetrecord.py +++ b/src/mistralai/client/models/paginatedresultdatasetrecord.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginatedresultjudgepreview.py b/src/mistralai/client/models/paginatedresultjudgepreview.py index 57dbc1e5..c61382f9 100644 --- a/src/mistralai/client/models/paginatedresultjudgepreview.py +++ b/src/mistralai/client/models/paginatedresultjudgepreview.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/paginationresponse.py b/src/mistralai/client/models/paginationresponse.py index f05ee380..a60640aa 100644 --- a/src/mistralai/client/models/paginationresponse.py +++ b/src/mistralai/client/models/paginationresponse.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/prediction.py b/src/mistralai/client/models/prediction.py index 0c6f4182..614f4811 100644 --- a/src/mistralai/client/models/prediction.py +++ b/src/mistralai/client/models/prediction.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionerror.py b/src/mistralai/client/models/realtimetranscriptionerror.py index c661e461..8ea1d425 100644 --- a/src/mistralai/client/models/realtimetranscriptionerror.py +++ b/src/mistralai/client/models/realtimetranscriptionerror.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py b/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py index 8156a270..82ce59fc 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioappend.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioend.py b/src/mistralai/client/models/realtimetranscriptioninputaudioend.py index 473eedb7..9b0a8709 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioend.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioend.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py b/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py index 553d14c7..fe728633 100644 --- a/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py +++ b/src/mistralai/client/models/realtimetranscriptioninputaudioflush.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsession.py b/src/mistralai/client/models/realtimetranscriptionsession.py index a74a457b..e23c07ec 100644 --- a/src/mistralai/client/models/realtimetranscriptionsession.py +++ b/src/mistralai/client/models/realtimetranscriptionsession.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/realtimetranscriptionsessioncreated.py b/src/mistralai/client/models/realtimetranscriptionsessioncreated.py index bb96875a..88da8764 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessioncreated.py +++ b/src/mistralai/client/models/realtimetranscriptionsessioncreated.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdated.py b/src/mistralai/client/models/realtimetranscriptionsessionupdated.py index fea5db4a..474b2fa7 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdated.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdated.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py b/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py index 07ad59a4..4013d638 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdatemessage.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py index a89441e9..d4ce43f7 100644 --- a/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py +++ b/src/mistralai/client/models/realtimetranscriptionsessionupdatepayload.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/reasoningeffort.py b/src/mistralai/client/models/reasoningeffort.py new file mode 100644 index 00000000..e95b8fee --- /dev/null +++ b/src/mistralai/client/models/reasoningeffort.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b930a0a20654 + +from __future__ import annotations +from typing import Literal + + +ReasoningEffort = Literal[ + "none", + "high", +] diff --git a/src/mistralai/client/models/referencechunk.py b/src/mistralai/client/models/referencechunk.py index a5fa22f0..c0d7c065 100644 --- a/src/mistralai/client/models/referencechunk.py +++ b/src/mistralai/client/models/referencechunk.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/resourcelink.py b/src/mistralai/client/models/resourcelink.py index 8ed5613c..890c5be1 100644 --- a/src/mistralai/client/models/resourcelink.py +++ b/src/mistralai/client/models/resourcelink.py @@ -114,8 +114,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/responsedoneevent.py b/src/mistralai/client/models/responsedoneevent.py index be38fba8..89a58bf7 100644 --- a/src/mistralai/client/models/responsedoneevent.py +++ b/src/mistralai/client/models/responsedoneevent.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/responseerrorevent.py b/src/mistralai/client/models/responseerrorevent.py index fa4d0d01..5326c4e8 100644 --- a/src/mistralai/client/models/responseerrorevent.py +++ b/src/mistralai/client/models/responseerrorevent.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/responseformat.py b/src/mistralai/client/models/responseformat.py index b2971412..95141394 100644 --- a/src/mistralai/client/models/responseformat.py +++ b/src/mistralai/client/models/responseformat.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/responsestartedevent.py b/src/mistralai/client/models/responsestartedevent.py index 84abfcd9..ca375042 100644 --- a/src/mistralai/client/models/responsestartedevent.py +++ b/src/mistralai/client/models/responsestartedevent.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/searchchatcompletioneventidsrequest.py b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py index f8476081..64bb8f9f 100644 --- a/src/mistralai/client/models/searchchatcompletioneventidsrequest.py +++ b/src/mistralai/client/models/searchchatcompletioneventidsrequest.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/searchchatcompletioneventsrequest.py b/src/mistralai/client/models/searchchatcompletioneventsrequest.py index 95524c5b..bca27f16 100644 --- a/src/mistralai/client/models/searchchatcompletioneventsrequest.py +++ b/src/mistralai/client/models/searchchatcompletioneventsrequest.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/security.py b/src/mistralai/client/models/security.py index f3b3423e..36b12953 100644 --- a/src/mistralai/client/models/security.py +++ b/src/mistralai/client/models/security.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/sharing.py b/src/mistralai/client/models/sharing.py index d6142e83..efa16203 100644 --- a/src/mistralai/client/models/sharing.py +++ b/src/mistralai/client/models/sharing.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/sharingdelete.py b/src/mistralai/client/models/sharingdelete.py index 33ccd7e7..3472a506 100644 --- a/src/mistralai/client/models/sharingdelete.py +++ b/src/mistralai/client/models/sharingdelete.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/sharingrequest.py b/src/mistralai/client/models/sharingrequest.py index 76424b8e..7c2d435c 100644 --- a/src/mistralai/client/models/sharingrequest.py +++ b/src/mistralai/client/models/sharingrequest.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/textchunk.py b/src/mistralai/client/models/textchunk.py index ac9f3137..bae970f3 100644 --- a/src/mistralai/client/models/textchunk.py +++ b/src/mistralai/client/models/textchunk.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/textcontent.py b/src/mistralai/client/models/textcontent.py index 7468b046..03de48d3 100644 --- a/src/mistralai/client/models/textcontent.py +++ b/src/mistralai/client/models/textcontent.py @@ -65,8 +65,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/textresourcecontents.py b/src/mistralai/client/models/textresourcecontents.py index c497bb4d..c3f26a65 100644 --- a/src/mistralai/client/models/textresourcecontents.py +++ b/src/mistralai/client/models/textresourcecontents.py @@ -61,8 +61,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/thinkchunk.py b/src/mistralai/client/models/thinkchunk.py index 03573f8e..ae084a17 100644 --- a/src/mistralai/client/models/thinkchunk.py +++ b/src/mistralai/client/models/thinkchunk.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/tool.py b/src/mistralai/client/models/tool.py index 2b9965e5..1d1c5ce5 100644 --- a/src/mistralai/client/models/tool.py +++ b/src/mistralai/client/models/tool.py @@ -28,7 +28,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolcall.py b/src/mistralai/client/models/toolcall.py index 181cec33..29f1149c 100644 --- a/src/mistralai/client/models/toolcall.py +++ b/src/mistralai/client/models/toolcall.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolchoice.py b/src/mistralai/client/models/toolchoice.py index cb787df1..ce84573a 100644 --- a/src/mistralai/client/models/toolchoice.py +++ b/src/mistralai/client/models/toolchoice.py @@ -34,7 +34,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolconfiguration.py b/src/mistralai/client/models/toolconfiguration.py index b903c8b6..eb3d14e5 100644 --- a/src/mistralai/client/models/toolconfiguration.py +++ b/src/mistralai/client/models/toolconfiguration.py @@ -36,7 +36,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolexecutiondeltaevent.py b/src/mistralai/client/models/toolexecutiondeltaevent.py index 5a977ca6..c2e40950 100644 --- a/src/mistralai/client/models/toolexecutiondeltaevent.py +++ b/src/mistralai/client/models/toolexecutiondeltaevent.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolexecutiondoneevent.py b/src/mistralai/client/models/toolexecutiondoneevent.py index 1c9b0ec9..ec3b6918 100644 --- a/src/mistralai/client/models/toolexecutiondoneevent.py +++ b/src/mistralai/client/models/toolexecutiondoneevent.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/toolexecutionentry.py b/src/mistralai/client/models/toolexecutionentry.py index 0d6f2a13..226adce1 100644 --- a/src/mistralai/client/models/toolexecutionentry.py +++ b/src/mistralai/client/models/toolexecutionentry.py @@ -92,7 +92,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolexecutionstartedevent.py b/src/mistralai/client/models/toolexecutionstartedevent.py index 21e5bfa8..a4af27b8 100644 --- a/src/mistralai/client/models/toolexecutionstartedevent.py +++ b/src/mistralai/client/models/toolexecutionstartedevent.py @@ -72,7 +72,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolfilechunk.py b/src/mistralai/client/models/toolfilechunk.py index 0708b3ff..1d9e6118 100644 --- a/src/mistralai/client/models/toolfilechunk.py +++ b/src/mistralai/client/models/toolfilechunk.py @@ -59,7 +59,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolmessage.py b/src/mistralai/client/models/toolmessage.py index 05a0ee63..0dc9e92f 100644 --- a/src/mistralai/client/models/toolmessage.py +++ b/src/mistralai/client/models/toolmessage.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/toolreferencechunk.py b/src/mistralai/client/models/toolreferencechunk.py index 95454fe8..391724ed 100644 --- a/src/mistralai/client/models/toolreferencechunk.py +++ b/src/mistralai/client/models/toolreferencechunk.py @@ -65,7 +65,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/trainingfile.py b/src/mistralai/client/models/trainingfile.py index 2faeda8b..bdaba37a 100644 --- a/src/mistralai/client/models/trainingfile.py +++ b/src/mistralai/client/models/trainingfile.py @@ -26,7 +26,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/transcriptionresponse.py b/src/mistralai/client/models/transcriptionresponse.py index 70315463..c512a345 100644 --- a/src/mistralai/client/models/transcriptionresponse.py +++ b/src/mistralai/client/models/transcriptionresponse.py @@ -55,8 +55,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionsegmentchunk.py b/src/mistralai/client/models/transcriptionsegmentchunk.py index b87bfc2f..8a5a7162 100644 --- a/src/mistralai/client/models/transcriptionsegmentchunk.py +++ b/src/mistralai/client/models/transcriptionsegmentchunk.py @@ -67,8 +67,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionstreamdone.py b/src/mistralai/client/models/transcriptionstreamdone.py index e3c50169..89357277 100644 --- a/src/mistralai/client/models/transcriptionstreamdone.py +++ b/src/mistralai/client/models/transcriptionstreamdone.py @@ -66,8 +66,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/transcriptionstreamsegmentdelta.py b/src/mistralai/client/models/transcriptionstreamsegmentdelta.py index 32ef8f9b..38e7b0a3 100644 --- a/src/mistralai/client/models/transcriptionstreamsegmentdelta.py +++ b/src/mistralai/client/models/transcriptionstreamsegmentdelta.py @@ -64,8 +64,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/unarchivemodelresponse.py b/src/mistralai/client/models/unarchivemodelresponse.py index 5c75d30e..5cab4c2e 100644 --- a/src/mistralai/client/models/unarchivemodelresponse.py +++ b/src/mistralai/client/models/unarchivemodelresponse.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index 584c034c..7bb9686b 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -129,7 +129,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updateconnectorrequest.py b/src/mistralai/client/models/updateconnectorrequest.py index 2fe42ba8..3540d02b 100644 --- a/src/mistralai/client/models/updateconnectorrequest.py +++ b/src/mistralai/client/models/updateconnectorrequest.py @@ -97,7 +97,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatedatasetrequest.py b/src/mistralai/client/models/updatedatasetrequest.py index 02974089..ddbaad12 100644 --- a/src/mistralai/client/models/updatedatasetrequest.py +++ b/src/mistralai/client/models/updatedatasetrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatedocumentrequest.py b/src/mistralai/client/models/updatedocumentrequest.py index 61e69655..12d9c89b 100644 --- a/src/mistralai/client/models/updatedocumentrequest.py +++ b/src/mistralai/client/models/updatedocumentrequest.py @@ -50,7 +50,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatelibraryrequest.py b/src/mistralai/client/models/updatelibraryrequest.py index 91cbf2a1..d5183ac0 100644 --- a/src/mistralai/client/models/updatelibraryrequest.py +++ b/src/mistralai/client/models/updatelibraryrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/updatemodelrequest.py b/src/mistralai/client/models/updatemodelrequest.py index f685cfcc..0179ba14 100644 --- a/src/mistralai/client/models/updatemodelrequest.py +++ b/src/mistralai/client/models/updatemodelrequest.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/usageinfo.py b/src/mistralai/client/models/usageinfo.py index 31cbf07e..f23699d0 100644 --- a/src/mistralai/client/models/usageinfo.py +++ b/src/mistralai/client/models/usageinfo.py @@ -60,8 +60,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/usermessage.py b/src/mistralai/client/models/usermessage.py index 63e76792..7b4b5563 100644 --- a/src/mistralai/client/models/usermessage.py +++ b/src/mistralai/client/models/usermessage.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/src/mistralai/client/models/validationerror.py b/src/mistralai/client/models/validationerror.py index d856e24c..5fe796db 100644 --- a/src/mistralai/client/models/validationerror.py +++ b/src/mistralai/client/models/validationerror.py @@ -49,7 +49,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/src/mistralai/client/models/wandbintegration.py b/src/mistralai/client/models/wandbintegration.py index f0df2c77..0e444bec 100644 --- a/src/mistralai/client/models/wandbintegration.py +++ b/src/mistralai/client/models/wandbintegration.py @@ -54,7 +54,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/wandbintegrationresult.py b/src/mistralai/client/models/wandbintegrationresult.py index 575cbd42..e64bb27c 100644 --- a/src/mistralai/client/models/wandbintegrationresult.py +++ b/src/mistralai/client/models/wandbintegrationresult.py @@ -52,7 +52,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/websearchpremiumtool.py b/src/mistralai/client/models/websearchpremiumtool.py index 00d4a4b4..5c929e94 100644 --- a/src/mistralai/client/models/websearchpremiumtool.py +++ b/src/mistralai/client/models/websearchpremiumtool.py @@ -43,7 +43,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/models/websearchtool.py b/src/mistralai/client/models/websearchtool.py index 6871080f..f82b6ec1 100644 --- a/src/mistralai/client/models/websearchtool.py +++ b/src/mistralai/client/models/websearchtool.py @@ -40,7 +40,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index 80bf25a7..b775fe1c 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -72,8 +72,8 @@ def __init__( self, api_key: Optional[Union[Optional[str], Callable[[], Optional[str]]]] = None, server: Optional[str] = None, - server_url: Optional[str] = None, url_params: Optional[Dict[str, str]] = None, + server_url: Optional[str] = None, client: Optional[HttpClient] = None, async_client: Optional[AsyncHttpClient] = None, retry_config: OptionalNullable[RetryConfig] = UNSET, diff --git a/src/mistralai/client/utils/eventstreaming.py b/src/mistralai/client/utils/eventstreaming.py index 19a12152..93287ab4 100644 --- a/src/mistralai/client/utils/eventstreaming.py +++ b/src/mistralai/client/utils/eventstreaming.py @@ -33,9 +33,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events(response, decoder, sentinel) + self.generator = stream_events( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -69,9 +72,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events_async(response, decoder, sentinel) + self.generator = stream_events_async( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -117,6 +123,7 @@ async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 @@ -139,7 +146,11 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -152,7 +163,11 @@ async def stream_events_async( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -162,6 +177,7 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 @@ -184,7 +200,11 @@ def stream_events( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -197,7 +217,11 @@ def stream_events( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -209,6 +233,7 @@ def _parse_event( decoder: Callable[[str], T], sentinel: Optional[str] = None, event_id: Optional[str] = None, + data_required: bool = True, ) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) @@ -251,6 +276,10 @@ def _parse_event( if sentinel and data == f"{sentinel}\n": return None, True, event_id + # Skip data-less events when data is required + if not data and publish and data_required: + return None, False, event_id + if data: data = data[:-1] try: diff --git a/uv.lock b/uv.lock index 986436b9..00e7eb1c 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.4" +version = "2.0.5" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 86e592f683987690321b70f3d40408f546317574 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 09:52:06 +0100 Subject: [PATCH 21/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.1.0=20(#439)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.agents.update_version()`: `response` **Changed** (Breaking ⚠️) * `mistral.beta.agents.get()`: `response` **Changed** (Breaking ⚠️) * `mistral.agents.stream()`: `request` **Changed** (Breaking ⚠️) * `mistral.agents.complete()`: `request` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.start_stream()`: `request` **Changed** (Breaking ⚠️) * `mistral.chat.stream()`: `request` **Changed** (Breaking ⚠️) * `mistral.chat.complete()`: `request` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.restart()`: `request` **Changed** (Breaking ⚠️) * `mistral.beta.agents.list_versions()`: `response.[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.start()`: `request` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.list()`: `response.[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.get()`: `response` **Changed** (Breaking ⚠️) * `mistral.beta.agents.update()`: * `request` **Changed** (Breaking ⚠️) * `response` **Changed** (Breaking ⚠️) * `mistral.beta.agents.get_version()`: `response` **Changed** (Breaking ⚠️) * `mistral.beta.agents.list()`: `response.[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.create()`: * `request` **Changed** (Breaking ⚠️) * `response` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.restart_stream()`: `request` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.append_stream()`: * `request.completion_args.reasoning_effort` **Added** * `mistral.audio.voices.update()`: **Added** * `mistral.beta.conversations.append()`: * `request.completion_args.reasoning_effort` **Added** * `mistral.audio.voices.list()`: **Added** * `mistral.audio.speech.complete()`: **Added** * `mistral.models.retrieve()`: `response.union(base).capabilities.reasoning` **Added** * `mistral.models.list()`: `response.data[].union(base).capabilities.reasoning` **Added** * `mistral.audio.voices.get_sample_audio()`: **Added** * `mistral.audio.voices.get()`: **Added** * `mistral.audio.voices.delete()`: **Added** * `mistral.audio.voices.create()`: **Added** * chore: align pyproject.toml and uv.lock to version 2.1.0 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 612 +++++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 103 +- README.md | 103 +- RELEASES.md | 12 +- USAGE.md | 8 + docs/models/agent.md | 2 +- docs/models/agentconversation.md | 2 +- docs/models/agentscompletionrequest.md | 5 +- docs/models/agentscompletionrequesttools1.md | 47 + docs/models/agentscompletionrequesttools2.md | 17 + docs/models/agentscompletionstreamrequest.md | 5 +- .../agentscompletionstreamrequesttools1.md | 47 + .../agentscompletionstreamrequesttools2.md | 17 + docs/models/basefielddefinition.md | 14 +- ...typeenum.md => basefielddefinitiontype.md} | 6 +- docs/models/chatcompletionrequest.md | 5 +- docs/models/chatcompletionrequesttools1.md | 47 + docs/models/chatcompletionrequesttools2.md | 19 + docs/models/chatcompletionstreamrequest.md | 5 +- .../chatcompletionstreamrequesttools1.md | 47 + .../chatcompletionstreamrequesttools2.md | 19 + docs/models/codeinterpretertool.md | 8 +- docs/models/codeinterpretertooltype.md | 13 + docs/models/completionargs.md | 3 +- docs/models/conversationrequest.md | 2 +- docs/models/conversationrestartrequest.md | 2 +- .../conversationrestartstreamrequest.md | 2 +- docs/models/conversationstreamrequest.md | 2 +- docs/models/createagentrequest.md | 2 +- docs/models/customconnector.md | 2 +- docs/models/customconnectortype.md | 13 + ...evoicev1audiovoicesvoiceiddeleterequest.md | 8 + docs/models/documentlibrarytool.md | 10 +- docs/models/documentlibrarytooltype.md | 13 + ...diov1audiovoicesvoiceidsamplegetrequest.md | 8 + .../getvoicev1audiovoicesvoiceidgetrequest.md | 8 + docs/models/imagegenerationtool.md | 8 +- docs/models/imagegenerationtooltype.md | 13 + docs/models/internalmetadata.md | 14 + docs/models/internalmetadataagentversion.md | 17 + .../listvoicesv1audiovoicesgetrequest.md | 9 + docs/models/messagetokens.md | 13 + docs/models/metadatadict.md | 11 + docs/models/mirrorconfig.md | 10 + docs/models/mirrorsource.md | 14 + docs/models/modelcapabilities.md | 1 + docs/models/modelconversation.md | 2 +- docs/models/prompttokensdetails.md | 11 + docs/models/reasoningeffort.md | 4 + docs/models/roles.md | 20 + docs/models/speechoutputformat.md | 17 + docs/models/speechrequest.md | 15 + docs/models/speechresponse.md | 10 + docs/models/speechstreamaudiodelta.md | 9 + docs/models/speechstreamdone.md | 9 + docs/models/speechstreamevents.md | 11 + docs/models/speechstreameventtypes.md | 18 + docs/models/speechv1audiospeechpostdata.md | 17 + .../models/speechv1audiospeechpostresponse.md | 17 + docs/models/updateagentrequest.md | 2 +- ...tevoicev1audiovoicesvoiceidpatchrequest.md | 9 + docs/models/usageinfodollardefs.md | 15 + docs/models/voicecreaterequest.md | 19 + docs/models/voicelistresponse.md | 14 + docs/models/voiceresponse.md | 20 + docs/models/voiceupdaterequest.md | 14 + docs/models/websearchpremiumtool.md | 8 +- docs/models/websearchpremiumtooltype.md | 13 + docs/models/websearchtool.md | 2 +- docs/models/websearchtooltype.md | 13 + docs/sdks/agents/README.md | 10 +- docs/sdks/betaagents/README.md | 4 +- docs/sdks/chat/README.md | 10 +- docs/sdks/conversations/README.md | 8 +- docs/sdks/speech/README.md | 59 + docs/sdks/voices/README.md | 273 ++++ pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/agents.py | 48 +- src/mistralai/client/audio.py | 6 + src/mistralai/client/beta_agents.py | 32 +- src/mistralai/client/chat.py | 48 +- src/mistralai/client/conversations.py | 64 +- src/mistralai/client/models/__init__.py | 247 +++- src/mistralai/client/models/agent.py | 7 +- .../client/models/agentconversation.py | 7 +- .../client/models/agentscompletionrequest.py | 69 +- .../models/agentscompletionstreamrequest.py | 69 +- .../client/models/basefielddefinition.py | 6 +- .../client/models/chatcompletionrequest.py | 70 +- .../models/chatcompletionstreamrequest.py | 71 +- .../client/models/codeinterpretertool.py | 28 +- src/mistralai/client/models/completionargs.py | 6 + .../client/models/conversationrequest.py | 27 +- .../models/conversationrestartrequest.py | 7 +- .../conversationrestartstreamrequest.py | 7 +- .../models/conversationstreamrequest.py | 27 +- .../client/models/createagentrequest.py | 26 +- .../client/models/customconnector.py | 24 +- ...voice_v1_audio_voices_voice_id_deleteop.py | 17 + .../client/models/documentlibrarytool.py | 28 +- ...o_v1_audio_voices_voice_id_sample_getop.py | 17 + ...et_voice_v1_audio_voices_voice_id_getop.py | 17 + .../client/models/imagegenerationtool.py | 28 +- .../client/models/internalmetadata.py | 92 ++ .../list_voices_v1_audio_voices_getop.py | 46 + src/mistralai/client/models/messagetokens.py | 61 + src/mistralai/client/models/metadatadict.py | 69 + src/mistralai/client/models/mirrorconfig.py | 21 + src/mistralai/client/models/mirrorsource.py | 62 + .../client/models/modelcapabilities.py | 4 + .../client/models/modelconversation.py | 7 +- .../client/models/prompttokensdetails.py | 40 + .../client/models/reasoningeffort.py | 12 +- src/mistralai/client/models/roles.py | 17 + .../models/speech_v1_audio_speech_postop.py | 107 ++ .../client/models/speechoutputformat.py | 14 + src/mistralai/client/models/speechrequest.py | 92 ++ .../client/models/speechstreamaudiodelta.py | 33 + .../client/models/speechstreamdone.py | 34 + .../client/models/speechstreameventtypes.py | 15 + ..._voice_v1_audio_voices_voice_id_patchop.py | 24 + .../client/models/updateagentrequest.py | 26 +- .../client/models/usageinfo_dollar_defs.py | 89 ++ .../client/models/voicecreaterequest.py | 95 ++ .../client/models/voicelistresponse.py | 32 + src/mistralai/client/models/voiceresponse.py | 84 ++ .../client/models/voiceupdaterequest.py | 63 + .../client/models/websearchpremiumtool.py | 28 +- src/mistralai/client/models/websearchtool.py | 25 +- src/mistralai/client/sdk.py | 4 +- src/mistralai/client/speech.py | 282 ++++ src/mistralai/client/voices.py | 1206 +++++++++++++++++ uv.lock | 2 +- 136 files changed, 5188 insertions(+), 520 deletions(-) create mode 100644 docs/models/agentscompletionrequesttools1.md create mode 100644 docs/models/agentscompletionrequesttools2.md create mode 100644 docs/models/agentscompletionstreamrequesttools1.md create mode 100644 docs/models/agentscompletionstreamrequesttools2.md rename docs/models/{typeenum.md => basefielddefinitiontype.md} (67%) create mode 100644 docs/models/chatcompletionrequesttools1.md create mode 100644 docs/models/chatcompletionrequesttools2.md create mode 100644 docs/models/chatcompletionstreamrequesttools1.md create mode 100644 docs/models/chatcompletionstreamrequesttools2.md create mode 100644 docs/models/codeinterpretertooltype.md create mode 100644 docs/models/customconnectortype.md create mode 100644 docs/models/deletevoicev1audiovoicesvoiceiddeleterequest.md create mode 100644 docs/models/documentlibrarytooltype.md create mode 100644 docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md create mode 100644 docs/models/getvoicev1audiovoicesvoiceidgetrequest.md create mode 100644 docs/models/imagegenerationtooltype.md create mode 100644 docs/models/internalmetadata.md create mode 100644 docs/models/internalmetadataagentversion.md create mode 100644 docs/models/listvoicesv1audiovoicesgetrequest.md create mode 100644 docs/models/messagetokens.md create mode 100644 docs/models/metadatadict.md create mode 100644 docs/models/mirrorconfig.md create mode 100644 docs/models/mirrorsource.md create mode 100644 docs/models/prompttokensdetails.md create mode 100644 docs/models/roles.md create mode 100644 docs/models/speechoutputformat.md create mode 100644 docs/models/speechrequest.md create mode 100644 docs/models/speechresponse.md create mode 100644 docs/models/speechstreamaudiodelta.md create mode 100644 docs/models/speechstreamdone.md create mode 100644 docs/models/speechstreamevents.md create mode 100644 docs/models/speechstreameventtypes.md create mode 100644 docs/models/speechv1audiospeechpostdata.md create mode 100644 docs/models/speechv1audiospeechpostresponse.md create mode 100644 docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md create mode 100644 docs/models/usageinfodollardefs.md create mode 100644 docs/models/voicecreaterequest.md create mode 100644 docs/models/voicelistresponse.md create mode 100644 docs/models/voiceresponse.md create mode 100644 docs/models/voiceupdaterequest.md create mode 100644 docs/models/websearchpremiumtooltype.md create mode 100644 docs/models/websearchtooltype.md create mode 100644 docs/sdks/speech/README.md create mode 100644 docs/sdks/voices/README.md create mode 100644 src/mistralai/client/models/delete_voice_v1_audio_voices_voice_id_deleteop.py create mode 100644 src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py create mode 100644 src/mistralai/client/models/get_voice_v1_audio_voices_voice_id_getop.py create mode 100644 src/mistralai/client/models/internalmetadata.py create mode 100644 src/mistralai/client/models/list_voices_v1_audio_voices_getop.py create mode 100644 src/mistralai/client/models/messagetokens.py create mode 100644 src/mistralai/client/models/metadatadict.py create mode 100644 src/mistralai/client/models/mirrorconfig.py create mode 100644 src/mistralai/client/models/mirrorsource.py create mode 100644 src/mistralai/client/models/prompttokensdetails.py create mode 100644 src/mistralai/client/models/roles.py create mode 100644 src/mistralai/client/models/speech_v1_audio_speech_postop.py create mode 100644 src/mistralai/client/models/speechoutputformat.py create mode 100644 src/mistralai/client/models/speechrequest.py create mode 100644 src/mistralai/client/models/speechstreamaudiodelta.py create mode 100644 src/mistralai/client/models/speechstreamdone.py create mode 100644 src/mistralai/client/models/speechstreameventtypes.py create mode 100644 src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py create mode 100644 src/mistralai/client/models/usageinfo_dollar_defs.py create mode 100644 src/mistralai/client/models/voicecreaterequest.py create mode 100644 src/mistralai/client/models/voicelistresponse.py create mode 100644 src/mistralai/client/models/voiceresponse.py create mode 100644 src/mistralai/client/models/voiceupdaterequest.py create mode 100644 src/mistralai/client/speech.py create mode 100644 src/mistralai/client/voices.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c7d0b130..f891a463 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,21 +1,22 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 935dfa929e1e1ce9ce95e8113516b4d6 + docChecksum: 97b4909a97eae2c0d6eaef46534c47fe docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.0.5 - configChecksum: 3e3409f4ae2a461d1ac6804338d30297 + releaseVersion: 2.1.0 + configChecksum: 80e45c1c992459e880bf8922d67376de repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 89696261-5908-4dee-88ea-d37528273266 - pristine_commit_hash: e85fd7bfb52babb0a1d1e719b507e74434907135 - pristine_tree_hash: 47c226db0e18f3950f48ffd5a6a91205025e9ad1 + generation_id: 0d66b97f-ad1d-4489-9f77-6ca1765f9ce1 + pristine_commit_hash: c67ab5cd232bd410d9ffc9e29934bbfcae4ff4bc + pristine_tree_hash: fcceae92cd99b9a1af03ae3448582d659765b2b2 features: python: + acceptHeaders: 3.0.0 additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 @@ -60,8 +61,8 @@ trackedFiles: deleted: true USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f - pristine_git_object: 9d32240a60c8885479c95388bb81c8024b5604ff + last_write_checksum: sha1:f2758c4f177674158f30097fae8d916be6bfb5c5 + pristine_git_object: fc624708474f8088a1f0855a668940f0a0a0c82a docs/errors/httpvalidationerror.md: id: 7fe2e5327e07 last_write_checksum: sha1:277a46811144643262651853dc6176d21b33573e @@ -72,16 +73,16 @@ trackedFiles: pristine_git_object: 615552c32013c702b3e7476b1691952b0a4a65df docs/models/agent.md: id: ffdbb4c53c87 - last_write_checksum: sha1:a4438b1b0db1d00df3aacfc432acc523a3ca57da - pristine_git_object: 94e8b035a5a9f61d3a0e345daf977a83e352ba07 + last_write_checksum: sha1:17c0a4bcfb18b9db99bb3a783d275a046b66bb78 + pristine_git_object: c9c8b7486fbc68bde5647b49aeb83f4522b5e954 docs/models/agentaliasresponse.md: id: 5ac4721d8947 last_write_checksum: sha1:15dcc6820e89d2c6bb799e331463419ce29ec167 pristine_git_object: aa531ec5d1464f95e3938f148c1e88efc30fa6a6 docs/models/agentconversation.md: id: 3590c1a566fa - last_write_checksum: sha1:43e7c1ed2b43aca2794d89f2e6d6aa5f1478cc3e - pristine_git_object: 451f6fb8f700dddd54c69593c316bf562b5cbc93 + last_write_checksum: sha1:e86c4e75fd08f961f6c914460e753f097a4fb879 + pristine_git_object: dc62a7f56b811b31aafd35d9356cd0019a03c349 docs/models/agentconversationagentversion.md: id: 468e0d1614bb last_write_checksum: sha1:6e60bf4a18d791d694e90c89bdb8cc38e43c324b @@ -184,8 +185,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:7932ecb14b0e32f46e5a4b97c83581ecdca53ddf - pristine_git_object: 99f47f5cedb79f44393f0cdb3c9a26660500cdee + last_write_checksum: sha1:9a3b0e6dfc62cda48bb2b2772217d7748aa814c3 + pristine_git_object: 119c4bc807ffe4a09227afa3a8e3f67ee096d7b2 docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -198,10 +199,18 @@ trackedFiles: id: bd8a6f9fbb47 last_write_checksum: sha1:f3d9ec3c82b6bbd2c3cbc320a71b927edcc292b1 pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 + docs/models/agentscompletionrequesttools1.md: + id: 85a79f0c6360 + last_write_checksum: sha1:0054d7ad7f3ce10edacad90fec077fe23317b4db + pristine_git_object: 61eb3257a7dc73e56d715706e12a4537bbf49a71 + docs/models/agentscompletionrequesttools2.md: + id: 7362c1585f5a + last_write_checksum: sha1:ba51c8d83f2ccf84e04d8c37820072466411cb2c + pristine_git_object: 5c1a4bc4623a792049766c8a3ab5613b23018b93 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:021b53d01c8f46c2a074defbb08736752e99ad9c - pristine_git_object: d5455230b1b5d640c19e1ee0f1c29361674077a7 + last_write_checksum: sha1:ac5e5e5e54035c79f0b3397f6b4b81080437c112 + pristine_git_object: ee24b68b31370c0ca7af388066056002f5f075cb docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -214,6 +223,14 @@ trackedFiles: id: b1f76f7a4e1c last_write_checksum: sha1:843c4946d5cab61df2cba458af40835c4e8bcafe pristine_git_object: 4354523a7d0d21721a96e91938b89236169ccced + docs/models/agentscompletionstreamrequesttools1.md: + id: 040d16e34648 + last_write_checksum: sha1:7c1cafca6e8b68175130ab8a8faba5bfdbf5a588 + pristine_git_object: fef7e190cc23e9ac6951e12f0de321ddb0a4bfeb + docs/models/agentscompletionstreamrequesttools2.md: + id: d996c51a1957 + last_write_checksum: sha1:323be3ad4250f3144a1a39c202be981c0e95a551 + pristine_git_object: d90093593cae6edb5bc4d706b165f9efdd54b0b9 docs/models/agenttool.md: id: 513b8b7bc0b7 last_write_checksum: sha1:8dedf7bcaa05492689ce0828e5644380258d5a7e @@ -300,8 +317,12 @@ trackedFiles: pristine_git_object: f8401a8e26c3d54aa47a1a6cc265050f0a4afc80 docs/models/basefielddefinition.md: id: f9e0bbae859b - last_write_checksum: sha1:28a4d2774231873af97debedcf2fba4f49e83bf2 - pristine_git_object: 3f7abea981c142e1fb1ba993a10dbd0e347b2df2 + last_write_checksum: sha1:fea96b146e5696ff3b93e6b6529fe4ace90616aa + pristine_git_object: 3d721d91572e4cdb8d5de5a2cdd294693f552d73 + docs/models/basefielddefinitiontype.md: + id: e0678603f859 + last_write_checksum: sha1:4c79afbbc22081d7ac18c3de963b92dd2dca0069 + pristine_git_object: efdff2a4bf26336c8f1880683fb2d798ee2d630d docs/models/basemodelcard.md: id: 2f62bfbd650e last_write_checksum: sha1:d42dfe36b103ee95f55e91ac306e3179060dfb3f @@ -368,8 +389,8 @@ trackedFiles: pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:9979175951fd1540db1660f0c3494217b80cde61 - pristine_git_object: d335f908276165dfc7d1b92f55ff246fcf6d2e8a + last_write_checksum: sha1:8bc525398b3e06d486d3e759c3221c59d41c00c5 + pristine_git_object: 14e860db0f75b41d9f9316a2d65434215c8831b6 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -382,14 +403,22 @@ trackedFiles: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 pristine_git_object: dc82a8ef91e7bfd44f1d2d9d9a4ef61b6e76cc34 + docs/models/chatcompletionrequesttools1.md: + id: e811358cf0a2 + last_write_checksum: sha1:492a8d95f6882b77e928e7cd1478c5501ff47dfd + pristine_git_object: 9926c6d56335a618b2dd52e0de80a6e572cfdab5 + docs/models/chatcompletionrequesttools2.md: + id: e11c129a790e + last_write_checksum: sha1:d6a8fb76c8c6f8ebe88b6bebc688c93b87f99faf + pristine_git_object: 48d8596d7caaf09e4773b80f451fb2bc16eab1d7 docs/models/chatcompletionresponse.md: id: 7c53b24681b9 last_write_checksum: sha1:a56581c0846638cfe6df26d3045fb4f874ccd931 pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:213564d7a2848ad3d390419c7e12a6b11c79982a - pristine_git_object: 9d50902fe8205ab7fc646074509a1ebf5e480eab + last_write_checksum: sha1:eae5eb85146e95ce4d3f76a362abfe29e4b40c5b + pristine_git_object: b5f35a5ab4cdfeccbb2bc3219168c59103c6b8b7 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -402,6 +431,14 @@ trackedFiles: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 pristine_git_object: 43f3ca3809bf1a2a040e2ad7c19a2b22db0b73f8 + docs/models/chatcompletionstreamrequesttools1.md: + id: 97ecbd5846d6 + last_write_checksum: sha1:d10c00e0bf94342d2e0c54f5a61452f934e8da3d + pristine_git_object: fb7a968bffd4a4542338fcfcfa3747ff6e1d32aa + docs/models/chatcompletionstreamrequesttools2.md: + id: a5c63583cb81 + last_write_checksum: sha1:5009ab4f4518fde936e13c549d994263ce2fc571 + pristine_git_object: 273651d8326bc5ec3f4ff80592867ecd5a2b038d docs/models/chatmoderationrequest.md: id: 22862d4d20ec last_write_checksum: sha1:9bbe510ee67515092bd953ad7f84ae118398af54 @@ -484,12 +521,16 @@ trackedFiles: pristine_git_object: 3b6f3be6942bbcf56261f773864a518d16923880 docs/models/codeinterpretertool.md: id: f009740c6e54 - last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad - pristine_git_object: 6302fc627d7c49442b6c9aec19c70fdceaf7c519 + last_write_checksum: sha1:8f6a07297073cd031b5b2cde48f8f5dc33eca3b9 + pristine_git_object: 9fd6a90785e11593a5ab18d873c2e8974f687615 + docs/models/codeinterpretertooltype.md: + id: d6d0f83de515 + last_write_checksum: sha1:55c1ace70ca09529d03e6fcb4e37aabbf3f2f45e + pristine_git_object: 7f95f5da826c18822176e477d26f8a5a3e05a05b docs/models/completionargs.md: id: 3b54534f9830 - last_write_checksum: sha1:7432daccf23d8963a65fa4f2b103ea0396fbfbeb - pristine_git_object: 148f760859636e8c32259604698785663491a445 + last_write_checksum: sha1:3629a70a095750b82bc60a80c0a2b3e3496bafba + pristine_git_object: 51f7ff3070cb6d6e79c17dadff2340b028958563 docs/models/completionargsstop.md: id: 40b0f0c81dc8 last_write_checksum: sha1:2a576618c62d4818af0048ed3a79080149a88642 @@ -664,8 +705,8 @@ trackedFiles: pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:fff53e06f2409c4de6fa8f6a56efad5c165b7685 - pristine_git_object: 6a5dc206ecd4bb115647270adfebcc955b59dcb8 + last_write_checksum: sha1:c6751b61dcda75b9b021283b2dbca068fd902dde + pristine_git_object: 4638049eb9d7ccc1c796a85ddad55f77faaab437 docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 @@ -688,8 +729,8 @@ trackedFiles: pristine_git_object: fe8ad1b5f8f3a48b48b9e2d09814af7df0ed3788 docs/models/conversationrestartrequest.md: id: 558e9daa00bd - last_write_checksum: sha1:0f7b4fdb5c945bbe8e49857965756c6bdc6f5ce4 - pristine_git_object: be0f2289b02395c888391b6f7e8e657c49343d47 + last_write_checksum: sha1:bb60d17dcb85e7f65e914f29778dbb7025bd022e + pristine_git_object: 03dec2ecb937a7128b07f61508247bc5ce0acd24 docs/models/conversationrestartrequestagentversion.md: id: e6ea289c6b23 last_write_checksum: sha1:a5abf95a81b7e080bd3cadf65c2db38ca458573f @@ -700,8 +741,8 @@ trackedFiles: pristine_git_object: 4e202d69ae83fa11798c8b88a34a0246a3d764fe docs/models/conversationrestartstreamrequest.md: id: 01b92ab1b56d - last_write_checksum: sha1:768a1d573b5fa034fefcf74e0ae9bc16f6558025 - pristine_git_object: f99a6e3404aea78062d2fd86652649ffd0f03d98 + last_write_checksum: sha1:436a108559dac72955480774abe4b1669383cd73 + pristine_git_object: daa955845a960acc9bb53147821e6ae3e7148b88 docs/models/conversationrestartstreamrequestagentversion.md: id: 395265f34ff6 last_write_checksum: sha1:ebf4e89a478ab40e1f8cd3f9a000e179426bda47 @@ -716,8 +757,8 @@ trackedFiles: pristine_git_object: ee88d9d4631c62e2845294950cc7e787316bf461 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:5e9f0e779acc11017dbce26e1a4d2be179cdca99 - pristine_git_object: af50989c156f08ea1781d2767be422662945e9c2 + last_write_checksum: sha1:f0d3611a198ac1a504cd9ec278486583cb2d76e8 + pristine_git_object: 3c8b650f8cb9d877edad4ab85d4a95e26ef82200 docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 @@ -736,8 +777,8 @@ trackedFiles: pristine_git_object: 57e260335959c605a0b9b4eaa8bf1f8272f73ae0 docs/models/createagentrequest.md: id: 9484bab389c1 - last_write_checksum: sha1:5c24b11438c77dbbdb3a6e5275952889e4da7cb9 - pristine_git_object: e9665545ae14415bb0c61dc0312136dd2930ee13 + last_write_checksum: sha1:c54b5d8ffd8b566b2607742df5ae1851e28cef83 + pristine_git_object: 2559a7c7a2ccc9f2ea6d7740996aa548df29098e docs/models/createagentrequesttool.md: id: 72e5f99878c5 last_write_checksum: sha1:4b4ab1566b3c82a14ace1c141538d7ad6b7192f7 @@ -800,8 +841,12 @@ trackedFiles: pristine_git_object: 71562806dbec6444dcdd0a19852a31ca00b6229a docs/models/customconnector.md: id: 7bcc77607afa - last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a - pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 + last_write_checksum: sha1:542fe858ababf1d56024d1766e68f6d388d6e874 + pristine_git_object: d238eb5f86a00cf51b3146dc482cb378c9711bc4 + docs/models/customconnectortype.md: + id: 8918c5e0ca8d + last_write_checksum: sha1:82bad5f8c0b4e4c2a11da24dd8cc51f59aa1e29e + pristine_git_object: e2c8e0e03434843dc7ecd2413e7d4c5d647364af docs/models/dataset.md: id: 31af4d237e19 last_write_checksum: sha1:073fa9a0b7891ccd9b6ae64ba960d74eeb5c9007 @@ -850,6 +895,10 @@ trackedFiles: id: c838cee0f093 last_write_checksum: sha1:e5b6d18b4f8ab91630ae34a4f50f01e536e08d99 pristine_git_object: d9bc15fe393388f7d0c41abce97ead17e35e2ba4 + docs/models/deletevoicev1audiovoicesvoiceiddeleterequest.md: + id: aaf676347dbb + last_write_checksum: sha1:b54fcfcfb0d1e528380ca273ecb6e84349ca9cd6 + pristine_git_object: 0afc04f2ce115a8f48aa5f2e99b0fe02facce90e docs/models/deltamessage.md: id: 6c5ed6b60968 last_write_checksum: sha1:00052476b9b2474dbc149f18dd18c71c86d0fc74 @@ -864,8 +913,12 @@ trackedFiles: pristine_git_object: 42c639a6a9b235ab4c754286486fa7e8872a0e7e docs/models/documentlibrarytool.md: id: 68083b0ef8f3 - last_write_checksum: sha1:76b9f47c399915a338abe929cb10c1b37282eadf - pristine_git_object: 95c3fa52ee3ff29e72bc0240a98c0afaa0cd5f62 + last_write_checksum: sha1:00eac0753cc8f509d9f3b560cdd302537fc492df + pristine_git_object: d22ff33a9697700fb605ed661d2c70179c3b75a5 + docs/models/documentlibrarytooltype.md: + id: 23c5ba5c4b3f + last_write_checksum: sha1:c8a4364d8a80b94d81c70a8202bde70763bd6acf + pristine_git_object: 945452e3807b1aceae15ee0015f53c347b3636b7 docs/models/documenttextcontent.md: id: 29587399f346 last_write_checksum: sha1:93382da0228027a02501abbcf681f247814d3d68 @@ -1178,6 +1231,14 @@ trackedFiles: id: 38d58bb7d102 last_write_checksum: sha1:63b80dff98aa4fc959f71d1e41faa0eeec4801aa pristine_git_object: cf276b5e4297eec4d5d4c6996fde7144d54dd8c0 + docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md: + id: fa1b72f3aa6b + last_write_checksum: sha1:10b8897bf884ac876559ef574a76bee6df3b7afb + pristine_git_object: 618465e9626133a3a189644f758e6b0b011f6a65 + docs/models/getvoicev1audiovoicesvoiceidgetrequest.md: + id: ff2e9c3966c2 + last_write_checksum: sha1:83baeac8591dbf035dd1c04fbe9c06e0e65afcd8 + pristine_git_object: 09caf65c1d4f3415ccf2a1095a54748a7f6ca2df docs/models/githubrepository.md: id: 66c120df624b last_write_checksum: sha1:045e538dd7faffc1c6c6e6816563c5c8e776a276 @@ -1200,8 +1261,12 @@ trackedFiles: pristine_git_object: bd7ea1fe08f2fcc737d6951a44584e22578ed9ba docs/models/imagegenerationtool.md: id: d5deb6b06d28 - last_write_checksum: sha1:a1813ef99e4a0990fd073bb2311c475e88072029 - pristine_git_object: b476b6f2733a49767d7f7a4ad091fc321ab514f4 + last_write_checksum: sha1:782948e17f9e3119910eef09ddecf74b13b2735a + pristine_git_object: 93edbbf8a8139d2029b46e2379ae88bb85a9972d + docs/models/imagegenerationtooltype.md: + id: fc670aabaff7 + last_write_checksum: sha1:fdb97734f6943a163affd2eb69e861d574d1afbf + pristine_git_object: 7763ca21563d123dae99f6dc8899163a035e2db0 docs/models/imageurl.md: id: e75dd23cec1d last_write_checksum: sha1:a5cf621ce58a9cc7c96afa7de53367eac7b4cb0b @@ -1250,6 +1315,14 @@ trackedFiles: id: 380503708a09 last_write_checksum: sha1:551b5d6dd3ba0b39cad32478213a9eb7549f0023 pristine_git_object: 57ed27ab3b1430514797dd0073bc87b31e5e3815 + docs/models/internalmetadata.md: + id: d2f0239d8b15 + last_write_checksum: sha1:6267f4b134862a5e09e97a73f5967bc9999871d8 + pristine_git_object: 24ca04d9802dd4d65b3e69722e1e49abbc9a8ec6 + docs/models/internalmetadataagentversion.md: + id: b3c5d0837986 + last_write_checksum: sha1:92422845c1c932f4c8bbc2b056e589685db12bff + pristine_git_object: 8dd7955d3e3d5b63c0a7899fca9fdf069f8c6673 docs/models/jobmetadata.md: id: 1f8e4c2f49e5 last_write_checksum: sha1:a29ec10cd129b955672f60aaf526905780afe6b6 @@ -1506,6 +1579,10 @@ trackedFiles: id: 165871ba2e7d last_write_checksum: sha1:2c6c18123e297829dde6e877f3df984ce20aeef3 pristine_git_object: 4c29d4d4fc8087424104ff7d5312177ec4940094 + docs/models/listvoicesv1audiovoicesgetrequest.md: + id: 2728f62b4ff4 + last_write_checksum: sha1:3173ded8a9dfea913295ab4cc943e30a8a30052b + pristine_git_object: f767d3099a2fa8b487f9d92be421623c536f19b7 docs/models/loc.md: id: b071d5a509cc last_write_checksum: sha1:09a04749333ab50ae806c3ac6adcaa90d54df0f1 @@ -1554,22 +1631,38 @@ trackedFiles: id: 3dd409ff05ba last_write_checksum: sha1:f7dd5b03360f01417c32a33fd8131e6899ec6430 pristine_git_object: 504aa9de165ea21ffd7178dd092b7532fc3f9e6a + docs/models/messagetokens.md: + id: c348c2448aaa + last_write_checksum: sha1:5f99a25a3f689030756a63e925113030121c5d7e + pristine_git_object: 427e09b524964c521a6b63962e5f71ae0ca1b485 + docs/models/metadatadict.md: + id: dec61e84f14e + last_write_checksum: sha1:a93e381544e2313862490a1e373b06327b0ba9dc + pristine_git_object: c53c4aed0522c50ecc9e575b4829538382ec9c25 docs/models/metric.md: id: a812a3e37338 last_write_checksum: sha1:14016848dcfaba90014b482634ed6d5715caa860 pristine_git_object: 7f86303651650177ece51b82d867cab858e830ae + docs/models/mirrorconfig.md: + id: ecf31b1715e0 + last_write_checksum: sha1:51edfd8b440185056827bdb4c950fa11375862b3 + pristine_git_object: a722c88df57038b592beda40423d2cf220ca5c60 + docs/models/mirrorsource.md: + id: b069f5686f81 + last_write_checksum: sha1:80a61ad0bb44d40756b9980a252b477f36755129 + pristine_git_object: 77c946da2e5f4a8db1a15b17bdc6f13b8bcdd23b docs/models/mistralpromptmode.md: id: d17d5db4d3b6 last_write_checksum: sha1:d7804c45f10f2e929276d4a00bf6c2b966a78fb5 pristine_git_object: 9b234e3ea8fc13261897acf18ce4da3b14485f72 docs/models/modelcapabilities.md: id: 283fbc5fa32f - last_write_checksum: sha1:98df9700314cc4ee6051e0e18d22dfaacb0ad648 - pristine_git_object: 7ff789ed85ae894b51ef2253e9a66aec558616d5 + last_write_checksum: sha1:804b67d580cbb8be444485712b85ade3c059fbe1 + pristine_git_object: 7c125e6490b40b53b090f55ff9b5634bc2c2572c docs/models/modelconversation.md: id: 497521ee9bd6 - last_write_checksum: sha1:aea6f51b6276c5e36447c828e78a30367f15a978 - pristine_git_object: 190a6f6eb48191b2507a4861525707f041961538 + last_write_checksum: sha1:a201580e604ee0a14c636a5f80601d76dfbc0b47 + pristine_git_object: e30d93d1cf1aa778edc63f935d5912f78be0e501 docs/models/modelconversationtool.md: id: 2dd28167bc36 last_write_checksum: sha1:029cca1fe47df23ef858a01fd2627f0bc2ffdfd3 @@ -1746,6 +1839,10 @@ trackedFiles: id: "336054835357" last_write_checksum: sha1:43253d2ef4badf3a5e8e5981becfb558c934359a pristine_git_object: 68313743c4d926b2cb29037d0e59a2f9d8d25f1c + docs/models/prompttokensdetails.md: + id: 1391892fce0a + last_write_checksum: sha1:4a82fc483f090e4fc09d19a3f2c0f2a2e022cf3f + pristine_git_object: 36b58e9aa80a53dad530cad93fb1d565fdd03b59 docs/models/realtimetranscriptionerror.md: id: 4bc5e819565b last_write_checksum: sha1:c93e4b19a0aa68723ea69973a9f22a581c7b2ff6 @@ -1792,8 +1889,8 @@ trackedFiles: pristine_git_object: d6c6547d7895e53be15a0cce46b6524178acc3bc docs/models/reasoningeffort.md: id: c8fd630d3f07 - last_write_checksum: sha1:1419a2647967fd29a098941e8ca3d5d874ee6c71 - pristine_git_object: e0b17c8ba4d4f75b14f7dea9559514bde37ccb89 + last_write_checksum: sha1:0a4afcf2f35b5a53764b7daae3ea3c5834743312 + pristine_git_object: 9b418bc3b9819560a9b468571d619e5d2f65dea5 docs/models/referencechunk.md: id: 07895f9debfd last_write_checksum: sha1:3d35227a4f7612301fd5f17a445c4c2b712f0bf1 @@ -1858,6 +1955,10 @@ trackedFiles: id: b694540a5b1e last_write_checksum: sha1:dd140bf891a9b08db014fde4a99af28839e10dfb pristine_git_object: b16f5c3baef6a17d3900b3eddcc5034e37a12b01 + docs/models/roles.md: + id: 2af79e204ed6 + last_write_checksum: sha1:10354a9bcbe03a498848de9874b3163cde0fcc05 + pristine_git_object: d722e7654427a013da70deb45f1bdb65b55add30 docs/models/sampletype.md: id: 0e09775cd9d3 last_write_checksum: sha1:b77964a7b39ec1b74f70925a39c30b23fad6ac43 @@ -1902,6 +2003,42 @@ trackedFiles: id: 6541ef7b41e7 last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 pristine_git_object: 37ca338b6f2ba9d10209cbcd3c680b7589589767 + docs/models/speechoutputformat.md: + id: cd623f390460 + last_write_checksum: sha1:1f237bad21e275b29ff8fa4c25397497adb5db92 + pristine_git_object: 9b06e46475dd6160588ce4fe9d275c2f2454a6c0 + docs/models/speechrequest.md: + id: 1403855cf560 + last_write_checksum: sha1:a494d5f4f3e92722552365561b03c05749e3d8d3 + pristine_git_object: 2e1e4cde3f38d271904ad11227b5edb6d1f66af9 + docs/models/speechresponse.md: + id: be437798d476 + last_write_checksum: sha1:c1c23ed7f45484831d04ca5bc12a28b4e91cd0d0 + pristine_git_object: c44ecd830d84c74b2d7d15f1369f60ab81c6fa3a + docs/models/speechstreamaudiodelta.md: + id: 2fafdd59efa2 + last_write_checksum: sha1:1bfecfce38c78162ff0c324429e16da1d98651b4 + pristine_git_object: 3a1725529f737b69ecfe147f1619c05896d0c2a4 + docs/models/speechstreamdone.md: + id: 660654bb6961 + last_write_checksum: sha1:460b0891989440add3f7f0e802b5744e343249cb + pristine_git_object: d9b5e0c0c9deef93a2ff79d46a026766c4aef673 + docs/models/speechstreamevents.md: + id: d071f3e7ecda + last_write_checksum: sha1:48806c50f933cdf9331fafe5a622717147fe9427 + pristine_git_object: f624f85f3da3c45a1e50faa730d516d29e18edce + docs/models/speechstreameventtypes.md: + id: 6d82ea8e72db + last_write_checksum: sha1:8bc26e2195e060d96f906f69c9237c7f7f91eea9 + pristine_git_object: 8c688c27acfe398412316b6695b2524e7818bb66 + docs/models/speechv1audiospeechpostdata.md: + id: f79b3009aa04 + last_write_checksum: sha1:6f3b9fb81fc82b8b4f745df380ed786b02ccb157 + pristine_git_object: 52735e257a4238155537411a06b2ff03a1897454 + docs/models/speechv1audiospeechpostresponse.md: + id: "224767288403" + last_write_checksum: sha1:a05342901f170d8226a06cc4e2854dd36917756e + pristine_git_object: 040f3351c61c89abd53602eaaf767edd977af2b5 docs/models/ssetypes.md: id: 6a902241137c last_write_checksum: sha1:6291d6bc7cbcd7640b83b03ac8ce353b95c1f913 @@ -2074,18 +2211,14 @@ trackedFiles: id: 69a13554b554 last_write_checksum: sha1:d969f462034ed356f2c8713b601ee7d873d4ce07 pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d - docs/models/typeenum.md: - id: d306d1d601a4 - last_write_checksum: sha1:f0f0bfac75bf5e5fcd972d0cb196961d512d40ad - pristine_git_object: ec47cf9668f839469c9ab71c010f3e1975be929c docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 pristine_git_object: 375962a7110f814288ea9f72323383bd8194e843 docs/models/updateagentrequest.md: id: 371bfedd9f89 - last_write_checksum: sha1:73936f78ae35e5f84ebe32aabb150d6792ce40d1 - pristine_git_object: b8aa01f66b13d050839bd0aacf1550f669bc8d13 + last_write_checksum: sha1:ffa273db325e85b14ba2554b223a2a2de7ad9b8f + pristine_git_object: 7852472bd09bb405b926b3f38b2d5a0b79704ee6 docs/models/updateagentrequesttool.md: id: bdf961d2c886 last_write_checksum: sha1:104218314ae55ccf111d90bdbad987a13988f7f5 @@ -2142,10 +2275,18 @@ trackedFiles: id: 8eabdced3e0e last_write_checksum: sha1:96879df11c005b591f2e59975897feff8fc8656e pristine_git_object: 56b84c59c48ac135345394235c71ce77d384e33e + docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md: + id: 0b7dfc68573f + last_write_checksum: sha1:53d5d07d53d184d68b57185d251c8d68ff3cf4d4 + pristine_git_object: a8ca8e298bab527fe82e3c0dbf076ace0c70da20 docs/models/usageinfo.md: id: ec6fe65028a9 last_write_checksum: sha1:cf71fb9676d870eba7c4d10a69636e1db4054adc pristine_git_object: f5204ac94a4d6191839031c66c5a9bc0124a1f35 + docs/models/usageinfodollardefs.md: + id: db2412f29163 + last_write_checksum: sha1:0f0dcb8301e46d644e458f3f0d1ae0349f22f589 + pristine_git_object: e5088d432997327c8b5f96e267e569cccfacc0a2 docs/models/usermessage.md: id: ed66d7a0f80b last_write_checksum: sha1:f0ed7d9cb7264f1d9e4a9190772df3f15e25346c @@ -2162,6 +2303,22 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a + docs/models/voicecreaterequest.md: + id: 1014a6e8d549 + last_write_checksum: sha1:2eba4e618f2767df9ca52b8b352e3060e9d0f04e + pristine_git_object: e9a3b3a14963b63e3b5555912bfe2c2f5ad6c67b + docs/models/voicelistresponse.md: + id: 8226f91596b3 + last_write_checksum: sha1:5d4dc06036e1c8267fe736ae23c53104853850dd + pristine_git_object: d2d40dffd0bcda10a2266c95ac951e8242209f6e + docs/models/voiceresponse.md: + id: f6523df1521d + last_write_checksum: sha1:92c959e003170588fa6fa7d9d0bd33207fbaf49e + pristine_git_object: 3ec6d5407d0e7bde20488c2831dc3fe962696eee + docs/models/voiceupdaterequest.md: + id: 7fbbdd315066 + last_write_checksum: sha1:8a1883407eff51f9e81fa3024af0d9fab016b2ca + pristine_git_object: 924b5f477dd97f8fe417de63b5d7b744616b2fc4 docs/models/wandbintegration.md: id: ba1f7fe1b1a3 last_write_checksum: sha1:ef35648cec304e58ccd804eafaebe9547d78ddcf @@ -2172,36 +2329,44 @@ trackedFiles: pristine_git_object: d12bc31191ba534a9744d78f657c19e7f93f777a docs/models/websearchpremiumtool.md: id: 267988aa8c3f - last_write_checksum: sha1:38f80a43f73a13ddedc7730f853c092a48b665f9 - pristine_git_object: 78b736cd314617caa0d77f3c42015212e37ab539 + last_write_checksum: sha1:2b9723ebee6793f1fef80a17b7f08695af1555f7 + pristine_git_object: 27951776158b6dc07c1a1e175aad6874bca3ea1d + docs/models/websearchpremiumtooltype.md: + id: c70fa6b0ee9f + last_write_checksum: sha1:4892fd886ef09e8ace205a636292aea727720628 + pristine_git_object: e4f3d7bf27593f99fb344a27d6149ff280dd9001 docs/models/websearchtool.md: id: fc4df52fb9b5 - last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 - pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 + last_write_checksum: sha1:c84ff90f03fe964d4e3b77958dccaadeac89c127 + pristine_git_object: 5dfd8c22c4434003e77a772df2642032891da0e6 + docs/models/websearchtooltype.md: + id: 6591e569c4f3 + last_write_checksum: sha1:961d8f5e9aaaaa88150f4164a871cf06dfdcbb84 + pristine_git_object: 89af0c4da9b28107e6e938b2289b25388285e2a2 docs/sdks/accesses/README.md: id: 2ea167c2eff2 last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:95844e1e50f850f71580e08ed9cd1ffdefa899bc - pristine_git_object: 46fb60ef4f92d61b2959f1b67e5f07e5bae55ba7 + last_write_checksum: sha1:8af2c47744428babaed655bbfb984964c64d6b4e + pristine_git_object: 76d6a57c19f09d951bd328bbcd0338e0d41cf625 docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:b4b3123ff210545048e2b0c729f2b7e5f7460f4e pristine_git_object: 3633fe4ee136c1ac90f9446425f62a0d68fa4f90 docs/sdks/betaagents/README.md: id: 5df79b1612d8 - last_write_checksum: sha1:6d14ffeace9a068f45ed9c62ee6663dc3768239f - pristine_git_object: b936538c54d38e52a67ffdb8c65ec35999197a3a + last_write_checksum: sha1:b01e307ad49bb22962062b1c1d3dd58563dea71b + pristine_git_object: 2c3e9c2fca43f97ced64cf7c97636201377d51e2 docs/sdks/campaigns/README.md: id: 18dcc3c717ca last_write_checksum: sha1:758413376668e53883ded94d41b1167cbc00fa04 pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:8527d41d1095e052f0b71a9e5f7075f0a722447f - pristine_git_object: 61c8813f3f168bf958edadd985875498e5205497 + last_write_checksum: sha1:c6cf1a026f4717962ef50c3deb014bd39d37e2f4 + pristine_git_object: 6d7d00075f8a1419f5e46f83dee5994f3a9ef08a docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -2216,8 +2381,8 @@ trackedFiles: pristine_git_object: f23a09f780eaaed4aeb7ee8f4a0347ce5de3efd4 docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 - pristine_git_object: 63cd80a4a655a5c139be79239b0787c3f90cdea9 + last_write_checksum: sha1:e0b78791f14b76d486688c5aa829877d58ae36da + pristine_git_object: 56b9b75a1f61a22c63bfcd7953e294f2337bfa3b docs/sdks/datasets/README.md: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 @@ -2266,10 +2431,18 @@ trackedFiles: id: db86bab024d3 last_write_checksum: sha1:2ef5b164016e9b40c27d8a4915aeb8d3d2ed42c7 pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 + docs/sdks/speech/README.md: + id: d5924688d48c + last_write_checksum: sha1:39e91f6d26c0d04212b24de47dbe5b5d5487a208 + pristine_git_object: 309ab6e005f01232410e5c44a61944e6f5355696 docs/sdks/transcriptions/README.md: id: 089cf94ecf47 last_write_checksum: sha1:15d118796f147bc5b0bf4146ba39bfa9edfbc996 pristine_git_object: 97703c9b4dc942385ee04ae96cbd100c3f632a17 + docs/sdks/voices/README.md: + id: 4f1a657c8f68 + last_write_checksum: sha1:31c15c54de42204fcfb348c7ba05494e10305639 + pristine_git_object: 3383e617c3d3733243e28497396b15589c4552b1 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -2296,20 +2469,20 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:ac9ec8877b23bb3ae3a0e194d80d8ab722604054 - pristine_git_object: 03ef265bdb484ad28dc5d9813c04d71c3a6bdcdf + last_write_checksum: sha1:0f1b33870c08333cd132d8c01758b393833fc34c + pristine_git_object: 72b2f9e5111fd416cdfb3ceb8dc3e69f834f2a4d src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:bd526b7613c13f07adee931996ec7fed54e72f26 - pristine_git_object: 2e91dd04aa66e340db8fe61ee8f04abf67798eaf + last_write_checksum: sha1:bb272f94ff3e2bd86ef4aa5ec036c499951bc4a0 + pristine_git_object: 8ac699623e8bb88b545eb34e715bc2d50e40e069 src/mistralai/client/audio.py: id: 7a8ed2e90d61 - last_write_checksum: sha1:e202d775d24c0303053e0548af83fcb04e2748f4 - pristine_git_object: f68f063c08a099d07904456daa76d8e2d2ecdbe6 + last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd + pristine_git_object: 597954e4facba105cee62d92ea6b8c68555f63dd src/mistralai/client/basesdk.py: id: 7518c67b81ea last_write_checksum: sha1:2cea76931db51175b2c787d0c707f08e9944c22f @@ -2328,16 +2501,16 @@ trackedFiles: pristine_git_object: 83b8fc8792469efbd03f0bab240d4a6dc8135db5 src/mistralai/client/beta_agents.py: id: b64ad29b7174 - last_write_checksum: sha1:b63c905fbf5b8f85379d3df719964fc7c9675a51 - pristine_git_object: 19f8d2b261505870509a5f751988f99980385b5f + last_write_checksum: sha1:4ef1760cf665e0349b830e811dd15e8ac84ca31c + pristine_git_object: 00a0a1975533553fd9d5313afc533a67bf5c4643 src/mistralai/client/campaigns.py: id: 9e64fcf4e60e last_write_checksum: sha1:0139096765ca8b44ef209ee0fc62e72040f3a6ff pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:dced89ea82a30a61e0c62db2f2a0c3be8a7ba099 - pristine_git_object: c11a53d1237c284ff74b5aba791bd405bac2d0ff + last_write_checksum: sha1:5dde26716e632c3c84faf33cc4b6eb187dff2928 + pristine_git_object: 8c73bdc9a0e2f6bf41bc3abf0576e215467fa4dd src/mistralai/client/chat_completion_events.py: id: 1813f339625b last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 @@ -2352,8 +2525,8 @@ trackedFiles: pristine_git_object: b72ca9a39a225cec099f6606afaf4463c294a97e src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:cb25436bb3ae12c2f6b215b6d5e9de4e219cbe25 - pristine_git_object: fafcd5f5221d2177962f3d8239abda9a99b5f3a9 + last_write_checksum: sha1:f5f2e6d1d78b75177d6b831b69b212956926eede + pristine_git_object: 9aeb5b559a02f43004b8f93701c9adfbeab3d608 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 @@ -2428,20 +2601,20 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:b532321abf9e0032f26cdc3dc81af0b6eb1b6839 - pristine_git_object: 7e9c7f60b7b6398e93662f8767ac6a629727233f + last_write_checksum: sha1:fba31c478e24e28b21f8d42eb4071685b1937892 + pristine_git_object: 905fae94be27b73eb6af7bbdade00680ec970d22 src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:c650f57616b5455de2a6ff33c51f91b174586aee - pristine_git_object: 36cb26bfc19f17866330d709f82e15555b1a99e5 + last_write_checksum: sha1:2574866d9855cb0b6314ac94ca288d59f3196c73 + pristine_git_object: 28d3751f63c1657abccbecc129a65f751742342d src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 pristine_git_object: 6972af2a4ae846e63d2c70b733ecd6c8370ee0cd src/mistralai/client/models/agentconversation.py: id: 1b7d73eddf51 - last_write_checksum: sha1:2619ac07a5b0642d5ea02b843bf38a7e32ec8cb1 - pristine_git_object: b52f5e5a96c497c731c19f32c6142ee50ed29367 + last_write_checksum: sha1:84a013c3f7e0a1fb10e2f476360504dd449e529b + pristine_git_object: 061ff2ac9222704ef4af2ec7b76958e6b71e4be7 src/mistralai/client/models/agenthandoffdoneevent.py: id: 82628bb5fcea last_write_checksum: sha1:2c8fbb608143ee836e675a0d9610a64b7b8ac99a @@ -2532,12 +2705,12 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:87237462a5289c5aac2d1ce59b8b766342dd5ccd - pristine_git_object: f4ce34cb614a992f5276a1664d05426b2b16766a + last_write_checksum: sha1:150523bb6aca6d81e3e6d4c78a6a93a536f7b4ac + pristine_git_object: 527d6230d4e42da8de2b3b3d114b7eb62e679049 src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:a449cb9287617ba7337a73777b7ab50479e7cd87 - pristine_git_object: 0feb38038f5aec52bb393c633a0913b99b1579a7 + last_write_checksum: sha1:b0f62e7e88f6c73c4be95dbefe3af158f5c8b074 + pristine_git_object: 483ec99c0df4db5a0f154da14cdc0b9070d0fd7a src/mistralai/client/models/annotations.py: id: 3ae9e07de11d last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 @@ -2592,8 +2765,8 @@ trackedFiles: pristine_git_object: 1f5a6639b3fae3a5c96cf35bc4417d5d5151a37f src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:7d7b08ba19500836193c593bacc1dd6982c9ef71 - pristine_git_object: b57ff2cab05c7a2a7f10292ff1c017eb58a10f84 + last_write_checksum: sha1:a323bc4117cecf4ffcb228cf896e7ceae02f9b6d + pristine_git_object: acf9cf8d6fc3220f736b7c6cfe32d42425febd2a src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e @@ -2648,16 +2821,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:bcc680ee202ce920823502f59f8549453cf4a999 - pristine_git_object: f1b0b2d61beae2827b9f66331d74850e7c56be91 + last_write_checksum: sha1:fc65418994a7f4fba8ca2bf0f240a9dc604cb4d1 + pristine_git_object: 558efb7618b259dae8262cb671c7dc39cbd4729e src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:dd9dc2cd5d154e7a8e6cff928fe47582e0d4bd81 - pristine_git_object: d9f413c673b030a4ebd1cd363b0376a009b45540 + last_write_checksum: sha1:be41df80620c88cd1f3f93b9e9aa31d1aa238075 + pristine_git_object: 4d92d524b8d1159cbb87c0cb22d80c17fd888a05 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -2708,12 +2881,12 @@ trackedFiles: pristine_git_object: 3a9576c830163d351b5d8f6b66bb612fca12b844 src/mistralai/client/models/codeinterpretertool.py: id: 950cd8f4ad49 - last_write_checksum: sha1:248d6e6c1906303f03eb4f29429227a7d39679a2 - pristine_git_object: 4cf9d055c3aaee426d99071180ae6de21eb648cf + last_write_checksum: sha1:ad38c653d3355ffd9d000bde82d83481939e3495 + pristine_git_object: 3c6a384fbbf18feea672f309c892c2e78acfe737 src/mistralai/client/models/completionargs.py: id: 3db008bcddca - last_write_checksum: sha1:b922bb4464d2759c54aa6dd1a4fd82fba5595e9b - pristine_git_object: 76c4cf98ccb348c0d806a442ad7e3697b8e79d68 + last_write_checksum: sha1:1c9918b8b9631471dcee25f6608c026770810a2f + pristine_git_object: 57e4840a14602ab11b4018810aae5bc5772a1e5c src/mistralai/client/models/completionargsstop.py: id: 5f339214501d last_write_checksum: sha1:744878976d33423327ea257defeff62073dad920 @@ -2836,28 +3009,28 @@ trackedFiles: pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:5d64abb831437c60c7e88a7dce2e08d03174ee1e - pristine_git_object: 94fcb03bb392ff4a369e0dfaa524644d611d2c49 + last_write_checksum: sha1:0c4616fe65bac48a5b5ff9b583da748fd76bcc5d + pristine_git_object: 5b6951bf0f04cd19db3ad8790f3f52f796cc41e7 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf last_write_checksum: sha1:cd45eec534ccd27052d9809f8aafedeee243d9f9 pristine_git_object: 64437b23c7ff4cd50010e970832bed3567ae4bf0 src/mistralai/client/models/conversationrestartrequest.py: id: 681d90d50514 - last_write_checksum: sha1:edc3713fa0be297da7c622f60775db3c617ab221 - pristine_git_object: b6b03f1faa89d72e4a4b3682f47692f301cfed9c + last_write_checksum: sha1:7f689520e582ce79f37caec22921b61e86fdbf95 + pristine_git_object: 8e04cb4547a899a7a6c997e7f26e9cca55c0d44c src/mistralai/client/models/conversationrestartstreamrequest.py: id: 521c2b5bfb2b - last_write_checksum: sha1:6fd47c92114693010c6014af6e2a347091985a87 - pristine_git_object: 41b7098f7086b41089432b183df664fb7539bfc1 + last_write_checksum: sha1:52850d94f142690a6c04f8497b12a6cfc5fa7e0e + pristine_git_object: d1aeb98d9bb45f52ea915602854cfdf57314a9e1 src/mistralai/client/models/conversationsource.py: id: 24d6a0861d4b last_write_checksum: sha1:e28921788ab1b6d2b6daf08b714bf34b2047eb6c pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:17f643578f395a5b4605710402f115eb25cae8b3 - pristine_git_object: a1afb2679b5c1e97995b78bbf2572cec489d28c5 + last_write_checksum: sha1:4ca22e6062a10c03b2050165b98c0ea7345c23d8 + pristine_git_object: 9a323e2af341593c6a1e95c99efe4bf4141d7a8f src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 last_write_checksum: sha1:ee993afc39cece27caf99ee60258f45980d86cbc @@ -2868,8 +3041,8 @@ trackedFiles: pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:da0d93f32efd9db292a83ccb8c0d18c02dbbb7ee - pristine_git_object: b434619d8c161f74453e2546986e24ea802269e8 + last_write_checksum: sha1:fe48fea4272f841faaa8a8770bcdf4d38031c383 + pristine_git_object: 78a9cd24972b7245e4ee6e4e489d4bae6cd05f6b src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 last_write_checksum: sha1:9061e5f387d98c2c2f624efafd6ef178dfad6b43 @@ -2912,8 +3085,8 @@ trackedFiles: pristine_git_object: 28dda0cb8c5ba2462ed0f68f19747447c6ae401b src/mistralai/client/models/customconnector.py: id: 14f3643f7703 - last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d - pristine_git_object: f3a1e2ffb1a29e8798a2ac8c9c636ac3bada7413 + last_write_checksum: sha1:5001ec4c8d744a66a66a14ae5085064c5f119049 + pristine_git_object: 9235dfd95e752f7a20598401c129ffcfec74b4bf src/mistralai/client/models/dataset.py: id: cbf14670ee00 last_write_checksum: sha1:012f85ebfbdb286436621efc3b5b1adb150871f3 @@ -2950,6 +3123,10 @@ trackedFiles: id: 767aba526e43 last_write_checksum: sha1:73568f2f450bf9c23aca3649372a92e1b9a2fc54 pristine_git_object: 199614f53501f34088cb112d6fe1114e1e588d8a + src/mistralai/client/models/delete_voice_v1_audio_voices_voice_id_deleteop.py: + id: a84ce12a8251 + last_write_checksum: sha1:4c0a37f3516ff7198dfe13c0ed04fa4cf48b35fb + pristine_git_object: 3ce383648b1de95099b59b1f4c015a595f24060b src/mistralai/client/models/deletedatasetrecordsrequest.py: id: e7ef16596e54 last_write_checksum: sha1:971e81be9064277df5dd656e912b9f319474e742 @@ -2972,8 +3149,8 @@ trackedFiles: pristine_git_object: 8d1aea883e579ff1677949573f43dddc362bd35d src/mistralai/client/models/documentlibrarytool.py: id: 3eb3c218f457 - last_write_checksum: sha1:a84295aba7b9e7f70b68f279934d1a5ca0817f77 - pristine_git_object: 29f8d64a695342489d81bfe20ec2f8de60546ddd + last_write_checksum: sha1:a677b07da68e42bd67078e040519d6b166124ac8 + pristine_git_object: aa3093f4ef6b373c078af9734b00eae5ef713a25 src/mistralai/client/models/documenttextcontent.py: id: e730005e44cb last_write_checksum: sha1:c86f4b15e8fda1cd5c173da01462342cd22b7286 @@ -3238,6 +3415,14 @@ trackedFiles: : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f pristine_git_object: 7689415dd70da6eec8d0b416cbf020c4b9adeecf + src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py: + id: a5838063aee4 + last_write_checksum: sha1:457e62a76bd229aecf1725c5f813de63e35d8b7e + pristine_git_object: 5d4cbbfd8e3e30fe2e24d1a9f6f624a7480487f1 + src/mistralai/client/models/get_voice_v1_audio_voices_voice_id_getop.py: + id: b6ca849d5005 + last_write_checksum: sha1:ef189175dacf5a9be4295782eebfead3f40ce137 + pristine_git_object: bd81442ec3758ba0833ce8d3ad54fbc803748bc5 src/mistralai/client/models/getfileresponse.py: id: 81919086e371 last_write_checksum: sha1:a116c2fdef65748b5015804fc0eb9860fd2bc3b2 @@ -3264,8 +3449,8 @@ trackedFiles: pristine_git_object: 1982d357277a92fc7ebea3b99146116596d99c78 src/mistralai/client/models/imagegenerationtool.py: id: e1532275faa0 - last_write_checksum: sha1:0fcb9fdeffe252c88497f02164f7e753bea40ff1 - pristine_git_object: 0dd4a4d2a4671bb310410eb17bb85032638d817c + last_write_checksum: sha1:0e31f3c2d0b36a676ed136e3551435b5b4861566 + pristine_git_object: 5012a5657b18950bb402133a8a65821c23b3a423 src/mistralai/client/models/imageurl.py: id: e4bbf5881fbf last_write_checksum: sha1:a3e5c91291a5fcc24bda8fc1c96a2608965edae5 @@ -3306,6 +3491,10 @@ trackedFiles: id: 6d3ad9f896c7 last_write_checksum: sha1:d49d03f5a1d0e35668851aced62848ed3e20f001 pristine_git_object: 2bda83781d24d3a999014d483ea92604c7509438 + src/mistralai/client/models/internalmetadata.py: + id: 50a25e4e336c + last_write_checksum: sha1:e38448a4e90734164d1b69a33e52f5e72e23fc84 + pristine_git_object: dca90b9a7b16b555734a248372235a254ca66860 src/mistralai/client/models/jobmetadata.py: id: cfbdde7fc0a2 last_write_checksum: sha1:efe10ba4aad0a0e0befd94525b73ab2194e43be8 @@ -3482,6 +3671,10 @@ trackedFiles: id: 1843a7aa68e5 last_write_checksum: sha1:018c32019aab6c4995285ace8abba54d88f41c0b pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db + src/mistralai/client/models/list_voices_v1_audio_voices_getop.py: + id: 6b3ce5be1294 + last_write_checksum: sha1:8345bd6cbae4c66cbab2ba7c4407451bcdcb4be5 + pristine_git_object: 16ae81c7f0319cc2c6f7744faa4f582c6ba07faa src/mistralai/client/models/listbatchjobsresponse.py: id: 99d94c86a871 last_write_checksum: sha1:01e5fd232c654b3c4a9d86c09f89cfef6f51805f @@ -3566,22 +3759,38 @@ trackedFiles: id: 6b388bc155dd last_write_checksum: sha1:14ce5842084a2086505dd80eaa6200638a278000 pristine_git_object: c8fbdff77b3464b630b0cd18f25d9179c5ff9eca + src/mistralai/client/models/messagetokens.py: + id: e2a5171d27c5 + last_write_checksum: sha1:361fdea88fe10abec7f0e49ad918e8a02354a801 + pristine_git_object: f3e292bd722e7a0a0b50a7c66a61b0f9808e7b4d + src/mistralai/client/models/metadatadict.py: + id: 5c62d851af9a + last_write_checksum: sha1:2a28a02251f7881f39902ef0a6e671af0ce7737f + pristine_git_object: 9d6b608663f8c605a95aa602cc4a5006a88d4ed2 src/mistralai/client/models/metric.py: id: c6a65acdd1a2 last_write_checksum: sha1:0d7e4ebbf55f8dcc52facb894589ce44abb0c2fa pristine_git_object: 8d05989420e1b8b68c90fef193bcaff4452c97fc + src/mistralai/client/models/mirrorconfig.py: + id: 0aebdaa43ceb + last_write_checksum: sha1:2d06feabdd69c8bd3e2450c1142a6ddc74ac303a + pristine_git_object: e77540647a9b054aa8e2767335f607b8330c6e53 + src/mistralai/client/models/mirrorsource.py: + id: 101888c5d045 + last_write_checksum: sha1:9351b6bdf47343ba82777f6e4e22032feee2f220 + pristine_git_object: 04603cb03570fe227a729829496b39cf6e6e1cb7 src/mistralai/client/models/mistralpromptmode.py: id: 95abc4ec799a last_write_checksum: sha1:a1417b987bb34daeb73ca4e015c085814e6c8ad2 pristine_git_object: 9b91323e7545d636308064085ca16fc554eac904 src/mistralai/client/models/modelcapabilities.py: id: 64d8a422ea29 - last_write_checksum: sha1:352a8cf6dfa61eff04e37609272e0b1ab7a5ffee - pristine_git_object: 3267c7079218df12d78db6815fb6339fad0c6168 + last_write_checksum: sha1:fcc03fee877a5a9a11bbcfdfe84cc4c3ee76dfd9 + pristine_git_object: 2206f9a7e5a42e66bf00e550591c9b09eba56620 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:46ed83726fd34517bf05bf6fc1204a0134c38a06 - pristine_git_object: 72ca957f0eb33dfdfad8fb8074f93b066868f074 + last_write_checksum: sha1:01f046df5bd4ca67b33d11a37da87ab81c3ae228 + pristine_git_object: ff3b85d3086dd80f3bc8cc04452affa0e1ab13dc src/mistralai/client/models/modellist.py: id: 00693c7eec60 last_write_checksum: sha1:fedfe929f37d6d81248f8f2d6004454aaa35145f @@ -3726,6 +3935,10 @@ trackedFiles: id: "0205512146e6" last_write_checksum: sha1:22ad3d5fc80fbf3f83db61512e7bc79295c5fc91 pristine_git_object: 15bdce2056f2f642096fbbdb2ac32ce1e5b8c9cf + src/mistralai/client/models/prompttokensdetails.py: + id: e6be33f2cd2d + last_write_checksum: sha1:aa71bf6de6316b8754fb18f897b30051a2d4c70e + pristine_git_object: 2c5186c02f6b463c12fd7819637b52c8c7ee4cd7 src/mistralai/client/models/realtimetranscriptionerror.py: id: 8c2267378f48 last_write_checksum: sha1:8bfdc2564fc416b0e1a4cc2e2a3a5437b26cea85 @@ -3768,8 +3981,8 @@ trackedFiles: pristine_git_object: d4ce43f77c6dd2e6691b04402523bee6b9d21ba6 src/mistralai/client/models/reasoningeffort.py: id: b930a0a20654 - last_write_checksum: sha1:09493b60af60741211e5321d9350498f017db80a - pristine_git_object: e95b8fee4c0f502d9473887fd33f9b8dfb1177ea + last_write_checksum: sha1:2dcf48ea45f83012695492d9d97ba1e74674fc8d + pristine_git_object: e4dd2a33247f23ad98f3e39802d98df028d65fab src/mistralai/client/models/referencechunk.py: id: 921acd3a224a last_write_checksum: sha1:2534e964c706b886e64fdedfe34b1cbf4cb23e76 @@ -3810,6 +4023,10 @@ trackedFiles: id: 6fefa90ca351 last_write_checksum: sha1:52775e73fb5c51d245362ce63672cec776e5b6bd pristine_git_object: cd5955c1eadb8cd9d1f9ecc388c2cc17df11c885 + src/mistralai/client/models/roles.py: + id: e41c04cf7422 + last_write_checksum: sha1:e953cc08f43a7a4b8f143830e5308eb26d44f8ac + pristine_git_object: ff36ebd72389228752297c1c9ec80deb7557430d src/mistralai/client/models/sampletype.py: id: a9309422fed7 last_write_checksum: sha1:86a61340a647696f6c35a82d945509b1c85aa6f7 @@ -3854,6 +4071,30 @@ trackedFiles: id: fcee60a4ea0d last_write_checksum: sha1:4d4277d75f7ce001780a069898b38afa7c8addc0 pristine_git_object: fcea403cdbad44299fb2178f07a63bb7e83dc033 + src/mistralai/client/models/speech_v1_audio_speech_postop.py: + id: 7ab5c1250642 + last_write_checksum: sha1:df0d69df993dc2615822996db86ab643d5d745d4 + pristine_git_object: 3dbd044cd61251b99e0f08515b85b80dc2914c3b + src/mistralai/client/models/speechoutputformat.py: + id: e6be9ec9e74c + last_write_checksum: sha1:5b31afa5927cbf56ee5b93fc7c32110c574c1701 + pristine_git_object: f564d2affd4a0b031cf44caf5242c8bbec9235e9 + src/mistralai/client/models/speechrequest.py: + id: cf3bc148e629 + last_write_checksum: sha1:4ca18d5c7780aac92e054a6ad08b05597885c380 + pristine_git_object: 8aaabda9040fe9ffa804dd6a93a15e3f491bf0e3 + src/mistralai/client/models/speechstreamaudiodelta.py: + id: ac66815396b1 + last_write_checksum: sha1:eb3e66fbf2164686d20900761be40c7b90bfb82b + pristine_git_object: e3cc7053cb803b75019ac36a26efb953360af941 + src/mistralai/client/models/speechstreamdone.py: + id: 2164b6526a81 + last_write_checksum: sha1:0ba5e06311e0256617a25384a2899c3f22463f54 + pristine_git_object: 2febda7b6f06d0ceed3db9d7bf81aaa29dc8afd5 + src/mistralai/client/models/speechstreameventtypes.py: + id: b76eee4fdf6a + last_write_checksum: sha1:f1a2a3dd855c77b91a126d8919ffc6942906b4f5 + pristine_git_object: 723a571b58629aeeb3e1e0b7b5a65c378180c403 src/mistralai/client/models/ssetypes.py: id: 1733e4765106 last_write_checksum: sha1:3c79fc7c43cd018fba4950ba013ed15899b82ebf @@ -3998,10 +4239,14 @@ trackedFiles: id: a1bace5342e6 last_write_checksum: sha1:2fd7c698f8fe16e5df54e49c7aba85e247d3f19b pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff + src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py: + id: 399da05bd75e + last_write_checksum: sha1:aca7b6539571a8111e8f1abb7f90dde1e461d4bc + pristine_git_object: a11b626a9b4ec3b1761bb383dda2cead843ee634 src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:db80a8f0b630acf98be5c27caa7bb448a4e58237 - pristine_git_object: 7bb9686b9b542c47ac25fb6780017b5739829b1e + last_write_checksum: sha1:9b2e91f96cc1153d15c2f48d347174732df38acc + pristine_git_object: 8fec91498119cc7e9ee64f3300600cd04a98cfb4 src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 last_write_checksum: sha1:cdf3aa496722d84b0a76d52ce76133cfaafb0073 @@ -4038,6 +4283,10 @@ trackedFiles: id: 54adb9a3af16 last_write_checksum: sha1:108b7cd220312ff96d298981e7ada5bc05921cc9 pristine_git_object: f23699d0223579e3477a1a010063f3a7a985b07c + src/mistralai/client/models/usageinfo_dollar_defs.py: + id: d543506af998 + last_write_checksum: sha1:193c4f38793c1ee11d95e785cad8f55e50db35de + pristine_git_object: 83bb2fe8ee725e295b32bc3b0b3eb4ee19e835e2 src/mistralai/client/models/usermessage.py: id: cb583483acf4 last_write_checksum: sha1:b97161e1abd159d5a0c5757cac2a97bd6a5f1ef0 @@ -4046,6 +4295,22 @@ trackedFiles: id: 15df3c7368ab last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 pristine_git_object: 5fe796db923badd9fb85dc4080a30496ed2b419b + src/mistralai/client/models/voicecreaterequest.py: + id: 9a1752117dec + last_write_checksum: sha1:6ddd5af32737a8b0597f3fff476f151dbd039e50 + pristine_git_object: 99df178d594f4c5b029dd9dc027e5e1afc3f8dec + src/mistralai/client/models/voicelistresponse.py: + id: df4b1182d193 + last_write_checksum: sha1:c451d4d0534f4d857f16efde78a7027ae6ca84eb + pristine_git_object: eda768f53f2b6273ccae254ba25adf1c157d068a + src/mistralai/client/models/voiceresponse.py: + id: 24138e419fae + last_write_checksum: sha1:b3f4ef73cc34c3dafa3fa5bf6b4fb02774be04da + pristine_git_object: 6fa3987b8f3361baee9ca3605af0d187ddcb4858 + src/mistralai/client/models/voiceupdaterequest.py: + id: 798f8ff225de + last_write_checksum: sha1:1e4345add08618310635c7b79a8bf3991df98d99 + pristine_git_object: 717316b0033706f1f5fc8fccf3f0159bbc82e8a0 src/mistralai/client/models/wandbintegration.py: id: 4823c1e80942 last_write_checksum: sha1:b836b2c829f16a00221354c44f55b672eefc3aa0 @@ -4056,12 +4321,12 @@ trackedFiles: pristine_git_object: e64bb27c9142d3fe312e8d7476893382dab20722 src/mistralai/client/models/websearchpremiumtool.py: id: bfe88af887e3 - last_write_checksum: sha1:bdb724b386fe512c2b6db6bd2931ea71c796dbc9 - pristine_git_object: 5c929e94c20159cf394a9f95ef990a926643f0ea + last_write_checksum: sha1:6c6344f5b429cd1f37b58daaf08ed281fe124fbd + pristine_git_object: 249e18402ec4842ed78816a6ca93bec50c2dd8a5 src/mistralai/client/models/websearchtool.py: id: 26b0903423e5 - last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f - pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae + last_write_checksum: sha1:ac79e5882823ebcea821ee8a497703b188e02632 + pristine_git_object: 9f372ec00aa765cbfe748624eefa3bf696f5beaa src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 @@ -4084,12 +4349,16 @@ trackedFiles: pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:9ee656529530717c0215e75c03509c9962a1e54e - pristine_git_object: b775fe1ccd75f703756b7746383c0e53e5d7e725 + last_write_checksum: sha1:3520e3487aeacdaf5abd24839e76bb98f1e20b93 + pristine_git_object: 52fc5d9ae1a15a241bd8cf76c29a616bffcb36cd src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 + src/mistralai/client/speech.py: + id: 5c1f1109aa5e + last_write_checksum: sha1:64856e4330b793618c25288d44dfba000295ddcf + pristine_git_object: e548df4444f8fd0b5de58890de371b3a9bb31aed src/mistralai/client/transcriptions.py: id: 75b45780c978 last_write_checksum: sha1:27a5b7dd6ed47b0f79b95fbb8599d439512ef344 @@ -4178,6 +4447,10 @@ trackedFiles: id: bb6ade7a7f82 last_write_checksum: sha1:da9ce43ad241db386efd9b2f53d81eb051dd7544 pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c + src/mistralai/client/voices.py: + id: ab76b1377d79 + last_write_checksum: sha1:3acbc4b91444895e83e96fea25cac00b3d327a5b + pristine_git_object: 68d4bb5bde46804664ecdc8866621236af089002 examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -4197,7 +4470,7 @@ examples: model_id: "ft:open-mistral-7b:587a6b29:20240514:7e773925" responses: "200": - application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": true, "function_calling": true, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false, "audio_transcription_realtime": false, "audio_speech": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} + application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": true, "function_calling": true, "reasoning": false, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false, "audio_transcription_realtime": false, "audio_speech": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} "422": application/json: {} userExample: @@ -4206,7 +4479,7 @@ examples: model_id: "ft:open-mistral-7b:587a6b29:20240514:7e773925" responses: "200": - application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": false, "function_calling": false, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false, "audio_transcription_realtime": false, "audio_speech": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} + application/json: {"id": "", "object": "model", "owned_by": "mistralai", "capabilities": {"completion_chat": false, "function_calling": false, "reasoning": false, "completion_fim": false, "fine_tuning": false, "vision": false, "ocr": false, "classification": false, "moderation": false, "audio": false, "audio_transcription": false, "audio_transcription_realtime": false, "audio_speech": false}, "max_context_length": 32768, "type": "fine-tuned", "job": "Product Markets Facilitator", "root": "", "archived": false} delete_model_v1_models__model_id__delete: speakeasy-default-delete-model-v1-models-model-id-delete: parameters: @@ -6109,15 +6382,80 @@ examples: application/json: {"auth_url": "https://unlined-suv.com", "ttl": 786815} "422": application/json: {} + speech_v1_audio_speech_post: + speakeasy-default-speech-v1-audio-speech-post: + requestBody: + application/json: {"stream": false, "input": ""} + responses: + "200": + application/json: {"audio_data": ""} + "422": + application/json: {} + list_voices_v1_audio_voices_get: + speakeasy-default-list-voices-v1-audio-voices-get: + parameters: + query: + limit: 10 + offset: 0 + responses: + "200": + application/json: {"items": [{"name": "", "retention_notice": 30, "id": "c29472e8-7047-4227-ab06-14ac147f1ac9", "created_at": "2025-04-29T05:19:27.779Z", "user_id": ""}], "total": 911345, "page": 575844, "page_size": 996146, "total_pages": 441415} + "422": + application/json: {} + create_voice_v1_audio_voices_post: + speakeasy-default-create-voice-v1-audio-voices-post: + requestBody: + application/json: {"name": "", "retention_notice": 30, "sample_audio": ""} + responses: + "200": + application/json: {"name": "", "retention_notice": 30, "id": "40b08db1-3b52-4ceb-9a0a-1c667e00001b", "created_at": "2024-01-06T19:50:35.147Z", "user_id": ""} + "422": + application/json: {} + delete_voice_v1_audio_voices__voice_id__delete: + speakeasy-default-delete-voice-v1-audio-voices-voice-id-delete: + parameters: + path: + voice_id: "f42bf0d7-8a10-4b98-bbfa-589a232209d2" + responses: + "200": + application/json: {"name": "", "retention_notice": 30, "id": "35c3fb1b-bf2e-4c59-9fbc-1a07b5aae318", "created_at": "2025-07-16T21:02:12.020Z", "user_id": ""} + "422": + application/json: {} + update_voice_v1_audio_voices__voice_id__patch: + speakeasy-default-update-voice-v1-audio-voices-voice-id-patch: + parameters: + path: + voice_id: "030a6b20-e287-414d-9a77-6b76a4a56c9d" + requestBody: + application/json: {} + responses: + "200": + application/json: {"name": "", "retention_notice": 30, "id": "b24f3587-b692-4c7e-8899-187f5eb636bb", "created_at": "2025-05-30T15:17:43.490Z", "user_id": ""} + "422": + application/json: {} + get_voice_v1_audio_voices__voice_id__get: + speakeasy-default-get-voice-v1-audio-voices-voice-id-get: + parameters: + path: + voice_id: "" + responses: + "200": + application/json: {"name": "", "retention_notice": 30, "id": "964aee3c-7963-421e-8b70-e81d1aae4671", "created_at": "2026-01-24T22:28:34.575Z", "user_id": ""} + "422": + application/json: {} + get_voice_sample_audio_v1_audio_voices__voice_id__sample_get: + speakeasy-default-get-voice-sample-audio-v1-audio-voices-voice-id-sample-get: + parameters: + path: + voice_id: "" + responses: + "200": + application/json: "" + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.beta.connectors.get_auth_url()`: **Added** - * `mistral.chat.complete()`: `request.reasoning_effort` **Added** - * `mistral.chat.stream()`: `request.reasoning_effort` **Added** - * `mistral.agents.complete()`: `request.reasoning_effort` **Added** - * `mistral.agents.stream()`: `request.reasoning_effort` **Added** +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.agents.update_version()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start_stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list_versions()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get_version()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.create()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart_stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.append_stream()`: \n * `request.completion_args.reasoning_effort` **Added**\n* `mistral.audio.voices.update()`: **Added**\n* `mistral.beta.conversations.append()`: \n * `request.completion_args.reasoning_effort` **Added**\n* `mistral.audio.voices.list()`: **Added**\n* `mistral.audio.speech.complete()`: **Added**\n* `mistral.models.retrieve()`: `response.union(base).capabilities.reasoning` **Added**\n* `mistral.models.list()`: `response.data[].union(base).capabilities.reasoning` **Added**\n* `mistral.audio.voices.get_sample_audio()`: **Added**\n* `mistral.audio.voices.get()`: **Added**\n* `mistral.audio.voices.delete()`: **Added**\n* `mistral.audio.voices.create()`: **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index cfb00b47..494a2afe 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.5 + version: 2.1.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index a650ee39..ed3582cc 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6e4e97e1d1e48b8989a295b3161e6bfe2cc78610337579d0292a4aff56de4edb - sourceBlobDigest: sha256:c16444d5c5cb6979e05018e4e6c6479f2c3363d36b95d16f22b1eaf51ab8fbbf + sourceRevisionDigest: sha256:4dfede971964b6bed279893ea59d78fb670e78c0f2492354ea25ffcdc4e56768 + sourceBlobDigest: sha256:54e2c0536c78ca593dc5f194cdd4994bf6a1d4f9e4b08e2f3c54c799b94ae414 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6e4e97e1d1e48b8989a295b3161e6bfe2cc78610337579d0292a4aff56de4edb - sourceBlobDigest: sha256:c16444d5c5cb6979e05018e4e6c6479f2c3363d36b95d16f22b1eaf51ab8fbbf + sourceRevisionDigest: sha256:4dfede971964b6bed279893ea59d78fb670e78c0f2492354ea25ffcdc4e56768 + sourceBlobDigest: sha256:54e2c0536c78ca593dc5f194cdd4994bf6a1d4f9e4b08e2f3c54c799b94ae414 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:6aa689054ccc3a0e2c85b7b90b054c7122b506a34bfdb48ce30e15b687e17b97 + codeSamplesRevisionDigest: sha256:8d36ae00a062a0cbcc58246c7afc169dd2b78d23553a46a0c33cbf771b251e61 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/README-PYPI.md b/README-PYPI.md index c25b299b..7b238181 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -159,6 +159,8 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -188,6 +190,8 @@ async def main(): }, ], stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -267,6 +271,8 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -296,6 +302,8 @@ async def main(): }, ], agent_id="", stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -467,11 +475,24 @@ print(res.choices[0].message.content) * [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/agents/README.md#complete) - Agents Completion * [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/agents/README.md#stream) - Stream Agents completion +### [Audio.Speech](https://github.com/mistralai/client-python/blob/main/docs/sdks/speech/README.md) + +* [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/speech/README.md#complete) - Speech + ### [Audio.Transcriptions](https://github.com/mistralai/client-python/blob/main/docs/sdks/transcriptions/README.md) * [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/transcriptions/README.md#complete) - Create Transcription * [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/transcriptions/README.md#stream) - Create Streaming Transcription (SSE) +### [Audio.Voices](https://github.com/mistralai/client-python/blob/main/docs/sdks/voices/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/voices/README.md#list) - List all voices +* [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/voices/README.md#create) - Create a new voice +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/voices/README.md#delete) - Delete a custom voice +* [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/voices/README.md#update) - Update voice metadata +* [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/voices/README.md#get) - Get voice details +* [get_sample_audio](https://github.com/mistralai/client-python/blob/main/docs/sdks/voices/README.md#get_sample_audio) - Get voice sample audio + ### [Batch.Jobs](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md) * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#list) - Get Batch Jobs @@ -678,17 +699,8 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.start_stream(inputs=[ - { - "object": "entry", - "type": "function.result", - "tool_call_id": "", - "result": "", - }, - ], completion_args={ - "response_format": { - "type": "text", - }, + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ + }) with res as event_stream: @@ -722,10 +734,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.libraries.documents.upload(library_id="a02150d9-5ee0-4877-b62c-28b1fcdf3b76", file={ - "file_name": "example.file", - "content": open("example.file", "rb"), - }) + res = mistral.audio.transcriptions.complete(model="Model X", diarize=False) # Handle response print(res) @@ -749,11 +758,15 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list(, + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ + + }, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) - # Handle response - print(res) + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -769,10 +782,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -803,10 +820,14 @@ with Mistral( res = None try: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) except errors.MistralError as e: @@ -837,8 +858,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 61 of 123 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 123 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 68 of 130 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 130 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. @@ -869,10 +890,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -889,10 +914,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -999,10 +1028,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` diff --git a/README.md b/README.md index 337ea2a1..0ca3d949 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,8 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -188,6 +190,8 @@ async def main(): }, ], stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -267,6 +271,8 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -296,6 +302,8 @@ async def main(): }, ], agent_id="", stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -467,11 +475,24 @@ print(res.choices[0].message.content) * [complete](docs/sdks/agents/README.md#complete) - Agents Completion * [stream](docs/sdks/agents/README.md#stream) - Stream Agents completion +### [Audio.Speech](docs/sdks/speech/README.md) + +* [complete](docs/sdks/speech/README.md#complete) - Speech + ### [Audio.Transcriptions](docs/sdks/transcriptions/README.md) * [complete](docs/sdks/transcriptions/README.md#complete) - Create Transcription * [stream](docs/sdks/transcriptions/README.md#stream) - Create Streaming Transcription (SSE) +### [Audio.Voices](docs/sdks/voices/README.md) + +* [list](docs/sdks/voices/README.md#list) - List all voices +* [create](docs/sdks/voices/README.md#create) - Create a new voice +* [delete](docs/sdks/voices/README.md#delete) - Delete a custom voice +* [update](docs/sdks/voices/README.md#update) - Update voice metadata +* [get](docs/sdks/voices/README.md#get) - Get voice details +* [get_sample_audio](docs/sdks/voices/README.md#get_sample_audio) - Get voice sample audio + ### [Batch.Jobs](docs/sdks/batchjobs/README.md) * [list](docs/sdks/batchjobs/README.md#list) - Get Batch Jobs @@ -678,17 +699,8 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.conversations.start_stream(inputs=[ - { - "object": "entry", - "type": "function.result", - "tool_call_id": "", - "result": "", - }, - ], completion_args={ - "response_format": { - "type": "text", - }, + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ + }) with res as event_stream: @@ -722,10 +734,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.libraries.documents.upload(library_id="a02150d9-5ee0-4877-b62c-28b1fcdf3b76", file={ - "file_name": "example.file", - "content": open("example.file", "rb"), - }) + res = mistral.audio.transcriptions.complete(model="Model X", diarize=False) # Handle response print(res) @@ -749,11 +758,15 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list(, + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ + + }, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) - # Handle response - print(res) + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -769,10 +782,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -803,10 +820,14 @@ with Mistral( res = None try: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) except errors.MistralError as e: @@ -837,8 +858,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 61 of 123 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 123 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 68 of 130 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 130 methods.* * [`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. @@ -869,10 +890,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -889,10 +914,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` @@ -999,10 +1028,14 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.models.list() + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ - # Handle response - print(res) + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) ``` diff --git a/RELEASES.md b/RELEASES.md index 114fdcc4..0da71cff 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -448,4 +448,14 @@ Based on: ### Generated - [python v2.0.5] . ### Releases -- [PyPI v2.0.5] https://pypi.org/project/mistralai/2.0.5 - . \ No newline at end of file +- [PyPI v2.0.5] https://pypi.org/project/mistralai/2.0.5 - . + +## 2026-03-20 08:07:05 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.0] . +### Releases +- [PyPI v2.1.0] https://pypi.org/project/mistralai/2.1.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index bb01b160..cce299c7 100644 --- a/USAGE.md +++ b/USAGE.md @@ -20,6 +20,8 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -49,6 +51,8 @@ async def main(): }, ], stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -128,6 +132,8 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -157,6 +163,8 @@ async def main(): }, ], agent_id="", stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response diff --git a/docs/models/agent.md b/docs/models/agent.md index 94e8b035..c9c8b748 100644 --- a/docs/models/agent.md +++ b/docs/models/agent.md @@ -13,7 +13,7 @@ | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `object` | *Optional[Literal["agent"]]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | | `version` | *int* | :heavy_check_mark: | N/A | diff --git a/docs/models/agentconversation.md b/docs/models/agentconversation.md index 451f6fb8..dc62a7f5 100644 --- a/docs/models/agentconversation.md +++ b/docs/models/agentconversation.md @@ -7,7 +7,7 @@ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name given to the conversation. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the what the conversation is about. | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | | `object` | *Optional[Literal["conversation"]]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 99f47f5c..119c4bc8 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionRequestMessage](../models/agentscompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | [OptionalNullable[models.AgentsCompletionRequestTools2]](../models/agentscompletionrequesttools2.md) | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -22,4 +22,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/agentscompletionrequesttools1.md b/docs/models/agentscompletionrequesttools1.md new file mode 100644 index 00000000..61eb3257 --- /dev/null +++ b/docs/models/agentscompletionrequesttools1.md @@ -0,0 +1,47 @@ +# AgentsCompletionRequestTools1 + + +## Supported Types + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + diff --git a/docs/models/agentscompletionrequesttools2.md b/docs/models/agentscompletionrequesttools2.md new file mode 100644 index 00000000..5c1a4bc4 --- /dev/null +++ b/docs/models/agentscompletionrequesttools2.md @@ -0,0 +1,17 @@ +# AgentsCompletionRequestTools2 + + +## Supported Types + +### `List[models.AgentsCompletionRequestTools1]` + +```python +value: List[models.AgentsCompletionRequestTools1] = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index d5455230..ee24b68b 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionStreamRequestMessage](../models/agentscompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | [OptionalNullable[models.AgentsCompletionStreamRequestTools2]](../models/agentscompletionstreamrequesttools2.md) | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -22,4 +22,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/agentscompletionstreamrequesttools1.md b/docs/models/agentscompletionstreamrequesttools1.md new file mode 100644 index 00000000..fef7e190 --- /dev/null +++ b/docs/models/agentscompletionstreamrequesttools1.md @@ -0,0 +1,47 @@ +# AgentsCompletionStreamRequestTools1 + + +## Supported Types + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + diff --git a/docs/models/agentscompletionstreamrequesttools2.md b/docs/models/agentscompletionstreamrequesttools2.md new file mode 100644 index 00000000..d9009359 --- /dev/null +++ b/docs/models/agentscompletionstreamrequesttools2.md @@ -0,0 +1,17 @@ +# AgentsCompletionStreamRequestTools2 + + +## Supported Types + +### `List[models.AgentsCompletionStreamRequestTools1]` + +```python +value: List[models.AgentsCompletionStreamRequestTools1] = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/basefielddefinition.md b/docs/models/basefielddefinition.md index 3f7abea9..3d721d91 100644 --- a/docs/models/basefielddefinition.md +++ b/docs/models/basefielddefinition.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `label` | *str* | :heavy_check_mark: | N/A | -| `type` | [models.TypeEnum](../models/typeenum.md) | :heavy_check_mark: | N/A | -| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.BaseFieldDefinitionType](../models/basefielddefinitiontype.md) | :heavy_check_mark: | N/A | +| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/typeenum.md b/docs/models/basefielddefinitiontype.md similarity index 67% rename from docs/models/typeenum.md rename to docs/models/basefielddefinitiontype.md index ec47cf96..efdff2a4 100644 --- a/docs/models/typeenum.md +++ b/docs/models/basefielddefinitiontype.md @@ -1,12 +1,12 @@ -# TypeEnum +# BaseFieldDefinitionType ## Example Usage ```python -from mistralai.client.models import TypeEnum +from mistralai.client.models import BaseFieldDefinitionType # Open enum: unrecognized values are captured as UnrecognizedStr -value: TypeEnum = "ENUM" +value: BaseFieldDefinitionType = "ENUM" ``` diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 4e29ad05..c19738a7 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionRequestMessage](../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | [OptionalNullable[models.ChatCompletionRequestTools2]](../models/chatcompletionrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -25,4 +25,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/chatcompletionrequesttools1.md b/docs/models/chatcompletionrequesttools1.md new file mode 100644 index 00000000..9926c6d5 --- /dev/null +++ b/docs/models/chatcompletionrequesttools1.md @@ -0,0 +1,47 @@ +# ChatCompletionRequestTools1 + + +## Supported Types + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + diff --git a/docs/models/chatcompletionrequesttools2.md b/docs/models/chatcompletionrequesttools2.md new file mode 100644 index 00000000..48d8596d --- /dev/null +++ b/docs/models/chatcompletionrequesttools2.md @@ -0,0 +1,19 @@ +# ChatCompletionRequestTools2 + +A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. + + +## Supported Types + +### `List[models.ChatCompletionRequestTools1]` + +```python +value: List[models.ChatCompletionRequestTools1] = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index 7ece3742..0bffc0fc 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | [OptionalNullable[models.ChatCompletionStreamRequestTools2]](../models/chatcompletionstreamrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -25,4 +25,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequesttools1.md b/docs/models/chatcompletionstreamrequesttools1.md new file mode 100644 index 00000000..fb7a968b --- /dev/null +++ b/docs/models/chatcompletionstreamrequesttools1.md @@ -0,0 +1,47 @@ +# ChatCompletionStreamRequestTools1 + + +## Supported Types + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + diff --git a/docs/models/chatcompletionstreamrequesttools2.md b/docs/models/chatcompletionstreamrequesttools2.md new file mode 100644 index 00000000..273651d8 --- /dev/null +++ b/docs/models/chatcompletionstreamrequesttools2.md @@ -0,0 +1,19 @@ +# ChatCompletionStreamRequestTools2 + +A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. + + +## Supported Types + +### `List[models.ChatCompletionStreamRequestTools1]` + +```python +value: List[models.ChatCompletionStreamRequestTools1] = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/docs/models/codeinterpretertool.md b/docs/models/codeinterpretertool.md index 6302fc62..9fd6a907 100644 --- a/docs/models/codeinterpretertool.md +++ b/docs/models/codeinterpretertool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["code_interpreter"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | [Optional[models.CodeInterpreterToolType]](../models/codeinterpretertooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/codeinterpretertooltype.md b/docs/models/codeinterpretertooltype.md new file mode 100644 index 00000000..7f95f5da --- /dev/null +++ b/docs/models/codeinterpretertooltype.md @@ -0,0 +1,13 @@ +# CodeInterpreterToolType + +## Example Usage + +```python +from mistralai.client.models import CodeInterpreterToolType +value: CodeInterpreterToolType = "code_interpreter" +``` + + +## Values + +- `"code_interpreter"` diff --git a/docs/models/completionargs.md b/docs/models/completionargs.md index 148f7608..51f7ff30 100644 --- a/docs/models/completionargs.md +++ b/docs/models/completionargs.md @@ -16,4 +16,5 @@ White-listed arguments from the completion API | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | | `prediction` | [OptionalNullable[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | N/A | | | `response_format` | [OptionalNullable[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | N/A | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tool_choice` | [Optional[models.ToolChoiceEnum]](../models/toolchoiceenum.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `tool_choice` | [Optional[models.ToolChoiceEnum]](../models/toolchoiceenum.md) | :heavy_minus_sign: | N/A | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index 6a5dc206..4638049e 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -15,7 +15,7 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRequestAgentVersion]](../models/conversationrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/conversationrestartrequest.md b/docs/models/conversationrestartrequest.md index be0f2289..03dec2ec 100644 --- a/docs/models/conversationrestartrequest.md +++ b/docs/models/conversationrestartrequest.md @@ -13,6 +13,6 @@ Request to restart a new conversation from a given entry in the conversation. | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRestartRequestAgentVersion]](../models/conversationrestartrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | \ No newline at end of file diff --git a/docs/models/conversationrestartstreamrequest.md b/docs/models/conversationrestartstreamrequest.md index f99a6e34..daa95584 100644 --- a/docs/models/conversationrestartstreamrequest.md +++ b/docs/models/conversationrestartstreamrequest.md @@ -13,6 +13,6 @@ Request to restart a new conversation from a given entry in the conversation. | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRestartStreamRequestAgentVersion]](../models/conversationrestartstreamrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | \ No newline at end of file diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index af50989c..3c8b650f 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -15,7 +15,7 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationStreamRequestAgentVersion]](../models/conversationstreamrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createagentrequest.md b/docs/models/createagentrequest.md index e9665545..2559a7c7 100644 --- a/docs/models/createagentrequest.md +++ b/docs/models/createagentrequest.md @@ -13,5 +13,5 @@ | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customconnector.md b/docs/models/customconnector.md index 0a0b6921..d238eb5f 100644 --- a/docs/models/customconnector.md +++ b/docs/models/customconnector.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | *Literal["connector"]* | :heavy_check_mark: | N/A | +| `type` | [Optional[models.CustomConnectorType]](../models/customconnectortype.md) | :heavy_minus_sign: | N/A | | `connector_id` | *str* | :heavy_check_mark: | N/A | | `authorization` | [OptionalNullable[models.Authorization]](../models/authorization.md) | :heavy_minus_sign: | N/A | | `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customconnectortype.md b/docs/models/customconnectortype.md new file mode 100644 index 00000000..e2c8e0e0 --- /dev/null +++ b/docs/models/customconnectortype.md @@ -0,0 +1,13 @@ +# CustomConnectorType + +## Example Usage + +```python +from mistralai.client.models import CustomConnectorType +value: CustomConnectorType = "connector" +``` + + +## Values + +- `"connector"` diff --git a/docs/models/deletevoicev1audiovoicesvoiceiddeleterequest.md b/docs/models/deletevoicev1audiovoicesvoiceiddeleterequest.md new file mode 100644 index 00000000..0afc04f2 --- /dev/null +++ b/docs/models/deletevoicev1audiovoicesvoiceiddeleterequest.md @@ -0,0 +1,8 @@ +# DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `voice_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/documentlibrarytool.md b/docs/models/documentlibrarytool.md index 95c3fa52..d22ff33a 100644 --- a/docs/models/documentlibrarytool.md +++ b/docs/models/documentlibrarytool.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["document_library"]* | :heavy_check_mark: | N/A | -| `library_ids` | List[*str*] | :heavy_check_mark: | Ids of the library in which to search. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | [Optional[models.DocumentLibraryToolType]](../models/documentlibrarytooltype.md) | :heavy_minus_sign: | N/A | +| `library_ids` | List[*str*] | :heavy_check_mark: | Ids of the library in which to search. | \ No newline at end of file diff --git a/docs/models/documentlibrarytooltype.md b/docs/models/documentlibrarytooltype.md new file mode 100644 index 00000000..945452e3 --- /dev/null +++ b/docs/models/documentlibrarytooltype.md @@ -0,0 +1,13 @@ +# DocumentLibraryToolType + +## Example Usage + +```python +from mistralai.client.models import DocumentLibraryToolType +value: DocumentLibraryToolType = "document_library" +``` + + +## Values + +- `"document_library"` diff --git a/docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md b/docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md new file mode 100644 index 00000000..618465e9 --- /dev/null +++ b/docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md @@ -0,0 +1,8 @@ +# GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `voice_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getvoicev1audiovoicesvoiceidgetrequest.md b/docs/models/getvoicev1audiovoicesvoiceidgetrequest.md new file mode 100644 index 00000000..09caf65c --- /dev/null +++ b/docs/models/getvoicev1audiovoicesvoiceidgetrequest.md @@ -0,0 +1,8 @@ +# GetVoiceV1AudioVoicesVoiceIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `voice_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/imagegenerationtool.md b/docs/models/imagegenerationtool.md index b476b6f2..93edbbf8 100644 --- a/docs/models/imagegenerationtool.md +++ b/docs/models/imagegenerationtool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["image_generation"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | [Optional[models.ImageGenerationToolType]](../models/imagegenerationtooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/imagegenerationtooltype.md b/docs/models/imagegenerationtooltype.md new file mode 100644 index 00000000..7763ca21 --- /dev/null +++ b/docs/models/imagegenerationtooltype.md @@ -0,0 +1,13 @@ +# ImageGenerationToolType + +## Example Usage + +```python +from mistralai.client.models import ImageGenerationToolType +value: ImageGenerationToolType = "image_generation" +``` + + +## Values + +- `"image_generation"` diff --git a/docs/models/internalmetadata.md b/docs/models/internalmetadata.md new file mode 100644 index 00000000..24ca04d9 --- /dev/null +++ b/docs/models/internalmetadata.md @@ -0,0 +1,14 @@ +# InternalMetadata + +Typed structure for internal metadata. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `agent_version` | [OptionalNullable[models.InternalMetadataAgentVersion]](../models/internalmetadataagentversion.md) | :heavy_minus_sign: | N/A | +| `mirror_config` | [OptionalNullable[models.MirrorConfig]](../models/mirrorconfig.md) | :heavy_minus_sign: | N/A | +| `science_config` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/internalmetadataagentversion.md b/docs/models/internalmetadataagentversion.md new file mode 100644 index 00000000..8dd7955d --- /dev/null +++ b/docs/models/internalmetadataagentversion.md @@ -0,0 +1,17 @@ +# InternalMetadataAgentVersion + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + diff --git a/docs/models/listvoicesv1audiovoicesgetrequest.md b/docs/models/listvoicesv1audiovoicesgetrequest.md new file mode 100644 index 00000000..f767d309 --- /dev/null +++ b/docs/models/listvoicesv1audiovoicesgetrequest.md @@ -0,0 +1,9 @@ +# ListVoicesV1AudioVoicesGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of voices to return | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Offset for pagination | \ No newline at end of file diff --git a/docs/models/messagetokens.md b/docs/models/messagetokens.md new file mode 100644 index 00000000..427e09b5 --- /dev/null +++ b/docs/models/messagetokens.md @@ -0,0 +1,13 @@ +# MessageTokens + +Information on a single message included in a tokenized prompt as part of an InstructRequest. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `role` | [models.Roles](../models/roles.md) | :heavy_check_mark: | N/A | +| `total_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `truncated` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `usage_count` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/metadatadict.md b/docs/models/metadatadict.md new file mode 100644 index 00000000..c53c4aed --- /dev/null +++ b/docs/models/metadatadict.md @@ -0,0 +1,11 @@ +# MetadataDict + +Custom type for metadata with embedded validation. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `internal` | [OptionalNullable[models.InternalMetadata]](../models/internalmetadata.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mirrorconfig.md b/docs/models/mirrorconfig.md new file mode 100644 index 00000000..a722c88d --- /dev/null +++ b/docs/models/mirrorconfig.md @@ -0,0 +1,10 @@ +# MirrorConfig + +Configuration for mirroring behavior. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `mirror_source` | [models.MirrorSource](../models/mirrorsource.md) | :heavy_check_mark: | Source information for mirrored requests. | \ No newline at end of file diff --git a/docs/models/mirrorsource.md b/docs/models/mirrorsource.md new file mode 100644 index 00000000..77c946da --- /dev/null +++ b/docs/models/mirrorsource.md @@ -0,0 +1,14 @@ +# MirrorSource + +Source information for mirrored requests. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `app` | *str* | :heavy_check_mark: | N/A | +| `version` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `root_model_name` | *str* | :heavy_check_mark: | N/A | +| `mirror_model_name` | *str* | :heavy_check_mark: | N/A | +| `experiment_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/modelcapabilities.md b/docs/models/modelcapabilities.md index 7ff789ed..7c125e64 100644 --- a/docs/models/modelcapabilities.md +++ b/docs/models/modelcapabilities.md @@ -10,6 +10,7 @@ that we don't want to expose in the API. | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | | `completion_chat` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `function_calling` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `reasoning` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `completion_fim` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `fine_tuning` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `vision` | *Optional[bool]* | :heavy_minus_sign: | N/A | diff --git a/docs/models/modelconversation.md b/docs/models/modelconversation.md index 190a6f6e..e30d93d1 100644 --- a/docs/models/modelconversation.md +++ b/docs/models/modelconversation.md @@ -11,7 +11,7 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name given to the conversation. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the what the conversation is about. | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | | `object` | *Optional[Literal["conversation"]]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | diff --git a/docs/models/prompttokensdetails.md b/docs/models/prompttokensdetails.md new file mode 100644 index 00000000..36b58e9a --- /dev/null +++ b/docs/models/prompttokensdetails.md @@ -0,0 +1,11 @@ +# PromptTokensDetails + +Token usage details for the prompt. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `messages` | List[[models.MessageTokens](../models/messagetokens.md)] | :heavy_minus_sign: | N/A | +| `cached_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/reasoningeffort.md b/docs/models/reasoningeffort.md index e0b17c8b..9b418bc3 100644 --- a/docs/models/reasoningeffort.md +++ b/docs/models/reasoningeffort.md @@ -4,11 +4,15 @@ ```python from mistralai.client.models import ReasoningEffort + +# Open enum: unrecognized values are captured as UnrecognizedStr value: ReasoningEffort = "none" ``` ## Values +This is an open enum. Unrecognized values will not fail type checks. + - `"none"` - `"high"` diff --git a/docs/models/roles.md b/docs/models/roles.md new file mode 100644 index 00000000..d722e765 --- /dev/null +++ b/docs/models/roles.md @@ -0,0 +1,20 @@ +# Roles + +## Example Usage + +```python +from mistralai.client.models import Roles + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Roles = "system" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"system"` +- `"user"` +- `"assistant"` +- `"tool"` diff --git a/docs/models/speechoutputformat.md b/docs/models/speechoutputformat.md new file mode 100644 index 00000000..9b06e464 --- /dev/null +++ b/docs/models/speechoutputformat.md @@ -0,0 +1,17 @@ +# SpeechOutputFormat + +## Example Usage + +```python +from mistralai.client.models import SpeechOutputFormat +value: SpeechOutputFormat = "pcm" +``` + + +## Values + +- `"pcm"` +- `"wav"` +- `"mp3"` +- `"flac"` +- `"opus"` diff --git a/docs/models/speechrequest.md b/docs/models/speechrequest.md new file mode 100644 index 00000000..2e1e4cde --- /dev/null +++ b/docs/models/speechrequest.md @@ -0,0 +1,15 @@ +# SpeechRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `voice_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The preset or custom voice to use for generating the speech. | +| `ref_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | The audio reference for generating the speech. | +| `input` | *str* | :heavy_check_mark: | Text to generate a speech from | +| `response_format` | [Optional[models.SpeechOutputFormat]](../models/speechoutputformat.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/speechresponse.md b/docs/models/speechresponse.md new file mode 100644 index 00000000..c44ecd83 --- /dev/null +++ b/docs/models/speechresponse.md @@ -0,0 +1,10 @@ +# SpeechResponse + +Speech audio data. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `audio_data` | *str* | :heavy_check_mark: | Base64 encoded audio data | \ No newline at end of file diff --git a/docs/models/speechstreamaudiodelta.md b/docs/models/speechstreamaudiodelta.md new file mode 100644 index 00000000..3a172552 --- /dev/null +++ b/docs/models/speechstreamaudiodelta.md @@ -0,0 +1,9 @@ +# SpeechStreamAudioDelta + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `type` | *Literal["speech.audio.delta"]* | :heavy_check_mark: | N/A | +| `audio_data` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/speechstreamdone.md b/docs/models/speechstreamdone.md new file mode 100644 index 00000000..d9b5e0c0 --- /dev/null +++ b/docs/models/speechstreamdone.md @@ -0,0 +1,9 @@ +# SpeechStreamDone + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `type` | *Literal["speech.audio.done"]* | :heavy_check_mark: | N/A | +| `usage` | [models.UsageInfoDollarDefs](../models/usageinfodollardefs.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/speechstreamevents.md b/docs/models/speechstreamevents.md new file mode 100644 index 00000000..f624f85f --- /dev/null +++ b/docs/models/speechstreamevents.md @@ -0,0 +1,11 @@ +# SpeechStreamEvents + +Speech audio data. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `event` | [models.SpeechStreamEventTypes](../models/speechstreameventtypes.md) | :heavy_check_mark: | N/A | +| `data` | [models.SpeechV1AudioSpeechPostData](../models/speechv1audiospeechpostdata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/speechstreameventtypes.md b/docs/models/speechstreameventtypes.md new file mode 100644 index 00000000..8c688c27 --- /dev/null +++ b/docs/models/speechstreameventtypes.md @@ -0,0 +1,18 @@ +# SpeechStreamEventTypes + +## Example Usage + +```python +from mistralai.client.models import SpeechStreamEventTypes + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SpeechStreamEventTypes = "speech.audio.delta" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"speech.audio.delta"` +- `"speech.audio.done"` diff --git a/docs/models/speechv1audiospeechpostdata.md b/docs/models/speechv1audiospeechpostdata.md new file mode 100644 index 00000000..52735e25 --- /dev/null +++ b/docs/models/speechv1audiospeechpostdata.md @@ -0,0 +1,17 @@ +# SpeechV1AudioSpeechPostData + + +## Supported Types + +### `models.SpeechStreamAudioDelta` + +```python +value: models.SpeechStreamAudioDelta = /* values here */ +``` + +### `models.SpeechStreamDone` + +```python +value: models.SpeechStreamDone = /* values here */ +``` + diff --git a/docs/models/speechv1audiospeechpostresponse.md b/docs/models/speechv1audiospeechpostresponse.md new file mode 100644 index 00000000..040f3351 --- /dev/null +++ b/docs/models/speechv1audiospeechpostresponse.md @@ -0,0 +1,17 @@ +# SpeechV1AudioSpeechPostResponse + + +## Supported Types + +### `models.SpeechResponse` + +```python +value: models.SpeechResponse = /* values here */ +``` + +### `Union[eventstreaming.EventStream[models.SpeechStreamEvents], eventstreaming.EventStreamAsync[models.SpeechStreamEvents]]` + +```python +value: Union[eventstreaming.EventStream[models.SpeechStreamEvents], eventstreaming.EventStreamAsync[models.SpeechStreamEvents]] = /* values here */ +``` + diff --git a/docs/models/updateagentrequest.md b/docs/models/updateagentrequest.md index b8aa01f6..7852472b 100644 --- a/docs/models/updateagentrequest.md +++ b/docs/models/updateagentrequest.md @@ -14,5 +14,5 @@ | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | | `deployment_chat` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md b/docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md new file mode 100644 index 00000000..a8ca8e29 --- /dev/null +++ b/docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md @@ -0,0 +1,9 @@ +# UpdateVoiceV1AudioVoicesVoiceIDPatchRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `voice_id` | *str* | :heavy_check_mark: | N/A | +| `voice_update_request` | [models.VoiceUpdateRequest](../models/voiceupdaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/usageinfodollardefs.md b/docs/models/usageinfodollardefs.md new file mode 100644 index 00000000..e5088d43 --- /dev/null +++ b/docs/models/usageinfodollardefs.md @@ -0,0 +1,15 @@ +# UsageInfoDollarDefs + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `prompt_audio_seconds` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `prompt_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `total_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `completion_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `request_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `prompt_tokens_details` | [OptionalNullable[models.PromptTokensDetails]](../models/prompttokensdetails.md) | :heavy_minus_sign: | N/A | +| `prompt_token_details` | [OptionalNullable[models.PromptTokensDetails]](../models/prompttokensdetails.md) | :heavy_minus_sign: | N/A | +| `num_cached_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/voicecreaterequest.md b/docs/models/voicecreaterequest.md new file mode 100644 index 00000000..e9a3b3a1 --- /dev/null +++ b/docs/models/voicecreaterequest.md @@ -0,0 +1,19 @@ +# VoiceCreateRequest + +Request model for creating a new voice with base64 audio. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sample_audio` | *str* | :heavy_check_mark: | Base64-encoded audio file | +| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | \ No newline at end of file diff --git a/docs/models/voicelistresponse.md b/docs/models/voicelistresponse.md new file mode 100644 index 00000000..d2d40dff --- /dev/null +++ b/docs/models/voicelistresponse.md @@ -0,0 +1,14 @@ +# VoiceListResponse + +Schema for voice list response + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `items` | List[[models.VoiceResponse](../models/voiceresponse.md)] | :heavy_check_mark: | N/A | +| `total` | *int* | :heavy_check_mark: | N/A | +| `page` | *int* | :heavy_check_mark: | N/A | +| `page_size` | *int* | :heavy_check_mark: | N/A | +| `total_pages` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/voiceresponse.md b/docs/models/voiceresponse.md new file mode 100644 index 00000000..3ec6d540 --- /dev/null +++ b/docs/models/voiceresponse.md @@ -0,0 +1,20 @@ +# VoiceResponse + +Schema for voice response + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `user_id` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/voiceupdaterequest.md b/docs/models/voiceupdaterequest.md new file mode 100644 index 00000000..924b5f47 --- /dev/null +++ b/docs/models/voiceupdaterequest.md @@ -0,0 +1,14 @@ +# VoiceUpdateRequest + +Request model for partially updating voice metadata. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/websearchpremiumtool.md b/docs/models/websearchpremiumtool.md index 78b736cd..27951776 100644 --- a/docs/models/websearchpremiumtool.md +++ b/docs/models/websearchpremiumtool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["web_search_premium"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | [Optional[models.WebSearchPremiumToolType]](../models/websearchpremiumtooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/websearchpremiumtooltype.md b/docs/models/websearchpremiumtooltype.md new file mode 100644 index 00000000..e4f3d7bf --- /dev/null +++ b/docs/models/websearchpremiumtooltype.md @@ -0,0 +1,13 @@ +# WebSearchPremiumToolType + +## Example Usage + +```python +from mistralai.client.models import WebSearchPremiumToolType +value: WebSearchPremiumToolType = "web_search_premium" +``` + + +## Values + +- `"web_search_premium"` diff --git a/docs/models/websearchtool.md b/docs/models/websearchtool.md index 4ca7333c..5dfd8c22 100644 --- a/docs/models/websearchtool.md +++ b/docs/models/websearchtool.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | *Literal["web_search"]* | :heavy_check_mark: | N/A | \ No newline at end of file +| `type` | [Optional[models.WebSearchToolType]](../models/websearchtooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/websearchtooltype.md b/docs/models/websearchtooltype.md new file mode 100644 index 00000000..89af0c4d --- /dev/null +++ b/docs/models/websearchtooltype.md @@ -0,0 +1,13 @@ +# WebSearchToolType + +## Example Usage + +```python +from mistralai.client.models import WebSearchToolType +value: WebSearchToolType = "web_search" +``` + + +## Values + +- `"web_search"` diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index b1b80bdf..b8c7db45 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -32,6 +32,8 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -51,7 +53,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | [OptionalNullable[models.AgentsCompletionRequestTools2]](../../models/agentscompletionrequesttools2.md) | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -61,6 +63,7 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -97,6 +100,8 @@ with Mistral( }, ], agent_id="", stream=True, response_format={ "type": "text", + }, additional_properties={ + }) with res as event_stream: @@ -118,7 +123,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | [OptionalNullable[models.AgentsCompletionStreamRequestTools2]](../../models/agentscompletionstreamrequesttools2.md) | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -128,6 +133,7 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/betaagents/README.md b/docs/sdks/betaagents/README.md index 56773f08..ae5e0e5b 100644 --- a/docs/sdks/betaagents/README.md +++ b/docs/sdks/betaagents/README.md @@ -57,7 +57,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -203,7 +203,7 @@ with Mistral( | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | | `deployment_chat` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index afbbeae4..e449bb62 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -32,6 +32,8 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", + }, additional_properties={ + }) # Handle response @@ -53,7 +55,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | [OptionalNullable[models.ChatCompletionRequestTools2]](../../models/chatcompletionrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -64,6 +66,7 @@ with Mistral( | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | +| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -100,6 +103,8 @@ with Mistral( }, ], stream=True, response_format={ "type": "text", + }, additional_properties={ + }) with res as event_stream: @@ -123,7 +128,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | [OptionalNullable[models.ChatCompletionStreamRequestTools2]](../../models/chatcompletionstreamrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -134,6 +139,7 @@ with Mistral( | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | +| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index e6c73e23..1fc5da57 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -58,7 +58,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRequestAgentVersion]](../../models/conversationrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -365,7 +365,7 @@ with Mistral( | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | | `agent_version` | [OptionalNullable[models.ConversationRestartRequestAgentVersion]](../../models/conversationrestartrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -429,7 +429,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationStreamRequestAgentVersion]](../../models/conversationstreamrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -538,7 +538,7 @@ with Mistral( | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | | `agent_version` | [OptionalNullable[models.ConversationRestartStreamRequestAgentVersion]](../../models/conversationrestartstreamrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/speech/README.md b/docs/sdks/speech/README.md new file mode 100644 index 00000000..309ab6e0 --- /dev/null +++ b/docs/sdks/speech/README.md @@ -0,0 +1,59 @@ +# Audio.Speech + +## Overview + +### Available Operations + +* [complete](#complete) - Speech + +## complete + +Speech + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.audio.speech.complete(input="", stream=False, additional_properties={ + + }) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `input` | *str* | :heavy_check_mark: | Text to generate a speech from | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `voice_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The preset or custom voice to use for generating the speech. | +| `ref_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | The audio reference for generating the speech. | +| `response_format` | [Optional[models.SpeechOutputFormat]](../../models/speechoutputformat.md) | :heavy_minus_sign: | N/A | +| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SpeechV1AudioSpeechPostResponse](../../models/speechv1audiospeechpostresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/voices/README.md b/docs/sdks/voices/README.md new file mode 100644 index 00000000..3383e617 --- /dev/null +++ b/docs/sdks/voices/README.md @@ -0,0 +1,273 @@ +# Audio.Voices + +## Overview + +### Available Operations + +* [list](#list) - List all voices +* [create](#create) - Create a new voice +* [delete](#delete) - Delete a custom voice +* [update](#update) - Update voice metadata +* [get](#get) - Get voice details +* [get_sample_audio](#get_sample_audio) - Get voice sample audio + +## list + +List all voices (excluding sample data) + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.audio.voices.list(limit=10, offset=0) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of voices to return | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Offset for pagination | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.VoiceListResponse](../../models/voicelistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +Create a new voice with a base64-encoded audio sample + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.audio.voices.create(name="", sample_audio="", retention_notice=30) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `sample_audio` | *str* | :heavy_check_mark: | Base64-encoded audio file | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.VoiceResponse](../../models/voiceresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete + +Delete a custom voice + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.audio.voices.delete(voice_id="f42bf0d7-8a10-4b98-bbfa-589a232209d2") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `voice_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.VoiceResponse](../../models/voiceresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update + +Update voice metadata (name, gender, languages, age, tags). + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.audio.voices.update(voice_id="030a6b20-e287-414d-9a77-6b76a4a56c9d") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `voice_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.VoiceResponse](../../models/voiceresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +Get voice details (excluding sample) + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.audio.voices.get(voice_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `voice_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.VoiceResponse](../../models/voiceresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_sample_audio + +Get the audio sample for a voice + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.audio.voices.get_sample_audio(voice_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `voice_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[str](../../models/responsegetvoicesampleaudiov1audiovoicesvoiceidsampleget.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e646a5d3..99cbca27 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.0.5" +version = "2.1.0" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 03ef265b..72b2f9e5 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.0.5" +__version__: str = "2.1.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.5 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.1.0 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 2e91dd04..8ac69962 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -35,7 +35,10 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.AgentsCompletionRequestTools2, + models.AgentsCompletionRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -55,6 +58,7 @@ def complete( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -80,6 +84,7 @@ def complete( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -107,7 +112,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.AgentsCompletionRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -124,6 +131,7 @@ def complete( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, + **(additional_properties or {}), ) req = self._build_request( @@ -208,7 +216,10 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.AgentsCompletionRequestTools2, + models.AgentsCompletionRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -228,6 +239,7 @@ async def complete_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -253,6 +265,7 @@ async def complete_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -280,7 +293,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.AgentsCompletionRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -297,6 +312,7 @@ async def complete_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, + **(additional_properties or {}), ) req = self._build_request_async( @@ -381,7 +397,10 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.AgentsCompletionStreamRequestTools2, + models.AgentsCompletionStreamRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -401,6 +420,7 @@ def stream( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -428,6 +448,7 @@ def stream( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -455,7 +476,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.AgentsCompletionStreamRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), @@ -472,6 +495,7 @@ def stream( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, + **(additional_properties or {}), ) req = self._build_request( @@ -564,7 +588,10 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.AgentsCompletionStreamRequestTools2, + models.AgentsCompletionStreamRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -584,6 +611,7 @@ async def stream_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -611,6 +639,7 @@ async def stream_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -638,7 +667,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.AgentsCompletionStreamRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), @@ -655,6 +686,7 @@ async def stream_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, + **(additional_properties or {}), ) req = self._build_request_async( diff --git a/src/mistralai/client/audio.py b/src/mistralai/client/audio.py index f68f063c..597954e4 100644 --- a/src/mistralai/client/audio.py +++ b/src/mistralai/client/audio.py @@ -3,7 +3,9 @@ from .basesdk import BaseSDK from .sdkconfiguration import SDKConfiguration +from mistralai.client.speech import Speech from mistralai.client.transcriptions import Transcriptions +from mistralai.client.voices import Voices from typing import Optional # region imports @@ -15,8 +17,10 @@ class Audio(BaseSDK): + speech: Speech transcriptions: Transcriptions r"""API for audio transcription.""" + voices: Voices def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -26,9 +30,11 @@ def __init__( self._init_sdks() def _init_sdks(self): + self.speech = Speech(self.sdk_configuration, parent_ref=self.parent_ref) self.transcriptions = Transcriptions( self.sdk_configuration, parent_ref=self.parent_ref ) + self.voices = Voices(self.sdk_configuration, parent_ref=self.parent_ref) # region sdk-class-body @property diff --git a/src/mistralai/client/beta_agents.py b/src/mistralai/client/beta_agents.py index 19f8d2b2..00a0a197 100644 --- a/src/mistralai/client/beta_agents.py +++ b/src/mistralai/client/beta_agents.py @@ -33,7 +33,9 @@ def create( ] = UNSET, description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -84,7 +86,9 @@ def create( name=name, description=description, handoffs=handoffs, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), version_message=version_message, ) @@ -168,7 +172,9 @@ async def create_async( ] = UNSET, description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -219,7 +225,9 @@ async def create_async( name=name, description=description, handoffs=handoffs, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), version_message=version_message, ) @@ -723,7 +731,9 @@ def update( description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, deployment_chat: OptionalNullable[bool] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -779,7 +789,9 @@ def update( description=description, handoffs=handoffs, deployment_chat=deployment_chat, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), version_message=version_message, ), ) @@ -870,7 +882,9 @@ async def update_async( description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, deployment_chat: OptionalNullable[bool] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -926,7 +940,9 @@ async def update_async( description=description, handoffs=handoffs, deployment_chat=deployment_chat, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), version_message=version_message, ), ) diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index c11a53d1..8c73bdc9 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -122,7 +122,10 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.ChatCompletionRequestTools2, + models.ChatCompletionRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -143,6 +146,7 @@ def complete( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -171,6 +175,7 @@ def complete( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -201,7 +206,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.ChatCompletionRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -218,6 +225,7 @@ def complete( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, + **(additional_properties or {}), ) req = self._build_request( @@ -304,7 +312,10 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.ChatCompletionRequestTools2, + models.ChatCompletionRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -325,6 +336,7 @@ async def complete_async( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -353,6 +365,7 @@ async def complete_async( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -383,7 +396,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.ChatCompletionRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -400,6 +415,7 @@ async def complete_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, + **(additional_properties or {}), ) req = self._build_request_async( @@ -486,7 +502,10 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.ChatCompletionStreamRequestTools2, + models.ChatCompletionStreamRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -507,6 +526,7 @@ def stream( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -537,6 +557,7 @@ def stream( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -567,7 +588,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.ChatCompletionStreamRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -584,6 +607,7 @@ def stream( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, + **(additional_properties or {}), ) req = self._build_request( @@ -678,7 +702,10 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + models.ChatCompletionStreamRequestTools2, + models.ChatCompletionStreamRequestTools2TypedDict, + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -699,6 +726,7 @@ async def stream_async( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, + additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -729,6 +757,7 @@ async def stream_async( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. + :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -759,7 +788,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[models.ChatCompletionStreamRequestTools2] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -776,6 +807,7 @@ async def stream_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, + **(additional_properties or {}), ) req = self._build_request_async( diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index fafcd5f5..9aeb5b55 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -248,7 +248,9 @@ def start( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -310,7 +312,9 @@ def start( ), name=name, description=description, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), agent_id=agent_id, agent_version=agent_version, model=model, @@ -399,7 +403,9 @@ async def start_async( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -461,7 +467,9 @@ async def start_async( ), name=name, description=description, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), agent_id=agent_id, agent_version=agent_version, model=model, @@ -1725,7 +1733,9 @@ def restart( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartRequestAgentVersion, @@ -1779,7 +1789,9 @@ def restart( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), from_entry_id=from_entry_id, agent_version=agent_version, ), @@ -1867,7 +1879,9 @@ async def restart_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartRequestAgentVersion, @@ -1921,7 +1935,9 @@ async def restart_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), from_entry_id=from_entry_id, agent_version=agent_version, ), @@ -2014,7 +2030,9 @@ def start_stream( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -2076,7 +2094,9 @@ def start_stream( ), name=name, description=description, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), agent_id=agent_id, agent_version=agent_version, model=model, @@ -2172,7 +2192,9 @@ async def start_stream_async( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -2234,7 +2256,9 @@ async def start_stream_async( ), name=name, description=description, - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), agent_id=agent_id, agent_version=agent_version, model=model, @@ -2603,7 +2627,9 @@ def restart_stream( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartStreamRequestAgentVersion, @@ -2657,7 +2683,9 @@ def restart_stream( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), from_entry_id=from_entry_id, agent_version=agent_version, ), @@ -2752,7 +2780,9 @@ async def restart_stream_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[Dict[str, Any]] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartStreamRequestAgentVersion, @@ -2806,7 +2836,9 @@ async def restart_stream_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=metadata, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), from_entry_id=from_entry_id, agent_version=agent_version, ), diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 7e9c7f60..905fae94 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -127,6 +127,10 @@ AgentsCompletionRequestStopTypedDict, AgentsCompletionRequestToolChoice, AgentsCompletionRequestToolChoiceTypedDict, + AgentsCompletionRequestTools1, + AgentsCompletionRequestTools1TypedDict, + AgentsCompletionRequestTools2, + AgentsCompletionRequestTools2TypedDict, AgentsCompletionRequestTypedDict, ) from .agentscompletionstreamrequest import ( @@ -137,6 +141,10 @@ AgentsCompletionStreamRequestStopTypedDict, AgentsCompletionStreamRequestToolChoice, AgentsCompletionStreamRequestToolChoiceTypedDict, + AgentsCompletionStreamRequestTools1, + AgentsCompletionStreamRequestTools1TypedDict, + AgentsCompletionStreamRequestTools2, + AgentsCompletionStreamRequestTools2TypedDict, AgentsCompletionStreamRequestTypedDict, ) from .annotations import Annotations, AnnotationsTypedDict, Audience @@ -168,9 +176,9 @@ from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, + BaseFieldDefinitionType, BaseFieldDefinitionTypedDict, SupportedOperator, - TypeEnum, ) from .basemodelcard import BaseModelCard, BaseModelCardTypedDict from .basetaskstatus import BaseTaskStatus @@ -213,6 +221,10 @@ ChatCompletionRequestStopTypedDict, ChatCompletionRequestToolChoice, ChatCompletionRequestToolChoiceTypedDict, + ChatCompletionRequestTools1, + ChatCompletionRequestTools1TypedDict, + ChatCompletionRequestTools2, + ChatCompletionRequestTools2TypedDict, ChatCompletionRequestTypedDict, ) from .chatcompletionresponse import ( @@ -227,6 +239,10 @@ ChatCompletionStreamRequestStopTypedDict, ChatCompletionStreamRequestToolChoice, ChatCompletionStreamRequestToolChoiceTypedDict, + ChatCompletionStreamRequestTools1, + ChatCompletionStreamRequestTools1TypedDict, + ChatCompletionStreamRequestTools2, + ChatCompletionStreamRequestTools2TypedDict, ChatCompletionStreamRequestTypedDict, ) from .chatmoderationrequest import ( @@ -287,7 +303,11 @@ ClassifierTrainingParameters, ClassifierTrainingParametersTypedDict, ) - from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict + from .codeinterpretertool import ( + CodeInterpreterTool, + CodeInterpreterToolType, + CodeInterpreterToolTypedDict, + ) from .completionargs import CompletionArgs, CompletionArgsTypedDict from .completionargsstop import CompletionArgsStop, CompletionArgsStopTypedDict from .completionchunk import CompletionChunk, CompletionChunkTypedDict @@ -509,6 +529,7 @@ Authorization, AuthorizationTypedDict, CustomConnector, + CustomConnectorType, CustomConnectorTypedDict, UnknownAuthorization, ) @@ -536,6 +557,10 @@ DeleteModelV1ModelsModelIDDeleteRequest, DeleteModelV1ModelsModelIDDeleteRequestTypedDict, ) + from .delete_voice_v1_audio_voices_voice_id_deleteop import ( + DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest, + DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict, + ) from .deletedatasetrecordsrequest import ( DeleteDatasetRecordsRequest, DeleteDatasetRecordsRequestTypedDict, @@ -549,7 +574,11 @@ DeltaMessageTypedDict, ) from .document import Document, DocumentTypedDict - from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict + from .documentlibrarytool import ( + DocumentLibraryTool, + DocumentLibraryToolType, + DocumentLibraryToolTypedDict, + ) from .documenttextcontent import DocumentTextContent, DocumentTextContentTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .embeddedresource import ( @@ -762,6 +791,14 @@ GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest, GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict, ) + from .get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop import ( + GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest, + GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict, + ) + from .get_voice_v1_audio_voices_voice_id_getop import ( + GetVoiceV1AudioVoicesVoiceIDGetRequest, + GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict, + ) from .getfileresponse import GetFileResponse, GetFileResponseTypedDict from .getsignedurlresponse import ( GetSignedURLResponse, @@ -771,7 +808,11 @@ from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagecontent import ImageContent, ImageContentTypedDict from .imagedetail import ImageDetail - from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict + from .imagegenerationtool import ( + ImageGenerationTool, + ImageGenerationToolType, + ImageGenerationToolTypedDict, + ) from .imageurl import ImageURL, ImageURLTypedDict from .imageurlchunk import ( ImageURLChunk, @@ -807,6 +848,12 @@ InstructRequestMessageTypedDict, InstructRequestTypedDict, ) + from .internalmetadata import ( + InternalMetadata, + InternalMetadataAgentVersion, + InternalMetadataAgentVersionTypedDict, + InternalMetadataTypedDict, + ) from .jobmetadata import JobMetadata, JobMetadataTypedDict from .jobs_api_routes_batch_cancel_batch_jobop import ( JobsAPIRoutesBatchCancelBatchJobRequest, @@ -987,6 +1034,10 @@ ListModelsV1ModelsGetRequest, ListModelsV1ModelsGetRequestTypedDict, ) + from .list_voices_v1_audio_voices_getop import ( + ListVoicesV1AudioVoicesGetRequest, + ListVoicesV1AudioVoicesGetRequestTypedDict, + ) from .listbatchjobsresponse import ( ListBatchJobsResponse, ListBatchJobsResponseTypedDict, @@ -1063,7 +1114,11 @@ MessageOutputEventTypedDict, ) from .messageresponse import MessageResponse, MessageResponseTypedDict + from .messagetokens import MessageTokens, MessageTokensTypedDict + from .metadatadict import MetadataDict, MetadataDictTypedDict from .metric import Metric, MetricTypedDict + from .mirrorconfig import MirrorConfig, MirrorConfigTypedDict + from .mirrorsource import MirrorSource, MirrorSourceTypedDict from .mistralpromptmode import MistralPromptMode from .modelcapabilities import ModelCapabilities, ModelCapabilitiesTypedDict from .modelconversation import ( @@ -1169,6 +1224,7 @@ from .prediction import Prediction, PredictionTypedDict from .processingstatus import ProcessingStatus, ProcessingStatusTypedDict from .processstatus import ProcessStatus + from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict from .realtimetranscriptionerror import ( RealtimeTranscriptionError, RealtimeTranscriptionErrorTypedDict, @@ -1236,6 +1292,7 @@ RetrieveModelV1ModelsModelIDGetRequestTypedDict, UnknownResponseRetrieveModelV1ModelsModelIDGet, ) + from .roles import Roles from .sampletype import SampleType from .searchchatcompletioneventidsrequest import ( SearchChatCompletionEventIdsRequest, @@ -1259,6 +1316,25 @@ from .sharingdelete import SharingDelete, SharingDeleteTypedDict from .sharingrequest import SharingRequest, SharingRequestTypedDict from .source import Source + from .speech_v1_audio_speech_postop import ( + SpeechResponse, + SpeechResponseTypedDict, + SpeechStreamEvents, + SpeechStreamEventsTypedDict, + SpeechV1AudioSpeechPostData, + SpeechV1AudioSpeechPostDataTypedDict, + SpeechV1AudioSpeechPostResponse, + SpeechV1AudioSpeechPostResponseTypedDict, + UnknownSpeechV1AudioSpeechPostData, + ) + from .speechoutputformat import SpeechOutputFormat + from .speechrequest import SpeechRequest, SpeechRequestTypedDict + from .speechstreamaudiodelta import ( + SpeechStreamAudioDelta, + SpeechStreamAudioDeltaTypedDict, + ) + from .speechstreamdone import SpeechStreamDone, SpeechStreamDoneTypedDict + from .speechstreameventtypes import SpeechStreamEventTypes from .ssetypes import SSETypes from .systemmessage import ( SystemMessage, @@ -1384,6 +1460,10 @@ UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest, UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict, ) + from .update_voice_v1_audio_voices_voice_id_patchop import ( + UpdateVoiceV1AudioVoicesVoiceIDPatchRequest, + UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict, + ) from .updateagentrequest import ( UpdateAgentRequest, UpdateAgentRequestTool, @@ -1424,6 +1504,7 @@ ) from .updatemodelrequest import UpdateModelRequest, UpdateModelRequestTypedDict from .usageinfo import UsageInfo, UsageInfoTypedDict + from .usageinfo_dollar_defs import UsageInfoDollarDefs, UsageInfoDollarDefsTypedDict from .usermessage import ( UserMessage, UserMessageContent, @@ -1438,6 +1519,10 @@ ValidationError, ValidationErrorTypedDict, ) + from .voicecreaterequest import VoiceCreateRequest, VoiceCreateRequestTypedDict + from .voicelistresponse import VoiceListResponse, VoiceListResponseTypedDict + from .voiceresponse import VoiceResponse, VoiceResponseTypedDict + from .voiceupdaterequest import VoiceUpdateRequest, VoiceUpdateRequestTypedDict from .wandbintegration import WandbIntegration, WandbIntegrationTypedDict from .wandbintegrationresult import ( WandbIntegrationResult, @@ -1445,10 +1530,12 @@ ) from .websearchpremiumtool import ( WebSearchPremiumTool, + WebSearchPremiumToolType, WebSearchPremiumToolTypedDict, ) from .websearchtool import ( WebSearchTool, + WebSearchToolType, WebSearchToolTypedDict, ) # Pydantic models with forward references FilterGroup.model_rebuild() @@ -1523,6 +1610,10 @@ "AgentsCompletionRequestStopTypedDict", "AgentsCompletionRequestToolChoice", "AgentsCompletionRequestToolChoiceTypedDict", + "AgentsCompletionRequestTools1", + "AgentsCompletionRequestTools1TypedDict", + "AgentsCompletionRequestTools2", + "AgentsCompletionRequestTools2TypedDict", "AgentsCompletionRequestTypedDict", "AgentsCompletionStreamRequest", "AgentsCompletionStreamRequestMessage", @@ -1531,6 +1622,10 @@ "AgentsCompletionStreamRequestStopTypedDict", "AgentsCompletionStreamRequestToolChoice", "AgentsCompletionStreamRequestToolChoiceTypedDict", + "AgentsCompletionStreamRequestTools1", + "AgentsCompletionStreamRequestTools1TypedDict", + "AgentsCompletionStreamRequestTools2", + "AgentsCompletionStreamRequestTools2TypedDict", "AgentsCompletionStreamRequestTypedDict", "And", "AndTypedDict", @@ -1567,6 +1662,7 @@ "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", + "BaseFieldDefinitionType", "BaseFieldDefinitionTypedDict", "BaseModelCard", "BaseModelCardTypedDict", @@ -1603,6 +1699,10 @@ "ChatCompletionRequestStopTypedDict", "ChatCompletionRequestToolChoice", "ChatCompletionRequestToolChoiceTypedDict", + "ChatCompletionRequestTools1", + "ChatCompletionRequestTools1TypedDict", + "ChatCompletionRequestTools2", + "ChatCompletionRequestTools2TypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", @@ -1613,6 +1713,10 @@ "ChatCompletionStreamRequestStopTypedDict", "ChatCompletionStreamRequestToolChoice", "ChatCompletionStreamRequestToolChoiceTypedDict", + "ChatCompletionStreamRequestTools1", + "ChatCompletionStreamRequestTools1TypedDict", + "ChatCompletionStreamRequestTools2", + "ChatCompletionStreamRequestTools2TypedDict", "ChatCompletionStreamRequestTypedDict", "ChatModerationRequest", "ChatModerationRequestInputs1", @@ -1653,6 +1757,7 @@ "ClassifierTrainingParameters", "ClassifierTrainingParametersTypedDict", "CodeInterpreterTool", + "CodeInterpreterToolType", "CodeInterpreterToolTypedDict", "CompletionArgs", "CompletionArgsStop", @@ -1800,6 +1905,7 @@ "CreateLibraryRequest", "CreateLibraryRequestTypedDict", "CustomConnector", + "CustomConnectorType", "CustomConnectorTypedDict", "Dataset", "DatasetImportTask", @@ -1825,12 +1931,15 @@ "DeleteModelResponseTypedDict", "DeleteModelV1ModelsModelIDDeleteRequest", "DeleteModelV1ModelsModelIDDeleteRequestTypedDict", + "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest", + "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict", "DeltaMessage", "DeltaMessageContent", "DeltaMessageContentTypedDict", "DeltaMessageTypedDict", "Document", "DocumentLibraryTool", + "DocumentLibraryToolType", "DocumentLibraryToolTypedDict", "DocumentTextContent", "DocumentTextContentTypedDict", @@ -1978,6 +2087,10 @@ "GetSignedURLResponseTypedDict", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict", + "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest", + "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict", + "GetVoiceV1AudioVoicesVoiceIDGetRequest", + "GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict", "GithubRepository", "GithubRepositoryTypedDict", "GuardrailConfig", @@ -1988,6 +2101,7 @@ "ImageContentTypedDict", "ImageDetail", "ImageGenerationTool", + "ImageGenerationToolType", "ImageGenerationToolTypedDict", "ImageURL", "ImageURLChunk", @@ -2013,6 +2127,10 @@ "InstructRequestMessage", "InstructRequestMessageTypedDict", "InstructRequestTypedDict", + "InternalMetadata", + "InternalMetadataAgentVersion", + "InternalMetadataAgentVersionTypedDict", + "InternalMetadataTypedDict", "JSONSchema", "JSONSchemaTypedDict", "JobMetadata", @@ -2139,6 +2257,8 @@ "ListModelsV1ModelsGetRequestTypedDict", "ListSharingResponse", "ListSharingResponseTypedDict", + "ListVoicesV1AudioVoicesGetRequest", + "ListVoicesV1AudioVoicesGetRequestTypedDict", "Loc", "LocTypedDict", "MCPServerIcon", @@ -2163,8 +2283,16 @@ "MessageOutputEventTypedDict", "MessageResponse", "MessageResponseTypedDict", + "MessageTokens", + "MessageTokensTypedDict", + "MetadataDict", + "MetadataDictTypedDict", "Metric", "MetricTypedDict", + "MirrorConfig", + "MirrorConfigTypedDict", + "MirrorSource", + "MirrorSourceTypedDict", "MistralPromptMode", "ModelCapabilities", "ModelCapabilitiesTypedDict", @@ -2252,6 +2380,8 @@ "ProcessStatus", "ProcessingStatus", "ProcessingStatusTypedDict", + "PromptTokensDetails", + "PromptTokensDetailsTypedDict", "RealtimeTranscriptionError", "RealtimeTranscriptionErrorDetail", "RealtimeTranscriptionErrorDetailMessage", @@ -2303,6 +2433,7 @@ "RetrieveModelV1ModelsModelIDGetRequest", "RetrieveModelV1ModelsModelIDGetRequestTypedDict", "Role", + "Roles", "SSETypes", "SampleType", "SearchChatCompletionEventIdsRequest", @@ -2323,6 +2454,22 @@ "SharingRequestTypedDict", "SharingTypedDict", "Source", + "SpeechOutputFormat", + "SpeechRequest", + "SpeechRequestTypedDict", + "SpeechResponse", + "SpeechResponseTypedDict", + "SpeechStreamAudioDelta", + "SpeechStreamAudioDeltaTypedDict", + "SpeechStreamDone", + "SpeechStreamDoneTypedDict", + "SpeechStreamEventTypes", + "SpeechStreamEvents", + "SpeechStreamEventsTypedDict", + "SpeechV1AudioSpeechPostData", + "SpeechV1AudioSpeechPostDataTypedDict", + "SpeechV1AudioSpeechPostResponse", + "SpeechV1AudioSpeechPostResponseTypedDict", "SupportedOperator", "SystemMessage", "SystemMessageContent", @@ -2401,7 +2548,6 @@ "TranscriptionStreamSegmentDeltaTypedDict", "TranscriptionStreamTextDelta", "TranscriptionStreamTextDeltaTypedDict", - "TypeEnum", "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", "UnknownAgentTool", @@ -2425,6 +2571,7 @@ "UnknownModelListData", "UnknownResponse", "UnknownResponseRetrieveModelV1ModelsModelIDGet", + "UnknownSpeechV1AudioSpeechPostData", "UnknownTranscriptionStreamEventsData", "UpdateAgentRequest", "UpdateAgentRequestTool", @@ -2456,7 +2603,11 @@ "UpdateLibraryRequestTypedDict", "UpdateModelRequest", "UpdateModelRequestTypedDict", + "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest", + "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict", "UsageInfo", + "UsageInfoDollarDefs", + "UsageInfoDollarDefsTypedDict", "UsageInfoTypedDict", "UserMessage", "UserMessageContent", @@ -2464,13 +2615,23 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", + "VoiceCreateRequest", + "VoiceCreateRequestTypedDict", + "VoiceListResponse", + "VoiceListResponseTypedDict", + "VoiceResponse", + "VoiceResponseTypedDict", + "VoiceUpdateRequest", + "VoiceUpdateRequestTypedDict", "WandbIntegration", "WandbIntegrationResult", "WandbIntegrationResultTypedDict", "WandbIntegrationTypedDict", "WebSearchPremiumTool", + "WebSearchPremiumToolType", "WebSearchPremiumToolTypedDict", "WebSearchTool", + "WebSearchToolType", "WebSearchToolTypedDict", ] @@ -2543,6 +2704,10 @@ "AgentsCompletionRequestStopTypedDict": ".agentscompletionrequest", "AgentsCompletionRequestToolChoice": ".agentscompletionrequest", "AgentsCompletionRequestToolChoiceTypedDict": ".agentscompletionrequest", + "AgentsCompletionRequestTools1": ".agentscompletionrequest", + "AgentsCompletionRequestTools1TypedDict": ".agentscompletionrequest", + "AgentsCompletionRequestTools2": ".agentscompletionrequest", + "AgentsCompletionRequestTools2TypedDict": ".agentscompletionrequest", "AgentsCompletionRequestTypedDict": ".agentscompletionrequest", "AgentsCompletionStreamRequest": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestMessage": ".agentscompletionstreamrequest", @@ -2551,6 +2716,10 @@ "AgentsCompletionStreamRequestStopTypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoice": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoiceTypedDict": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestTools1": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestTools1TypedDict": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestTools2": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestTools2TypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestTypedDict": ".agentscompletionstreamrequest", "Annotations": ".annotations", "AnnotationsTypedDict": ".annotations", @@ -2580,9 +2749,9 @@ "AuthURLResponse": ".authurlresponse", "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", + "BaseFieldDefinitionType": ".basefielddefinition", "BaseFieldDefinitionTypedDict": ".basefielddefinition", "SupportedOperator": ".basefielddefinition", - "TypeEnum": ".basefielddefinition", "BaseModelCard": ".basemodelcard", "BaseModelCardTypedDict": ".basemodelcard", "BaseTaskStatus": ".basetaskstatus", @@ -2618,6 +2787,10 @@ "ChatCompletionRequestStopTypedDict": ".chatcompletionrequest", "ChatCompletionRequestToolChoice": ".chatcompletionrequest", "ChatCompletionRequestToolChoiceTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestTools1": ".chatcompletionrequest", + "ChatCompletionRequestTools1TypedDict": ".chatcompletionrequest", + "ChatCompletionRequestTools2": ".chatcompletionrequest", + "ChatCompletionRequestTools2TypedDict": ".chatcompletionrequest", "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", @@ -2628,6 +2801,10 @@ "ChatCompletionStreamRequestStopTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoice": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTools1": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTools1TypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTools2": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTools2TypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", "ChatModerationRequest": ".chatmoderationrequest", "ChatModerationRequestInputs1": ".chatmoderationrequest", @@ -2670,6 +2847,7 @@ "ClassifierTrainingParameters": ".classifiertrainingparameters", "ClassifierTrainingParametersTypedDict": ".classifiertrainingparameters", "CodeInterpreterTool": ".codeinterpretertool", + "CodeInterpreterToolType": ".codeinterpretertool", "CodeInterpreterToolTypedDict": ".codeinterpretertool", "CompletionArgs": ".completionargs", "CompletionArgsTypedDict": ".completionargs", @@ -2827,6 +3005,7 @@ "Authorization": ".customconnector", "AuthorizationTypedDict": ".customconnector", "CustomConnector": ".customconnector", + "CustomConnectorType": ".customconnector", "CustomConnectorTypedDict": ".customconnector", "UnknownAuthorization": ".customconnector", "Dataset": ".dataset", @@ -2847,6 +3026,8 @@ "DeleteJudgeV1ObservabilityJudgesJudgeIDDeleteRequestTypedDict": ".delete_judge_v1_observability_judges_judge_id_deleteop", "DeleteModelV1ModelsModelIDDeleteRequest": ".delete_model_v1_models_model_id_deleteop", "DeleteModelV1ModelsModelIDDeleteRequestTypedDict": ".delete_model_v1_models_model_id_deleteop", + "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest": ".delete_voice_v1_audio_voices_voice_id_deleteop", + "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict": ".delete_voice_v1_audio_voices_voice_id_deleteop", "DeleteDatasetRecordsRequest": ".deletedatasetrecordsrequest", "DeleteDatasetRecordsRequestTypedDict": ".deletedatasetrecordsrequest", "DeleteFileResponse": ".deletefileresponse", @@ -2860,6 +3041,7 @@ "Document": ".document", "DocumentTypedDict": ".document", "DocumentLibraryTool": ".documentlibrarytool", + "DocumentLibraryToolType": ".documentlibrarytool", "DocumentLibraryToolTypedDict": ".documentlibrarytool", "DocumentTextContent": ".documenttextcontent", "DocumentTextContentTypedDict": ".documenttextcontent", @@ -3003,6 +3185,10 @@ "GetJudgesV1ObservabilityJudgesGetRequestTypedDict": ".get_judges_v1_observability_judges_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", + "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", + "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", + "GetVoiceV1AudioVoicesVoiceIDGetRequest": ".get_voice_v1_audio_voices_voice_id_getop", + "GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict": ".get_voice_v1_audio_voices_voice_id_getop", "GetFileResponse": ".getfileresponse", "GetFileResponseTypedDict": ".getfileresponse", "GetSignedURLResponse": ".getsignedurlresponse", @@ -3015,6 +3201,7 @@ "ImageContentTypedDict": ".imagecontent", "ImageDetail": ".imagedetail", "ImageGenerationTool": ".imagegenerationtool", + "ImageGenerationToolType": ".imagegenerationtool", "ImageGenerationToolTypedDict": ".imagegenerationtool", "ImageURL": ".imageurl", "ImageURLTypedDict": ".imageurl", @@ -3040,6 +3227,10 @@ "InstructRequestMessage": ".instructrequest", "InstructRequestMessageTypedDict": ".instructrequest", "InstructRequestTypedDict": ".instructrequest", + "InternalMetadata": ".internalmetadata", + "InternalMetadataAgentVersion": ".internalmetadata", + "InternalMetadataAgentVersionTypedDict": ".internalmetadata", + "InternalMetadataTypedDict": ".internalmetadata", "JobMetadata": ".jobmetadata", "JobMetadataTypedDict": ".jobmetadata", "JobsAPIRoutesBatchCancelBatchJobRequest": ".jobs_api_routes_batch_cancel_batch_jobop", @@ -3151,6 +3342,8 @@ "LibraryTypedDict": ".library", "ListModelsV1ModelsGetRequest": ".list_models_v1_models_getop", "ListModelsV1ModelsGetRequestTypedDict": ".list_models_v1_models_getop", + "ListVoicesV1AudioVoicesGetRequest": ".list_voices_v1_audio_voices_getop", + "ListVoicesV1AudioVoicesGetRequestTypedDict": ".list_voices_v1_audio_voices_getop", "ListBatchJobsResponse": ".listbatchjobsresponse", "ListBatchJobsResponseTypedDict": ".listbatchjobsresponse", "ListCampaignSelectedEventsResponse": ".listcampaignselectedeventsresponse", @@ -3203,8 +3396,16 @@ "MessageOutputEventTypedDict": ".messageoutputevent", "MessageResponse": ".messageresponse", "MessageResponseTypedDict": ".messageresponse", + "MessageTokens": ".messagetokens", + "MessageTokensTypedDict": ".messagetokens", + "MetadataDict": ".metadatadict", + "MetadataDictTypedDict": ".metadatadict", "Metric": ".metric", "MetricTypedDict": ".metric", + "MirrorConfig": ".mirrorconfig", + "MirrorConfigTypedDict": ".mirrorconfig", + "MirrorSource": ".mirrorsource", + "MirrorSourceTypedDict": ".mirrorsource", "MistralPromptMode": ".mistralpromptmode", "ModelCapabilities": ".modelcapabilities", "ModelCapabilitiesTypedDict": ".modelcapabilities", @@ -3289,6 +3490,8 @@ "ProcessingStatus": ".processingstatus", "ProcessingStatusTypedDict": ".processingstatus", "ProcessStatus": ".processstatus", + "PromptTokensDetails": ".prompttokensdetails", + "PromptTokensDetailsTypedDict": ".prompttokensdetails", "RealtimeTranscriptionError": ".realtimetranscriptionerror", "RealtimeTranscriptionErrorTypedDict": ".realtimetranscriptionerror", "RealtimeTranscriptionErrorDetail": ".realtimetranscriptionerrordetail", @@ -3334,6 +3537,7 @@ "RetrieveModelV1ModelsModelIDGetRequest": ".retrieve_model_v1_models_model_id_getop", "RetrieveModelV1ModelsModelIDGetRequestTypedDict": ".retrieve_model_v1_models_model_id_getop", "UnknownResponseRetrieveModelV1ModelsModelIDGet": ".retrieve_model_v1_models_model_id_getop", + "Roles": ".roles", "SampleType": ".sampletype", "SearchChatCompletionEventIdsRequest": ".searchchatcompletioneventidsrequest", "SearchChatCompletionEventIdsRequestTypedDict": ".searchchatcompletioneventidsrequest", @@ -3353,6 +3557,23 @@ "SharingRequest": ".sharingrequest", "SharingRequestTypedDict": ".sharingrequest", "Source": ".source", + "SpeechResponse": ".speech_v1_audio_speech_postop", + "SpeechResponseTypedDict": ".speech_v1_audio_speech_postop", + "SpeechStreamEvents": ".speech_v1_audio_speech_postop", + "SpeechStreamEventsTypedDict": ".speech_v1_audio_speech_postop", + "SpeechV1AudioSpeechPostData": ".speech_v1_audio_speech_postop", + "SpeechV1AudioSpeechPostDataTypedDict": ".speech_v1_audio_speech_postop", + "SpeechV1AudioSpeechPostResponse": ".speech_v1_audio_speech_postop", + "SpeechV1AudioSpeechPostResponseTypedDict": ".speech_v1_audio_speech_postop", + "UnknownSpeechV1AudioSpeechPostData": ".speech_v1_audio_speech_postop", + "SpeechOutputFormat": ".speechoutputformat", + "SpeechRequest": ".speechrequest", + "SpeechRequestTypedDict": ".speechrequest", + "SpeechStreamAudioDelta": ".speechstreamaudiodelta", + "SpeechStreamAudioDeltaTypedDict": ".speechstreamaudiodelta", + "SpeechStreamDone": ".speechstreamdone", + "SpeechStreamDoneTypedDict": ".speechstreamdone", + "SpeechStreamEventTypes": ".speechstreameventtypes", "SSETypes": ".ssetypes", "SystemMessage": ".systemmessage", "SystemMessageContent": ".systemmessage", @@ -3442,6 +3663,8 @@ "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict": ".update_dataset_v1_observability_datasets_dataset_id_patchop", "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict": ".update_judge_v1_observability_judges_judge_id_putop", + "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest": ".update_voice_v1_audio_voices_voice_id_patchop", + "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateAgentRequest": ".updateagentrequest", "UpdateAgentRequestTool": ".updateagentrequest", "UpdateAgentRequestToolTypedDict": ".updateagentrequest", @@ -3468,6 +3691,8 @@ "UpdateModelRequestTypedDict": ".updatemodelrequest", "UsageInfo": ".usageinfo", "UsageInfoTypedDict": ".usageinfo", + "UsageInfoDollarDefs": ".usageinfo_dollar_defs", + "UsageInfoDollarDefsTypedDict": ".usageinfo_dollar_defs", "UserMessage": ".usermessage", "UserMessageContent": ".usermessage", "UserMessageContentTypedDict": ".usermessage", @@ -3478,13 +3703,23 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", + "VoiceCreateRequest": ".voicecreaterequest", + "VoiceCreateRequestTypedDict": ".voicecreaterequest", + "VoiceListResponse": ".voicelistresponse", + "VoiceListResponseTypedDict": ".voicelistresponse", + "VoiceResponse": ".voiceresponse", + "VoiceResponseTypedDict": ".voiceresponse", + "VoiceUpdateRequest": ".voiceupdaterequest", + "VoiceUpdateRequestTypedDict": ".voiceupdaterequest", "WandbIntegration": ".wandbintegration", "WandbIntegrationTypedDict": ".wandbintegration", "WandbIntegrationResult": ".wandbintegrationresult", "WandbIntegrationResultTypedDict": ".wandbintegrationresult", "WebSearchPremiumTool": ".websearchpremiumtool", + "WebSearchPremiumToolType": ".websearchpremiumtool", "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", "WebSearchTool": ".websearchtool", + "WebSearchToolType": ".websearchtool", "WebSearchToolTypedDict": ".websearchtool", } diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 36cb26bf..28d3751f 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -9,6 +9,7 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from datetime import datetime @@ -25,7 +26,7 @@ import pydantic from pydantic import ConfigDict, model_serializer from pydantic.functional_validators import AfterValidator, BeforeValidator -from typing import Any, Dict, List, Literal, Optional, Union +from typing import Any, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -106,7 +107,7 @@ class AgentTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] object: Literal["agent"] version_message: NotRequired[Nullable[str]] @@ -145,7 +146,7 @@ class Agent(BaseModel): handoffs: OptionalNullable[List[str]] = UNSET - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET object: Annotated[ Annotated[Optional[Literal["agent"]], AfterValidator(validate_const("agent"))], diff --git a/src/mistralai/client/models/agentconversation.py b/src/mistralai/client/models/agentconversation.py index b52f5e5a..061ff2ac 100644 --- a/src/mistralai/client/models/agentconversation.py +++ b/src/mistralai/client/models/agentconversation.py @@ -2,6 +2,7 @@ # @generated-id: 1b7d73eddf51 from __future__ import annotations +from .metadatadict import MetadataDict, MetadataDictTypedDict from datetime import datetime from mistralai.client.types import ( BaseModel, @@ -14,7 +15,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Any, Dict, Literal, Optional, Union +from typing import Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -37,7 +38,7 @@ class AgentConversationTypedDict(TypedDict): r"""Name given to the conversation.""" description: NotRequired[Nullable[str]] r"""Description of the what the conversation is about.""" - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] r"""Custom metadata for the conversation.""" object: Literal["conversation"] agent_version: NotRequired[Nullable[AgentConversationAgentVersionTypedDict]] @@ -58,7 +59,7 @@ class AgentConversation(BaseModel): description: OptionalNullable[str] = UNSET r"""Description of the what the conversation is about.""" - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET r"""Custom metadata for the conversation.""" object: Annotated[ diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index f4ce34cb..527d6230 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -22,7 +28,8 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -from pydantic import Discriminator, Tag, model_serializer +import pydantic +from pydantic import ConfigDict, Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -61,6 +68,46 @@ ] +AgentsCompletionRequestTools1TypedDict = TypeAliasType( + "AgentsCompletionRequestTools1TypedDict", + Union[ + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + ToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +AgentsCompletionRequestTools1 = TypeAliasType( + "AgentsCompletionRequestTools1", + Union[ + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + Tool, + DocumentLibraryTool, + CustomConnector, + ], +) + + +AgentsCompletionRequestTools2TypedDict = TypeAliasType( + "AgentsCompletionRequestTools2TypedDict", + Union[List[AgentsCompletionRequestTools1TypedDict], List[str]], +) + + +AgentsCompletionRequestTools2 = TypeAliasType( + "AgentsCompletionRequestTools2", + Union[List[AgentsCompletionRequestTools1], List[str]], +) + + AgentsCompletionRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -88,7 +135,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[AgentsCompletionRequestTools2TypedDict]] tool_choice: NotRequired[AgentsCompletionRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -106,6 +153,11 @@ class AgentsCompletionRequestTypedDict(TypedDict): class AgentsCompletionRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + messages: List[AgentsCompletionRequestMessage] r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" @@ -129,7 +181,7 @@ class AgentsCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[AgentsCompletionRequestTools2] = UNSET tool_choice: Optional[AgentsCompletionRequestToolChoice] = None @@ -154,6 +206,14 @@ class AgentsCompletionRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -194,6 +254,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -206,5 +267,7 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val + for k, v in serialized.items(): + m[k] = v return m diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index 0feb3803..483ec99c 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -22,7 +28,8 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -from pydantic import Discriminator, Tag, model_serializer +import pydantic +from pydantic import ConfigDict, Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -61,6 +68,46 @@ ] +AgentsCompletionStreamRequestTools1TypedDict = TypeAliasType( + "AgentsCompletionStreamRequestTools1TypedDict", + Union[ + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + ToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +AgentsCompletionStreamRequestTools1 = TypeAliasType( + "AgentsCompletionStreamRequestTools1", + Union[ + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + Tool, + DocumentLibraryTool, + CustomConnector, + ], +) + + +AgentsCompletionStreamRequestTools2TypedDict = TypeAliasType( + "AgentsCompletionStreamRequestTools2TypedDict", + Union[List[AgentsCompletionStreamRequestTools1TypedDict], List[str]], +) + + +AgentsCompletionStreamRequestTools2 = TypeAliasType( + "AgentsCompletionStreamRequestTools2", + Union[List[AgentsCompletionStreamRequestTools1], List[str]], +) + + AgentsCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -87,7 +134,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[AgentsCompletionStreamRequestTools2TypedDict]] tool_choice: NotRequired[AgentsCompletionStreamRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -105,6 +152,11 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): class AgentsCompletionStreamRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + messages: List[AgentsCompletionStreamRequestMessage] r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" @@ -127,7 +179,7 @@ class AgentsCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[AgentsCompletionStreamRequestTools2] = UNSET tool_choice: Optional[AgentsCompletionStreamRequestToolChoice] = None @@ -152,6 +204,14 @@ class AgentsCompletionStreamRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -192,6 +252,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -204,5 +265,7 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val + for k, v in serialized.items(): + m[k] = v return m diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index b57ff2ca..acf9cf8d 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -15,7 +15,7 @@ from typing_extensions import NotRequired, TypedDict -TypeEnum = Union[ +BaseFieldDefinitionType = Union[ Literal[ "ENUM", "TEXT", @@ -58,7 +58,7 @@ class BaseFieldDefinitionTypedDict(TypedDict): name: str label: str - type: TypeEnum + type: BaseFieldDefinitionType supported_operators: List[SupportedOperator] group: NotRequired[Nullable[str]] @@ -68,7 +68,7 @@ class BaseFieldDefinition(BaseModel): label: str - type: TypeEnum + type: BaseFieldDefinitionType supported_operators: List[SupportedOperator] diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index f1b0b2d6..558efb76 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -22,7 +28,8 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -from pydantic import Discriminator, Tag, model_serializer +import pydantic +from pydantic import ConfigDict, Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -61,6 +68,47 @@ ] +ChatCompletionRequestTools1TypedDict = TypeAliasType( + "ChatCompletionRequestTools1TypedDict", + Union[ + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + ToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionRequestTools1 = TypeAliasType( + "ChatCompletionRequestTools1", + Union[ + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + Tool, + DocumentLibraryTool, + CustomConnector, + ], +) + + +ChatCompletionRequestTools2TypedDict = TypeAliasType( + "ChatCompletionRequestTools2TypedDict", + Union[List[ChatCompletionRequestTools1TypedDict], List[str]], +) +r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" + + +ChatCompletionRequestTools2 = TypeAliasType( + "ChatCompletionRequestTools2", Union[List[ChatCompletionRequestTools1], List[str]] +) +r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" + + ChatCompletionRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -94,7 +142,7 @@ class ChatCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[ChatCompletionRequestTools2TypedDict]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -117,6 +165,11 @@ class ChatCompletionRequestTypedDict(TypedDict): class ChatCompletionRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + model: str r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.""" @@ -146,7 +199,7 @@ class ChatCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[ChatCompletionRequestTools2] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionRequestToolChoice] = None @@ -177,6 +230,14 @@ class ChatCompletionRequest(BaseModel): safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -221,6 +282,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -233,5 +295,7 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val + for k, v in serialized.items(): + m[k] = v return m diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index d9f413c6..4d92d524 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -22,7 +28,8 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -from pydantic import Discriminator, Tag, model_serializer +import pydantic +from pydantic import ConfigDict, Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -61,6 +68,48 @@ ] +ChatCompletionStreamRequestTools1TypedDict = TypeAliasType( + "ChatCompletionStreamRequestTools1TypedDict", + Union[ + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + ToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionStreamRequestTools1 = TypeAliasType( + "ChatCompletionStreamRequestTools1", + Union[ + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + Tool, + DocumentLibraryTool, + CustomConnector, + ], +) + + +ChatCompletionStreamRequestTools2TypedDict = TypeAliasType( + "ChatCompletionStreamRequestTools2TypedDict", + Union[List[ChatCompletionStreamRequestTools1TypedDict], List[str]], +) +r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" + + +ChatCompletionStreamRequestTools2 = TypeAliasType( + "ChatCompletionStreamRequestTools2", + Union[List[ChatCompletionStreamRequestTools1], List[str]], +) +r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" + + ChatCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -93,7 +142,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[ChatCompletionStreamRequestTools2TypedDict]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionStreamRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -116,6 +165,11 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): class ChatCompletionStreamRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + model: str r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.""" @@ -144,7 +198,7 @@ class ChatCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[ChatCompletionStreamRequestTools2] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None @@ -175,6 +229,14 @@ class ChatCompletionStreamRequest(BaseModel): safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -219,6 +281,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -231,5 +294,7 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val + for k, v in serialized.items(): + m[k] = v return m diff --git a/src/mistralai/client/models/codeinterpretertool.py b/src/mistralai/client/models/codeinterpretertool.py index 4cf9d055..3c6a384f 100644 --- a/src/mistralai/client/models/codeinterpretertool.py +++ b/src/mistralai/client/models/codeinterpretertool.py @@ -10,33 +10,27 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +CodeInterpreterToolType = Literal["code_interpreter",] class CodeInterpreterToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["code_interpreter"] + type: NotRequired[CodeInterpreterToolType] class CodeInterpreterTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Annotated[ - Annotated[ - Literal["code_interpreter"], - AfterValidator(validate_const("code_interpreter")), - ], - pydantic.Field(alias="type"), - ] = "code_interpreter" + type: Optional[CodeInterpreterToolType] = "code_interpreter" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) + optional_fields = set(["tool_configuration", "type"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -58,9 +52,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - CodeInterpreterTool.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/completionargs.py b/src/mistralai/client/models/completionargs.py index 76c4cf98..57e4840a 100644 --- a/src/mistralai/client/models/completionargs.py +++ b/src/mistralai/client/models/completionargs.py @@ -4,6 +4,7 @@ from __future__ import annotations from .completionargsstop import CompletionArgsStop, CompletionArgsStopTypedDict from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .toolchoiceenum import ToolChoiceEnum from mistralai.client.types import ( @@ -31,6 +32,7 @@ class CompletionArgsTypedDict(TypedDict): prediction: NotRequired[Nullable[PredictionTypedDict]] response_format: NotRequired[Nullable[ResponseFormatTypedDict]] tool_choice: NotRequired[ToolChoiceEnum] + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] class CompletionArgs(BaseModel): @@ -56,6 +58,8 @@ class CompletionArgs(BaseModel): tool_choice: Optional[ToolChoiceEnum] = None + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -70,6 +74,7 @@ def serialize_model(self, handler): "prediction", "response_format", "tool_choice", + "reasoning_effort", ] ) nullable_fields = set( @@ -83,6 +88,7 @@ def serialize_model(self, handler): "random_seed", "prediction", "response_format", + "reasoning_effort", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index 94fcb03b..5b6951bf 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -10,6 +10,7 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -19,11 +20,11 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const +from mistralai.client.utils import get_discriminator, validate_const import pydantic -from pydantic import Field, model_serializer +from pydantic import Discriminator, Tag, model_serializer from pydantic.functional_validators import AfterValidator -from typing import Any, Dict, List, Literal, Optional, Union +from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -49,15 +50,15 @@ ConversationRequestTool = Annotated[ Union[ - CodeInterpreterTool, - CustomConnector, - DocumentLibraryTool, - FunctionTool, - ImageGenerationTool, - WebSearchTool, - WebSearchPremiumTool, + Annotated[CodeInterpreterTool, Tag("code_interpreter")], + Annotated[CustomConnector, Tag("connector")], + Annotated[DocumentLibraryTool, Tag("document_library")], + Annotated[FunctionTool, Tag("function")], + Annotated[ImageGenerationTool, Tag("image_generation")], + Annotated[WebSearchTool, Tag("web_search")], + Annotated[WebSearchPremiumTool, Tag("web_search_premium")], ], - Field(discriminator="type"), + Discriminator(lambda m: get_discriminator(m, "type", "type")), ] @@ -82,7 +83,7 @@ class ConversationRequestTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] agent_id: NotRequired[Nullable[str]] agent_version: NotRequired[Nullable[ConversationRequestAgentVersionTypedDict]] model: NotRequired[Nullable[str]] @@ -112,7 +113,7 @@ class ConversationRequest(BaseModel): description: OptionalNullable[str] = UNSET - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET agent_id: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/conversationrestartrequest.py b/src/mistralai/client/models/conversationrestartrequest.py index b6b03f1f..8e04cb45 100644 --- a/src/mistralai/client/models/conversationrestartrequest.py +++ b/src/mistralai/client/models/conversationrestartrequest.py @@ -5,6 +5,7 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -16,7 +17,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Any, Dict, List, Literal, Optional, Union +from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -50,7 +51,7 @@ class ConversationRestartRequestTypedDict(TypedDict): completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] r"""Custom metadata for the conversation.""" agent_version: NotRequired[ Nullable[ConversationRestartRequestAgentVersionTypedDict] @@ -80,7 +81,7 @@ class ConversationRestartRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET r"""Custom metadata for the conversation.""" agent_version: OptionalNullable[ConversationRestartRequestAgentVersion] = UNSET diff --git a/src/mistralai/client/models/conversationrestartstreamrequest.py b/src/mistralai/client/models/conversationrestartstreamrequest.py index 41b7098f..d1aeb98d 100644 --- a/src/mistralai/client/models/conversationrestartstreamrequest.py +++ b/src/mistralai/client/models/conversationrestartstreamrequest.py @@ -5,6 +5,7 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -16,7 +17,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Any, Dict, List, Literal, Optional, Union +from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -50,7 +51,7 @@ class ConversationRestartStreamRequestTypedDict(TypedDict): completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] r"""Custom metadata for the conversation.""" agent_version: NotRequired[ Nullable[ConversationRestartStreamRequestAgentVersionTypedDict] @@ -82,7 +83,7 @@ class ConversationRestartStreamRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET r"""Custom metadata for the conversation.""" agent_version: OptionalNullable[ConversationRestartStreamRequestAgentVersion] = ( diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index a1afb267..9a323e2a 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -10,6 +10,7 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -19,11 +20,11 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const +from mistralai.client.utils import get_discriminator, validate_const import pydantic -from pydantic import Field, model_serializer +from pydantic import Discriminator, Tag, model_serializer from pydantic.functional_validators import AfterValidator -from typing import Any, Dict, List, Literal, Optional, Union +from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -49,15 +50,15 @@ ConversationStreamRequestTool = Annotated[ Union[ - CodeInterpreterTool, - CustomConnector, - DocumentLibraryTool, - FunctionTool, - ImageGenerationTool, - WebSearchTool, - WebSearchPremiumTool, + Annotated[CodeInterpreterTool, Tag("code_interpreter")], + Annotated[CustomConnector, Tag("connector")], + Annotated[DocumentLibraryTool, Tag("document_library")], + Annotated[FunctionTool, Tag("function")], + Annotated[ImageGenerationTool, Tag("image_generation")], + Annotated[WebSearchTool, Tag("web_search")], + Annotated[WebSearchPremiumTool, Tag("web_search_premium")], ], - Field(discriminator="type"), + Discriminator(lambda m: get_discriminator(m, "type", "type")), ] @@ -82,7 +83,7 @@ class ConversationStreamRequestTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] agent_id: NotRequired[Nullable[str]] agent_version: NotRequired[Nullable[ConversationStreamRequestAgentVersionTypedDict]] model: NotRequired[Nullable[str]] @@ -114,7 +115,7 @@ class ConversationStreamRequest(BaseModel): description: OptionalNullable[str] = UNSET - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET agent_id: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index b434619d..78a9cd24 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -9,6 +9,7 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -18,8 +19,9 @@ UNSET, UNSET_SENTINEL, ) -from pydantic import Field, model_serializer -from typing import Any, Dict, List, Optional, Union +from mistralai.client.utils import get_discriminator +from pydantic import Discriminator, Tag, model_serializer +from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -39,15 +41,15 @@ CreateAgentRequestTool = Annotated[ Union[ - CodeInterpreterTool, - CustomConnector, - DocumentLibraryTool, - FunctionTool, - ImageGenerationTool, - WebSearchTool, - WebSearchPremiumTool, + Annotated[CodeInterpreterTool, Tag("code_interpreter")], + Annotated[CustomConnector, Tag("connector")], + Annotated[DocumentLibraryTool, Tag("document_library")], + Annotated[FunctionTool, Tag("function")], + Annotated[ImageGenerationTool, Tag("image_generation")], + Annotated[WebSearchTool, Tag("web_search")], + Annotated[WebSearchPremiumTool, Tag("web_search_premium")], ], - Field(discriminator="type"), + Discriminator(lambda m: get_discriminator(m, "type", "type")), ] @@ -63,7 +65,7 @@ class CreateAgentRequestTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] version_message: NotRequired[Nullable[str]] @@ -87,7 +89,7 @@ class CreateAgentRequest(BaseModel): handoffs: OptionalNullable[List[str]] = UNSET - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET version_message: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/customconnector.py b/src/mistralai/client/models/customconnector.py index f3a1e2ff..9235dfd9 100644 --- a/src/mistralai/client/models/customconnector.py +++ b/src/mistralai/client/models/customconnector.py @@ -13,15 +13,16 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const from mistralai.client.utils.unions import parse_open_union -import pydantic from pydantic import ConfigDict, model_serializer -from pydantic.functional_validators import AfterValidator, BeforeValidator -from typing import Any, Literal, Union +from pydantic.functional_validators import BeforeValidator +from typing import Any, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict +CustomConnectorType = Literal["connector",] + + AuthorizationTypedDict = TypeAliasType( "AuthorizationTypedDict", Union[OAuth2TokenAuthTypedDict, APIKeyAuthTypedDict] ) @@ -59,7 +60,7 @@ class UnknownAuthorization(BaseModel): class CustomConnectorTypedDict(TypedDict): connector_id: str - type: Literal["connector"] + type: NotRequired[CustomConnectorType] authorization: NotRequired[Nullable[AuthorizationTypedDict]] tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] @@ -67,10 +68,7 @@ class CustomConnectorTypedDict(TypedDict): class CustomConnector(BaseModel): connector_id: str - type: Annotated[ - Annotated[Literal["connector"], AfterValidator(validate_const("connector"))], - pydantic.Field(alias="type"), - ] = "connector" + type: Optional[CustomConnectorType] = "connector" authorization: OptionalNullable[Authorization] = UNSET @@ -78,7 +76,7 @@ class CustomConnector(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["authorization", "tool_configuration"]) + optional_fields = set(["type", "authorization", "tool_configuration"]) nullable_fields = set(["authorization", "tool_configuration"]) serialized = handler(self) m = {} @@ -100,9 +98,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - CustomConnector.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/delete_voice_v1_audio_voices_voice_id_deleteop.py b/src/mistralai/client/models/delete_voice_v1_audio_voices_voice_id_deleteop.py new file mode 100644 index 00000000..3ce38364 --- /dev/null +++ b/src/mistralai/client/models/delete_voice_v1_audio_voices_voice_id_deleteop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a84ce12a8251 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict(TypedDict): + voice_id: str + + +class DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest(BaseModel): + voice_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/documentlibrarytool.py b/src/mistralai/client/models/documentlibrarytool.py index 29f8d64a..aa3093f4 100644 --- a/src/mistralai/client/models/documentlibrarytool.py +++ b/src/mistralai/client/models/documentlibrarytool.py @@ -10,19 +10,19 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import List, Literal -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import List, Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +DocumentLibraryToolType = Literal["document_library",] class DocumentLibraryToolTypedDict(TypedDict): library_ids: List[str] r"""Ids of the library in which to search.""" tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["document_library"] + type: NotRequired[DocumentLibraryToolType] class DocumentLibraryTool(BaseModel): @@ -31,17 +31,11 @@ class DocumentLibraryTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Annotated[ - Annotated[ - Literal["document_library"], - AfterValidator(validate_const("document_library")), - ], - pydantic.Field(alias="type"), - ] = "document_library" + type: Optional[DocumentLibraryToolType] = "document_library" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) + optional_fields = set(["tool_configuration", "type"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -63,9 +57,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - DocumentLibraryTool.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py b/src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py new file mode 100644 index 00000000..5d4cbbfd --- /dev/null +++ b/src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a5838063aee4 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict(TypedDict): + voice_id: str + + +class GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest(BaseModel): + voice_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_voice_v1_audio_voices_voice_id_getop.py b/src/mistralai/client/models/get_voice_v1_audio_voices_voice_id_getop.py new file mode 100644 index 00000000..bd81442e --- /dev/null +++ b/src/mistralai/client/models/get_voice_v1_audio_voices_voice_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b6ca849d5005 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict(TypedDict): + voice_id: str + + +class GetVoiceV1AudioVoicesVoiceIDGetRequest(BaseModel): + voice_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/imagegenerationtool.py b/src/mistralai/client/models/imagegenerationtool.py index 0dd4a4d2..5012a565 100644 --- a/src/mistralai/client/models/imagegenerationtool.py +++ b/src/mistralai/client/models/imagegenerationtool.py @@ -10,33 +10,27 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +ImageGenerationToolType = Literal["image_generation",] class ImageGenerationToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["image_generation"] + type: NotRequired[ImageGenerationToolType] class ImageGenerationTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Annotated[ - Annotated[ - Literal["image_generation"], - AfterValidator(validate_const("image_generation")), - ], - pydantic.Field(alias="type"), - ] = "image_generation" + type: Optional[ImageGenerationToolType] = "image_generation" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) + optional_fields = set(["tool_configuration", "type"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -58,9 +52,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - ImageGenerationTool.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/internalmetadata.py b/src/mistralai/client/models/internalmetadata.py new file mode 100644 index 00000000..dca90b9a --- /dev/null +++ b/src/mistralai/client/models/internalmetadata.py @@ -0,0 +1,92 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 50a25e4e336c + +from __future__ import annotations +from .mirrorconfig import MirrorConfig, MirrorConfigTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +InternalMetadataAgentVersionTypedDict = TypeAliasType( + "InternalMetadataAgentVersionTypedDict", Union[str, int] +) + + +InternalMetadataAgentVersion = TypeAliasType( + "InternalMetadataAgentVersion", Union[str, int] +) + + +class InternalMetadataTypedDict(TypedDict): + r"""Typed structure for internal metadata.""" + + agent_id: NotRequired[Nullable[str]] + agent_version: NotRequired[Nullable[InternalMetadataAgentVersionTypedDict]] + mirror_config: NotRequired[Nullable[MirrorConfigTypedDict]] + science_config: NotRequired[Nullable[Dict[str, Any]]] + + +class InternalMetadata(BaseModel): + r"""Typed structure for internal metadata.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + agent_id: OptionalNullable[str] = UNSET + + agent_version: OptionalNullable[InternalMetadataAgentVersion] = UNSET + + mirror_config: OptionalNullable[MirrorConfig] = UNSET + + science_config: OptionalNullable[Dict[str, Any]] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["agent_id", "agent_version", "mirror_config", "science_config"] + ) + nullable_fields = set( + ["agent_id", "agent_version", "mirror_config", "science_config"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/list_voices_v1_audio_voices_getop.py b/src/mistralai/client/models/list_voices_v1_audio_voices_getop.py new file mode 100644 index 00000000..16ae81c7 --- /dev/null +++ b/src/mistralai/client/models/list_voices_v1_audio_voices_getop.py @@ -0,0 +1,46 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6b3ce5be1294 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListVoicesV1AudioVoicesGetRequestTypedDict(TypedDict): + limit: NotRequired[int] + r"""Maximum number of voices to return""" + offset: NotRequired[int] + r"""Offset for pagination""" + + +class ListVoicesV1AudioVoicesGetRequest(BaseModel): + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 10 + r"""Maximum number of voices to return""" + + offset: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + r"""Offset for pagination""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["limit", "offset"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/messagetokens.py b/src/mistralai/client/models/messagetokens.py new file mode 100644 index 00000000..f3e292bd --- /dev/null +++ b/src/mistralai/client/models/messagetokens.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e2a5171d27c5 + +from __future__ import annotations +from .roles import Roles +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class MessageTokensTypedDict(TypedDict): + r"""Information on a single message included in a tokenized prompt as part of an InstructRequest.""" + + role: Roles + total_tokens: NotRequired[Nullable[int]] + truncated: NotRequired[bool] + usage_count: NotRequired[int] + + +class MessageTokens(BaseModel): + r"""Information on a single message included in a tokenized prompt as part of an InstructRequest.""" + + role: Roles + + total_tokens: OptionalNullable[int] = UNSET + + truncated: Optional[bool] = False + + usage_count: Optional[int] = 1 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["total_tokens", "truncated", "usage_count"]) + nullable_fields = set(["total_tokens"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/metadatadict.py b/src/mistralai/client/models/metadatadict.py new file mode 100644 index 00000000..9d6b6086 --- /dev/null +++ b/src/mistralai/client/models/metadatadict.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5c62d851af9a + +from __future__ import annotations +from .internalmetadata import InternalMetadata, InternalMetadataTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class MetadataDictTypedDict(TypedDict): + r"""Custom type for metadata with embedded validation.""" + + internal: NotRequired[Nullable[InternalMetadataTypedDict]] + + +class MetadataDict(BaseModel): + r"""Custom type for metadata with embedded validation.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + internal: OptionalNullable[InternalMetadata] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["internal"]) + nullable_fields = set(["internal"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/mirrorconfig.py b/src/mistralai/client/models/mirrorconfig.py new file mode 100644 index 00000000..e7754064 --- /dev/null +++ b/src/mistralai/client/models/mirrorconfig.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0aebdaa43ceb + +from __future__ import annotations +from .mirrorsource import MirrorSource, MirrorSourceTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class MirrorConfigTypedDict(TypedDict): + r"""Configuration for mirroring behavior.""" + + mirror_source: MirrorSourceTypedDict + r"""Source information for mirrored requests.""" + + +class MirrorConfig(BaseModel): + r"""Configuration for mirroring behavior.""" + + mirror_source: MirrorSource + r"""Source information for mirrored requests.""" diff --git a/src/mistralai/client/models/mirrorsource.py b/src/mistralai/client/models/mirrorsource.py new file mode 100644 index 00000000..04603cb0 --- /dev/null +++ b/src/mistralai/client/models/mirrorsource.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 101888c5d045 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class MirrorSourceTypedDict(TypedDict): + r"""Source information for mirrored requests.""" + + app: str + root_model_name: str + mirror_model_name: str + version: NotRequired[Nullable[str]] + experiment_id: NotRequired[Nullable[str]] + + +class MirrorSource(BaseModel): + r"""Source information for mirrored requests.""" + + app: str + + root_model_name: str + + mirror_model_name: str + + version: OptionalNullable[str] = UNSET + + experiment_id: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["version", "experiment_id"]) + nullable_fields = set(["version", "experiment_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/modelcapabilities.py b/src/mistralai/client/models/modelcapabilities.py index 3267c707..2206f9a7 100644 --- a/src/mistralai/client/models/modelcapabilities.py +++ b/src/mistralai/client/models/modelcapabilities.py @@ -15,6 +15,7 @@ class ModelCapabilitiesTypedDict(TypedDict): completion_chat: NotRequired[bool] function_calling: NotRequired[bool] + reasoning: NotRequired[bool] completion_fim: NotRequired[bool] fine_tuning: NotRequired[bool] vision: NotRequired[bool] @@ -36,6 +37,8 @@ class ModelCapabilities(BaseModel): function_calling: Optional[bool] = False + reasoning: Optional[bool] = False + completion_fim: Optional[bool] = False fine_tuning: Optional[bool] = False @@ -62,6 +65,7 @@ def serialize_model(self, handler): [ "completion_chat", "function_calling", + "reasoning", "completion_fim", "fine_tuning", "vision", diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index 72ca957f..ff3b85d3 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -9,6 +9,7 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from datetime import datetime @@ -25,7 +26,7 @@ import pydantic from pydantic import ConfigDict, model_serializer from pydantic.functional_validators import AfterValidator, BeforeValidator -from typing import Any, Dict, List, Literal, Optional, Union +from typing import Any, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -103,7 +104,7 @@ class ModelConversationTypedDict(TypedDict): r"""Name given to the conversation.""" description: NotRequired[Nullable[str]] r"""Description of the what the conversation is about.""" - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] r"""Custom metadata for the conversation.""" object: Literal["conversation"] @@ -134,7 +135,7 @@ class ModelConversation(BaseModel): description: OptionalNullable[str] = UNSET r"""Description of the what the conversation is about.""" - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET r"""Custom metadata for the conversation.""" object: Annotated[ diff --git a/src/mistralai/client/models/prompttokensdetails.py b/src/mistralai/client/models/prompttokensdetails.py new file mode 100644 index 00000000..2c5186c0 --- /dev/null +++ b/src/mistralai/client/models/prompttokensdetails.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e6be33f2cd2d + +from __future__ import annotations +from .messagetokens import MessageTokens, MessageTokensTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PromptTokensDetailsTypedDict(TypedDict): + r"""Token usage details for the prompt.""" + + messages: NotRequired[List[MessageTokensTypedDict]] + cached_tokens: NotRequired[int] + + +class PromptTokensDetails(BaseModel): + r"""Token usage details for the prompt.""" + + messages: Optional[List[MessageTokens]] = None + + cached_tokens: Optional[int] = 0 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["messages", "cached_tokens"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/reasoningeffort.py b/src/mistralai/client/models/reasoningeffort.py index e95b8fee..e4dd2a33 100644 --- a/src/mistralai/client/models/reasoningeffort.py +++ b/src/mistralai/client/models/reasoningeffort.py @@ -2,10 +2,14 @@ # @generated-id: b930a0a20654 from __future__ import annotations -from typing import Literal +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union -ReasoningEffort = Literal[ - "none", - "high", +ReasoningEffort = Union[ + Literal[ + "none", + "high", + ], + UnrecognizedStr, ] diff --git a/src/mistralai/client/models/roles.py b/src/mistralai/client/models/roles.py new file mode 100644 index 00000000..ff36ebd7 --- /dev/null +++ b/src/mistralai/client/models/roles.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e41c04cf7422 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +Roles = Union[ + Literal[ + "system", + "user", + "assistant", + "tool", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/speech_v1_audio_speech_postop.py b/src/mistralai/client/models/speech_v1_audio_speech_postop.py new file mode 100644 index 00000000..3dbd044c --- /dev/null +++ b/src/mistralai/client/models/speech_v1_audio_speech_postop.py @@ -0,0 +1,107 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7ab5c1250642 + +from __future__ import annotations +from .speechstreamaudiodelta import ( + SpeechStreamAudioDelta, + SpeechStreamAudioDeltaTypedDict, +) +from .speechstreamdone import SpeechStreamDone, SpeechStreamDoneTypedDict +from .speechstreameventtypes import SpeechStreamEventTypes +from functools import partial +from mistralai.client.types import BaseModel +from mistralai.client.utils import eventstreaming +from mistralai.client.utils.unions import parse_open_union +from pydantic import ConfigDict +from pydantic.functional_validators import BeforeValidator +from typing import Any, Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +SpeechV1AudioSpeechPostDataTypedDict = TypeAliasType( + "SpeechV1AudioSpeechPostDataTypedDict", + Union[SpeechStreamAudioDeltaTypedDict, SpeechStreamDoneTypedDict], +) + + +class UnknownSpeechV1AudioSpeechPostData(BaseModel): + r"""A SpeechV1AudioSpeechPostData variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_SPEECH_V1_AUDIO_SPEECH_POST_DATA_VARIANTS: dict[str, Any] = { + "speech.audio.delta": SpeechStreamAudioDelta, + "speech.audio.done": SpeechStreamDone, +} + + +SpeechV1AudioSpeechPostData = Annotated[ + Union[SpeechStreamAudioDelta, SpeechStreamDone, UnknownSpeechV1AudioSpeechPostData], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_SPEECH_V1_AUDIO_SPEECH_POST_DATA_VARIANTS, + unknown_cls=UnknownSpeechV1AudioSpeechPostData, + union_name="SpeechV1AudioSpeechPostData", + ) + ), +] + + +class SpeechStreamEventsTypedDict(TypedDict): + r"""Speech audio data.""" + + event: SpeechStreamEventTypes + data: SpeechV1AudioSpeechPostDataTypedDict + + +class SpeechStreamEvents(BaseModel): + r"""Speech audio data.""" + + event: SpeechStreamEventTypes + + data: SpeechV1AudioSpeechPostData + + +class SpeechResponseTypedDict(TypedDict): + r"""Speech audio data.""" + + audio_data: str + r"""Base64 encoded audio data""" + + +class SpeechResponse(BaseModel): + r"""Speech audio data.""" + + audio_data: str + r"""Base64 encoded audio data""" + + +SpeechV1AudioSpeechPostResponseTypedDict = TypeAliasType( + "SpeechV1AudioSpeechPostResponseTypedDict", + Union[ + SpeechResponseTypedDict, + Union[ + eventstreaming.EventStream[SpeechStreamEventsTypedDict], + eventstreaming.EventStreamAsync[SpeechStreamEventsTypedDict], + ], + ], +) + + +SpeechV1AudioSpeechPostResponse = TypeAliasType( + "SpeechV1AudioSpeechPostResponse", + Union[ + SpeechResponse, + Union[ + eventstreaming.EventStream[SpeechStreamEvents], + eventstreaming.EventStreamAsync[SpeechStreamEvents], + ], + ], +) diff --git a/src/mistralai/client/models/speechoutputformat.py b/src/mistralai/client/models/speechoutputformat.py new file mode 100644 index 00000000..f564d2af --- /dev/null +++ b/src/mistralai/client/models/speechoutputformat.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e6be9ec9e74c + +from __future__ import annotations +from typing import Literal + + +SpeechOutputFormat = Literal[ + "pcm", + "wav", + "mp3", + "flac", + "opus", +] diff --git a/src/mistralai/client/models/speechrequest.py b/src/mistralai/client/models/speechrequest.py new file mode 100644 index 00000000..8aaabda9 --- /dev/null +++ b/src/mistralai/client/models/speechrequest.py @@ -0,0 +1,92 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cf3bc148e629 + +from __future__ import annotations +from .metadatadict import MetadataDict, MetadataDictTypedDict +from .speechoutputformat import SpeechOutputFormat +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class SpeechRequestTypedDict(TypedDict): + input: str + r"""Text to generate a speech from""" + model: NotRequired[Nullable[str]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] + stream: NotRequired[bool] + voice_id: NotRequired[Nullable[str]] + r"""The preset or custom voice to use for generating the speech.""" + ref_audio: NotRequired[Nullable[str]] + r"""The audio reference for generating the speech.""" + response_format: NotRequired[SpeechOutputFormat] + + +class SpeechRequest(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + input: str + r"""Text to generate a speech from""" + + model: OptionalNullable[str] = UNSET + + metadata: OptionalNullable[MetadataDict] = UNSET + + stream: Optional[bool] = False + + voice_id: OptionalNullable[str] = UNSET + r"""The preset or custom voice to use for generating the speech.""" + + ref_audio: OptionalNullable[str] = UNSET + r"""The audio reference for generating the speech.""" + + response_format: Optional[SpeechOutputFormat] = None + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["model", "metadata", "stream", "voice_id", "ref_audio", "response_format"] + ) + nullable_fields = set(["model", "metadata", "voice_id", "ref_audio"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/speechstreamaudiodelta.py b/src/mistralai/client/models/speechstreamaudiodelta.py new file mode 100644 index 00000000..e3cc7053 --- /dev/null +++ b/src/mistralai/client/models/speechstreamaudiodelta.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ac66815396b1 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class SpeechStreamAudioDeltaTypedDict(TypedDict): + audio_data: str + type: Literal["speech.audio.delta"] + + +class SpeechStreamAudioDelta(BaseModel): + audio_data: str + + type: Annotated[ + Annotated[ + Literal["speech.audio.delta"], + AfterValidator(validate_const("speech.audio.delta")), + ], + pydantic.Field(alias="type"), + ] = "speech.audio.delta" + + +try: + SpeechStreamAudioDelta.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/speechstreamdone.py b/src/mistralai/client/models/speechstreamdone.py new file mode 100644 index 00000000..2febda7b --- /dev/null +++ b/src/mistralai/client/models/speechstreamdone.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2164b6526a81 + +from __future__ import annotations +from .usageinfo_dollar_defs import UsageInfoDollarDefs, UsageInfoDollarDefsTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class SpeechStreamDoneTypedDict(TypedDict): + usage: UsageInfoDollarDefsTypedDict + type: Literal["speech.audio.done"] + + +class SpeechStreamDone(BaseModel): + usage: UsageInfoDollarDefs + + type: Annotated[ + Annotated[ + Literal["speech.audio.done"], + AfterValidator(validate_const("speech.audio.done")), + ], + pydantic.Field(alias="type"), + ] = "speech.audio.done" + + +try: + SpeechStreamDone.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/speechstreameventtypes.py b/src/mistralai/client/models/speechstreameventtypes.py new file mode 100644 index 00000000..723a571b --- /dev/null +++ b/src/mistralai/client/models/speechstreameventtypes.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b76eee4fdf6a + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +SpeechStreamEventTypes = Union[ + Literal[ + "speech.audio.delta", + "speech.audio.done", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py b/src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py new file mode 100644 index 00000000..a11b626a --- /dev/null +++ b/src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 399da05bd75e + +from __future__ import annotations +from .voiceupdaterequest import VoiceUpdateRequest, VoiceUpdateRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict(TypedDict): + voice_id: str + voice_update_request: VoiceUpdateRequestTypedDict + + +class UpdateVoiceV1AudioVoicesVoiceIDPatchRequest(BaseModel): + voice_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + voice_update_request: Annotated[ + VoiceUpdateRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index 7bb9686b..8fec9149 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -9,6 +9,7 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict +from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -18,8 +19,9 @@ UNSET, UNSET_SENTINEL, ) -from pydantic import Field, model_serializer -from typing import Any, Dict, List, Optional, Union +from mistralai.client.utils import get_discriminator +from pydantic import Discriminator, Tag, model_serializer +from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -39,15 +41,15 @@ UpdateAgentRequestTool = Annotated[ Union[ - CodeInterpreterTool, - CustomConnector, - DocumentLibraryTool, - FunctionTool, - ImageGenerationTool, - WebSearchTool, - WebSearchPremiumTool, + Annotated[CodeInterpreterTool, Tag("code_interpreter")], + Annotated[CustomConnector, Tag("connector")], + Annotated[DocumentLibraryTool, Tag("document_library")], + Annotated[FunctionTool, Tag("function")], + Annotated[ImageGenerationTool, Tag("image_generation")], + Annotated[WebSearchTool, Tag("web_search")], + Annotated[WebSearchPremiumTool, Tag("web_search_premium")], ], - Field(discriminator="type"), + Discriminator(lambda m: get_discriminator(m, "type", "type")), ] @@ -64,7 +66,7 @@ class UpdateAgentRequestTypedDict(TypedDict): description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] deployment_chat: NotRequired[Nullable[bool]] - metadata: NotRequired[Nullable[Dict[str, Any]]] + metadata: NotRequired[Nullable[MetadataDictTypedDict]] version_message: NotRequired[Nullable[str]] @@ -90,7 +92,7 @@ class UpdateAgentRequest(BaseModel): deployment_chat: OptionalNullable[bool] = UNSET - metadata: OptionalNullable[Dict[str, Any]] = UNSET + metadata: OptionalNullable[MetadataDict] = UNSET version_message: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/usageinfo_dollar_defs.py b/src/mistralai/client/models/usageinfo_dollar_defs.py new file mode 100644 index 00000000..83bb2fe8 --- /dev/null +++ b/src/mistralai/client/models/usageinfo_dollar_defs.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d543506af998 + +from __future__ import annotations +from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class UsageInfoDollarDefsTypedDict(TypedDict): + prompt_audio_seconds: NotRequired[Nullable[int]] + prompt_tokens: NotRequired[int] + total_tokens: NotRequired[int] + completion_tokens: NotRequired[Nullable[int]] + request_count: NotRequired[Nullable[int]] + prompt_tokens_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]] + prompt_token_details: NotRequired[Nullable[PromptTokensDetailsTypedDict]] + num_cached_tokens: NotRequired[Nullable[int]] + + +class UsageInfoDollarDefs(BaseModel): + prompt_audio_seconds: OptionalNullable[int] = UNSET + + prompt_tokens: Optional[int] = 0 + + total_tokens: Optional[int] = 0 + + completion_tokens: OptionalNullable[int] = UNSET + + request_count: OptionalNullable[int] = UNSET + + prompt_tokens_details: OptionalNullable[PromptTokensDetails] = UNSET + + prompt_token_details: OptionalNullable[PromptTokensDetails] = UNSET + + num_cached_tokens: OptionalNullable[int] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "prompt_audio_seconds", + "prompt_tokens", + "total_tokens", + "completion_tokens", + "request_count", + "prompt_tokens_details", + "prompt_token_details", + "num_cached_tokens", + ] + ) + nullable_fields = set( + [ + "prompt_audio_seconds", + "completion_tokens", + "request_count", + "prompt_tokens_details", + "prompt_token_details", + "num_cached_tokens", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/voicecreaterequest.py b/src/mistralai/client/models/voicecreaterequest.py new file mode 100644 index 00000000..99df178d --- /dev/null +++ b/src/mistralai/client/models/voicecreaterequest.py @@ -0,0 +1,95 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9a1752117dec + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class VoiceCreateRequestTypedDict(TypedDict): + r"""Request model for creating a new voice with base64 audio.""" + + name: str + sample_audio: str + r"""Base64-encoded audio file""" + slug: NotRequired[Nullable[str]] + languages: NotRequired[List[str]] + gender: NotRequired[Nullable[str]] + age: NotRequired[Nullable[int]] + tags: NotRequired[Nullable[List[str]]] + color: NotRequired[Nullable[str]] + retention_notice: NotRequired[int] + sample_filename: NotRequired[Nullable[str]] + r"""Original filename for extension detection""" + + +class VoiceCreateRequest(BaseModel): + r"""Request model for creating a new voice with base64 audio.""" + + name: str + + sample_audio: str + r"""Base64-encoded audio file""" + + slug: OptionalNullable[str] = UNSET + + languages: Optional[List[str]] = None + + gender: OptionalNullable[str] = UNSET + + age: OptionalNullable[int] = UNSET + + tags: OptionalNullable[List[str]] = UNSET + + color: OptionalNullable[str] = UNSET + + retention_notice: Optional[int] = 30 + + sample_filename: OptionalNullable[str] = UNSET + r"""Original filename for extension detection""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "slug", + "languages", + "gender", + "age", + "tags", + "color", + "retention_notice", + "sample_filename", + ] + ) + nullable_fields = set( + ["slug", "gender", "age", "tags", "color", "sample_filename"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/voicelistresponse.py b/src/mistralai/client/models/voicelistresponse.py new file mode 100644 index 00000000..eda768f5 --- /dev/null +++ b/src/mistralai/client/models/voicelistresponse.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: df4b1182d193 + +from __future__ import annotations +from .voiceresponse import VoiceResponse, VoiceResponseTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class VoiceListResponseTypedDict(TypedDict): + r"""Schema for voice list response""" + + items: List[VoiceResponseTypedDict] + total: int + page: int + page_size: int + total_pages: int + + +class VoiceListResponse(BaseModel): + r"""Schema for voice list response""" + + items: List[VoiceResponse] + + total: int + + page: int + + page_size: int + + total_pages: int diff --git a/src/mistralai/client/models/voiceresponse.py b/src/mistralai/client/models/voiceresponse.py new file mode 100644 index 00000000..6fa3987b --- /dev/null +++ b/src/mistralai/client/models/voiceresponse.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 24138e419fae + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class VoiceResponseTypedDict(TypedDict): + r"""Schema for voice response""" + + name: str + id: str + created_at: datetime + user_id: Nullable[str] + slug: NotRequired[Nullable[str]] + languages: NotRequired[List[str]] + gender: NotRequired[Nullable[str]] + age: NotRequired[Nullable[int]] + tags: NotRequired[Nullable[List[str]]] + color: NotRequired[Nullable[str]] + retention_notice: NotRequired[int] + + +class VoiceResponse(BaseModel): + r"""Schema for voice response""" + + name: str + + id: str + + created_at: datetime + + user_id: Nullable[str] + + slug: OptionalNullable[str] = UNSET + + languages: Optional[List[str]] = None + + gender: OptionalNullable[str] = UNSET + + age: OptionalNullable[int] = UNSET + + tags: OptionalNullable[List[str]] = UNSET + + color: OptionalNullable[str] = UNSET + + retention_notice: Optional[int] = 30 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["slug", "languages", "gender", "age", "tags", "color", "retention_notice"] + ) + nullable_fields = set(["slug", "gender", "age", "tags", "color", "user_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/voiceupdaterequest.py b/src/mistralai/client/models/voiceupdaterequest.py new file mode 100644 index 00000000..717316b0 --- /dev/null +++ b/src/mistralai/client/models/voiceupdaterequest.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 798f8ff225de + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class VoiceUpdateRequestTypedDict(TypedDict): + r"""Request model for partially updating voice metadata.""" + + name: NotRequired[Nullable[str]] + languages: NotRequired[Nullable[List[str]]] + gender: NotRequired[Nullable[str]] + age: NotRequired[Nullable[int]] + tags: NotRequired[Nullable[List[str]]] + + +class VoiceUpdateRequest(BaseModel): + r"""Request model for partially updating voice metadata.""" + + name: OptionalNullable[str] = UNSET + + languages: OptionalNullable[List[str]] = UNSET + + gender: OptionalNullable[str] = UNSET + + age: OptionalNullable[int] = UNSET + + tags: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "languages", "gender", "age", "tags"]) + nullable_fields = set(["name", "languages", "gender", "age", "tags"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/websearchpremiumtool.py b/src/mistralai/client/models/websearchpremiumtool.py index 5c929e94..249e1840 100644 --- a/src/mistralai/client/models/websearchpremiumtool.py +++ b/src/mistralai/client/models/websearchpremiumtool.py @@ -10,33 +10,27 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +WebSearchPremiumToolType = Literal["web_search_premium",] class WebSearchPremiumToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["web_search_premium"] + type: NotRequired[WebSearchPremiumToolType] class WebSearchPremiumTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Annotated[ - Annotated[ - Literal["web_search_premium"], - AfterValidator(validate_const("web_search_premium")), - ], - pydantic.Field(alias="type"), - ] = "web_search_premium" + type: Optional[WebSearchPremiumToolType] = "web_search_premium" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) + optional_fields = set(["tool_configuration", "type"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -58,9 +52,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - WebSearchPremiumTool.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/websearchtool.py b/src/mistralai/client/models/websearchtool.py index f82b6ec1..9f372ec0 100644 --- a/src/mistralai/client/models/websearchtool.py +++ b/src/mistralai/client/models/websearchtool.py @@ -10,30 +10,27 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import validate_const -import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal -from typing_extensions import Annotated, NotRequired, TypedDict +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +WebSearchToolType = Literal["web_search",] class WebSearchToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: Literal["web_search"] + type: NotRequired[WebSearchToolType] class WebSearchTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Annotated[ - Annotated[Literal["web_search"], AfterValidator(validate_const("web_search"))], - pydantic.Field(alias="type"), - ] = "web_search" + type: Optional[WebSearchToolType] = "web_search" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration"]) + optional_fields = set(["tool_configuration", "type"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -55,9 +52,3 @@ def serialize_model(self, handler): m[k] = val return m - - -try: - WebSearchTool.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index b775fe1c..52fc5d9a 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -33,6 +33,7 @@ class Mistral(BaseSDK): r"""Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.""" + audio: "Audio" models: "Models" r"""Model Management API""" beta: "Beta" @@ -52,8 +53,8 @@ class Mistral(BaseSDK): r"""Classifiers API.""" ocr: "Ocr" r"""OCR API""" - audio: "Audio" _sub_sdk_map = { + "audio": ("mistralai.client.audio", "Audio"), "models": ("mistralai.client.models_", "Models"), "beta": ("mistralai.client.beta", "Beta"), "files": ("mistralai.client.files", "Files"), @@ -65,7 +66,6 @@ class Mistral(BaseSDK): "embeddings": ("mistralai.client.embeddings", "Embeddings"), "classifiers": ("mistralai.client.classifiers", "Classifiers"), "ocr": ("mistralai.client.ocr", "Ocr"), - "audio": ("mistralai.client.audio", "Audio"), } def __init__( diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py new file mode 100644 index 00000000..e548df44 --- /dev/null +++ b/src/mistralai/client/speech.py @@ -0,0 +1,282 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5c1f1109aa5e + +from .basesdk import BaseSDK +from enum import Enum +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import eventstreaming, get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, Mapping, Optional, Union + + +class CompleteAcceptEnum(str, Enum): + APPLICATION_JSON = "application/json" + TEXT_EVENT_STREAM = "text/event-stream" + + +class Speech(BaseSDK): + def complete( + self, + *, + input: str, + model: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, + stream: Optional[bool] = False, + voice_id: OptionalNullable[str] = UNSET, + ref_audio: OptionalNullable[str] = UNSET, + response_format: Optional[models.SpeechOutputFormat] = None, + additional_properties: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + accept_header_override: Optional[CompleteAcceptEnum] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SpeechV1AudioSpeechPostResponse: + r"""Speech + + :param input: Text to generate a speech from + :param model: + :param metadata: + :param stream: + :param voice_id: The preset or custom voice to use for generating the speech. + :param ref_audio: The audio reference for generating the speech. + :param response_format: + :param additional_properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param accept_header_override: Override the default accept header for this method + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SpeechRequest( + model=model, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), + stream=stream, + voice_id=voice_id, + ref_audio=ref_audio, + input=input, + response_format=response_format, + **(additional_properties or {}), + ) + + req = self._build_request( + method="POST", + path="/v1/audio/speech", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value=accept_header_override.value + if accept_header_override is not None + else "application/json;q=1, text/event-stream;q=0", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.SpeechRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="speech_v1_audio_speech_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + http_res_text = utils.stream_to_text(http_res) + return unmarshal_json_response( + models.SpeechResponse, http_res, http_res_text + ) + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStream( + http_res, + lambda raw: utils.unmarshal_json(raw, models.SpeechStreamEvents), + client_ref=self, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + async def complete_async( + self, + *, + input: str, + model: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, + stream: Optional[bool] = False, + voice_id: OptionalNullable[str] = UNSET, + ref_audio: OptionalNullable[str] = UNSET, + response_format: Optional[models.SpeechOutputFormat] = None, + additional_properties: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + accept_header_override: Optional[CompleteAcceptEnum] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SpeechV1AudioSpeechPostResponse: + r"""Speech + + :param input: Text to generate a speech from + :param model: + :param metadata: + :param stream: + :param voice_id: The preset or custom voice to use for generating the speech. + :param ref_audio: The audio reference for generating the speech. + :param response_format: + :param additional_properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param accept_header_override: Override the default accept header for this method + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SpeechRequest( + model=model, + metadata=utils.get_pydantic_model( + metadata, OptionalNullable[models.MetadataDict] + ), + stream=stream, + voice_id=voice_id, + ref_audio=ref_audio, + input=input, + response_format=response_format, + **(additional_properties or {}), + ) + + req = self._build_request_async( + method="POST", + path="/v1/audio/speech", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value=accept_header_override.value + if accept_header_override is not None + else "application/json;q=1, text/event-stream;q=0", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.SpeechRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="speech_v1_audio_speech_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + return unmarshal_json_response( + models.SpeechResponse, http_res, http_res_text + ) + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStreamAsync( + http_res, + lambda raw: utils.unmarshal_json(raw, models.SpeechStreamEvents), + client_ref=self, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py new file mode 100644 index 00000000..68d4bb5b --- /dev/null +++ b/src/mistralai/client/voices.py @@ -0,0 +1,1206 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ab76b1377d79 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional + + +class Voices(BaseSDK): + def list( + self, + *, + limit: Optional[int] = 10, + offset: Optional[int] = 0, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceListResponse: + r"""List all voices + + List all voices (excluding sample data) + + :param limit: Maximum number of voices to return + :param offset: Offset for pagination + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ListVoicesV1AudioVoicesGetRequest( + limit=limit, + offset=offset, + ) + + req = self._build_request( + method="GET", + path="/v1/audio/voices", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_voices_v1_audio_voices_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceListResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + limit: Optional[int] = 10, + offset: Optional[int] = 0, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceListResponse: + r"""List all voices + + List all voices (excluding sample data) + + :param limit: Maximum number of voices to return + :param offset: Offset for pagination + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ListVoicesV1AudioVoicesGetRequest( + limit=limit, + offset=offset, + ) + + req = self._build_request_async( + method="GET", + path="/v1/audio/voices", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_voices_v1_audio_voices_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceListResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create( + self, + *, + name: str, + sample_audio: str, + slug: OptionalNullable[str] = UNSET, + languages: Optional[List[str]] = None, + gender: OptionalNullable[str] = UNSET, + age: OptionalNullable[int] = UNSET, + tags: OptionalNullable[List[str]] = UNSET, + color: OptionalNullable[str] = UNSET, + retention_notice: Optional[int] = 30, + sample_filename: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Create a new voice + + Create a new voice with a base64-encoded audio sample + + :param name: + :param sample_audio: Base64-encoded audio file + :param slug: + :param languages: + :param gender: + :param age: + :param tags: + :param color: + :param retention_notice: + :param sample_filename: Original filename for extension detection + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.VoiceCreateRequest( + name=name, + slug=slug, + languages=languages, + gender=gender, + age=age, + tags=tags, + color=color, + retention_notice=retention_notice, + sample_audio=sample_audio, + sample_filename=sample_filename, + ) + + req = self._build_request( + method="POST", + path="/v1/audio/voices", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.VoiceCreateRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_voice_v1_audio_voices_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_async( + self, + *, + name: str, + sample_audio: str, + slug: OptionalNullable[str] = UNSET, + languages: Optional[List[str]] = None, + gender: OptionalNullable[str] = UNSET, + age: OptionalNullable[int] = UNSET, + tags: OptionalNullable[List[str]] = UNSET, + color: OptionalNullable[str] = UNSET, + retention_notice: Optional[int] = 30, + sample_filename: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Create a new voice + + Create a new voice with a base64-encoded audio sample + + :param name: + :param sample_audio: Base64-encoded audio file + :param slug: + :param languages: + :param gender: + :param age: + :param tags: + :param color: + :param retention_notice: + :param sample_filename: Original filename for extension detection + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.VoiceCreateRequest( + name=name, + slug=slug, + languages=languages, + gender=gender, + age=age, + tags=tags, + color=color, + retention_notice=retention_notice, + sample_audio=sample_audio, + sample_filename=sample_filename, + ) + + req = self._build_request_async( + method="POST", + path="/v1/audio/voices", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.VoiceCreateRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="create_voice_v1_audio_voices_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete( + self, + *, + voice_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Delete a custom voice + + Delete a custom voice + + :param voice_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest( + voice_id=voice_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/audio/voices/{voice_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_voice_v1_audio_voices__voice_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + voice_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Delete a custom voice + + Delete a custom voice + + :param voice_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest( + voice_id=voice_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/audio/voices/{voice_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="delete_voice_v1_audio_voices__voice_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update( + self, + *, + voice_id: str, + name: OptionalNullable[str] = UNSET, + languages: OptionalNullable[List[str]] = UNSET, + gender: OptionalNullable[str] = UNSET, + age: OptionalNullable[int] = UNSET, + tags: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Update voice metadata + + Update voice metadata (name, gender, languages, age, tags). + + :param voice_id: + :param name: + :param languages: + :param gender: + :param age: + :param tags: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateVoiceV1AudioVoicesVoiceIDPatchRequest( + voice_id=voice_id, + voice_update_request=models.VoiceUpdateRequest( + name=name, + languages=languages, + gender=gender, + age=age, + tags=tags, + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/audio/voices/{voice_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.voice_update_request, + False, + False, + "json", + models.VoiceUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_voice_v1_audio_voices__voice_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + voice_id: str, + name: OptionalNullable[str] = UNSET, + languages: OptionalNullable[List[str]] = UNSET, + gender: OptionalNullable[str] = UNSET, + age: OptionalNullable[int] = UNSET, + tags: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Update voice metadata + + Update voice metadata (name, gender, languages, age, tags). + + :param voice_id: + :param name: + :param languages: + :param gender: + :param age: + :param tags: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateVoiceV1AudioVoicesVoiceIDPatchRequest( + voice_id=voice_id, + voice_update_request=models.VoiceUpdateRequest( + name=name, + languages=languages, + gender=gender, + age=age, + tags=tags, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/audio/voices/{voice_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.voice_update_request, + False, + False, + "json", + models.VoiceUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_voice_v1_audio_voices__voice_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get( + self, + *, + voice_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Get voice details + + Get voice details (excluding sample) + + :param voice_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetVoiceV1AudioVoicesVoiceIDGetRequest( + voice_id=voice_id, + ) + + req = self._build_request( + method="GET", + path="/v1/audio/voices/{voice_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_voice_v1_audio_voices__voice_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_async( + self, + *, + voice_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.VoiceResponse: + r"""Get voice details + + Get voice details (excluding sample) + + :param voice_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetVoiceV1AudioVoicesVoiceIDGetRequest( + voice_id=voice_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/audio/voices/{voice_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_voice_v1_audio_voices__voice_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.VoiceResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_sample_audio( + self, + *, + voice_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> str: + r"""Get voice sample audio + + Get the audio sample for a voice + + :param voice_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest( + voice_id=voice_id, + ) + + req = self._build_request( + method="GET", + path="/v1/audio/voices/{voice_id}/sample", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_voice_sample_audio_v1_audio_voices__voice_id__sample_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(str, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_sample_audio_async( + self, + *, + voice_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> str: + r"""Get voice sample audio + + Get the audio sample for a voice + + :param voice_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest( + voice_id=voice_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/audio/voices/{voice_id}/sample", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_voice_sample_audio_v1_audio_voices__voice_id__sample_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(str, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/uv.lock b/uv.lock index 00e7eb1c..0804af99 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.0.5" +version = "2.1.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 793c3ac8a973f27c9f7381b5d74395d1f59ecbfd Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:11:55 +0100 Subject: [PATCH 22/82] fix(extra): return ResponseFormatTypedDict from response_format_from_pydantic_model (#438) * fix(extra): return ResponseFormatTypedDict from response_format_from_pydantic_model response_format_from_pydantic_model now returns a ResponseFormatTypedDict (plain dict) instead of a ResponseFormat model instance. This fixes the type mismatch when passing the result to the Azure SDK, which expects its own ResponseFormat class, and avoids the schema alias data loss issue. Fixes AIR-143 / GitHub #367 * fix(examples): use ChatCompletionRequestTools1 type for tools list Fix mypy list invariance error introduced by SDK 2.1.0 regen where list[Tool] no longer satisfies the broadened tools union type. --- examples/mistral/chat/function_calling.py | 3 +- .../jobs/async_jobs_ocr_batch_annotation.py | 4 +-- src/mistralai/extra/run/context.py | 4 ++- src/mistralai/extra/tests/test_utils.py | 28 ++++++++----------- src/mistralai/extra/utils/response_format.py | 25 ++++++++++++----- 5 files changed, 36 insertions(+), 28 deletions(-) diff --git a/examples/mistral/chat/function_calling.py b/examples/mistral/chat/function_calling.py index 68e9d91c..9299a822 100644 --- a/examples/mistral/chat/function_calling.py +++ b/examples/mistral/chat/function_calling.py @@ -7,6 +7,7 @@ from mistralai.client.models import ( AssistantMessage, ChatCompletionRequestMessage, + ChatCompletionRequestTools1, Function, Tool, ToolMessage, @@ -48,7 +49,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st "retrieve_payment_date": functools.partial(retrieve_payment_date, data=data), } -tools: list[Tool] = [ +tools: list[ChatCompletionRequestTools1] = [ Tool( function=Function( name="retrieve_payment_status", diff --git a/examples/mistral/jobs/async_jobs_ocr_batch_annotation.py b/examples/mistral/jobs/async_jobs_ocr_batch_annotation.py index f209507d..8ddde775 100644 --- a/examples/mistral/jobs/async_jobs_ocr_batch_annotation.py +++ b/examples/mistral/jobs/async_jobs_ocr_batch_annotation.py @@ -29,9 +29,7 @@ def create_ocr_batch_request(custom_id: str, document_url: str) -> dict: "custom_id": custom_id, "body": { "document": {"type": "document_url", "document_url": document_url}, - "document_annotation_format": response_format.model_dump( - by_alias=True, exclude_none=True - ), + "document_annotation_format": response_format, "pages": [0, 1, 2, 3, 4, 5, 6, 7], "include_image_base64": False, }, diff --git a/src/mistralai/extra/run/context.py b/src/mistralai/extra/run/context.py index 7ade705f..d253edd5 100644 --- a/src/mistralai/extra/run/context.py +++ b/src/mistralai/extra/run/context.py @@ -243,7 +243,9 @@ async def prepare_model_request( def response_format(self) -> ResponseFormat: if not self.output_format: raise RunException("No response format exist for the current RunContext.") - return response_format_from_pydantic_model(self.output_format) + return ResponseFormat.model_validate( + response_format_from_pydantic_model(self.output_format) + ) async def _validate_run( diff --git a/src/mistralai/extra/tests/test_utils.py b/src/mistralai/extra/tests/test_utils.py index b0e5cdbc..a071b3ab 100644 --- a/src/mistralai/extra/tests/test_utils.py +++ b/src/mistralai/extra/tests/test_utils.py @@ -5,9 +5,6 @@ ) from pydantic import BaseModel, Field, ValidationError -from mistralai.client.models import ResponseFormat, JSONSchema -from mistralai.client.types.basemodel import Unset - import unittest @@ -55,15 +52,14 @@ class MathDemonstration(BaseModel): mathdemo_strict_schema["$defs"]["Explanation"]["additionalProperties"] = False # type: ignore mathdemo_strict_schema["additionalProperties"] = False -mathdemo_response_format = ResponseFormat( - type="json_schema", - json_schema=JSONSchema( - name="MathDemonstration", - schema_definition=mathdemo_strict_schema, - description=Unset(), - strict=True, - ), -) +mathdemo_response_format = { + "type": "json_schema", + "json_schema": { + "name": "MathDemonstration", + "schema": mathdemo_strict_schema, + "strict": True, + }, +} class TestResponseFormat(unittest.TestCase): @@ -220,10 +216,10 @@ class ModelWithConstraints(BaseModel): # Should not raise ValueError result = response_format_from_pydantic_model(ModelWithConstraints) - # Verify it returns a valid ResponseFormat - self.assertIsInstance(result, ResponseFormat) - self.assertEqual(result.type, "json_schema") - self.assertIsNotNone(result.json_schema) + # Verify it returns a valid response format dict + self.assertIsInstance(result, dict) + self.assertEqual(result.get("type"), "json_schema") + self.assertIsNotNone(result.get("json_schema")) def test_rec_strict_json_schema_with_invalid_type(self): """Test that rec_strict_json_schema raises ValueError for truly invalid types.""" diff --git a/src/mistralai/extra/utils/response_format.py b/src/mistralai/extra/utils/response_format.py index 2378b562..3600156b 100644 --- a/src/mistralai/extra/utils/response_format.py +++ b/src/mistralai/extra/utils/response_format.py @@ -1,7 +1,7 @@ -from typing import Any, TypeVar +from typing import Any, TypeVar, cast from pydantic import BaseModel -from mistralai.client.models import JSONSchema, ResponseFormat +from mistralai.client.models import ResponseFormatTypedDict from ._pydantic_helper import rec_strict_json_schema CustomPydanticModel = TypeVar("CustomPydanticModel", bound=BaseModel) @@ -9,13 +9,24 @@ def response_format_from_pydantic_model( model: type[CustomPydanticModel], -) -> ResponseFormat: - """Generate a strict JSON schema from a pydantic model.""" +) -> ResponseFormatTypedDict: + """Generate a strict JSON schema response format from a pydantic model. + + Returns a TypedDict compatible with both the main SDK's and Azure SDK's + ResponseFormat / ResponseFormatTypedDict. + """ model_schema = rec_strict_json_schema(model.model_json_schema()) - json_schema = JSONSchema.model_validate( - {"name": model.__name__, "schema": model_schema, "strict": True} + return cast( + ResponseFormatTypedDict, + { + "type": "json_schema", + "json_schema": { + "name": model.__name__, + "schema": model_schema, + "strict": True, + }, + }, ) - return ResponseFormat(type="json_schema", json_schema=json_schema) def pydantic_model_from_json( From 325c500ab656bc7e3c50dcab0a86a6c37e1ee5c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:21:34 +0100 Subject: [PATCH 23/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.1.1=20(#442)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.chat.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) * `mistral.fim.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) * `mistral.agents.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) * chore: align pyproject.toml and uv.lock to version 2.1.1 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 78 ++++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- docs/models/chatcompletionchoice.md | 10 -- docs/models/chatcompletionchoice1.md | 11 ++ docs/models/chatcompletionchoice2.md | 11 ++ ...d => chatcompletionchoicefinishreason1.md} | 6 +- .../chatcompletionchoicefinishreason2.md | 21 ++++ docs/models/chatcompletionchoiceunion.md | 17 +++ docs/models/chatcompletionresponse.md | 16 +-- docs/models/fimcompletionresponse.md | 16 +-- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/models/__init__.py | 35 ++++-- .../client/models/chatcompletionchoice.py | 34 ------ .../models/chatcompletionchoice_union.py | 110 ++++++++++++++++++ .../client/models/chatcompletionresponse.py | 9 +- .../client/models/fimcompletionresponse.py | 9 +- uv.lock | 2 +- 20 files changed, 294 insertions(+), 121 deletions(-) delete mode 100644 docs/models/chatcompletionchoice.md create mode 100644 docs/models/chatcompletionchoice1.md create mode 100644 docs/models/chatcompletionchoice2.md rename docs/models/{chatcompletionchoicefinishreason.md => chatcompletionchoicefinishreason1.md} (77%) create mode 100644 docs/models/chatcompletionchoicefinishreason2.md create mode 100644 docs/models/chatcompletionchoiceunion.md delete mode 100644 src/mistralai/client/models/chatcompletionchoice.py create mode 100644 src/mistralai/client/models/chatcompletionchoice_union.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f891a463..d44c268b 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 97b4909a97eae2c0d6eaef46534c47fe + docChecksum: 68426731e22b47ac547feb3144b7defb docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.1.0 - configChecksum: 80e45c1c992459e880bf8922d67376de + releaseVersion: 2.1.1 + configChecksum: 1dfcdfd9a3f484dd098a0bffb4d13d4d repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 0d66b97f-ad1d-4489-9f77-6ca1765f9ce1 - pristine_commit_hash: c67ab5cd232bd410d9ffc9e29934bbfcae4ff4bc - pristine_tree_hash: fcceae92cd99b9a1af03ae3448582d659765b2b2 + generation_id: 3bd5e5b5-16bb-4a97-9eeb-dfa952779f1a + pristine_commit_hash: 7166e430b976c667a0ec83f5c5791809dd2fc3a4 + pristine_tree_hash: 770f1e01cc9f7d6efbd9fe9350f0d688d21d2b4b features: python: acceptHeaders: 3.0.0 @@ -363,14 +363,26 @@ trackedFiles: id: 57b86771c870 last_write_checksum: sha1:bfd2fb8e2c83578ca0cea5209ea3f18c3bcd2ae5 pristine_git_object: ba9c95eab2c1e4f080e39e8804a5de222e052ee6 - docs/models/chatcompletionchoice.md: - id: 0d15c59ab501 - last_write_checksum: sha1:a6274a39a4239e054816d08517bf8507cb5c4564 - pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 - docs/models/chatcompletionchoicefinishreason.md: - id: 225764da91d3 - last_write_checksum: sha1:160ff1297bfbaa9158e575b8bd7ab573533c8f9f - pristine_git_object: c289272622b137541843bb4ba9654d0e1405ffec + docs/models/chatcompletionchoice1.md: + id: 00f3eec89329 + last_write_checksum: sha1:60653ac0761272bbae3a7732d7c7c36a107a67b0 + pristine_git_object: 269023f7a39ecd90dce9b5cb9c625bed679d4c88 + docs/models/chatcompletionchoice2.md: + id: e8badb5ca1ac + last_write_checksum: sha1:3e6b5c62c82b937bc0baad25fc21f6a1dcc55e54 + pristine_git_object: 274565e8b877d39ee383c1c971928f45c734b5f0 + docs/models/chatcompletionchoicefinishreason1.md: + id: a2cbd7d56a20 + last_write_checksum: sha1:99fee4a97c754027da16d9a780f9cc6512a25974 + pristine_git_object: f340dc9d81a16536d0ad09bf6578ae7e303d2d2e + docs/models/chatcompletionchoicefinishreason2.md: + id: 7f55ad364454 + last_write_checksum: sha1:615d829e68a6557d1e739060cb4ddd64d5b41335 + pristine_git_object: 51abd6c1c2e55222a8112109e4d798010c3294fd + docs/models/chatcompletionchoiceunion.md: + id: 0f8f08d07fbf + last_write_checksum: sha1:320f4323f22e7d1ad0eb5ae3ed9e312409c69f8c + pristine_git_object: c577759974759149a2a007793ec22bd7907ecfe4 docs/models/chatcompletionevent.md: id: fc1097c5bfe2 last_write_checksum: sha1:ef1f417581e943503acb38b503aedde3e157d934 @@ -413,8 +425,8 @@ trackedFiles: pristine_git_object: 48d8596d7caaf09e4773b80f451fb2bc16eab1d7 docs/models/chatcompletionresponse.md: id: 7c53b24681b9 - last_write_checksum: sha1:a56581c0846638cfe6df26d3045fb4f874ccd931 - pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b + last_write_checksum: sha1:0d7d8c74d7fe3919f9e41e5c7b37d23d74e73744 + pristine_git_object: 2cde9a3f657ab6f458f9fcddbd26b792a1b0871c docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 last_write_checksum: sha1:eae5eb85146e95ce4d3f76a362abfe29e4b40c5b @@ -1085,8 +1097,8 @@ trackedFiles: pristine_git_object: a0dbb00a82a03acc8b62b81d7597722a6ca46118 docs/models/fimcompletionresponse.md: id: 050d62ba2fac - last_write_checksum: sha1:a6101a69e83b7a5bcf96ec77ba1cab8748f734f4 - pristine_git_object: cd62d0349503fd8b13582d0ba47ab9cff40f6b28 + last_write_checksum: sha1:7cadd128b7684c078a0337b42f599dca2c585225 + pristine_git_object: 0d92cc8520882c56c587d1c851206a3172373fef docs/models/fimcompletionstreamrequest.md: id: c881d7e27637 last_write_checksum: sha1:f8755bc554dd44568c42eb5b6dde04db464647ab @@ -2469,8 +2481,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:0f1b33870c08333cd132d8c01758b393833fc34c - pristine_git_object: 72b2f9e5111fd416cdfb3ceb8dc3e69f834f2a4d + last_write_checksum: sha1:a814bf6ebf521181526a7a5a669ed2b5c87ed818 + pristine_git_object: 2ce42718554bf69f5c5780428ff8bf74e926063b src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -2601,8 +2613,8 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:fba31c478e24e28b21f8d42eb4071685b1937892 - pristine_git_object: 905fae94be27b73eb6af7bbdade00680ec970d22 + last_write_checksum: sha1:890d241c6f6b09a31715fd87696b183f1c2fc45f + pristine_git_object: 8363bb841d291bea962e9f75924de88b2e1def7e src/mistralai/client/models/agent.py: id: 1336849c84fb last_write_checksum: sha1:2574866d9855cb0b6314ac94ca288d59f3196c73 @@ -2807,10 +2819,10 @@ trackedFiles: id: afd9cdc71834 last_write_checksum: sha1:a29088359142ebd6409f45569168b2096014119e pristine_git_object: cf2aa78af3ffc747d557422b83551075b83e601d - src/mistralai/client/models/chatcompletionchoice.py: - id: 7e6a512f6a04 - last_write_checksum: sha1:de0281a258140f081012b303e3c14e0b42acdf63 - pristine_git_object: 2c515f6e9a290ebab43bae41e07493e4b99afe8f + src/mistralai/client/models/chatcompletionchoice_union.py: + id: 970941f980d1 + last_write_checksum: sha1:2d4851170d49a274d0ddee61cdbb10dc36bc5d2a + pristine_git_object: 0bd55d47d4b11728cd85228b401c3063875ee459 src/mistralai/client/models/chatcompletionevent.py: id: d85484d0205e last_write_checksum: sha1:b709e6f710b62fee646eb7d12b24d69125522088 @@ -2825,8 +2837,8 @@ trackedFiles: pristine_git_object: 558efb7618b259dae8262cb671c7dc39cbd4729e src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 - last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b - pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b + last_write_checksum: sha1:6adb894d14b6932f79d47b40d4801403f5aaedf6 + pristine_git_object: cdb7c37f2675eb70de7a3f3b9b5e3fc4b05abc94 src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 last_write_checksum: sha1:be41df80620c88cd1f3f93b9e9aa31d1aa238075 @@ -3293,8 +3305,8 @@ trackedFiles: pristine_git_object: 2ca34598854f3777430de33d2acf2fc45f27fbcc src/mistralai/client/models/fimcompletionresponse.py: id: b860d2ba771e - last_write_checksum: sha1:dffd5a7005999340f57eaa94e17b2c82ddc7fd90 - pristine_git_object: 1345a116b7855ab4b824cf0369c0a5281e44ea97 + last_write_checksum: sha1:4fe39c00b10e4d83f6b987393763b27d4610d799 + pristine_git_object: 441a913001ecec779c4c1ea569d7586450698e58 src/mistralai/client/models/fimcompletionstreamrequest.py: id: 1d1ee09f1913 last_write_checksum: sha1:338c8d224fa5739296fe0e1ea1c00e65fba30b99 @@ -6455,7 +6467,11 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.agents.update_version()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start_stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list_versions()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get_version()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.create()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart_stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.append_stream()`: \n * `request.completion_args.reasoning_effort` **Added**\n* `mistral.audio.voices.update()`: **Added**\n* `mistral.beta.conversations.append()`: \n * `request.completion_args.reasoning_effort` **Added**\n* `mistral.audio.voices.list()`: **Added**\n* `mistral.audio.speech.complete()`: **Added**\n* `mistral.models.retrieve()`: `response.union(base).capabilities.reasoning` **Added**\n* `mistral.models.list()`: `response.data[].union(base).capabilities.reasoning` **Added**\n* `mistral.audio.voices.get_sample_audio()`: **Added**\n* `mistral.audio.voices.get()`: **Added**\n* `mistral.audio.voices.delete()`: **Added**\n* `mistral.audio.voices.create()`: **Added**\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.chat.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) + * `mistral.fim.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) + * `mistral.agents.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 494a2afe..2547237b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.1.0 + version: 2.1.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ed3582cc..454dde75 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:4dfede971964b6bed279893ea59d78fb670e78c0f2492354ea25ffcdc4e56768 - sourceBlobDigest: sha256:54e2c0536c78ca593dc5f194cdd4994bf6a1d4f9e4b08e2f3c54c799b94ae414 + sourceRevisionDigest: sha256:07001643ff9c8cc14ad90b1339637698af0fcf923c6336398016ff927f825f2b + sourceBlobDigest: sha256:6566cab4050d1f6841c4717a5d0c91819dea84840d7c04b1194ca939aee3d8e7 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:4dfede971964b6bed279893ea59d78fb670e78c0f2492354ea25ffcdc4e56768 - sourceBlobDigest: sha256:54e2c0536c78ca593dc5f194cdd4994bf6a1d4f9e4b08e2f3c54c799b94ae414 + sourceRevisionDigest: sha256:07001643ff9c8cc14ad90b1339637698af0fcf923c6336398016ff927f825f2b + sourceBlobDigest: sha256:6566cab4050d1f6841c4717a5d0c91819dea84840d7c04b1194ca939aee3d8e7 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:8d36ae00a062a0cbcc58246c7afc169dd2b78d23553a46a0c33cbf771b251e61 + codeSamplesRevisionDigest: sha256:972495e91c76c3f044f7d71d8ccb55294421ddb6247c3e0b3dbd3c27490a7184 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/RELEASES.md b/RELEASES.md index 0da71cff..cea03081 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -458,4 +458,14 @@ Based on: ### Generated - [python v2.1.0] . ### Releases -- [PyPI v2.1.0] https://pypi.org/project/mistralai/2.1.0 - . \ No newline at end of file +- [PyPI v2.1.0] https://pypi.org/project/mistralai/2.1.0 - . + +## 2026-03-20 12:16:07 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.1] . +### Releases +- [PyPI v2.1.1] https://pypi.org/project/mistralai/2.1.1 - . \ No newline at end of file diff --git a/docs/models/chatcompletionchoice.md b/docs/models/chatcompletionchoice.md deleted file mode 100644 index deaa0ea0..00000000 --- a/docs/models/chatcompletionchoice.md +++ /dev/null @@ -1,10 +0,0 @@ -# ChatCompletionChoice - - -## Fields - -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [models.AssistantMessage](../models/assistantmessage.md) | :heavy_check_mark: | N/A | | -| `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file diff --git a/docs/models/chatcompletionchoice1.md b/docs/models/chatcompletionchoice1.md new file mode 100644 index 00000000..269023f7 --- /dev/null +++ b/docs/models/chatcompletionchoice1.md @@ -0,0 +1,11 @@ +# ChatCompletionChoice1 + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `index` | *int* | :heavy_check_mark: | N/A | 0 | +| `message` | [models.AssistantMessage](../models/assistantmessage.md) | :heavy_check_mark: | N/A | | +| `finish_reason` | [models.ChatCompletionChoiceFinishReason1](../models/chatcompletionchoicefinishreason1.md) | :heavy_check_mark: | N/A | stop | +| `messages` | List[[models.AssistantMessage](../models/assistantmessage.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/chatcompletionchoice2.md b/docs/models/chatcompletionchoice2.md new file mode 100644 index 00000000..274565e8 --- /dev/null +++ b/docs/models/chatcompletionchoice2.md @@ -0,0 +1,11 @@ +# ChatCompletionChoice2 + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `index` | *int* | :heavy_check_mark: | N/A | 0 | +| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | +| `finish_reason` | [models.ChatCompletionChoiceFinishReason2](../models/chatcompletionchoicefinishreason2.md) | :heavy_check_mark: | N/A | stop | +| `messages` | List[[models.AssistantMessage](../models/assistantmessage.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/chatcompletionchoicefinishreason.md b/docs/models/chatcompletionchoicefinishreason1.md similarity index 77% rename from docs/models/chatcompletionchoicefinishreason.md rename to docs/models/chatcompletionchoicefinishreason1.md index c2892726..f340dc9d 100644 --- a/docs/models/chatcompletionchoicefinishreason.md +++ b/docs/models/chatcompletionchoicefinishreason1.md @@ -1,12 +1,12 @@ -# ChatCompletionChoiceFinishReason +# ChatCompletionChoiceFinishReason1 ## Example Usage ```python -from mistralai.client.models import ChatCompletionChoiceFinishReason +from mistralai.client.models import ChatCompletionChoiceFinishReason1 # Open enum: unrecognized values are captured as UnrecognizedStr -value: ChatCompletionChoiceFinishReason = "stop" +value: ChatCompletionChoiceFinishReason1 = "stop" ``` diff --git a/docs/models/chatcompletionchoicefinishreason2.md b/docs/models/chatcompletionchoicefinishreason2.md new file mode 100644 index 00000000..51abd6c1 --- /dev/null +++ b/docs/models/chatcompletionchoicefinishreason2.md @@ -0,0 +1,21 @@ +# ChatCompletionChoiceFinishReason2 + +## Example Usage + +```python +from mistralai.client.models import ChatCompletionChoiceFinishReason2 + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ChatCompletionChoiceFinishReason2 = "stop" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"model_length"` +- `"error"` +- `"tool_calls"` diff --git a/docs/models/chatcompletionchoiceunion.md b/docs/models/chatcompletionchoiceunion.md new file mode 100644 index 00000000..c5777599 --- /dev/null +++ b/docs/models/chatcompletionchoiceunion.md @@ -0,0 +1,17 @@ +# ChatCompletionChoiceUnion + + +## Supported Types + +### `models.ChatCompletionChoice1` + +```python +value: models.ChatCompletionChoice1 = /* values here */ +``` + +### `models.ChatCompletionChoice2` + +```python +value: models.ChatCompletionChoice2 = /* values here */ +``` + diff --git a/docs/models/chatcompletionresponse.md b/docs/models/chatcompletionresponse.md index a0465ffb..2cde9a3f 100644 --- a/docs/models/chatcompletionresponse.md +++ b/docs/models/chatcompletionresponse.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | -| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | -| `model` | *str* | :heavy_check_mark: | N/A | mistral-small-latest | -| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | -| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | -| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | +| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | +| `model` | *str* | :heavy_check_mark: | N/A | mistral-small-latest | +| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | +| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | +| `choices` | List[[models.ChatCompletionChoiceUnion](../models/chatcompletionchoiceunion.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/fimcompletionresponse.md b/docs/models/fimcompletionresponse.md index cd62d034..0d92cc85 100644 --- a/docs/models/fimcompletionresponse.md +++ b/docs/models/fimcompletionresponse.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | -| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | -| `model` | *str* | :heavy_check_mark: | N/A | codestral-latest | -| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | -| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | -| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | +| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | +| `model` | *str* | :heavy_check_mark: | N/A | codestral-latest | +| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | +| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | +| `choices` | List[[models.ChatCompletionChoiceUnion](../models/chatcompletionchoiceunion.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 99cbca27..462d7b04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.1.0" +version = "2.1.1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 72b2f9e5..2ce42718 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.1.0" +__version__: str = "2.1.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.1.0 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.1.1 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 905fae94..8363bb84 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -196,10 +196,15 @@ ChatClassificationRequest, ChatClassificationRequestTypedDict, ) - from .chatcompletionchoice import ( - ChatCompletionChoice, - ChatCompletionChoiceFinishReason, - ChatCompletionChoiceTypedDict, + from .chatcompletionchoice_union import ( + ChatCompletionChoice1, + ChatCompletionChoice1TypedDict, + ChatCompletionChoice2, + ChatCompletionChoice2TypedDict, + ChatCompletionChoiceFinishReason1, + ChatCompletionChoiceFinishReason2, + ChatCompletionChoiceUnion, + ChatCompletionChoiceUnionTypedDict, ) from .chatcompletionevent import ( ChatCompletionEvent, @@ -1681,9 +1686,14 @@ "CampaignTypedDict", "ChatClassificationRequest", "ChatClassificationRequestTypedDict", - "ChatCompletionChoice", - "ChatCompletionChoiceFinishReason", - "ChatCompletionChoiceTypedDict", + "ChatCompletionChoice1", + "ChatCompletionChoice1TypedDict", + "ChatCompletionChoice2", + "ChatCompletionChoice2TypedDict", + "ChatCompletionChoiceFinishReason1", + "ChatCompletionChoiceFinishReason2", + "ChatCompletionChoiceUnion", + "ChatCompletionChoiceUnionTypedDict", "ChatCompletionEvent", "ChatCompletionEventExtraFields", "ChatCompletionEventExtraFieldsTypedDict", @@ -2769,9 +2779,14 @@ "CampaignTypedDict": ".campaign", "ChatClassificationRequest": ".chatclassificationrequest", "ChatClassificationRequestTypedDict": ".chatclassificationrequest", - "ChatCompletionChoice": ".chatcompletionchoice", - "ChatCompletionChoiceFinishReason": ".chatcompletionchoice", - "ChatCompletionChoiceTypedDict": ".chatcompletionchoice", + "ChatCompletionChoice1": ".chatcompletionchoice_union", + "ChatCompletionChoice1TypedDict": ".chatcompletionchoice_union", + "ChatCompletionChoice2": ".chatcompletionchoice_union", + "ChatCompletionChoice2TypedDict": ".chatcompletionchoice_union", + "ChatCompletionChoiceFinishReason1": ".chatcompletionchoice_union", + "ChatCompletionChoiceFinishReason2": ".chatcompletionchoice_union", + "ChatCompletionChoiceUnion": ".chatcompletionchoice_union", + "ChatCompletionChoiceUnionTypedDict": ".chatcompletionchoice_union", "ChatCompletionEvent": ".chatcompletionevent", "ChatCompletionEventExtraFields": ".chatcompletionevent", "ChatCompletionEventExtraFieldsTypedDict": ".chatcompletionevent", diff --git a/src/mistralai/client/models/chatcompletionchoice.py b/src/mistralai/client/models/chatcompletionchoice.py deleted file mode 100644 index 2c515f6e..00000000 --- a/src/mistralai/client/models/chatcompletionchoice.py +++ /dev/null @@ -1,34 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 7e6a512f6a04 - -from __future__ import annotations -from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from mistralai.client.types import BaseModel, UnrecognizedStr -from typing import Literal, Union -from typing_extensions import TypedDict - - -ChatCompletionChoiceFinishReason = Union[ - Literal[ - "stop", - "length", - "model_length", - "error", - "tool_calls", - ], - UnrecognizedStr, -] - - -class ChatCompletionChoiceTypedDict(TypedDict): - index: int - message: AssistantMessageTypedDict - finish_reason: ChatCompletionChoiceFinishReason - - -class ChatCompletionChoice(BaseModel): - index: int - - message: AssistantMessage - - finish_reason: ChatCompletionChoiceFinishReason diff --git a/src/mistralai/client/models/chatcompletionchoice_union.py b/src/mistralai/client/models/chatcompletionchoice_union.py new file mode 100644 index 00000000..0bd55d47 --- /dev/null +++ b/src/mistralai/client/models/chatcompletionchoice_union.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 970941f980d1 + +from __future__ import annotations +from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr +from pydantic import model_serializer +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +ChatCompletionChoiceFinishReason2 = Union[ + Literal[ + "stop", + "length", + "model_length", + "error", + "tool_calls", + ], + UnrecognizedStr, +] + + +class ChatCompletionChoice2TypedDict(TypedDict): + index: int + finish_reason: ChatCompletionChoiceFinishReason2 + messages: List[AssistantMessageTypedDict] + message: NotRequired[AssistantMessageTypedDict] + + +class ChatCompletionChoice2(BaseModel): + index: int + + finish_reason: ChatCompletionChoiceFinishReason2 + + messages: List[AssistantMessage] + + message: Optional[AssistantMessage] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +ChatCompletionChoiceFinishReason1 = Union[ + Literal[ + "stop", + "length", + "model_length", + "error", + "tool_calls", + ], + UnrecognizedStr, +] + + +class ChatCompletionChoice1TypedDict(TypedDict): + index: int + message: AssistantMessageTypedDict + finish_reason: ChatCompletionChoiceFinishReason1 + messages: NotRequired[List[AssistantMessageTypedDict]] + + +class ChatCompletionChoice1(BaseModel): + index: int + + message: AssistantMessage + + finish_reason: ChatCompletionChoiceFinishReason1 + + messages: Optional[List[AssistantMessage]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["messages"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +ChatCompletionChoiceUnionTypedDict = TypeAliasType( + "ChatCompletionChoiceUnionTypedDict", + Union[ChatCompletionChoice1TypedDict, ChatCompletionChoice2TypedDict], +) + + +ChatCompletionChoiceUnion = TypeAliasType( + "ChatCompletionChoiceUnion", Union[ChatCompletionChoice1, ChatCompletionChoice2] +) diff --git a/src/mistralai/client/models/chatcompletionresponse.py b/src/mistralai/client/models/chatcompletionresponse.py index 7092bbc1..cdb7c37f 100644 --- a/src/mistralai/client/models/chatcompletionresponse.py +++ b/src/mistralai/client/models/chatcompletionresponse.py @@ -2,7 +2,10 @@ # @generated-id: 669d996b8e82 from __future__ import annotations -from .chatcompletionchoice import ChatCompletionChoice, ChatCompletionChoiceTypedDict +from .chatcompletionchoice_union import ( + ChatCompletionChoiceUnion, + ChatCompletionChoiceUnionTypedDict, +) from .usageinfo import UsageInfo, UsageInfoTypedDict from mistralai.client.types import BaseModel from typing import List @@ -15,7 +18,7 @@ class ChatCompletionResponseTypedDict(TypedDict): model: str usage: UsageInfoTypedDict created: int - choices: List[ChatCompletionChoiceTypedDict] + choices: List[ChatCompletionChoiceUnionTypedDict] class ChatCompletionResponse(BaseModel): @@ -29,4 +32,4 @@ class ChatCompletionResponse(BaseModel): created: int - choices: List[ChatCompletionChoice] + choices: List[ChatCompletionChoiceUnion] diff --git a/src/mistralai/client/models/fimcompletionresponse.py b/src/mistralai/client/models/fimcompletionresponse.py index 1345a116..441a9130 100644 --- a/src/mistralai/client/models/fimcompletionresponse.py +++ b/src/mistralai/client/models/fimcompletionresponse.py @@ -2,7 +2,10 @@ # @generated-id: b860d2ba771e from __future__ import annotations -from .chatcompletionchoice import ChatCompletionChoice, ChatCompletionChoiceTypedDict +from .chatcompletionchoice_union import ( + ChatCompletionChoiceUnion, + ChatCompletionChoiceUnionTypedDict, +) from .usageinfo import UsageInfo, UsageInfoTypedDict from mistralai.client.types import BaseModel from typing import List @@ -15,7 +18,7 @@ class FIMCompletionResponseTypedDict(TypedDict): model: str usage: UsageInfoTypedDict created: int - choices: List[ChatCompletionChoiceTypedDict] + choices: List[ChatCompletionChoiceUnionTypedDict] class FIMCompletionResponse(BaseModel): @@ -29,4 +32,4 @@ class FIMCompletionResponse(BaseModel): created: int - choices: List[ChatCompletionChoice] + choices: List[ChatCompletionChoiceUnion] diff --git a/uv.lock b/uv.lock index 0804af99..576da6b0 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.1.0" +version = "2.1.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From ec0e7c4f2a35a1df0b63ca6ab68ffa871dc796d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:15:01 +0100 Subject: [PATCH 24/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.1.2=20(#444)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.conversations.start()`: * `request.tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.list()`: `response.[].union(ModelConversation).tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.get()`: `response.union(ModelConversation).tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.start_stream()`: * `request.tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.create()`: * `request.tools[]` **Changed** (Breaking ⚠️) * `response.tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.list()`: `response.[].tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.get()`: `response.tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.update()`: * `request.tools[]` **Changed** (Breaking ⚠️) * `response.tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.update_version()`: `response.tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.list_versions()`: `response.[].tools[]` **Changed** (Breaking ⚠️) * `mistral.beta.agents.get_version()`: `response.tools[]` **Changed** (Breaking ⚠️) * `mistral.chat.complete()`: * `request` **Changed** (Breaking ⚠️) * `response.choices[]` **Changed** (Breaking ⚠️) * `mistral.chat.stream()`: `request` **Changed** (Breaking ⚠️) * `mistral.fim.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) * `mistral.agents.complete()`: * `request` **Changed** (Breaking ⚠️) * `response.choices[]` **Changed** (Breaking ⚠️) * `mistral.agents.stream()`: `request` **Changed** (Breaking ⚠️) * chore: align pyproject.toml and uv.lock to version 2.1.2 * chore: trigger CI * fix(examples): revert to list[Tool] now that ChatCompletionRequestTools1 is removed * chore: retrigger CI --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action Co-authored-by: Louis Sanna --- .speakeasy/gen.lock | 266 +++++++----------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 8 - README.md | 8 - RELEASES.md | 12 +- USAGE.md | 8 - docs/models/agentscompletionrequest.md | 5 +- docs/models/agentscompletionrequesttools1.md | 47 ---- docs/models/agentscompletionrequesttools2.md | 17 -- docs/models/agentscompletionstreamrequest.md | 5 +- .../agentscompletionstreamrequesttools1.md | 47 ---- .../agentscompletionstreamrequesttools2.md | 17 -- docs/models/basefielddefinition.md | 14 +- docs/models/chatcompletionchoice.md | 10 + docs/models/chatcompletionchoice1.md | 11 - docs/models/chatcompletionchoice2.md | 11 - ...md => chatcompletionchoicefinishreason.md} | 6 +- .../chatcompletionchoicefinishreason2.md | 21 -- docs/models/chatcompletionchoiceunion.md | 17 -- docs/models/chatcompletionrequest.md | 5 +- docs/models/chatcompletionrequesttools1.md | 47 ---- docs/models/chatcompletionrequesttools2.md | 19 -- docs/models/chatcompletionresponse.md | 16 +- docs/models/chatcompletionstreamrequest.md | 5 +- .../chatcompletionstreamrequesttools1.md | 47 ---- .../chatcompletionstreamrequesttools2.md | 19 -- docs/models/codeinterpretertool.md | 8 +- docs/models/codeinterpretertooltype.md | 13 - docs/models/customconnector.md | 2 +- docs/models/customconnectortype.md | 13 - docs/models/documentlibrarytool.md | 10 +- docs/models/documentlibrarytooltype.md | 13 - docs/models/fimcompletionresponse.md | 16 +- docs/models/imagegenerationtool.md | 8 +- docs/models/imagegenerationtooltype.md | 13 - ...basefielddefinitiontype.md => typeenum.md} | 6 +- docs/models/websearchpremiumtool.md | 8 +- docs/models/websearchpremiumtooltype.md | 13 - docs/models/websearchtool.md | 2 +- docs/models/websearchtooltype.md | 13 - docs/sdks/agents/README.md | 10 +- docs/sdks/chat/README.md | 10 +- examples/mistral/chat/function_calling.py | 3 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/agents.py | 48 +--- src/mistralai/client/chat.py | 48 +--- src/mistralai/client/models/__init__.py | 122 ++------ .../client/models/agentscompletionrequest.py | 69 +---- .../models/agentscompletionstreamrequest.py | 69 +---- .../client/models/basefielddefinition.py | 6 +- .../client/models/chatcompletionchoice.py | 34 +++ .../models/chatcompletionchoice_union.py | 110 -------- .../client/models/chatcompletionrequest.py | 70 +---- .../client/models/chatcompletionresponse.py | 9 +- .../models/chatcompletionstreamrequest.py | 71 +---- .../client/models/codeinterpretertool.py | 28 +- .../client/models/conversationrequest.py | 20 +- .../models/conversationstreamrequest.py | 20 +- .../client/models/createagentrequest.py | 19 +- .../client/models/customconnector.py | 24 +- .../client/models/documentlibrarytool.py | 28 +- .../client/models/fimcompletionresponse.py | 9 +- .../client/models/imagegenerationtool.py | 28 +- .../client/models/updateagentrequest.py | 19 +- .../client/models/websearchpremiumtool.py | 28 +- src/mistralai/client/models/websearchtool.py | 25 +- uv.lock | 2 +- 69 files changed, 427 insertions(+), 1346 deletions(-) delete mode 100644 docs/models/agentscompletionrequesttools1.md delete mode 100644 docs/models/agentscompletionrequesttools2.md delete mode 100644 docs/models/agentscompletionstreamrequesttools1.md delete mode 100644 docs/models/agentscompletionstreamrequesttools2.md create mode 100644 docs/models/chatcompletionchoice.md delete mode 100644 docs/models/chatcompletionchoice1.md delete mode 100644 docs/models/chatcompletionchoice2.md rename docs/models/{chatcompletionchoicefinishreason1.md => chatcompletionchoicefinishreason.md} (77%) delete mode 100644 docs/models/chatcompletionchoicefinishreason2.md delete mode 100644 docs/models/chatcompletionchoiceunion.md delete mode 100644 docs/models/chatcompletionrequesttools1.md delete mode 100644 docs/models/chatcompletionrequesttools2.md delete mode 100644 docs/models/chatcompletionstreamrequesttools1.md delete mode 100644 docs/models/chatcompletionstreamrequesttools2.md delete mode 100644 docs/models/codeinterpretertooltype.md delete mode 100644 docs/models/customconnectortype.md delete mode 100644 docs/models/documentlibrarytooltype.md delete mode 100644 docs/models/imagegenerationtooltype.md rename docs/models/{basefielddefinitiontype.md => typeenum.md} (67%) delete mode 100644 docs/models/websearchpremiumtooltype.md delete mode 100644 docs/models/websearchtooltype.md create mode 100644 src/mistralai/client/models/chatcompletionchoice.py delete mode 100644 src/mistralai/client/models/chatcompletionchoice_union.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index d44c268b..943cbc20 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 68426731e22b47ac547feb3144b7defb + docChecksum: b5e9004e334f10e92bcdd2dda5add214 docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.1.1 - configChecksum: 1dfcdfd9a3f484dd098a0bffb4d13d4d + releaseVersion: 2.1.2 + configChecksum: eae98dd1cf81d8778436fcccb0cf416a repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 3bd5e5b5-16bb-4a97-9eeb-dfa952779f1a - pristine_commit_hash: 7166e430b976c667a0ec83f5c5791809dd2fc3a4 - pristine_tree_hash: 770f1e01cc9f7d6efbd9fe9350f0d688d21d2b4b + generation_id: 5d5e9fc0-fa6b-4de0-a07a-341d5253e0bf + pristine_commit_hash: 71e334fc50f03122723915e87292d042754cf256 + pristine_tree_hash: 707ae8319edbeab9bafba92a056d810909f31a61 features: python: acceptHeaders: 3.0.0 @@ -61,8 +61,8 @@ trackedFiles: deleted: true USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:f2758c4f177674158f30097fae8d916be6bfb5c5 - pristine_git_object: fc624708474f8088a1f0855a668940f0a0a0c82a + last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f + pristine_git_object: 9d32240a60c8885479c95388bb81c8024b5604ff docs/errors/httpvalidationerror.md: id: 7fe2e5327e07 last_write_checksum: sha1:277a46811144643262651853dc6176d21b33573e @@ -185,8 +185,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:9a3b0e6dfc62cda48bb2b2772217d7748aa814c3 - pristine_git_object: 119c4bc807ffe4a09227afa3a8e3f67ee096d7b2 + last_write_checksum: sha1:7932ecb14b0e32f46e5a4b97c83581ecdca53ddf + pristine_git_object: 99f47f5cedb79f44393f0cdb3c9a26660500cdee docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -199,18 +199,10 @@ trackedFiles: id: bd8a6f9fbb47 last_write_checksum: sha1:f3d9ec3c82b6bbd2c3cbc320a71b927edcc292b1 pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 - docs/models/agentscompletionrequesttools1.md: - id: 85a79f0c6360 - last_write_checksum: sha1:0054d7ad7f3ce10edacad90fec077fe23317b4db - pristine_git_object: 61eb3257a7dc73e56d715706e12a4537bbf49a71 - docs/models/agentscompletionrequesttools2.md: - id: 7362c1585f5a - last_write_checksum: sha1:ba51c8d83f2ccf84e04d8c37820072466411cb2c - pristine_git_object: 5c1a4bc4623a792049766c8a3ab5613b23018b93 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:ac5e5e5e54035c79f0b3397f6b4b81080437c112 - pristine_git_object: ee24b68b31370c0ca7af388066056002f5f075cb + last_write_checksum: sha1:021b53d01c8f46c2a074defbb08736752e99ad9c + pristine_git_object: d5455230b1b5d640c19e1ee0f1c29361674077a7 docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -223,14 +215,6 @@ trackedFiles: id: b1f76f7a4e1c last_write_checksum: sha1:843c4946d5cab61df2cba458af40835c4e8bcafe pristine_git_object: 4354523a7d0d21721a96e91938b89236169ccced - docs/models/agentscompletionstreamrequesttools1.md: - id: 040d16e34648 - last_write_checksum: sha1:7c1cafca6e8b68175130ab8a8faba5bfdbf5a588 - pristine_git_object: fef7e190cc23e9ac6951e12f0de321ddb0a4bfeb - docs/models/agentscompletionstreamrequesttools2.md: - id: d996c51a1957 - last_write_checksum: sha1:323be3ad4250f3144a1a39c202be981c0e95a551 - pristine_git_object: d90093593cae6edb5bc4d706b165f9efdd54b0b9 docs/models/agenttool.md: id: 513b8b7bc0b7 last_write_checksum: sha1:8dedf7bcaa05492689ce0828e5644380258d5a7e @@ -317,12 +301,8 @@ trackedFiles: pristine_git_object: f8401a8e26c3d54aa47a1a6cc265050f0a4afc80 docs/models/basefielddefinition.md: id: f9e0bbae859b - last_write_checksum: sha1:fea96b146e5696ff3b93e6b6529fe4ace90616aa - pristine_git_object: 3d721d91572e4cdb8d5de5a2cdd294693f552d73 - docs/models/basefielddefinitiontype.md: - id: e0678603f859 - last_write_checksum: sha1:4c79afbbc22081d7ac18c3de963b92dd2dca0069 - pristine_git_object: efdff2a4bf26336c8f1880683fb2d798ee2d630d + last_write_checksum: sha1:28a4d2774231873af97debedcf2fba4f49e83bf2 + pristine_git_object: 3f7abea981c142e1fb1ba993a10dbd0e347b2df2 docs/models/basemodelcard.md: id: 2f62bfbd650e last_write_checksum: sha1:d42dfe36b103ee95f55e91ac306e3179060dfb3f @@ -363,26 +343,14 @@ trackedFiles: id: 57b86771c870 last_write_checksum: sha1:bfd2fb8e2c83578ca0cea5209ea3f18c3bcd2ae5 pristine_git_object: ba9c95eab2c1e4f080e39e8804a5de222e052ee6 - docs/models/chatcompletionchoice1.md: - id: 00f3eec89329 - last_write_checksum: sha1:60653ac0761272bbae3a7732d7c7c36a107a67b0 - pristine_git_object: 269023f7a39ecd90dce9b5cb9c625bed679d4c88 - docs/models/chatcompletionchoice2.md: - id: e8badb5ca1ac - last_write_checksum: sha1:3e6b5c62c82b937bc0baad25fc21f6a1dcc55e54 - pristine_git_object: 274565e8b877d39ee383c1c971928f45c734b5f0 - docs/models/chatcompletionchoicefinishreason1.md: - id: a2cbd7d56a20 - last_write_checksum: sha1:99fee4a97c754027da16d9a780f9cc6512a25974 - pristine_git_object: f340dc9d81a16536d0ad09bf6578ae7e303d2d2e - docs/models/chatcompletionchoicefinishreason2.md: - id: 7f55ad364454 - last_write_checksum: sha1:615d829e68a6557d1e739060cb4ddd64d5b41335 - pristine_git_object: 51abd6c1c2e55222a8112109e4d798010c3294fd - docs/models/chatcompletionchoiceunion.md: - id: 0f8f08d07fbf - last_write_checksum: sha1:320f4323f22e7d1ad0eb5ae3ed9e312409c69f8c - pristine_git_object: c577759974759149a2a007793ec22bd7907ecfe4 + docs/models/chatcompletionchoice.md: + id: 0d15c59ab501 + last_write_checksum: sha1:a6274a39a4239e054816d08517bf8507cb5c4564 + pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 + docs/models/chatcompletionchoicefinishreason.md: + id: 225764da91d3 + last_write_checksum: sha1:160ff1297bfbaa9158e575b8bd7ab573533c8f9f + pristine_git_object: c289272622b137541843bb4ba9654d0e1405ffec docs/models/chatcompletionevent.md: id: fc1097c5bfe2 last_write_checksum: sha1:ef1f417581e943503acb38b503aedde3e157d934 @@ -401,8 +369,8 @@ trackedFiles: pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:8bc525398b3e06d486d3e759c3221c59d41c00c5 - pristine_git_object: 14e860db0f75b41d9f9316a2d65434215c8831b6 + last_write_checksum: sha1:9979175951fd1540db1660f0c3494217b80cde61 + pristine_git_object: d335f908276165dfc7d1b92f55ff246fcf6d2e8a docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -415,22 +383,14 @@ trackedFiles: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 pristine_git_object: dc82a8ef91e7bfd44f1d2d9d9a4ef61b6e76cc34 - docs/models/chatcompletionrequesttools1.md: - id: e811358cf0a2 - last_write_checksum: sha1:492a8d95f6882b77e928e7cd1478c5501ff47dfd - pristine_git_object: 9926c6d56335a618b2dd52e0de80a6e572cfdab5 - docs/models/chatcompletionrequesttools2.md: - id: e11c129a790e - last_write_checksum: sha1:d6a8fb76c8c6f8ebe88b6bebc688c93b87f99faf - pristine_git_object: 48d8596d7caaf09e4773b80f451fb2bc16eab1d7 docs/models/chatcompletionresponse.md: id: 7c53b24681b9 - last_write_checksum: sha1:0d7d8c74d7fe3919f9e41e5c7b37d23d74e73744 - pristine_git_object: 2cde9a3f657ab6f458f9fcddbd26b792a1b0871c + last_write_checksum: sha1:a56581c0846638cfe6df26d3045fb4f874ccd931 + pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:eae5eb85146e95ce4d3f76a362abfe29e4b40c5b - pristine_git_object: b5f35a5ab4cdfeccbb2bc3219168c59103c6b8b7 + last_write_checksum: sha1:213564d7a2848ad3d390419c7e12a6b11c79982a + pristine_git_object: 9d50902fe8205ab7fc646074509a1ebf5e480eab docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -443,14 +403,6 @@ trackedFiles: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 pristine_git_object: 43f3ca3809bf1a2a040e2ad7c19a2b22db0b73f8 - docs/models/chatcompletionstreamrequesttools1.md: - id: 97ecbd5846d6 - last_write_checksum: sha1:d10c00e0bf94342d2e0c54f5a61452f934e8da3d - pristine_git_object: fb7a968bffd4a4542338fcfcfa3747ff6e1d32aa - docs/models/chatcompletionstreamrequesttools2.md: - id: a5c63583cb81 - last_write_checksum: sha1:5009ab4f4518fde936e13c549d994263ce2fc571 - pristine_git_object: 273651d8326bc5ec3f4ff80592867ecd5a2b038d docs/models/chatmoderationrequest.md: id: 22862d4d20ec last_write_checksum: sha1:9bbe510ee67515092bd953ad7f84ae118398af54 @@ -533,12 +485,8 @@ trackedFiles: pristine_git_object: 3b6f3be6942bbcf56261f773864a518d16923880 docs/models/codeinterpretertool.md: id: f009740c6e54 - last_write_checksum: sha1:8f6a07297073cd031b5b2cde48f8f5dc33eca3b9 - pristine_git_object: 9fd6a90785e11593a5ab18d873c2e8974f687615 - docs/models/codeinterpretertooltype.md: - id: d6d0f83de515 - last_write_checksum: sha1:55c1ace70ca09529d03e6fcb4e37aabbf3f2f45e - pristine_git_object: 7f95f5da826c18822176e477d26f8a5a3e05a05b + last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad + pristine_git_object: 6302fc627d7c49442b6c9aec19c70fdceaf7c519 docs/models/completionargs.md: id: 3b54534f9830 last_write_checksum: sha1:3629a70a095750b82bc60a80c0a2b3e3496bafba @@ -853,12 +801,8 @@ trackedFiles: pristine_git_object: 71562806dbec6444dcdd0a19852a31ca00b6229a docs/models/customconnector.md: id: 7bcc77607afa - last_write_checksum: sha1:542fe858ababf1d56024d1766e68f6d388d6e874 - pristine_git_object: d238eb5f86a00cf51b3146dc482cb378c9711bc4 - docs/models/customconnectortype.md: - id: 8918c5e0ca8d - last_write_checksum: sha1:82bad5f8c0b4e4c2a11da24dd8cc51f59aa1e29e - pristine_git_object: e2c8e0e03434843dc7ecd2413e7d4c5d647364af + last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a + pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 docs/models/dataset.md: id: 31af4d237e19 last_write_checksum: sha1:073fa9a0b7891ccd9b6ae64ba960d74eeb5c9007 @@ -925,12 +869,8 @@ trackedFiles: pristine_git_object: 42c639a6a9b235ab4c754286486fa7e8872a0e7e docs/models/documentlibrarytool.md: id: 68083b0ef8f3 - last_write_checksum: sha1:00eac0753cc8f509d9f3b560cdd302537fc492df - pristine_git_object: d22ff33a9697700fb605ed661d2c70179c3b75a5 - docs/models/documentlibrarytooltype.md: - id: 23c5ba5c4b3f - last_write_checksum: sha1:c8a4364d8a80b94d81c70a8202bde70763bd6acf - pristine_git_object: 945452e3807b1aceae15ee0015f53c347b3636b7 + last_write_checksum: sha1:76b9f47c399915a338abe929cb10c1b37282eadf + pristine_git_object: 95c3fa52ee3ff29e72bc0240a98c0afaa0cd5f62 docs/models/documenttextcontent.md: id: 29587399f346 last_write_checksum: sha1:93382da0228027a02501abbcf681f247814d3d68 @@ -1097,8 +1037,8 @@ trackedFiles: pristine_git_object: a0dbb00a82a03acc8b62b81d7597722a6ca46118 docs/models/fimcompletionresponse.md: id: 050d62ba2fac - last_write_checksum: sha1:7cadd128b7684c078a0337b42f599dca2c585225 - pristine_git_object: 0d92cc8520882c56c587d1c851206a3172373fef + last_write_checksum: sha1:a6101a69e83b7a5bcf96ec77ba1cab8748f734f4 + pristine_git_object: cd62d0349503fd8b13582d0ba47ab9cff40f6b28 docs/models/fimcompletionstreamrequest.md: id: c881d7e27637 last_write_checksum: sha1:f8755bc554dd44568c42eb5b6dde04db464647ab @@ -1273,12 +1213,8 @@ trackedFiles: pristine_git_object: bd7ea1fe08f2fcc737d6951a44584e22578ed9ba docs/models/imagegenerationtool.md: id: d5deb6b06d28 - last_write_checksum: sha1:782948e17f9e3119910eef09ddecf74b13b2735a - pristine_git_object: 93edbbf8a8139d2029b46e2379ae88bb85a9972d - docs/models/imagegenerationtooltype.md: - id: fc670aabaff7 - last_write_checksum: sha1:fdb97734f6943a163affd2eb69e861d574d1afbf - pristine_git_object: 7763ca21563d123dae99f6dc8899163a035e2db0 + last_write_checksum: sha1:a1813ef99e4a0990fd073bb2311c475e88072029 + pristine_git_object: b476b6f2733a49767d7f7a4ad091fc321ab514f4 docs/models/imageurl.md: id: e75dd23cec1d last_write_checksum: sha1:a5cf621ce58a9cc7c96afa7de53367eac7b4cb0b @@ -2223,6 +2159,10 @@ trackedFiles: id: 69a13554b554 last_write_checksum: sha1:d969f462034ed356f2c8713b601ee7d873d4ce07 pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d + docs/models/typeenum.md: + id: d306d1d601a4 + last_write_checksum: sha1:f0f0bfac75bf5e5fcd972d0cb196961d512d40ad + pristine_git_object: ec47cf9668f839469c9ab71c010f3e1975be929c docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 @@ -2341,28 +2281,20 @@ trackedFiles: pristine_git_object: d12bc31191ba534a9744d78f657c19e7f93f777a docs/models/websearchpremiumtool.md: id: 267988aa8c3f - last_write_checksum: sha1:2b9723ebee6793f1fef80a17b7f08695af1555f7 - pristine_git_object: 27951776158b6dc07c1a1e175aad6874bca3ea1d - docs/models/websearchpremiumtooltype.md: - id: c70fa6b0ee9f - last_write_checksum: sha1:4892fd886ef09e8ace205a636292aea727720628 - pristine_git_object: e4f3d7bf27593f99fb344a27d6149ff280dd9001 + last_write_checksum: sha1:38f80a43f73a13ddedc7730f853c092a48b665f9 + pristine_git_object: 78b736cd314617caa0d77f3c42015212e37ab539 docs/models/websearchtool.md: id: fc4df52fb9b5 - last_write_checksum: sha1:c84ff90f03fe964d4e3b77958dccaadeac89c127 - pristine_git_object: 5dfd8c22c4434003e77a772df2642032891da0e6 - docs/models/websearchtooltype.md: - id: 6591e569c4f3 - last_write_checksum: sha1:961d8f5e9aaaaa88150f4164a871cf06dfdcbb84 - pristine_git_object: 89af0c4da9b28107e6e938b2289b25388285e2a2 + last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 + pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 docs/sdks/accesses/README.md: id: 2ea167c2eff2 last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:8af2c47744428babaed655bbfb984964c64d6b4e - pristine_git_object: 76d6a57c19f09d951bd328bbcd0338e0d41cf625 + last_write_checksum: sha1:95844e1e50f850f71580e08ed9cd1ffdefa899bc + pristine_git_object: 46fb60ef4f92d61b2959f1b67e5f07e5bae55ba7 docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:b4b3123ff210545048e2b0c729f2b7e5f7460f4e @@ -2377,8 +2309,8 @@ trackedFiles: pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:c6cf1a026f4717962ef50c3deb014bd39d37e2f4 - pristine_git_object: 6d7d00075f8a1419f5e46f83dee5994f3a9ef08a + last_write_checksum: sha1:8527d41d1095e052f0b71a9e5f7075f0a722447f + pristine_git_object: 61c8813f3f168bf958edadd985875498e5205497 docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -2481,16 +2413,16 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:a814bf6ebf521181526a7a5a669ed2b5c87ed818 - pristine_git_object: 2ce42718554bf69f5c5780428ff8bf74e926063b + last_write_checksum: sha1:d7a3abfbd260f39e87a405377e56d9dd8a48439f + pristine_git_object: a5ba9a2a6bcff1a4b62db94c38d18b40c88813cc src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:bb272f94ff3e2bd86ef4aa5ec036c499951bc4a0 - pristine_git_object: 8ac699623e8bb88b545eb34e715bc2d50e40e069 + last_write_checksum: sha1:bd526b7613c13f07adee931996ec7fed54e72f26 + pristine_git_object: 2e91dd04aa66e340db8fe61ee8f04abf67798eaf src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd @@ -2521,8 +2453,8 @@ trackedFiles: pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:5dde26716e632c3c84faf33cc4b6eb187dff2928 - pristine_git_object: 8c73bdc9a0e2f6bf41bc3abf0576e215467fa4dd + last_write_checksum: sha1:dced89ea82a30a61e0c62db2f2a0c3be8a7ba099 + pristine_git_object: c11a53d1237c284ff74b5aba791bd405bac2d0ff src/mistralai/client/chat_completion_events.py: id: 1813f339625b last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 @@ -2613,8 +2545,8 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:890d241c6f6b09a31715fd87696b183f1c2fc45f - pristine_git_object: 8363bb841d291bea962e9f75924de88b2e1def7e + last_write_checksum: sha1:a1e0aa6e1959ee7380d30eea984d79bcd84a6203 + pristine_git_object: 05756e5b68c67b3697636bc49939edc6e5b701e8 src/mistralai/client/models/agent.py: id: 1336849c84fb last_write_checksum: sha1:2574866d9855cb0b6314ac94ca288d59f3196c73 @@ -2717,12 +2649,12 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:150523bb6aca6d81e3e6d4c78a6a93a536f7b4ac - pristine_git_object: 527d6230d4e42da8de2b3b3d114b7eb62e679049 + last_write_checksum: sha1:87237462a5289c5aac2d1ce59b8b766342dd5ccd + pristine_git_object: f4ce34cb614a992f5276a1664d05426b2b16766a src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:b0f62e7e88f6c73c4be95dbefe3af158f5c8b074 - pristine_git_object: 483ec99c0df4db5a0f154da14cdc0b9070d0fd7a + last_write_checksum: sha1:a449cb9287617ba7337a73777b7ab50479e7cd87 + pristine_git_object: 0feb38038f5aec52bb393c633a0913b99b1579a7 src/mistralai/client/models/annotations.py: id: 3ae9e07de11d last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 @@ -2777,8 +2709,8 @@ trackedFiles: pristine_git_object: 1f5a6639b3fae3a5c96cf35bc4417d5d5151a37f src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:a323bc4117cecf4ffcb228cf896e7ceae02f9b6d - pristine_git_object: acf9cf8d6fc3220f736b7c6cfe32d42425febd2a + last_write_checksum: sha1:7d7b08ba19500836193c593bacc1dd6982c9ef71 + pristine_git_object: b57ff2cab05c7a2a7f10292ff1c017eb58a10f84 src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e @@ -2819,10 +2751,10 @@ trackedFiles: id: afd9cdc71834 last_write_checksum: sha1:a29088359142ebd6409f45569168b2096014119e pristine_git_object: cf2aa78af3ffc747d557422b83551075b83e601d - src/mistralai/client/models/chatcompletionchoice_union.py: - id: 970941f980d1 - last_write_checksum: sha1:2d4851170d49a274d0ddee61cdbb10dc36bc5d2a - pristine_git_object: 0bd55d47d4b11728cd85228b401c3063875ee459 + src/mistralai/client/models/chatcompletionchoice.py: + id: 7e6a512f6a04 + last_write_checksum: sha1:de0281a258140f081012b303e3c14e0b42acdf63 + pristine_git_object: 2c515f6e9a290ebab43bae41e07493e4b99afe8f src/mistralai/client/models/chatcompletionevent.py: id: d85484d0205e last_write_checksum: sha1:b709e6f710b62fee646eb7d12b24d69125522088 @@ -2833,16 +2765,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:fc65418994a7f4fba8ca2bf0f240a9dc604cb4d1 - pristine_git_object: 558efb7618b259dae8262cb671c7dc39cbd4729e + last_write_checksum: sha1:bcc680ee202ce920823502f59f8549453cf4a999 + pristine_git_object: f1b0b2d61beae2827b9f66331d74850e7c56be91 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 - last_write_checksum: sha1:6adb894d14b6932f79d47b40d4801403f5aaedf6 - pristine_git_object: cdb7c37f2675eb70de7a3f3b9b5e3fc4b05abc94 + last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b + pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:be41df80620c88cd1f3f93b9e9aa31d1aa238075 - pristine_git_object: 4d92d524b8d1159cbb87c0cb22d80c17fd888a05 + last_write_checksum: sha1:dd9dc2cd5d154e7a8e6cff928fe47582e0d4bd81 + pristine_git_object: d9f413c673b030a4ebd1cd363b0376a009b45540 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -2893,8 +2825,8 @@ trackedFiles: pristine_git_object: 3a9576c830163d351b5d8f6b66bb612fca12b844 src/mistralai/client/models/codeinterpretertool.py: id: 950cd8f4ad49 - last_write_checksum: sha1:ad38c653d3355ffd9d000bde82d83481939e3495 - pristine_git_object: 3c6a384fbbf18feea672f309c892c2e78acfe737 + last_write_checksum: sha1:248d6e6c1906303f03eb4f29429227a7d39679a2 + pristine_git_object: 4cf9d055c3aaee426d99071180ae6de21eb648cf src/mistralai/client/models/completionargs.py: id: 3db008bcddca last_write_checksum: sha1:1c9918b8b9631471dcee25f6608c026770810a2f @@ -3021,8 +2953,8 @@ trackedFiles: pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:0c4616fe65bac48a5b5ff9b583da748fd76bcc5d - pristine_git_object: 5b6951bf0f04cd19db3ad8790f3f52f796cc41e7 + last_write_checksum: sha1:66c8ac371f79d0ec93cae4ee2afe8cfe37edae4a + pristine_git_object: f7ed89b51f3a747f5058666a36700ced23e14c7d src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf last_write_checksum: sha1:cd45eec534ccd27052d9809f8aafedeee243d9f9 @@ -3041,8 +2973,8 @@ trackedFiles: pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:4ca22e6062a10c03b2050165b98c0ea7345c23d8 - pristine_git_object: 9a323e2af341593c6a1e95c99efe4bf4141d7a8f + last_write_checksum: sha1:b5260447a552fd71a3c45aa0c2105b7db94026f7 + pristine_git_object: 4ec455b21b61d6f45bbf2a17fa5edc2edbc5fab9 src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 last_write_checksum: sha1:ee993afc39cece27caf99ee60258f45980d86cbc @@ -3053,8 +2985,8 @@ trackedFiles: pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:fe48fea4272f841faaa8a8770bcdf4d38031c383 - pristine_git_object: 78a9cd24972b7245e4ee6e4e489d4bae6cd05f6b + last_write_checksum: sha1:ebc559195377b1526a1aa5ad7344d934daf96b2f + pristine_git_object: b31fbc9178ad57fc290114061fd500f67657e89e src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 last_write_checksum: sha1:9061e5f387d98c2c2f624efafd6ef178dfad6b43 @@ -3097,8 +3029,8 @@ trackedFiles: pristine_git_object: 28dda0cb8c5ba2462ed0f68f19747447c6ae401b src/mistralai/client/models/customconnector.py: id: 14f3643f7703 - last_write_checksum: sha1:5001ec4c8d744a66a66a14ae5085064c5f119049 - pristine_git_object: 9235dfd95e752f7a20598401c129ffcfec74b4bf + last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d + pristine_git_object: f3a1e2ffb1a29e8798a2ac8c9c636ac3bada7413 src/mistralai/client/models/dataset.py: id: cbf14670ee00 last_write_checksum: sha1:012f85ebfbdb286436621efc3b5b1adb150871f3 @@ -3161,8 +3093,8 @@ trackedFiles: pristine_git_object: 8d1aea883e579ff1677949573f43dddc362bd35d src/mistralai/client/models/documentlibrarytool.py: id: 3eb3c218f457 - last_write_checksum: sha1:a677b07da68e42bd67078e040519d6b166124ac8 - pristine_git_object: aa3093f4ef6b373c078af9734b00eae5ef713a25 + last_write_checksum: sha1:a84295aba7b9e7f70b68f279934d1a5ca0817f77 + pristine_git_object: 29f8d64a695342489d81bfe20ec2f8de60546ddd src/mistralai/client/models/documenttextcontent.py: id: e730005e44cb last_write_checksum: sha1:c86f4b15e8fda1cd5c173da01462342cd22b7286 @@ -3305,8 +3237,8 @@ trackedFiles: pristine_git_object: 2ca34598854f3777430de33d2acf2fc45f27fbcc src/mistralai/client/models/fimcompletionresponse.py: id: b860d2ba771e - last_write_checksum: sha1:4fe39c00b10e4d83f6b987393763b27d4610d799 - pristine_git_object: 441a913001ecec779c4c1ea569d7586450698e58 + last_write_checksum: sha1:dffd5a7005999340f57eaa94e17b2c82ddc7fd90 + pristine_git_object: 1345a116b7855ab4b824cf0369c0a5281e44ea97 src/mistralai/client/models/fimcompletionstreamrequest.py: id: 1d1ee09f1913 last_write_checksum: sha1:338c8d224fa5739296fe0e1ea1c00e65fba30b99 @@ -3461,8 +3393,8 @@ trackedFiles: pristine_git_object: 1982d357277a92fc7ebea3b99146116596d99c78 src/mistralai/client/models/imagegenerationtool.py: id: e1532275faa0 - last_write_checksum: sha1:0e31f3c2d0b36a676ed136e3551435b5b4861566 - pristine_git_object: 5012a5657b18950bb402133a8a65821c23b3a423 + last_write_checksum: sha1:0fcb9fdeffe252c88497f02164f7e753bea40ff1 + pristine_git_object: 0dd4a4d2a4671bb310410eb17bb85032638d817c src/mistralai/client/models/imageurl.py: id: e4bbf5881fbf last_write_checksum: sha1:a3e5c91291a5fcc24bda8fc1c96a2608965edae5 @@ -4257,8 +4189,8 @@ trackedFiles: pristine_git_object: a11b626a9b4ec3b1761bb383dda2cead843ee634 src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:9b2e91f96cc1153d15c2f48d347174732df38acc - pristine_git_object: 8fec91498119cc7e9ee64f3300600cd04a98cfb4 + last_write_checksum: sha1:0917571c77c739ae6c158b2adcd5df7ebc332f4f + pristine_git_object: df4664fa294ab8e900d0a0f060f35e6c82a0825d src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 last_write_checksum: sha1:cdf3aa496722d84b0a76d52ce76133cfaafb0073 @@ -4333,12 +4265,12 @@ trackedFiles: pristine_git_object: e64bb27c9142d3fe312e8d7476893382dab20722 src/mistralai/client/models/websearchpremiumtool.py: id: bfe88af887e3 - last_write_checksum: sha1:6c6344f5b429cd1f37b58daaf08ed281fe124fbd - pristine_git_object: 249e18402ec4842ed78816a6ca93bec50c2dd8a5 + last_write_checksum: sha1:bdb724b386fe512c2b6db6bd2931ea71c796dbc9 + pristine_git_object: 5c929e94c20159cf394a9f95ef990a926643f0ea src/mistralai/client/models/websearchtool.py: id: 26b0903423e5 - last_write_checksum: sha1:ac79e5882823ebcea821ee8a497703b188e02632 - pristine_git_object: 9f372ec00aa765cbfe748624eefa3bf696f5beaa + last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f + pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 @@ -6467,11 +6399,7 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.chat.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) - * `mistral.fim.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) - * `mistral.agents.complete()`: `response.choices[]` **Changed** (Breaking ⚠️) +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.start()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.list()`: `response.[].union(ModelConversation).tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get()`: `response.union(ModelConversation).tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start_stream()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.create()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n * `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list()`: `response.[].tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get()`: `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n * `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update_version()`: `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list_versions()`: `response.[].tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get_version()`: `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: `request` **Changed** (Breaking ⚠️)\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2547237b..2d939a25 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.1.1 + version: 2.1.2 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 454dde75..69bef81b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:07001643ff9c8cc14ad90b1339637698af0fcf923c6336398016ff927f825f2b - sourceBlobDigest: sha256:6566cab4050d1f6841c4717a5d0c91819dea84840d7c04b1194ca939aee3d8e7 + sourceRevisionDigest: sha256:2796a05e4b9f32ebc2ffa6b195b959507d7d2683f6b06593781cc8ebdcd7cb6f + sourceBlobDigest: sha256:9e5029c7cf5ae151e2b0a123e70013dc6d9a58b8127884cf33e85fa3be32abee tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:07001643ff9c8cc14ad90b1339637698af0fcf923c6336398016ff927f825f2b - sourceBlobDigest: sha256:6566cab4050d1f6841c4717a5d0c91819dea84840d7c04b1194ca939aee3d8e7 + sourceRevisionDigest: sha256:2796a05e4b9f32ebc2ffa6b195b959507d7d2683f6b06593781cc8ebdcd7cb6f + sourceBlobDigest: sha256:9e5029c7cf5ae151e2b0a123e70013dc6d9a58b8127884cf33e85fa3be32abee codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:972495e91c76c3f044f7d71d8ccb55294421ddb6247c3e0b3dbd3c27490a7184 + codeSamplesRevisionDigest: sha256:5aa694bacc4be160d5afb6c05c08407744acbc82e951d650b2a2faaeb13e4271 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/README-PYPI.md b/README-PYPI.md index 7b238181..625c6558 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -159,8 +159,6 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -190,8 +188,6 @@ async def main(): }, ], stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -271,8 +267,6 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -302,8 +296,6 @@ async def main(): }, ], agent_id="", stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response diff --git a/README.md b/README.md index 0ca3d949..54374697 100644 --- a/README.md +++ b/README.md @@ -159,8 +159,6 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -190,8 +188,6 @@ async def main(): }, ], stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -271,8 +267,6 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -302,8 +296,6 @@ async def main(): }, ], agent_id="", stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response diff --git a/RELEASES.md b/RELEASES.md index cea03081..c557596d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -468,4 +468,14 @@ Based on: ### Generated - [python v2.1.1] . ### Releases -- [PyPI v2.1.1] https://pypi.org/project/mistralai/2.1.1 - . \ No newline at end of file +- [PyPI v2.1.1] https://pypi.org/project/mistralai/2.1.1 - . + +## 2026-03-20 14:40:56 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.2] . +### Releases +- [PyPI v2.1.2] https://pypi.org/project/mistralai/2.1.2 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index cce299c7..bb01b160 100644 --- a/USAGE.md +++ b/USAGE.md @@ -20,8 +20,6 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -51,8 +49,6 @@ async def main(): }, ], stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -132,8 +128,6 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -163,8 +157,6 @@ async def main(): }, ], agent_id="", stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 119c4bc8..99f47f5c 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionRequestMessage](../models/agentscompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.AgentsCompletionRequestTools2]](../models/agentscompletionrequesttools2.md) | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -22,5 +22,4 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/agentscompletionrequesttools1.md b/docs/models/agentscompletionrequesttools1.md deleted file mode 100644 index 61eb3257..00000000 --- a/docs/models/agentscompletionrequesttools1.md +++ /dev/null @@ -1,47 +0,0 @@ -# AgentsCompletionRequestTools1 - - -## Supported Types - -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - -### `models.ImageGenerationTool` - -```python -value: models.ImageGenerationTool = /* values here */ -``` - -### `models.DocumentLibraryTool` - -```python -value: models.DocumentLibraryTool = /* values here */ -``` - -### `models.CustomConnector` - -```python -value: models.CustomConnector = /* values here */ -``` - -### `models.Tool` - -```python -value: models.Tool = /* values here */ -``` - diff --git a/docs/models/agentscompletionrequesttools2.md b/docs/models/agentscompletionrequesttools2.md deleted file mode 100644 index 5c1a4bc4..00000000 --- a/docs/models/agentscompletionrequesttools2.md +++ /dev/null @@ -1,17 +0,0 @@ -# AgentsCompletionRequestTools2 - - -## Supported Types - -### `List[models.AgentsCompletionRequestTools1]` - -```python -value: List[models.AgentsCompletionRequestTools1] = /* values here */ -``` - -### `List[str]` - -```python -value: List[str] = /* values here */ -``` - diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index ee24b68b..d5455230 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionStreamRequestMessage](../models/agentscompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.AgentsCompletionStreamRequestTools2]](../models/agentscompletionstreamrequesttools2.md) | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -22,5 +22,4 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/agentscompletionstreamrequesttools1.md b/docs/models/agentscompletionstreamrequesttools1.md deleted file mode 100644 index fef7e190..00000000 --- a/docs/models/agentscompletionstreamrequesttools1.md +++ /dev/null @@ -1,47 +0,0 @@ -# AgentsCompletionStreamRequestTools1 - - -## Supported Types - -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - -### `models.ImageGenerationTool` - -```python -value: models.ImageGenerationTool = /* values here */ -``` - -### `models.DocumentLibraryTool` - -```python -value: models.DocumentLibraryTool = /* values here */ -``` - -### `models.CustomConnector` - -```python -value: models.CustomConnector = /* values here */ -``` - -### `models.Tool` - -```python -value: models.Tool = /* values here */ -``` - diff --git a/docs/models/agentscompletionstreamrequesttools2.md b/docs/models/agentscompletionstreamrequesttools2.md deleted file mode 100644 index d9009359..00000000 --- a/docs/models/agentscompletionstreamrequesttools2.md +++ /dev/null @@ -1,17 +0,0 @@ -# AgentsCompletionStreamRequestTools2 - - -## Supported Types - -### `List[models.AgentsCompletionStreamRequestTools1]` - -```python -value: List[models.AgentsCompletionStreamRequestTools1] = /* values here */ -``` - -### `List[str]` - -```python -value: List[str] = /* values here */ -``` - diff --git a/docs/models/basefielddefinition.md b/docs/models/basefielddefinition.md index 3d721d91..3f7abea9 100644 --- a/docs/models/basefielddefinition.md +++ b/docs/models/basefielddefinition.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `label` | *str* | :heavy_check_mark: | N/A | -| `type` | [models.BaseFieldDefinitionType](../models/basefielddefinitiontype.md) | :heavy_check_mark: | N/A | -| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.TypeEnum](../models/typeenum.md) | :heavy_check_mark: | N/A | +| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletionchoice.md b/docs/models/chatcompletionchoice.md new file mode 100644 index 00000000..deaa0ea0 --- /dev/null +++ b/docs/models/chatcompletionchoice.md @@ -0,0 +1,10 @@ +# ChatCompletionChoice + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `index` | *int* | :heavy_check_mark: | N/A | 0 | +| `message` | [models.AssistantMessage](../models/assistantmessage.md) | :heavy_check_mark: | N/A | | +| `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file diff --git a/docs/models/chatcompletionchoice1.md b/docs/models/chatcompletionchoice1.md deleted file mode 100644 index 269023f7..00000000 --- a/docs/models/chatcompletionchoice1.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatCompletionChoice1 - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [models.AssistantMessage](../models/assistantmessage.md) | :heavy_check_mark: | N/A | | -| `finish_reason` | [models.ChatCompletionChoiceFinishReason1](../models/chatcompletionchoicefinishreason1.md) | :heavy_check_mark: | N/A | stop | -| `messages` | List[[models.AssistantMessage](../models/assistantmessage.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/chatcompletionchoice2.md b/docs/models/chatcompletionchoice2.md deleted file mode 100644 index 274565e8..00000000 --- a/docs/models/chatcompletionchoice2.md +++ /dev/null @@ -1,11 +0,0 @@ -# ChatCompletionChoice2 - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | -| `finish_reason` | [models.ChatCompletionChoiceFinishReason2](../models/chatcompletionchoicefinishreason2.md) | :heavy_check_mark: | N/A | stop | -| `messages` | List[[models.AssistantMessage](../models/assistantmessage.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/chatcompletionchoicefinishreason1.md b/docs/models/chatcompletionchoicefinishreason.md similarity index 77% rename from docs/models/chatcompletionchoicefinishreason1.md rename to docs/models/chatcompletionchoicefinishreason.md index f340dc9d..c2892726 100644 --- a/docs/models/chatcompletionchoicefinishreason1.md +++ b/docs/models/chatcompletionchoicefinishreason.md @@ -1,12 +1,12 @@ -# ChatCompletionChoiceFinishReason1 +# ChatCompletionChoiceFinishReason ## Example Usage ```python -from mistralai.client.models import ChatCompletionChoiceFinishReason1 +from mistralai.client.models import ChatCompletionChoiceFinishReason # Open enum: unrecognized values are captured as UnrecognizedStr -value: ChatCompletionChoiceFinishReason1 = "stop" +value: ChatCompletionChoiceFinishReason = "stop" ``` diff --git a/docs/models/chatcompletionchoicefinishreason2.md b/docs/models/chatcompletionchoicefinishreason2.md deleted file mode 100644 index 51abd6c1..00000000 --- a/docs/models/chatcompletionchoicefinishreason2.md +++ /dev/null @@ -1,21 +0,0 @@ -# ChatCompletionChoiceFinishReason2 - -## Example Usage - -```python -from mistralai.client.models import ChatCompletionChoiceFinishReason2 - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ChatCompletionChoiceFinishReason2 = "stop" -``` - - -## Values - -This is an open enum. Unrecognized values will not fail type checks. - -- `"stop"` -- `"length"` -- `"model_length"` -- `"error"` -- `"tool_calls"` diff --git a/docs/models/chatcompletionchoiceunion.md b/docs/models/chatcompletionchoiceunion.md deleted file mode 100644 index c5777599..00000000 --- a/docs/models/chatcompletionchoiceunion.md +++ /dev/null @@ -1,17 +0,0 @@ -# ChatCompletionChoiceUnion - - -## Supported Types - -### `models.ChatCompletionChoice1` - -```python -value: models.ChatCompletionChoice1 = /* values here */ -``` - -### `models.ChatCompletionChoice2` - -```python -value: models.ChatCompletionChoice2 = /* values here */ -``` - diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index c19738a7..4e29ad05 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionRequestMessage](../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.ChatCompletionRequestTools2]](../models/chatcompletionrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -25,5 +25,4 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionrequesttools1.md b/docs/models/chatcompletionrequesttools1.md deleted file mode 100644 index 9926c6d5..00000000 --- a/docs/models/chatcompletionrequesttools1.md +++ /dev/null @@ -1,47 +0,0 @@ -# ChatCompletionRequestTools1 - - -## Supported Types - -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - -### `models.ImageGenerationTool` - -```python -value: models.ImageGenerationTool = /* values here */ -``` - -### `models.DocumentLibraryTool` - -```python -value: models.DocumentLibraryTool = /* values here */ -``` - -### `models.CustomConnector` - -```python -value: models.CustomConnector = /* values here */ -``` - -### `models.Tool` - -```python -value: models.Tool = /* values here */ -``` - diff --git a/docs/models/chatcompletionrequesttools2.md b/docs/models/chatcompletionrequesttools2.md deleted file mode 100644 index 48d8596d..00000000 --- a/docs/models/chatcompletionrequesttools2.md +++ /dev/null @@ -1,19 +0,0 @@ -# ChatCompletionRequestTools2 - -A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. - - -## Supported Types - -### `List[models.ChatCompletionRequestTools1]` - -```python -value: List[models.ChatCompletionRequestTools1] = /* values here */ -``` - -### `List[str]` - -```python -value: List[str] = /* values here */ -``` - diff --git a/docs/models/chatcompletionresponse.md b/docs/models/chatcompletionresponse.md index 2cde9a3f..a0465ffb 100644 --- a/docs/models/chatcompletionresponse.md +++ b/docs/models/chatcompletionresponse.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | -| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | -| `model` | *str* | :heavy_check_mark: | N/A | mistral-small-latest | -| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | -| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | -| `choices` | List[[models.ChatCompletionChoiceUnion](../models/chatcompletionchoiceunion.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | +| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | +| `model` | *str* | :heavy_check_mark: | N/A | mistral-small-latest | +| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | +| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | +| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index 0bffc0fc..7ece3742 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.ChatCompletionStreamRequestTools2]](../models/chatcompletionstreamrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -25,5 +25,4 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequesttools1.md b/docs/models/chatcompletionstreamrequesttools1.md deleted file mode 100644 index fb7a968b..00000000 --- a/docs/models/chatcompletionstreamrequesttools1.md +++ /dev/null @@ -1,47 +0,0 @@ -# ChatCompletionStreamRequestTools1 - - -## Supported Types - -### `models.WebSearchTool` - -```python -value: models.WebSearchTool = /* values here */ -``` - -### `models.WebSearchPremiumTool` - -```python -value: models.WebSearchPremiumTool = /* values here */ -``` - -### `models.CodeInterpreterTool` - -```python -value: models.CodeInterpreterTool = /* values here */ -``` - -### `models.ImageGenerationTool` - -```python -value: models.ImageGenerationTool = /* values here */ -``` - -### `models.DocumentLibraryTool` - -```python -value: models.DocumentLibraryTool = /* values here */ -``` - -### `models.CustomConnector` - -```python -value: models.CustomConnector = /* values here */ -``` - -### `models.Tool` - -```python -value: models.Tool = /* values here */ -``` - diff --git a/docs/models/chatcompletionstreamrequesttools2.md b/docs/models/chatcompletionstreamrequesttools2.md deleted file mode 100644 index 273651d8..00000000 --- a/docs/models/chatcompletionstreamrequesttools2.md +++ /dev/null @@ -1,19 +0,0 @@ -# ChatCompletionStreamRequestTools2 - -A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. - - -## Supported Types - -### `List[models.ChatCompletionStreamRequestTools1]` - -```python -value: List[models.ChatCompletionStreamRequestTools1] = /* values here */ -``` - -### `List[str]` - -```python -value: List[str] = /* values here */ -``` - diff --git a/docs/models/codeinterpretertool.md b/docs/models/codeinterpretertool.md index 9fd6a907..6302fc62 100644 --- a/docs/models/codeinterpretertool.md +++ b/docs/models/codeinterpretertool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.CodeInterpreterToolType]](../models/codeinterpretertooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["code_interpreter"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/codeinterpretertooltype.md b/docs/models/codeinterpretertooltype.md deleted file mode 100644 index 7f95f5da..00000000 --- a/docs/models/codeinterpretertooltype.md +++ /dev/null @@ -1,13 +0,0 @@ -# CodeInterpreterToolType - -## Example Usage - -```python -from mistralai.client.models import CodeInterpreterToolType -value: CodeInterpreterToolType = "code_interpreter" -``` - - -## Values - -- `"code_interpreter"` diff --git a/docs/models/customconnector.md b/docs/models/customconnector.md index d238eb5f..0a0b6921 100644 --- a/docs/models/customconnector.md +++ b/docs/models/customconnector.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [Optional[models.CustomConnectorType]](../models/customconnectortype.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["connector"]* | :heavy_check_mark: | N/A | | `connector_id` | *str* | :heavy_check_mark: | N/A | | `authorization` | [OptionalNullable[models.Authorization]](../models/authorization.md) | :heavy_minus_sign: | N/A | | `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/customconnectortype.md b/docs/models/customconnectortype.md deleted file mode 100644 index e2c8e0e0..00000000 --- a/docs/models/customconnectortype.md +++ /dev/null @@ -1,13 +0,0 @@ -# CustomConnectorType - -## Example Usage - -```python -from mistralai.client.models import CustomConnectorType -value: CustomConnectorType = "connector" -``` - - -## Values - -- `"connector"` diff --git a/docs/models/documentlibrarytool.md b/docs/models/documentlibrarytool.md index d22ff33a..95c3fa52 100644 --- a/docs/models/documentlibrarytool.md +++ b/docs/models/documentlibrarytool.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.DocumentLibraryToolType]](../models/documentlibrarytooltype.md) | :heavy_minus_sign: | N/A | -| `library_ids` | List[*str*] | :heavy_check_mark: | Ids of the library in which to search. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["document_library"]* | :heavy_check_mark: | N/A | +| `library_ids` | List[*str*] | :heavy_check_mark: | Ids of the library in which to search. | \ No newline at end of file diff --git a/docs/models/documentlibrarytooltype.md b/docs/models/documentlibrarytooltype.md deleted file mode 100644 index 945452e3..00000000 --- a/docs/models/documentlibrarytooltype.md +++ /dev/null @@ -1,13 +0,0 @@ -# DocumentLibraryToolType - -## Example Usage - -```python -from mistralai.client.models import DocumentLibraryToolType -value: DocumentLibraryToolType = "document_library" -``` - - -## Values - -- `"document_library"` diff --git a/docs/models/fimcompletionresponse.md b/docs/models/fimcompletionresponse.md index 0d92cc85..cd62d034 100644 --- a/docs/models/fimcompletionresponse.md +++ b/docs/models/fimcompletionresponse.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | -| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | -| `model` | *str* | :heavy_check_mark: | N/A | codestral-latest | -| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | -| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | -| `choices` | List[[models.ChatCompletionChoiceUnion](../models/chatcompletionchoiceunion.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | cmpl-e5cc70bb28c444948073e77776eb30ef | +| `object` | *str* | :heavy_check_mark: | N/A | chat.completion | +| `model` | *str* | :heavy_check_mark: | N/A | codestral-latest | +| `usage` | [models.UsageInfo](../models/usageinfo.md) | :heavy_check_mark: | N/A | | +| `created` | *int* | :heavy_check_mark: | N/A | 1702256327 | +| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/imagegenerationtool.md b/docs/models/imagegenerationtool.md index 93edbbf8..b476b6f2 100644 --- a/docs/models/imagegenerationtool.md +++ b/docs/models/imagegenerationtool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.ImageGenerationToolType]](../models/imagegenerationtooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["image_generation"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/imagegenerationtooltype.md b/docs/models/imagegenerationtooltype.md deleted file mode 100644 index 7763ca21..00000000 --- a/docs/models/imagegenerationtooltype.md +++ /dev/null @@ -1,13 +0,0 @@ -# ImageGenerationToolType - -## Example Usage - -```python -from mistralai.client.models import ImageGenerationToolType -value: ImageGenerationToolType = "image_generation" -``` - - -## Values - -- `"image_generation"` diff --git a/docs/models/basefielddefinitiontype.md b/docs/models/typeenum.md similarity index 67% rename from docs/models/basefielddefinitiontype.md rename to docs/models/typeenum.md index efdff2a4..ec47cf96 100644 --- a/docs/models/basefielddefinitiontype.md +++ b/docs/models/typeenum.md @@ -1,12 +1,12 @@ -# BaseFieldDefinitionType +# TypeEnum ## Example Usage ```python -from mistralai.client.models import BaseFieldDefinitionType +from mistralai.client.models import TypeEnum # Open enum: unrecognized values are captured as UnrecognizedStr -value: BaseFieldDefinitionType = "ENUM" +value: TypeEnum = "ENUM" ``` diff --git a/docs/models/websearchpremiumtool.md b/docs/models/websearchpremiumtool.md index 27951776..78b736cd 100644 --- a/docs/models/websearchpremiumtool.md +++ b/docs/models/websearchpremiumtool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.WebSearchPremiumToolType]](../models/websearchpremiumtooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["web_search_premium"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/websearchpremiumtooltype.md b/docs/models/websearchpremiumtooltype.md deleted file mode 100644 index e4f3d7bf..00000000 --- a/docs/models/websearchpremiumtooltype.md +++ /dev/null @@ -1,13 +0,0 @@ -# WebSearchPremiumToolType - -## Example Usage - -```python -from mistralai.client.models import WebSearchPremiumToolType -value: WebSearchPremiumToolType = "web_search_premium" -``` - - -## Values - -- `"web_search_premium"` diff --git a/docs/models/websearchtool.md b/docs/models/websearchtool.md index 5dfd8c22..4ca7333c 100644 --- a/docs/models/websearchtool.md +++ b/docs/models/websearchtool.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.WebSearchToolType]](../models/websearchtooltype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| `type` | *Literal["web_search"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/websearchtooltype.md b/docs/models/websearchtooltype.md deleted file mode 100644 index 89af0c4d..00000000 --- a/docs/models/websearchtooltype.md +++ /dev/null @@ -1,13 +0,0 @@ -# WebSearchToolType - -## Example Usage - -```python -from mistralai.client.models import WebSearchToolType -value: WebSearchToolType = "web_search" -``` - - -## Values - -- `"web_search"` diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index b8c7db45..b1b80bdf 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -32,8 +32,6 @@ with Mistral( }, ], agent_id="", stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -53,7 +51,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.AgentsCompletionRequestTools2]](../../models/agentscompletionrequesttools2.md) | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -63,7 +61,6 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -100,8 +97,6 @@ with Mistral( }, ], agent_id="", stream=True, response_format={ "type": "text", - }, additional_properties={ - }) with res as event_stream: @@ -123,7 +118,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.AgentsCompletionStreamRequestTools2]](../../models/agentscompletionstreamrequesttools2.md) | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -133,7 +128,6 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | -| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index e449bb62..afbbeae4 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -32,8 +32,6 @@ with Mistral( }, ], stream=False, response_format={ "type": "text", - }, additional_properties={ - }) # Handle response @@ -55,7 +53,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.ChatCompletionRequestTools2]](../../models/chatcompletionrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -66,7 +64,6 @@ with Mistral( | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | -| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -103,8 +100,6 @@ with Mistral( }, ], stream=True, response_format={ "type": "text", - }, additional_properties={ - }) with res as event_stream: @@ -128,7 +123,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | [OptionalNullable[models.ChatCompletionStreamRequestTools2]](../../models/chatcompletionstreamrequesttools2.md) | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -139,7 +134,6 @@ with Mistral( | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | -| `additional_properties` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/examples/mistral/chat/function_calling.py b/examples/mistral/chat/function_calling.py index 9299a822..68e9d91c 100644 --- a/examples/mistral/chat/function_calling.py +++ b/examples/mistral/chat/function_calling.py @@ -7,7 +7,6 @@ from mistralai.client.models import ( AssistantMessage, ChatCompletionRequestMessage, - ChatCompletionRequestTools1, Function, Tool, ToolMessage, @@ -49,7 +48,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st "retrieve_payment_date": functools.partial(retrieve_payment_date, data=data), } -tools: list[ChatCompletionRequestTools1] = [ +tools: list[Tool] = [ Tool( function=Function( name="retrieve_payment_status", diff --git a/pyproject.toml b/pyproject.toml index 462d7b04..c1ea7450 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.1.1" +version = "2.1.2" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 2ce42718..a5ba9a2a 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.1.1" +__version__: str = "2.1.2" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.1.1 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.1.2 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 8ac69962..2e91dd04 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -35,10 +35,7 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.AgentsCompletionRequestTools2, - models.AgentsCompletionRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -58,7 +55,6 @@ def complete( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -84,7 +80,6 @@ def complete( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -112,9 +107,7 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.AgentsCompletionRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -131,7 +124,6 @@ def complete( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, - **(additional_properties or {}), ) req = self._build_request( @@ -216,10 +208,7 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.AgentsCompletionRequestTools2, - models.AgentsCompletionRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -239,7 +228,6 @@ async def complete_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -265,7 +253,6 @@ async def complete_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -293,9 +280,7 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.AgentsCompletionRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -312,7 +297,6 @@ async def complete_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, - **(additional_properties or {}), ) req = self._build_request_async( @@ -397,10 +381,7 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.AgentsCompletionStreamRequestTools2, - models.AgentsCompletionStreamRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -420,7 +401,6 @@ def stream( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -448,7 +428,6 @@ def stream( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -476,9 +455,7 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.AgentsCompletionStreamRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), @@ -495,7 +472,6 @@ def stream( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, - **(additional_properties or {}), ) req = self._build_request( @@ -588,10 +564,7 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.AgentsCompletionStreamRequestTools2, - models.AgentsCompletionStreamRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -611,7 +584,6 @@ async def stream_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -639,7 +611,6 @@ async def stream_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -667,9 +638,7 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.AgentsCompletionStreamRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), @@ -686,7 +655,6 @@ async def stream_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), agent_id=agent_id, - **(additional_properties or {}), ) req = self._build_request_async( diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index 8c73bdc9..c11a53d1 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -122,10 +122,7 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.ChatCompletionRequestTools2, - models.ChatCompletionRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -146,7 +143,6 @@ def complete( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -175,7 +171,6 @@ def complete( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -206,9 +201,7 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.ChatCompletionRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -225,7 +218,6 @@ def complete( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, - **(additional_properties or {}), ) req = self._build_request( @@ -312,10 +304,7 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.ChatCompletionRequestTools2, - models.ChatCompletionRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -336,7 +325,6 @@ async def complete_async( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -365,7 +353,6 @@ async def complete_async( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -396,9 +383,7 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.ChatCompletionRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -415,7 +400,6 @@ async def complete_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, - **(additional_properties or {}), ) req = self._build_request_async( @@ -502,10 +486,7 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.ChatCompletionStreamRequestTools2, - models.ChatCompletionStreamRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -526,7 +507,6 @@ def stream( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -557,7 +537,6 @@ def stream( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -588,9 +567,7 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.ChatCompletionStreamRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -607,7 +584,6 @@ def stream( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, - **(additional_properties or {}), ) req = self._build_request( @@ -702,10 +678,7 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[ - models.ChatCompletionStreamRequestTools2, - models.ChatCompletionStreamRequestTools2TypedDict, - ] + Union[List[models.Tool], List[models.ToolTypedDict]] ] = UNSET, tool_choice: Optional[ Union[ @@ -726,7 +699,6 @@ async def stream_async( Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, safe_prompt: Optional[bool] = None, - additional_properties: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -757,7 +729,6 @@ async def stream_async( :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. - :param additional_properties: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -788,9 +759,7 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model( - tools, OptionalNullable[models.ChatCompletionStreamRequestTools2] - ), + tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -807,7 +776,6 @@ async def stream_async( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), safe_prompt=safe_prompt, - **(additional_properties or {}), ) req = self._build_request_async( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 8363bb84..05756e5b 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -127,10 +127,6 @@ AgentsCompletionRequestStopTypedDict, AgentsCompletionRequestToolChoice, AgentsCompletionRequestToolChoiceTypedDict, - AgentsCompletionRequestTools1, - AgentsCompletionRequestTools1TypedDict, - AgentsCompletionRequestTools2, - AgentsCompletionRequestTools2TypedDict, AgentsCompletionRequestTypedDict, ) from .agentscompletionstreamrequest import ( @@ -141,10 +137,6 @@ AgentsCompletionStreamRequestStopTypedDict, AgentsCompletionStreamRequestToolChoice, AgentsCompletionStreamRequestToolChoiceTypedDict, - AgentsCompletionStreamRequestTools1, - AgentsCompletionStreamRequestTools1TypedDict, - AgentsCompletionStreamRequestTools2, - AgentsCompletionStreamRequestTools2TypedDict, AgentsCompletionStreamRequestTypedDict, ) from .annotations import Annotations, AnnotationsTypedDict, Audience @@ -176,9 +168,9 @@ from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, - BaseFieldDefinitionType, BaseFieldDefinitionTypedDict, SupportedOperator, + TypeEnum, ) from .basemodelcard import BaseModelCard, BaseModelCardTypedDict from .basetaskstatus import BaseTaskStatus @@ -196,15 +188,10 @@ ChatClassificationRequest, ChatClassificationRequestTypedDict, ) - from .chatcompletionchoice_union import ( - ChatCompletionChoice1, - ChatCompletionChoice1TypedDict, - ChatCompletionChoice2, - ChatCompletionChoice2TypedDict, - ChatCompletionChoiceFinishReason1, - ChatCompletionChoiceFinishReason2, - ChatCompletionChoiceUnion, - ChatCompletionChoiceUnionTypedDict, + from .chatcompletionchoice import ( + ChatCompletionChoice, + ChatCompletionChoiceFinishReason, + ChatCompletionChoiceTypedDict, ) from .chatcompletionevent import ( ChatCompletionEvent, @@ -226,10 +213,6 @@ ChatCompletionRequestStopTypedDict, ChatCompletionRequestToolChoice, ChatCompletionRequestToolChoiceTypedDict, - ChatCompletionRequestTools1, - ChatCompletionRequestTools1TypedDict, - ChatCompletionRequestTools2, - ChatCompletionRequestTools2TypedDict, ChatCompletionRequestTypedDict, ) from .chatcompletionresponse import ( @@ -244,10 +227,6 @@ ChatCompletionStreamRequestStopTypedDict, ChatCompletionStreamRequestToolChoice, ChatCompletionStreamRequestToolChoiceTypedDict, - ChatCompletionStreamRequestTools1, - ChatCompletionStreamRequestTools1TypedDict, - ChatCompletionStreamRequestTools2, - ChatCompletionStreamRequestTools2TypedDict, ChatCompletionStreamRequestTypedDict, ) from .chatmoderationrequest import ( @@ -308,11 +287,7 @@ ClassifierTrainingParameters, ClassifierTrainingParametersTypedDict, ) - from .codeinterpretertool import ( - CodeInterpreterTool, - CodeInterpreterToolType, - CodeInterpreterToolTypedDict, - ) + from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict from .completionargsstop import CompletionArgsStop, CompletionArgsStopTypedDict from .completionchunk import CompletionChunk, CompletionChunkTypedDict @@ -534,7 +509,6 @@ Authorization, AuthorizationTypedDict, CustomConnector, - CustomConnectorType, CustomConnectorTypedDict, UnknownAuthorization, ) @@ -579,11 +553,7 @@ DeltaMessageTypedDict, ) from .document import Document, DocumentTypedDict - from .documentlibrarytool import ( - DocumentLibraryTool, - DocumentLibraryToolType, - DocumentLibraryToolTypedDict, - ) + from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .documenttextcontent import DocumentTextContent, DocumentTextContentTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .embeddedresource import ( @@ -813,11 +783,7 @@ from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagecontent import ImageContent, ImageContentTypedDict from .imagedetail import ImageDetail - from .imagegenerationtool import ( - ImageGenerationTool, - ImageGenerationToolType, - ImageGenerationToolTypedDict, - ) + from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .imageurl import ImageURL, ImageURLTypedDict from .imageurlchunk import ( ImageURLChunk, @@ -1535,12 +1501,10 @@ ) from .websearchpremiumtool import ( WebSearchPremiumTool, - WebSearchPremiumToolType, WebSearchPremiumToolTypedDict, ) from .websearchtool import ( WebSearchTool, - WebSearchToolType, WebSearchToolTypedDict, ) # Pydantic models with forward references FilterGroup.model_rebuild() @@ -1615,10 +1579,6 @@ "AgentsCompletionRequestStopTypedDict", "AgentsCompletionRequestToolChoice", "AgentsCompletionRequestToolChoiceTypedDict", - "AgentsCompletionRequestTools1", - "AgentsCompletionRequestTools1TypedDict", - "AgentsCompletionRequestTools2", - "AgentsCompletionRequestTools2TypedDict", "AgentsCompletionRequestTypedDict", "AgentsCompletionStreamRequest", "AgentsCompletionStreamRequestMessage", @@ -1627,10 +1587,6 @@ "AgentsCompletionStreamRequestStopTypedDict", "AgentsCompletionStreamRequestToolChoice", "AgentsCompletionStreamRequestToolChoiceTypedDict", - "AgentsCompletionStreamRequestTools1", - "AgentsCompletionStreamRequestTools1TypedDict", - "AgentsCompletionStreamRequestTools2", - "AgentsCompletionStreamRequestTools2TypedDict", "AgentsCompletionStreamRequestTypedDict", "And", "AndTypedDict", @@ -1667,7 +1623,6 @@ "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", - "BaseFieldDefinitionType", "BaseFieldDefinitionTypedDict", "BaseModelCard", "BaseModelCardTypedDict", @@ -1686,14 +1641,9 @@ "CampaignTypedDict", "ChatClassificationRequest", "ChatClassificationRequestTypedDict", - "ChatCompletionChoice1", - "ChatCompletionChoice1TypedDict", - "ChatCompletionChoice2", - "ChatCompletionChoice2TypedDict", - "ChatCompletionChoiceFinishReason1", - "ChatCompletionChoiceFinishReason2", - "ChatCompletionChoiceUnion", - "ChatCompletionChoiceUnionTypedDict", + "ChatCompletionChoice", + "ChatCompletionChoiceFinishReason", + "ChatCompletionChoiceTypedDict", "ChatCompletionEvent", "ChatCompletionEventExtraFields", "ChatCompletionEventExtraFieldsTypedDict", @@ -1709,10 +1659,6 @@ "ChatCompletionRequestStopTypedDict", "ChatCompletionRequestToolChoice", "ChatCompletionRequestToolChoiceTypedDict", - "ChatCompletionRequestTools1", - "ChatCompletionRequestTools1TypedDict", - "ChatCompletionRequestTools2", - "ChatCompletionRequestTools2TypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", @@ -1723,10 +1669,6 @@ "ChatCompletionStreamRequestStopTypedDict", "ChatCompletionStreamRequestToolChoice", "ChatCompletionStreamRequestToolChoiceTypedDict", - "ChatCompletionStreamRequestTools1", - "ChatCompletionStreamRequestTools1TypedDict", - "ChatCompletionStreamRequestTools2", - "ChatCompletionStreamRequestTools2TypedDict", "ChatCompletionStreamRequestTypedDict", "ChatModerationRequest", "ChatModerationRequestInputs1", @@ -1767,7 +1709,6 @@ "ClassifierTrainingParameters", "ClassifierTrainingParametersTypedDict", "CodeInterpreterTool", - "CodeInterpreterToolType", "CodeInterpreterToolTypedDict", "CompletionArgs", "CompletionArgsStop", @@ -1915,7 +1856,6 @@ "CreateLibraryRequest", "CreateLibraryRequestTypedDict", "CustomConnector", - "CustomConnectorType", "CustomConnectorTypedDict", "Dataset", "DatasetImportTask", @@ -1949,7 +1889,6 @@ "DeltaMessageTypedDict", "Document", "DocumentLibraryTool", - "DocumentLibraryToolType", "DocumentLibraryToolTypedDict", "DocumentTextContent", "DocumentTextContentTypedDict", @@ -2111,7 +2050,6 @@ "ImageContentTypedDict", "ImageDetail", "ImageGenerationTool", - "ImageGenerationToolType", "ImageGenerationToolTypedDict", "ImageURL", "ImageURLChunk", @@ -2558,6 +2496,7 @@ "TranscriptionStreamSegmentDeltaTypedDict", "TranscriptionStreamTextDelta", "TranscriptionStreamTextDeltaTypedDict", + "TypeEnum", "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", "UnknownAgentTool", @@ -2638,10 +2577,8 @@ "WandbIntegrationResultTypedDict", "WandbIntegrationTypedDict", "WebSearchPremiumTool", - "WebSearchPremiumToolType", "WebSearchPremiumToolTypedDict", "WebSearchTool", - "WebSearchToolType", "WebSearchToolTypedDict", ] @@ -2714,10 +2651,6 @@ "AgentsCompletionRequestStopTypedDict": ".agentscompletionrequest", "AgentsCompletionRequestToolChoice": ".agentscompletionrequest", "AgentsCompletionRequestToolChoiceTypedDict": ".agentscompletionrequest", - "AgentsCompletionRequestTools1": ".agentscompletionrequest", - "AgentsCompletionRequestTools1TypedDict": ".agentscompletionrequest", - "AgentsCompletionRequestTools2": ".agentscompletionrequest", - "AgentsCompletionRequestTools2TypedDict": ".agentscompletionrequest", "AgentsCompletionRequestTypedDict": ".agentscompletionrequest", "AgentsCompletionStreamRequest": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestMessage": ".agentscompletionstreamrequest", @@ -2726,10 +2659,6 @@ "AgentsCompletionStreamRequestStopTypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoice": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoiceTypedDict": ".agentscompletionstreamrequest", - "AgentsCompletionStreamRequestTools1": ".agentscompletionstreamrequest", - "AgentsCompletionStreamRequestTools1TypedDict": ".agentscompletionstreamrequest", - "AgentsCompletionStreamRequestTools2": ".agentscompletionstreamrequest", - "AgentsCompletionStreamRequestTools2TypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestTypedDict": ".agentscompletionstreamrequest", "Annotations": ".annotations", "AnnotationsTypedDict": ".annotations", @@ -2759,9 +2688,9 @@ "AuthURLResponse": ".authurlresponse", "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", - "BaseFieldDefinitionType": ".basefielddefinition", "BaseFieldDefinitionTypedDict": ".basefielddefinition", "SupportedOperator": ".basefielddefinition", + "TypeEnum": ".basefielddefinition", "BaseModelCard": ".basemodelcard", "BaseModelCardTypedDict": ".basemodelcard", "BaseTaskStatus": ".basetaskstatus", @@ -2779,14 +2708,9 @@ "CampaignTypedDict": ".campaign", "ChatClassificationRequest": ".chatclassificationrequest", "ChatClassificationRequestTypedDict": ".chatclassificationrequest", - "ChatCompletionChoice1": ".chatcompletionchoice_union", - "ChatCompletionChoice1TypedDict": ".chatcompletionchoice_union", - "ChatCompletionChoice2": ".chatcompletionchoice_union", - "ChatCompletionChoice2TypedDict": ".chatcompletionchoice_union", - "ChatCompletionChoiceFinishReason1": ".chatcompletionchoice_union", - "ChatCompletionChoiceFinishReason2": ".chatcompletionchoice_union", - "ChatCompletionChoiceUnion": ".chatcompletionchoice_union", - "ChatCompletionChoiceUnionTypedDict": ".chatcompletionchoice_union", + "ChatCompletionChoice": ".chatcompletionchoice", + "ChatCompletionChoiceFinishReason": ".chatcompletionchoice", + "ChatCompletionChoiceTypedDict": ".chatcompletionchoice", "ChatCompletionEvent": ".chatcompletionevent", "ChatCompletionEventExtraFields": ".chatcompletionevent", "ChatCompletionEventExtraFieldsTypedDict": ".chatcompletionevent", @@ -2802,10 +2726,6 @@ "ChatCompletionRequestStopTypedDict": ".chatcompletionrequest", "ChatCompletionRequestToolChoice": ".chatcompletionrequest", "ChatCompletionRequestToolChoiceTypedDict": ".chatcompletionrequest", - "ChatCompletionRequestTools1": ".chatcompletionrequest", - "ChatCompletionRequestTools1TypedDict": ".chatcompletionrequest", - "ChatCompletionRequestTools2": ".chatcompletionrequest", - "ChatCompletionRequestTools2TypedDict": ".chatcompletionrequest", "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", @@ -2816,10 +2736,6 @@ "ChatCompletionStreamRequestStopTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoice": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", - "ChatCompletionStreamRequestTools1": ".chatcompletionstreamrequest", - "ChatCompletionStreamRequestTools1TypedDict": ".chatcompletionstreamrequest", - "ChatCompletionStreamRequestTools2": ".chatcompletionstreamrequest", - "ChatCompletionStreamRequestTools2TypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", "ChatModerationRequest": ".chatmoderationrequest", "ChatModerationRequestInputs1": ".chatmoderationrequest", @@ -2862,7 +2778,6 @@ "ClassifierTrainingParameters": ".classifiertrainingparameters", "ClassifierTrainingParametersTypedDict": ".classifiertrainingparameters", "CodeInterpreterTool": ".codeinterpretertool", - "CodeInterpreterToolType": ".codeinterpretertool", "CodeInterpreterToolTypedDict": ".codeinterpretertool", "CompletionArgs": ".completionargs", "CompletionArgsTypedDict": ".completionargs", @@ -3020,7 +2935,6 @@ "Authorization": ".customconnector", "AuthorizationTypedDict": ".customconnector", "CustomConnector": ".customconnector", - "CustomConnectorType": ".customconnector", "CustomConnectorTypedDict": ".customconnector", "UnknownAuthorization": ".customconnector", "Dataset": ".dataset", @@ -3056,7 +2970,6 @@ "Document": ".document", "DocumentTypedDict": ".document", "DocumentLibraryTool": ".documentlibrarytool", - "DocumentLibraryToolType": ".documentlibrarytool", "DocumentLibraryToolTypedDict": ".documentlibrarytool", "DocumentTextContent": ".documenttextcontent", "DocumentTextContentTypedDict": ".documenttextcontent", @@ -3216,7 +3129,6 @@ "ImageContentTypedDict": ".imagecontent", "ImageDetail": ".imagedetail", "ImageGenerationTool": ".imagegenerationtool", - "ImageGenerationToolType": ".imagegenerationtool", "ImageGenerationToolTypedDict": ".imagegenerationtool", "ImageURL": ".imageurl", "ImageURLTypedDict": ".imageurl", @@ -3731,10 +3643,8 @@ "WandbIntegrationResult": ".wandbintegrationresult", "WandbIntegrationResultTypedDict": ".wandbintegrationresult", "WebSearchPremiumTool": ".websearchpremiumtool", - "WebSearchPremiumToolType": ".websearchpremiumtool", "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", "WebSearchTool": ".websearchtool", - "WebSearchToolType": ".websearchtool", "WebSearchToolTypedDict": ".websearchtool", } diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index 527d6230..f4ce34cb 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -3,11 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict -from .customconnector import CustomConnector, CustomConnectorTypedDict -from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict -from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -18,8 +14,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -28,8 +22,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -import pydantic -from pydantic import ConfigDict, Discriminator, Tag, model_serializer +from pydantic import Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -68,46 +61,6 @@ ] -AgentsCompletionRequestTools1TypedDict = TypeAliasType( - "AgentsCompletionRequestTools1TypedDict", - Union[ - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, - ImageGenerationToolTypedDict, - ToolTypedDict, - DocumentLibraryToolTypedDict, - CustomConnectorTypedDict, - ], -) - - -AgentsCompletionRequestTools1 = TypeAliasType( - "AgentsCompletionRequestTools1", - Union[ - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - Tool, - DocumentLibraryTool, - CustomConnector, - ], -) - - -AgentsCompletionRequestTools2TypedDict = TypeAliasType( - "AgentsCompletionRequestTools2TypedDict", - Union[List[AgentsCompletionRequestTools1TypedDict], List[str]], -) - - -AgentsCompletionRequestTools2 = TypeAliasType( - "AgentsCompletionRequestTools2", - Union[List[AgentsCompletionRequestTools1], List[str]], -) - - AgentsCompletionRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -135,7 +88,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[AgentsCompletionRequestTools2TypedDict]] + tools: NotRequired[Nullable[List[ToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -153,11 +106,6 @@ class AgentsCompletionRequestTypedDict(TypedDict): class AgentsCompletionRequest(BaseModel): - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - messages: List[AgentsCompletionRequestMessage] r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" @@ -181,7 +129,7 @@ class AgentsCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[AgentsCompletionRequestTools2] = UNSET + tools: OptionalNullable[List[Tool]] = UNSET tool_choice: Optional[AgentsCompletionRequestToolChoice] = None @@ -206,14 +154,6 @@ class AgentsCompletionRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -254,7 +194,6 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -267,7 +206,5 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val - for k, v in serialized.items(): - m[k] = v return m diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index 483ec99c..0feb3803 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -3,11 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict -from .customconnector import CustomConnector, CustomConnectorTypedDict -from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict -from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -18,8 +14,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -28,8 +22,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -import pydantic -from pydantic import ConfigDict, Discriminator, Tag, model_serializer +from pydantic import Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -68,46 +61,6 @@ ] -AgentsCompletionStreamRequestTools1TypedDict = TypeAliasType( - "AgentsCompletionStreamRequestTools1TypedDict", - Union[ - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, - ImageGenerationToolTypedDict, - ToolTypedDict, - DocumentLibraryToolTypedDict, - CustomConnectorTypedDict, - ], -) - - -AgentsCompletionStreamRequestTools1 = TypeAliasType( - "AgentsCompletionStreamRequestTools1", - Union[ - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - Tool, - DocumentLibraryTool, - CustomConnector, - ], -) - - -AgentsCompletionStreamRequestTools2TypedDict = TypeAliasType( - "AgentsCompletionStreamRequestTools2TypedDict", - Union[List[AgentsCompletionStreamRequestTools1TypedDict], List[str]], -) - - -AgentsCompletionStreamRequestTools2 = TypeAliasType( - "AgentsCompletionStreamRequestTools2", - Union[List[AgentsCompletionStreamRequestTools1], List[str]], -) - - AgentsCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -134,7 +87,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[AgentsCompletionStreamRequestTools2TypedDict]] + tools: NotRequired[Nullable[List[ToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionStreamRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -152,11 +105,6 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): class AgentsCompletionStreamRequest(BaseModel): - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - messages: List[AgentsCompletionStreamRequestMessage] r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" @@ -179,7 +127,7 @@ class AgentsCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[AgentsCompletionStreamRequestTools2] = UNSET + tools: OptionalNullable[List[Tool]] = UNSET tool_choice: Optional[AgentsCompletionStreamRequestToolChoice] = None @@ -204,14 +152,6 @@ class AgentsCompletionStreamRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -252,7 +192,6 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -265,7 +204,5 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val - for k, v in serialized.items(): - m[k] = v return m diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index acf9cf8d..b57ff2ca 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -15,7 +15,7 @@ from typing_extensions import NotRequired, TypedDict -BaseFieldDefinitionType = Union[ +TypeEnum = Union[ Literal[ "ENUM", "TEXT", @@ -58,7 +58,7 @@ class BaseFieldDefinitionTypedDict(TypedDict): name: str label: str - type: BaseFieldDefinitionType + type: TypeEnum supported_operators: List[SupportedOperator] group: NotRequired[Nullable[str]] @@ -68,7 +68,7 @@ class BaseFieldDefinition(BaseModel): label: str - type: BaseFieldDefinitionType + type: TypeEnum supported_operators: List[SupportedOperator] diff --git a/src/mistralai/client/models/chatcompletionchoice.py b/src/mistralai/client/models/chatcompletionchoice.py new file mode 100644 index 00000000..2c515f6e --- /dev/null +++ b/src/mistralai/client/models/chatcompletionchoice.py @@ -0,0 +1,34 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7e6a512f6a04 + +from __future__ import annotations +from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from mistralai.client.types import BaseModel, UnrecognizedStr +from typing import Literal, Union +from typing_extensions import TypedDict + + +ChatCompletionChoiceFinishReason = Union[ + Literal[ + "stop", + "length", + "model_length", + "error", + "tool_calls", + ], + UnrecognizedStr, +] + + +class ChatCompletionChoiceTypedDict(TypedDict): + index: int + message: AssistantMessageTypedDict + finish_reason: ChatCompletionChoiceFinishReason + + +class ChatCompletionChoice(BaseModel): + index: int + + message: AssistantMessage + + finish_reason: ChatCompletionChoiceFinishReason diff --git a/src/mistralai/client/models/chatcompletionchoice_union.py b/src/mistralai/client/models/chatcompletionchoice_union.py deleted file mode 100644 index 0bd55d47..00000000 --- a/src/mistralai/client/models/chatcompletionchoice_union.py +++ /dev/null @@ -1,110 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 970941f980d1 - -from __future__ import annotations -from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from mistralai.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr -from pydantic import model_serializer -from typing import List, Literal, Optional, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -ChatCompletionChoiceFinishReason2 = Union[ - Literal[ - "stop", - "length", - "model_length", - "error", - "tool_calls", - ], - UnrecognizedStr, -] - - -class ChatCompletionChoice2TypedDict(TypedDict): - index: int - finish_reason: ChatCompletionChoiceFinishReason2 - messages: List[AssistantMessageTypedDict] - message: NotRequired[AssistantMessageTypedDict] - - -class ChatCompletionChoice2(BaseModel): - index: int - - finish_reason: ChatCompletionChoiceFinishReason2 - - messages: List[AssistantMessage] - - message: Optional[AssistantMessage] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["message"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m - - -ChatCompletionChoiceFinishReason1 = Union[ - Literal[ - "stop", - "length", - "model_length", - "error", - "tool_calls", - ], - UnrecognizedStr, -] - - -class ChatCompletionChoice1TypedDict(TypedDict): - index: int - message: AssistantMessageTypedDict - finish_reason: ChatCompletionChoiceFinishReason1 - messages: NotRequired[List[AssistantMessageTypedDict]] - - -class ChatCompletionChoice1(BaseModel): - index: int - - message: AssistantMessage - - finish_reason: ChatCompletionChoiceFinishReason1 - - messages: Optional[List[AssistantMessage]] = None - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["messages"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m - - -ChatCompletionChoiceUnionTypedDict = TypeAliasType( - "ChatCompletionChoiceUnionTypedDict", - Union[ChatCompletionChoice1TypedDict, ChatCompletionChoice2TypedDict], -) - - -ChatCompletionChoiceUnion = TypeAliasType( - "ChatCompletionChoiceUnion", Union[ChatCompletionChoice1, ChatCompletionChoice2] -) diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index 558efb76..f1b0b2d6 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -3,11 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict -from .customconnector import CustomConnector, CustomConnectorTypedDict -from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict -from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -18,8 +14,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -28,8 +22,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -import pydantic -from pydantic import ConfigDict, Discriminator, Tag, model_serializer +from pydantic import Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -68,47 +61,6 @@ ] -ChatCompletionRequestTools1TypedDict = TypeAliasType( - "ChatCompletionRequestTools1TypedDict", - Union[ - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, - ImageGenerationToolTypedDict, - ToolTypedDict, - DocumentLibraryToolTypedDict, - CustomConnectorTypedDict, - ], -) - - -ChatCompletionRequestTools1 = TypeAliasType( - "ChatCompletionRequestTools1", - Union[ - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - Tool, - DocumentLibraryTool, - CustomConnector, - ], -) - - -ChatCompletionRequestTools2TypedDict = TypeAliasType( - "ChatCompletionRequestTools2TypedDict", - Union[List[ChatCompletionRequestTools1TypedDict], List[str]], -) -r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" - - -ChatCompletionRequestTools2 = TypeAliasType( - "ChatCompletionRequestTools2", Union[List[ChatCompletionRequestTools1], List[str]] -) -r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" - - ChatCompletionRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -142,7 +94,7 @@ class ChatCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[ChatCompletionRequestTools2TypedDict]] + tools: NotRequired[Nullable[List[ToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -165,11 +117,6 @@ class ChatCompletionRequestTypedDict(TypedDict): class ChatCompletionRequest(BaseModel): - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - model: str r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.""" @@ -199,7 +146,7 @@ class ChatCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[ChatCompletionRequestTools2] = UNSET + tools: OptionalNullable[List[Tool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionRequestToolChoice] = None @@ -230,14 +177,6 @@ class ChatCompletionRequest(BaseModel): safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -282,7 +221,6 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -295,7 +233,5 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val - for k, v in serialized.items(): - m[k] = v return m diff --git a/src/mistralai/client/models/chatcompletionresponse.py b/src/mistralai/client/models/chatcompletionresponse.py index cdb7c37f..7092bbc1 100644 --- a/src/mistralai/client/models/chatcompletionresponse.py +++ b/src/mistralai/client/models/chatcompletionresponse.py @@ -2,10 +2,7 @@ # @generated-id: 669d996b8e82 from __future__ import annotations -from .chatcompletionchoice_union import ( - ChatCompletionChoiceUnion, - ChatCompletionChoiceUnionTypedDict, -) +from .chatcompletionchoice import ChatCompletionChoice, ChatCompletionChoiceTypedDict from .usageinfo import UsageInfo, UsageInfoTypedDict from mistralai.client.types import BaseModel from typing import List @@ -18,7 +15,7 @@ class ChatCompletionResponseTypedDict(TypedDict): model: str usage: UsageInfoTypedDict created: int - choices: List[ChatCompletionChoiceUnionTypedDict] + choices: List[ChatCompletionChoiceTypedDict] class ChatCompletionResponse(BaseModel): @@ -32,4 +29,4 @@ class ChatCompletionResponse(BaseModel): created: int - choices: List[ChatCompletionChoiceUnion] + choices: List[ChatCompletionChoice] diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index 4d92d524..d9f413c6 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -3,11 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict -from .customconnector import CustomConnector, CustomConnectorTypedDict -from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict -from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -18,8 +14,6 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict -from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict -from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -28,8 +22,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import get_discriminator -import pydantic -from pydantic import ConfigDict, Discriminator, Tag, model_serializer +from pydantic import Discriminator, Tag, model_serializer from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -68,48 +61,6 @@ ] -ChatCompletionStreamRequestTools1TypedDict = TypeAliasType( - "ChatCompletionStreamRequestTools1TypedDict", - Union[ - WebSearchToolTypedDict, - WebSearchPremiumToolTypedDict, - CodeInterpreterToolTypedDict, - ImageGenerationToolTypedDict, - ToolTypedDict, - DocumentLibraryToolTypedDict, - CustomConnectorTypedDict, - ], -) - - -ChatCompletionStreamRequestTools1 = TypeAliasType( - "ChatCompletionStreamRequestTools1", - Union[ - WebSearchTool, - WebSearchPremiumTool, - CodeInterpreterTool, - ImageGenerationTool, - Tool, - DocumentLibraryTool, - CustomConnector, - ], -) - - -ChatCompletionStreamRequestTools2TypedDict = TypeAliasType( - "ChatCompletionStreamRequestTools2TypedDict", - Union[List[ChatCompletionStreamRequestTools1TypedDict], List[str]], -) -r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" - - -ChatCompletionStreamRequestTools2 = TypeAliasType( - "ChatCompletionStreamRequestTools2", - Union[List[ChatCompletionStreamRequestTools1], List[str]], -) -r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" - - ChatCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -142,7 +93,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[ChatCompletionStreamRequestTools2TypedDict]] + tools: NotRequired[Nullable[List[ToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionStreamRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -165,11 +116,6 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): class ChatCompletionStreamRequest(BaseModel): - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - model: str r"""ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions.""" @@ -198,7 +144,7 @@ class ChatCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[ChatCompletionStreamRequestTools2] = UNSET + tools: OptionalNullable[List[Tool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None @@ -229,14 +175,6 @@ class ChatCompletionStreamRequest(BaseModel): safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -281,7 +219,6 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member @@ -294,7 +231,5 @@ def serialize_model(self, handler): or is_nullable_and_explicitly_set ): m[k] = val - for k, v in serialized.items(): - m[k] = v return m diff --git a/src/mistralai/client/models/codeinterpretertool.py b/src/mistralai/client/models/codeinterpretertool.py index 3c6a384f..4cf9d055 100644 --- a/src/mistralai/client/models/codeinterpretertool.py +++ b/src/mistralai/client/models/codeinterpretertool.py @@ -10,27 +10,33 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -CodeInterpreterToolType = Literal["code_interpreter",] +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict class CodeInterpreterToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: NotRequired[CodeInterpreterToolType] + type: Literal["code_interpreter"] class CodeInterpreterTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Optional[CodeInterpreterToolType] = "code_interpreter" + type: Annotated[ + Annotated[ + Literal["code_interpreter"], + AfterValidator(validate_const("code_interpreter")), + ], + pydantic.Field(alias="type"), + ] = "code_interpreter" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration", "type"]) + optional_fields = set(["tool_configuration"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -52,3 +58,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + CodeInterpreterTool.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index 5b6951bf..f7ed89b5 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -20,9 +20,9 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import get_discriminator, validate_const +from mistralai.client.utils import validate_const import pydantic -from pydantic import Discriminator, Tag, model_serializer +from pydantic import Field, model_serializer from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -50,15 +50,15 @@ ConversationRequestTool = Annotated[ Union[ - Annotated[CodeInterpreterTool, Tag("code_interpreter")], - Annotated[CustomConnector, Tag("connector")], - Annotated[DocumentLibraryTool, Tag("document_library")], - Annotated[FunctionTool, Tag("function")], - Annotated[ImageGenerationTool, Tag("image_generation")], - Annotated[WebSearchTool, Tag("web_search")], - Annotated[WebSearchPremiumTool, Tag("web_search_premium")], + CodeInterpreterTool, + CustomConnector, + DocumentLibraryTool, + FunctionTool, + ImageGenerationTool, + WebSearchTool, + WebSearchPremiumTool, ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), + Field(discriminator="type"), ] diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index 9a323e2a..4ec455b2 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -20,9 +20,9 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import get_discriminator, validate_const +from mistralai.client.utils import validate_const import pydantic -from pydantic import Discriminator, Tag, model_serializer +from pydantic import Field, model_serializer from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -50,15 +50,15 @@ ConversationStreamRequestTool = Annotated[ Union[ - Annotated[CodeInterpreterTool, Tag("code_interpreter")], - Annotated[CustomConnector, Tag("connector")], - Annotated[DocumentLibraryTool, Tag("document_library")], - Annotated[FunctionTool, Tag("function")], - Annotated[ImageGenerationTool, Tag("image_generation")], - Annotated[WebSearchTool, Tag("web_search")], - Annotated[WebSearchPremiumTool, Tag("web_search_premium")], + CodeInterpreterTool, + CustomConnector, + DocumentLibraryTool, + FunctionTool, + ImageGenerationTool, + WebSearchTool, + WebSearchPremiumTool, ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), + Field(discriminator="type"), ] diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index 78a9cd24..b31fbc91 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -19,8 +19,7 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import get_discriminator -from pydantic import Discriminator, Tag, model_serializer +from pydantic import Field, model_serializer from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -41,15 +40,15 @@ CreateAgentRequestTool = Annotated[ Union[ - Annotated[CodeInterpreterTool, Tag("code_interpreter")], - Annotated[CustomConnector, Tag("connector")], - Annotated[DocumentLibraryTool, Tag("document_library")], - Annotated[FunctionTool, Tag("function")], - Annotated[ImageGenerationTool, Tag("image_generation")], - Annotated[WebSearchTool, Tag("web_search")], - Annotated[WebSearchPremiumTool, Tag("web_search_premium")], + CodeInterpreterTool, + CustomConnector, + DocumentLibraryTool, + FunctionTool, + ImageGenerationTool, + WebSearchTool, + WebSearchPremiumTool, ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), + Field(discriminator="type"), ] diff --git a/src/mistralai/client/models/customconnector.py b/src/mistralai/client/models/customconnector.py index 9235dfd9..f3a1e2ff 100644 --- a/src/mistralai/client/models/customconnector.py +++ b/src/mistralai/client/models/customconnector.py @@ -13,16 +13,15 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const from mistralai.client.utils.unions import parse_open_union +import pydantic from pydantic import ConfigDict, model_serializer -from pydantic.functional_validators import BeforeValidator -from typing import Any, Literal, Optional, Union +from pydantic.functional_validators import AfterValidator, BeforeValidator +from typing import Any, Literal, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -CustomConnectorType = Literal["connector",] - - AuthorizationTypedDict = TypeAliasType( "AuthorizationTypedDict", Union[OAuth2TokenAuthTypedDict, APIKeyAuthTypedDict] ) @@ -60,7 +59,7 @@ class UnknownAuthorization(BaseModel): class CustomConnectorTypedDict(TypedDict): connector_id: str - type: NotRequired[CustomConnectorType] + type: Literal["connector"] authorization: NotRequired[Nullable[AuthorizationTypedDict]] tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] @@ -68,7 +67,10 @@ class CustomConnectorTypedDict(TypedDict): class CustomConnector(BaseModel): connector_id: str - type: Optional[CustomConnectorType] = "connector" + type: Annotated[ + Annotated[Literal["connector"], AfterValidator(validate_const("connector"))], + pydantic.Field(alias="type"), + ] = "connector" authorization: OptionalNullable[Authorization] = UNSET @@ -76,7 +78,7 @@ class CustomConnector(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["type", "authorization", "tool_configuration"]) + optional_fields = set(["authorization", "tool_configuration"]) nullable_fields = set(["authorization", "tool_configuration"]) serialized = handler(self) m = {} @@ -98,3 +100,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + CustomConnector.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/documentlibrarytool.py b/src/mistralai/client/models/documentlibrarytool.py index aa3093f4..29f8d64a 100644 --- a/src/mistralai/client/models/documentlibrarytool.py +++ b/src/mistralai/client/models/documentlibrarytool.py @@ -10,19 +10,19 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer -from typing import List, Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -DocumentLibraryToolType = Literal["document_library",] +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, NotRequired, TypedDict class DocumentLibraryToolTypedDict(TypedDict): library_ids: List[str] r"""Ids of the library in which to search.""" tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: NotRequired[DocumentLibraryToolType] + type: Literal["document_library"] class DocumentLibraryTool(BaseModel): @@ -31,11 +31,17 @@ class DocumentLibraryTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Optional[DocumentLibraryToolType] = "document_library" + type: Annotated[ + Annotated[ + Literal["document_library"], + AfterValidator(validate_const("document_library")), + ], + pydantic.Field(alias="type"), + ] = "document_library" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration", "type"]) + optional_fields = set(["tool_configuration"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -57,3 +63,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + DocumentLibraryTool.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/fimcompletionresponse.py b/src/mistralai/client/models/fimcompletionresponse.py index 441a9130..1345a116 100644 --- a/src/mistralai/client/models/fimcompletionresponse.py +++ b/src/mistralai/client/models/fimcompletionresponse.py @@ -2,10 +2,7 @@ # @generated-id: b860d2ba771e from __future__ import annotations -from .chatcompletionchoice_union import ( - ChatCompletionChoiceUnion, - ChatCompletionChoiceUnionTypedDict, -) +from .chatcompletionchoice import ChatCompletionChoice, ChatCompletionChoiceTypedDict from .usageinfo import UsageInfo, UsageInfoTypedDict from mistralai.client.types import BaseModel from typing import List @@ -18,7 +15,7 @@ class FIMCompletionResponseTypedDict(TypedDict): model: str usage: UsageInfoTypedDict created: int - choices: List[ChatCompletionChoiceUnionTypedDict] + choices: List[ChatCompletionChoiceTypedDict] class FIMCompletionResponse(BaseModel): @@ -32,4 +29,4 @@ class FIMCompletionResponse(BaseModel): created: int - choices: List[ChatCompletionChoiceUnion] + choices: List[ChatCompletionChoice] diff --git a/src/mistralai/client/models/imagegenerationtool.py b/src/mistralai/client/models/imagegenerationtool.py index 5012a565..0dd4a4d2 100644 --- a/src/mistralai/client/models/imagegenerationtool.py +++ b/src/mistralai/client/models/imagegenerationtool.py @@ -10,27 +10,33 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -ImageGenerationToolType = Literal["image_generation",] +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict class ImageGenerationToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: NotRequired[ImageGenerationToolType] + type: Literal["image_generation"] class ImageGenerationTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Optional[ImageGenerationToolType] = "image_generation" + type: Annotated[ + Annotated[ + Literal["image_generation"], + AfterValidator(validate_const("image_generation")), + ], + pydantic.Field(alias="type"), + ] = "image_generation" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration", "type"]) + optional_fields = set(["tool_configuration"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -52,3 +58,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + ImageGenerationTool.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index 8fec9149..df4664fa 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -19,8 +19,7 @@ UNSET, UNSET_SENTINEL, ) -from mistralai.client.utils import get_discriminator -from pydantic import Discriminator, Tag, model_serializer +from pydantic import Field, model_serializer from typing import List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -41,15 +40,15 @@ UpdateAgentRequestTool = Annotated[ Union[ - Annotated[CodeInterpreterTool, Tag("code_interpreter")], - Annotated[CustomConnector, Tag("connector")], - Annotated[DocumentLibraryTool, Tag("document_library")], - Annotated[FunctionTool, Tag("function")], - Annotated[ImageGenerationTool, Tag("image_generation")], - Annotated[WebSearchTool, Tag("web_search")], - Annotated[WebSearchPremiumTool, Tag("web_search_premium")], + CodeInterpreterTool, + CustomConnector, + DocumentLibraryTool, + FunctionTool, + ImageGenerationTool, + WebSearchTool, + WebSearchPremiumTool, ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), + Field(discriminator="type"), ] diff --git a/src/mistralai/client/models/websearchpremiumtool.py b/src/mistralai/client/models/websearchpremiumtool.py index 249e1840..5c929e94 100644 --- a/src/mistralai/client/models/websearchpremiumtool.py +++ b/src/mistralai/client/models/websearchpremiumtool.py @@ -10,27 +10,33 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -WebSearchPremiumToolType = Literal["web_search_premium",] +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict class WebSearchPremiumToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: NotRequired[WebSearchPremiumToolType] + type: Literal["web_search_premium"] class WebSearchPremiumTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Optional[WebSearchPremiumToolType] = "web_search_premium" + type: Annotated[ + Annotated[ + Literal["web_search_premium"], + AfterValidator(validate_const("web_search_premium")), + ], + pydantic.Field(alias="type"), + ] = "web_search_premium" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration", "type"]) + optional_fields = set(["tool_configuration"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -52,3 +58,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + WebSearchPremiumTool.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/websearchtool.py b/src/mistralai/client/models/websearchtool.py index 9f372ec0..f82b6ec1 100644 --- a/src/mistralai/client/models/websearchtool.py +++ b/src/mistralai/client/models/websearchtool.py @@ -10,27 +10,30 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer -from typing import Literal, Optional -from typing_extensions import NotRequired, TypedDict - - -WebSearchToolType = Literal["web_search",] +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict class WebSearchToolTypedDict(TypedDict): tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] - type: NotRequired[WebSearchToolType] + type: Literal["web_search"] class WebSearchTool(BaseModel): tool_configuration: OptionalNullable[ToolConfiguration] = UNSET - type: Optional[WebSearchToolType] = "web_search" + type: Annotated[ + Annotated[Literal["web_search"], AfterValidator(validate_const("web_search"))], + pydantic.Field(alias="type"), + ] = "web_search" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tool_configuration", "type"]) + optional_fields = set(["tool_configuration"]) nullable_fields = set(["tool_configuration"]) serialized = handler(self) m = {} @@ -52,3 +55,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + WebSearchTool.model_rebuild() +except NameError: + pass diff --git a/uv.lock b/uv.lock index 576da6b0..e3e432a4 100644 --- a/uv.lock +++ b/uv.lock @@ -551,7 +551,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.1.1" +version = "2.1.2" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 96c84d899db28b8c922dac9bac4b69350168979a Mon Sep 17 00:00:00 2001 From: Antoine <33425718+anth2o@users.noreply.github.com> Date: Fri, 20 Mar 2026 16:35:31 +0100 Subject: [PATCH 25/82] deps: add jsonpath in dependencies for pagination generated code (#440) --- pyproject.toml | 1 + uv.lock | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c1ea7450..504b6414 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ dependencies = [ "typing-inspection >=0.4.0", "opentelemetry-api (>=1.33.1,<2.0.0)", "opentelemetry-semantic-conventions (>=0.60b1,<0.61)", + "jsonpath-python >=1.0.6", # required for speakeasy generated path with pagination ] [project.optional-dependencies] diff --git a/uv.lock b/uv.lock index e3e432a4..95bce4fa 100644 --- a/uv.lock +++ b/uv.lock @@ -488,6 +488,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/b3/8def84f539e7d2289a02f0524b944b15d7c75dab7628bedf1c4f0992029c/isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6", size = 92310, upload-time = "2023-12-13T20:37:23.244Z" }, ] +[[package]] +name = "jsonpath-python" +version = "1.1.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2d/db/2f4ecc24da35c6142b39c353d5b7c16eef955cc94b35a48d3fa47996d7c3/jsonpath_python-1.1.5.tar.gz", hash = "sha256:ceea2efd9e56add09330a2c9631ea3d55297b9619348c1055e5bfb9cb0b8c538", size = 87352, upload-time = "2026-03-17T06:16:40.597Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/28/50/1a313fb700526b134c71eb8a225d8b83be0385dbb0204337b4379c698cef/jsonpath_python-1.1.5-py3-none-any.whl", hash = "sha256:a60315404d70a65e76c9a782c84e50600480221d94a58af47b7b4d437351cb4b", size = 14090, upload-time = "2026-03-17T06:16:39.152Z" }, +] + [[package]] name = "jsonschema" version = "4.25.1" @@ -556,6 +565,7 @@ source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, { name = "httpx" }, + { name = "jsonpath-python" }, { name = "opentelemetry-api" }, { name = "opentelemetry-semantic-conventions" }, { name = "pydantic" }, @@ -607,6 +617,7 @@ requires-dist = [ { name = "google-auth", marker = "extra == 'gcp'", specifier = ">=2.27.0" }, { name = "griffe", marker = "extra == 'agents'", specifier = ">=1.7.3,<2.0" }, { name = "httpx", specifier = ">=0.28.1" }, + { name = "jsonpath-python", specifier = ">=1.0.6" }, { name = "mcp", marker = "extra == 'agents'", specifier = ">=1.0,<2.0" }, { name = "opentelemetry-api", specifier = ">=1.33.1,<2.0.0" }, { name = "opentelemetry-semantic-conventions", specifier = ">=0.60b1,<0.61" }, From 92ab5c01e36cc740a6e7963267061ac0f5dceaca Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Mon, 23 Mar 2026 15:24:01 +0100 Subject: [PATCH 26/82] feat: add inferSSEOverload to true in gem.yaml (#445) --- .speakeasy/gen.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 2d939a25..38910bfd 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -20,6 +20,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false hoistGlobalSecurity: true + inferSSEOverload: true schemas: allOfMergeStrategy: shallowMerge requestBodyFieldName: "" From 9a4c1ba64b6484e2d13a7c472b8341ed2e487db9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:58:25 +0100 Subject: [PATCH 27/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.1.3=20(#447)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.connectors.list_tools()`: **Added** * chore: align pyproject.toml and uv.lock to version 2.1.3 * chore: trigger CI --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action Co-authored-by: Louis Sanna --- .speakeasy/gen.lock | 139 ++++++++++-- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 5 +- README.md | 5 +- RELEASES.md | 12 +- docs/models/connectorlisttoolsv1request.md | 12 + docs/models/mcptool.md | 17 ++ docs/models/mcptoolmeta.md | 14 ++ docs/models/mcpuitoolmeta.md | 12 + docs/models/responseconnectorlisttoolsv11.md | 17 ++ docs/models/responseconnectorlisttoolsv12.md | 19 ++ docs/models/tasksupport.md | 19 ++ docs/models/toolannotations.md | 22 ++ docs/models/toolexecution.md | 11 + docs/models/tooltype.md | 20 ++ docs/models/turbinetoollocale.md | 12 + docs/models/turbinetoolmeta.md | 11 + docs/models/visibility.md | 18 ++ docs/sdks/connectors/README.md | 46 ++++ pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/connectors.py | 208 ++++++++++++++++++ src/mistralai/client/models/__init__.py | 62 ++++++ .../models/connector_list_tools_v1op.py | 88 ++++++++ src/mistralai/client/models/mcptool.py | 122 ++++++++++ src/mistralai/client/models/mcptoolmeta.py | 87 ++++++++ src/mistralai/client/models/mcpuitoolmeta.py | 89 ++++++++ .../client/models/toolannotations.py | 126 +++++++++++ src/mistralai/client/models/toolexecution.py | 87 ++++++++ src/mistralai/client/models/tooltype.py | 17 ++ .../client/models/turbinetoollocale.py | 75 +++++++ .../client/models/turbinetoolmeta.py | 57 +++++ src/mistralai/client/speech.py | 156 ++++++++++++- uv.lock | 2 +- 35 files changed, 1564 insertions(+), 41 deletions(-) create mode 100644 docs/models/connectorlisttoolsv1request.md create mode 100644 docs/models/mcptool.md create mode 100644 docs/models/mcptoolmeta.md create mode 100644 docs/models/mcpuitoolmeta.md create mode 100644 docs/models/responseconnectorlisttoolsv11.md create mode 100644 docs/models/responseconnectorlisttoolsv12.md create mode 100644 docs/models/tasksupport.md create mode 100644 docs/models/toolannotations.md create mode 100644 docs/models/toolexecution.md create mode 100644 docs/models/tooltype.md create mode 100644 docs/models/turbinetoollocale.md create mode 100644 docs/models/turbinetoolmeta.md create mode 100644 docs/models/visibility.md create mode 100644 src/mistralai/client/models/connector_list_tools_v1op.py create mode 100644 src/mistralai/client/models/mcptool.py create mode 100644 src/mistralai/client/models/mcptoolmeta.py create mode 100644 src/mistralai/client/models/mcpuitoolmeta.py create mode 100644 src/mistralai/client/models/toolannotations.py create mode 100644 src/mistralai/client/models/toolexecution.py create mode 100644 src/mistralai/client/models/tooltype.py create mode 100644 src/mistralai/client/models/turbinetoollocale.py create mode 100644 src/mistralai/client/models/turbinetoolmeta.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 943cbc20..5f9243c3 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: b5e9004e334f10e92bcdd2dda5add214 + docChecksum: 55730589b8aa15c220d6d72eff876af4 docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.1.2 - configChecksum: eae98dd1cf81d8778436fcccb0cf416a + releaseVersion: 2.1.3 + configChecksum: f9314a8eb94dfdb80621f196b6abfd9c repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 5d5e9fc0-fa6b-4de0-a07a-341d5253e0bf - pristine_commit_hash: 71e334fc50f03122723915e87292d042754cf256 - pristine_tree_hash: 707ae8319edbeab9bafba92a056d810909f31a61 + generation_id: 8fcdbb7f-ada3-4a90-970d-e275c2dd2090 + pristine_commit_hash: c03ad2205c9bdefd33787d6b6d3ffc96b56c6f87 + pristine_tree_hash: 015ef7e1d24817483937f656f5f7a5d15ada1e8f features: python: acceptHeaders: 3.0.0 @@ -579,6 +579,10 @@ trackedFiles: id: 844c1f489684 last_write_checksum: sha1:e36ac8ff28ee258340868f8aa4f3172ed3b82ef3 pristine_git_object: c45148b97aad128744e0e6ccebb00bf22d400eff + docs/models/connectorlisttoolsv1request.md: + id: 43698382d3c4 + last_write_checksum: sha1:3c6e01a8fa0283300f3801bf7022599d75d12162 + pristine_git_object: e080455b986aa3aded7613a5654636c1188085d1 docs/models/connectorlistv1request.md: id: 68b7a11faff6 last_write_checksum: sha1:e08effc0f17a95383c3ba96b06b1dba80f4dc767 @@ -1539,6 +1543,18 @@ trackedFiles: id: 0b20f03adab8 last_write_checksum: sha1:d66113a4b0486f144b1f73f423559360ec751631 pristine_git_object: b0ae7da069119f7477ffa5ad756f353f56f213f1 + docs/models/mcptool.md: + id: f809e227a108 + last_write_checksum: sha1:90833e29c750ca8452cec010f91e451ead93049c + pristine_git_object: 006802b47caa662f9087357bf7fea45141b76788 + docs/models/mcptoolmeta.md: + id: 271159bcac6f + last_write_checksum: sha1:f88fc0a6c65c02b9fd6945a9db0b5704eed79c9e + pristine_git_object: 23e8b64c9584f1ef5f2ad56b70d5b57732159608 + docs/models/mcpuitoolmeta.md: + id: 95390caf0719 + last_write_checksum: sha1:e40fd3d493e32bb28fdb0ffc8fa7acb79acc1d30 + pristine_git_object: c09b29ad40fd96b944f7f9bf320b3a67bd587d5b docs/models/messageentries.md: id: 9af3a27b862b last_write_checksum: sha1:a3eb6e37b780644313738f84e6c5ac653b4686bc @@ -1867,6 +1883,14 @@ trackedFiles: id: 583c991c7a30 last_write_checksum: sha1:0791cb4aa4045708ab64d42bf67bd6ab74bc7752 pristine_git_object: ff67925758959b87992b47a1a32c224eeeb599e3 + docs/models/responseconnectorlisttoolsv11.md: + id: 6a5e4a2ba10b + last_write_checksum: sha1:9f2f54bdfb137736b24bafbc0d32c9826ffabfee + pristine_git_object: 9b5c98c6c4b3ba1292e18edccaafd9d78f934e76 + docs/models/responseconnectorlisttoolsv12.md: + id: c422816d84f9 + last_write_checksum: sha1:7db23fc2c5ade5ea4b04c70ebc629596545ccdb0 + pristine_git_object: 0266f66da4668a6fe33ed2b9a88278c57056576b docs/models/responsedoneevent.md: id: 38c38c3c065b last_write_checksum: sha1:4ac3a0fd91d5ebaccce7f4098ae416b56e08416f @@ -2011,6 +2035,10 @@ trackedFiles: id: d8cd08c55c3c last_write_checksum: sha1:3ef23d504527602f2d0789d2cfb1a6629115f41a pristine_git_object: 8321a3090910115b586be900bcf23da5baf4c245 + docs/models/tasksupport.md: + id: 58be1f1aef25 + last_write_checksum: sha1:2005c0e15f36bd315c17688daa4dd9a8c260b009 + pristine_git_object: 2d16da9de0af99ca5cecd7aab3349e13d22c7013 docs/models/textchunk.md: id: 6cd12e0ef110 last_write_checksum: sha1:d9fe94c670c5e0578212752c11a0c405a9da8518 @@ -2039,6 +2067,10 @@ trackedFiles: id: 8966139dbeed last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a pristine_git_object: fb661f72887271d5bb470e4edf025a32b00ade17 + docs/models/toolannotations.md: + id: ac541d142ff4 + last_write_checksum: sha1:54d9bfd3cd764d11cd993f7ff87784bd6d11f14d + pristine_git_object: f3c8fc3cf7d9b4587b47afaf67eb14608eb58b48 docs/models/toolcall.md: id: 80892ea1a051 last_write_checksum: sha1:cb27b9d36cfe6227978c7a7a01b1349b6bac99d9 @@ -2059,6 +2091,10 @@ trackedFiles: id: 06bfa2c4e662 last_write_checksum: sha1:9b619977375f228c76f09d48d6e2833add6c07e2 pristine_git_object: 89286a172124ce3473bcb081de6e4db8c95afefa + docs/models/toolexecution.md: + id: 0c47c08eaa46 + last_write_checksum: sha1:1af09b39f042e21e47ac09f73301ca9bbb521029 + pristine_git_object: 8d385132baca782d1a7ec0d586136a29751f6ec8 docs/models/toolexecutiondeltaevent.md: id: f2fc876ef7c6 last_write_checksum: sha1:ae1462a9b5cb56002b41f477ce262cb64ccf2f4e @@ -2115,6 +2151,10 @@ trackedFiles: id: c2210d74792a last_write_checksum: sha1:368add3ac6df876bc85bb4968de840ac578ae623 pristine_git_object: 999f7c34885015a687c4213d067b144f1585c946 + docs/models/tooltype.md: + id: 5e2ddf7b3863 + last_write_checksum: sha1:3aa9c92e9872fe75032e53e311bf050dbab51e98 + pristine_git_object: 2a64e130e526f8d99e623e7cbc0c7add82d8fab0 docs/models/tooltypes.md: id: adb50fe63ea2 last_write_checksum: sha1:d0d67b717773cbc99add6716e0287e64f04d24df @@ -2159,6 +2199,14 @@ trackedFiles: id: 69a13554b554 last_write_checksum: sha1:d969f462034ed356f2c8713b601ee7d873d4ce07 pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d + docs/models/turbinetoollocale.md: + id: 57197dc9a955 + last_write_checksum: sha1:8ec2a585bfc0f5dca7bbad5fe143d21b9e5f6cb8 + pristine_git_object: 283dd339629448669557acf2d6eda10dea735421 + docs/models/turbinetoolmeta.md: + id: f99b41288e88 + last_write_checksum: sha1:092cd9ae293706419a86fd69c490cbc6587965d3 + pristine_git_object: 2f61a2c4d8be1634ccbb1ef0adacde0c6722a9bd docs/models/typeenum.md: id: d306d1d601a4 last_write_checksum: sha1:f0f0bfac75bf5e5fcd972d0cb196961d512d40ad @@ -2255,6 +2303,10 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a + docs/models/visibility.md: + id: 69ecc096de1e + last_write_checksum: sha1:30226db515dbfeef9316552cf871cf6882f597d2 + pristine_git_object: 924f2bdd9bcaa0bc59ba7a28733ce53fa968f822 docs/models/voicecreaterequest.md: id: 1014a6e8d549 last_write_checksum: sha1:2eba4e618f2767df9ca52b8b352e3060e9d0f04e @@ -2321,8 +2373,8 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:0b4056d65c780ae2b3a6e4a9ea71ca0c38e7ff42 - pristine_git_object: f23a09f780eaaed4aeb7ee8f4a0347ce5de3efd4 + last_write_checksum: sha1:d236c2895bbc9f1797817578d3ad8530798af3bb + pristine_git_object: 99892188389f4d53ddb45459f641475954a1ee03 docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:e0b78791f14b76d486688c5aa829877d58ae36da @@ -2413,8 +2465,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:d7a3abfbd260f39e87a405377e56d9dd8a48439f - pristine_git_object: a5ba9a2a6bcff1a4b62db94c38d18b40c88813cc + last_write_checksum: sha1:4119527b41471c1a6571b0a33c6f5368dbae4077 + pristine_git_object: 68da4e561a187ec72d7a25b962d05112688779ee src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -2465,8 +2517,8 @@ trackedFiles: pristine_git_object: 67199b601e38dff6fc6a4317eb845fbde6c25de0 src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:80a42736f56e43ad286308010d494e0ed19597f0 - pristine_git_object: b72ca9a39a225cec099f6606afaf4463c294a97e + last_write_checksum: sha1:60d5d04e3650f48487df3cbb682c5646bf3c3a81 + pristine_git_object: e0c4793e40098f9055735edcfce4a1168f99918b src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:f5f2e6d1d78b75177d6b831b69b212956926eede @@ -2545,8 +2597,8 @@ trackedFiles: pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:a1e0aa6e1959ee7380d30eea984d79bcd84a6203 - pristine_git_object: 05756e5b68c67b3697636bc49939edc6e5b701e8 + last_write_checksum: sha1:299d59da943dc58f2bc4bf694d76d7172cbbd30e + pristine_git_object: 3ace7584ab83c9ee6d7fddfb5b0211fba63763b8 src/mistralai/client/models/agent.py: id: 1336849c84fb last_write_checksum: sha1:2574866d9855cb0b6314ac94ca288d59f3196c73 @@ -2883,6 +2935,10 @@ trackedFiles: id: 73ca3a446dcc last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 + src/mistralai/client/models/connector_list_tools_v1op.py: + id: 4c6ad704479b + last_write_checksum: sha1:cc6b39ad84831a838e0a70748c31c7acae946cee + pristine_git_object: eb5de3213915c8d748648796bd5f582acd2d24e3 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 @@ -3675,6 +3731,18 @@ trackedFiles: id: a5b508a322d7 last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 pristine_git_object: 293ab37505a1098241631dd83435a0e91d073551 + src/mistralai/client/models/mcptool.py: + id: 5a696c8478cb + last_write_checksum: sha1:c4b180a023664313dea583377b79bf53f0f93262 + pristine_git_object: 908ff8ce20773a4ca1fd80e47a588acc9ba401af + src/mistralai/client/models/mcptoolmeta.py: + id: 07cf1c0762c9 + last_write_checksum: sha1:01af35e36f16d4ab4318633b6d773550c8403108 + pristine_git_object: edbf39a9b4c066ea495471cf6ff21b08d8a390a6 + src/mistralai/client/models/mcpuitoolmeta.py: + id: 7c54fb6157a9 + last_write_checksum: sha1:a115ada5e6c22925919160a88a8358c16129bce2 + pristine_git_object: 287192a67a4fe1c22a209996db9b9e8df1a93359 src/mistralai/client/models/messageentries.py: id: e13f9009902b last_write_checksum: sha1:43aebdc9eaecc8341298dc6b281d0d57edf4e9e6 @@ -4075,6 +4143,10 @@ trackedFiles: id: 48b4f6f50fe9 last_write_checksum: sha1:ed3725d5da10e6a201f73724a2bbf618bdbb2a33 pristine_git_object: 1d1c5ce557321c33b036949fa4c625fb25e38f95 + src/mistralai/client/models/toolannotations.py: + id: 2ae257a35b01 + last_write_checksum: sha1:6f7c174966fc9a9fee5de7c8dfa4dbf2064c10e4 + pristine_git_object: b2e9b94808b96b859d29c42aa0d5ca994761a395 src/mistralai/client/models/toolcall.py: id: fb34a1a3f3c2 last_write_checksum: sha1:a0e14e69a107d88239e1ee43d2e8fd498eb034a4 @@ -4095,6 +4167,10 @@ trackedFiles: id: faec24b75066 last_write_checksum: sha1:caa6c41ccb0825034bb9cab4e3fcd1a2547b66a9 pristine_git_object: eb3d14e5517a60c1fbac1b1feb7d5daadd877a90 + src/mistralai/client/models/toolexecution.py: + id: 69fcb691327a + last_write_checksum: sha1:85bcd4a5d30aab54425bccec9c2374137fad6736 + pristine_git_object: 9c55e7bb9db0be106d30b9bf37153aaf8d7b61ff src/mistralai/client/models/toolexecutiondeltaevent.py: id: df8f17cf3e07 last_write_checksum: sha1:77da4c0bca920d4ea77a64faa039fb3c07df46ed @@ -4123,6 +4199,10 @@ trackedFiles: id: 822e9f3e70de last_write_checksum: sha1:2e489c4b2360741a3e4a20710361511a0d9158ea pristine_git_object: 391724edbb7eea3d3acd1a4b3302045970cb5e31 + src/mistralai/client/models/tooltype.py: + id: cbe8c44aee50 + last_write_checksum: sha1:53949106f192944a13a8fcbeb37b3d08478b7bbc + pristine_git_object: 1a7781fc2c1001002785d512ed7909ce91a9129f src/mistralai/client/models/tooltypes.py: id: 86c3b54272fd last_write_checksum: sha1:e90c15c1e645a5f207af0c7ac728cb0a521c6706 @@ -4163,6 +4243,14 @@ trackedFiles: id: 6086dc081147 last_write_checksum: sha1:968b4bc32731be6c63be3fd90eb26f4357f891a3 pristine_git_object: 42f0ffb7f16bee4f68f9db9807aa4ec3d9ae5176 + src/mistralai/client/models/turbinetoollocale.py: + id: 2699936a7546 + last_write_checksum: sha1:9fa6910a64b464068a660b3d5bf5e09109da283b + pristine_git_object: 42682ee15e542672c190e1b82e713539a6c9b22e + src/mistralai/client/models/turbinetoolmeta.py: + id: cdb07c3837f7 + last_write_checksum: sha1:c2339efbf6dac10bf5e3f42491fa971982d4a998 + pristine_git_object: bcd4d5f2da000bcc4af9c41bf7e92efdaf99b039 src/mistralai/client/models/unarchivemodelresponse.py: id: 22e2ccbb0c80 last_write_checksum: sha1:8ebdd49f2bef3c5934395808bf71701b46e512be @@ -4301,8 +4389,8 @@ trackedFiles: pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 src/mistralai/client/speech.py: id: 5c1f1109aa5e - last_write_checksum: sha1:64856e4330b793618c25288d44dfba000295ddcf - pristine_git_object: e548df4444f8fd0b5de58890de371b3a9bb31aed + last_write_checksum: sha1:22b38977bf8e1f53219a2146b15f471ad1ebf4f7 + pristine_git_object: fe57e2fa80ced90774b9ea60199e138ce781c9a3 src/mistralai/client/transcriptions.py: id: 75b45780c978 last_write_checksum: sha1:27a5b7dd6ed47b0f79b95fbb8599d439512ef344 @@ -6397,9 +6485,26 @@ examples: application/json: "" "422": application/json: {} + connector_list_tools_v1: + speakeasy-default-connector-list-tools-v1: + parameters: + path: + connector_id_or_name: "" + query: + page: 1 + page_size: 100 + refresh: false + pretty: false + responses: + "200": + application/json: [{}] + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.start()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.list()`: `response.[].union(ModelConversation).tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get()`: `response.union(ModelConversation).tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start_stream()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.create()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n * `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list()`: `response.[].tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get()`: `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update()`: \n * `request.tools[]` **Changed** (Breaking ⚠️)\n * `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update_version()`: `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list_versions()`: `response.[].tools[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get_version()`: `response.tools[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[]` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: `request` **Changed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[]` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: `request` **Changed** (Breaking ⚠️)\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.beta.connectors.list_tools()`: **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 38910bfd..390116a2 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.1.2 + version: 2.1.3 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 69bef81b..105cdb2a 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:2796a05e4b9f32ebc2ffa6b195b959507d7d2683f6b06593781cc8ebdcd7cb6f - sourceBlobDigest: sha256:9e5029c7cf5ae151e2b0a123e70013dc6d9a58b8127884cf33e85fa3be32abee + sourceRevisionDigest: sha256:480366372609b8e74697827a161a478dd87aa95460d0e078ecc73b5dfa0d00ff + sourceBlobDigest: sha256:23523b81989fa5223902dea44dd6bebf8eb7b1dceec5cc3aa4dbb969ecde6652 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:2796a05e4b9f32ebc2ffa6b195b959507d7d2683f6b06593781cc8ebdcd7cb6f - sourceBlobDigest: sha256:9e5029c7cf5ae151e2b0a123e70013dc6d9a58b8127884cf33e85fa3be32abee + sourceRevisionDigest: sha256:480366372609b8e74697827a161a478dd87aa95460d0e078ecc73b5dfa0d00ff + sourceBlobDigest: sha256:23523b81989fa5223902dea44dd6bebf8eb7b1dceec5cc3aa4dbb969ecde6652 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:5aa694bacc4be160d5afb6c05c08407744acbc82e951d650b2a2faaeb13e4271 + codeSamplesRevisionDigest: sha256:6d406cd8dd3e8da23675c1d278548dc5f54c616af47c94b0a704711a6b27d561 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/README-PYPI.md b/README-PYPI.md index 625c6558..1a0b2402 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -512,6 +512,7 @@ print(res.choices[0].message.content) * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list) - List all connectors. * [get_auth_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#call_tool) - Call Connector Tool +* [list_tools](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_tools) - List tools for a connector. * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get) - Get a connector. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#update) - Update a connector. * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete) - Delete a connector. @@ -850,8 +851,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 68 of 130 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 130 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 69 of 131 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 131 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index 54374697..46ad3c76 100644 --- a/README.md +++ b/README.md @@ -512,6 +512,7 @@ print(res.choices[0].message.content) * [list](docs/sdks/connectors/README.md#list) - List all connectors. * [get_auth_url](docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool +* [list_tools](docs/sdks/connectors/README.md#list_tools) - List tools for a connector. * [get](docs/sdks/connectors/README.md#get) - Get a connector. * [update](docs/sdks/connectors/README.md#update) - Update a connector. * [delete](docs/sdks/connectors/README.md#delete) - Delete a connector. @@ -850,8 +851,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 68 of 130 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 130 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 69 of 131 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 131 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index c557596d..954b2675 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -478,4 +478,14 @@ Based on: ### Generated - [python v2.1.2] . ### Releases -- [PyPI v2.1.2] https://pypi.org/project/mistralai/2.1.2 - . \ No newline at end of file +- [PyPI v2.1.2] https://pypi.org/project/mistralai/2.1.2 - . + +## 2026-03-23 14:35:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.3] . +### Releases +- [PyPI v2.1.3] https://pypi.org/project/mistralai/2.1.3 - . \ No newline at end of file diff --git a/docs/models/connectorlisttoolsv1request.md b/docs/models/connectorlisttoolsv1request.md new file mode 100644 index 00000000..e080455b --- /dev/null +++ b/docs/models/connectorlisttoolsv1request.md @@ -0,0 +1,12 @@ +# ConnectorListToolsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `refresh` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `pretty` | *Optional[bool]* | :heavy_minus_sign: | Return a simplified payload with only name, description, annotations, and a compact inputSchema. | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/mcptool.md b/docs/models/mcptool.md new file mode 100644 index 00000000..006802b4 --- /dev/null +++ b/docs/models/mcptool.md @@ -0,0 +1,17 @@ +# MCPTool + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `input_schema` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `output_schema` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `icons` | List[[models.MCPServerIcon](../models/mcpservericon.md)] | :heavy_minus_sign: | N/A | +| `annotations` | [OptionalNullable[models.ToolAnnotations]](../models/toolannotations.md) | :heavy_minus_sign: | N/A | +| `meta` | [OptionalNullable[models.MCPToolMeta]](../models/mcptoolmeta.md) | :heavy_minus_sign: | N/A | +| `execution` | [OptionalNullable[models.ToolExecution]](../models/toolexecution.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcptoolmeta.md b/docs/models/mcptoolmeta.md new file mode 100644 index 00000000..23e8b64c --- /dev/null +++ b/docs/models/mcptoolmeta.md @@ -0,0 +1,14 @@ +# MCPToolMeta + +Typed _meta for MCP tools. + +Only the 'ui' field is typed. Other fields are allowed via extra="allow". + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `ui` | [OptionalNullable[models.MCPUIToolMeta]](../models/mcpuitoolmeta.md) | :heavy_minus_sign: | N/A | +| `ai_mistral_turbine` | [OptionalNullable[models.TurbineToolMeta]](../models/turbinetoolmeta.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpuitoolmeta.md b/docs/models/mcpuitoolmeta.md new file mode 100644 index 00000000..c09b29ad --- /dev/null +++ b/docs/models/mcpuitoolmeta.md @@ -0,0 +1,12 @@ +# MCPUIToolMeta + +UI metadata for tools that reference UI resources. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `resource_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `visibility` | List[[models.Visibility](../models/visibility.md)] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/responseconnectorlisttoolsv11.md b/docs/models/responseconnectorlisttoolsv11.md new file mode 100644 index 00000000..9b5c98c6 --- /dev/null +++ b/docs/models/responseconnectorlisttoolsv11.md @@ -0,0 +1,17 @@ +# ResponseConnectorListToolsV11 + + +## Supported Types + +### `models.ConnectorTool` + +```python +value: models.ConnectorTool = /* values here */ +``` + +### `models.MCPTool` + +```python +value: models.MCPTool = /* values here */ +``` + diff --git a/docs/models/responseconnectorlisttoolsv12.md b/docs/models/responseconnectorlisttoolsv12.md new file mode 100644 index 00000000..0266f66d --- /dev/null +++ b/docs/models/responseconnectorlisttoolsv12.md @@ -0,0 +1,19 @@ +# ResponseConnectorListToolsV12 + +Successful Response + + +## Supported Types + +### `List[models.ResponseConnectorListToolsV11]` + +```python +value: List[models.ResponseConnectorListToolsV11] = /* values here */ +``` + +### `List[Dict[str, Any]]` + +```python +value: List[Dict[str, Any]] = /* values here */ +``` + diff --git a/docs/models/tasksupport.md b/docs/models/tasksupport.md new file mode 100644 index 00000000..2d16da9d --- /dev/null +++ b/docs/models/tasksupport.md @@ -0,0 +1,19 @@ +# TaskSupport + +## Example Usage + +```python +from mistralai.client.models import TaskSupport + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TaskSupport = "forbidden" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"forbidden"` +- `"optional"` +- `"required"` diff --git a/docs/models/toolannotations.md b/docs/models/toolannotations.md new file mode 100644 index 00000000..f3c8fc3c --- /dev/null +++ b/docs/models/toolannotations.md @@ -0,0 +1,22 @@ +# ToolAnnotations + +Additional properties describing a Tool to clients. + +NOTE: all properties in ToolAnnotations are **hints**. +They are not guaranteed to provide a faithful description of +tool behavior (including descriptive properties like `title`). + +Clients should never make tool use decisions based on ToolAnnotations +received from untrusted servers. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `read_only_hint` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `destructive_hint` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `idempotent_hint` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `open_world_hint` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/toolexecution.md b/docs/models/toolexecution.md new file mode 100644 index 00000000..8d385132 --- /dev/null +++ b/docs/models/toolexecution.md @@ -0,0 +1,11 @@ +# ToolExecution + +Execution-related properties for a tool. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `task_support` | [OptionalNullable[models.TaskSupport]](../models/tasksupport.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tooltype.md b/docs/models/tooltype.md new file mode 100644 index 00000000..2a64e130 --- /dev/null +++ b/docs/models/tooltype.md @@ -0,0 +1,20 @@ +# ToolType + +## Example Usage + +```python +from mistralai.client.models import ToolType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ToolType = "rag" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"rag"` +- `"image"` +- `"code"` +- `"event"` diff --git a/docs/models/turbinetoollocale.md b/docs/models/turbinetoollocale.md new file mode 100644 index 00000000..283dd339 --- /dev/null +++ b/docs/models/turbinetoollocale.md @@ -0,0 +1,12 @@ +# TurbineToolLocale + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `name` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `description` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `usage_sentence` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `working_description` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `done_description` | Dict[str, *str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/turbinetoolmeta.md b/docs/models/turbinetoolmeta.md new file mode 100644 index 00000000..2f61a2c4 --- /dev/null +++ b/docs/models/turbinetoolmeta.md @@ -0,0 +1,11 @@ +# TurbineToolMeta + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `locale` | [OptionalNullable[models.TurbineToolLocale]](../models/turbinetoollocale.md) | :heavy_minus_sign: | N/A | +| `tool_type` | [OptionalNullable[models.ToolType]](../models/tooltype.md) | :heavy_minus_sign: | N/A | +| `timeout` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `private_execution` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/visibility.md b/docs/models/visibility.md new file mode 100644 index 00000000..924f2bdd --- /dev/null +++ b/docs/models/visibility.md @@ -0,0 +1,18 @@ +# Visibility + +## Example Usage + +```python +from mistralai.client.models import Visibility + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Visibility = "model" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"model"` +- `"app"` diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index f23a09f7..99892188 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -10,6 +10,7 @@ * [list](#list) - List all connectors. * [get_auth_url](#get_auth_url) - Get the auth URL for a connector. * [call_tool](#call_tool) - Call Connector Tool +* [list_tools](#list_tools) - List tools for a connector. * [get](#get) - Get a connector. * [update](#update) - Update a connector. * [delete](#delete) - Delete a connector. @@ -190,6 +191,51 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## list_tools + +List all tools available for an MCP connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list_tools(connector_id_or_name="", page=1, page_size=100, refresh=False, pretty=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `refresh` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `pretty` | *Optional[bool]* | :heavy_minus_sign: | Return a simplified payload with only name, description, annotations, and a compact inputSchema. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ResponseConnectorListToolsV12](../../models/responseconnectorlisttoolsv12.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## get Get a connector by its ID or name. diff --git a/pyproject.toml b/pyproject.toml index 504b6414..7be2c9e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.1.2" +version = "2.1.3" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index a5ba9a2a..68da4e56 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.1.2" +__version__: str = "2.1.3" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.1.2 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.1.3 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index b72ca9a3..e0c4793e 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -845,6 +845,214 @@ async def call_tool_async( raise errors.SDKError("Unexpected response received", http_res) + def list_tools( + self, + *, + connector_id_or_name: str, + page: Optional[int] = 1, + page_size: Optional[int] = 100, + refresh: Optional[bool] = False, + pretty: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ResponseConnectorListToolsV12: + r"""List tools for a connector. + + List all tools available for an MCP connector. + + :param connector_id_or_name: + :param page: + :param page_size: + :param refresh: + :param pretty: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListToolsV1Request( + page=page, + page_size=page_size, + refresh=refresh, + pretty=pretty, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/tools", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_tools_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ResponseConnectorListToolsV12, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_tools_async( + self, + *, + connector_id_or_name: str, + page: Optional[int] = 1, + page_size: Optional[int] = 100, + refresh: Optional[bool] = False, + pretty: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ResponseConnectorListToolsV12: + r"""List tools for a connector. + + List all tools available for an MCP connector. + + :param connector_id_or_name: + :param page: + :param page_size: + :param refresh: + :param pretty: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListToolsV1Request( + page=page, + page_size=page_size, + refresh=refresh, + pretty=pretty, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/tools", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_tools_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ResponseConnectorListToolsV12, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def get( self, *, diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 05756e5b..3ace7584 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -344,6 +344,14 @@ ConnectorGetV1Request, ConnectorGetV1RequestTypedDict, ) + from .connector_list_tools_v1op import ( + ConnectorListToolsV1Request, + ConnectorListToolsV1RequestTypedDict, + ResponseConnectorListToolsV11, + ResponseConnectorListToolsV11TypedDict, + ResponseConnectorListToolsV12, + ResponseConnectorListToolsV12TypedDict, + ) from .connector_list_v1op import ( ConnectorListV1Request, ConnectorListV1RequestTypedDict, @@ -1056,6 +1064,9 @@ ) from .listsharingresponse import ListSharingResponse, ListSharingResponseTypedDict from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict + from .mcptool import MCPTool, MCPToolTypedDict + from .mcptoolmeta import MCPToolMeta, MCPToolMetaTypedDict + from .mcpuitoolmeta import MCPUIToolMeta, MCPUIToolMetaTypedDict, Visibility from .messageentries import MessageEntries, MessageEntriesTypedDict from .messageinputcontentchunks import ( MessageInputContentChunks, @@ -1326,6 +1337,7 @@ from .thinkchunk import ThinkChunk, ThinkChunkTypedDict, Thinking, ThinkingTypedDict from .timestampgranularity import TimestampGranularity from .tool import Tool, ToolTypedDict + from .toolannotations import ToolAnnotations, ToolAnnotationsTypedDict from .toolcall import ToolCall, ToolCallTypedDict from .toolcallconfirmation import ( Confirmation, @@ -1335,6 +1347,7 @@ from .toolchoice import ToolChoice, ToolChoiceTypedDict from .toolchoiceenum import ToolChoiceEnum from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict + from .toolexecution import TaskSupport, ToolExecution, ToolExecutionTypedDict from .toolexecutiondeltaevent import ( ToolExecutionDeltaEvent, ToolExecutionDeltaEventName, @@ -1377,6 +1390,7 @@ ToolReferenceChunkToolTypedDict, ToolReferenceChunkTypedDict, ) + from .tooltype import ToolType from .tooltypes import ToolTypes from .trainingfile import TrainingFile, TrainingFileTypedDict from .transcriptionresponse import ( @@ -1411,6 +1425,8 @@ TranscriptionStreamTextDelta, TranscriptionStreamTextDeltaTypedDict, ) + from .turbinetoollocale import TurbineToolLocale, TurbineToolLocaleTypedDict + from .turbinetoolmeta import TurbineToolMeta, TurbineToolMetaTypedDict from .unarchivemodelresponse import ( UnarchiveModelResponse, UnarchiveModelResponseTypedDict, @@ -1751,6 +1767,8 @@ "ConnectorGetAuthURLV1RequestTypedDict", "ConnectorGetV1Request", "ConnectorGetV1RequestTypedDict", + "ConnectorListToolsV1Request", + "ConnectorListToolsV1RequestTypedDict", "ConnectorListV1Request", "ConnectorListV1RequestTypedDict", "ConnectorTool", @@ -2211,6 +2229,12 @@ "LocTypedDict", "MCPServerIcon", "MCPServerIconTypedDict", + "MCPTool", + "MCPToolMeta", + "MCPToolMetaTypedDict", + "MCPToolTypedDict", + "MCPUIToolMeta", + "MCPUIToolMetaTypedDict", "MessageEntries", "MessageEntriesTypedDict", "MessageInputContentChunks", @@ -2364,6 +2388,10 @@ "ResourceTypedDict", "ResourceVisibility", "Response", + "ResponseConnectorListToolsV11", + "ResponseConnectorListToolsV11TypedDict", + "ResponseConnectorListToolsV12", + "ResponseConnectorListToolsV12TypedDict", "ResponseDoneEvent", "ResponseDoneEventTypedDict", "ResponseErrorEvent", @@ -2426,6 +2454,7 @@ "SystemMessageContentTypedDict", "SystemMessageTypedDict", "TableFormat", + "TaskSupport", "TextChunk", "TextChunkTypedDict", "TextContent", @@ -2438,6 +2467,8 @@ "ThinkingTypedDict", "TimestampGranularity", "Tool", + "ToolAnnotations", + "ToolAnnotationsTypedDict", "ToolCall", "ToolCallConfirmation", "ToolCallConfirmationTypedDict", @@ -2447,6 +2478,7 @@ "ToolChoiceTypedDict", "ToolConfiguration", "ToolConfigurationTypedDict", + "ToolExecution", "ToolExecutionDeltaEvent", "ToolExecutionDeltaEventName", "ToolExecutionDeltaEventNameTypedDict", @@ -2463,6 +2495,7 @@ "ToolExecutionStartedEventName", "ToolExecutionStartedEventNameTypedDict", "ToolExecutionStartedEventTypedDict", + "ToolExecutionTypedDict", "ToolFileChunk", "ToolFileChunkTool", "ToolFileChunkToolTypedDict", @@ -2475,6 +2508,7 @@ "ToolReferenceChunkTool", "ToolReferenceChunkToolTypedDict", "ToolReferenceChunkTypedDict", + "ToolType", "ToolTypedDict", "ToolTypes", "TrainingFile", @@ -2496,6 +2530,10 @@ "TranscriptionStreamSegmentDeltaTypedDict", "TranscriptionStreamTextDelta", "TranscriptionStreamTextDeltaTypedDict", + "TurbineToolLocale", + "TurbineToolLocaleTypedDict", + "TurbineToolMeta", + "TurbineToolMetaTypedDict", "TypeEnum", "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", @@ -2564,6 +2602,7 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", + "Visibility", "VoiceCreateRequest", "VoiceCreateRequestTypedDict", "VoiceListResponse", @@ -2822,6 +2861,12 @@ "ConnectorGetAuthURLV1RequestTypedDict": ".connector_get_auth_url_v1op", "ConnectorGetV1Request": ".connector_get_v1op", "ConnectorGetV1RequestTypedDict": ".connector_get_v1op", + "ConnectorListToolsV1Request": ".connector_list_tools_v1op", + "ConnectorListToolsV1RequestTypedDict": ".connector_list_tools_v1op", + "ResponseConnectorListToolsV11": ".connector_list_tools_v1op", + "ResponseConnectorListToolsV11TypedDict": ".connector_list_tools_v1op", + "ResponseConnectorListToolsV12": ".connector_list_tools_v1op", + "ResponseConnectorListToolsV12TypedDict": ".connector_list_tools_v1op", "ConnectorListV1Request": ".connector_list_v1op", "ConnectorListV1RequestTypedDict": ".connector_list_v1op", "ConnectorUpdateV1Request": ".connector_update_v1op", @@ -3302,6 +3347,13 @@ "ListSharingResponseTypedDict": ".listsharingresponse", "MCPServerIcon": ".mcpservericon", "MCPServerIconTypedDict": ".mcpservericon", + "MCPTool": ".mcptool", + "MCPToolTypedDict": ".mcptool", + "MCPToolMeta": ".mcptoolmeta", + "MCPToolMetaTypedDict": ".mcptoolmeta", + "MCPUIToolMeta": ".mcpuitoolmeta", + "MCPUIToolMetaTypedDict": ".mcpuitoolmeta", + "Visibility": ".mcpuitoolmeta", "MessageEntries": ".messageentries", "MessageEntriesTypedDict": ".messageentries", "MessageInputContentChunks": ".messageinputcontentchunks", @@ -3521,6 +3573,8 @@ "TimestampGranularity": ".timestampgranularity", "Tool": ".tool", "ToolTypedDict": ".tool", + "ToolAnnotations": ".toolannotations", + "ToolAnnotationsTypedDict": ".toolannotations", "ToolCall": ".toolcall", "ToolCallTypedDict": ".toolcall", "Confirmation": ".toolcallconfirmation", @@ -3531,6 +3585,9 @@ "ToolChoiceEnum": ".toolchoiceenum", "ToolConfiguration": ".toolconfiguration", "ToolConfigurationTypedDict": ".toolconfiguration", + "TaskSupport": ".toolexecution", + "ToolExecution": ".toolexecution", + "ToolExecutionTypedDict": ".toolexecution", "ToolExecutionDeltaEvent": ".toolexecutiondeltaevent", "ToolExecutionDeltaEventName": ".toolexecutiondeltaevent", "ToolExecutionDeltaEventNameTypedDict": ".toolexecutiondeltaevent", @@ -3559,6 +3616,7 @@ "ToolReferenceChunkTool": ".toolreferencechunk", "ToolReferenceChunkToolTypedDict": ".toolreferencechunk", "ToolReferenceChunkTypedDict": ".toolreferencechunk", + "ToolType": ".tooltype", "ToolTypes": ".tooltypes", "TrainingFile": ".trainingfile", "TrainingFileTypedDict": ".trainingfile", @@ -3580,6 +3638,10 @@ "TranscriptionStreamSegmentDeltaTypedDict": ".transcriptionstreamsegmentdelta", "TranscriptionStreamTextDelta": ".transcriptionstreamtextdelta", "TranscriptionStreamTextDeltaTypedDict": ".transcriptionstreamtextdelta", + "TurbineToolLocale": ".turbinetoollocale", + "TurbineToolLocaleTypedDict": ".turbinetoollocale", + "TurbineToolMeta": ".turbinetoolmeta", + "TurbineToolMetaTypedDict": ".turbinetoolmeta", "UnarchiveModelResponse": ".unarchivemodelresponse", "UnarchiveModelResponseTypedDict": ".unarchivemodelresponse", "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest": ".update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop", diff --git a/src/mistralai/client/models/connector_list_tools_v1op.py b/src/mistralai/client/models/connector_list_tools_v1op.py new file mode 100644 index 00000000..eb5de321 --- /dev/null +++ b/src/mistralai/client/models/connector_list_tools_v1op.py @@ -0,0 +1,88 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4c6ad704479b + +from __future__ import annotations +from .connectortool import ConnectorTool, ConnectorToolTypedDict +from .mcptool import MCPTool, MCPToolTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class ConnectorListToolsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + page: NotRequired[int] + page_size: NotRequired[int] + refresh: NotRequired[bool] + pretty: NotRequired[bool] + r"""Return a simplified payload with only name, description, annotations, and a compact inputSchema.""" + + +class ConnectorListToolsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 1 + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 100 + + refresh: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + pretty: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Return a simplified payload with only name, description, annotations, and a compact inputSchema.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page", "page_size", "refresh", "pretty"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +ResponseConnectorListToolsV11TypedDict = TypeAliasType( + "ResponseConnectorListToolsV11TypedDict", + Union[MCPToolTypedDict, ConnectorToolTypedDict], +) + + +ResponseConnectorListToolsV11 = TypeAliasType( + "ResponseConnectorListToolsV11", Union[MCPTool, ConnectorTool] +) + + +ResponseConnectorListToolsV12TypedDict = TypeAliasType( + "ResponseConnectorListToolsV12TypedDict", + Union[List[ResponseConnectorListToolsV11TypedDict], List[Dict[str, Any]]], +) +r"""Successful Response""" + + +ResponseConnectorListToolsV12 = TypeAliasType( + "ResponseConnectorListToolsV12", + Union[List[ResponseConnectorListToolsV11], List[Dict[str, Any]]], +) +r"""Successful Response""" diff --git a/src/mistralai/client/models/mcptool.py b/src/mistralai/client/models/mcptool.py new file mode 100644 index 00000000..908ff8ce --- /dev/null +++ b/src/mistralai/client/models/mcptool.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5a696c8478cb + +from __future__ import annotations +from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict +from .mcptoolmeta import MCPToolMeta, MCPToolMetaTypedDict +from .toolannotations import ToolAnnotations, ToolAnnotationsTypedDict +from .toolexecution import ToolExecution, ToolExecutionTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List +from typing_extensions import Annotated, NotRequired, TypedDict + + +class MCPToolTypedDict(TypedDict): + name: str + input_schema: Dict[str, Any] + title: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + output_schema: NotRequired[Nullable[Dict[str, Any]]] + icons: NotRequired[Nullable[List[MCPServerIconTypedDict]]] + annotations: NotRequired[Nullable[ToolAnnotationsTypedDict]] + meta: NotRequired[Nullable[MCPToolMetaTypedDict]] + execution: NotRequired[Nullable[ToolExecutionTypedDict]] + + +class MCPTool(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + name: str + + input_schema: Annotated[Dict[str, Any], pydantic.Field(alias="inputSchema")] + + title: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + output_schema: Annotated[ + OptionalNullable[Dict[str, Any]], pydantic.Field(alias="outputSchema") + ] = UNSET + + icons: OptionalNullable[List[MCPServerIcon]] = UNSET + + annotations: OptionalNullable[ToolAnnotations] = UNSET + + meta: Annotated[OptionalNullable[MCPToolMeta], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + execution: OptionalNullable[ToolExecution] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "title", + "description", + "outputSchema", + "icons", + "annotations", + "_meta", + "execution", + ] + ) + nullable_fields = set( + [ + "title", + "description", + "outputSchema", + "icons", + "annotations", + "_meta", + "execution", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + MCPTool.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mcptoolmeta.py b/src/mistralai/client/models/mcptoolmeta.py new file mode 100644 index 00000000..edbf39a9 --- /dev/null +++ b/src/mistralai/client/models/mcptoolmeta.py @@ -0,0 +1,87 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 07cf1c0762c9 + +from __future__ import annotations +from .mcpuitoolmeta import MCPUIToolMeta, MCPUIToolMetaTypedDict +from .turbinetoolmeta import TurbineToolMeta, TurbineToolMetaTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class MCPToolMetaTypedDict(TypedDict): + r"""Typed _meta for MCP tools. + + Only the 'ui' field is typed. Other fields are allowed via extra=\"allow\". + """ + + ui: NotRequired[Nullable[MCPUIToolMetaTypedDict]] + ai_mistral_turbine: NotRequired[Nullable[TurbineToolMetaTypedDict]] + + +class MCPToolMeta(BaseModel): + r"""Typed _meta for MCP tools. + + Only the 'ui' field is typed. Other fields are allowed via extra=\"allow\". + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + ui: OptionalNullable[MCPUIToolMeta] = UNSET + + ai_mistral_turbine: Annotated[ + OptionalNullable[TurbineToolMeta], pydantic.Field(alias="ai.mistral/turbine") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ui", "ai.mistral/turbine"]) + nullable_fields = set(["ui", "ai.mistral/turbine"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + MCPToolMeta.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mcpuitoolmeta.py b/src/mistralai/client/models/mcpuitoolmeta.py new file mode 100644 index 00000000..287192a6 --- /dev/null +++ b/src/mistralai/client/models/mcpuitoolmeta.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7c54fb6157a9 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +Visibility = Union[ + Literal[ + "model", + "app", + ], + UnrecognizedStr, +] + + +class MCPUIToolMetaTypedDict(TypedDict): + r"""UI metadata for tools that reference UI resources.""" + + resource_uri: NotRequired[Nullable[str]] + visibility: NotRequired[Nullable[List[Visibility]]] + + +class MCPUIToolMeta(BaseModel): + r"""UI metadata for tools that reference UI resources.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + resource_uri: Annotated[ + OptionalNullable[str], pydantic.Field(alias="resourceUri") + ] = UNSET + + visibility: OptionalNullable[List[Visibility]] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["resourceUri", "visibility"]) + nullable_fields = set(["resourceUri", "visibility"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + MCPUIToolMeta.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/toolannotations.py b/src/mistralai/client/models/toolannotations.py new file mode 100644 index 00000000..b2e9b948 --- /dev/null +++ b/src/mistralai/client/models/toolannotations.py @@ -0,0 +1,126 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2ae257a35b01 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ToolAnnotationsTypedDict(TypedDict): + r"""Additional properties describing a Tool to clients. + + NOTE: all properties in ToolAnnotations are **hints**. + They are not guaranteed to provide a faithful description of + tool behavior (including descriptive properties like `title`). + + Clients should never make tool use decisions based on ToolAnnotations + received from untrusted servers. + """ + + title: NotRequired[Nullable[str]] + read_only_hint: NotRequired[Nullable[bool]] + destructive_hint: NotRequired[Nullable[bool]] + idempotent_hint: NotRequired[Nullable[bool]] + open_world_hint: NotRequired[Nullable[bool]] + + +class ToolAnnotations(BaseModel): + r"""Additional properties describing a Tool to clients. + + NOTE: all properties in ToolAnnotations are **hints**. + They are not guaranteed to provide a faithful description of + tool behavior (including descriptive properties like `title`). + + Clients should never make tool use decisions based on ToolAnnotations + received from untrusted servers. + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + title: OptionalNullable[str] = UNSET + + read_only_hint: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="readOnlyHint") + ] = UNSET + + destructive_hint: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="destructiveHint") + ] = UNSET + + idempotent_hint: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="idempotentHint") + ] = UNSET + + open_world_hint: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="openWorldHint") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "title", + "readOnlyHint", + "destructiveHint", + "idempotentHint", + "openWorldHint", + ] + ) + nullable_fields = set( + [ + "title", + "readOnlyHint", + "destructiveHint", + "idempotentHint", + "openWorldHint", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + ToolAnnotations.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/toolexecution.py b/src/mistralai/client/models/toolexecution.py new file mode 100644 index 00000000..9c55e7bb --- /dev/null +++ b/src/mistralai/client/models/toolexecution.py @@ -0,0 +1,87 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 69fcb691327a + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +TaskSupport = Union[ + Literal[ + "forbidden", + "optional", + "required", + ], + UnrecognizedStr, +] + + +class ToolExecutionTypedDict(TypedDict): + r"""Execution-related properties for a tool.""" + + task_support: NotRequired[Nullable[TaskSupport]] + + +class ToolExecution(BaseModel): + r"""Execution-related properties for a tool.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + task_support: Annotated[ + OptionalNullable[TaskSupport], pydantic.Field(alias="taskSupport") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["taskSupport"]) + nullable_fields = set(["taskSupport"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + ToolExecution.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tooltype.py b/src/mistralai/client/models/tooltype.py new file mode 100644 index 00000000..1a7781fc --- /dev/null +++ b/src/mistralai/client/models/tooltype.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cbe8c44aee50 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ToolType = Union[ + Literal[ + "rag", + "image", + "code", + "event", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/turbinetoollocale.py b/src/mistralai/client/models/turbinetoollocale.py new file mode 100644 index 00000000..42682ee1 --- /dev/null +++ b/src/mistralai/client/models/turbinetoollocale.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2699936a7546 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class TurbineToolLocaleTypedDict(TypedDict): + name: NotRequired[Nullable[Dict[str, str]]] + description: NotRequired[Nullable[Dict[str, str]]] + usage_sentence: NotRequired[Nullable[Dict[str, str]]] + working_description: NotRequired[Nullable[Dict[str, str]]] + done_description: NotRequired[Nullable[Dict[str, str]]] + + +class TurbineToolLocale(BaseModel): + name: OptionalNullable[Dict[str, str]] = UNSET + + description: OptionalNullable[Dict[str, str]] = UNSET + + usage_sentence: OptionalNullable[Dict[str, str]] = UNSET + + working_description: OptionalNullable[Dict[str, str]] = UNSET + + done_description: OptionalNullable[Dict[str, str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "name", + "description", + "usage_sentence", + "working_description", + "done_description", + ] + ) + nullable_fields = set( + [ + "name", + "description", + "usage_sentence", + "working_description", + "done_description", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/turbinetoolmeta.py b/src/mistralai/client/models/turbinetoolmeta.py new file mode 100644 index 00000000..bcd4d5f2 --- /dev/null +++ b/src/mistralai/client/models/turbinetoolmeta.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cdb07c3837f7 + +from __future__ import annotations +from .tooltype import ToolType +from .turbinetoollocale import TurbineToolLocale, TurbineToolLocaleTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class TurbineToolMetaTypedDict(TypedDict): + locale: NotRequired[Nullable[TurbineToolLocaleTypedDict]] + tool_type: NotRequired[Nullable[ToolType]] + timeout: NotRequired[Nullable[float]] + private_execution: NotRequired[Nullable[bool]] + + +class TurbineToolMeta(BaseModel): + locale: OptionalNullable[TurbineToolLocale] = UNSET + + tool_type: OptionalNullable[ToolType] = UNSET + + timeout: OptionalNullable[float] = UNSET + + private_execution: OptionalNullable[bool] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["locale", "tool_type", "timeout", "private_execution"]) + nullable_fields = set(["locale", "tool_type", "timeout", "private_execution"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py index e548df44..fe57e2fa 100644 --- a/src/mistralai/client/speech.py +++ b/src/mistralai/client/speech.py @@ -8,7 +8,7 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import eventstreaming, get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Dict, Mapping, Optional, Union +from typing import Any, Dict, Literal, Mapping, Optional, Union, overload class CompleteAcceptEnum(str, Enum): @@ -17,6 +17,78 @@ class CompleteAcceptEnum(str, Enum): class Speech(BaseSDK): + @overload + def complete( + self, + *, + input: str, + model: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, + stream: Union[Literal[False], None] = None, + voice_id: OptionalNullable[str] = UNSET, + ref_audio: OptionalNullable[str] = UNSET, + response_format: Optional[models.SpeechOutputFormat] = None, + additional_properties: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SpeechResponse: + r"""Speech + + :param input: Text to generate a speech from + :param model: + :param metadata: + :param stream: + :param voice_id: The preset or custom voice to use for generating the speech. + :param ref_audio: The audio reference for generating the speech. + :param response_format: + :param additional_properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param accept_header_override: Override the default accept header for this method + :param http_headers: Additional headers to set or replace on requests. + """ + + @overload + def complete( + self, + *, + input: str, + model: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, + stream: Literal[True], + voice_id: OptionalNullable[str] = UNSET, + ref_audio: OptionalNullable[str] = UNSET, + response_format: Optional[models.SpeechOutputFormat] = None, + additional_properties: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStream[models.SpeechStreamEvents]: + r"""Speech + + :param input: Text to generate a speech from + :param model: + :param metadata: + :param stream: + :param voice_id: The preset or custom voice to use for generating the speech. + :param ref_audio: The audio reference for generating the speech. + :param response_format: + :param additional_properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param accept_header_override: Override the default accept header for this method + :param http_headers: Additional headers to set or replace on requests. + """ + def complete( self, *, @@ -33,7 +105,6 @@ def complete( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - accept_header_override: Optional[CompleteAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.SpeechV1AudioSpeechPostResponse: r"""Speech @@ -85,9 +156,7 @@ def complete( request_has_path_params=False, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value=accept_header_override.value - if accept_header_override is not None - else "application/json;q=1, text/event-stream;q=0", + accept_header_value="text/event-stream" if stream else "application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( @@ -149,6 +218,78 @@ def complete( http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("Unexpected response received", http_res, http_res_text) + @overload + async def complete_async( + self, + *, + input: str, + model: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, + stream: Union[Literal[False], None] = None, + voice_id: OptionalNullable[str] = UNSET, + ref_audio: OptionalNullable[str] = UNSET, + response_format: Optional[models.SpeechOutputFormat] = None, + additional_properties: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SpeechResponse: + r"""Speech + + :param input: Text to generate a speech from + :param model: + :param metadata: + :param stream: + :param voice_id: The preset or custom voice to use for generating the speech. + :param ref_audio: The audio reference for generating the speech. + :param response_format: + :param additional_properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param accept_header_override: Override the default accept header for this method + :param http_headers: Additional headers to set or replace on requests. + """ + + @overload + async def complete_async( + self, + *, + input: str, + model: OptionalNullable[str] = UNSET, + metadata: OptionalNullable[ + Union[models.MetadataDict, models.MetadataDictTypedDict] + ] = UNSET, + stream: Literal[True], + voice_id: OptionalNullable[str] = UNSET, + ref_audio: OptionalNullable[str] = UNSET, + response_format: Optional[models.SpeechOutputFormat] = None, + additional_properties: Optional[Dict[str, Any]] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStreamAsync[models.SpeechStreamEvents]: + r"""Speech + + :param input: Text to generate a speech from + :param model: + :param metadata: + :param stream: + :param voice_id: The preset or custom voice to use for generating the speech. + :param ref_audio: The audio reference for generating the speech. + :param response_format: + :param additional_properties: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param accept_header_override: Override the default accept header for this method + :param http_headers: Additional headers to set or replace on requests. + """ + async def complete_async( self, *, @@ -165,7 +306,6 @@ async def complete_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, - accept_header_override: Optional[CompleteAcceptEnum] = None, http_headers: Optional[Mapping[str, str]] = None, ) -> models.SpeechV1AudioSpeechPostResponse: r"""Speech @@ -217,9 +357,7 @@ async def complete_async( request_has_path_params=False, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value=accept_header_override.value - if accept_header_override is not None - else "application/json;q=1, text/event-stream;q=0", + accept_header_value="text/event-stream" if stream else "application/json", http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( diff --git a/uv.lock b/uv.lock index 95bce4fa..3769cd61 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.1.2" +version = "2.1.3" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 3bcadf6e9b9e6b105461f7c2d7968c3e89451acb Mon Sep 17 00:00:00 2001 From: Louis Sanna <85956496+louis-sanna-dev@users.noreply.github.com> Date: Mon, 30 Mar 2026 09:40:01 +0200 Subject: [PATCH 28/82] docs: add AGENTS.md guidance for generated files (#454) * Add repository guidance for generated files * Remove stale generated headers from owned SDK files --- AGENTS.md | 37 +++++++++++++++++++ CLAUDE.md | 1 + .../azure/src/mistralai/azure/client/sdk.py | 2 - packages/gcp/src/mistralai/gcp/client/sdk.py | 2 - 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 AGENTS.md create mode 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..6a8cb9d5 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,37 @@ +# Repository Guide + +This repository is mostly generated code. + +Before editing or approving a PR, check the top of the file: + +```python +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +``` + +If that marker is present, do not hand-edit the file. Changes should be made in the upstream source or generator inputs, then regenerated. + +## What We Own + +The main hand-maintained surface is listed in `.genignore`. + +At the repo root, that currently includes files such as: + +- `pyproject.toml` +- `examples/*` +- `utils/*` +- `src/mistralai/extra/*` +- `pylintrc` +- `scripts/prepare_readme.py` + +There are also package-specific ownership files: + +- `packages/gcp/.genignore` +- `packages/azure/.genignore` + +If a file is not listed in the relevant `.genignore` and it has the generated header, assume it should not be edited directly. + +## PR Review Rule Of Thumb + +- Prefer PRs that change hand-owned files listed in `.genignore`. +- Be skeptical of direct edits to generated SDK files under `src/`, `docs/`, or `packages/*/src/`. +- If a generated file changed, look for the corresponding source/config change that explains the regeneration. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 00000000..47dc3e3d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file diff --git a/packages/azure/src/mistralai/azure/client/sdk.py b/packages/azure/src/mistralai/azure/client/sdk.py index 985cb9a8..3203463e 100644 --- a/packages/azure/src/mistralai/azure/client/sdk.py +++ b/packages/azure/src/mistralai/azure/client/sdk.py @@ -1,5 +1,3 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - from .basesdk import BaseSDK from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients from .sdkconfiguration import SDKConfiguration diff --git a/packages/gcp/src/mistralai/gcp/client/sdk.py b/packages/gcp/src/mistralai/gcp/client/sdk.py index e6e83839..b3f48158 100644 --- a/packages/gcp/src/mistralai/gcp/client/sdk.py +++ b/packages/gcp/src/mistralai/gcp/client/sdk.py @@ -1,5 +1,3 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - from .basesdk import BaseSDK from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients from .sdkconfiguration import SDKConfiguration From 8d1ddf4e0a313e155ccede36804093301a896cd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 17:10:01 +0200 Subject: [PATCH 29/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.2.0rc1=20(#456)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️) * `mistral.beta.connectors.list_tools()`: `response` **Changed** (Breaking ⚠️) * `mistral.models.update()`: `response` **Changed** (Breaking ⚠️) * `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️) * `mistral.workflows.metrics.get_workflow_metrics()`: **Added** * `mistral.workflows.get_workflow()`: **Added** * `mistral.workflows.update_workflow()`: **Added** * `mistral.workflows.get_workflow_registration()`: **Added** * `mistral.workflows.archive_workflow()`: **Added** * `mistral.workflows.unarchive_workflow()`: **Added** * `mistral.workflows.executions.get_workflow_execution()`: **Added** * `mistral.workflows.executions.get_workflow_execution_history()`: **Added** * `mistral.workflows.executions.signal_workflow_execution()`: **Added** * `mistral.workflows.executions.query_workflow_execution()`: **Added** * `mistral.workflows.executions.terminate_workflow_execution()`: **Added** * `mistral.workflows.executions.batch_terminate_workflow_executions()`: **Added** * `mistral.workflows.executions.cancel_workflow_execution()`: **Added** * `mistral.workflows.executions.batch_cancel_workflow_executions()`: **Added** * `mistral.workflows.executions.reset_workflow()`: **Added** * `mistral.workflows.executions.update_workflow_execution()`: **Added** * `mistral.workflows.executions.get_workflow_execution_trace_otel()`: **Added** * `mistral.workflows.executions.get_workflow_execution_trace_summary()`: **Added** * `mistral.workflows.executions.get_workflow_execution_trace_events()`: **Added** * `mistral.workflows.executions.stream()`: **Added** * `mistral.workflows.runs.get_run()`: **Added** * `mistral.batch.jobs.delete()`: **Added** * `mistral.workflows.runs.list_runs()`: **Added** * `mistral.workflows.runs.get_run_history()`: **Added** * `mistral.workflows.schedules.get_schedules()`: **Added** * `mistral.workflows.schedules.schedule_workflow()`: **Added** * `mistral.workflows.schedules.unschedule_workflow()`: **Added** * `mistral.workflows.events.receive_workflow_event()`: **Added** * `mistral.workflows.events.receive_workflow_events_batch()`: **Added** * `mistral.workflows.events.get_stream_events()`: **Added** * `mistral.workflows.events.get_workflow_events()`: **Added** * `mistral.workflows.deployments.list_deployments()`: **Added** * `mistral.workflows.deployments.get_deployment()`: **Added** * `mistral.events.receive_workflow_event()`: **Added** * `mistral.events.receive_workflow_events_batch()`: **Added** * `mistral.events.get_stream_events()`: **Added** * `mistral.events.get_workflow_events()`: **Added** * `mistral.audio.voices.list()`: `request.type` **Added** * `mistral.workflows.execute_workflow_registration()`: **Added** * `mistral.workflows.execute_workflow()`: **Added** * `mistral.workflows.get_workflow_registrations()`: **Added** * `mistral.beta.libraries.list()`: * `request` **Changed** * `response.pagination` **Added** * `error.status[422]` **Added** * `mistral.beta.connectors.call_tool()`: `request.credentials_name` **Added** * `mistral.workflows.get_workflows()`: **Added** * chore: align pyproject.toml and uv.lock to version 2.2.0rc1 * Add execute_workflow_and_wait + workflow execution examples (#451) * Add execute_workflow_and_wait feature * Add workflow execution examples * Fix SDK generation issue * Do not include deprecated task-queue param anymore * rename wait_for_workflow_completion as public method --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action Co-authored-by: Nicolas Faurie Co-authored-by: Antoine Hoorelbeke --- .speakeasy/gen.lock | 2186 ++++++++++++- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 97 +- README.md | 97 +- RELEASES.md | 12 +- .../activitytaskcompletedattributesrequest.md | 12 + ...activitytaskcompletedattributesresponse.md | 12 + docs/models/activitytaskcompletedrequest.md | 20 + docs/models/activitytaskcompletedresponse.md | 20 + docs/models/activitytaskfailedattributes.md | 13 + docs/models/activitytaskfailedrequest.md | 20 + docs/models/activitytaskfailedresponse.md | 20 + docs/models/activitytaskretryingattributes.md | 13 + docs/models/activitytaskretryingrequest.md | 20 + docs/models/activitytaskretryingresponse.md | 20 + .../activitytaskstartedattributesrequest.md | 12 + .../activitytaskstartedattributesresponse.md | 12 + docs/models/activitytaskstartedrequest.md | 21 + docs/models/activitytaskstartedresponse.md | 21 + ...lowsworkflowidentifierarchiveputrequest.md | 8 + docs/models/basefielddefinition.md | 14 +- ...typeenum.md => basefielddefinitiontype.md} | 6 +- docs/models/batchexecutionbody.md | 8 + docs/models/batchexecutionresponse.md | 8 + docs/models/batchexecutionresult.md | 9 + ...sexecutionsexecutionidcancelpostrequest.md | 8 + docs/models/classifierfinetunedmodel.md | 2 +- docs/models/completionfinetunedmodel.md | 2 +- docs/models/connectorcalltoolv1request.md | 1 + docs/models/customtaskcanceledattributes.md | 12 + docs/models/customtaskcanceledrequest.md | 20 + docs/models/customtaskcanceledresponse.md | 20 + .../customtaskcompletedattributesrequest.md | 12 + .../customtaskcompletedattributesresponse.md | 12 + docs/models/customtaskcompletedrequest.md | 20 + docs/models/customtaskcompletedresponse.md | 20 + docs/models/customtaskfailedattributes.md | 12 + docs/models/customtaskfailedrequest.md | 20 + docs/models/customtaskfailedresponse.md | 20 + .../customtaskinprogressattributesrequest.md | 12 + ...mtaskinprogressattributesrequestpayload.md | 19 + .../customtaskinprogressattributesresponse.md | 12 + ...taskinprogressattributesresponsepayload.md | 19 + docs/models/customtaskinprogressrequest.md | 21 + docs/models/customtaskinprogressresponse.md | 21 + .../customtaskstartedattributesrequest.md | 12 + .../customtaskstartedattributesresponse.md | 12 + docs/models/customtaskstartedrequest.md | 21 + docs/models/customtaskstartedresponse.md | 21 + docs/models/customtasktimedoutattributes.md | 12 + docs/models/customtasktimedoutrequest.md | 20 + docs/models/customtasktimedoutresponse.md | 20 + docs/models/deletebatchjobresponse.md | 10 + docs/models/deploymentdetailresponse.md | 13 + docs/models/deploymentlistresponse.md | 8 + docs/models/deploymentresponse.md | 12 + docs/models/deploymentworkerresponse.md | 10 + docs/models/encodedpayloadoptions.md | 15 + docs/models/eventprogressstatus.md | 19 + docs/models/eventsource.md | 14 + docs/models/eventtype.md | 18 + ...orkflowregistrationidexecutepostrequest.md | 9 + ...owsworkflowidentifierexecutepostrequest.md | 9 + docs/models/failure.md | 10 + docs/models/ftmodelcard.md | 2 +- ...entv1workflowsdeploymentsnamegetrequest.md | 8 + ...ryv1workflowsrunsrunidhistorygetrequest.md | 8 + .../getrunv1workflowsrunsrunidgetrequest.md | 8 + ...eventsv1workflowseventsstreamgetrequest.md | 19 + ...sv1workflowseventsstreamgetresponsebody.md | 13 + ...oweventsv1workflowseventslistgetrequest.md | 12 + ...sexecutionsexecutionidhistorygetrequest.md | 8 + .../getworkflowexecutiontraceeventsrequest.md | 10 + .../getworkflowexecutiontraceotelrequest.md | 8 + ...getworkflowexecutiontracesummaryrequest.md | 8 + ...orkflowsexecutionsexecutionidgetrequest.md | 8 + ...1workflowsworkflownamemetricsgetrequest.md | 10 + ...tionsv1workflowsregistrationsgetrequest.md | 17 + ...rationsworkflowregistrationidgetrequest.md | 10 + .../getworkflowsv1workflowsgetrequest.md | 13 + .../getworkflowsv1workflowsgetresponse.md | 8 + ...v1workflowsworkflowidentifiergetrequest.md | 8 + ...jobsapiroutesbatchdeletebatchjobrequest.md | 8 + docs/models/jsonpatchadd.md | 10 + docs/models/jsonpatchappend.md | 10 + docs/models/jsonpatchpayloadrequest.md | 13 + docs/models/jsonpatchpayloadrequestvalue.md | 29 + docs/models/jsonpatchpayloadresponse.md | 13 + docs/models/jsonpatchpayloadresponsevalue.md | 29 + docs/models/jsonpatchremove.md | 10 + docs/models/jsonpatchreplace.md | 10 + docs/models/jsonpayloadrequest.md | 13 + docs/models/jsonpayloadresponse.md | 13 + docs/models/librarieslistv1request.md | 9 + ...oymentsv1workflowsdeploymentsgetrequest.md | 9 + docs/models/listlibrariesresponse.md | 7 +- .../listrunsv1workflowsrunsgetrequest.md | 12 + .../listrunsv1workflowsrunsgetresponse.md | 8 + .../listrunsv1workflowsrunsgetstatus.md | 19 + .../listvoicesv1audiovoicesgetrequest.md | 9 +- docs/models/listvoicesv1audiovoicesgettype.md | 17 + docs/models/listworkfloweventresponse.md | 9 + docs/models/listworkfloweventresponseevent.md | 107 + docs/models/networkencodedinput.md | 10 + docs/models/querydefinition.md | 11 + docs/models/queryinvocationbody.md | 9 + docs/models/queryinvocationbodyinput.md | 19 + ...executionsexecutionidqueriespostrequest.md | 9 + docs/models/queryworkflowresponse.md | 9 + docs/models/resetinvocationbody.md | 11 + ...wsexecutionsexecutionidresetpostrequest.md | 9 + docs/models/responseconnectorlisttoolsv1.md | 25 + docs/models/responseconnectorlisttoolsv11.md | 17 - docs/models/responseconnectorlisttoolsv12.md | 19 - ...ationsworkflowregistrationidexecutepost.md | 19 + ...1workflowsworkflowidentifierexecutepost.md | 19 + docs/models/scalarmetric.md | 10 + docs/models/scalarmetricvalue.md | 17 + docs/models/schedulecalendar.md | 15 + docs/models/scheduledefinition.md | 25 + docs/models/scheduledefinitionoutput.md | 22 + docs/models/scheduleinterval.md | 9 + docs/models/scheduleoverlappolicy.md | 25 + docs/models/schedulepolicy.md | 10 + docs/models/schedulerange.md | 10 + docs/models/scope.md | 15 + docs/models/signaldefinition.md | 10 + docs/models/signalinvocationbody.md | 9 + docs/models/signalinvocationbodyinput.md | 19 + ...signalinvocationbodynetworkencodedinput.md | 11 + ...executionsexecutionidsignalspostrequest.md | 9 + docs/models/signalworkflowresponse.md | 8 + docs/models/streameventssepayload.md | 13 + docs/models/streameventssepayloaddata.md | 107 + docs/models/streameventworkflowcontext.md | 12 + ...wsexecutionsexecutionidstreamgetrequest.md | 10 + ...cutionsexecutionidstreamgetresponsebody.md | 13 + docs/models/tempogettraceresponse.md | 14 + docs/models/tempotraceattribute.md | 9 + docs/models/tempotraceattributeboolvalue.md | 8 + docs/models/tempotraceattributeintvalue.md | 8 + docs/models/tempotraceattributestringvalue.md | 8 + docs/models/tempotraceattributevalue.md | 25 + docs/models/tempotracebatch.md | 9 + docs/models/tempotraceevent.md | 10 + docs/models/tempotraceresource.md | 8 + docs/models/tempotracescope.md | 8 + docs/models/tempotracescopekind.md | 19 + docs/models/tempotracescopespan.md | 9 + docs/models/tempotracespan.md | 16 + ...ecutionsexecutionidterminatepostrequest.md | 8 + docs/models/timeseriesmetric.md | 10 + docs/models/timeseriesmetricvalue1.md | 17 + docs/models/timeseriesmetricvalue2.md | 17 + ...wsworkflowidentifierunarchiveputrequest.md | 8 + ...rkflowsschedulesscheduleiddeleterequest.md | 8 + docs/models/updatedefinition.md | 11 + docs/models/updateinvocationbody.md | 9 + docs/models/updateinvocationbodyinput.md | 19 + ...executionsexecutionidupdatespostrequest.md | 9 + docs/models/updateworkflowresponse.md | 9 + ...v1workflowsworkflowidentifierputrequest.md | 9 + docs/models/workflow.md | 18 + docs/models/workflowarchiveresponse.md | 8 + docs/models/workflowbasicdefinition.md | 13 + docs/models/workflowcodedefinition.md | 14 + docs/models/workfloweventbatchrequest.md | 10 + docs/models/workfloweventbatchrequestevent.md | 107 + docs/models/workfloweventbatchresponse.md | 12 + .../workfloweventbatchresponsestatus.md | 20 + docs/models/workfloweventrequest.md | 10 + docs/models/workfloweventrequestevent.md | 109 + docs/models/workfloweventresponse.md | 11 + docs/models/workfloweventresponsestatus.md | 20 + docs/models/workfloweventtype.md | 29 + .../workflowexecutioncanceledattributes.md | 11 + .../workflowexecutioncanceledrequest.md | 20 + .../workflowexecutioncanceledresponse.md | 20 + ...flowexecutioncompletedattributesrequest.md | 11 + ...lowexecutioncompletedattributesresponse.md | 11 + .../workflowexecutioncompletedrequest.md | 20 + .../workflowexecutioncompletedresponse.md | 20 + ...xecutioncontinuedasnewattributesrequest.md | 13 + ...ecutioncontinuedasnewattributesresponse.md | 13 + .../workflowexecutioncontinuedasnewrequest.md | 21 + ...workflowexecutioncontinuedasnewresponse.md | 21 + .../workflowexecutionfailedattributes.md | 11 + docs/models/workflowexecutionfailedrequest.md | 20 + .../models/workflowexecutionfailedresponse.md | 20 + docs/models/workflowexecutionlistresponse.md | 9 + .../workflowexecutionprogresstraceevent.md | 17 + docs/models/workflowexecutionrequest.md | 15 + docs/models/workflowexecutionresponse.md | 16 + ...rkflowexecutionstartedattributesrequest.md | 12 + ...kflowexecutionstartedattributesresponse.md | 12 + .../models/workflowexecutionstartedrequest.md | 20 + .../workflowexecutionstartedresponse.md | 20 + docs/models/workflowexecutionstatus.md | 24 + docs/models/workflowexecutionsyncresponse.md | 12 + docs/models/workflowexecutiontraceevent.md | 13 + .../workflowexecutiontraceeventsresponse.md | 17 + ...rkflowexecutiontraceeventsresponseevent.md | 17 + .../workflowexecutiontraceotelresponse.md | 19 + ...owexecutiontracesummaryattributesvalues.md | 29 + .../workflowexecutiontracesummaryresponse.md | 17 + .../workflowexecutiontracesummaryspan.md | 14 + .../workflowexecutionwithoutresultresponse.md | 15 + docs/models/workflowgetresponse.md | 8 + docs/models/workflowlistresponse.md | 9 + docs/models/workflowmetadata.md | 8 + docs/models/workflowmetrics.md | 17 + docs/models/workflowregistration.md | 13 + .../models/workflowregistrationgetresponse.md | 9 + .../workflowregistrationlistresponse.md | 10 + .../workflowregistrationwithworkerstatus.md | 14 + docs/models/workflowschedulelistresponse.md | 8 + docs/models/workflowschedulerequest.md | 14 + docs/models/workflowscheduleresponse.md | 8 + docs/models/workflowtaskfailedattributes.md | 11 + docs/models/workflowtaskfailedrequest.md | 21 + docs/models/workflowtaskfailedresponse.md | 21 + docs/models/workflowtasktimedoutattributes.md | 11 + docs/models/workflowtasktimedoutrequest.md | 21 + docs/models/workflowtasktimedoutresponse.md | 21 + docs/models/workflowtype.md | 13 + docs/models/workflowunarchiveresponse.md | 8 + docs/models/workflowupdaterequest.md | 10 + docs/models/workflowupdateresponse.md | 8 + docs/models/workflowwithworkerstatus.md | 19 + docs/sdks/batchjobs/README.md | 41 + docs/sdks/connectors/README.md | 3 +- docs/sdks/deployments/README.md | 91 + docs/sdks/events/README.md | 230 ++ docs/sdks/executions/README.md | 598 ++++ docs/sdks/libraries/README.md | 11 +- docs/sdks/metrics/README.md | 69 + docs/sdks/runs/README.md | 138 + docs/sdks/schedules/README.md | 133 + docs/sdks/voices/README.md | 13 +- docs/sdks/workflows/README.md | 423 +++ docs/sdks/workflowsevents/README.md | 230 ++ .../workflows/async_workflow_execute.py | 30 + .../async_workflow_execute_and_wait.py | 37 + .../mistral/workflows/workflow_execute.py | 29 + .../workflows/workflow_execute_and_wait.py | 36 + pyproject.toml | 2 +- scripts/run_examples.sh | 4 + src/mistralai/client/_version.py | 4 +- src/mistralai/client/batch_jobs.py | 168 + src/mistralai/client/connectors.py | 14 +- src/mistralai/client/deployments.py | 370 +++ src/mistralai/client/events.py | 886 ++++++ src/mistralai/client/executions.py | 2724 +++++++++++++++++ src/mistralai/client/libraries.py | 40 +- src/mistralai/client/metrics.py | 243 ++ src/mistralai/client/models/__init__.py | 1537 +++++++++- .../activitytaskcompletedattributesrequest.py | 37 + ...activitytaskcompletedattributesresponse.py | 37 + .../models/activitytaskcompletedrequest.py | 120 + .../models/activitytaskcompletedresponse.py | 112 + .../models/activitytaskfailedattributes.py | 36 + .../models/activitytaskfailedrequest.py | 120 + .../models/activitytaskfailedresponse.py | 112 + .../models/activitytaskretryingattributes.py | 36 + .../models/activitytaskretryingrequest.py | 120 + .../models/activitytaskretryingresponse.py | 112 + .../activitytaskstartedattributesrequest.py | 37 + .../activitytaskstartedattributesresponse.py | 37 + .../models/activitytaskstartedrequest.py | 122 + .../models/activitytaskstartedresponse.py | 114 + ...flows_workflow_identifier_archive_putop.py | 17 + .../client/models/basefielddefinition.py | 6 +- .../client/models/batchexecutionbody.py | 17 + .../client/models/batchexecutionresponse.py | 35 + .../client/models/batchexecutionresult.py | 53 + ...s_executions_execution_id_cancel_postop.py | 21 + .../client/models/classifierfinetunedmodel.py | 10 +- .../client/models/completionfinetunedmodel.py | 10 +- .../client/models/connector_call_tool_v1op.py | 49 +- .../models/connector_list_tools_v1op.py | 23 +- .../models/customtaskcanceledattributes.py | 62 + .../models/customtaskcanceledrequest.py | 120 + .../models/customtaskcanceledresponse.py | 112 + .../customtaskcompletedattributesrequest.py | 37 + .../customtaskcompletedattributesresponse.py | 37 + .../models/customtaskcompletedrequest.py | 120 + .../models/customtaskcompletedresponse.py | 112 + .../models/customtaskfailedattributes.py | 31 + .../client/models/customtaskfailedrequest.py | 120 + .../client/models/customtaskfailedresponse.py | 112 + .../customtaskinprogressattributesrequest.py | 55 + .../customtaskinprogressattributesresponse.py | 82 + .../models/customtaskinprogressrequest.py | 122 + .../models/customtaskinprogressresponse.py | 114 + .../customtaskstartedattributesrequest.py | 55 + .../customtaskstartedattributesresponse.py | 55 + .../client/models/customtaskstartedrequest.py | 122 + .../models/customtaskstartedresponse.py | 114 + .../models/customtasktimedoutattributes.py | 62 + .../models/customtasktimedoutrequest.py | 120 + .../models/customtasktimedoutresponse.py | 112 + .../client/models/deletebatchjobresponse.py | 50 + .../client/models/deploymentdetailresponse.py | 47 + .../client/models/deploymentlistresponse.py | 18 + .../client/models/deploymentresponse.py | 37 + .../client/models/deploymentworkerresponse.py | 27 + .../client/models/encodedpayloadoptions.py | 12 + .../client/models/eventprogressstatus.py | 16 + src/mistralai/client/models/eventsource.py | 11 + src/mistralai/client/models/eventtype.py | 15 + ...workflow_registration_id_execute_postop.py | 54 + ...lows_workflow_identifier_execute_postop.py | 56 + src/mistralai/client/models/failure.py | 20 + src/mistralai/client/models/ftmodelcard.py | 8 +- ...ent_v1_workflows_deployments_name_getop.py | 17 + ..._v1_workflows_runs_run_id_history_getop.py | 17 + .../get_run_v1_workflows_runs_run_id_getop.py | 17 + ...events_v1_workflows_events_stream_getop.py | 182 ++ ...w_events_v1_workflows_events_list_getop.py | 95 + ...s_executions_execution_id_history_getop.py | 21 + .../get_workflow_execution_trace_eventsop.py | 47 + .../get_workflow_execution_trace_otelop.py | 17 + .../get_workflow_execution_trace_summaryop.py | 17 + ...workflows_executions_execution_id_getop.py | 19 + ...1_workflows_workflow_name_metrics_getop.py | 66 + ...trations_workflow_registration_id_getop.py | 55 + ...ations_v1_workflows_registrations_getop.py | 147 + ..._v1_workflows_workflow_identifier_getop.py | 17 + .../get_workflows_v1_workflows_getop.py | 116 + ...obs_api_routes_batch_delete_batch_jobop.py | 17 + src/mistralai/client/models/jsonpatchadd.py | 39 + .../client/models/jsonpatchappend.py | 39 + .../client/models/jsonpatchpayloadrequest.py | 66 + .../client/models/jsonpatchpayloadresponse.py | 100 + .../client/models/jsonpatchremove.py | 39 + .../client/models/jsonpatchreplace.py | 39 + .../client/models/jsonpayloadrequest.py | 61 + .../client/models/jsonpayloadresponse.py | 61 + .../client/models/libraries_list_v1op.py | 42 + ...loyments_v1_workflows_deployments_getop.py | 57 + .../list_runs_v1_workflows_runs_getop.py | 121 + .../list_voices_v1_audio_voices_getop.py | 20 +- .../client/models/listlibrariesresponse.py | 4 + .../models/listworkfloweventresponse.py | 170 + .../client/models/networkencodedinput.py | 45 + ..._executions_execution_id_queries_postop.py | 28 + .../client/models/querydefinition.py | 64 + .../client/models/queryinvocationbody.py | 68 + .../client/models/queryworkflowresponse.py | 20 + ...ws_executions_execution_id_reset_postop.py | 24 + .../client/models/resetinvocationbody.py | 64 + src/mistralai/client/models/scalarmetric.py | 27 + .../client/models/schedulecalendar.py | 80 + .../client/models/scheduledefinition.py | 142 + .../client/models/scheduledefinitionoutput.py | 133 + .../client/models/scheduleinterval.py | 49 + .../client/models/scheduleoverlappolicy.py | 22 + src/mistralai/client/models/schedulepolicy.py | 49 + src/mistralai/client/models/schedulerange.py | 38 + ..._executions_execution_id_signals_postop.py | 28 + .../client/models/signaldefinition.py | 59 + .../client/models/signalinvocationbody.py | 122 + .../client/models/signalworkflowresponse.py | 32 + ...ws_executions_execution_id_stream_getop.py | 101 + .../client/models/streameventssepayload.py | 168 + .../models/streameventworkflowcontext.py | 58 + .../client/models/tempogettraceresponse.py | 49 + .../client/models/tempotraceattribute.py | 56 + .../models/tempotraceattributeboolvalue.py | 23 + .../models/tempotraceattributeintvalue.py | 23 + .../models/tempotraceattributestringvalue.py | 23 + .../client/models/tempotracebatch.py | 48 + .../client/models/tempotraceevent.py | 52 + .../client/models/tempotraceresource.py | 35 + .../client/models/tempotracescope.py | 16 + .../client/models/tempotracescopekind.py | 16 + .../client/models/tempotracescopespan.py | 39 + src/mistralai/client/models/tempotracespan.py | 99 + ...xecutions_execution_id_terminate_postop.py | 21 + .../client/models/timeseriesmetric.py | 37 + ...ows_workflow_identifier_unarchive_putop.py | 19 + ...orkflows_schedules_schedule_id_deleteop.py | 17 + ..._executions_execution_id_updates_postop.py | 28 + ..._v1_workflows_workflow_identifier_putop.py | 24 + .../client/models/updatedefinition.py | 64 + .../client/models/updateinvocationbody.py | 68 + .../client/models/updateworkflowresponse.py | 20 + src/mistralai/client/models/workflow.py | 106 + .../client/models/workflowarchiveresponse.py | 15 + .../client/models/workflowbasicdefinition.py | 71 + .../client/models/workflowcodedefinition.py | 91 + .../models/workfloweventbatchrequest.py | 137 + .../models/workfloweventbatchresponse.py | 74 + .../client/models/workfloweventrequest.py | 139 + .../client/models/workfloweventresponse.py | 69 + .../client/models/workfloweventtype.py | 26 + .../workflowexecutioncanceledattributes.py | 57 + .../workflowexecutioncanceledrequest.py | 120 + .../workflowexecutioncanceledresponse.py | 112 + ...flowexecutioncompletedattributesrequest.py | 32 + ...lowexecutioncompletedattributesresponse.py | 32 + .../workflowexecutioncompletedrequest.py | 120 + .../workflowexecutioncompletedresponse.py | 112 + ...xecutioncontinuedasnewattributesrequest.py | 42 + ...ecutioncontinuedasnewattributesresponse.py | 42 + .../workflowexecutioncontinuedasnewrequest.py | 122 + ...workflowexecutioncontinuedasnewresponse.py | 114 + .../workflowexecutionfailedattributes.py | 26 + .../models/workflowexecutionfailedrequest.py | 120 + .../models/workflowexecutionfailedresponse.py | 112 + .../models/workflowexecutionlistresponse.py | 58 + .../workflowexecutionprogresstraceevent.py | 100 + .../client/models/workflowexecutionrequest.py | 110 + .../models/workflowexecutionresponse.py | 93 + ...rkflowexecutionstartedattributesrequest.py | 37 + ...kflowexecutionstartedattributesresponse.py | 37 + .../models/workflowexecutionstartedrequest.py | 120 + .../workflowexecutionstartedresponse.py | 112 + .../client/models/workflowexecutionstatus.py | 21 + .../models/workflowexecutionsyncresponse.py | 31 + .../models/workflowexecutiontraceevent.py | 64 + .../workflowexecutiontraceeventsresponse.py | 121 + .../workflowexecutiontraceotelresponse.py | 124 + ...owexecutiontracesummaryattributesvalues.py | 17 + .../workflowexecutiontracesummaryresponse.py | 109 + .../workflowexecutiontracesummaryspan.py | 83 + .../workflowexecutionwithoutresultresponse.py | 87 + .../client/models/workflowgetresponse.py | 18 + .../client/models/workflowlistresponse.py | 39 + .../client/models/workflowmetadata.py | 48 + .../client/models/workflowmetrics.py | 53 + .../client/models/workflowregistration.py | 77 + .../models/workflowregistrationgetresponse.py | 21 + .../workflowregistrationlistresponse.py | 41 + .../workflowregistrationwithworkerstatus.py | 82 + .../models/workflowschedulelistresponse.py | 21 + .../client/models/workflowschedulerequest.py | 115 + .../client/models/workflowscheduleresponse.py | 16 + .../models/workflowtaskfailedattributes.py | 26 + .../models/workflowtaskfailedrequest.py | 122 + .../models/workflowtaskfailedresponse.py | 114 + .../models/workflowtasktimedoutattributes.py | 57 + .../models/workflowtasktimedoutrequest.py | 122 + .../models/workflowtasktimedoutresponse.py | 114 + src/mistralai/client/models/workflowtype.py | 8 + .../models/workflowunarchiveresponse.py | 15 + .../client/models/workflowupdaterequest.py | 62 + .../client/models/workflowupdateresponse.py | 15 + .../client/models/workflowwithworkerstatus.py | 111 + src/mistralai/client/runs.py | 644 ++++ src/mistralai/client/schedules.py | 570 ++++ src/mistralai/client/sdk.py | 6 + src/mistralai/client/voices.py | 6 + src/mistralai/client/workflows.py | 2213 +++++++++++++ src/mistralai/client/workflows_events.py | 886 ++++++ uv.lock | 2 +- 457 files changed, 30114 insertions(+), 220 deletions(-) create mode 100644 docs/models/activitytaskcompletedattributesrequest.md create mode 100644 docs/models/activitytaskcompletedattributesresponse.md create mode 100644 docs/models/activitytaskcompletedrequest.md create mode 100644 docs/models/activitytaskcompletedresponse.md create mode 100644 docs/models/activitytaskfailedattributes.md create mode 100644 docs/models/activitytaskfailedrequest.md create mode 100644 docs/models/activitytaskfailedresponse.md create mode 100644 docs/models/activitytaskretryingattributes.md create mode 100644 docs/models/activitytaskretryingrequest.md create mode 100644 docs/models/activitytaskretryingresponse.md create mode 100644 docs/models/activitytaskstartedattributesrequest.md create mode 100644 docs/models/activitytaskstartedattributesresponse.md create mode 100644 docs/models/activitytaskstartedrequest.md create mode 100644 docs/models/activitytaskstartedresponse.md create mode 100644 docs/models/archiveworkflowv1workflowsworkflowidentifierarchiveputrequest.md rename docs/models/{typeenum.md => basefielddefinitiontype.md} (67%) create mode 100644 docs/models/batchexecutionbody.md create mode 100644 docs/models/batchexecutionresponse.md create mode 100644 docs/models/batchexecutionresult.md create mode 100644 docs/models/cancelworkflowexecutionv1workflowsexecutionsexecutionidcancelpostrequest.md create mode 100644 docs/models/customtaskcanceledattributes.md create mode 100644 docs/models/customtaskcanceledrequest.md create mode 100644 docs/models/customtaskcanceledresponse.md create mode 100644 docs/models/customtaskcompletedattributesrequest.md create mode 100644 docs/models/customtaskcompletedattributesresponse.md create mode 100644 docs/models/customtaskcompletedrequest.md create mode 100644 docs/models/customtaskcompletedresponse.md create mode 100644 docs/models/customtaskfailedattributes.md create mode 100644 docs/models/customtaskfailedrequest.md create mode 100644 docs/models/customtaskfailedresponse.md create mode 100644 docs/models/customtaskinprogressattributesrequest.md create mode 100644 docs/models/customtaskinprogressattributesrequestpayload.md create mode 100644 docs/models/customtaskinprogressattributesresponse.md create mode 100644 docs/models/customtaskinprogressattributesresponsepayload.md create mode 100644 docs/models/customtaskinprogressrequest.md create mode 100644 docs/models/customtaskinprogressresponse.md create mode 100644 docs/models/customtaskstartedattributesrequest.md create mode 100644 docs/models/customtaskstartedattributesresponse.md create mode 100644 docs/models/customtaskstartedrequest.md create mode 100644 docs/models/customtaskstartedresponse.md create mode 100644 docs/models/customtasktimedoutattributes.md create mode 100644 docs/models/customtasktimedoutrequest.md create mode 100644 docs/models/customtasktimedoutresponse.md create mode 100644 docs/models/deletebatchjobresponse.md create mode 100644 docs/models/deploymentdetailresponse.md create mode 100644 docs/models/deploymentlistresponse.md create mode 100644 docs/models/deploymentresponse.md create mode 100644 docs/models/deploymentworkerresponse.md create mode 100644 docs/models/encodedpayloadoptions.md create mode 100644 docs/models/eventprogressstatus.md create mode 100644 docs/models/eventsource.md create mode 100644 docs/models/eventtype.md create mode 100644 docs/models/executeworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepostrequest.md create mode 100644 docs/models/executeworkflowv1workflowsworkflowidentifierexecutepostrequest.md create mode 100644 docs/models/failure.md create mode 100644 docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md create mode 100644 docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md create mode 100644 docs/models/getrunv1workflowsrunsrunidgetrequest.md create mode 100644 docs/models/getstreameventsv1workflowseventsstreamgetrequest.md create mode 100644 docs/models/getstreameventsv1workflowseventsstreamgetresponsebody.md create mode 100644 docs/models/getworkfloweventsv1workflowseventslistgetrequest.md create mode 100644 docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md create mode 100644 docs/models/getworkflowexecutiontraceeventsrequest.md create mode 100644 docs/models/getworkflowexecutiontraceotelrequest.md create mode 100644 docs/models/getworkflowexecutiontracesummaryrequest.md create mode 100644 docs/models/getworkflowexecutionv1workflowsexecutionsexecutionidgetrequest.md create mode 100644 docs/models/getworkflowmetricsv1workflowsworkflownamemetricsgetrequest.md create mode 100644 docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md create mode 100644 docs/models/getworkflowregistrationv1workflowsregistrationsworkflowregistrationidgetrequest.md create mode 100644 docs/models/getworkflowsv1workflowsgetrequest.md create mode 100644 docs/models/getworkflowsv1workflowsgetresponse.md create mode 100644 docs/models/getworkflowv1workflowsworkflowidentifiergetrequest.md create mode 100644 docs/models/jobsapiroutesbatchdeletebatchjobrequest.md create mode 100644 docs/models/jsonpatchadd.md create mode 100644 docs/models/jsonpatchappend.md create mode 100644 docs/models/jsonpatchpayloadrequest.md create mode 100644 docs/models/jsonpatchpayloadrequestvalue.md create mode 100644 docs/models/jsonpatchpayloadresponse.md create mode 100644 docs/models/jsonpatchpayloadresponsevalue.md create mode 100644 docs/models/jsonpatchremove.md create mode 100644 docs/models/jsonpatchreplace.md create mode 100644 docs/models/jsonpayloadrequest.md create mode 100644 docs/models/jsonpayloadresponse.md create mode 100644 docs/models/librarieslistv1request.md create mode 100644 docs/models/listdeploymentsv1workflowsdeploymentsgetrequest.md create mode 100644 docs/models/listrunsv1workflowsrunsgetrequest.md create mode 100644 docs/models/listrunsv1workflowsrunsgetresponse.md create mode 100644 docs/models/listrunsv1workflowsrunsgetstatus.md create mode 100644 docs/models/listvoicesv1audiovoicesgettype.md create mode 100644 docs/models/listworkfloweventresponse.md create mode 100644 docs/models/listworkfloweventresponseevent.md create mode 100644 docs/models/networkencodedinput.md create mode 100644 docs/models/querydefinition.md create mode 100644 docs/models/queryinvocationbody.md create mode 100644 docs/models/queryinvocationbodyinput.md create mode 100644 docs/models/queryworkflowexecutionv1workflowsexecutionsexecutionidqueriespostrequest.md create mode 100644 docs/models/queryworkflowresponse.md create mode 100644 docs/models/resetinvocationbody.md create mode 100644 docs/models/resetworkflowv1workflowsexecutionsexecutionidresetpostrequest.md create mode 100644 docs/models/responseconnectorlisttoolsv1.md delete mode 100644 docs/models/responseconnectorlisttoolsv11.md delete mode 100644 docs/models/responseconnectorlisttoolsv12.md create mode 100644 docs/models/responseexecuteworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.md create mode 100644 docs/models/responseexecuteworkflowv1workflowsworkflowidentifierexecutepost.md create mode 100644 docs/models/scalarmetric.md create mode 100644 docs/models/scalarmetricvalue.md create mode 100644 docs/models/schedulecalendar.md create mode 100644 docs/models/scheduledefinition.md create mode 100644 docs/models/scheduledefinitionoutput.md create mode 100644 docs/models/scheduleinterval.md create mode 100644 docs/models/scheduleoverlappolicy.md create mode 100644 docs/models/schedulepolicy.md create mode 100644 docs/models/schedulerange.md create mode 100644 docs/models/scope.md create mode 100644 docs/models/signaldefinition.md create mode 100644 docs/models/signalinvocationbody.md create mode 100644 docs/models/signalinvocationbodyinput.md create mode 100644 docs/models/signalinvocationbodynetworkencodedinput.md create mode 100644 docs/models/signalworkflowexecutionv1workflowsexecutionsexecutionidsignalspostrequest.md create mode 100644 docs/models/signalworkflowresponse.md create mode 100644 docs/models/streameventssepayload.md create mode 100644 docs/models/streameventssepayloaddata.md create mode 100644 docs/models/streameventworkflowcontext.md create mode 100644 docs/models/streamv1workflowsexecutionsexecutionidstreamgetrequest.md create mode 100644 docs/models/streamv1workflowsexecutionsexecutionidstreamgetresponsebody.md create mode 100644 docs/models/tempogettraceresponse.md create mode 100644 docs/models/tempotraceattribute.md create mode 100644 docs/models/tempotraceattributeboolvalue.md create mode 100644 docs/models/tempotraceattributeintvalue.md create mode 100644 docs/models/tempotraceattributestringvalue.md create mode 100644 docs/models/tempotraceattributevalue.md create mode 100644 docs/models/tempotracebatch.md create mode 100644 docs/models/tempotraceevent.md create mode 100644 docs/models/tempotraceresource.md create mode 100644 docs/models/tempotracescope.md create mode 100644 docs/models/tempotracescopekind.md create mode 100644 docs/models/tempotracescopespan.md create mode 100644 docs/models/tempotracespan.md create mode 100644 docs/models/terminateworkflowexecutionv1workflowsexecutionsexecutionidterminatepostrequest.md create mode 100644 docs/models/timeseriesmetric.md create mode 100644 docs/models/timeseriesmetricvalue1.md create mode 100644 docs/models/timeseriesmetricvalue2.md create mode 100644 docs/models/unarchiveworkflowv1workflowsworkflowidentifierunarchiveputrequest.md create mode 100644 docs/models/unscheduleworkflowv1workflowsschedulesscheduleiddeleterequest.md create mode 100644 docs/models/updatedefinition.md create mode 100644 docs/models/updateinvocationbody.md create mode 100644 docs/models/updateinvocationbodyinput.md create mode 100644 docs/models/updateworkflowexecutionv1workflowsexecutionsexecutionidupdatespostrequest.md create mode 100644 docs/models/updateworkflowresponse.md create mode 100644 docs/models/updateworkflowv1workflowsworkflowidentifierputrequest.md create mode 100644 docs/models/workflow.md create mode 100644 docs/models/workflowarchiveresponse.md create mode 100644 docs/models/workflowbasicdefinition.md create mode 100644 docs/models/workflowcodedefinition.md create mode 100644 docs/models/workfloweventbatchrequest.md create mode 100644 docs/models/workfloweventbatchrequestevent.md create mode 100644 docs/models/workfloweventbatchresponse.md create mode 100644 docs/models/workfloweventbatchresponsestatus.md create mode 100644 docs/models/workfloweventrequest.md create mode 100644 docs/models/workfloweventrequestevent.md create mode 100644 docs/models/workfloweventresponse.md create mode 100644 docs/models/workfloweventresponsestatus.md create mode 100644 docs/models/workfloweventtype.md create mode 100644 docs/models/workflowexecutioncanceledattributes.md create mode 100644 docs/models/workflowexecutioncanceledrequest.md create mode 100644 docs/models/workflowexecutioncanceledresponse.md create mode 100644 docs/models/workflowexecutioncompletedattributesrequest.md create mode 100644 docs/models/workflowexecutioncompletedattributesresponse.md create mode 100644 docs/models/workflowexecutioncompletedrequest.md create mode 100644 docs/models/workflowexecutioncompletedresponse.md create mode 100644 docs/models/workflowexecutioncontinuedasnewattributesrequest.md create mode 100644 docs/models/workflowexecutioncontinuedasnewattributesresponse.md create mode 100644 docs/models/workflowexecutioncontinuedasnewrequest.md create mode 100644 docs/models/workflowexecutioncontinuedasnewresponse.md create mode 100644 docs/models/workflowexecutionfailedattributes.md create mode 100644 docs/models/workflowexecutionfailedrequest.md create mode 100644 docs/models/workflowexecutionfailedresponse.md create mode 100644 docs/models/workflowexecutionlistresponse.md create mode 100644 docs/models/workflowexecutionprogresstraceevent.md create mode 100644 docs/models/workflowexecutionrequest.md create mode 100644 docs/models/workflowexecutionresponse.md create mode 100644 docs/models/workflowexecutionstartedattributesrequest.md create mode 100644 docs/models/workflowexecutionstartedattributesresponse.md create mode 100644 docs/models/workflowexecutionstartedrequest.md create mode 100644 docs/models/workflowexecutionstartedresponse.md create mode 100644 docs/models/workflowexecutionstatus.md create mode 100644 docs/models/workflowexecutionsyncresponse.md create mode 100644 docs/models/workflowexecutiontraceevent.md create mode 100644 docs/models/workflowexecutiontraceeventsresponse.md create mode 100644 docs/models/workflowexecutiontraceeventsresponseevent.md create mode 100644 docs/models/workflowexecutiontraceotelresponse.md create mode 100644 docs/models/workflowexecutiontracesummaryattributesvalues.md create mode 100644 docs/models/workflowexecutiontracesummaryresponse.md create mode 100644 docs/models/workflowexecutiontracesummaryspan.md create mode 100644 docs/models/workflowexecutionwithoutresultresponse.md create mode 100644 docs/models/workflowgetresponse.md create mode 100644 docs/models/workflowlistresponse.md create mode 100644 docs/models/workflowmetadata.md create mode 100644 docs/models/workflowmetrics.md create mode 100644 docs/models/workflowregistration.md create mode 100644 docs/models/workflowregistrationgetresponse.md create mode 100644 docs/models/workflowregistrationlistresponse.md create mode 100644 docs/models/workflowregistrationwithworkerstatus.md create mode 100644 docs/models/workflowschedulelistresponse.md create mode 100644 docs/models/workflowschedulerequest.md create mode 100644 docs/models/workflowscheduleresponse.md create mode 100644 docs/models/workflowtaskfailedattributes.md create mode 100644 docs/models/workflowtaskfailedrequest.md create mode 100644 docs/models/workflowtaskfailedresponse.md create mode 100644 docs/models/workflowtasktimedoutattributes.md create mode 100644 docs/models/workflowtasktimedoutrequest.md create mode 100644 docs/models/workflowtasktimedoutresponse.md create mode 100644 docs/models/workflowtype.md create mode 100644 docs/models/workflowunarchiveresponse.md create mode 100644 docs/models/workflowupdaterequest.md create mode 100644 docs/models/workflowupdateresponse.md create mode 100644 docs/models/workflowwithworkerstatus.md create mode 100644 docs/sdks/deployments/README.md create mode 100644 docs/sdks/events/README.md create mode 100644 docs/sdks/executions/README.md create mode 100644 docs/sdks/metrics/README.md create mode 100644 docs/sdks/runs/README.md create mode 100644 docs/sdks/schedules/README.md create mode 100644 docs/sdks/workflows/README.md create mode 100644 docs/sdks/workflowsevents/README.md create mode 100644 examples/mistral/workflows/async_workflow_execute.py create mode 100644 examples/mistral/workflows/async_workflow_execute_and_wait.py create mode 100644 examples/mistral/workflows/workflow_execute.py create mode 100644 examples/mistral/workflows/workflow_execute_and_wait.py create mode 100644 src/mistralai/client/deployments.py create mode 100644 src/mistralai/client/events.py create mode 100644 src/mistralai/client/executions.py create mode 100644 src/mistralai/client/metrics.py create mode 100644 src/mistralai/client/models/activitytaskcompletedattributesrequest.py create mode 100644 src/mistralai/client/models/activitytaskcompletedattributesresponse.py create mode 100644 src/mistralai/client/models/activitytaskcompletedrequest.py create mode 100644 src/mistralai/client/models/activitytaskcompletedresponse.py create mode 100644 src/mistralai/client/models/activitytaskfailedattributes.py create mode 100644 src/mistralai/client/models/activitytaskfailedrequest.py create mode 100644 src/mistralai/client/models/activitytaskfailedresponse.py create mode 100644 src/mistralai/client/models/activitytaskretryingattributes.py create mode 100644 src/mistralai/client/models/activitytaskretryingrequest.py create mode 100644 src/mistralai/client/models/activitytaskretryingresponse.py create mode 100644 src/mistralai/client/models/activitytaskstartedattributesrequest.py create mode 100644 src/mistralai/client/models/activitytaskstartedattributesresponse.py create mode 100644 src/mistralai/client/models/activitytaskstartedrequest.py create mode 100644 src/mistralai/client/models/activitytaskstartedresponse.py create mode 100644 src/mistralai/client/models/archive_workflow_v1_workflows_workflow_identifier_archive_putop.py create mode 100644 src/mistralai/client/models/batchexecutionbody.py create mode 100644 src/mistralai/client/models/batchexecutionresponse.py create mode 100644 src/mistralai/client/models/batchexecutionresult.py create mode 100644 src/mistralai/client/models/cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop.py create mode 100644 src/mistralai/client/models/customtaskcanceledattributes.py create mode 100644 src/mistralai/client/models/customtaskcanceledrequest.py create mode 100644 src/mistralai/client/models/customtaskcanceledresponse.py create mode 100644 src/mistralai/client/models/customtaskcompletedattributesrequest.py create mode 100644 src/mistralai/client/models/customtaskcompletedattributesresponse.py create mode 100644 src/mistralai/client/models/customtaskcompletedrequest.py create mode 100644 src/mistralai/client/models/customtaskcompletedresponse.py create mode 100644 src/mistralai/client/models/customtaskfailedattributes.py create mode 100644 src/mistralai/client/models/customtaskfailedrequest.py create mode 100644 src/mistralai/client/models/customtaskfailedresponse.py create mode 100644 src/mistralai/client/models/customtaskinprogressattributesrequest.py create mode 100644 src/mistralai/client/models/customtaskinprogressattributesresponse.py create mode 100644 src/mistralai/client/models/customtaskinprogressrequest.py create mode 100644 src/mistralai/client/models/customtaskinprogressresponse.py create mode 100644 src/mistralai/client/models/customtaskstartedattributesrequest.py create mode 100644 src/mistralai/client/models/customtaskstartedattributesresponse.py create mode 100644 src/mistralai/client/models/customtaskstartedrequest.py create mode 100644 src/mistralai/client/models/customtaskstartedresponse.py create mode 100644 src/mistralai/client/models/customtasktimedoutattributes.py create mode 100644 src/mistralai/client/models/customtasktimedoutrequest.py create mode 100644 src/mistralai/client/models/customtasktimedoutresponse.py create mode 100644 src/mistralai/client/models/deletebatchjobresponse.py create mode 100644 src/mistralai/client/models/deploymentdetailresponse.py create mode 100644 src/mistralai/client/models/deploymentlistresponse.py create mode 100644 src/mistralai/client/models/deploymentresponse.py create mode 100644 src/mistralai/client/models/deploymentworkerresponse.py create mode 100644 src/mistralai/client/models/encodedpayloadoptions.py create mode 100644 src/mistralai/client/models/eventprogressstatus.py create mode 100644 src/mistralai/client/models/eventsource.py create mode 100644 src/mistralai/client/models/eventtype.py create mode 100644 src/mistralai/client/models/execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop.py create mode 100644 src/mistralai/client/models/execute_workflow_v1_workflows_workflow_identifier_execute_postop.py create mode 100644 src/mistralai/client/models/failure.py create mode 100644 src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py create mode 100644 src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py create mode 100644 src/mistralai/client/models/get_run_v1_workflows_runs_run_id_getop.py create mode 100644 src/mistralai/client/models/get_stream_events_v1_workflows_events_stream_getop.py create mode 100644 src/mistralai/client/models/get_workflow_events_v1_workflows_events_list_getop.py create mode 100644 src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py create mode 100644 src/mistralai/client/models/get_workflow_execution_trace_eventsop.py create mode 100644 src/mistralai/client/models/get_workflow_execution_trace_otelop.py create mode 100644 src/mistralai/client/models/get_workflow_execution_trace_summaryop.py create mode 100644 src/mistralai/client/models/get_workflow_execution_v1_workflows_executions_execution_id_getop.py create mode 100644 src/mistralai/client/models/get_workflow_metrics_v1_workflows_workflow_name_metrics_getop.py create mode 100644 src/mistralai/client/models/get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop.py create mode 100644 src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py create mode 100644 src/mistralai/client/models/get_workflow_v1_workflows_workflow_identifier_getop.py create mode 100644 src/mistralai/client/models/get_workflows_v1_workflows_getop.py create mode 100644 src/mistralai/client/models/jobs_api_routes_batch_delete_batch_jobop.py create mode 100644 src/mistralai/client/models/jsonpatchadd.py create mode 100644 src/mistralai/client/models/jsonpatchappend.py create mode 100644 src/mistralai/client/models/jsonpatchpayloadrequest.py create mode 100644 src/mistralai/client/models/jsonpatchpayloadresponse.py create mode 100644 src/mistralai/client/models/jsonpatchremove.py create mode 100644 src/mistralai/client/models/jsonpatchreplace.py create mode 100644 src/mistralai/client/models/jsonpayloadrequest.py create mode 100644 src/mistralai/client/models/jsonpayloadresponse.py create mode 100644 src/mistralai/client/models/libraries_list_v1op.py create mode 100644 src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py create mode 100644 src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py create mode 100644 src/mistralai/client/models/listworkfloweventresponse.py create mode 100644 src/mistralai/client/models/networkencodedinput.py create mode 100644 src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py create mode 100644 src/mistralai/client/models/querydefinition.py create mode 100644 src/mistralai/client/models/queryinvocationbody.py create mode 100644 src/mistralai/client/models/queryworkflowresponse.py create mode 100644 src/mistralai/client/models/reset_workflow_v1_workflows_executions_execution_id_reset_postop.py create mode 100644 src/mistralai/client/models/resetinvocationbody.py create mode 100644 src/mistralai/client/models/scalarmetric.py create mode 100644 src/mistralai/client/models/schedulecalendar.py create mode 100644 src/mistralai/client/models/scheduledefinition.py create mode 100644 src/mistralai/client/models/scheduledefinitionoutput.py create mode 100644 src/mistralai/client/models/scheduleinterval.py create mode 100644 src/mistralai/client/models/scheduleoverlappolicy.py create mode 100644 src/mistralai/client/models/schedulepolicy.py create mode 100644 src/mistralai/client/models/schedulerange.py create mode 100644 src/mistralai/client/models/signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop.py create mode 100644 src/mistralai/client/models/signaldefinition.py create mode 100644 src/mistralai/client/models/signalinvocationbody.py create mode 100644 src/mistralai/client/models/signalworkflowresponse.py create mode 100644 src/mistralai/client/models/stream_v1_workflows_executions_execution_id_stream_getop.py create mode 100644 src/mistralai/client/models/streameventssepayload.py create mode 100644 src/mistralai/client/models/streameventworkflowcontext.py create mode 100644 src/mistralai/client/models/tempogettraceresponse.py create mode 100644 src/mistralai/client/models/tempotraceattribute.py create mode 100644 src/mistralai/client/models/tempotraceattributeboolvalue.py create mode 100644 src/mistralai/client/models/tempotraceattributeintvalue.py create mode 100644 src/mistralai/client/models/tempotraceattributestringvalue.py create mode 100644 src/mistralai/client/models/tempotracebatch.py create mode 100644 src/mistralai/client/models/tempotraceevent.py create mode 100644 src/mistralai/client/models/tempotraceresource.py create mode 100644 src/mistralai/client/models/tempotracescope.py create mode 100644 src/mistralai/client/models/tempotracescopekind.py create mode 100644 src/mistralai/client/models/tempotracescopespan.py create mode 100644 src/mistralai/client/models/tempotracespan.py create mode 100644 src/mistralai/client/models/terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop.py create mode 100644 src/mistralai/client/models/timeseriesmetric.py create mode 100644 src/mistralai/client/models/unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop.py create mode 100644 src/mistralai/client/models/unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop.py create mode 100644 src/mistralai/client/models/update_workflow_execution_v1_workflows_executions_execution_id_updates_postop.py create mode 100644 src/mistralai/client/models/update_workflow_v1_workflows_workflow_identifier_putop.py create mode 100644 src/mistralai/client/models/updatedefinition.py create mode 100644 src/mistralai/client/models/updateinvocationbody.py create mode 100644 src/mistralai/client/models/updateworkflowresponse.py create mode 100644 src/mistralai/client/models/workflow.py create mode 100644 src/mistralai/client/models/workflowarchiveresponse.py create mode 100644 src/mistralai/client/models/workflowbasicdefinition.py create mode 100644 src/mistralai/client/models/workflowcodedefinition.py create mode 100644 src/mistralai/client/models/workfloweventbatchrequest.py create mode 100644 src/mistralai/client/models/workfloweventbatchresponse.py create mode 100644 src/mistralai/client/models/workfloweventrequest.py create mode 100644 src/mistralai/client/models/workfloweventresponse.py create mode 100644 src/mistralai/client/models/workfloweventtype.py create mode 100644 src/mistralai/client/models/workflowexecutioncanceledattributes.py create mode 100644 src/mistralai/client/models/workflowexecutioncanceledrequest.py create mode 100644 src/mistralai/client/models/workflowexecutioncanceledresponse.py create mode 100644 src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py create mode 100644 src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py create mode 100644 src/mistralai/client/models/workflowexecutioncompletedrequest.py create mode 100644 src/mistralai/client/models/workflowexecutioncompletedresponse.py create mode 100644 src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py create mode 100644 src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py create mode 100644 src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py create mode 100644 src/mistralai/client/models/workflowexecutioncontinuedasnewresponse.py create mode 100644 src/mistralai/client/models/workflowexecutionfailedattributes.py create mode 100644 src/mistralai/client/models/workflowexecutionfailedrequest.py create mode 100644 src/mistralai/client/models/workflowexecutionfailedresponse.py create mode 100644 src/mistralai/client/models/workflowexecutionlistresponse.py create mode 100644 src/mistralai/client/models/workflowexecutionprogresstraceevent.py create mode 100644 src/mistralai/client/models/workflowexecutionrequest.py create mode 100644 src/mistralai/client/models/workflowexecutionresponse.py create mode 100644 src/mistralai/client/models/workflowexecutionstartedattributesrequest.py create mode 100644 src/mistralai/client/models/workflowexecutionstartedattributesresponse.py create mode 100644 src/mistralai/client/models/workflowexecutionstartedrequest.py create mode 100644 src/mistralai/client/models/workflowexecutionstartedresponse.py create mode 100644 src/mistralai/client/models/workflowexecutionstatus.py create mode 100644 src/mistralai/client/models/workflowexecutionsyncresponse.py create mode 100644 src/mistralai/client/models/workflowexecutiontraceevent.py create mode 100644 src/mistralai/client/models/workflowexecutiontraceeventsresponse.py create mode 100644 src/mistralai/client/models/workflowexecutiontraceotelresponse.py create mode 100644 src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py create mode 100644 src/mistralai/client/models/workflowexecutiontracesummaryresponse.py create mode 100644 src/mistralai/client/models/workflowexecutiontracesummaryspan.py create mode 100644 src/mistralai/client/models/workflowexecutionwithoutresultresponse.py create mode 100644 src/mistralai/client/models/workflowgetresponse.py create mode 100644 src/mistralai/client/models/workflowlistresponse.py create mode 100644 src/mistralai/client/models/workflowmetadata.py create mode 100644 src/mistralai/client/models/workflowmetrics.py create mode 100644 src/mistralai/client/models/workflowregistration.py create mode 100644 src/mistralai/client/models/workflowregistrationgetresponse.py create mode 100644 src/mistralai/client/models/workflowregistrationlistresponse.py create mode 100644 src/mistralai/client/models/workflowregistrationwithworkerstatus.py create mode 100644 src/mistralai/client/models/workflowschedulelistresponse.py create mode 100644 src/mistralai/client/models/workflowschedulerequest.py create mode 100644 src/mistralai/client/models/workflowscheduleresponse.py create mode 100644 src/mistralai/client/models/workflowtaskfailedattributes.py create mode 100644 src/mistralai/client/models/workflowtaskfailedrequest.py create mode 100644 src/mistralai/client/models/workflowtaskfailedresponse.py create mode 100644 src/mistralai/client/models/workflowtasktimedoutattributes.py create mode 100644 src/mistralai/client/models/workflowtasktimedoutrequest.py create mode 100644 src/mistralai/client/models/workflowtasktimedoutresponse.py create mode 100644 src/mistralai/client/models/workflowtype.py create mode 100644 src/mistralai/client/models/workflowunarchiveresponse.py create mode 100644 src/mistralai/client/models/workflowupdaterequest.py create mode 100644 src/mistralai/client/models/workflowupdateresponse.py create mode 100644 src/mistralai/client/models/workflowwithworkerstatus.py create mode 100644 src/mistralai/client/runs.py create mode 100644 src/mistralai/client/schedules.py create mode 100644 src/mistralai/client/workflows.py create mode 100644 src/mistralai/client/workflows_events.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5f9243c3..28b65901 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 55730589b8aa15c220d6d72eff876af4 + docChecksum: 463d7bdb3f827922fff6e7a9e1dc09ec docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.1.3 - configChecksum: f9314a8eb94dfdb80621f196b6abfd9c + releaseVersion: 2.2.0rc1 + configChecksum: c8c010d5fe5b11bf44e0ab048a2f7e9a repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 8fcdbb7f-ada3-4a90-970d-e275c2dd2090 - pristine_commit_hash: c03ad2205c9bdefd33787d6b6d3ffc96b56c6f87 - pristine_tree_hash: 015ef7e1d24817483937f656f5f7a5d15ada1e8f + generation_id: ea079c2e-a12c-493c-8efb-a9762e991b50 + pristine_commit_hash: e2352f93e359fc65c00ad6cc04c6e2167424ff5f + pristine_tree_hash: 60f2f179ff27fe8be3c50ff8dded0f32427ee36b features: python: acceptHeaders: 3.0.0 @@ -24,6 +24,7 @@ features: core: 6.0.18 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 + deprecations: 3.0.2 downloadStreams: 1.0.1 enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 @@ -41,6 +42,7 @@ features: nameOverrides: 3.0.3 nullables: 1.0.2 openEnums: 1.0.4 + pagination: 3.0.7 responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 @@ -71,6 +73,62 @@ trackedFiles: id: 750ead4ce7ee last_write_checksum: sha1:a3fa64f01329ca02fdd8d7a6470c3d2f051985e5 pristine_git_object: 615552c32013c702b3e7476b1691952b0a4a65df + docs/models/activitytaskcompletedattributesrequest.md: + id: 9509b84041b6 + last_write_checksum: sha1:bf7116695175ef6664a86b84ebcaa2c095c55bf2 + pristine_git_object: 5050b558d58657f0869d3140e3949b9cca2afcfb + docs/models/activitytaskcompletedattributesresponse.md: + id: 972b526f8415 + last_write_checksum: sha1:d04ffa5085fcf5e440a922bdb130035b86277ff1 + pristine_git_object: 5baaffa6840cb04dbb8eb2379fcea08c96826455 + docs/models/activitytaskcompletedrequest.md: + id: fc911027e2e5 + last_write_checksum: sha1:3897f394900cb847c6efcf67beff158d330035a9 + pristine_git_object: 9008bbf1e50e37546029205d756e5ef8493724d8 + docs/models/activitytaskcompletedresponse.md: + id: 6aade3f8c26c + last_write_checksum: sha1:944b923aa932452372abebfe6d61ab739555109f + pristine_git_object: 56a646311c1f9f7bb9dcd8187c9e4f937f19e6cb + docs/models/activitytaskfailedattributes.md: + id: a69d5f4b0b99 + last_write_checksum: sha1:e5371dae85ec79f485b5e3afc1ac8c29a2424163 + pristine_git_object: 5cb9cafe9ce235ff996c3f1529babedfc6ebe239 + docs/models/activitytaskfailedrequest.md: + id: 7f9c3fa2ddf7 + last_write_checksum: sha1:2cf9ff1213584c3a20993eb2e29175f5ee528a90 + pristine_git_object: 1db1d90a44ba364f9d64e15c1d4663e549be9701 + docs/models/activitytaskfailedresponse.md: + id: 325e821a4d2f + last_write_checksum: sha1:165eb54c023c8d29fa1093542cf62b69cbc4657b + pristine_git_object: 0853f68d3413dead9b67b3183b287a08f9339faa + docs/models/activitytaskretryingattributes.md: + id: 4d2e278266f7 + last_write_checksum: sha1:a79f27b4272efab1378a0f2d7de12939dfb7a933 + pristine_git_object: 9216607678cc149d446bf30ba92a6cf9b3d4d3d2 + docs/models/activitytaskretryingrequest.md: + id: fe8bf3783cda + last_write_checksum: sha1:b6f5c9dc5bc15ca1d5d7fd85f5541657c803fe59 + pristine_git_object: fb6e27b5cb4585f2496edea5cf060df59cb7495f + docs/models/activitytaskretryingresponse.md: + id: ca0fb7b72379 + last_write_checksum: sha1:0ede54e73f1c5c77e585e8c9f3892c626bede7cf + pristine_git_object: 8b7bdd42e45eb8b3c5ad33a2de5ac2d15d8b3453 + docs/models/activitytaskstartedattributesrequest.md: + id: a33e1e21c741 + last_write_checksum: sha1:caa2e31f0a6fdc73de5df68136a585dfe7f18d93 + pristine_git_object: e264b20b3e50d78a37f15bcd5bbf7dd207a87ac4 + docs/models/activitytaskstartedattributesresponse.md: + id: b0d2e886ad19 + last_write_checksum: sha1:81ddc501fe7c04dc2313ef93ec5897a806934798 + pristine_git_object: 5d1f59a838412b1fc863dc51f4269548c760e584 + docs/models/activitytaskstartedrequest.md: + id: 29ea1621e782 + last_write_checksum: sha1:d6aa2804105baceb53fa31a5ab2ff15d3f20a371 + pristine_git_object: 02421624f37cfefbb8544a2b207b0b0fdd421a30 + docs/models/activitytaskstartedresponse.md: + id: c25113506e99 + last_write_checksum: sha1:3cd53ec4c3c8bdc389c55cf527c960b3b8a91c30 + pristine_git_object: 1aee1533fc92116e79a13b338dd6e6e74fcab800 docs/models/agent.md: id: ffdbb4c53c87 last_write_checksum: sha1:17c0a4bcfb18b9db99bb3a783d275a046b66bb78 @@ -243,6 +301,10 @@ trackedFiles: id: 133f4af8058f last_write_checksum: sha1:95fa73ebd765cbd244c847218df6d31e18dc5e85 pristine_git_object: 276656d1d00ca174e78aa9102f7f576575daa818 + docs/models/archiveworkflowv1workflowsworkflowidentifierarchiveputrequest.md: + id: 782799cd1e0b + last_write_checksum: sha1:c4e29a286d05af9de794a7b955dd5443c8ee58bc + pristine_git_object: 6ebe540af990f5a52dbd236e6d29fd138a2fae22 docs/models/arguments.md: id: 7ea5e33709a7 last_write_checksum: sha1:09eea126210d7fd0353e60a76bf1dbed173f13ec @@ -301,8 +363,12 @@ trackedFiles: pristine_git_object: f8401a8e26c3d54aa47a1a6cc265050f0a4afc80 docs/models/basefielddefinition.md: id: f9e0bbae859b - last_write_checksum: sha1:28a4d2774231873af97debedcf2fba4f49e83bf2 - pristine_git_object: 3f7abea981c142e1fb1ba993a10dbd0e347b2df2 + last_write_checksum: sha1:fea96b146e5696ff3b93e6b6529fe4ace90616aa + pristine_git_object: 3d721d91572e4cdb8d5de5a2cdd294693f552d73 + docs/models/basefielddefinitiontype.md: + id: e0678603f859 + last_write_checksum: sha1:4c79afbbc22081d7ac18c3de963b92dd2dca0069 + pristine_git_object: efdff2a4bf26336c8f1880683fb2d798ee2d630d docs/models/basemodelcard.md: id: 2f62bfbd650e last_write_checksum: sha1:d42dfe36b103ee95f55e91ac306e3179060dfb3f @@ -315,6 +381,18 @@ trackedFiles: id: 8053e29a3f26 last_write_checksum: sha1:23a12dc2e95f92a7a3691bd65a1b05012c669f0f pristine_git_object: 95016cdc4c6225d23edc4436e11e4a7feacf1fe6 + docs/models/batchexecutionbody.md: + id: eb5f0e359ea6 + last_write_checksum: sha1:1501d090c7bcb631f0c4ec0e07417eea8277d632 + pristine_git_object: 9c31e334d7b44a1fea834f14f84945ea69d4a55b + docs/models/batchexecutionresponse.md: + id: 77f8c97e0418 + last_write_checksum: sha1:3dc72435fc7dcf31172ab0f4a5301b25e950fda2 + pristine_git_object: 394b6d86517e1339bbab6a629289b52cbc237684 + docs/models/batchexecutionresult.md: + id: a04ce80759e1 + last_write_checksum: sha1:c595f3e603609a9e676bf253f3935a74f9bed27a + pristine_git_object: 57107bbaa5a544f473a1e5d268ba7ed89dd27ebd docs/models/batchjob.md: id: de2a00d0f739 last_write_checksum: sha1:1160822c4032e1745dfaf37abcac02e78cbc4fb4 @@ -339,6 +417,10 @@ trackedFiles: id: cc1272bc909c last_write_checksum: sha1:291f6152431f3f14c16df9005a4392907dbf03e2 pristine_git_object: 1f2a7a365ac4a3811ccf9760e56eabbf9106638d + docs/models/cancelworkflowexecutionv1workflowsexecutionsexecutionidcancelpostrequest.md: + id: 69e393daf019 + last_write_checksum: sha1:51a5c5fa815093aa1e91ec0f41567066b025abf3 + pristine_git_object: 4968d664d1f4d34c300bc6a6dec18c992652999f docs/models/chatclassificationrequest.md: id: 57b86771c870 last_write_checksum: sha1:bfd2fb8e2c83578ca0cea5209ea3f18c3bcd2ae5 @@ -445,8 +527,8 @@ trackedFiles: pristine_git_object: f3b10727b023dd83a207d955b3d0f3cd4b7479a1 docs/models/classifierfinetunedmodel.md: id: b67a370e0ef1 - last_write_checksum: sha1:5fe3c26e337083716dd823e861924a03c55ce293 - pristine_git_object: ad05f93147d6904ee62602480c24644ec5e4cf63 + last_write_checksum: sha1:d2fee635b135b4728a7966dd62c7ddea3f2d0c1c + pristine_git_object: 9fa69cbb27a53456fd359ba8650d3510264926b9 docs/models/classifierfinetuningjob.md: id: 5bf35c25183f last_write_checksum: sha1:afedddfe38e217189b5ec12ded74606c3b1e4c59 @@ -505,8 +587,8 @@ trackedFiles: pristine_git_object: 7a66e8fee2bb0f1c58166177653893bb05b98f1d docs/models/completionfinetunedmodel.md: id: 23a7705a9c89 - last_write_checksum: sha1:50d173b7505a97435c9d7ccb4fa99af04a51c6a2 - pristine_git_object: 0055db021f1c039c84cf7cfecd654683d2f9996f + last_write_checksum: sha1:43b1d576afd2da43e8a97f374b09c6a5ed236ec1 + pristine_git_object: 26bcdb1700c8e8ce52c93da302e7c05e97935091 docs/models/completionfinetuningjob.md: id: 13c69dd18690 last_write_checksum: sha1:b77e82f00f851034999986ff67aea5b0b558fbd2 @@ -565,8 +647,8 @@ trackedFiles: pristine_git_object: 9ef7a35154327673593f323a142fe63ec706e799 docs/models/connectorcalltoolv1request.md: id: a7a294c4280c - last_write_checksum: sha1:296a9c31a7b9dc7621b871000f17f6ced3d3a288 - pristine_git_object: cdda08cf9a0c30e7b2e8e1017cd633472ea398c7 + last_write_checksum: sha1:0d8983932c2f4eb6f19e7a81c1e76eeb7ee9bb2f + pristine_git_object: dea7083dabf1fe9f5470a5b13d6e65ae234d8aa8 docs/models/connectordeletev1request.md: id: 8d5621ba6395 last_write_checksum: sha1:881b88b2e0788f7c16938115a6cada5f0ebe144b @@ -807,6 +889,98 @@ trackedFiles: id: 7bcc77607afa last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 + docs/models/customtaskcanceledattributes.md: + id: 5a2768dda295 + last_write_checksum: sha1:0a1df1ffa17cd0857bf3e0ac884406d7dfeb07f0 + pristine_git_object: 3a5facdd3be90098f0f22bcf05215472cf2d4ec9 + docs/models/customtaskcanceledrequest.md: + id: d6ef1bfd85d9 + last_write_checksum: sha1:c03f0e55f8a90476dea366bf3246a458cab76734 + pristine_git_object: 4a313ab15cc92a231b9ae3361a745e1ad0c3f767 + docs/models/customtaskcanceledresponse.md: + id: 79e4f2bbf720 + last_write_checksum: sha1:c65ddfa80c6bd5ce96fcd0de194f1dbb68423dea + pristine_git_object: 0bcee2279755656a624d626acea0a157fa3b381c + docs/models/customtaskcompletedattributesrequest.md: + id: 841c933a0d4d + last_write_checksum: sha1:11ecb1aa3f1be3c38ea6e42e5c47a2c714800d0c + pristine_git_object: 43671ef9518e80fde77ee2023c2caf282388b0f9 + docs/models/customtaskcompletedattributesresponse.md: + id: c12961b43e1c + last_write_checksum: sha1:772f6aa0610241727b090426384fcf883fa919cb + pristine_git_object: a6a136e75a0625d155eb57808fc6f967dc10cc47 + docs/models/customtaskcompletedrequest.md: + id: 7591787e3f54 + last_write_checksum: sha1:d4d3e2e6f96a194a0988b9f264f739c961d0b03b + pristine_git_object: 90ec92a736e9c6edb95871cda81c49b74492e446 + docs/models/customtaskcompletedresponse.md: + id: 81d843216312 + last_write_checksum: sha1:0439d35a428e5d8d321da8b710ce72c188802085 + pristine_git_object: 6871184f3d850a628ed71cbef9c98ec3e742dbfe + docs/models/customtaskfailedattributes.md: + id: cd0cdf6bd8d8 + last_write_checksum: sha1:71cf249d1b1bd2df1cf3ec4426da9b8c9bb82c37 + pristine_git_object: f4e3ab2d57ec9d447c3570e6832f911c93c94f96 + docs/models/customtaskfailedrequest.md: + id: 59a1820fceef + last_write_checksum: sha1:6d6edbc9e05d3d76a0b42501777d61a367ea5a26 + pristine_git_object: ddfd79a608ba60d960defd5909492fd941233d1e + docs/models/customtaskfailedresponse.md: + id: 16c047b0f70f + last_write_checksum: sha1:639353633a2fd6f383896673750338235a1c442e + pristine_git_object: e14e4afa4b1fe76d10a2f8505ce88e9a828d845e + docs/models/customtaskinprogressattributesrequest.md: + id: 44d737ed33c5 + last_write_checksum: sha1:5eca2ef7c833740ac20e48e8e967fa25a8678033 + pristine_git_object: 6241f13a2b45926044aa71636c4a2c2e18decacb + docs/models/customtaskinprogressattributesrequestpayload.md: + id: 0452df61c52a + last_write_checksum: sha1:b347ebe1758df4bfc98db6e73cca8c44ac596320 + pristine_git_object: 776898babb4af16af124e4103e17651f9d75d308 + docs/models/customtaskinprogressattributesresponse.md: + id: 8482e22b58c4 + last_write_checksum: sha1:1716403748b86df8b8c78dd60c34098130789a0b + pristine_git_object: 311e4fb5215ae3cbf1617f5049abc3318237e615 + docs/models/customtaskinprogressattributesresponsepayload.md: + id: 95c1fda66b5d + last_write_checksum: sha1:48304d42e556419f50e7f294f9124f0e6175194b + pristine_git_object: 96e460227d2a9eba0da11aca8d03b944695b94d0 + docs/models/customtaskinprogressrequest.md: + id: 794c9c4840e2 + last_write_checksum: sha1:fc9d8ed5220d423fb1bb1a6f418e2c50cbd3da28 + pristine_git_object: 4e32436301d575da50f1c9833f46606b45906b07 + docs/models/customtaskinprogressresponse.md: + id: a181c7602b7f + last_write_checksum: sha1:43caaf16e8ef772ab4a4b1f2cd926a59c87b627f + pristine_git_object: 72afa91fb2baadd7dd8cf32aad2b2812316a6953 + docs/models/customtaskstartedattributesrequest.md: + id: 402fc0112fce + last_write_checksum: sha1:d23c2c717dcad52fc6e2afaa88853df95f7e066f + pristine_git_object: ff8d50ece8f2d89fe7158210f5954f7c475a0bf8 + docs/models/customtaskstartedattributesresponse.md: + id: 272cf75ac5d3 + last_write_checksum: sha1:cd16d650b11898966e3950305b3ca2cf035fc6d5 + pristine_git_object: 8bf43423f0dbba2d89429e4d98f7ae1ac1c460b1 + docs/models/customtaskstartedrequest.md: + id: 7735ab9faa24 + last_write_checksum: sha1:c531b566a1bd31ce7f1118043ce20c1616b2eb7c + pristine_git_object: aa4dc293d80e71142e1c3594b6a06f3d812aa865 + docs/models/customtaskstartedresponse.md: + id: 6ccd9fe137bc + last_write_checksum: sha1:031eac9a01bc24b36a9cf2eb4ea864c89ba709e5 + pristine_git_object: 80b1b08b02b219ef714e44d0853df4c992db84eb + docs/models/customtasktimedoutattributes.md: + id: b941e1c031db + last_write_checksum: sha1:db82046ed2aa47a5c206a9e5cea7f7ab066a3329 + pristine_git_object: b302b07666ad0b807990d42d6ef67a3c9c213bc8 + docs/models/customtasktimedoutrequest.md: + id: 45967446735d + last_write_checksum: sha1:389f1926ae5168214d774bf9aa915bef1cac2a62 + pristine_git_object: 5be6c0af5c5363a812fe417f56eeb9527961f0ef + docs/models/customtasktimedoutresponse.md: + id: b4f8e7f006e7 + last_write_checksum: sha1:9b167994685d056179122eeed0df39c6b52c9cf4 + pristine_git_object: 75d497434c80a29a3010c451fb6b94d32d213863 docs/models/dataset.md: id: 31af4d237e19 last_write_checksum: sha1:073fa9a0b7891ccd9b6ae64ba960d74eeb5c9007 @@ -823,6 +997,10 @@ trackedFiles: id: 449ed69d3872 last_write_checksum: sha1:55a649fc627e297da420482599680da87989c297 pristine_git_object: dbc7c3d0046af0423eebab4d0d982e55a3ed1d38 + docs/models/deletebatchjobresponse.md: + id: 077483bb3832 + last_write_checksum: sha1:2789ca6f7663b82731201d9439d949c8dfd1077c + pristine_git_object: d0df2d193f18773ba758545127e0322b76a7b6cf docs/models/deletecampaignv1observabilitycampaignscampaigniddeleterequest.md: id: "853118278484" last_write_checksum: sha1:b8dc39c31de60ed218a063efd7e8f07fcbb1c63f @@ -867,6 +1045,22 @@ trackedFiles: id: 7307bedc8733 last_write_checksum: sha1:a1211b8cb576ad1358e68983680ee326c3920a5e pristine_git_object: 8142772d7ea33ad8a75cf9cf822564ba3f630de2 + docs/models/deploymentdetailresponse.md: + id: 712f7bbc8cc0 + last_write_checksum: sha1:b346373ba31e99b0238582297011c8f2f10d2f13 + pristine_git_object: e1d84e11532acb21ff4d083e704bbca68385ebf3 + docs/models/deploymentlistresponse.md: + id: 45a11caf1008 + last_write_checksum: sha1:aa393b5a879506970c6d27342168d8f5f50d700c + pristine_git_object: 22868512ffd2c564c8a8ab02fbb9f324d2ecf013 + docs/models/deploymentresponse.md: + id: a9da842850c4 + last_write_checksum: sha1:073ef3db8e9709464950891a311243f9bf96c28d + pristine_git_object: f6f12836457eb150c477d37d7325238dac25ded5 + docs/models/deploymentworkerresponse.md: + id: 07cd9c89237a + last_write_checksum: sha1:7da6e9f5df0b2d81ae899b28a3c5cdb9fbd2b0d3 + pristine_git_object: 9b76278e391626a3a8ab3607def03730f169215b docs/models/document.md: id: cd1d2a444370 last_write_checksum: sha1:c10641b02547bedcc982b8997097083dfc562598 @@ -915,6 +1109,10 @@ trackedFiles: id: 89b078acdc42 last_write_checksum: sha1:e3e9200948f864382e0ecd3e04240b13d013141a pristine_git_object: 20b50618ac99c63f7cf57fe4377840bfc1f85823 + docs/models/encodedpayloadoptions.md: + id: 033bd880796d + last_write_checksum: sha1:49223cf4218c03c0615357040dc31149214fa67a + pristine_git_object: 15367ce6382bcfb3bb090620877719fac93438fe docs/models/encodingformat.md: id: 066e154e4d43 last_write_checksum: sha1:cc98abdb803d374146f58a6811c9e3f2b58ff5f3 @@ -931,6 +1129,26 @@ trackedFiles: id: 311c22a8574a last_write_checksum: sha1:627793d6aed5e378e3f2eeb4087808eb50e948d5 pristine_git_object: 3eebffca874b8614a5be3d75be3cb7b0e52c2339 + docs/models/eventprogressstatus.md: + id: af5980e18511 + last_write_checksum: sha1:83557558fb755cbdba7b8cfce5610f2f13f69a58 + pristine_git_object: 02033178750aea0683ffac8323b94d8caa7d07a1 + docs/models/eventsource.md: + id: 0a07100b20e9 + last_write_checksum: sha1:687dd7c7a4e01c08c13aacc0709e876179f18da3 + pristine_git_object: ac53ccf7936c807910c335a52a7cde6549982d0f + docs/models/eventtype.md: + id: bfe6f1477d8b + last_write_checksum: sha1:7932d1d96baca16e3858c2be7c35d406fafe9ebf + pristine_git_object: 6add793e64b13b0a6adbd78f7ee165ef7d91c26f + docs/models/executeworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepostrequest.md: + id: 33e258603a49 + last_write_checksum: sha1:f156d7d837872e5b33f19b385a650a547ad39436 + pristine_git_object: 54de12a2b578e1d81e2b16d6bf27d2fb865014f7 + docs/models/executeworkflowv1workflowsworkflowidentifierexecutepostrequest.md: + id: e4a5c891d180 + last_write_checksum: sha1:d47a7d1b9d89462c346c54edd7c0dcbbeae25765 + pristine_git_object: 29c55a770e232a65565b342ea700e53ab36318cb docs/models/executionconfig.md: id: c96b31c33dcd last_write_checksum: sha1:971187596dde6a53f9e7f4c26cb0f37d5cbafb40 @@ -943,6 +1161,10 @@ trackedFiles: id: 16660f92d7d1 last_write_checksum: sha1:fa22e53a929291e6b057283482ca7871fb6d2062 pristine_git_object: efe4bbb058c168ad531be27cc135f09464d0da13 + docs/models/failure.md: + id: 3f79c7d64eac + last_write_checksum: sha1:344f1cea9b786a399a0dd974d4df010714031b2a + pristine_git_object: 259d7bcf2d03d3f26e4a760e92eeb5c039e4aee8 docs/models/feedresultchatcompletioneventpreview.md: id: 5ed9f0e8db01 last_write_checksum: sha1:c5950602d174d49f293cb85047d871d360e6af16 @@ -1069,8 +1291,8 @@ trackedFiles: pristine_git_object: 36d3db18679569d21e6bacfe13bcd22715372297 docs/models/ftmodelcard.md: id: 15ed6f94deea - last_write_checksum: sha1:5873780bc2a828f1164818eb9c64c3f69c6618cc - pristine_git_object: f65ff6e888a460ac5f3ad3a4556ccdd8366960c0 + last_write_checksum: sha1:8e1383e26d86fd247fa1762dbb0508ceed932a49 + pristine_git_object: 0381dd81d0460af3aacdf81a495c304ed9b78451 docs/models/function.md: id: 416a80fba031 last_write_checksum: sha1:a9485076d430a7753558461ce87bf42d09e34511 @@ -1167,6 +1389,10 @@ trackedFiles: id: c8c1559b454f last_write_checksum: sha1:98b580deaae5c4720cf905907db49e966b5e294a pristine_git_object: 073ab76999d4f1b8b0b6b89feacc5137b156c4e5 + docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md: + id: 655b59bc906d + last_write_checksum: sha1:2a98869f76afaf5be8d93482613027600f0d4039 + pristine_git_object: 6af056b16a647cf9e4e541cf433cf5ee2d3a8a80 docs/models/getfileresponse.md: id: a983b3c8acd6 last_write_checksum: sha1:643a3c92ce26f21a915bd485fc4af7817e79f864 @@ -1179,6 +1405,14 @@ trackedFiles: id: 5a7a03200f1f last_write_checksum: sha1:f9bbebd7b36957b6d9807063f2926b4a37c73a7e pristine_git_object: 154ece82c1932053d4764d7d8fb2ab0f394027b2 + docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md: + id: d0010e389ace + last_write_checksum: sha1:656aedb84d30a4f532ed0e2247f5424023fb4fe2 + pristine_git_object: 8d4af7322e4ebe359216fb794c7209c3dc624d69 + docs/models/getrunv1workflowsrunsrunidgetrequest.md: + id: ac9de7c67a5f + last_write_checksum: sha1:40fa492321f18e77792d49cb9142b0293be7ffe3 + pristine_git_object: 6b03369064e2bb2fedffa606d8bff20d9fceae00 docs/models/getsignedurlresponse.md: id: 5539e5d7c3d4 last_write_checksum: sha1:7198474f48bfba6d47326cd436e4a00a8ba70ce3 @@ -1187,6 +1421,14 @@ trackedFiles: id: 38d58bb7d102 last_write_checksum: sha1:63b80dff98aa4fc959f71d1e41faa0eeec4801aa pristine_git_object: cf276b5e4297eec4d5d4c6996fde7144d54dd8c0 + docs/models/getstreameventsv1workflowseventsstreamgetrequest.md: + id: c4f4986768d9 + last_write_checksum: sha1:e3c15d6f54d2d24040eb0d7cf76e435b50d04965 + pristine_git_object: 9b5ae17446b4b959c7ab47751921313864ddaf2e + docs/models/getstreameventsv1workflowseventsstreamgetresponsebody.md: + id: 5d958d2ebde1 + last_write_checksum: sha1:58ffec3d780d35a688634d273588e0209afd4f72 + pristine_git_object: 18f9b63939e1110145d3201d45b584a0c155a964 docs/models/getvoicesampleaudiov1audiovoicesvoiceidsamplegetrequest.md: id: fa1b72f3aa6b last_write_checksum: sha1:10b8897bf884ac876559ef574a76bee6df3b7afb @@ -1195,6 +1437,54 @@ trackedFiles: id: ff2e9c3966c2 last_write_checksum: sha1:83baeac8591dbf035dd1c04fbe9c06e0e65afcd8 pristine_git_object: 09caf65c1d4f3415ccf2a1095a54748a7f6ca2df + docs/models/getworkfloweventsv1workflowseventslistgetrequest.md: + id: cb48ac6b32b0 + last_write_checksum: sha1:7194b7cd11b927fefdf242e651d8cdc705680f30 + pristine_git_object: 5594402ce103f05e902b33c465fbaa225a3e5eb6 + docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md: + id: 7524ddab7997 + last_write_checksum: sha1:b47a3b47cee2e582a58d2504511c37266bb3b0b3 + pristine_git_object: dc63ca0a3d798c3be90f3b126357e239edb34806 + docs/models/getworkflowexecutiontraceeventsrequest.md: + id: 6722ae5f7115 + last_write_checksum: sha1:2764ba45e55fe648e50f8d397826cebbf3a3dced + pristine_git_object: 4a1d8021877186295dcdaedea6a40429267f0668 + docs/models/getworkflowexecutiontraceotelrequest.md: + id: b74d60dc0f0a + last_write_checksum: sha1:48145598f7e45876a30bf3018a7da8c1bdfacaab + pristine_git_object: 8c4f9be70233a49cd0d74051a44756e030c2bc1a + docs/models/getworkflowexecutiontracesummaryrequest.md: + id: 692ff7296f7d + last_write_checksum: sha1:208b98b98c00754861017b97072bd2a321f1047b + pristine_git_object: a4524bbcf83fd9df132fbcb3cf983d3a72e998a1 + docs/models/getworkflowexecutionv1workflowsexecutionsexecutionidgetrequest.md: + id: 24a42f780b20 + last_write_checksum: sha1:9f3215cad08d84b5888d5cd30011bed0c37adfe3 + pristine_git_object: f9566f1c0050c4e66f5985761b6cbc56ec0a73cd + docs/models/getworkflowmetricsv1workflowsworkflownamemetricsgetrequest.md: + id: bf5300598ee8 + last_write_checksum: sha1:719dbcd2d7c28d159741ed3c64876c31f82c2691 + pristine_git_object: a6e623dd847551f7d96b4b90ef8e9d504529112a + docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md: + id: 4b699772bee5 + last_write_checksum: sha1:db3928c8dd78fd1d16dbd0a7d667a92036785f2e + pristine_git_object: ee72444555a1303163849f32eeee568c7118698e + docs/models/getworkflowregistrationv1workflowsregistrationsworkflowregistrationidgetrequest.md: + id: 597766b7d51b + last_write_checksum: sha1:5c58fbed3af8d08dd94eaba0ae8ed41d61fb6c52 + pristine_git_object: ec43ad56a6698eaec7a89e015f42154a7a97dea8 + docs/models/getworkflowsv1workflowsgetrequest.md: + id: e61c93d9ecc7 + last_write_checksum: sha1:3285ea1da5f7e05bc3d15885267d25d2968cf930 + pristine_git_object: c83ed6d1d0028fcb008b46234767e4a62fbd7c20 + docs/models/getworkflowsv1workflowsgetresponse.md: + id: a6375877d4dd + last_write_checksum: sha1:26401f0edf76e787a8ca780eb97724a4c6ca37a7 + pristine_git_object: 6ec4f4e79cbc377f6b1eb4fff720425cda6b731e + docs/models/getworkflowv1workflowsworkflowidentifiergetrequest.md: + id: ddc86b6b1bf9 + last_write_checksum: sha1:63f5d6e78e90572125d1b366ccc0c75a897210e7 + pristine_git_object: 2f5c2b4dc84095a1b00bac6c728c86dd1f80c2b2 docs/models/githubrepository.md: id: 66c120df624b last_write_checksum: sha1:045e538dd7faffc1c6c6e6816563c5c8e776a276 @@ -1283,6 +1573,10 @@ trackedFiles: id: 798cb1ca1385 last_write_checksum: sha1:67e8bda117608aee0e09a702a1ef8a4b03c40b68 pristine_git_object: c19d0241784ff69bc68a11f405437400057d6f62 + docs/models/jobsapiroutesbatchdeletebatchjobrequest.md: + id: 2e077aebc6a1 + last_write_checksum: sha1:cdc193bac69847c56040e5e2e514578d3bd9a4e1 + pristine_git_object: 02f1ec244b3751b07149cbd13c681e6f77ef897d docs/models/jobsapiroutesbatchgetbatchjobrequest.md: id: e83a7ec84f8a last_write_checksum: sha1:d661875832b4b9d5f545262216c9fcb9a77c8cd0 @@ -1343,6 +1637,46 @@ trackedFiles: id: c265a30fd4cf last_write_checksum: sha1:410c62a884aae902cdfbfcab33779e62487de13b pristine_git_object: f40350bf9d74d09ca3a2ec6d91d9068bda631ef5 + docs/models/jsonpatchadd.md: + id: 07cac5b1f9b2 + last_write_checksum: sha1:74f0bea77f7e1dfebdc686e709a6be90bbda7228 + pristine_git_object: 2a091c8ac8bfb57bfada1ce173c75543c9431fd0 + docs/models/jsonpatchappend.md: + id: 5d68c9614b70 + last_write_checksum: sha1:c1d5ac89195b6712b8a4b61450450a4f9b0e910e + pristine_git_object: 684cc896b4ba80ba1bbc278e119fc9fc1dbbf924 + docs/models/jsonpatchpayloadrequest.md: + id: 581f55578656 + last_write_checksum: sha1:a8a92eb17cdf8227cc266792e62200fee47b5665 + pristine_git_object: fb4da675da1092185beb217b8edf72e31e6b1ffd + docs/models/jsonpatchpayloadrequestvalue.md: + id: 94fb761c9ad9 + last_write_checksum: sha1:a420f0be2cdcad371a4d9449e58b981910832616 + pristine_git_object: d58a1323190368d62d563b2cf679cae86aff813e + docs/models/jsonpatchpayloadresponse.md: + id: fb6daf532ebb + last_write_checksum: sha1:bb2d72a81a43a44a183fea86372e037b072ae085 + pristine_git_object: ce9dbd90491812583b873030d1cc50139769b3fa + docs/models/jsonpatchpayloadresponsevalue.md: + id: 8c09c68e6201 + last_write_checksum: sha1:16506ea5571f2f58b488210f08b6b22431d6b248 + pristine_git_object: 21c7d186ad3eaa1b233d0a640fa8e2c27cc08e83 + docs/models/jsonpatchremove.md: + id: 8a64b68498b3 + last_write_checksum: sha1:9619b20ac7d2b69e034fd7e549d2469e2369985a + pristine_git_object: 735305cf06722f055065e64b23be040f40bfa96f + docs/models/jsonpatchreplace.md: + id: c7115b07e32f + last_write_checksum: sha1:698ad1a5ce80a06bdcd5e7c6dc582f9f05d94e31 + pristine_git_object: 382b7d93925d0d68af43c4a745144a71d1f61dcf + docs/models/jsonpayloadrequest.md: + id: 92f7a9ed39ae + last_write_checksum: sha1:e1f66388d6c407091bb9af5846e8f3c8602aa368 + pristine_git_object: 63ec21420a788d7b108fc9dc75ae3c9346d1971d + docs/models/jsonpayloadresponse.md: + id: ce61786a7c2e + last_write_checksum: sha1:369e120be622bd6deb9d2d5161482e018cb8ef42 + pristine_git_object: 01eaae6160941599a44254091a0b237a90bc77f5 docs/models/jsonschema.md: id: a6b15ed6fac8 last_write_checksum: sha1:523465666ad3c292252b3fe60f345c7ffb29053f @@ -1451,6 +1785,10 @@ trackedFiles: id: f47ad71ec7ca last_write_checksum: sha1:3b2bf1e4f6069d0c954e1ebf95b575a32c4adeac pristine_git_object: 6e1e04c39c15a85d96710f8d3a8ed11a22412816 + docs/models/librarieslistv1request.md: + id: eb6047c126d3 + last_write_checksum: sha1:9079cd35336bd61bcf0a46c1b350671a5e7df9df + pristine_git_object: b9f99a17907fad6427542181936fb962ca873ed3 docs/models/librariessharecreatev1request.md: id: 99e7bb8f7fed last_write_checksum: sha1:f37578c7882eab83cca3cb2aaf1ac17b9a21934c @@ -1499,6 +1837,10 @@ trackedFiles: id: a776dbfbc267 last_write_checksum: sha1:abba75226b6bc439381777ea05d83bc8e910e53c pristine_git_object: af046696ebac829f4d7f6333075a4e5b26dd855e + docs/models/listdeploymentsv1workflowsdeploymentsgetrequest.md: + id: 7c9f534b899b + last_write_checksum: sha1:5a57963e7633b8ae37c8967dd9613c25995e9136 + pristine_git_object: c93c0dbbd799f3817fc94c257720e231378d6c37 docs/models/listdocumentsresponse.md: id: f2091cee0405 last_write_checksum: sha1:335d0ccd3a448e65739d5a0cfa2c67614daec031 @@ -1521,20 +1863,44 @@ trackedFiles: pristine_git_object: 66883d64d0e040f5eef0976a88c1a83b7a3137ed docs/models/listlibrariesresponse.md: id: 87e3bec10745 - last_write_checksum: sha1:00522e685ec71a54f5f272d66b82e650848eaf36 - pristine_git_object: e21b9ced628f6fd5ae891d4a46666ebc94546859 + last_write_checksum: sha1:7c0a155e2cd02e420745c3739df42b824305e363 + pristine_git_object: 18cb63c16ab28d9399b6035c36f24a761008f734 docs/models/listmodelsv1modelsgetrequest.md: id: ade37f6d014a last_write_checksum: sha1:10d4e1242cdac6cdc7597881e0d25ce06760971f pristine_git_object: 537269f7e774b31c45ac75c82c096530c0bd2b4e + docs/models/listrunsv1workflowsrunsgetrequest.md: + id: 132927390b33 + last_write_checksum: sha1:5ec52640c83f0d560dc8efb39afc50317fa2e31c + pristine_git_object: 259876c68b0c9b5684b3c565b3df4bb3430a76b6 + docs/models/listrunsv1workflowsrunsgetresponse.md: + id: da55980ef20d + last_write_checksum: sha1:e176049e48a9f78b47be166b6dc8f47bca3e7da7 + pristine_git_object: 405119b0a2320a2fd6a6a8b43bede0b5e8435da8 + docs/models/listrunsv1workflowsrunsgetstatus.md: + id: 91fb9d0c3512 + last_write_checksum: sha1:5b6ee877902594eda2f001322c275100981d778d + pristine_git_object: e6f0d606f374000f752021bee5216f622e0df405 docs/models/listsharingresponse.md: id: 165871ba2e7d last_write_checksum: sha1:2c6c18123e297829dde6e877f3df984ce20aeef3 pristine_git_object: 4c29d4d4fc8087424104ff7d5312177ec4940094 docs/models/listvoicesv1audiovoicesgetrequest.md: id: 2728f62b4ff4 - last_write_checksum: sha1:3173ded8a9dfea913295ab4cc943e30a8a30052b - pristine_git_object: f767d3099a2fa8b487f9d92be421623c536f19b7 + last_write_checksum: sha1:ef9581d0fa6fbabde734174727c9600fd46c9938 + pristine_git_object: 67c04d7c738ff871aaaeb8252721265f1754b5d1 + docs/models/listvoicesv1audiovoicesgettype.md: + id: 953d5379682a + last_write_checksum: sha1:63cdc365642971afbc8e737cde026775860bc3d7 + pristine_git_object: a44f95b351b2da5ff6a2ab56a72b24478710771e + docs/models/listworkfloweventresponse.md: + id: 891251fced72 + last_write_checksum: sha1:a8eceef60570b6fe8d254ce05806a8966e7631af + pristine_git_object: 72c51a165a6d7430910db5dc115fad19518bd371 + docs/models/listworkfloweventresponseevent.md: + id: b7e837f50a09 + last_write_checksum: sha1:f7a335daf57910fbc5bf435d43023271772bfc8f + pristine_git_object: 2b8cb1e461c146faeb06a940781803a008ea2173 docs/models/loc.md: id: b071d5a509cc last_write_checksum: sha1:09a04749333ab50ae806c3ac6adcaa90d54df0f1 @@ -1671,6 +2037,10 @@ trackedFiles: id: f5be2d861921 last_write_checksum: sha1:624f30759b7b7de1913b1ef3b8bb2187a95b9570 pristine_git_object: 9d7a00c44e1507edd12f16fbb6b3864f1c0bbd81 + docs/models/networkencodedinput.md: + id: 44842604e405 + last_write_checksum: sha1:50e09dfa5ed838df4a760358c6bf81c04da4910b + pristine_git_object: 71e38615fada1e4f3b10e669eb3d8a6b768aa268 docs/models/oauth2tokenauth.md: id: f23959dcc4b0 last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 @@ -1807,6 +2177,26 @@ trackedFiles: id: 1391892fce0a last_write_checksum: sha1:4a82fc483f090e4fc09d19a3f2c0f2a2e022cf3f pristine_git_object: 36b58e9aa80a53dad530cad93fb1d565fdd03b59 + docs/models/querydefinition.md: + id: 4831b7e558f9 + last_write_checksum: sha1:f4983c0963906b3eda13c69e2852b08d662dd744 + pristine_git_object: 9d094fdad5d9b33792fc366fe156a91531d771fa + docs/models/queryinvocationbody.md: + id: b8ceb9c9a70c + last_write_checksum: sha1:01de5f28c0358b7051b80ca6467bb00a30bd8941 + pristine_git_object: 3d4e5441618a02a07ece83fe69e27d68c5cd8ce4 + docs/models/queryinvocationbodyinput.md: + id: e56d939bc2dd + last_write_checksum: sha1:e3b7f0a0865843b789f4ddbc849faa9851fbbb8c + pristine_git_object: deb0db275d3da722d0cf340f4ce5e3f914b590c4 + docs/models/queryworkflowexecutionv1workflowsexecutionsexecutionidqueriespostrequest.md: + id: 9ab2fbbf8cc3 + last_write_checksum: sha1:49e01dcdfec3ec5b60fd7c80f2eaa08ebbc482d1 + pristine_git_object: 0e0d378d22959d5d3ca1e65aae8d9c6c0a780b95 + docs/models/queryworkflowresponse.md: + id: 6f29ca165760 + last_write_checksum: sha1:1fb91b06fd875a868c0e8d3bb4b86ae31cc17fec + pristine_git_object: cc5b08669152c4f3581a6d80a856c0925c40768b docs/models/realtimetranscriptionerror.md: id: 4bc5e819565b last_write_checksum: sha1:c93e4b19a0aa68723ea69973a9f22a581c7b2ff6 @@ -1867,6 +2257,14 @@ trackedFiles: id: 8857ab6025c4 last_write_checksum: sha1:5634447d01c483713dad3d6d39df182007e6181b pristine_git_object: b710cc1f394e04ecc93c9fc6daddddec366254ad + docs/models/resetinvocationbody.md: + id: 4063ca65ac51 + last_write_checksum: sha1:94c7cd498cba13d4da784c4be76ddbb5b1b64cd9 + pristine_git_object: 9f306e2d0ce2e3b9311ed55fdcd028a74319c79d + docs/models/resetworkflowv1workflowsexecutionsexecutionidresetpostrequest.md: + id: 834b0b115e63 + last_write_checksum: sha1:21bf448e143353577c2bb1cc9333dba89c033f4b + pristine_git_object: 418c6c5a041db5bc33b731b112346c671cd136bd docs/models/resource.md: id: 94a32a903140 last_write_checksum: sha1:0c141e37497f5b07d2da77a41777617ed3653582 @@ -1883,14 +2281,10 @@ trackedFiles: id: 583c991c7a30 last_write_checksum: sha1:0791cb4aa4045708ab64d42bf67bd6ab74bc7752 pristine_git_object: ff67925758959b87992b47a1a32c224eeeb599e3 - docs/models/responseconnectorlisttoolsv11.md: - id: 6a5e4a2ba10b - last_write_checksum: sha1:9f2f54bdfb137736b24bafbc0d32c9826ffabfee - pristine_git_object: 9b5c98c6c4b3ba1292e18edccaafd9d78f934e76 - docs/models/responseconnectorlisttoolsv12.md: - id: c422816d84f9 - last_write_checksum: sha1:7db23fc2c5ade5ea4b04c70ebc629596545ccdb0 - pristine_git_object: 0266f66da4668a6fe33ed2b9a88278c57056576b + docs/models/responseconnectorlisttoolsv1.md: + id: 11f3f310ef36 + last_write_checksum: sha1:db8c315f851caf7f36b852bf7a34ab2a0daf63fe + pristine_git_object: 18a31c5628f714a7bf1757bc8f79cab9e689bc6a docs/models/responsedoneevent.md: id: 38c38c3c065b last_write_checksum: sha1:4ac3a0fd91d5ebaccce7f4098ae416b56e08416f @@ -1899,6 +2293,14 @@ trackedFiles: id: 3e868aa9958d last_write_checksum: sha1:4711077bf182e4f3406dd12357da49d37d172b4c pristine_git_object: 4309bdadc323918900cc4ca4fddb18788361d648 + docs/models/responseexecuteworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.md: + id: 7df3dce048fa + last_write_checksum: sha1:f98acd879d2690c2ce02646026242f21b19a0cb5 + pristine_git_object: 381987b63d5749243a1aad073f0c6fa03062e3b5 + docs/models/responseexecuteworkflowv1workflowsworkflowidentifierexecutepost.md: + id: 052963e8160c + last_write_checksum: sha1:bf0b0faed2f7d54fba78ecb89cef07c339b99233 + pristine_git_object: 368f23184def4b3d4fe1f7c8a06693afb3eac4dd docs/models/responseformat.md: id: 50a1e4140614 last_write_checksum: sha1:e877b2e81470ef5eec5675dfb91a47e74d5d3add @@ -1935,6 +2337,46 @@ trackedFiles: id: 0e09775cd9d3 last_write_checksum: sha1:b77964a7b39ec1b74f70925a39c30b23fad6ac43 pristine_git_object: 31f26c3c2869a453306fff5b062b40e95aa5f19a + docs/models/scalarmetric.md: + id: e23b9b990914 + last_write_checksum: sha1:272bcac17d958e6d045be0e78ad80aa710d35bb7 + pristine_git_object: 96b932315f7844bc432ce6bacc48d0349203262b + docs/models/scalarmetricvalue.md: + id: b73292165d87 + last_write_checksum: sha1:6585beed45b4f6ce8188348145a148fb3380cf74 + pristine_git_object: 6723310e9e340eebf58f11dfdc2417d030a87a60 + docs/models/schedulecalendar.md: + id: 60c22b27e191 + last_write_checksum: sha1:6c5457c6c0f2393e41c297e42d25ca95a14f752a + pristine_git_object: 4166bef5ded04c323f5644b80305ed5bb4159fb4 + docs/models/scheduledefinition.md: + id: 5a795fa1c041 + last_write_checksum: sha1:542e8de454c8a75e18de51f08cff031fa2928cc2 + pristine_git_object: 4f8f8b80b6687092a5fde30366cba91f7cae5f3f + docs/models/scheduledefinitionoutput.md: + id: e5f8d9d43716 + last_write_checksum: sha1:d65378cd7873dd8aa5e60d5fc84b1ecefc5ef4e9 + pristine_git_object: c4937c6969d586f9909bab342a05afa3cf61696f + docs/models/scheduleinterval.md: + id: 4792384fc173 + last_write_checksum: sha1:3c73f2b3bcf44494d0ecd943cf15a592fed95493 + pristine_git_object: e99d552f4d302f1385afbb76a77b7ac5897be62c + docs/models/scheduleoverlappolicy.md: + id: ced0baf85d76 + last_write_checksum: sha1:24c5a5f8bccc5204084bf9bd7f6d419c7fbea309 + pristine_git_object: 1df8c0ea277353267bdf3b024c7482e9ebc3a0ab + docs/models/schedulepolicy.md: + id: cd43e2c8ebd4 + last_write_checksum: sha1:148ef1b0166528b0ddc7c502495b9bac713e482b + pristine_git_object: 5f0790490888458b468c4dca9cdbfde2c860f405 + docs/models/schedulerange.md: + id: 70268cb45dae + last_write_checksum: sha1:cc9778a0389b2255c8ce8433802fa327a1716980 + pristine_git_object: d6cb09759e5a983434ffd094b77fd3d36ab450c3 + docs/models/scope.md: + id: c7d8338540ba + last_write_checksum: sha1:08e688325601e4c4614cc6b7264ea4d2f631da36 + pristine_git_object: 0dc29aa5d453a82d0366ea003ab6e5710e2b1e3a docs/models/searchchatcompletioneventidsrequest.md: id: ace22de1b563 last_write_checksum: sha1:0368a82e5b6399806252670aec01714e5bb78331 @@ -1971,6 +2413,30 @@ trackedFiles: id: cd53ce3913a5 last_write_checksum: sha1:380d0621a0a8ec9cd4be2b53a6e326b8c9c3d201 pristine_git_object: 21b8ec1f74c1f903aa087cd3b4d13918c0ea9dad + docs/models/signaldefinition.md: + id: 4627d2840cb7 + last_write_checksum: sha1:3606a41b67a27350c22aa2bf234d8a8696b23404 + pristine_git_object: c1974f70ef9676beb9fefae2c124e231da5b1b6b + docs/models/signalinvocationbody.md: + id: 9723986308b4 + last_write_checksum: sha1:4c005bb178a814e1f23bcb5112a0ba61df96ad92 + pristine_git_object: 14dc23e0e9a8d74b7275daf8a492d6a0a83d5e8a + docs/models/signalinvocationbodyinput.md: + id: db0ac2b1de58 + last_write_checksum: sha1:edda01f077f43a2527900caab977d4d07f2e8eff + pristine_git_object: e9308bcb4b74122eca76aeca31883c160eb15ebd + docs/models/signalinvocationbodynetworkencodedinput.md: + id: 0a2d313daef1 + last_write_checksum: sha1:4a2e7fed866136d621b842d58d0cd6964a869bdb + pristine_git_object: 09368656b06d42477862d0f4f8dcf5909d52d1c3 + docs/models/signalworkflowexecutionv1workflowsexecutionsexecutionidsignalspostrequest.md: + id: f43e35cd41a6 + last_write_checksum: sha1:701f949b648221e98bb302c4afff668f4d86fc4d + pristine_git_object: 2ca356d85370faff6c573a678a4380c9caf56ad6 + docs/models/signalworkflowresponse.md: + id: 38c985ca6ede + last_write_checksum: sha1:f82ac07d517e89bfa8044eebff6f9f7aa56f6c77 + pristine_git_object: f65d7924388b842863deddb0e52d4376f2e28925 docs/models/source.md: id: 6541ef7b41e7 last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 @@ -2015,6 +2481,26 @@ trackedFiles: id: 6a902241137c last_write_checksum: sha1:6291d6bc7cbcd7640b83b03ac8ce353b95c1f913 pristine_git_object: 372eafee6f22105d6f5fd31f2e04ea04f5abe641 + docs/models/streameventssepayload.md: + id: c3cdfddd480b + last_write_checksum: sha1:6251dc54c4becf826ac475ffd8cc48d18a509aad + pristine_git_object: 6ec6726a4464f4535a51398cd042f90e4390f789 + docs/models/streameventssepayloaddata.md: + id: 04bdf412c709 + last_write_checksum: sha1:6feb3abc7dcb4766216d12093d597c180ab396f1 + pristine_git_object: 61e6556277ba7ffe5e81b43fbc0c3eb0d21013df + docs/models/streameventworkflowcontext.md: + id: 32e6c8f9826e + last_write_checksum: sha1:d89a4e547d92889b3c88269d8f3c9a870a5058c3 + pristine_git_object: 098f48fd4cb8dad49298c723081528dcd715c26a + docs/models/streamv1workflowsexecutionsexecutionidstreamgetrequest.md: + id: 5ca96459c844 + last_write_checksum: sha1:200e5cf38c1c655c72d856591ebca1c3e85a9b7f + pristine_git_object: 19d02a40d06b7066d32f63e0daf6a40434d88754 + docs/models/streamv1workflowsexecutionsexecutionidstreamgetresponsebody.md: + id: 09d5a590ebf1 + last_write_checksum: sha1:1f22c1e502478d9532b6729bcde30aa8bb5528c4 + pristine_git_object: e12bb93835a164b665e4cdf4b9862f350d91c850 docs/models/supportedoperator.md: id: 000f0770e0f9 last_write_checksum: sha1:ea71b0062712f8750234d8bd5313063589de1155 @@ -2039,6 +2525,62 @@ trackedFiles: id: 58be1f1aef25 last_write_checksum: sha1:2005c0e15f36bd315c17688daa4dd9a8c260b009 pristine_git_object: 2d16da9de0af99ca5cecd7aab3349e13d22c7013 + docs/models/tempogettraceresponse.md: + id: b5700fe45c4d + last_write_checksum: sha1:334312483f0365ed3ec20f6fc26b7fdf54fde811 + pristine_git_object: cc4a4e93da510f5852e5ce2c7254f6f18efe0ca7 + docs/models/tempotraceattribute.md: + id: 6ce2d6cbea6b + last_write_checksum: sha1:d296899e9a5fb160925a36382dee30dbe959a106 + pristine_git_object: 6061df8649c32a4c4daea648223525a9f870bb2a + docs/models/tempotraceattributeboolvalue.md: + id: 0e2767bf14da + last_write_checksum: sha1:6e09bcab345a7cbe376c41fd20955017f54243bc + pristine_git_object: 07b77e43cd17be26c620a30a8ec627310d67886f + docs/models/tempotraceattributeintvalue.md: + id: 55a1d75f3e12 + last_write_checksum: sha1:2381b0f0f84aeb42d9a0a97fe3764ebaa9dee0d9 + pristine_git_object: 5c47f1eb1b12d0d1a29f676daf2b79225032c524 + docs/models/tempotraceattributestringvalue.md: + id: ccd801521b60 + last_write_checksum: sha1:3c0c1e94c6adb62043be5498dc6632079e3ec701 + pristine_git_object: 61e7eb8ac7f91e718e85fd46b7298095300821f5 + docs/models/tempotraceattributevalue.md: + id: b5a74866dcac + last_write_checksum: sha1:30a7d69df2775d18e110e20dcd6956359a065b54 + pristine_git_object: eb448c3b039475cc18de097e2d90f5700aa136eb + docs/models/tempotracebatch.md: + id: 1a73bb7f3ee0 + last_write_checksum: sha1:778e8837929ee817567c02653ae9daca8d564ea7 + pristine_git_object: 1e7779a2d9c56a5e25d46e26031f69e5ab8410eb + docs/models/tempotraceevent.md: + id: 07cb7db3504c + last_write_checksum: sha1:04a17ed3d22f34bc1a10c135f10ae18785abe42d + pristine_git_object: e456fa7c93b66686c0d3ac802da83e2b0b8ffa69 + docs/models/tempotraceresource.md: + id: 9e75b787c050 + last_write_checksum: sha1:dc195ca7c4331183e5688fc53161208a54495ffe + pristine_git_object: 0d0e2ded0e99297f1982e70bc5bb9d14e957d25d + docs/models/tempotracescope.md: + id: 07e19420387a + last_write_checksum: sha1:14ccec8d631703fbee79ac1a1f5e1ac71b5a461f + pristine_git_object: f3678a9fb8867a9e42b4ad02ef98dcbb7622fe63 + docs/models/tempotracescopekind.md: + id: 04915d7e8cc2 + last_write_checksum: sha1:e5ab7e2396f71337a812c298097080a4e6b4b175 + pristine_git_object: e08cc9be04286dc81cd000422e0b914ad7acd8bb + docs/models/tempotracescopespan.md: + id: 3fa2689ebf7c + last_write_checksum: sha1:474874dac2f2513fb2c8c834aa21cb59db543bb1 + pristine_git_object: e3b6d58a39dde1cdcab1deb5f53bfad5d14bb64a + docs/models/tempotracespan.md: + id: b7d1c4f02519 + last_write_checksum: sha1:e7dc0b212731b706d7e3b475bcd0d41826ff8ae4 + pristine_git_object: f657acc6870a7a9f024c0763716e4ecea1111adf + docs/models/terminateworkflowexecutionv1workflowsexecutionsexecutionidterminatepostrequest.md: + id: 197e0d3cf762 + last_write_checksum: sha1:1ff1f9ac91867332457179b31786f013d6923b5c + pristine_git_object: 227066fb06da0b4cd22b923ca466e10087fa5467 docs/models/textchunk.md: id: 6cd12e0ef110 last_write_checksum: sha1:d9fe94c670c5e0578212752c11a0c405a9da8518 @@ -2059,6 +2601,18 @@ trackedFiles: id: 07234f8dd364 last_write_checksum: sha1:90c0b34284137712678b0671e9f4bfb319548cbf pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 + docs/models/timeseriesmetric.md: + id: 64217edf3511 + last_write_checksum: sha1:ca9fad09ddf36bb078950120f53d9011a98e0654 + pristine_git_object: 2b5fc61d3717b4383d4e7b4660ae6a7229774336 + docs/models/timeseriesmetricvalue1.md: + id: 6cb257de9197 + last_write_checksum: sha1:86c5cf46002459d8f86d1fd197f181bba7b12246 + pristine_git_object: f1783455276c32478d9c22523a3e2f1d1a58b948 + docs/models/timeseriesmetricvalue2.md: + id: 40045842e667 + last_write_checksum: sha1:0ca94992e7bbfee401a1bafd03b5fd09940f4633 + pristine_git_object: c6ba5ecaaf5a26b60415b4292757366e9fa95c20 docs/models/timestampgranularity.md: id: eb4d5a8e6f08 last_write_checksum: sha1:b423f56d3a6004ed89c356806002b2af3e5c5a56 @@ -2207,14 +2761,18 @@ trackedFiles: id: f99b41288e88 last_write_checksum: sha1:092cd9ae293706419a86fd69c490cbc6587965d3 pristine_git_object: 2f61a2c4d8be1634ccbb1ef0adacde0c6722a9bd - docs/models/typeenum.md: - id: d306d1d601a4 - last_write_checksum: sha1:f0f0bfac75bf5e5fcd972d0cb196961d512d40ad - pristine_git_object: ec47cf9668f839469c9ab71c010f3e1975be929c docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 pristine_git_object: 375962a7110f814288ea9f72323383bd8194e843 + docs/models/unarchiveworkflowv1workflowsworkflowidentifierunarchiveputrequest.md: + id: 68ac0e7701d3 + last_write_checksum: sha1:3ff86e1e4647f0787841ba5f267a16b730c60351 + pristine_git_object: e25cd4bcc990fc9b6d583b8d771ce9b0c297d391 + docs/models/unscheduleworkflowv1workflowsschedulesscheduleiddeleterequest.md: + id: 40615902c1fe + last_write_checksum: sha1:d42a893a1c281ddfc8db957e168d832311917fe8 + pristine_git_object: c2bc33738e8e34d66da61ae08a496384b6c623f0 docs/models/updateagentrequest.md: id: 371bfedd9f89 last_write_checksum: sha1:ffa273db325e85b14ba2554b223a2a2de7ad9b8f @@ -2251,10 +2809,22 @@ trackedFiles: id: 4be4c812536f last_write_checksum: sha1:600212552869daf41c872ff6ec7a4cbff1e00b63 pristine_git_object: 78eae8fb8193b201064416858d719fc28bb964b1 + docs/models/updatedefinition.md: + id: 66f521a5a9f5 + last_write_checksum: sha1:a5121824ba55698bcb31641641e73e2eeb19136c + pristine_git_object: 8cf62617303949d2633773af0268447befb04af2 docs/models/updatedocumentrequest.md: id: ee4e094a6aa7 last_write_checksum: sha1:4c4d774c67449402eb7e1476b9d0fef5b63f2b99 pristine_git_object: 7e0b41b7be9f559b27a3430f46ed53d0453f6e03 + docs/models/updateinvocationbody.md: + id: d8b3b9cca5ae + last_write_checksum: sha1:0fed6d77626ec76d3584e8d38b97ee228218a390 + pristine_git_object: e810a041e5db77f4d9396075b420600c1d86054d + docs/models/updateinvocationbodyinput.md: + id: 6c6c00bca06a + last_write_checksum: sha1:604242fdb6f47c049b1e5afbe4ddd374a516cb98 + pristine_git_object: 70665f9ea1871781bc6192b41b1e5b1bff91bf2c docs/models/updatejudgerequest.md: id: c220d8a2a289 last_write_checksum: sha1:7c85b0f8b6ca133ca9e4b435322e50f97afd8fbd @@ -2279,6 +2849,18 @@ trackedFiles: id: 0b7dfc68573f last_write_checksum: sha1:53d5d07d53d184d68b57185d251c8d68ff3cf4d4 pristine_git_object: a8ca8e298bab527fe82e3c0dbf076ace0c70da20 + docs/models/updateworkflowexecutionv1workflowsexecutionsexecutionidupdatespostrequest.md: + id: df780faca122 + last_write_checksum: sha1:d0ebf3489a9b91d85983af31625040583ab0fed4 + pristine_git_object: 5705af6b2d86aa378f3c54a10e863c731805fa4d + docs/models/updateworkflowresponse.md: + id: fcf739a23f8a + last_write_checksum: sha1:76e12ce365fad9b2d68abbd60b6c54bd30acd01e + pristine_git_object: a4e9494e8ec0d6b4cb187c7d1479b3407bd004ba + docs/models/updateworkflowv1workflowsworkflowidentifierputrequest.md: + id: fc6e47dd1496 + last_write_checksum: sha1:9184d5f03fa53c41eda416b24ab1e75eef94cc8f + pristine_git_object: 51877da9157009f81857f115a84101cc5142c2fa docs/models/usageinfo.md: id: ec6fe65028a9 last_write_checksum: sha1:cf71fb9676d870eba7c4d10a69636e1db4054adc @@ -2339,6 +2921,274 @@ trackedFiles: id: fc4df52fb9b5 last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 + docs/models/workflow.md: + id: a782201b7327 + last_write_checksum: sha1:0a6dbea734dc94626fb53ab37c619fef48b9db63 + pristine_git_object: 4b245e07d66418614e4eadf09bf6203254f0d91e + docs/models/workflowarchiveresponse.md: + id: e952228d4f02 + last_write_checksum: sha1:49dbb8dd7c8b3a2442de072bd45244540c79954f + pristine_git_object: 6192c2b2c82b3a29e8cefab33067b6e7c23a5d55 + docs/models/workflowbasicdefinition.md: + id: a88b03086ce2 + last_write_checksum: sha1:7046dd6a11770b56c36e22af07552e28c6cf36f0 + pristine_git_object: a534ad34da32c4d8eb93f055e1bbf128c5df7e8a + docs/models/workflowcodedefinition.md: + id: 16ce7d540f36 + last_write_checksum: sha1:35fce15dd70e7c8eb85b9f54919cca1b0a0e1dcb + pristine_git_object: 2034f81fff68465c568b5d189086094c5635bff8 + docs/models/workfloweventbatchrequest.md: + id: 7caeaf762e39 + last_write_checksum: sha1:28a13d5121fa878814b784ad24dd14c6f2bcaf03 + pristine_git_object: cf0af15fd4a1f6a977a81b887a06dde3ab2b5d98 + docs/models/workfloweventbatchrequestevent.md: + id: 90eae031de76 + last_write_checksum: sha1:99a7e986f51ddf240922f5144447ffc0afd021c4 + pristine_git_object: 98ac66e85eba7b8d979f0fe610f0f4fdd0ac0984 + docs/models/workfloweventbatchresponse.md: + id: 2f360869f319 + last_write_checksum: sha1:5a8e27b9b398bd298317184f9ad9e5961118b3a0 + pristine_git_object: 84ab9e3945052b4f675d8468eabcaf118f6b9355 + docs/models/workfloweventbatchresponsestatus.md: + id: 719bafb1fd93 + last_write_checksum: sha1:84b7cfe727c48142b5ddb921d272171da62e4021 + pristine_git_object: 47dd74bc0cad72e159d35c8ac74fc58fde59fd95 + docs/models/workfloweventrequest.md: + id: e036e83eefeb + last_write_checksum: sha1:384d69360ccf715f947bf8ecea71e0e423a42a2a + pristine_git_object: bec821725e8b95714bb668669bed6755ba523162 + docs/models/workfloweventrequestevent.md: + id: ed43510bd1a1 + last_write_checksum: sha1:f032d827b0ec57bcd023f084b3806f0399d4ebcd + pristine_git_object: 2156cd37b95c12d5cce0089bc32d2083b99f8fa8 + docs/models/workfloweventresponse.md: + id: d4bd90a2e937 + last_write_checksum: sha1:8032460df2a92279008be067f21e15714080a3b2 + pristine_git_object: e336dfb2a593b739240dfb665aadbcc68c423936 + docs/models/workfloweventresponsestatus.md: + id: 7ffd009a0514 + last_write_checksum: sha1:4dcecd8af02f1b7142f63ab1e91b2e8792077656 + pristine_git_object: 684f3fc728a44bb0515dad483d9ea9df32dc78de + docs/models/workfloweventtype.md: + id: 0ea616e53d9b + last_write_checksum: sha1:97e9654b44b627a610b3a30f14b3dc56dab1d725 + pristine_git_object: ebfe2d86bb5c460219eb9fe9902002817c0f914a + docs/models/workflowexecutioncanceledattributes.md: + id: 2eb975976d1a + last_write_checksum: sha1:63f7d6bbbbca074ebc2988988477d95d2f147c11 + pristine_git_object: 8c2929eb3de33ac39ebf3b243af978957c6a43f5 + docs/models/workflowexecutioncanceledrequest.md: + id: bcb7b2a53948 + last_write_checksum: sha1:8ed5c7d5147417a842fc1cc7df18167298d81d29 + pristine_git_object: e32f3c9d8cdb16de1df9e3aa36dda6b98f6d0da3 + docs/models/workflowexecutioncanceledresponse.md: + id: c56b39b95831 + last_write_checksum: sha1:3fc990c9fd4b7b3b0368b80840d737cf355a8759 + pristine_git_object: f9f4c01d263fb222de033128cd43f86c56f2b8cd + docs/models/workflowexecutioncompletedattributesrequest.md: + id: 073b3acc2ebf + last_write_checksum: sha1:47ae4322597198da507a5515c559bd3c32e5e9ef + pristine_git_object: 5ab8341c23827306b788e1a351a82594b4736b30 + docs/models/workflowexecutioncompletedattributesresponse.md: + id: ee786dd87f88 + last_write_checksum: sha1:56f6a37a7e59b6026988373b0d88b09bd6062ee5 + pristine_git_object: 30a33052d50278e5cb14e08e4631caf68cc8e058 + docs/models/workflowexecutioncompletedrequest.md: + id: 62b0e626688c + last_write_checksum: sha1:8a08360f267188b72bbef3ca5f6fb8223c830241 + pristine_git_object: 02bd2a4452faeb26f7c9b68d90cc33f62ab9864d + docs/models/workflowexecutioncompletedresponse.md: + id: c1888ba90ec6 + last_write_checksum: sha1:491656749133e6b0d7714d2a9cbc8de8aa9c92d7 + pristine_git_object: a4d40dc52ead7c8a525cfd838fc0aa336570fb3b + docs/models/workflowexecutioncontinuedasnewattributesrequest.md: + id: eb5c1bb4f634 + last_write_checksum: sha1:561a29856a9f90badf31b2c634e94a6335171d06 + pristine_git_object: c85a7b3049137295f02b1e9e0c5769f2c98eddb1 + docs/models/workflowexecutioncontinuedasnewattributesresponse.md: + id: 30eef6da0d67 + last_write_checksum: sha1:10f85d5ec5f9fbb442d3d69319b651604baf9a0b + pristine_git_object: b49a25964981bb48a5563b230413cb2ff6c5bd70 + docs/models/workflowexecutioncontinuedasnewrequest.md: + id: a18d2f94b134 + last_write_checksum: sha1:75368c1e435af748ced2a483799452b2903817d9 + pristine_git_object: f83f7b516019c4420c5534db9aa7e8b8b8ebebd6 + docs/models/workflowexecutioncontinuedasnewresponse.md: + id: 1ea81bc536b4 + last_write_checksum: sha1:e65c01b128029322249b28e4152cd60af2443b18 + pristine_git_object: e6a7212a856f0b89b18c16e7b9f6e93ddbb2e527 + docs/models/workflowexecutionfailedattributes.md: + id: b5ddf561c50e + last_write_checksum: sha1:097719213eeb253420f6bc7167f96c58d00bb5b4 + pristine_git_object: 9fa14fa42e0d11148df4ceb227e35d808b3b7909 + docs/models/workflowexecutionfailedrequest.md: + id: 1f34d50f9f72 + last_write_checksum: sha1:74d90184e36d11a269d668337c3b5e823dbe5d38 + pristine_git_object: 160cfd1a8f28adebaa55ce6cc941dde5e467fc2a + docs/models/workflowexecutionfailedresponse.md: + id: 1c88150815b1 + last_write_checksum: sha1:92a46ae195053013887496ae827cfd8853e864c5 + pristine_git_object: 222fbfd75c79bf9868b04affab9d2708f5942f64 + docs/models/workflowexecutionlistresponse.md: + id: a66878b279ba + last_write_checksum: sha1:fcdc0fa6d385ee938df2127c7026a93634bccacb + pristine_git_object: 3fe61f60d02bb479666a3e589c27c358eb2d4e03 + docs/models/workflowexecutionprogresstraceevent.md: + id: 143ceb0718a6 + last_write_checksum: sha1:9878b118897957dd4b92163966ea4199c29bc5ff + pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e + docs/models/workflowexecutionrequest.md: + id: 44a6d9ef046a + last_write_checksum: sha1:78e3aeb9a9b13ab01906e9c2d423ac4925332dc4 + pristine_git_object: 553119b16dbc695eff102eae11e80c4426612e01 + docs/models/workflowexecutionresponse.md: + id: 73595cfc443f + last_write_checksum: sha1:3861cb1972cca17c595d1eb23518bfa54c382e89 + pristine_git_object: e414c47eb7a01e677cef6cc3ebda77fd28566450 + docs/models/workflowexecutionstartedattributesrequest.md: + id: 40b21129ca0e + last_write_checksum: sha1:920ab1f7115f6e16d744e450f3210aa37514c468 + pristine_git_object: a65df97ada042def878557af930d5bdc66143f62 + docs/models/workflowexecutionstartedattributesresponse.md: + id: 384d48b3e104 + last_write_checksum: sha1:be35194c22fa533235fe930bf9aa83acd5b8ca40 + pristine_git_object: c28de680eb4e49295610414f052164833e28265a + docs/models/workflowexecutionstartedrequest.md: + id: 049cff94a306 + last_write_checksum: sha1:ab51a3214f8083dc79d6e9bfb21216528d40d5ec + pristine_git_object: c2bce40e3b280a7a2aa09e812c9aa187a1dabcf3 + docs/models/workflowexecutionstartedresponse.md: + id: 64174669ff20 + last_write_checksum: sha1:8eee734d26442d9c6e6693386c78eb204a932847 + pristine_git_object: 7c370d468250ef29319f365957f8eca504f40d19 + docs/models/workflowexecutionstatus.md: + id: 1e988cdad165 + last_write_checksum: sha1:9478f494d16651522d373f36d0537c0fca703038 + pristine_git_object: 1be6d741ec3dbda33b167ee7e6fd6ae4295084d8 + docs/models/workflowexecutionsyncresponse.md: + id: de066d2e3d26 + last_write_checksum: sha1:f3bcd9c25419d4da5c307d2f201517c7b48b5126 + pristine_git_object: 88cbc21caa9762cfa485366f7e98681f8e482986 + docs/models/workflowexecutiontraceevent.md: + id: 0c99f0388dcf + last_write_checksum: sha1:387058f5e007dd8aef7bed906e394bb748149dbf + pristine_git_object: b6bb388ca18523ca9b682e5bc4d4cf1c95100fa5 + docs/models/workflowexecutiontraceeventsresponse.md: + id: 4242880e71fc + last_write_checksum: sha1:52585c82f6588ee57520355320c156348f694695 + pristine_git_object: a0e6e4867f9d3e98b1f34a4f7c9462bd90ae7ced + docs/models/workflowexecutiontraceeventsresponseevent.md: + id: 40012f3fc374 + last_write_checksum: sha1:b7b2a4544e04bda359d226efc6ae4247678bda9a + pristine_git_object: 81c4f573a5af75f2ea8356f8bf23da676700ab8d + docs/models/workflowexecutiontraceotelresponse.md: + id: 358cf8c2556f + last_write_checksum: sha1:b0a9f0bf2236d86d1a6863c2bff41bf58058fa47 + pristine_git_object: 6218877661371cfe62fb4d24fd3a56fb21c77591 + docs/models/workflowexecutiontracesummaryattributesvalues.md: + id: 50e4fbfd4cf6 + last_write_checksum: sha1:0486340bda63ec19ddc32dfc49520a4946847321 + pristine_git_object: c01a122f81fd7bcd6c00a746bc5705c66261bdc6 + docs/models/workflowexecutiontracesummaryresponse.md: + id: 5ac68ea4a1a4 + last_write_checksum: sha1:3db91df0b8a7404d5fd0ca7e43554cc7e330ac8b + pristine_git_object: 3c1ab0e51584fae9398d6d9fb64dbc03149f2f5b + docs/models/workflowexecutiontracesummaryspan.md: + id: 3851de52d638 + last_write_checksum: sha1:528371799a9c90c9ddaf5315c2d33b89320688b8 + pristine_git_object: 8ee487a2091161e674db28a7919d0d3d4cb57e32 + docs/models/workflowexecutionwithoutresultresponse.md: + id: 612e2645e3a3 + last_write_checksum: sha1:42a987056a79fccc0bf262e46214f5c2f875736a + pristine_git_object: f74414a66874be98f9a7c3ddaf938a0d9c0a598c + docs/models/workflowgetresponse.md: + id: aa8fca163259 + last_write_checksum: sha1:eba9585e94ebc141c43d39689c31997083dcb615 + pristine_git_object: ef9baa44ce44b31d7cba47e1d1ce88ffef29c539 + docs/models/workflowlistresponse.md: + id: 00dfc68e54c1 + last_write_checksum: sha1:ca7ce66386b7cf011d9a906ecd6b70626c5417e4 + pristine_git_object: d36e48c68f379ac55a9b8f91916e7f7fbd465c63 + docs/models/workflowmetadata.md: + id: 3ae926974727 + last_write_checksum: sha1:de9267bafa22597a6cbc7f52cf8b4c1744d4b141 + pristine_git_object: c69cb08b384e5659f6884fa5f1d364ea848be02d + docs/models/workflowmetrics.md: + id: a8fe312f060c + last_write_checksum: sha1:211ed95c429aa5db0b074caaec7b5e1962a03be6 + pristine_git_object: 4936382b48d568309c80ba1c4c25703ef3b69659 + docs/models/workflowregistration.md: + id: 1d0720b1355b + last_write_checksum: sha1:2d4585a731a6c2b3ac693c21da4582c1a70d2984 + pristine_git_object: aad6831aa880c56f7001a7dfbe2a41bf5e137068 + docs/models/workflowregistrationgetresponse.md: + id: f2658cb29bf4 + last_write_checksum: sha1:ef021920be1f1cf2016887fb1e3fb7f583c3596f + pristine_git_object: c524fc68d9034604c7ab756ee401223b93287f32 + docs/models/workflowregistrationlistresponse.md: + id: 343e0dd93827 + last_write_checksum: sha1:79c56fad05442fb760af09584fcf6e42b742c002 + pristine_git_object: e37b36713c38a44b35d0aea4fb96cc8a44658156 + docs/models/workflowregistrationwithworkerstatus.md: + id: a558e858a7a9 + last_write_checksum: sha1:9eb21c738b1d1ef8421cea8145691943f2d90355 + pristine_git_object: 625871c171c9a7c6d37e03daf00274155af85218 + docs/models/workflowschedulelistresponse.md: + id: 4c425808aa60 + last_write_checksum: sha1:d8e8aad7a91d7f8e398f7716109d436df6c4fc86 + pristine_git_object: 7142185b8081d076cb3b8fcd592234d49e3e0e5a + docs/models/workflowschedulerequest.md: + id: 5a6b71dbc1a7 + last_write_checksum: sha1:d053fd9a98d217986d09f941bb3429a9b9123e39 + pristine_git_object: a6255c75646dc93a333c51ffdb92d80a4ad0ac8f + docs/models/workflowscheduleresponse.md: + id: ef0b813976ad + last_write_checksum: sha1:2da7d2a8519fe915554fdcebc25915ad11fbb203 + pristine_git_object: 96d7ced717099cc1bbff4ac38d60e7552e9c6204 + docs/models/workflowtaskfailedattributes.md: + id: 7f329c44d7fb + last_write_checksum: sha1:432c70ec990e81e2de79c14efbbb6161b60e1b3e + pristine_git_object: c6515f84fb66f59e6b35a4524dbd1f3edc73a7ad + docs/models/workflowtaskfailedrequest.md: + id: 44b5e84af2b2 + last_write_checksum: sha1:91ea900d446b03f2233227458b6a9b41a4131412 + pristine_git_object: a39cd97c861a47bc022b3cb4b2e9ec43bcb2a337 + docs/models/workflowtaskfailedresponse.md: + id: 9e6bdbc8ec6d + last_write_checksum: sha1:3c83e4760483063bed3f48ec1babddd0b53e9a22 + pristine_git_object: 731ed219c64f5024884887bbdbd67857b3658707 + docs/models/workflowtasktimedoutattributes.md: + id: e9ab5a25e976 + last_write_checksum: sha1:52fb7ed9cfce65338b381616afac1dfc1e676d16 + pristine_git_object: 7f298ea251febc1a35510655d14a84c37172c899 + docs/models/workflowtasktimedoutrequest.md: + id: 23e590babe17 + last_write_checksum: sha1:70c24971218bc0edb067fc6b8b12765115d0689b + pristine_git_object: 6c87b8cef524b65107a6cc60d6f0415e025a3fc4 + docs/models/workflowtasktimedoutresponse.md: + id: f53d1e6e4141 + last_write_checksum: sha1:8c3355239dce116da33ebc288363b20ddbf3a335 + pristine_git_object: ea3edade3558a0d95faa58c6d7c592928aae0fd9 + docs/models/workflowtype.md: + id: fdb669e25dee + last_write_checksum: sha1:1cb6c274e8bd8942a7064a46a183f402935b0526 + pristine_git_object: 93aa31f16f086c84fe097f0d0f306f13d5803d06 + docs/models/workflowunarchiveresponse.md: + id: fd8377932c7c + last_write_checksum: sha1:50ffff371e778ae77c66128b1673f096157415e3 + pristine_git_object: 667c93871f80c652ab1f61ce4fbd62252efc19a7 + docs/models/workflowupdaterequest.md: + id: 4dfd044f6694 + last_write_checksum: sha1:138ba57f1972c97dc1ac9f99b43e0f5c5b09626c + pristine_git_object: f8ce41edac51832df67aa8e18c13b43e1694fbab + docs/models/workflowupdateresponse.md: + id: 61dc42aa3dcc + last_write_checksum: sha1:0e9fc12bd0148cc59fd6222e22c3f923f305089d + pristine_git_object: 68faf7c0932990ae52eb0ff627544bd76bcb1545 + docs/models/workflowwithworkerstatus.md: + id: 81265aadaf0d + last_write_checksum: sha1:f426a9a3a9ba4ded4ab8f330509b12c7a13e0408 + pristine_git_object: ac6efb9c006c95ffcd50a72710c86140ace4d2c4 docs/sdks/accesses/README.md: id: 2ea167c2eff2 last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 @@ -2349,8 +3199,8 @@ trackedFiles: pristine_git_object: 46fb60ef4f92d61b2959f1b67e5f07e5bae55ba7 docs/sdks/batchjobs/README.md: id: a3b8043c6336 - last_write_checksum: sha1:b4b3123ff210545048e2b0c729f2b7e5f7460f4e - pristine_git_object: 3633fe4ee136c1ac90f9446425f62a0d68fa4f90 + last_write_checksum: sha1:ecf3800c83f9455471766e0f20a07192e76a736e + pristine_git_object: 3e082340c7c8740bd6acd6143dc35a940145ccb6 docs/sdks/betaagents/README.md: id: 5df79b1612d8 last_write_checksum: sha1:b01e307ad49bb22962062b1c1d3dd58563dea71b @@ -2373,8 +3223,8 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:d236c2895bbc9f1797817578d3ad8530798af3bb - pristine_git_object: 99892188389f4d53ddb45459f641475954a1ee03 + last_write_checksum: sha1:fca5196bf515725bb1a75bbc1db99dfc414f62d6 + pristine_git_object: f4a0a09713bf1f1e4d3e7fb7c4479415f79a9dc0 docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:e0b78791f14b76d486688c5aa829877d58ae36da @@ -2383,6 +3233,10 @@ trackedFiles: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 pristine_git_object: c04ced0cf5e5f7774ba9b1d25722085b92b8f0c2 + docs/sdks/deployments/README.md: + id: e7c5559ab768 + last_write_checksum: sha1:b6f43ed5be5071a808499af105191d2d79e9f81d + pristine_git_object: 941b5538a57b3b693914d6b0d2acad2e8bb47611 docs/sdks/documents/README.md: id: 9758e88a0a9d last_write_checksum: sha1:a77fb7acf2be6e18a3017855b30f5ad58576698f @@ -2391,6 +3245,14 @@ trackedFiles: id: 15b5b04486c1 last_write_checksum: sha1:4a279bf9bcd84a9878ef979c78b8b75af3d52f02 pristine_git_object: cb207d8be2ca86b00dc797fc06eabd1498adb770 + docs/sdks/events/README.md: + id: cf45a4390b9b + last_write_checksum: sha1:9305fbb844865a70722fc3d4354537a5e2939e1c + pristine_git_object: 1de37e5c9aad042cacde48d885f16210ea08b817 + docs/sdks/executions/README.md: + id: 401745b17323 + last_write_checksum: sha1:74e97aa7308bebb4865de66110386f3d863049f2 + pristine_git_object: a2f4aeb06e6b7e609a0def9347864201122a40f0 docs/sdks/fields/README.md: id: fdb6c4f3bd69 last_write_checksum: sha1:ea6dea75f85d25fd0ccdd2c659ecec43d0e5242d @@ -2413,8 +3275,12 @@ trackedFiles: pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 - last_write_checksum: sha1:e3eb0e9efb3f758fdf830aa1752c942d59a4f72b - pristine_git_object: 7df1ef4e26449af572412f052ee7ad189039544f + last_write_checksum: sha1:4d37c4de9e0d6e8693ed2f19e6512412eae06932 + pristine_git_object: 1ae444f1ffa634c276c4695d9d978a6db7c59dc1 + docs/sdks/metrics/README.md: + id: a8545d964e21 + last_write_checksum: sha1:0c559bd570e162c994c6125058f3712e24bc576b + pristine_git_object: 08a5ccb9418788b3f333dcbeddd25e51f71ca104 docs/sdks/models/README.md: id: b35bdf4bc7ed last_write_checksum: sha1:ca04fe883c5440abf402640cf26a1a0e9799a55f @@ -2427,6 +3293,14 @@ trackedFiles: id: db86bab024d3 last_write_checksum: sha1:2ef5b164016e9b40c27d8a4915aeb8d3d2ed42c7 pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 + docs/sdks/runs/README.md: + id: 4598fd39b715 + last_write_checksum: sha1:e049a4caff6e27e6fc62b44f372c0dd4877c79dc + pristine_git_object: bd7865446b10d0ce2728a763a535d919dc2b4446 + docs/sdks/schedules/README.md: + id: 2f28c809a225 + last_write_checksum: sha1:70cf78f4dd201a70da97aa86a1f5d936dfabbe13 + pristine_git_object: dd1565e04c21206cb8498f6cf5cea719ee0856ec docs/sdks/speech/README.md: id: d5924688d48c last_write_checksum: sha1:39e91f6d26c0d04212b24de47dbe5b5d5487a208 @@ -2437,8 +3311,16 @@ trackedFiles: pristine_git_object: 97703c9b4dc942385ee04ae96cbd100c3f632a17 docs/sdks/voices/README.md: id: 4f1a657c8f68 - last_write_checksum: sha1:31c15c54de42204fcfb348c7ba05494e10305639 - pristine_git_object: 3383e617c3d3733243e28497396b15589c4552b1 + last_write_checksum: sha1:8ddfebe91ff50ea863d4c0bd85c75458a482667e + pristine_git_object: 3b4d135f39bdfc3237c36c03367952eae54bdd48 + docs/sdks/workflows/README.md: + id: 80c76ce944c0 + last_write_checksum: sha1:572ef0ec9cadcd850e3966dad909a3d2e901280a + pristine_git_object: e65383ca453849b3bab58f921f80f5b8e7df7839 + docs/sdks/workflowsevents/README.md: + id: 514b42269280 + last_write_checksum: sha1:819db9d9561cc4802f139bbd1dec8045b718866f + pristine_git_object: bae0cb908bf2dcc0ddabfc340d929eddaea38c97 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -2465,8 +3347,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:4119527b41471c1a6571b0a33c6f5368dbae4077 - pristine_git_object: 68da4e561a187ec72d7a25b962d05112688779ee + last_write_checksum: sha1:b98fd6b10eefa6ebd5e051393980c124cd65058d + pristine_git_object: 5cebd13059e236d30d9d91cd3fdd5a7da81c42b5 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -2489,8 +3371,8 @@ trackedFiles: pristine_git_object: 7e36fd0d73ebeb873f74f4109896a6cf3bb7d2ba src/mistralai/client/batch_jobs.py: id: 3423fec25840 - last_write_checksum: sha1:34de0e986e7c0e4377f70125d319e522280c565f - pristine_git_object: 0e135b30cd122d1a813ee67bf2f9037953448e73 + last_write_checksum: sha1:cd6fa64476a43c23709383118c39c307acdcd64f + pristine_git_object: dc378cde31e59b39f2569e71496b9e8abf8a5056 src/mistralai/client/beta.py: id: 981417f45147 last_write_checksum: sha1:0971bda6a9024dcbdf8b4aaad1086417b01ee40f @@ -2517,8 +3399,8 @@ trackedFiles: pristine_git_object: 67199b601e38dff6fc6a4317eb845fbde6c25de0 src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:60d5d04e3650f48487df3cbb682c5646bf3c3a81 - pristine_git_object: e0c4793e40098f9055735edcfce4a1168f99918b + last_write_checksum: sha1:61a434ec297f20aea468fe6c34cca60ad5f36bec + pristine_git_object: 238f927703af44c9449a1d0ae90eefedbfc43c12 src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:f5f2e6d1d78b75177d6b831b69b212956926eede @@ -2527,6 +3409,10 @@ trackedFiles: id: e5a6ae2a2d85 last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 pristine_git_object: 48ecbdd8c1b2f42fa77a033aa0e4b4f49d20f088 + src/mistralai/client/deployments.py: + id: a874b267fcb9 + last_write_checksum: sha1:0ef6db65bcea6d41d204d925281ad0ba6763263f + pristine_git_object: a428c61cff07e1d789ec9dfca2a795b2ab4c544a src/mistralai/client/documents.py: id: bcc17286c31c last_write_checksum: sha1:29e7edd6f45d8a1a7ec8e9c9734bebe56ff97e7e @@ -2563,6 +3449,14 @@ trackedFiles: id: c489ffe1e9ca last_write_checksum: sha1:f708168e46c2960dd51896083aee75ccdb36f9dd pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d + src/mistralai/client/events.py: + id: ac9b961cc70d + last_write_checksum: sha1:2b128064a9cf9c1b99552fd2d7ec3e81f9aa6160 + pristine_git_object: d44c0692278f07df2a1a21bc77f55cfe0ddc65c4 + src/mistralai/client/executions.py: + id: 974004d347a2 + last_write_checksum: sha1:6e2247d95aa58732722c58b9ce57cfbf9e669c15 + pristine_git_object: 7112dc1a94cb55a753246f5c7a83ff6a4d469bcc src/mistralai/client/fields.py: id: 862335210b20 last_write_checksum: sha1:789ac221e3aec61d0d31abd1761e368e383fba88 @@ -2593,12 +3487,72 @@ trackedFiles: pristine_git_object: b0eb1ea0965f63efb681d8364ac456b96f1e3983 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:6440b3df71fe557ecba5c23768d115efd4ceb26f - pristine_git_object: b8728362b87349118ac6f163f50613dd18c43340 + last_write_checksum: sha1:d4bde8bbd8ec4200c119e2c27a2e1f5eb32741ef + pristine_git_object: 84624c4dae3b51b1a58537f54bb05902e1edea8c + src/mistralai/client/metrics.py: + id: 937cb03f8130 + last_write_checksum: sha1:f218d4230e66e0aebe25291bba5d76df2ce78d5d + pristine_git_object: 3df1ca56638d59e5a8bd36fd762e49fd1c5df7b9 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:299d59da943dc58f2bc4bf694d76d7172cbbd30e - pristine_git_object: 3ace7584ab83c9ee6d7fddfb5b0211fba63763b8 + last_write_checksum: sha1:767af34246fb87d24793c8235c2e7a8f3ebdb6bf + pristine_git_object: a6ac62a6b71432a3b7b2de1678458f4e7a24a4bd + src/mistralai/client/models/activitytaskcompletedattributesrequest.py: + id: a9e5ef17794f + last_write_checksum: sha1:c9862308564483a8da1e373ab2d94f0eb798a5a9 + pristine_git_object: 560310cf389f15c34b8d83934caae9975be949c7 + src/mistralai/client/models/activitytaskcompletedattributesresponse.py: + id: 8174941767cc + last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 + pristine_git_object: 899acb62afc89955ccb4ccb7a4e4d4bb8a4ce424 + src/mistralai/client/models/activitytaskcompletedrequest.py: + id: d051525d65ba + last_write_checksum: sha1:e08a49cae43cd75716dc086f608b8e7d2ab6a7db + pristine_git_object: fae82f6611122ae9795ffb1a6b006f3fbcffa894 + src/mistralai/client/models/activitytaskcompletedresponse.py: + id: 28373f0a2c9e + last_write_checksum: sha1:93e29f246bdade11ed0bcd55e5781fe86d352f89 + pristine_git_object: b324066b94687faa020c9019721eedb2a1aa6998 + src/mistralai/client/models/activitytaskfailedattributes.py: + id: 12635cd17417 + last_write_checksum: sha1:d9f8dbbc30720e66e0d3da8046dbdc3a6a350198 + pristine_git_object: 37749d4a7fe8f6c3dfa007a2a6db3cf480761663 + src/mistralai/client/models/activitytaskfailedrequest.py: + id: 1d4b5b52ae29 + last_write_checksum: sha1:5a7b26a18786cc170996a412dca46b5fe33ac547 + pristine_git_object: 1d1e9226f2df4edb1c86f1a6e553e45d45d0d4af + src/mistralai/client/models/activitytaskfailedresponse.py: + id: b739e8fc9b44 + last_write_checksum: sha1:a4624cf0d6177e940004e180e1ed372d43cb3534 + pristine_git_object: 3410ea840d9c740ef8dd74cdee6abd9f2d6c9a6f + src/mistralai/client/models/activitytaskretryingattributes.py: + id: 9aaa9eecac09 + last_write_checksum: sha1:811a7631992abea7dbcabc4a33d43b135ca1c4ce + pristine_git_object: b0ee11d8ae7005e3c1fb7cb403602841632ad1c6 + src/mistralai/client/models/activitytaskretryingrequest.py: + id: 6f2e394e1e75 + last_write_checksum: sha1:dd456e903ef879559d6adf5e8920f14f7224b009 + pristine_git_object: 8c4d84f999647a6bcaa308646d95be2c3e943dbf + src/mistralai/client/models/activitytaskretryingresponse.py: + id: 3a4ff1e01fa1 + last_write_checksum: sha1:770c9b60721c8ba1f60f193ec1c4f8ac10a4e075 + pristine_git_object: cf054a27d05dc1683275094a40336cc6f4164eb5 + src/mistralai/client/models/activitytaskstartedattributesrequest.py: + id: 51b3e5622e0b + last_write_checksum: sha1:cd3ba7db9a44cdecf5cb2638d02f6e52b826ea92 + pristine_git_object: dfa3fa04747a7cd33b764724760baa8d920fba1e + src/mistralai/client/models/activitytaskstartedattributesresponse.py: + id: 3a365e2c2942 + last_write_checksum: sha1:7a125f9f9cb1a2eb14bb929742981b488686ab81 + pristine_git_object: 100626d49be3d849b35e0e041d02f7eb9c7964a2 + src/mistralai/client/models/activitytaskstartedrequest.py: + id: aa5813a6903a + last_write_checksum: sha1:8f007fc54025d262d5d5e72b179742d5de5eee08 + pristine_git_object: 503b3998373b2a35da365f52b7714432297ac318 + src/mistralai/client/models/activitytaskstartedresponse.py: + id: d01ef9cb3955 + last_write_checksum: sha1:1f1dda76127bdb08549b0dd94f68dafd1d6a71fc + pristine_git_object: 75186e027475280fefb1750beb1933bdac4d76cb src/mistralai/client/models/agent.py: id: 1336849c84fb last_write_checksum: sha1:2574866d9855cb0b6314ac94ca288d59f3196c73 @@ -2719,6 +3673,10 @@ trackedFiles: id: f55510f5ff82 last_write_checksum: sha1:995d3fcf007b0f10eea18bb6745478e7eeb6bce2 pristine_git_object: 10cbaf589e2a4bc1e63b3a02689e76f4d7f1e88a + src/mistralai/client/models/archive_workflow_v1_workflows_workflow_identifier_archive_putop.py: + id: 0be575ead94b + last_write_checksum: sha1:1a28b0b1fc741af5fc2830363f6acbd713a9c0f0 + pristine_git_object: 8582aaf5a704186cd72f67487db55b90ffd081fd src/mistralai/client/models/archivemodelresponse.py: id: 2d22c644df64 last_write_checksum: sha1:e55af09d03586d14e2a52292be9a0d6729f9e1e7 @@ -2761,8 +3719,8 @@ trackedFiles: pristine_git_object: 1f5a6639b3fae3a5c96cf35bc4417d5d5151a37f src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:7d7b08ba19500836193c593bacc1dd6982c9ef71 - pristine_git_object: b57ff2cab05c7a2a7f10292ff1c017eb58a10f84 + last_write_checksum: sha1:a323bc4117cecf4ffcb228cf896e7ceae02f9b6d + pristine_git_object: acf9cf8d6fc3220f736b7c6cfe32d42425febd2a src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e @@ -2775,6 +3733,18 @@ trackedFiles: id: 1563e2a576ec last_write_checksum: sha1:3bb5b8a9f479b888efc37cf1ba9731e5efc3d8d0 pristine_git_object: a0add5ad71b1732849fe89de72227e846b3e3b1b + src/mistralai/client/models/batchexecutionbody.py: + id: 6cfbee9c4ec7 + last_write_checksum: sha1:b59b61a0a9b3f678918d939448b9a95d07abde7b + pristine_git_object: 7d9895e5a7e8bfebc77c2a36cbe190dbbc7eb164 + src/mistralai/client/models/batchexecutionresponse.py: + id: 37e6d5d616fe + last_write_checksum: sha1:3118fd4f7196e446101b017ec77667a439da09f6 + pristine_git_object: a0c1f06e72e744cb74ad495d8a906c4723fcee0a + src/mistralai/client/models/batchexecutionresult.py: + id: ca6840204f22 + last_write_checksum: sha1:d8628b48ae4198b487312b70cc425dc810b0ea8c + pristine_git_object: ebe41e0110c69a856461fa033ce698cd324e2db0 src/mistralai/client/models/batchjob.py: id: 85cd28932cc7 last_write_checksum: sha1:d9aab4f4058332de7f8e05ddc0719dbc9b054993 @@ -2799,6 +3769,10 @@ trackedFiles: id: c91d862fb405 last_write_checksum: sha1:770d93cc4d9b8e23ea781592888be5b811533f21 pristine_git_object: 62427fa0336eab3448064fc1a7a02427d44e309b + src/mistralai/client/models/cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop.py: + id: e26fc5a228af + last_write_checksum: sha1:cc7b1b2bb13a1ee8f88f5a485c3f4c7ef7e32875 + pristine_git_object: 8ba7176cb0213275c463d39fe8fc3ad9b9e5a0ad src/mistralai/client/models/chatclassificationrequest.py: id: afd9cdc71834 last_write_checksum: sha1:a29088359142ebd6409f45569168b2096014119e @@ -2853,8 +3827,8 @@ trackedFiles: pristine_git_object: 6c7d6231d211977332100112900ea0f8cdf5d84c src/mistralai/client/models/classifierfinetunedmodel.py: id: 5a9a7a0153c8 - last_write_checksum: sha1:64ba0eff2b87654e569f6a561ce09eb1d7377437 - pristine_git_object: 7c2bfc80c5881319692a54a13a78a479aa47604a + last_write_checksum: sha1:bfd6ffd8323a7b62199c84e64077b26b4c9c72d5 + pristine_git_object: 35d557aa6c122efe7fd300233f5837e69302fc33 src/mistralai/client/models/classifierfinetuningjob.py: id: a244d5f2afc5 last_write_checksum: sha1:b65b4bab42100c8e00821e6f81e03d2efe039dde @@ -2897,8 +3871,8 @@ trackedFiles: pristine_git_object: 3b90ab0c1ecac12f90e0ae3946a6b61410247e4f src/mistralai/client/models/completionfinetunedmodel.py: id: f08c10d149f5 - last_write_checksum: sha1:12ffb210273040ce9aa057a85d348643622c6b59 - pristine_git_object: e75b8d2f0cdaf38c8e1bc583f9b19278fdf04f86 + last_write_checksum: sha1:da9ba4911148929c202368ec95f5a5bd55f6da21 + pristine_git_object: 9b420ed73a496a0bfd0309422992178332ec6b48 src/mistralai/client/models/completionfinetuningjob.py: id: c242237efe9b last_write_checksum: sha1:653d253e02c252ece805d0172d7e214c474fd074 @@ -2921,8 +3895,8 @@ trackedFiles: pristine_git_object: 55730274eaa98e7aa53d04ba4b9006a61e427740 src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 - last_write_checksum: sha1:09dfd8f2d560f33fb12cba74cadcd505831d2389 - pristine_git_object: df5783d0a78128863d32c86230e6413bdf80ead9 + last_write_checksum: sha1:c4388ac1594641c36f97daaedcf42b0e94753be7 + pristine_git_object: 9c77123e18a86efaa7c0055e0c2a1a7226e7ffd9 src/mistralai/client/models/connector_delete_v1op.py: id: a377930b1435 last_write_checksum: sha1:2c9a501ab2e2b05829f2e3fd838f88a610d56781 @@ -2937,8 +3911,8 @@ trackedFiles: pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 src/mistralai/client/models/connector_list_tools_v1op.py: id: 4c6ad704479b - last_write_checksum: sha1:cc6b39ad84831a838e0a70748c31c7acae946cee - pristine_git_object: eb5de3213915c8d748648796bd5f582acd2d24e3 + last_write_checksum: sha1:3d509db411bf04de04d21360fd2c98cd7adce855 + pristine_git_object: 030ffb2c8f8423d840147bbc7f45f623ccfe3731 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 @@ -3087,6 +4061,90 @@ trackedFiles: id: 14f3643f7703 last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d pristine_git_object: f3a1e2ffb1a29e8798a2ac8c9c636ac3bada7413 + src/mistralai/client/models/customtaskcanceledattributes.py: + id: c20b8be67b8c + last_write_checksum: sha1:94e8aa92de645553991a5a0940aee90c19a6adc1 + pristine_git_object: cea2137e5356e636b44a3b1107aa9e29a69fd504 + src/mistralai/client/models/customtaskcanceledrequest.py: + id: 4b4f6b8c8ffd + last_write_checksum: sha1:db9c0e11711bd0c973c94ff19bf516cedcd5df90 + pristine_git_object: 0cb82aea95d197e7f39de308e806ef1f5503d25a + src/mistralai/client/models/customtaskcanceledresponse.py: + id: 0eeb9d6cf409 + last_write_checksum: sha1:99a1b1ce86f1636abd7f00e746d183cbe8e5c665 + pristine_git_object: 7873b3ca5fdb61c6c4d1205894727cd09e8d939d + src/mistralai/client/models/customtaskcompletedattributesrequest.py: + id: 9ec058aedb96 + last_write_checksum: sha1:f7fc636cc3e19b9a48b357d87509929164649e72 + pristine_git_object: 5e344a32379026246738dc5fa98bc507ca67bb93 + src/mistralai/client/models/customtaskcompletedattributesresponse.py: + id: 0b9fb891f354 + last_write_checksum: sha1:d0c1d0c181c3b0d2c9e73a09a40cd84dd5e49b85 + pristine_git_object: 8b28d1058d3ffc20d9c86c1cbac03ea343d0947a + src/mistralai/client/models/customtaskcompletedrequest.py: + id: ca7326e72707 + last_write_checksum: sha1:0eb76ca446cfa3ad883d80df2129db147915d60a + pristine_git_object: eee10e8e20c317b02d30657110d070121c765ea5 + src/mistralai/client/models/customtaskcompletedresponse.py: + id: 719b68571f4c + last_write_checksum: sha1:4d8b84868e4d94be8ca9190e29dc8dbf37c442fe + pristine_git_object: 5d2a8686342100c46426bc1212868129e54835bd + src/mistralai/client/models/customtaskfailedattributes.py: + id: ff33698df363 + last_write_checksum: sha1:dbbd423357a0d653ba20e94737126e9919bf2ff9 + pristine_git_object: b66d7d3c973307e23a73f45a1e654e375f55140c + src/mistralai/client/models/customtaskfailedrequest.py: + id: 844b7e2b33de + last_write_checksum: sha1:0c194c3b7711b6c27ad8d5e7aec834c637362cc9 + pristine_git_object: abf2d74f1b1a8f6babb27cf8b0f75d1c6191f608 + src/mistralai/client/models/customtaskfailedresponse.py: + id: 1cde7920833f + last_write_checksum: sha1:faa16c185064c28a2c58a4ac9ece342fdf4e1d52 + pristine_git_object: 1f9835ec2cd05a55d2f545b23a223b0039609805 + src/mistralai/client/models/customtaskinprogressattributesrequest.py: + id: d003c9954634 + last_write_checksum: sha1:fa48517b90b04ac689a852dfe6b0b3cc32705630 + pristine_git_object: 5737a4e1995572770b558a3823d3c1474d8f2e0b + src/mistralai/client/models/customtaskinprogressattributesresponse.py: + id: 895147a1a6a8 + last_write_checksum: sha1:b78742124f3c95c0b542cb5756aa39e466538a19 + pristine_git_object: 9b5fd20a3c379c4f06edea49f2a853c745e185be + src/mistralai/client/models/customtaskinprogressrequest.py: + id: d62648fe4f1e + last_write_checksum: sha1:a7dfd8c6465029c70dc72c1cb627c2b87a3c612f + pristine_git_object: c2c2faab83cb4b9fb16aaf9d472f1f989d199de7 + src/mistralai/client/models/customtaskinprogressresponse.py: + id: 9d012ecb7626 + last_write_checksum: sha1:ed0824ea2641df6e5284030f0906ee4d14ce7bde + pristine_git_object: 33c126f716d9b63fef593498a2442bfa1637d5dc + src/mistralai/client/models/customtaskstartedattributesrequest.py: + id: 23ea4ebe9e0b + last_write_checksum: sha1:011c21a19451f90ec3177ac7cde70b912f80f900 + pristine_git_object: db1ecbb6829f22b061688fb8b4a524af72003c3c + src/mistralai/client/models/customtaskstartedattributesresponse.py: + id: 6b8946c77018 + last_write_checksum: sha1:25f404c0770dac0b612c67d3445b40fd8659fb59 + pristine_git_object: 71bed58f6bb9b88110a79dbff38bb32f9fde6090 + src/mistralai/client/models/customtaskstartedrequest.py: + id: 39792cc12bde + last_write_checksum: sha1:b2dc31635070213fee4f5db093ada888b8d23d3c + pristine_git_object: c4bb6c2ae25bcb34f2db11cf11a82291c1f3215d + src/mistralai/client/models/customtaskstartedresponse.py: + id: 02b330a5292e + last_write_checksum: sha1:676b985755499c4691c1ac615d04fb35481d9a0f + pristine_git_object: 59d11fa8319c601ad80482944e6e3aef55257a66 + src/mistralai/client/models/customtasktimedoutattributes.py: + id: 9cc865098add + last_write_checksum: sha1:229037a374553cf8523d2c0e0f0aa017adb8790b + pristine_git_object: 47517ab1924cfce787805e9a528b04b1d4766a19 + src/mistralai/client/models/customtasktimedoutrequest.py: + id: 75499a6e7c0e + last_write_checksum: sha1:b32297b801a02fc119f7d749011e8fbd61700744 + pristine_git_object: def540f444e6a8b27d8aac76189382f14ff2b405 + src/mistralai/client/models/customtasktimedoutresponse.py: + id: 2dbbc78b85d1 + last_write_checksum: sha1:da1f0487cccc52c38a8132124efe085d3eeb334f + pristine_git_object: 7f274a535271c9e62974eedde427e3df577d6e2e src/mistralai/client/models/dataset.py: id: cbf14670ee00 last_write_checksum: sha1:012f85ebfbdb286436621efc3b5b1adb150871f3 @@ -3127,6 +4185,10 @@ trackedFiles: id: a84ce12a8251 last_write_checksum: sha1:4c0a37f3516ff7198dfe13c0ed04fa4cf48b35fb pristine_git_object: 3ce383648b1de95099b59b1f4c015a595f24060b + src/mistralai/client/models/deletebatchjobresponse.py: + id: 79a43aab6cf9 + last_write_checksum: sha1:9d4916ba4733e777f745c54dd20e71a6a8f4fdd7 + pristine_git_object: 958f0c4f4dbd989b9a95f0c8d52a279c1d448f0e src/mistralai/client/models/deletedatasetrecordsrequest.py: id: e7ef16596e54 last_write_checksum: sha1:971e81be9064277df5dd656e912b9f319474e742 @@ -3143,6 +4205,22 @@ trackedFiles: id: 68f53d67a140 last_write_checksum: sha1:f1b774b3febc9388ea8175d266f585aa2954af55 pristine_git_object: 3823651b3030944520aad12c7e6f6b4e8bbf2a8c + src/mistralai/client/models/deploymentdetailresponse.py: + id: 7f4a17a1c7ca + last_write_checksum: sha1:c0d41bf5e5fbe06811aa3a6ddeb3b1cfab2ab8b6 + pristine_git_object: 82f021f187b86ad79d826166d7fe6fd91b915b58 + src/mistralai/client/models/deploymentlistresponse.py: + id: 1f0b404ba621 + last_write_checksum: sha1:abf42a7e10930c6fa908aece4903f5464f88aef2 + pristine_git_object: 7926cde725d80b9055401de46ab947c98e8c5a3e + src/mistralai/client/models/deploymentresponse.py: + id: ea15ddd64402 + last_write_checksum: sha1:a3dcc989ef05cade526d30b7fd23d3d0737e9f1b + pristine_git_object: 7f8ed3a346fa92bf7c7ddfc72984a51442e58d0c + src/mistralai/client/models/deploymentworkerresponse.py: + id: b11a9947bd19 + last_write_checksum: sha1:e57ad0af89e80ac9b2b40f9dbe1f6e6708efde3e + pristine_git_object: 0adcb4d6ee081b1bb699c1ebb2b8a4cec7bcb771 src/mistralai/client/models/document.py: id: fbbf7428328c last_write_checksum: sha1:bc290f10562aaf9c24bd14ab3d2a31e62f535042 @@ -3179,6 +4257,10 @@ trackedFiles: id: 6d6ead6f3803 last_write_checksum: sha1:b0daee4bd21a441a2e8e47cf8ca8be32d2179869 pristine_git_object: 03b23a7cba53c27ef02f3bc025f38f10d7b98e2d + src/mistralai/client/models/encodedpayloadoptions.py: + id: 97955ebc2eb9 + last_write_checksum: sha1:464d35eea8a12a0a1a7a58ec66ffaada14f07bb9 + pristine_git_object: 5c369046204ed55ac2c5dd63befd7598b7fd35ac src/mistralai/client/models/encodingformat.py: id: b51ec296cc92 last_write_checksum: sha1:ea907f86b00323d99df37f7ff45d582aace798e7 @@ -3191,6 +4273,26 @@ trackedFiles: id: e5a68ac2dd57 last_write_checksum: sha1:0711bc7d48998b1c01e7708e29ae5889f9bea7bc pristine_git_object: 01157dfab89756ecfb587722270ef3cef8722807 + src/mistralai/client/models/eventprogressstatus.py: + id: 48623263df72 + last_write_checksum: sha1:e2fd3c6e145e07d247c1ec41adf67996c86696ba + pristine_git_object: 6fde1c3913c670a60d3eead5ba0d27f77a281799 + src/mistralai/client/models/eventsource.py: + id: 8b926028b7b2 + last_write_checksum: sha1:688d7fe14b17595e121bab41319c3630860b0a60 + pristine_git_object: d0f4d5e3f55ca89569ae90dc96eb036d01bbc8e0 + src/mistralai/client/models/eventtype.py: + id: f70686df1fa5 + last_write_checksum: sha1:a9f66d0772a83a6f83968d7a6a4877ddcf5e4728 + pristine_git_object: a85321b2603057de07d343b380e86476f1b70adb + src/mistralai/client/models/execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop.py: + id: 3e2249825144 + last_write_checksum: sha1:d177be670203df65ed11fb73210d4a5afed1a566 + pristine_git_object: 2e79ef25f7117584df49c6f1f925a3386360d49b + src/mistralai/client/models/execute_workflow_v1_workflows_workflow_identifier_execute_postop.py: + id: 5da876c66fc5 + last_write_checksum: sha1:2a474dbbbd10132f2530e3f09d6a5a87ec9e4aa1 + pristine_git_object: bd9496a2d969927634c9cea1c294c9d26fc3a87b src/mistralai/client/models/executionconfig.py: id: 14518c40a13b last_write_checksum: sha1:351fb4a74622cb70969b728ac65b62ca670fc7e5 @@ -3203,6 +4305,10 @@ trackedFiles: id: 22cc29d258db last_write_checksum: sha1:83a787b852101f1862f0aabc1638f68753b5d607 pristine_git_object: f1600cac74e1d50979277d3eb6830ea5e84b69ec + src/mistralai/client/models/failure.py: + id: 596e38493eaa + last_write_checksum: sha1:5077e5660c7192e2123fc26059f1786f9d75e273 + pristine_git_object: 85ca77a5713f0fc3d51c5c7fdaa3f06066ac4dbc src/mistralai/client/models/feedresultchatcompletioneventpreview.py: id: 19109368b436 last_write_checksum: sha1:2dfbc8aa7110a57f892ad80002cc01bc4c94589d @@ -3313,8 +4419,8 @@ trackedFiles: pristine_git_object: ccb0f21b5a69f91119bec9db6e9f3d876e4c35af src/mistralai/client/models/ftmodelcard.py: id: c4f15eed2ca2 - last_write_checksum: sha1:1c3ab1bda3fa9e2df33b47a49d5e9b9e2d82a701 - pristine_git_object: bb7c52c881ceadccdeb3590104e774f3d2ad94d7 + last_write_checksum: sha1:4382bdc5744ed2199c0aefcf32d8d9e0d02c42f4 + pristine_git_object: 922667b0f7726824d0de4b18eac2ff86b271bccb src/mistralai/client/models/function.py: id: 32275a9d8fee last_write_checksum: sha1:c01c1ed54b3086859cde0dd3c3c466c78d8323ae @@ -3403,6 +4509,10 @@ trackedFiles: id: 3e4f4e2447ac last_write_checksum: sha1:c58e1c3e04892b5bfcadeec7c640c37c8d3da017 pristine_git_object: 1d79f2d59fc1d0f38c66d85cf266bc9700087c37 + src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py: + id: 3fae92e2573a + last_write_checksum: sha1:2257627743f50ff58107762a69aae40ef5528214 + pristine_git_object: 1f699bed56b6a40166274492d7b2ca4ff84a8f61 src/mistralai/client/models/get_judge_by_id_v1_observability_judges_judge_id_getop.py: id: 4201c3c5a891 last_write_checksum: sha1:44c9a7d21ea727e0f849cfc5dc4a02220bcf6e74 @@ -3411,10 +4521,22 @@ trackedFiles: id: fa04e3db7781 last_write_checksum: sha1:d59740c9021cd891db4b81a7f4c6aeeecb9d6958 pristine_git_object: b5d0980e197c19eaa70ac26f3b118a8e60364e3e + src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py: + id: 9d566ab77998 + last_write_checksum: sha1:de2b5f449d510a05c9c8805e35f43085e5592e1d + pristine_git_object: d974f981d5b3e9055c787fec446e55f642c8823a + src/mistralai/client/models/get_run_v1_workflows_runs_run_id_getop.py: + id: 60463c59ff01 + last_write_checksum: sha1:a851312a3e0c91273ad444c6e2cc81c8c541c9cd + pristine_git_object: d9b6758f1622c76ad41092f4dbb9c6cf392b299c ? src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f pristine_git_object: 7689415dd70da6eec8d0b416cbf020c4b9adeecf + src/mistralai/client/models/get_stream_events_v1_workflows_events_stream_getop.py: + id: 8dd6ce0e8d66 + last_write_checksum: sha1:021765a807c5b127c3bfabbf227e952e10f5be88 + pristine_git_object: 442a7a940b03c27b173281626d612b650a1ade2d src/mistralai/client/models/get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop.py: id: a5838063aee4 last_write_checksum: sha1:457e62a76bd229aecf1725c5f813de63e35d8b7e @@ -3423,6 +4545,50 @@ trackedFiles: id: b6ca849d5005 last_write_checksum: sha1:ef189175dacf5a9be4295782eebfead3f40ce137 pristine_git_object: bd81442ec3758ba0833ce8d3ad54fbc803748bc5 + src/mistralai/client/models/get_workflow_events_v1_workflows_events_list_getop.py: + id: 9d6d093835d6 + last_write_checksum: sha1:143b69eded03282526de2164ca95f51915be6a10 + pristine_git_object: 186c55486ef2f9ba01b4c5ace5b91a416b0a6bcb + src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py: + id: 8d636c8cad1e + last_write_checksum: sha1:026e7390d2df0f6f67bbd62fe6aa9ebaa0142f76 + pristine_git_object: 66c6fb065dd395fbcd02031c968d49c757cb8da2 + src/mistralai/client/models/get_workflow_execution_trace_eventsop.py: + id: 75438195bf19 + last_write_checksum: sha1:3fc47c8b7c301c1029f6a10e30298d8bc776d140 + pristine_git_object: a60fb536b9e4dd1ab8a2256d1cc28235752c34f2 + src/mistralai/client/models/get_workflow_execution_trace_otelop.py: + id: f24457d6ea21 + last_write_checksum: sha1:33ddf619eb30b950d5e2120b432a8dc1b3acb10a + pristine_git_object: 0abdd75fc1650a95aee925ec26bfd1af8a6e2632 + src/mistralai/client/models/get_workflow_execution_trace_summaryop.py: + id: e44e62e3c444 + last_write_checksum: sha1:818f5bd1151bd77c9c200f2799e352ae5eab73ab + pristine_git_object: 54b080e0b03bd406c805874666e81ee32967bc76 + src/mistralai/client/models/get_workflow_execution_v1_workflows_executions_execution_id_getop.py: + id: 25bc5d3fec8d + last_write_checksum: sha1:e7145925a38e3e33c9615e61a880e222eac8a20b + pristine_git_object: c99260545f162e2a93c50d26b9a6a07c102e80c8 + src/mistralai/client/models/get_workflow_metrics_v1_workflows_workflow_name_metrics_getop.py: + id: 449550c7f76a + last_write_checksum: sha1:93b1174df5a303444fe0d99c881ddec4cac6c788 + pristine_git_object: 1d9c8989416bf2090476f3ad839c1ad011e522b7 + src/mistralai/client/models/get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop.py: + id: a6b7d0f559ef + last_write_checksum: sha1:881422f47653ae2962f935b039a9c77d347c7b7f + pristine_git_object: fe7d639da434356114d8cd5829c0d3fffa776515 + src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py: + id: 822f256b2372 + last_write_checksum: sha1:364bd7662bed7045624c9a135ba145e55aa5c24c + pristine_git_object: 478ee3fb1d86e9421c3219668f8095637a3352ed + src/mistralai/client/models/get_workflow_v1_workflows_workflow_identifier_getop.py: + id: 097af37374fd + last_write_checksum: sha1:962b823e10fb6cc838ecf2b02b0cc284252ee908 + pristine_git_object: 20d0b6dd4e74c9c39a8b95cb9f9ec590d146574f + src/mistralai/client/models/get_workflows_v1_workflows_getop.py: + id: a128585aee76 + last_write_checksum: sha1:b2580366fd3a247b68b1037ed80d7158cd061e51 + pristine_git_object: 6cbad5e4fdbe4bd86426bec5edbb7a899d091f3c src/mistralai/client/models/getfileresponse.py: id: 81919086e371 last_write_checksum: sha1:a116c2fdef65748b5015804fc0eb9860fd2bc3b2 @@ -3503,6 +4669,10 @@ trackedFiles: id: b56cb6c17c95 last_write_checksum: sha1:21b5794f110c53691654d7195201f9a4b7793f21 pristine_git_object: de2e63472ac53809cfeae200bd7d2f3dcbb70034 + src/mistralai/client/models/jobs_api_routes_batch_delete_batch_jobop.py: + id: 8c43af108342 + last_write_checksum: sha1:06244690f3de161dc1ba5648070b0212cb2c38d7 + pristine_git_object: 9fc4a7e77cd756b47cdd1a0c4817cd458fd6a68a src/mistralai/client/models/jobs_api_routes_batch_get_batch_jobop.py: id: 36b5a6b3ceee last_write_checksum: sha1:449dc131e1514edb32107ae1c699544732b313fb @@ -3543,6 +4713,38 @@ trackedFiles: id: 6d9dc624aafd last_write_checksum: sha1:fbacb171b9c75f1fe45406f542a958d10c15fae2 pristine_git_object: 296070b426900305fe4596f03a3c9f081cdb2dcf + src/mistralai/client/models/jsonpatchadd.py: + id: fb2a1e58a6a5 + last_write_checksum: sha1:a323e406accd1b25f4e094a54647dd140aab43d5 + pristine_git_object: d4242f11b063f795b8d677abdd8c19ab0419a0b7 + src/mistralai/client/models/jsonpatchappend.py: + id: 61801f21f4b0 + last_write_checksum: sha1:f0400cf42fa6c776042487285cf18c1970e17ad6 + pristine_git_object: 7181ddac1956f1c29b815231f30c3405d4f50754 + src/mistralai/client/models/jsonpatchpayloadrequest.py: + id: 3f10ecfda228 + last_write_checksum: sha1:93efb55ddcc2cc77f9d70596586061f9d112ea36 + pristine_git_object: 96a6d689c531f366704cdbd67b36f0c9be8dd9d3 + src/mistralai/client/models/jsonpatchpayloadresponse.py: + id: 1b39f46f529f + last_write_checksum: sha1:bf48ca0dd13e374dec8c2ee082fe9b78cab391e5 + pristine_git_object: 345e6d14ce3244ff4234c80502e553de81ac8dcf + src/mistralai/client/models/jsonpatchremove.py: + id: e472e5b752ec + last_write_checksum: sha1:2dec39f883b362968f8d55b9b7daef6fb40094e4 + pristine_git_object: 5bcedf879eae1921fd55bc76ba5b5532a2e9641f + src/mistralai/client/models/jsonpatchreplace.py: + id: 816f9df2f3c9 + last_write_checksum: sha1:9448e1181ad7913305712966d0984ebad3a9dc4b + pristine_git_object: 3dd7aee65f0c4f0a2218762a9b9ea8cd571c406d + src/mistralai/client/models/jsonpayloadrequest.py: + id: 0d49a02162ea + last_write_checksum: sha1:304afed33d57eb0177012ef2d4c08f669cd59014 + pristine_git_object: 252b8dacd6cdc4b07a46f1feae2fd67f961e5bee + src/mistralai/client/models/jsonpayloadresponse.py: + id: ba3265f85453 + last_write_checksum: sha1:9103c6d30a65222458b9bc9b5b15cc88126f4284 + pristine_git_object: 038ea329340d2e2ecc5d2db503e367e2a279cd1c src/mistralai/client/models/jsonschema.py: id: e1fc1d8a434a last_write_checksum: sha1:f6e3ddb37e55ff27b795389fce6d4f433e7d5639 @@ -3647,6 +4849,10 @@ trackedFiles: id: d493f39e7ebb last_write_checksum: sha1:25b3c2c1040cd73ebd6b988b8b27708831affefd pristine_git_object: 7a51d6053aa2cf2e6524a80487fe9549eec3dfa1 + src/mistralai/client/models/libraries_list_v1op.py: + id: 2d9b1b4deeb0 + last_write_checksum: sha1:7f853d8cd4a4c26ddb2ff2b6e7c0f35d2a2e540e + pristine_git_object: 088a41b2cf773965583fa980f9067381ca40cca8 src/mistralai/client/models/libraries_share_create_v1op.py: id: feaacfd46dd3 last_write_checksum: sha1:cdb7e60f1aceb2c7aa54fe2b9ba5dafc2bb70995 @@ -3667,14 +4873,22 @@ trackedFiles: id: 028a34b08f9c last_write_checksum: sha1:3ac8546f2ada4f9a24d8296e03b9ad61d5f2e372 pristine_git_object: c26710ff4818c9719e08b67d147ee9bded3dc46d + src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py: + id: 0c6586ffcab0 + last_write_checksum: sha1:c7d7be66560be5bb813316f958a3fecdf7813156 + pristine_git_object: 066b8db154651681af532e557c60587eddf15536 src/mistralai/client/models/list_models_v1_models_getop.py: id: 1843a7aa68e5 last_write_checksum: sha1:018c32019aab6c4995285ace8abba54d88f41c0b pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db + src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py: + id: 2f1b225158c3 + last_write_checksum: sha1:50ac1b78fd3397604cb8d90118c16bb17f6da798 + pristine_git_object: e61140cf55f1284db81359eabc9d9860e2477ea9 src/mistralai/client/models/list_voices_v1_audio_voices_getop.py: id: 6b3ce5be1294 - last_write_checksum: sha1:8345bd6cbae4c66cbab2ba7c4407451bcdcb4be5 - pristine_git_object: 16ae81c7f0319cc2c6f7744faa4f582c6ba07faa + last_write_checksum: sha1:f11a5135ce79d1913db87f9db7d05b4266630b20 + pristine_git_object: 30161b334339ffb310506b8ab87c40990478b483 src/mistralai/client/models/listbatchjobsresponse.py: id: 99d94c86a871 last_write_checksum: sha1:01e5fd232c654b3c4a9d86c09f89cfef6f51805f @@ -3721,12 +4935,16 @@ trackedFiles: pristine_git_object: 0284cb99375d1205339a5de99a527c212ac2dfbd src/mistralai/client/models/listlibrariesresponse.py: id: df556a618365 - last_write_checksum: sha1:55afb46b1fa797bc46574e5256cd063574c6fcbf - pristine_git_object: 337fe105731d8f3ced1f8f1299ff4081b9d5bfbe + last_write_checksum: sha1:f90b903fb4a1ca5504e63350c5353c6eab505761 + pristine_git_object: be4125f2125eab43cf2682c852f48400a56051d5 src/mistralai/client/models/listsharingresponse.py: id: 487c6addf089 last_write_checksum: sha1:cebb9e6ab7db8c067a3403211765ebfffec0190a pristine_git_object: f3e6dc8714311989d1e6c7275c8944e228f3f0c5 + src/mistralai/client/models/listworkfloweventresponse.py: + id: 20a423148117 + last_write_checksum: sha1:bdf75230150022794f0268453c9f59952580c524 + pristine_git_object: be99ccea41922c73c7209fbc78393c7ae47e1a3e src/mistralai/client/models/mcpservericon.py: id: a5b508a322d7 last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 @@ -3835,6 +5053,10 @@ trackedFiles: id: 06bab279cb31 last_write_checksum: sha1:b9158e575276c1e0a510c129347b9a98c5a70567 pristine_git_object: a8a8ec3d8d8a58deb3c1f8358c6dce5a9734f89c + src/mistralai/client/models/networkencodedinput.py: + id: 6dc5321dbe77 + last_write_checksum: sha1:5a99ca47003b7bcfee48753dd4683a94eeee1fe1 + pristine_git_object: 70d9241431ae75d58435965be03089ab8419d32f src/mistralai/client/models/oauth2tokenauth.py: id: 167c3b8a104e last_write_checksum: sha1:146c4ce3a29c0bedcb575cf7fa32cb97aa375c5b @@ -3951,6 +5173,22 @@ trackedFiles: id: e6be33f2cd2d last_write_checksum: sha1:aa71bf6de6316b8754fb18f897b30051a2d4c70e pristine_git_object: 2c5186c02f6b463c12fd7819637b52c8c7ee4cd7 + src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py: + id: 73826dbd3f5b + last_write_checksum: sha1:5105618697e031bae45cf9f6d7c5227d9c08f155 + pristine_git_object: 5598c4b6f24b0c1a7cc24c6a71b7732aa18e89b2 + src/mistralai/client/models/querydefinition.py: + id: 9648273c8b7d + last_write_checksum: sha1:f76a8ac3af27ab1a8ceab6b6befb3af4b4ec919d + pristine_git_object: bc9b4f20c754f5e29b2193682376a044186a5a10 + src/mistralai/client/models/queryinvocationbody.py: + id: d78662a1a9bf + last_write_checksum: sha1:002769d41d021a34f2adfe0bc7383f02142aaf24 + pristine_git_object: 550e1d7b584213d84fa9fc367711f3af1f8f0d62 + src/mistralai/client/models/queryworkflowresponse.py: + id: 30281fcedce6 + last_write_checksum: sha1:fbcc1e870c0a81ff165311519981bd179b4bffec + pristine_git_object: aed982d5bb0939985e3966bf54a5a1a43e9b634d src/mistralai/client/models/realtimetranscriptionerror.py: id: 8c2267378f48 last_write_checksum: sha1:8bfdc2564fc416b0e1a4cc2e2a3a5437b26cea85 @@ -4003,6 +5241,14 @@ trackedFiles: id: 3f2774d9e609 last_write_checksum: sha1:1ce68530a46793968f1122d29df722f0a5c9d267 pristine_git_object: fc4433cb4e657b06aa6a4c078094c2df342810e2 + src/mistralai/client/models/reset_workflow_v1_workflows_executions_execution_id_reset_postop.py: + id: 3e9d229cd8ba + last_write_checksum: sha1:ef6d5e37d26d9488c657f0fc27e3e3fd4ec34e02 + pristine_git_object: eda20e536e92f38bf5ffc115da6d7c748c70a4fd + src/mistralai/client/models/resetinvocationbody.py: + id: 3c0a985a5a77 + last_write_checksum: sha1:bef8afbe543404fdd79d1b40ea7611f4ac7de3e0 + pristine_git_object: 26c3389f988818090bc60e17ffb9a65ce992d33c src/mistralai/client/models/resourcelink.py: id: 4251cc3c7797 last_write_checksum: sha1:fad9dd6a100450397ee358842a31804c3552ca06 @@ -4043,6 +5289,38 @@ trackedFiles: id: a9309422fed7 last_write_checksum: sha1:86a61340a647696f6c35a82d945509b1c85aa6f7 pristine_git_object: dfec7cce1e22ab607b6a9e947fa940284426086d + src/mistralai/client/models/scalarmetric.py: + id: ae8eb1017da6 + last_write_checksum: sha1:c85c3825e8f60eac8776e912425ed4f43b387ad6 + pristine_git_object: b9c70a7712022ef4f2f0b9d2e2cdeb3399f79621 + src/mistralai/client/models/schedulecalendar.py: + id: 76d72d187023 + last_write_checksum: sha1:8f732c72e3b29748d8d913990fe95dadf6a14cc6 + pristine_git_object: 2cb179eb22e9ac10e820ed276187cd863fc7a440 + src/mistralai/client/models/scheduledefinition.py: + id: 6ea58a356f77 + last_write_checksum: sha1:d1d24eb6d844bae8c1c31962bf0d60f9d21601d5 + pristine_git_object: dc622c3a26bd3341f17c95ed6cab5948be5c0fae + src/mistralai/client/models/scheduledefinitionoutput.py: + id: 69dc15b9a0d6 + last_write_checksum: sha1:65b865908446dcf7f9a1d45f4b2491157dda644c + pristine_git_object: f40470fa3b05672e7817cb996d5ef6bbeb3b961d + src/mistralai/client/models/scheduleinterval.py: + id: 1d89c2043566 + last_write_checksum: sha1:8119be5607d6ccad371b83f93b22da6e08c21504 + pristine_git_object: c01cf8522f743b4b744f02603da7df15311de406 + src/mistralai/client/models/scheduleoverlappolicy.py: + id: a729c26f9c43 + last_write_checksum: sha1:f39e47b552d05c3bd9534d1c061f811d47d71191 + pristine_git_object: 13db394715c184da98432af6a971393424bc5197 + src/mistralai/client/models/schedulepolicy.py: + id: f326afe63958 + last_write_checksum: sha1:47f6665bb77b023658794ef1eac2013d92f3d349 + pristine_git_object: 9a507656a4da020ea5c7a2d22b81d912ead32022 + src/mistralai/client/models/schedulerange.py: + id: f9d442a062b5 + last_write_checksum: sha1:763d3229958d166028203998b964abaf73d42a2c + pristine_git_object: e30eed16bde2b71981b7b15e9d88a044910c6c3b src/mistralai/client/models/searchchatcompletioneventidsrequest.py: id: cabc8ef82d67 last_write_checksum: sha1:3290793dcf229bffc16b16d32d2c599c9a54bf4a @@ -4079,6 +5357,22 @@ trackedFiles: id: 2439b732dfae last_write_checksum: sha1:05e36cba36203bcc579a3b02538aed570cf22352 pristine_git_object: 7c2d435c363bcd98aba97e120954ec1357524e34 + src/mistralai/client/models/signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop.py: + id: 16c54f54e60f + last_write_checksum: sha1:57437b8a9d284f7e77459c319908ad0b8db33720 + pristine_git_object: c61ed019456f82a15c53944dcf0cf122edbdbc0e + src/mistralai/client/models/signaldefinition.py: + id: f1c1ac98a427 + last_write_checksum: sha1:d60f213a8d1783df73214a3117761ffdab92d564 + pristine_git_object: 434e12309e5e3232bc7ece9ec2351e75cf105d6e + src/mistralai/client/models/signalinvocationbody.py: + id: 0fd96a7c058b + last_write_checksum: sha1:13c77816c7846edfe1fbf013c2864c20e9775c1b + pristine_git_object: 3b7a1ff1d590cf2a6b4df68016c56a01677808ba + src/mistralai/client/models/signalworkflowresponse.py: + id: e1844a7da20b + last_write_checksum: sha1:c891e5a904c040bcf2a5d46fe9851575890ae8d3 + pristine_git_object: 2d9ea356fb09d47e53274453476bd04eb6403e54 src/mistralai/client/models/source.py: id: fcee60a4ea0d last_write_checksum: sha1:4d4277d75f7ce001780a069898b38afa7c8addc0 @@ -4111,6 +5405,18 @@ trackedFiles: id: 1733e4765106 last_write_checksum: sha1:3c79fc7c43cd018fba4950ba013ed15899b82ebf pristine_git_object: 0add960bc93f53df5ddda94892543a0857f32dd6 + src/mistralai/client/models/stream_v1_workflows_executions_execution_id_stream_getop.py: + id: 793a9301522f + last_write_checksum: sha1:c05e4bedbc131352b0b275e2bef7eb2f541433b0 + pristine_git_object: 5282e52aeb9c3dc5729b5cd54502802bc9c514e1 + src/mistralai/client/models/streameventssepayload.py: + id: c6becbbd80bc + last_write_checksum: sha1:c54a8dc9c54e62937b61b52e2b5ce3ff3c422ce7 + pristine_git_object: 2c662a65bc6e419c3402e42755c0365cc30d9541 + src/mistralai/client/models/streameventworkflowcontext.py: + id: 14c00c79de78 + last_write_checksum: sha1:ea0a2d8e68a44783e47dc532307c7a2b1f717805 + pristine_git_object: f24de860f5ad2ca115bac68b494caba4cd6ee800 src/mistralai/client/models/systemmessage.py: id: 500ef6e85ba1 last_write_checksum: sha1:a88de3fc70adab47943f867336659b3a1a6cdae0 @@ -4119,6 +5425,58 @@ trackedFiles: id: 297e8905d5af last_write_checksum: sha1:e5695ca0ebdb0f02f3a0c527015df154a0c52b7f pristine_git_object: d480a219e935aaea91adc320de0003b562c0bbb5 + src/mistralai/client/models/tempogettraceresponse.py: + id: 8bb3c013aa76 + last_write_checksum: sha1:ff35ba718f008554d79defc41dc02af5115c7ab0 + pristine_git_object: 8575b95430e10a9b8d7e1df0f0e131cda68bb685 + src/mistralai/client/models/tempotraceattribute.py: + id: 7d0ec3402dc0 + last_write_checksum: sha1:6d75f1b8a97ca30fbd0d4c56a0e9a42a15c0df5a + pristine_git_object: 71c1b1f2ebb6a8211693d7b58d83a7fee9854cc4 + src/mistralai/client/models/tempotraceattributeboolvalue.py: + id: c7c383a6c05f + last_write_checksum: sha1:a40945504a6845a3e43a80d5f901af9f5c5ee96b + pristine_git_object: 72fb79d022533d8a7af27c5d7e91258e7cf3a3b5 + src/mistralai/client/models/tempotraceattributeintvalue.py: + id: c4659ad7a2a5 + last_write_checksum: sha1:471273678346f841dd718fce1899a6ae8ad7cd1d + pristine_git_object: 6ffe7efe56d3b050b0ecd3db8f6d24d2d37b4854 + src/mistralai/client/models/tempotraceattributestringvalue.py: + id: 2dcdd05a5115 + last_write_checksum: sha1:67aea0de94db0eb1127f22f0eeafe28bb8a125be + pristine_git_object: f4dea6395300960e835d56aa47d4ead96536c9af + src/mistralai/client/models/tempotracebatch.py: + id: 969acd9d6220 + last_write_checksum: sha1:8e865d710af9d3a7627423163857a7bf19e7f60e + pristine_git_object: 7f50804747fd972ba45bf70bf621d92031e2ef0b + src/mistralai/client/models/tempotraceevent.py: + id: 98dd1b838524 + last_write_checksum: sha1:c0153772618cf57c4c3f7830519ca7e7310fc5af + pristine_git_object: bda2115aac42c4b0b195143abe2ed9d610053db4 + src/mistralai/client/models/tempotraceresource.py: + id: cc8a7ff3feea + last_write_checksum: sha1:3fb070d82116606740a3b6433b97b65ac80ffd79 + pristine_git_object: 42c4d56ade5183234c30a88ba3cac010bdd6ee50 + src/mistralai/client/models/tempotracescope.py: + id: a2da1a3b8198 + last_write_checksum: sha1:ea6ee30b2e080440e72fa9a4eb3c592d2bf52fe9 + pristine_git_object: 3e302f81252b0628eb0046777825e8bde71ea98d + src/mistralai/client/models/tempotracescopekind.py: + id: 40c697c1e617 + last_write_checksum: sha1:b0298aaf269df98bba2bae72e8d47ada6aaa2433 + pristine_git_object: a26d5c38c5dbf1605baaa96bb29ec3d1c3ca6c29 + src/mistralai/client/models/tempotracescopespan.py: + id: cb248e9c0a00 + last_write_checksum: sha1:7f3742ddf7d4baf8e91182d920206ae3e505c4ee + pristine_git_object: 362f3c9974a8183cbe5f59a42f164f6f2d1d5542 + src/mistralai/client/models/tempotracespan.py: + id: f36568c83a96 + last_write_checksum: sha1:a533d06b305ca4076ff40faaa9ce5546cec50537 + pristine_git_object: 51b181ba48d4040e0c48c41960b9076b57f95e4b + src/mistralai/client/models/terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop.py: + id: 458eee7d2603 + last_write_checksum: sha1:51c88c99243e964d8b044a1e25a78dff85145e7c + pristine_git_object: 771c165035c62d9963b6b9c71a00e8e948ac6661 src/mistralai/client/models/textchunk.py: id: 9c96fb86a9ab last_write_checksum: sha1:40fa1ea5dcbca9f4c534b58f7cb65bbaa5084521 @@ -4135,6 +5493,10 @@ trackedFiles: id: 294bfce193a4 last_write_checksum: sha1:4563b1759e8b64a9ed1de3843ea73ffb8f2e3285 pristine_git_object: ae084a179c3227351d0ca8b10c926c6a61d21221 + src/mistralai/client/models/timeseriesmetric.py: + id: 7f91751795ac + last_write_checksum: sha1:e7871d8fa64b59e8448f0ae3be46f02c4d02eac8 + pristine_git_object: a0eb0c9ca86791401aeb1df0d851b3a42be1bef7 src/mistralai/client/models/timestampgranularity.py: id: 68ddf8d702ea last_write_checksum: sha1:64e7b198a75f026590e26758112651d31984076f @@ -4251,10 +5613,18 @@ trackedFiles: id: cdb07c3837f7 last_write_checksum: sha1:c2339efbf6dac10bf5e3f42491fa971982d4a998 pristine_git_object: bcd4d5f2da000bcc4af9c41bf7e92efdaf99b039 + src/mistralai/client/models/unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop.py: + id: 9df426343c2c + last_write_checksum: sha1:12d529f6703695653004ac5692f13daab13bf060 + pristine_git_object: 3dc55512ab45c4b7617dd0cf2e464a3f53921c8b src/mistralai/client/models/unarchivemodelresponse.py: id: 22e2ccbb0c80 last_write_checksum: sha1:8ebdd49f2bef3c5934395808bf71701b46e512be pristine_git_object: 5cab4c2ef093236cacdc2a9e24b27c1a6c643ee9 + src/mistralai/client/models/unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop.py: + id: 114f67717003 + last_write_checksum: sha1:f80651b63d89ef19a070c1ae7901b021914a0ddd + pristine_git_object: eac992d5936dd5dc935623babfa22177f0e0adb7 src/mistralai/client/models/update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop.py: id: fa5d55a9d6cf last_write_checksum: sha1:5cf094a6617b1900745deece2e34edfb1b040905 @@ -4275,6 +5645,14 @@ trackedFiles: id: 399da05bd75e last_write_checksum: sha1:aca7b6539571a8111e8f1abb7f90dde1e461d4bc pristine_git_object: a11b626a9b4ec3b1761bb383dda2cead843ee634 + src/mistralai/client/models/update_workflow_execution_v1_workflows_executions_execution_id_updates_postop.py: + id: 5799cc4ab66e + last_write_checksum: sha1:ce9516f04804a7aa692ce5525e0c094bfc8167c9 + pristine_git_object: 30ff2baef59c3acdcd3b9e3dda3fd15d01490338 + src/mistralai/client/models/update_workflow_v1_workflows_workflow_identifier_putop.py: + id: c537bd5a9dd1 + last_write_checksum: sha1:2475d631b74ec49cf8420227151e13083a6ffdb0 + pristine_git_object: 9ee9b6d2db84a56c401c91e9484cea378ecc38dd src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a last_write_checksum: sha1:0917571c77c739ae6c158b2adcd5df7ebc332f4f @@ -4295,10 +5673,18 @@ trackedFiles: id: bbb067caa23f last_write_checksum: sha1:4ae8e1ea4a6a9ec5ed559bef8fe21d11af2b0ed3 pristine_git_object: ddbaad1237d2056476c4fe7f8a6caba06a65f744 + src/mistralai/client/models/updatedefinition.py: + id: 143f97683a02 + last_write_checksum: sha1:932dbdf03be9a321795c14142ddf3729c1e0f111 + pristine_git_object: e878c8764774e4420a85145196cfb93c32d108fa src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 last_write_checksum: sha1:57b5a2c77ddcf2e09a8eead6b4f5e5c694e21844 pristine_git_object: 12d9c89b9ab67f6d7e69c26c31da76e7aaf1e817 + src/mistralai/client/models/updateinvocationbody.py: + id: b8558eff0be0 + last_write_checksum: sha1:ea486ca10c1165b9f3dd40c005cc98bc6b0e937f + pristine_git_object: a300bd20073a2ddfc9b3bd4844aae9f3915e2f9c src/mistralai/client/models/updatejudgerequest.py: id: f6ad6fb901a0 last_write_checksum: sha1:0cc5d951aa36d1ba6cf82020d9ade4ac85bc3a94 @@ -4311,6 +5697,10 @@ trackedFiles: id: fe649967751e last_write_checksum: sha1:b5ce56ef430768ee806b45d9c2e4c405764a1ef5 pristine_git_object: 0179ba140d7d598a4a363ddfab67197e56857964 + src/mistralai/client/models/updateworkflowresponse.py: + id: f5dcf717a0a1 + last_write_checksum: sha1:f0da842336a6aef26bab3fab2f0c742deda2653e + pristine_git_object: 699bef98d0eddd6d7b4e776c3aaa2896174bc223 src/mistralai/client/models/usageinfo.py: id: 54adb9a3af16 last_write_checksum: sha1:108b7cd220312ff96d298981e7ada5bc05921cc9 @@ -4359,6 +5749,254 @@ trackedFiles: id: 26b0903423e5 last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae + src/mistralai/client/models/workflow.py: + id: 1548cd73984e + last_write_checksum: sha1:14e1db57af8784d77633d7dc1d22198f2377909b + pristine_git_object: 5edf326ce15c6496607fd15f6362ca7aa1936de7 + src/mistralai/client/models/workflowarchiveresponse.py: + id: 64c479b7f9da + last_write_checksum: sha1:7e14d02314fcc8dab22a6a908f89122491449151 + pristine_git_object: 18eeccf267343acdff7cb10db729d38e167ab5a5 + src/mistralai/client/models/workflowbasicdefinition.py: + id: 34623036478d + last_write_checksum: sha1:0516152c52c443b8b94c830f81f591798f08ac92 + pristine_git_object: d2f3db1fb851353d21ce5bbec5e8d2d4b9afabfa + src/mistralai/client/models/workflowcodedefinition.py: + id: 36fd5b898ddd + last_write_checksum: sha1:70e771dc21affc971eb01de18d3c439c1f3cc8c5 + pristine_git_object: f71b9ff1885114e764665d2620e5c3fc01862ff8 + src/mistralai/client/models/workfloweventbatchrequest.py: + id: c0c0986a6b07 + last_write_checksum: sha1:b45258b26ecf5b5f6578eeaf3e6fddd9264c753b + pristine_git_object: fba4a160d5490e4ae70eda660557ef7a36fda417 + src/mistralai/client/models/workfloweventbatchresponse.py: + id: 4cafe49944be + last_write_checksum: sha1:7d4b3a64acf8cc98b32b418adcb7a5141f731d9f + pristine_git_object: 0aa842a34158f4413232c76edc78a00b3e6fbbc9 + src/mistralai/client/models/workfloweventrequest.py: + id: f41edbb269a4 + last_write_checksum: sha1:bb6092cf910c2b77bb186dd62040d055bce5ac6b + pristine_git_object: 0a2c757947e654d257c5733f7f9e4a22e77bfe0a + src/mistralai/client/models/workfloweventresponse.py: + id: e1a984989f65 + last_write_checksum: sha1:0724ac05bed376ec722f376bc57ec8091ae70c6e + pristine_git_object: 4649da8096cc06140c7a910bce2cc16ad7d77101 + src/mistralai/client/models/workfloweventtype.py: + id: b4aeeb03b57a + last_write_checksum: sha1:451a78dadc17941f397d73ff83c14d552f7150d7 + pristine_git_object: 8c386b01b02e61266dd43f53c003571d5f3adcc8 + src/mistralai/client/models/workflowexecutioncanceledattributes.py: + id: c0802a5de5e5 + last_write_checksum: sha1:954a39fa24c0f24e603d66532fb18f31f9b06eec + pristine_git_object: 6c06bfa93bd601b4c2b6f5358d24045dc6fc3d5b + src/mistralai/client/models/workflowexecutioncanceledrequest.py: + id: 7bdfdeddd5c4 + last_write_checksum: sha1:08dd298674384fb349c1747dca0f386cba3bad06 + pristine_git_object: 09873446f6c24e77a6022a3120c9e3ea955338b5 + src/mistralai/client/models/workflowexecutioncanceledresponse.py: + id: bcc392d67222 + last_write_checksum: sha1:6fcd8350bcc05ff4eb87a3587bb8d2eefa11d227 + pristine_git_object: ee1c4e71acecff7f4a94078aae1560ca43c36e31 + src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py: + id: 9d69c2f471c1 + last_write_checksum: sha1:34cda256b1ebf0c40adbe926e1c45ec7882e145d + pristine_git_object: fb48a0fccf1ab5aabbb501e696d92aba0f5128a5 + src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py: + id: f831331b0eb1 + last_write_checksum: sha1:113cbedfc242da04a708e29b23a55742bc0de084 + pristine_git_object: 3afc8dcf36f4f5fea19263095c14b245b32b76f9 + src/mistralai/client/models/workflowexecutioncompletedrequest.py: + id: 54326e5805ed + last_write_checksum: sha1:bf8e762ca99b13534e3f5f1202b4a99b183f5916 + pristine_git_object: 81bde0f107733777aaa8330320aaa1c02ee57945 + src/mistralai/client/models/workflowexecutioncompletedresponse.py: + id: a1bec20dfb0e + last_write_checksum: sha1:c6c891ed6fdae6204c47d425e0391e2163f20a2e + pristine_git_object: 17716668a30d68aad23a98d312e965171ca71306 + src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py: + id: 8517ed95b5c7 + last_write_checksum: sha1:cdd83d80b7ce55f4b1258da0a47ef7b86ecfcc16 + pristine_git_object: 1aba37ae6d2b7b64e2b223143f7b18ba55ab3572 + src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py: + id: 2dd61dcd7b48 + last_write_checksum: sha1:e7737a3bb65c1ca887c0f28a1e18102d80755e04 + pristine_git_object: 943e5ebc979c9381d36e92e1e94d818bb17a83bf + src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py: + id: d1057d583b8c + last_write_checksum: sha1:6a114eb3f253654d038fe1d15712560f05527f91 + pristine_git_object: f8c9460423dcc8ca16e91542fe853f20930a7ae9 + src/mistralai/client/models/workflowexecutioncontinuedasnewresponse.py: + id: be26cd87dcb3 + last_write_checksum: sha1:4947f8cbfa73eae9607e252e85236894a34123d5 + pristine_git_object: 0f60a5be6324f370319e05b4a573e5cd157c0450 + src/mistralai/client/models/workflowexecutionfailedattributes.py: + id: dbb7fb36a4fd + last_write_checksum: sha1:d2922a566ccc93b7979cb9411ef46882606b76c7 + pristine_git_object: 1e61f3444594307656141cc999cf19f4d66763fa + src/mistralai/client/models/workflowexecutionfailedrequest.py: + id: 873155c8e314 + last_write_checksum: sha1:d050e259874c24a6812a0ee45f869b19b3d588ff + pristine_git_object: 5c4e445a6cc05804b7ce0c905c088922a1121d12 + src/mistralai/client/models/workflowexecutionfailedresponse.py: + id: a0836009f9de + last_write_checksum: sha1:07ea35829fb0411f39c019b42d17807d0aec02c2 + pristine_git_object: 687d33a9199612bbb8b5db5f6d2be2421469aeb5 + src/mistralai/client/models/workflowexecutionlistresponse.py: + id: c2b2e1ab4821 + last_write_checksum: sha1:e264605252d0dc594cafea0e4713015cfa7ca925 + pristine_git_object: 442ed9728bcf2c09fb051b892a7a226b7921e993 + src/mistralai/client/models/workflowexecutionprogresstraceevent.py: + id: 6ea7078aaca3 + last_write_checksum: sha1:5af64f5a2d76bde2a1a51e3b543db894c2045a44 + pristine_git_object: ffebdb82a1a80d1d086b919da9b33e2f090388c4 + src/mistralai/client/models/workflowexecutionrequest.py: + id: 806340497ed4 + last_write_checksum: sha1:43851e98d4c14ebdda88c5ab4412ae3a7a1d0002 + pristine_git_object: bf6a5fa0cddf979efb8ad32df77affac7f7156e8 + src/mistralai/client/models/workflowexecutionresponse.py: + id: 758786637be5 + last_write_checksum: sha1:2544bf94e8d64a9bd33f37ff4737f320fcd84733 + pristine_git_object: 84398375dde630f5aa2dd6363bb3fff43c1766f3 + src/mistralai/client/models/workflowexecutionstartedattributesrequest.py: + id: ee480cd77d79 + last_write_checksum: sha1:14e5ef6b80a358bf042e8ec64d2be5e78e214a90 + pristine_git_object: ff74345f2b305e6db8737bfa3991f00769462b90 + src/mistralai/client/models/workflowexecutionstartedattributesresponse.py: + id: d2276919a895 + last_write_checksum: sha1:5861816b3b992c9a7e2dd044b56307d677f2fc10 + pristine_git_object: 74e55c2977c6357077d414f799c59c7854fa2d08 + src/mistralai/client/models/workflowexecutionstartedrequest.py: + id: 15e73dddf8c4 + last_write_checksum: sha1:294047bce91d82283e0d5c929b169f280e3eb55d + pristine_git_object: 0ce8bbce27d48a88bfec92181eb190e5d1f29def + src/mistralai/client/models/workflowexecutionstartedresponse.py: + id: e1a597c911ea + last_write_checksum: sha1:9c761698883844061bf5cae76e3bc6444941124e + pristine_git_object: fa1e46a07b931f35b46324d9b2e5c111b359889d + src/mistralai/client/models/workflowexecutionstatus.py: + id: 56a16810d5de + last_write_checksum: sha1:71560f9e7a0222734e176a362d3188e703dfbbe2 + pristine_git_object: 611f3aa1ad149e30b577e5949be1e948c979d833 + src/mistralai/client/models/workflowexecutionsyncresponse.py: + id: ef77c54a11b5 + last_write_checksum: sha1:e89046ec323523aae1ef4fb9be7e19328ff84f01 + pristine_git_object: 6ed0f038c27085bbb8896b570dcc3302db137b90 + src/mistralai/client/models/workflowexecutiontraceevent.py: + id: 584e0a98082a + last_write_checksum: sha1:5de35701fd0bd92ec997603d1a6cb30c7597dd17 + pristine_git_object: f74cd5ab6aeadf662e90a46b394621a631602372 + src/mistralai/client/models/workflowexecutiontraceeventsresponse.py: + id: 94d92762ccb7 + last_write_checksum: sha1:2cf2e1cf393c7295af7b32194211b5ff41c6946e + pristine_git_object: 0c24a1eaeb338b14da62ed40a4a7e67e631e1589 + src/mistralai/client/models/workflowexecutiontraceotelresponse.py: + id: 7531bf461dc2 + last_write_checksum: sha1:eff6ffecd0fb5643747ef9f87c4c4a6a499c0035 + pristine_git_object: b4320b8324c712380acda8edbc1fedbe49954c73 + src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py: + id: 5e3448a39a40 + last_write_checksum: sha1:b9c8999af86024aaa6533aed348315326658354e + pristine_git_object: e288146db9dcaf3a7216c7e780f9c98ce75e85a3 + src/mistralai/client/models/workflowexecutiontracesummaryresponse.py: + id: 2ea199810f5f + last_write_checksum: sha1:9746a523ac969574417442960b8d814e04403e25 + pristine_git_object: d2cc7c6bdc90ed15e9091cf038e98762430d33af + src/mistralai/client/models/workflowexecutiontracesummaryspan.py: + id: 750353cbd052 + last_write_checksum: sha1:ba4f7ecc22fdd36aa3c11af5c1e434bb974d5786 + pristine_git_object: e80db90fe890726c75f711ea2b52b3008ef949ca + src/mistralai/client/models/workflowexecutionwithoutresultresponse.py: + id: dd70ba8def79 + last_write_checksum: sha1:38435a2f9f21037122a13e01d7f036fcfe266e5b + pristine_git_object: 082653c8e7fb5a6830e1457d629991cb9a9d4d56 + src/mistralai/client/models/workflowgetresponse.py: + id: 230f55a36ebf + last_write_checksum: sha1:935cfce50db82d85ac0e246736c8939bfb015da0 + pristine_git_object: ef1391c9367ed9adf371131c86045246fcee676d + src/mistralai/client/models/workflowlistresponse.py: + id: b255b05e7395 + last_write_checksum: sha1:194172c7c5140f090aa259608cd2d9ab8fd9cdf9 + pristine_git_object: a6497e825ed2dbdffde6072dc8e708e327c77129 + src/mistralai/client/models/workflowmetadata.py: + id: 0435707d6944 + last_write_checksum: sha1:141a99ae47e987fdfd9bc01c72170c9ad22fb412 + pristine_git_object: 597525395aac5d0704b45e09d8552366773a0b92 + src/mistralai/client/models/workflowmetrics.py: + id: 471fb1e10716 + last_write_checksum: sha1:0835e03836dc9f9bc0eeb953eb0fc42e25445183 + pristine_git_object: d80bb3db6cbc69404e22007a78bbef209c03c658 + src/mistralai/client/models/workflowregistration.py: + id: 2b937728c88b + last_write_checksum: sha1:1695e971dc6aeb546f3a35a8e47252aaa492fb1b + pristine_git_object: e23f9fb2987490d8ec3df97ec94f1190141c90c3 + src/mistralai/client/models/workflowregistrationgetresponse.py: + id: f063656f22ae + last_write_checksum: sha1:cc7b4d3b71ea8bb8ae452c6fd3e4acc710a18321 + pristine_git_object: 3105856d933d7fad615fa786f2c29a0d5705ac1a + src/mistralai/client/models/workflowregistrationlistresponse.py: + id: 3752e5b776db + last_write_checksum: sha1:ae185c4823954b7a7c8a43fbf4fd441ed02b3bd9 + pristine_git_object: e66f219b28849d7a49af7c764389e0d1d1ee7f37 + src/mistralai/client/models/workflowregistrationwithworkerstatus.py: + id: 23b661b9496f + last_write_checksum: sha1:a6b74946adb241437f4c2f40056a4b030ded1fc8 + pristine_git_object: c0d9a69e33992cd94755efa06df8a74406d9076f + src/mistralai/client/models/workflowschedulelistresponse.py: + id: e5247c5183bb + last_write_checksum: sha1:37cea2f0f3220331105f9454169f1ea49ed1b51a + pristine_git_object: 3c9eb3d7f445a0ec010340aeae788cf47e034628 + src/mistralai/client/models/workflowschedulerequest.py: + id: 2d8256704c6b + last_write_checksum: sha1:bac5dd140544747ebcd15a21da1df52303adaa17 + pristine_git_object: 2ded66b981775a0d60d04ca568bdc497373d2c04 + src/mistralai/client/models/workflowscheduleresponse.py: + id: c77172c4a9f6 + last_write_checksum: sha1:dd347319557279367f8ccde9158dec6c4586f528 + pristine_git_object: d74ba1dae81bccffa812df2a64babad0a61af787 + src/mistralai/client/models/workflowtaskfailedattributes.py: + id: c4c09c4d5ea7 + last_write_checksum: sha1:b1faee3ed43b88829ca68f5cd642f24d8f1fe9f5 + pristine_git_object: 49444347a46acf8f24c17a0f2b87c961c79efaca + src/mistralai/client/models/workflowtaskfailedrequest.py: + id: d26184215fe3 + last_write_checksum: sha1:bb5f93ed8c401aa0b285998d7c3791b0faa2a1c1 + pristine_git_object: 9075b0bcb3d3d34c044702a530834049fabc3654 + src/mistralai/client/models/workflowtaskfailedresponse.py: + id: a02b01867b7f + last_write_checksum: sha1:47813f0c9b611079c346d5d11a80fbf4a51a3164 + pristine_git_object: 154145e3604b09a202f51b60101ef166ed69a3ce + src/mistralai/client/models/workflowtasktimedoutattributes.py: + id: 43369570cb96 + last_write_checksum: sha1:dd30ece2ca4bd84318494f4f49ca63446677f6d4 + pristine_git_object: 1824990e1e9bf911e0dc422743268a97091576a7 + src/mistralai/client/models/workflowtasktimedoutrequest.py: + id: 70f37007e50f + last_write_checksum: sha1:f47efad477bcea8f80e03f26707c0c193d1b9b54 + pristine_git_object: 86a6bcdb3f18d2ee420783ac26c9eeb0d97fdb59 + src/mistralai/client/models/workflowtasktimedoutresponse.py: + id: 8b7540c47083 + last_write_checksum: sha1:6ecfe5907b5cdb05054b8e107977527a584e1b08 + pristine_git_object: 2c3350e09b75f1ebb212909f252cc48124a9997f + src/mistralai/client/models/workflowtype.py: + id: 01f37d193b17 + last_write_checksum: sha1:ec2cf5f7adb51eca3b7bbfc7cef89d4da473b11f + pristine_git_object: 67858c88fc20add975c7b7d6ae46a5f19a220ad8 + src/mistralai/client/models/workflowunarchiveresponse.py: + id: 30bdd050feac + last_write_checksum: sha1:b2cdd8c427160afb82a0137b3da1e8d6da0b6d0e + pristine_git_object: 16717856cc8c70d912af14920b4264b89f0ffc5c + src/mistralai/client/models/workflowupdaterequest.py: + id: 8f3878d3c7c7 + last_write_checksum: sha1:d2aaea5e39fbdb61036b65f2c8a303786f62cf83 + pristine_git_object: 480fa47dee918e3fc7b49246322aa258b791ca05 + src/mistralai/client/models/workflowupdateresponse.py: + id: 0ae165cc7a82 + last_write_checksum: sha1:21b4509ca190bc1abf18b318ae502faf24408184 + pristine_git_object: 3336e448baf9f21cf5bfd1369e6268ea3a7d5e24 + src/mistralai/client/models/workflowwithworkerstatus.py: + id: e1055203af7d + last_write_checksum: sha1:57d7ac9a4e19ddb50d8dad4c2d68695c1c2acbb7 + pristine_git_object: 7f469007b8ceb86f2d4faa09d3335ac874a6fe24 src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 @@ -4379,10 +6017,18 @@ trackedFiles: id: 10f90c990bd8 last_write_checksum: sha1:47018c027eb2c9d9235f399b939073e396bd52ad pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c + src/mistralai/client/runs.py: + id: 4297d58aeb21 + last_write_checksum: sha1:779390755335dda530d2e563bbcf38e5ea161009 + pristine_git_object: 01b667cf9daf9ea37064f8e489fb45f84c87f203 + src/mistralai/client/schedules.py: + id: d3b4fe452390 + last_write_checksum: sha1:74a1455c5ba17253d2e878f638b7314edca66e21 + pristine_git_object: d6f2e5ff1a4c985acc48e1ea540537fbcf4bf92d src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:3520e3487aeacdaf5abd24839e76bb98f1e20b93 - pristine_git_object: 52fc5d9ae1a15a241bd8cf76c29a616bffcb36cd + last_write_checksum: sha1:a606046063cd946633918efa1662846c987c9b7e + pristine_git_object: 03338f46bd3d32f1770ed9b6e4d30f9d707867df src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e @@ -4481,8 +6127,16 @@ trackedFiles: pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c src/mistralai/client/voices.py: id: ab76b1377d79 - last_write_checksum: sha1:3acbc4b91444895e83e96fea25cac00b3d327a5b - pristine_git_object: 68d4bb5bde46804664ecdc8866621236af089002 + last_write_checksum: sha1:a71af619fe7d44cb4e537b739cf3ae71d1f8da68 + pristine_git_object: 2d57185746c0b2deee7c614c69a528c4a6565ee7 + src/mistralai/client/workflows.py: + id: e2a0381191f6 + last_write_checksum: sha1:95e516c32702cfcf121f8278fcaf1bf6f5847c76 + pristine_git_object: e2de6524a730c7c0d1877e51dac901e354c4c201 + src/mistralai/client/workflows_events.py: + id: 6d4f674ce8ef + last_write_checksum: sha1:3c9d60fa7c49e547a25ae62b941cae7a5437c21c + pristine_git_object: 03df3f78288f2b3263bf1ed5ce7aa3a8d138d0f0 examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -5013,9 +6667,15 @@ examples: application/json: {"pages": [{"index": 1, "markdown": "# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-DISTRIBUTION PERFORMANCE\nSaurabh Garg*
Carnegie Mellon University
sgarg2@andrew.cmu.edu
Sivaraman Balakrishnan
Carnegie Mellon University
sbalakri@andrew.cmu.edu
Zachary C. Lipton
Carnegie Mellon University
zlipton@andrew.cmu.edu\n## Behnam Neyshabur\nGoogle Research, Blueshift team
neyshabur@google.com\nHanie Sedghi
Google Research, Brain team
hsedghi@google.com\n#### Abstract\nReal-world machine learning deployments are characterized by mismatches between the source (training) and target (test) distributions that may cause performance drops. In this work, we investigate methods for predicting the target domain accuracy using only labeled source data and unlabeled target data. We propose Average Thresholded Confidence (ATC), a practical method that learns a threshold on the model's confidence, predicting accuracy as the fraction of unlabeled examples for which model confidence exceeds that threshold. ATC outperforms previous methods across several model architectures, types of distribution shifts (e.g., due to synthetic corruptions, dataset reproduction, or novel subpopulations), and datasets (WILDS, ImageNet, BREEDS, CIFAR, and MNIST). In our experiments, ATC estimates target performance $2-4 \\times$ more accurately than prior methods. We also explore the theoretical foundations of the problem, proving that, in general, identifying the accuracy is just as hard as identifying the optimal predictor and thus, the efficacy of any method rests upon (perhaps unstated) assumptions on the nature of the shift. Finally, analyzing our method on some toy distributions, we provide insights concerning when it works ${ }^{1}$.\n## 1 INTRODUCTION\nMachine learning models deployed in the real world typically encounter examples from previously unseen distributions. While the IID assumption enables us to evaluate models using held-out data from the source distribution (from which training data is sampled), this estimate is no longer valid in presence of a distribution shift. Moreover, under such shifts, model accuracy tends to degrade (Szegedy et al., 2014; Recht et al., 2019; Koh et al., 2021). Commonly, the only data available to the practitioner are a labeled training set (source) and unlabeled deployment-time data which makes the problem more difficult. In this setting, detecting shifts in the distribution of covariates is known to be possible (but difficult) in theory (Ramdas et al., 2015), and in practice (Rabanser et al., 2018). However, producing an optimal predictor using only labeled source and unlabeled target data is well-known to be impossible absent further assumptions (Ben-David et al., 2010; Lipton et al., 2018).\nTwo vital questions that remain are: (i) the precise conditions under which we can estimate a classifier's target-domain accuracy; and (ii) which methods are most practically useful. To begin, the straightforward way to assess the performance of a model under distribution shift would be to collect labeled (target domain) examples and then to evaluate the model on that data. However, collecting fresh labeled data from the target distribution is prohibitively expensive and time-consuming, especially if the target distribution is non-stationary. Hence, instead of using labeled data, we aim to use unlabeled data from the target distribution, that is comparatively abundant, to predict model performance. Note that in this work, our focus is not to improve performance on the target but, rather, to estimate the accuracy on the target for a given classifier.\n[^0]: Work done in part while Saurabh Garg was interning at Google ${ }^{1}$ Code is available at [https://github.com/saurabhgarg1996/ATC_code](https://github.com/saurabhgarg1996/ATC_code).\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 2, "markdown": "![img-0.jpeg](img-0.jpeg)\nFigure 1: Illustration of our proposed method ATC. Left: using source domain validation data, we identify a threshold on a score (e.g. negative entropy) computed on model confidence such that fraction of examples above the threshold matches the validation set accuracy. ATC estimates accuracy on unlabeled target data as the fraction of examples with the score above the threshold. Interestingly, this threshold yields accurate estimates on a wide set of target distributions resulting from natural and synthetic shifts. Right: Efficacy of ATC over previously proposed approaches on our testbed with a post-hoc calibrated model. To obtain errors on the same scale, we rescale all errors with Average Confidence (AC) error. Lower estimation error is better. See Table 1 for exact numbers and comparison on various types of distribution shift. See Sec. 5 for details on our testbed.\nRecently, numerous methods have been proposed for this purpose (Deng & Zheng, 2021; Chen et al., 2021b; Jiang et al., 2021; Deng et al., 2021; Guillory et al., 2021). These methods either require calibration on the target domain to yield consistent estimates (Jiang et al., 2021; Guillory et al., 2021) or additional labeled data from several target domains to learn a linear regression function on a distributional distance that then predicts model performance (Deng et al., 2021; Deng & Zheng, 2021; Guillory et al., 2021). However, methods that require calibration on the target domain typically yield poor estimates since deep models trained and calibrated on source data are not, in general, calibrated on a (previously unseen) target domain (Ovadia et al., 2019). Besides, methods that leverage labeled data from target domains rely on the fact that unseen target domains exhibit strong linear correlation with seen target domains on the underlying distance measure and, hence, can be rendered ineffective when such target domains with labeled data are unavailable (in Sec. 5.1 we demonstrate such a failure on a real-world distribution shift problem). Therefore, throughout the paper, we assume access to labeled source data and only unlabeled data from target domain(s).\nIn this work, we first show that absent assumptions on the source classifier or the nature of the shift, no method of estimating accuracy will work generally (even in non-contrived settings). To estimate accuracy on target domain perfectly, we highlight that even given perfect knowledge of the labeled source distribution (i.e., $p_{s}(x, y)$ ) and unlabeled target distribution (i.e., $p_{t}(x)$ ), we need restrictions on the nature of the shift such that we can uniquely identify the target conditional $p_{t}(y \\mid x)$. Thus, in general, identifying the accuracy of the classifier is as hard as identifying the optimal predictor.\nSecond, motivated by the superiority of methods that use maximum softmax probability (or logit) of a model for Out-Of-Distribution (OOD) detection (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019), we propose a simple method that leverages softmax probability to predict model performance. Our method, Average Thresholded Confidence (ATC), learns a threshold on a score (e.g., maximum confidence or negative entropy) of model confidence on validation source data and predicts target domain accuracy as the fraction of unlabeled target points that receive a score above that threshold. ATC selects a threshold on validation source data such that the fraction of source examples that receive the score above the threshold match the accuracy of those examples. Our primary contribution in ATC is the proposal of obtaining the threshold and observing its efficacy on (practical) accuracy estimation. Importantly, our work takes a step forward in positively answering the question raised in Deng & Zheng (2021); Deng et al. (2021) about a practical strategy to select a threshold that enables accuracy prediction with thresholded model confidence.\n", "images": [{"id": "img-0.jpeg", "top_left_x": 292, "top_left_y": 217, "bottom_right_x": 1405, "bottom_right_y": 649, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 3, "markdown": "", "images": [], "dimensions": {"dpi": 539192, "height": 944919, "width": 247256}}, {"index": 27, "markdown": "![img-8.jpeg](img-8.jpeg)\nFigure 9: Scatter plot of predicted accuracy versus (true) OOD accuracy for vision datasets except MNIST with a ResNet50 model. Results reported by aggregating MAE numbers over 4 different seeds.\n", "images": [{"id": "img-8.jpeg", "top_left_x": 290, "top_left_y": 226, "bottom_right_x": 1405, "bottom_right_y": 1834, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 28, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 6.60 | 5.74 | 9.88 | 6.89 | 7.25 | 6.07 | 4.77 | 3.21 | 3.02 | 2.99 | 2.85 | | | | (0.35) | (0.30) | (0.16) | (0.13) | (0.15) | (0.16) | (0.13) | (0.49) | (0.40) | (0.37) | (0.29) | | | Synthetic | 12.33 | 10.20 | 16.50 | 11.91 | 13.87 | 11.08 | 6.55 | 4.65 | 4.25 | 4.21 | 3.87 | | | | (0.51) | (0.48) | (0.26) | (0.17) | (0.18) | (0.17) | (0.35) | (0.55) | (0.55) | (0.55) | (0.75) | | CIFAR100 | Synthetic | 13.69 | 11.51 | 23.61 | 13.10 | 14.60 | 10.14 | 9.85 | 5.50 | 4.75 | 4.72 | 4.94 | | | | (0.55) | (0.41) | (1.16) | (0.80) | (0.77) | (0.64) | (0.57) | (0.70) | (0.73) | (0.74) | (0.74) | | ImageNet200 | Natural | 12.37 | 8.19 | 22.07 | 8.61 | 15.17 | 7.81 | 5.13 | 4.37 | 2.04 | 3.79 | 1.45 | | | | (0.25) | (0.33) | (0.08) | (0.25) | (0.11) | (0.29) | (0.08) | (0.39) | (0.24) | (0.30) | (0.27) | | | Synthetic | 19.86 | 12.94 | 32.44 | 13.35 | 25.02 | 12.38 | 5.41 | 5.93 | 3.09 | 5.00 | 2.68 | | | | (1.38) | (1.81) | (1.00) | (1.30) | (1.10) | (1.38) | (0.89) | (1.38) | (0.87) | (1.28) | (0.45) | | ImageNet | Natural | 7.77 | 6.50 | 18.13 | 6.02 | 8.13 | 5.76 | 6.23 | 3.88 | 2.17 | 2.06 | 0.80 | | | | (0.27) | (0.33) | (0.23) | (0.34) | (0.27) | (0.37) | (0.41) | (0.53) | (0.62) | (0.54) | (0.44) | | | Synthetic | 13.39 | 10.12 | 24.62 | 8.51 | 13.55 | 7.90 | 6.32 | 3.34 | 2.53 | 2.61 | 4.89 | | | | (0.53) | (0.63) | (0.64) | (0.71) | (0.61) | (0.72) | (0.33) | (0.53) | (0.36) | (0.33) | (0.83) | | FMoW-WILDS | Natural | 5.53 | 4.31 | 33.53 | 12.84 | 5.94 | 4.45 | 5.74 | 3.06 | 2.70 | 3.02 | 2.72 | | | | (0.33) | (0.63) | (0.13) | (12.06) | (0.36) | (0.77) | (0.55) | (0.36) | (0.54) | (0.35) | (0.44) | | RxRx1-WILDS | Natural | 5.80 | 5.72 | 7.90 | 4.84 | 5.98 | 5.98 | 6.03 | 4.66 | 4.56 | 4.41 | 4.47 | | | | (0.17) | (0.15) | (0.24) | (0.09) | (0.15) | (0.13) | (0.08) | (0.38) | (0.38) | (0.31) | (0.26) | | Amazon-WILDS | Natural | 2.40 | 2.29 | 8.01 | 2.38 | 2.40 | 2.28 | 17.87 | 1.65 | 1.62 | 1.60 | 1.59 | | | | (0.08) | (0.09) | (0.53) | (0.17) | (0.09) | (0.09) | (0.18) | (0.06) | (0.05) | (0.14) | (0.15) | | CivilCom.-WILDS | Natural | 12.64 | 10.80 | 16.76 | 11.03 | 13.31 | 10.99 | 16.65 | | 7.14 | | | | | | (0.52) | (0.48) | (0.53) | (0.49) | (0.52) | (0.49) | (0.25) | | (0.41) | | | | MNIST | Natural | 18.48 | 15.99 | 21.17 | 14.81 | 20.19 | 14.56 | 24.42 | 5.02 | 2.40 | 3.14 | 3.50 | | | | (0.45) | (1.53) | (0.24) | (3.89) | (0.23) | (3.47) | (0.41) | (0.44) | (1.83) | (0.49) | (0.17) | | ENTITY-13 | Same | 16.23 | 11.14 | 24.97 | 10.88 | 19.08 | 10.47 | 10.71 | 5.39 | 3.88 | 4.58 | 4.19 | | | | (0.77) | (0.65) | (0.70) | (0.77) | (0.65) | (0.72) | (0.74) | (0.92) | (0.61) | (0.85) | (0.16) | | | Novel | 28.53 | 22.02 | 38.33 | 21.64 | 32.43 | 21.22 | 20.61 | 13.58 | 10.28 | 12.25 | 6.63 | | | | (0.82) | (0.68) | (0.75) | (0.86) | (0.69) | (0.80) | (0.60) | (1.15) | (1.34) | (1.21) | (0.93) | | ENTITY-30 | Same | 18.59 | 14.46 | 28.82 | 14.30 | 21.63 | 13.46 | 12.92 | 9.12 | 7.75 | 8.15 | 7.64 | | | | (0.51) | (0.52) | (0.43) | (0.71) | (0.37) | (0.59) | (0.14) | (0.62) | (0.72) | (0.68) | (0.88) | | | Novel | 32.34 | 26.85 | 44.02 | 26.27 | 36.82 | 25.42 | 23.16 | 17.75 | 14.30 | 15.60 | 10.57 | | | | (0.60) | (0.58) | (0.56) | (0.79) | (0.47) | (0.68) | (0.12) | (0.76) | (0.85) | (0.86) | (0.86) | | NONLIVING-26 | Same | 18.66 | 17.17 | 26.39 | 16.14 | 19.86 | 15.58 | 16.63 | 10.87 | 10.24 | 10.07 | 10.26 | | | | (0.76) | (0.74) | (0.82) | (0.81) | (0.67) | (0.76) | (0.45) | (0.98) | (0.83) | (0.92) | (1.18) | | | Novel | 33.43 | 31.53 | 41.66 | 29.87 | 35.13 | 29.31 | 29.56 | 21.70 | 20.12 | 19.08 | 18.26 | | | | (0.67) | (0.65) | (0.67) | (0.71) | (0.54) | (0.64) | (0.21) | (0.86) | (0.75) | (0.82) | (1.12) | | LIVING-17 | Same | 12.63 | 11.05 | 18.32 | 10.46 | 14.43 | 10.14 | 9.87 | 4.57 | 3.95 | 3.81 | 4.21 | | | | (1.25) | (1.20) | (1.01) | (1.12) | (1.11) | (1.16) | (0.61) | (0.71) | (0.48) | (0.22) | (0.53) | | | Novel | 29.03 | 26.96 | 35.67 | 26.11 | 31.73 | 25.73 | 23.53 | 16.15 | 14.49 | 12.97 | 11.39 | | | | (1.44) | (1.38) | (1.09) | (1.27) | (1.19) | (1.35) | (0.52) | (1.36) | (1.46) | (1.52) | (1.72) |\nTable 3: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. For language datasets, we use DistilBERT-base-uncased, for vision dataset we report results with DenseNet model with the exception of MNIST where we use FCN. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 29, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 7.14 | 6.20 | 10.25 | 7.06 | 7.68 | 6.35 | 5.74 | 4.02 | 3.85 | 3.76 | 3.38 | | | | (0.14) | (0.11) | (0.31) | (0.33) | (0.28) | (0.27) | (0.25) | (0.38) | (0.30) | (0.33) | (0.32) | | | Synthetic | 12.62 | 10.75 | 16.50 | 11.91 | 13.93 | 11.20 | 7.97 | 5.66 | 5.03 | 4.87 | 3.63 | | | | (0.76) | (0.71) | (0.28) | (0.24) | (0.29) | (0.28) | (0.13) | (0.64) | (0.71) | (0.71) | (0.62) | | CIFAR100 | Synthetic | 12.77 | 12.34 | 16.89 | 12.73 | 11.18 | 9.63 | 12.00 | 5.61 | 5.55 | 5.65 | 5.76 | | | | (0.43) | (0.68) | (0.20) | (2.59) | (0.35) | (1.25) | (0.48) | (0.51) | (0.55) | (0.35) | (0.27) | | ImageNet200 | Natural | 12.63 | 7.99 | 23.08 | 7.22 | 15.40 | 6.33 | 5.00 | 4.60 | 1.80 | 4.06 | 1.38 | | | | (0.59) | (0.47) | (0.31) | (0.22) | (0.42) | (0.24) | (0.36) | (0.63) | (0.17) | (0.69) | (0.29) | | | Synthetic | 20.17 | 11.74 | 33.69 | 9.51 | 25.49 | 8.61 | 4.19 | 5.37 | 2.78 | 4.53 | 3.58 | | | | (0.74) | (0.80) | (0.73) | (0.51) | (0.66) | (0.50) | (0.14) | (0.88) | (0.23) | (0.79) | (0.33) | | ImageNet | Natural | 8.09 | 6.42 | 21.66 | 5.91 | 8.53 | 5.21 | 5.90 | 3.93 | 1.89 | 2.45 | 0.73 | | | | (0.25) | (0.28) | (0.38) | (0.22) | (0.26) | (0.25) | (0.44) | (0.26) | (0.21) | (0.16) | (0.10) | | | Synthetic | 13.93 | 9.90 | 28.05 | 7.56 | 13.82 | 6.19 | 6.70 | 3.33 | 2.55 | 2.12 | 5.06 | | | | (0.14) | (0.23) | (0.39) | (0.13) | (0.31) | (0.07) | (0.52) | (0.25) | (0.25) | (0.31) | (0.27) | | FMoW-WILDS | Natural | 5.15 | 3.55 | 34.64 | 5.03 | 5.58 | 3.46 | 5.08 | 2.59 | 2.33 | 2.52 | 2.22 | | | | (0.19) | (0.41) | (0.22) | (0.29) | (0.17) | (0.37) | (0.46) | (0.32) | (0.28) | (0.25) | (0.30) | | RxRx1-WILDS | Natural | 6.17 | 6.11 | 21.05 | 5.21 | 6.54 | 6.27 | 6.82 | 5.30 | 5.20 | 5.19 | 5.63 | | | | (0.20) | (0.24) | (0.31) | (0.18) | (0.21) | (0.20) | (0.31) | (0.30) | (0.44) | (0.43) | (0.55) | | Entity-13 | Same | 18.32 | 14.38 | 27.79 | 13.56 | 20.50 | 13.22 | 16.09 | 9.35 | 7.50 | 7.80 | 6.94 | | | | (0.29) | (0.53) | (1.18) | (0.58) | (0.47) | (0.58) | (0.84) | (0.79) | (0.65) | (0.62) | (0.71) | | | Novel | 28.82 | 24.03 | 38.97 | 22.96 | 31.66 | 22.61 | 25.26 | 17.11 | 13.96 | 14.75 | 9.94 | | | | (0.30) | (0.55) | (1.32) | (0.59) | (0.54) | (0.58) | (1.08) | (0.93) | (0.64) | (0.78) | | | Entity-30 | Same | 16.91 | 14.61 | 26.84 | 14.37 | 18.60 | 13.11 | 13.74 | 8.54 | 7.94 | 7.77 | 8.04 | | | | (1.33) | (1.11) | (2.15) | (1.34) | (1.69) | (1.30) | (1.07) | (1.47) | (1.38) | (1.44) | (1.51) | | | Novel | 28.66 | 25.83 | 39.21 | 25.03 | 30.95 | 23.73 | 23.15 | 15.57 | 13.24 | 12.44 | 11.05 | | | | (1.16) | (0.88) | (2.03) | (1.11) | (1.64) | (1.11) | (0.51) | (1.44) | (1.15) | (1.26) | (1.13) | | NonLIVING-26 | Same | 17.43 | 15.95 | 27.70 | 15.40 | 18.06 | 14.58 | 16.99 | 10.79 | 10.13 | 10.05 | 10.29 | | | | (0.90) | (0.86) | (0.90) | (0.69) | (1.00) | (0.78) | (1.25) | (0.62) | (0.32) | (0.46) | (0.79) | | | Novel | 29.51 | 27.75 | 40.02 | 26.77 | 30.36 | 25.93 | 27.70 | 19.64 | 17.75 | 16.90 | 15.69 | | | | (0.86) | (0.82) | (0.76) | (0.82) | (0.95) | (0.80) | (1.42) | (0.68) | (0.53) | (0.60) | (0.83) | | LIVING-17 | Same | 14.28 | 12.21 | 23.46 | 11.16 | 15.22 | 10.78 | 10.49 | 4.92 | 4.23 | 4.19 | 4.73 | | | | (0.96) | (0.93) | (1.16) | (0.90) | (0.96) | (0.99) | (0.97) | (0.57) | (0.42) | (0.35) | (0.24) | | | Novel | 28.91 | 26.35 | 38.62 | 24.91 | 30.32 | 24.52 | 22.49 | 15.42 | 13.02 | 12.29 | 10.34 | | | | (0.66) | (0.73) | (1.01) | (0.61) | (0.59) | (0.74) | (0.85) | (0.59) | (0.53) | (0.73) | (0.62) |\nTable 4: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift for ResNet model. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}], "model": "mistral-ocr-2503-completion", "usage_info": {"pages_processed": 29, "doc_size_bytes": null}} libraries_list_v1: speakeasy-default-libraries-list-v1: + parameters: + query: + page_size: 100 + page: 0 responses: "200": - application/json: {"data": [{"id": "bfc452fd-4bcb-46ec-9f68-ceea101e924d", "name": "", "created_at": "2024-01-31T13:50:47.409Z", "updated_at": "2023-04-09T15:28:24.261Z", "owner_id": "3fb92cf9-0fea-44d0-958f-16963601a1f0", "owner_type": "", "total_size": 811051, "nb_documents": 634577, "chunk_size": 502060}]} + application/json: {"pagination": {"total_items": 935461, "total_pages": 720493, "current_page": 981761, "page_size": 755545, "has_more": true}, "data": [{"id": "bfc452fd-4bcb-46ec-9f68-ceea101e924d", "name": "", "created_at": "2024-01-31T13:50:47.409Z", "updated_at": "2023-04-09T15:28:24.261Z", "owner_id": "3fb92cf9-0fea-44d0-958f-16963601a1f0", "owner_type": "", "total_size": 811051, "nb_documents": 634577, "chunk_size": 502060}]} + "422": + application/json: {} libraries_create_v1: speakeasy-default-libraries-create-v1: requestBody: @@ -6429,6 +8089,7 @@ examples: query: limit: 10 offset: 0 + type: "all" responses: "200": application/json: {"items": [{"name": "", "retention_notice": 30, "id": "c29472e8-7047-4227-ab06-14ac147f1ac9", "created_at": "2025-04-29T05:19:27.779Z", "user_id": ""}], "total": 911345, "page": 575844, "page_size": 996146, "total_pages": 441415} @@ -6500,11 +8161,388 @@ examples: application/json: [{}] "422": application/json: {} + jobs_api_routes_batch_delete_batch_job: + speakeasy-default-jobs-api-routes-batch-delete-batch-job: + parameters: + path: + job_id: "d9e71426-5791-49ad-b8d1-cf0d90d1b7d0" + responses: + "200": + application/json: {"id": "", "object": "batch", "deleted": true} + get_workflows_v1_workflows_get: + speakeasy-default-get-workflows-v1-workflows-get: + parameters: + query: + active_only: false + include_shared: true + limit: 50 + responses: + "200": + application/json: {"workflows": [], "next_cursor": "d354b4ce-6ab4-45a8-93bc-a2df586c46d4"} + "422": + application/json: {} + get_workflow_registrations_v1_workflows_registrations_get: + speakeasy-default-get-workflow-registrations-v1-workflows-registrations-get: + parameters: + query: + active_only: false + include_shared: true + with_workflow: false + limit: 50 + responses: + "200": + application/json: {"workflow_registrations": [], "next_cursor": "6b512fbb-9584-4ea5-bfdb-e90316f436fd", "workflow_versions": [{"id": "e6e0d049-e303-4710-bda9-61cd5196b1ec", "task_queue": "", "definition": {"input_schema": {"key": "", "key1": ""}, "enforce_determinism": false}, "workflow_id": "96d7cee5-611b-4a26-82d8-3e6c84cc894d", "compatible_with_chat_assistant": false}]} + "422": + application/json: {} + execute_workflow_v1_workflows__workflow_identifier__execute_post: + speakeasy-default-execute-workflow-v1-workflows-workflow-identifier-execute-post: + parameters: + path: + workflow_identifier: "" + requestBody: + application/json: {"wait_for_result": false} + responses: + "200": + application/json: {"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "RUNNING", "start_time": "2026-01-16T18:23:52.214Z", "end_time": "2026-06-24T19:55:56.410Z", "result": ""} + "422": + application/json: {} + execute_workflow_registration_v1_workflows_registrations__workflow_registration_id__execute_post: + speakeasy-default-execute-workflow-registration-v1-workflows-registrations-workflow-registration-id-execute-post: + parameters: + path: + workflow_registration_id: "de11d76a-e0fb-44dd-abd9-2e75fc275b94" + requestBody: + application/json: {"wait_for_result": false} + responses: + "200": + application/json: {"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "RETRYING_AFTER_ERROR", "start_time": "2025-02-03T00:07:08.284Z", "end_time": "2024-01-22T11:44:36.909Z", "result": ""} + "422": + application/json: {} + get_workflow_v1_workflows__workflow_identifier__get: + speakeasy-default-get-workflow-v1-workflows-workflow-identifier-get: + parameters: + path: + workflow_identifier: "" + responses: + "200": + application/json: {"workflow": {"id": "7e6d5999-1f66-4311-8059-f056ead70099", "name": "", "display_name": "Clifton98", "type": "code", "customer_id": "7882a879-b763-4980-9480-235734fdf4f4", "workspace_id": "5be5bb5a-4e28-453d-b0f5-a506f3a5cd58", "available_in_chat_assistant": false, "is_technical": false, "archived": false, "active": true}} + "422": + application/json: {} + update_workflow_v1_workflows__workflow_identifier__put: + speakeasy-default-update-workflow-v1-workflows-workflow-identifier-put: + parameters: + path: + workflow_identifier: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"workflow": {"id": "db975768-c873-461d-b3e8-6f22f94c0b20", "name": "", "display_name": "Marilie.Keeling", "type": "code", "customer_id": "89b5718e-e6ee-4eb2-b9bd-53c5f9c1222a", "workspace_id": "2ddcd2cb-4f9d-4897-b286-e08bd0fbd54b", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + "422": + application/json: {} + get_workflow_registration_v1_workflows_registrations__workflow_registration_id__get: + speakeasy-default-get-workflow-registration-v1-workflows-registrations-workflow-registration-id-get: + parameters: + path: + workflow_registration_id: "c4d86c40-960f-4e9a-9d6f-ad8342d7aa83" + query: + with_workflow: false + include_shared: true + responses: + "200": + application/json: {"workflow_registration": {"id": "db19a749-c9a8-4fc8-a04b-540b6b648c8f", "task_queue": "", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "78b8c35a-8488-497f-80f4-8fef6fbbd4ad", "compatible_with_chat_assistant": false, "active": false}, "workflow_version": {"id": "e35a35c7-8a69-4bf2-a597-e2b0916c4c5e", "task_queue": "", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "2238d5fa-45be-48d4-9705-a1852ab34b83", "compatible_with_chat_assistant": false, "active": false}} + "422": + application/json: {} + archive_workflow_v1_workflows__workflow_identifier__archive_put: + speakeasy-default-archive-workflow-v1-workflows-workflow-identifier-archive-put: + parameters: + path: + workflow_identifier: "" + responses: + "200": + application/json: {"workflow": {"id": "5efd36dc-5de7-4708-a17b-492eb93650e0", "name": "", "display_name": "Torrey_Rippin32", "type": "code", "customer_id": "93950b7e-25cf-45e9-9e16-558ac052306e", "workspace_id": "61923af7-6896-4605-9c48-c7d3cacb4732", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + "422": + application/json: {} + unarchive_workflow_v1_workflows__workflow_identifier__unarchive_put: + speakeasy-default-unarchive-workflow-v1-workflows-workflow-identifier-unarchive-put: + parameters: + path: + workflow_identifier: "" + responses: + "200": + application/json: {"workflow": {"id": "779e3e34-c64a-493c-bcbe-6d70947147e9", "name": "", "display_name": "Hal56", "type": "code", "customer_id": "f4fbcccc-06b3-4d08-9101-3035a013990a", "workspace_id": "ded5993d-1646-4bdb-a4ba-6b4280e38716", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + "422": + application/json: {} + get_workflow_execution_v1_workflows_executions__execution_id__get: + speakeasy-default-get-workflow-execution-v1-workflows-executions-execution-id-get: + parameters: + path: + execution_id: "" + responses: + "200": + application/json: {"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "FAILED", "start_time": "2026-01-17T01:48:54.055Z", "end_time": "2024-04-12T09:56:57.081Z", "result": ""} + "422": + application/json: {} + get_workflow_execution_history_v1_workflows_executions__execution_id__history_get: + speakeasy-default-get-workflow-execution-history-v1-workflows-executions-execution-id-history-get: + parameters: + path: + execution_id: "" + responses: + "200": + application/json: "" + "422": + application/json: {} + signal_workflow_execution_v1_workflows_executions__execution_id__signals_post: + speakeasy-default-signal-workflow-execution-v1-workflows-executions-execution-id-signals-post: + parameters: + path: + execution_id: "" + requestBody: + application/json: {"name": ""} + responses: + "202": + application/json: {"message": "Signal accepted"} + "422": + application/json: {} + query_workflow_execution_v1_workflows_executions__execution_id__queries_post: + speakeasy-default-query-workflow-execution-v1-workflows-executions-execution-id-queries-post: + parameters: + path: + execution_id: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"query_name": "", "result": ""} + "422": + application/json: {} + terminate_workflow_execution_v1_workflows_executions__execution_id__terminate_post: + speakeasy-default-terminate-workflow-execution-v1-workflows-executions-execution-id-terminate-post: + parameters: + path: + execution_id: "" + responses: + "422": + application/json: {} + batch_terminate_workflow_executions_v1_workflows_executions_terminate_post: + speakeasy-default-batch-terminate-workflow-executions-v1-workflows-executions-terminate-post: + requestBody: + application/json: {"execution_ids": ["", ""]} + responses: + "200": + application/json: {} + "422": + application/json: {} + cancel_workflow_execution_v1_workflows_executions__execution_id__cancel_post: + speakeasy-default-cancel-workflow-execution-v1-workflows-executions-execution-id-cancel-post: + parameters: + path: + execution_id: "" + responses: + "422": + application/json: {} + batch_cancel_workflow_executions_v1_workflows_executions_cancel_post: + speakeasy-default-batch-cancel-workflow-executions-v1-workflows-executions-cancel-post: + requestBody: + application/json: {"execution_ids": []} + responses: + "200": + application/json: {} + "422": + application/json: {} + reset_workflow_v1_workflows_executions__execution_id__reset_post: + speakeasy-default-reset-workflow-v1-workflows-executions-execution-id-reset-post: + parameters: + path: + execution_id: "" + requestBody: + application/json: {"event_id": 24149, "exclude_signals": false, "exclude_updates": false} + responses: + "422": + application/json: {} + update_workflow_execution_v1_workflows_executions__execution_id__updates_post: + speakeasy-default-update-workflow-execution-v1-workflows-executions-execution-id-updates-post: + parameters: + path: + execution_id: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"update_name": "", "result": ""} + "422": + application/json: {} + get_workflow_execution_trace_otel: + speakeasy-default-get-workflow-execution-trace-otel: + parameters: + path: + execution_id: "" + responses: + "200": + application/json: {"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "COMPLETED", "start_time": "2025-04-04T13:52:04.739Z", "end_time": "2025-01-16T05:22:56.752Z", "result": "", "data_source": ""} + "422": + application/json: {} + get_workflow_execution_trace_summary: + speakeasy-default-get-workflow-execution-trace-summary: + parameters: + path: + execution_id: "" + responses: + "200": + application/json: {"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "COMPLETED", "start_time": "2026-02-04T14:37:36.534Z", "end_time": "2024-12-18T03:10:33.223Z", "result": ""} + "422": + application/json: {} + get_workflow_execution_trace_events: + speakeasy-default-get-workflow-execution-trace-events: + parameters: + path: + execution_id: "" + query: + merge_same_id_events: false + include_internal_events: false + responses: + "200": + application/json: {"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": null, "start_time": "2025-11-12T16:59:23.068Z", "end_time": "2024-06-18T15:20:19.798Z", "result": ""} + "422": + application/json: {} + stream_v1_workflows_executions__execution_id__stream_get: + speakeasy-default-stream-v1-workflows-executions-execution-id-stream-get: + parameters: + path: + execution_id: "" + responses: + "422": + application/json: {} + get_workflow_metrics_v1_workflows__workflow_name__metrics_get: + speakeasy-default-get-workflow-metrics-v1-workflows-workflow-name-metrics-get: + parameters: + path: + workflow_name: "" + responses: + "200": + application/json: {"execution_count": {"value": 1600.39}, "success_count": {"value": 926320}, "error_count": {"value": 375789}, "average_latency_ms": {"value": 6385.25}, "latency_over_time": {"value": [[695318], [530573]]}, "retry_rate": {"value": 4629.08}} + "422": + application/json: {} + list_runs_v1_workflows_runs_get: + speakeasy-default-list-runs-v1-workflows-runs-get: + parameters: + query: + page_size: 50 + responses: + "200": + application/json: {"executions": [{"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "CONTINUED_AS_NEW", "start_time": "2025-04-05T20:23:16.180Z", "end_time": "2025-07-01T00:28:44.234Z"}]} + "422": + application/json: {} + get_run_v1_workflows_runs__run_id__get: + speakeasy-default-get-run-v1-workflows-runs-run-id-get: + parameters: + path: + run_id: "553b071e-3d04-46aa-aa9a-0fca61dc60fa" + responses: + "200": + application/json: {"workflow_name": "", "execution_id": "", "root_execution_id": "", "status": "TIMED_OUT", "start_time": "2026-12-15T16:20:06.129Z", "end_time": "2025-04-28T14:51:35.913Z", "result": ""} + "422": + application/json: {} + get_run_history_v1_workflows_runs__run_id__history_get: + speakeasy-default-get-run-history-v1-workflows-runs-run-id-history-get: + parameters: + path: + run_id: "f7296489-0212-4239-9e35-12fabfe8cd11" + responses: + "200": + application/json: "" + "422": + application/json: {} + get_schedules_v1_workflows_schedules_get: + speakeasy-default-get-schedules-v1-workflows-schedules-get: + responses: + "200": + application/json: {"schedules": []} + schedule_workflow_v1_workflows_schedules_post: + speakeasy-default-schedule-workflow-v1-workflows-schedules-post: + requestBody: + application/json: {"schedule": {"input": ""}} + responses: + "201": + application/json: {"schedule_id": ""} + "422": + application/json: {} + unschedule_workflow_v1_workflows_schedules__schedule_id__delete: + speakeasy-default-unschedule-workflow-v1-workflows-schedules-schedule-id-delete: + parameters: + path: + schedule_id: "" + responses: + "422": + application/json: {} + receive_workflow_event_v1_workflows_events_post: + speakeasy-default-receive-workflow-event-v1-workflows-events-post: + requestBody: + application/json: {"event": {"event_id": "", "root_workflow_exec_id": "", "workflow_exec_id": "", "workflow_run_id": "", "workflow_name": "", "event_type": "CUSTOM_TASK_STARTED", "attributes": {"custom_task_id": "", "custom_task_type": ""}}} + responses: + "200": + application/json: {"status": "error"} + "422": + application/json: {} + receive_workflow_events_batch_v1_workflows_events_batch_post: + speakeasy-default-receive-workflow-events-batch-v1-workflows-events-batch-post: + requestBody: + application/json: {"events": [{"event_id": "", "root_workflow_exec_id": "", "workflow_exec_id": "", "workflow_run_id": "", "workflow_name": "", "event_type": "WORKFLOW_EXECUTION_STARTED", "attributes": {"task_id": "", "workflow_name": "", "input": {"type": "json", "value": ""}}}]} + responses: + "200": + application/json: {"status": "success", "events_received": 650921} + "422": + application/json: {} + get_stream_events_v1_workflows_events_stream_get: + speakeasy-default-get-stream-events-v1-workflows-events-stream-get: + parameters: + query: + scope: "*" + activity_name: "*" + activity_id: "*" + workflow_name: "*" + workflow_exec_id: "*" + root_workflow_exec_id: "*" + parent_workflow_exec_id: "*" + stream: "*" + start_seq: 0 + responses: + "422": + application/json: {} + get_workflow_events_v1_workflows_events_list_get: + speakeasy-default-get-workflow-events-v1-workflows-events-list-get: + parameters: + query: + limit: 100 + responses: + "200": + application/json: {"events": [{"event_id": "", "event_timestamp": 93683, "root_workflow_exec_id": "", "parent_workflow_exec_id": "", "workflow_exec_id": "", "workflow_run_id": "", "workflow_name": "", "event_type": "CUSTOM_TASK_IN_PROGRESS", "attributes": {"custom_task_id": "", "custom_task_type": "", "payload": {"type": "json_patch", "value": [{"path": "/sys", "value": "", "op": "remove"}]}}}]} + "422": + application/json: {} + list_deployments_v1_workflows_deployments_get: + speakeasy-default-list-deployments-v1-workflows-deployments-get: + parameters: + query: + active_only: true + responses: + "200": + application/json: {"deployments": [{"id": "404cb7bc-ee61-4a2e-aff3-75f69cf3ca94", "name": "", "is_active": true, "created_at": "2026-10-31T16:44:16.117Z", "updated_at": "2025-01-02T22:50:15.704Z"}]} + "422": + application/json: {} + get_deployment_v1_workflows_deployments__name__get: + speakeasy-default-get-deployment-v1-workflows-deployments-name-get: + parameters: + path: + name: "" + responses: + "200": + application/json: {"id": "c3310963-59e6-41a6-b644-84aca97cc893", "name": "", "is_active": true, "created_at": "2024-10-22T00:46:19.102Z", "updated_at": "2024-10-19T15:10:50.721Z", "workers": []} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.beta.connectors.list_tools()`: **Added** +releaseNotes: "## Python SDK Changes:\n* `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.beta.connectors.list_tools()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.models.update()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.workflows.metrics.get_workflow_metrics()`: **Added**\n* `mistral.workflows.get_workflow()`: **Added**\n* `mistral.workflows.update_workflow()`: **Added**\n* `mistral.workflows.get_workflow_registration()`: **Added**\n* `mistral.workflows.archive_workflow()`: **Added**\n* `mistral.workflows.unarchive_workflow()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_history()`: **Added**\n* `mistral.workflows.executions.signal_workflow_execution()`: **Added**\n* `mistral.workflows.executions.query_workflow_execution()`: **Added**\n* `mistral.workflows.executions.terminate_workflow_execution()`: **Added**\n* `mistral.workflows.executions.batch_terminate_workflow_executions()`: **Added**\n* `mistral.workflows.executions.cancel_workflow_execution()`: **Added**\n* `mistral.workflows.executions.batch_cancel_workflow_executions()`: **Added**\n* `mistral.workflows.executions.reset_workflow()`: **Added**\n* `mistral.workflows.executions.update_workflow_execution()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_otel()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_summary()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_events()`: **Added**\n* `mistral.workflows.executions.stream()`: **Added**\n* `mistral.workflows.runs.get_run()`: **Added**\n* `mistral.batch.jobs.delete()`: **Added**\n* `mistral.workflows.runs.list_runs()`: **Added**\n* `mistral.workflows.runs.get_run_history()`: **Added**\n* `mistral.workflows.schedules.get_schedules()`: **Added**\n* `mistral.workflows.schedules.schedule_workflow()`: **Added**\n* `mistral.workflows.schedules.unschedule_workflow()`: **Added**\n* `mistral.workflows.events.receive_workflow_event()`: **Added**\n* `mistral.workflows.events.receive_workflow_events_batch()`: **Added**\n* `mistral.workflows.events.get_stream_events()`: **Added**\n* `mistral.workflows.events.get_workflow_events()`: **Added**\n* `mistral.workflows.deployments.list_deployments()`: **Added**\n* `mistral.workflows.deployments.get_deployment()`: **Added**\n* `mistral.events.receive_workflow_event()`: **Added**\n* `mistral.events.receive_workflow_events_batch()`: **Added**\n* `mistral.events.get_stream_events()`: **Added**\n* `mistral.events.get_workflow_events()`: **Added**\n* `mistral.audio.voices.list()`: `request.type` **Added**\n* `mistral.workflows.execute_workflow_registration()`: **Added**\n* `mistral.workflows.execute_workflow()`: **Added**\n* `mistral.workflows.get_workflow_registrations()`: **Added**\n* `mistral.beta.libraries.list()`: \n * `request` **Changed**\n * `response.pagination` **Added**\n * `error.status[422]` **Added**\n* `mistral.beta.connectors.call_tool()`: `request.credentials_name` **Added**\n* `mistral.workflows.get_workflows()`: **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 390116a2..48ee12a0 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.1.3 + version: 2.2.0rc1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 105cdb2a..ab4814ee 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:480366372609b8e74697827a161a478dd87aa95460d0e078ecc73b5dfa0d00ff - sourceBlobDigest: sha256:23523b81989fa5223902dea44dd6bebf8eb7b1dceec5cc3aa4dbb969ecde6652 + sourceRevisionDigest: sha256:edeef4396c29b9a5960e150514289777d4aef71037b03d14444238455fc1c1bd + sourceBlobDigest: sha256:b8b6deb9c127b45ad0cd5700c1e9d69f63927b070817e5986f7131f14dba6ba7 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:480366372609b8e74697827a161a478dd87aa95460d0e078ecc73b5dfa0d00ff - sourceBlobDigest: sha256:23523b81989fa5223902dea44dd6bebf8eb7b1dceec5cc3aa4dbb969ecde6652 + sourceRevisionDigest: sha256:edeef4396c29b9a5960e150514289777d4aef71037b03d14444238455fc1c1bd + sourceBlobDigest: sha256:b8b6deb9c127b45ad0cd5700c1e9d69f63927b070817e5986f7131f14dba6ba7 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:6d406cd8dd3e8da23675c1d278548dc5f54c616af47c94b0a704711a6b27d561 + codeSamplesRevisionDigest: sha256:6fc37de5c06926f4bb561b007ea0856a0436829f465b0b054c19cb916cb25909 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/README-PYPI.md b/README-PYPI.md index 1a0b2402..a178ef56 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -36,6 +36,7 @@ Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create yo * [Providers' SDKs Example Usage](#providers-sdks-example-usage) * [Available Resources and Operations](#available-resources-and-operations) * [Server-sent event streaming](#server-sent-event-streaming) + * [Pagination](#pagination) * [File uploads](#file-uploads) * [Retries](#retries) * [Error Handling](#error-handling) @@ -490,6 +491,7 @@ print(res.choices[0].message.content) * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#list) - Get Batch Jobs * [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#create) - Create Batch Job * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#get) - Get Batch Job +* [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#delete) - Delete Batch Job * [cancel](https://github.com/mistralai/client-python/blob/main/docs/sdks/batchjobs/README.md#cancel) - Cancel Batch Job ### [Beta.Agents](https://github.com/mistralai/client-python/blob/main/docs/sdks/betaagents/README.md) @@ -633,6 +635,13 @@ print(res.choices[0].message.content) * [create](https://github.com/mistralai/client-python/blob/main/docs/sdks/embeddings/README.md#create) - Embeddings +### [Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md) + +* [receive_workflow_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#receive_workflow_event) - Receive Workflow Event +* [receive_workflow_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_stream_events) - Get Stream Events +* [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_workflow_events) - Get Workflow Events + ### [Files](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md) * [upload](https://github.com/mistralai/client-python/blob/main/docs/sdks/files/README.md#upload) - Upload File @@ -668,6 +677,63 @@ print(res.choices[0].message.content) * [process](https://github.com/mistralai/client-python/blob/main/docs/sdks/ocr/README.md#process) - OCR +### [Workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md) + +* [get_workflows](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflows) - Get Workflows +* [get_workflow_registrations](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflow_registrations) - Get Workflow Registrations +* [execute_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#execute_workflow) - Execute Workflow +* [~~execute_workflow_registration~~](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#execute_workflow_registration) - Execute Workflow Registration :warning: **Deprecated** +* [get_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflow) - Get Workflow +* [update_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#update_workflow) - Update Workflow +* [get_workflow_registration](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#get_workflow_registration) - Get Workflow Registration +* [archive_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#archive_workflow) - Archive Workflow +* [unarchive_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflows/README.md#unarchive_workflow) - Unarchive Workflow + +#### [Workflows.Deployments](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md) + +* [list_deployments](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#list_deployments) - List Deployments +* [get_deployment](https://github.com/mistralai/client-python/blob/main/docs/sdks/deployments/README.md#get_deployment) - Get Deployment + +#### [Workflows.Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md) + +* [receive_workflow_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#receive_workflow_event) - Receive Workflow Event +* [receive_workflow_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_stream_events) - Get Stream Events +* [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_workflow_events) - Get Workflow Events + +#### [Workflows.Executions](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md) + +* [get_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution) - Get Workflow Execution +* [get_workflow_execution_history](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_history) - Get Workflow Execution History +* [signal_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#signal_workflow_execution) - Signal Workflow Execution +* [query_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#query_workflow_execution) - Query Workflow Execution +* [terminate_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#terminate_workflow_execution) - Terminate Workflow Execution +* [batch_terminate_workflow_executions](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#batch_terminate_workflow_executions) - Batch Terminate Workflow Executions +* [cancel_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#cancel_workflow_execution) - Cancel Workflow Execution +* [batch_cancel_workflow_executions](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#batch_cancel_workflow_executions) - Batch Cancel Workflow Executions +* [reset_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#reset_workflow) - Reset Workflow +* [update_workflow_execution](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#update_workflow_execution) - Update Workflow Execution +* [get_workflow_execution_trace_otel](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_trace_otel) - Get Workflow Execution Trace Otel +* [get_workflow_execution_trace_summary](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_trace_summary) - Get Workflow Execution Trace Summary +* [get_workflow_execution_trace_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#get_workflow_execution_trace_events) - Get Workflow Execution Trace Events +* [stream](https://github.com/mistralai/client-python/blob/main/docs/sdks/executions/README.md#stream) - Stream + +#### [Workflows.Metrics](https://github.com/mistralai/client-python/blob/main/docs/sdks/metrics/README.md) + +* [get_workflow_metrics](https://github.com/mistralai/client-python/blob/main/docs/sdks/metrics/README.md#get_workflow_metrics) - Get Workflow Metrics + +#### [Workflows.Runs](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md) + +* [list_runs](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md#list_runs) - List Runs +* [get_run](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md#get_run) - Get Run +* [get_run_history](https://github.com/mistralai/client-python/blob/main/docs/sdks/runs/README.md#get_run_history) - Get Run History + +#### [Workflows.Schedules](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md) + +* [get_schedules](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#get_schedules) - Get Schedules +* [schedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow +* [unschedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow + @@ -708,6 +774,33 @@ with Mistral( [context-manager]: https://book.pythontips.com/en/latest/context_managers.html + +## Pagination + +Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the +returned response object will have a `Next` method that can be called to pull down the next group of results. If the +return value of `Next` is `None`, then there are no more pages to be fetched. + +Here's an example of one such pagination call: +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.get_workflows(active_only=False, include_shared=True, limit=50) + + while res is not None: + # Handle items + + res = res.next() + +``` + + ## File uploads @@ -851,8 +944,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 69 of 131 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 131 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 172 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 172 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index 46ad3c76..4c64fb09 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create yo * [Providers' SDKs Example Usage](#providers-sdks-example-usage) * [Available Resources and Operations](#available-resources-and-operations) * [Server-sent event streaming](#server-sent-event-streaming) + * [Pagination](#pagination) * [File uploads](#file-uploads) * [Retries](#retries) * [Error Handling](#error-handling) @@ -490,6 +491,7 @@ print(res.choices[0].message.content) * [list](docs/sdks/batchjobs/README.md#list) - Get Batch Jobs * [create](docs/sdks/batchjobs/README.md#create) - Create Batch Job * [get](docs/sdks/batchjobs/README.md#get) - Get Batch Job +* [delete](docs/sdks/batchjobs/README.md#delete) - Delete Batch Job * [cancel](docs/sdks/batchjobs/README.md#cancel) - Cancel Batch Job ### [Beta.Agents](docs/sdks/betaagents/README.md) @@ -633,6 +635,13 @@ print(res.choices[0].message.content) * [create](docs/sdks/embeddings/README.md#create) - Embeddings +### [Events](docs/sdks/events/README.md) + +* [receive_workflow_event](docs/sdks/events/README.md#receive_workflow_event) - Receive Workflow Event +* [receive_workflow_events_batch](docs/sdks/events/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [get_stream_events](docs/sdks/events/README.md#get_stream_events) - Get Stream Events +* [get_workflow_events](docs/sdks/events/README.md#get_workflow_events) - Get Workflow Events + ### [Files](docs/sdks/files/README.md) * [upload](docs/sdks/files/README.md#upload) - Upload File @@ -668,6 +677,63 @@ print(res.choices[0].message.content) * [process](docs/sdks/ocr/README.md#process) - OCR +### [Workflows](docs/sdks/workflows/README.md) + +* [get_workflows](docs/sdks/workflows/README.md#get_workflows) - Get Workflows +* [get_workflow_registrations](docs/sdks/workflows/README.md#get_workflow_registrations) - Get Workflow Registrations +* [execute_workflow](docs/sdks/workflows/README.md#execute_workflow) - Execute Workflow +* [~~execute_workflow_registration~~](docs/sdks/workflows/README.md#execute_workflow_registration) - Execute Workflow Registration :warning: **Deprecated** +* [get_workflow](docs/sdks/workflows/README.md#get_workflow) - Get Workflow +* [update_workflow](docs/sdks/workflows/README.md#update_workflow) - Update Workflow +* [get_workflow_registration](docs/sdks/workflows/README.md#get_workflow_registration) - Get Workflow Registration +* [archive_workflow](docs/sdks/workflows/README.md#archive_workflow) - Archive Workflow +* [unarchive_workflow](docs/sdks/workflows/README.md#unarchive_workflow) - Unarchive Workflow + +#### [Workflows.Deployments](docs/sdks/deployments/README.md) + +* [list_deployments](docs/sdks/deployments/README.md#list_deployments) - List Deployments +* [get_deployment](docs/sdks/deployments/README.md#get_deployment) - Get Deployment + +#### [Workflows.Events](docs/sdks/workflowsevents/README.md) + +* [receive_workflow_event](docs/sdks/workflowsevents/README.md#receive_workflow_event) - Receive Workflow Event +* [receive_workflow_events_batch](docs/sdks/workflowsevents/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [get_stream_events](docs/sdks/workflowsevents/README.md#get_stream_events) - Get Stream Events +* [get_workflow_events](docs/sdks/workflowsevents/README.md#get_workflow_events) - Get Workflow Events + +#### [Workflows.Executions](docs/sdks/executions/README.md) + +* [get_workflow_execution](docs/sdks/executions/README.md#get_workflow_execution) - Get Workflow Execution +* [get_workflow_execution_history](docs/sdks/executions/README.md#get_workflow_execution_history) - Get Workflow Execution History +* [signal_workflow_execution](docs/sdks/executions/README.md#signal_workflow_execution) - Signal Workflow Execution +* [query_workflow_execution](docs/sdks/executions/README.md#query_workflow_execution) - Query Workflow Execution +* [terminate_workflow_execution](docs/sdks/executions/README.md#terminate_workflow_execution) - Terminate Workflow Execution +* [batch_terminate_workflow_executions](docs/sdks/executions/README.md#batch_terminate_workflow_executions) - Batch Terminate Workflow Executions +* [cancel_workflow_execution](docs/sdks/executions/README.md#cancel_workflow_execution) - Cancel Workflow Execution +* [batch_cancel_workflow_executions](docs/sdks/executions/README.md#batch_cancel_workflow_executions) - Batch Cancel Workflow Executions +* [reset_workflow](docs/sdks/executions/README.md#reset_workflow) - Reset Workflow +* [update_workflow_execution](docs/sdks/executions/README.md#update_workflow_execution) - Update Workflow Execution +* [get_workflow_execution_trace_otel](docs/sdks/executions/README.md#get_workflow_execution_trace_otel) - Get Workflow Execution Trace Otel +* [get_workflow_execution_trace_summary](docs/sdks/executions/README.md#get_workflow_execution_trace_summary) - Get Workflow Execution Trace Summary +* [get_workflow_execution_trace_events](docs/sdks/executions/README.md#get_workflow_execution_trace_events) - Get Workflow Execution Trace Events +* [stream](docs/sdks/executions/README.md#stream) - Stream + +#### [Workflows.Metrics](docs/sdks/metrics/README.md) + +* [get_workflow_metrics](docs/sdks/metrics/README.md#get_workflow_metrics) - Get Workflow Metrics + +#### [Workflows.Runs](docs/sdks/runs/README.md) + +* [list_runs](docs/sdks/runs/README.md#list_runs) - List Runs +* [get_run](docs/sdks/runs/README.md#get_run) - Get Run +* [get_run_history](docs/sdks/runs/README.md#get_run_history) - Get Run History + +#### [Workflows.Schedules](docs/sdks/schedules/README.md) + +* [get_schedules](docs/sdks/schedules/README.md#get_schedules) - Get Schedules +* [schedule_workflow](docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow +* [unschedule_workflow](docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow + @@ -708,6 +774,33 @@ with Mistral( [context-manager]: https://book.pythontips.com/en/latest/context_managers.html + +## Pagination + +Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the +returned response object will have a `Next` method that can be called to pull down the next group of results. If the +return value of `Next` is `None`, then there are no more pages to be fetched. + +Here's an example of one such pagination call: +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.get_workflows(active_only=False, include_shared=True, limit=50) + + while res is not None: + # Handle items + + res = res.next() + +``` + + ## File uploads @@ -851,8 +944,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 69 of 131 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 131 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 172 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 172 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 954b2675..ed266e46 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -488,4 +488,14 @@ Based on: ### Generated - [python v2.1.3] . ### Releases -- [PyPI v2.1.3] https://pypi.org/project/mistralai/2.1.3 - . \ No newline at end of file +- [PyPI v2.1.3] https://pypi.org/project/mistralai/2.1.3 - . + +## 2026-03-30 14:56:34 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.2.0rc1] . +### Releases +- [PyPI v2.2.0rc1] https://pypi.org/project/mistralai/2.2.0rc1 - . \ No newline at end of file diff --git a/docs/models/activitytaskcompletedattributesrequest.md b/docs/models/activitytaskcompletedattributesrequest.md new file mode 100644 index 00000000..5050b558 --- /dev/null +++ b/docs/models/activitytaskcompletedattributesrequest.md @@ -0,0 +1,12 @@ +# ActivityTaskCompletedAttributesRequest + +Attributes for activity task completed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `result` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/activitytaskcompletedattributesresponse.md b/docs/models/activitytaskcompletedattributesresponse.md new file mode 100644 index 00000000..5baaffa6 --- /dev/null +++ b/docs/models/activitytaskcompletedattributesresponse.md @@ -0,0 +1,12 @@ +# ActivityTaskCompletedAttributesResponse + +Attributes for activity task completed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `result` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/activitytaskcompletedrequest.md b/docs/models/activitytaskcompletedrequest.md new file mode 100644 index 00000000..9008bbf1 --- /dev/null +++ b/docs/models/activitytaskcompletedrequest.md @@ -0,0 +1,20 @@ +# ActivityTaskCompletedRequest + +Emitted when an activity task completes successfully. + +Contains timing information about the successful execution. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskCompletedAttributesRequest](../models/activitytaskcompletedattributesrequest.md) | :heavy_check_mark: | Attributes for activity task completed events. | \ No newline at end of file diff --git a/docs/models/activitytaskcompletedresponse.md b/docs/models/activitytaskcompletedresponse.md new file mode 100644 index 00000000..56a64631 --- /dev/null +++ b/docs/models/activitytaskcompletedresponse.md @@ -0,0 +1,20 @@ +# ActivityTaskCompletedResponse + +Emitted when an activity task completes successfully. + +Contains timing information about the successful execution. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskCompletedAttributesResponse](../models/activitytaskcompletedattributesresponse.md) | :heavy_check_mark: | Attributes for activity task completed events. | \ No newline at end of file diff --git a/docs/models/activitytaskfailedattributes.md b/docs/models/activitytaskfailedattributes.md new file mode 100644 index 00000000..5cb9cafe --- /dev/null +++ b/docs/models/activitytaskfailedattributes.md @@ -0,0 +1,13 @@ +# ActivityTaskFailedAttributes + +Attributes for activity task failed events (final failure after all retries). + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `attempt` | *int* | :heavy_check_mark: | The final attempt number that failed (1-indexed). | +| `failure` | [models.Failure](../models/failure.md) | :heavy_check_mark: | Represents an error or exception that occurred during execution. | \ No newline at end of file diff --git a/docs/models/activitytaskfailedrequest.md b/docs/models/activitytaskfailedrequest.md new file mode 100644 index 00000000..1db1d90a --- /dev/null +++ b/docs/models/activitytaskfailedrequest.md @@ -0,0 +1,20 @@ +# ActivityTaskFailedRequest + +Emitted when an activity task fails after exhausting all retry attempts. + +This is a terminal event indicating the activity could not complete successfully. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskFailedAttributes](../models/activitytaskfailedattributes.md) | :heavy_check_mark: | Attributes for activity task failed events (final failure after all retries). | \ No newline at end of file diff --git a/docs/models/activitytaskfailedresponse.md b/docs/models/activitytaskfailedresponse.md new file mode 100644 index 00000000..0853f68d --- /dev/null +++ b/docs/models/activitytaskfailedresponse.md @@ -0,0 +1,20 @@ +# ActivityTaskFailedResponse + +Emitted when an activity task fails after exhausting all retry attempts. + +This is a terminal event indicating the activity could not complete successfully. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskFailedAttributes](../models/activitytaskfailedattributes.md) | :heavy_check_mark: | Attributes for activity task failed events (final failure after all retries). | \ No newline at end of file diff --git a/docs/models/activitytaskretryingattributes.md b/docs/models/activitytaskretryingattributes.md new file mode 100644 index 00000000..92166076 --- /dev/null +++ b/docs/models/activitytaskretryingattributes.md @@ -0,0 +1,13 @@ +# ActivityTaskRetryingAttributes + +Attributes for activity task retrying events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `attempt` | *int* | :heavy_check_mark: | The attempt number that failed (1-indexed). | +| `failure` | [models.Failure](../models/failure.md) | :heavy_check_mark: | Represents an error or exception that occurred during execution. | \ No newline at end of file diff --git a/docs/models/activitytaskretryingrequest.md b/docs/models/activitytaskretryingrequest.md new file mode 100644 index 00000000..fb6e27b5 --- /dev/null +++ b/docs/models/activitytaskretryingrequest.md @@ -0,0 +1,20 @@ +# ActivityTaskRetryingRequest + +Emitted when an activity task fails and will be retried. + +Contains information about the failed attempt and the error that occurred. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_RETRYING"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskRetryingAttributes](../models/activitytaskretryingattributes.md) | :heavy_check_mark: | Attributes for activity task retrying events. | \ No newline at end of file diff --git a/docs/models/activitytaskretryingresponse.md b/docs/models/activitytaskretryingresponse.md new file mode 100644 index 00000000..8b7bdd42 --- /dev/null +++ b/docs/models/activitytaskretryingresponse.md @@ -0,0 +1,20 @@ +# ActivityTaskRetryingResponse + +Emitted when an activity task fails and will be retried. + +Contains information about the failed attempt and the error that occurred. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_RETRYING"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskRetryingAttributes](../models/activitytaskretryingattributes.md) | :heavy_check_mark: | Attributes for activity task retrying events. | \ No newline at end of file diff --git a/docs/models/activitytaskstartedattributesrequest.md b/docs/models/activitytaskstartedattributesrequest.md new file mode 100644 index 00000000..e264b20b --- /dev/null +++ b/docs/models/activitytaskstartedattributesrequest.md @@ -0,0 +1,12 @@ +# ActivityTaskStartedAttributesRequest + +Attributes for activity task started events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `input` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/activitytaskstartedattributesresponse.md b/docs/models/activitytaskstartedattributesresponse.md new file mode 100644 index 00000000..5d1f59a8 --- /dev/null +++ b/docs/models/activitytaskstartedattributesresponse.md @@ -0,0 +1,12 @@ +# ActivityTaskStartedAttributesResponse + +Attributes for activity task started events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/activitytaskstartedrequest.md b/docs/models/activitytaskstartedrequest.md new file mode 100644 index 00000000..02421624 --- /dev/null +++ b/docs/models/activitytaskstartedrequest.md @@ -0,0 +1,21 @@ +# ActivityTaskStartedRequest + +Emitted when an activity task begins execution. + +This is the first event for an activity, emitted on the first attempt only. +Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskStartedAttributesRequest](../models/activitytaskstartedattributesrequest.md) | :heavy_check_mark: | Attributes for activity task started events. | \ No newline at end of file diff --git a/docs/models/activitytaskstartedresponse.md b/docs/models/activitytaskstartedresponse.md new file mode 100644 index 00000000..1aee1533 --- /dev/null +++ b/docs/models/activitytaskstartedresponse.md @@ -0,0 +1,21 @@ +# ActivityTaskStartedResponse + +Emitted when an activity task begins execution. + +This is the first event for an activity, emitted on the first attempt only. +Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["ACTIVITY_TASK_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.ActivityTaskStartedAttributesResponse](../models/activitytaskstartedattributesresponse.md) | :heavy_check_mark: | Attributes for activity task started events. | \ No newline at end of file diff --git a/docs/models/archiveworkflowv1workflowsworkflowidentifierarchiveputrequest.md b/docs/models/archiveworkflowv1workflowsworkflowidentifierarchiveputrequest.md new file mode 100644 index 00000000..6ebe540a --- /dev/null +++ b/docs/models/archiveworkflowv1workflowsworkflowidentifierarchiveputrequest.md @@ -0,0 +1,8 @@ +# ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/basefielddefinition.md b/docs/models/basefielddefinition.md index 3f7abea9..3d721d91 100644 --- a/docs/models/basefielddefinition.md +++ b/docs/models/basefielddefinition.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `label` | *str* | :heavy_check_mark: | N/A | -| `type` | [models.TypeEnum](../models/typeenum.md) | :heavy_check_mark: | N/A | -| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `label` | *str* | :heavy_check_mark: | N/A | +| `type` | [models.BaseFieldDefinitionType](../models/basefielddefinitiontype.md) | :heavy_check_mark: | N/A | +| `group` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `supported_operators` | List[[models.SupportedOperator](../models/supportedoperator.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/typeenum.md b/docs/models/basefielddefinitiontype.md similarity index 67% rename from docs/models/typeenum.md rename to docs/models/basefielddefinitiontype.md index ec47cf96..efdff2a4 100644 --- a/docs/models/typeenum.md +++ b/docs/models/basefielddefinitiontype.md @@ -1,12 +1,12 @@ -# TypeEnum +# BaseFieldDefinitionType ## Example Usage ```python -from mistralai.client.models import TypeEnum +from mistralai.client.models import BaseFieldDefinitionType # Open enum: unrecognized values are captured as UnrecognizedStr -value: TypeEnum = "ENUM" +value: BaseFieldDefinitionType = "ENUM" ``` diff --git a/docs/models/batchexecutionbody.md b/docs/models/batchexecutionbody.md new file mode 100644 index 00000000..9c31e334 --- /dev/null +++ b/docs/models/batchexecutionbody.md @@ -0,0 +1,8 @@ +# BatchExecutionBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `execution_ids` | List[*str*] | :heavy_check_mark: | List of execution IDs to process | \ No newline at end of file diff --git a/docs/models/batchexecutionresponse.md b/docs/models/batchexecutionresponse.md new file mode 100644 index 00000000..394b6d86 --- /dev/null +++ b/docs/models/batchexecutionresponse.md @@ -0,0 +1,8 @@ +# BatchExecutionResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `results` | Dict[str, [models.BatchExecutionResult](../models/batchexecutionresult.md)] | :heavy_minus_sign: | Mapping of execution_id to result with status and optional error message | \ No newline at end of file diff --git a/docs/models/batchexecutionresult.md b/docs/models/batchexecutionresult.md new file mode 100644 index 00000000..57107bba --- /dev/null +++ b/docs/models/batchexecutionresult.md @@ -0,0 +1,9 @@ +# BatchExecutionResult + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `status` | *str* | :heavy_check_mark: | Status of the operation (success/failure) | +| `error` | *OptionalNullable[str]* | :heavy_minus_sign: | Error message if operation failed | \ No newline at end of file diff --git a/docs/models/cancelworkflowexecutionv1workflowsexecutionsexecutionidcancelpostrequest.md b/docs/models/cancelworkflowexecutionv1workflowsexecutionsexecutionidcancelpostrequest.md new file mode 100644 index 00000000..4968d664 --- /dev/null +++ b/docs/models/cancelworkflowexecutionv1workflowsexecutionsexecutionidcancelpostrequest.md @@ -0,0 +1,8 @@ +# CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/classifierfinetunedmodel.md b/docs/models/classifierfinetunedmodel.md index ad05f931..9fa69cbb 100644 --- a/docs/models/classifierfinetunedmodel.md +++ b/docs/models/classifierfinetunedmodel.md @@ -18,6 +18,6 @@ | `capabilities` | [models.FineTunedModelCapabilities](../models/finetunedmodelcapabilities.md) | :heavy_check_mark: | N/A | | `max_context_length` | *Optional[int]* | :heavy_minus_sign: | N/A | | `aliases` | List[*str*] | :heavy_minus_sign: | N/A | -| `job` | *str* | :heavy_check_mark: | N/A | +| `job` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `classifier_targets` | List[[models.ClassifierTargetResult](../models/classifiertargetresult.md)] | :heavy_check_mark: | N/A | | `model_type` | *Literal["classifier"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/completionfinetunedmodel.md b/docs/models/completionfinetunedmodel.md index 0055db02..26bcdb17 100644 --- a/docs/models/completionfinetunedmodel.md +++ b/docs/models/completionfinetunedmodel.md @@ -18,5 +18,5 @@ | `capabilities` | [models.FineTunedModelCapabilities](../models/finetunedmodelcapabilities.md) | :heavy_check_mark: | N/A | | `max_context_length` | *Optional[int]* | :heavy_minus_sign: | N/A | | `aliases` | List[*str*] | :heavy_minus_sign: | N/A | -| `job` | *str* | :heavy_check_mark: | N/A | +| `job` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `model_type` | *Literal["completion"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcalltoolv1request.md b/docs/models/connectorcalltoolv1request.md index cdda08cf..dea7083d 100644 --- a/docs/models/connectorcalltoolv1request.md +++ b/docs/models/connectorcalltoolv1request.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `tool_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | | `connector_call_tool_request` | [models.ConnectorCallToolRequest](../models/connectorcalltoolrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/customtaskcanceledattributes.md b/docs/models/customtaskcanceledattributes.md new file mode 100644 index 00000000..3a5facdd --- /dev/null +++ b/docs/models/customtaskcanceledattributes.md @@ -0,0 +1,12 @@ +# CustomTaskCanceledAttributes + +Attributes for custom task canceled events. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `reason` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional reason provided for the cancellation. | \ No newline at end of file diff --git a/docs/models/customtaskcanceledrequest.md b/docs/models/customtaskcanceledrequest.md new file mode 100644 index 00000000..4a313ab1 --- /dev/null +++ b/docs/models/customtaskcanceledrequest.md @@ -0,0 +1,20 @@ +# CustomTaskCanceledRequest + +Emitted when a custom task is canceled. + +Indicates the task was explicitly stopped before completion. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_CANCELED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskCanceledAttributes](../models/customtaskcanceledattributes.md) | :heavy_check_mark: | Attributes for custom task canceled events. | \ No newline at end of file diff --git a/docs/models/customtaskcanceledresponse.md b/docs/models/customtaskcanceledresponse.md new file mode 100644 index 00000000..0bcee227 --- /dev/null +++ b/docs/models/customtaskcanceledresponse.md @@ -0,0 +1,20 @@ +# CustomTaskCanceledResponse + +Emitted when a custom task is canceled. + +Indicates the task was explicitly stopped before completion. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_CANCELED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskCanceledAttributes](../models/customtaskcanceledattributes.md) | :heavy_check_mark: | Attributes for custom task canceled events. | \ No newline at end of file diff --git a/docs/models/customtaskcompletedattributesrequest.md b/docs/models/customtaskcompletedattributesrequest.md new file mode 100644 index 00000000..43671ef9 --- /dev/null +++ b/docs/models/customtaskcompletedattributesrequest.md @@ -0,0 +1,12 @@ +# CustomTaskCompletedAttributesRequest + +Attributes for custom task completed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/customtaskcompletedattributesresponse.md b/docs/models/customtaskcompletedattributesresponse.md new file mode 100644 index 00000000..a6a136e7 --- /dev/null +++ b/docs/models/customtaskcompletedattributesresponse.md @@ -0,0 +1,12 @@ +# CustomTaskCompletedAttributesResponse + +Attributes for custom task completed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/customtaskcompletedrequest.md b/docs/models/customtaskcompletedrequest.md new file mode 100644 index 00000000..90ec92a7 --- /dev/null +++ b/docs/models/customtaskcompletedrequest.md @@ -0,0 +1,20 @@ +# CustomTaskCompletedRequest + +Emitted when a custom task completes successfully. + +Contains the final result of the task execution. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskCompletedAttributesRequest](../models/customtaskcompletedattributesrequest.md) | :heavy_check_mark: | Attributes for custom task completed events. | \ No newline at end of file diff --git a/docs/models/customtaskcompletedresponse.md b/docs/models/customtaskcompletedresponse.md new file mode 100644 index 00000000..6871184f --- /dev/null +++ b/docs/models/customtaskcompletedresponse.md @@ -0,0 +1,20 @@ +# CustomTaskCompletedResponse + +Emitted when a custom task completes successfully. + +Contains the final result of the task execution. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskCompletedAttributesResponse](../models/customtaskcompletedattributesresponse.md) | :heavy_check_mark: | Attributes for custom task completed events. | \ No newline at end of file diff --git a/docs/models/customtaskfailedattributes.md b/docs/models/customtaskfailedattributes.md new file mode 100644 index 00000000..f4e3ab2d --- /dev/null +++ b/docs/models/customtaskfailedattributes.md @@ -0,0 +1,12 @@ +# CustomTaskFailedAttributes + +Attributes for custom task failed events. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `failure` | [models.Failure](../models/failure.md) | :heavy_check_mark: | Represents an error or exception that occurred during execution. | \ No newline at end of file diff --git a/docs/models/customtaskfailedrequest.md b/docs/models/customtaskfailedrequest.md new file mode 100644 index 00000000..ddfd79a6 --- /dev/null +++ b/docs/models/customtaskfailedrequest.md @@ -0,0 +1,20 @@ +# CustomTaskFailedRequest + +Emitted when a custom task fails. + +Contains details about the failure for debugging and error handling. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskFailedAttributes](../models/customtaskfailedattributes.md) | :heavy_check_mark: | Attributes for custom task failed events. | \ No newline at end of file diff --git a/docs/models/customtaskfailedresponse.md b/docs/models/customtaskfailedresponse.md new file mode 100644 index 00000000..e14e4afa --- /dev/null +++ b/docs/models/customtaskfailedresponse.md @@ -0,0 +1,20 @@ +# CustomTaskFailedResponse + +Emitted when a custom task fails. + +Contains details about the failure for debugging and error handling. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskFailedAttributes](../models/customtaskfailedattributes.md) | :heavy_check_mark: | Attributes for custom task failed events. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressattributesrequest.md b/docs/models/customtaskinprogressattributesrequest.md new file mode 100644 index 00000000..6241f13a --- /dev/null +++ b/docs/models/customtaskinprogressattributesrequest.md @@ -0,0 +1,12 @@ +# CustomTaskInProgressAttributesRequest + +Attributes for custom task in-progress events with streaming updates. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [models.CustomTaskInProgressAttributesRequestPayload](../models/customtaskinprogressattributesrequestpayload.md) | :heavy_check_mark: | The current state or incremental update for the task. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressattributesrequestpayload.md b/docs/models/customtaskinprogressattributesrequestpayload.md new file mode 100644 index 00000000..776898ba --- /dev/null +++ b/docs/models/customtaskinprogressattributesrequestpayload.md @@ -0,0 +1,19 @@ +# CustomTaskInProgressAttributesRequestPayload + +The current state or incremental update for the task. + + +## Supported Types + +### `models.JSONPayloadRequest` + +```python +value: models.JSONPayloadRequest = /* values here */ +``` + +### `models.JSONPatchPayloadRequest` + +```python +value: models.JSONPatchPayloadRequest = /* values here */ +``` + diff --git a/docs/models/customtaskinprogressattributesresponse.md b/docs/models/customtaskinprogressattributesresponse.md new file mode 100644 index 00000000..311e4fb5 --- /dev/null +++ b/docs/models/customtaskinprogressattributesresponse.md @@ -0,0 +1,12 @@ +# CustomTaskInProgressAttributesResponse + +Attributes for custom task in-progress events with streaming updates. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [models.CustomTaskInProgressAttributesResponsePayload](../models/customtaskinprogressattributesresponsepayload.md) | :heavy_check_mark: | The current state or incremental update for the task. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressattributesresponsepayload.md b/docs/models/customtaskinprogressattributesresponsepayload.md new file mode 100644 index 00000000..96e46022 --- /dev/null +++ b/docs/models/customtaskinprogressattributesresponsepayload.md @@ -0,0 +1,19 @@ +# CustomTaskInProgressAttributesResponsePayload + +The current state or incremental update for the task. + + +## Supported Types + +### `models.JSONPayloadResponse` + +```python +value: models.JSONPayloadResponse = /* values here */ +``` + +### `models.JSONPatchPayloadResponse` + +```python +value: models.JSONPatchPayloadResponse = /* values here */ +``` + diff --git a/docs/models/customtaskinprogressrequest.md b/docs/models/customtaskinprogressrequest.md new file mode 100644 index 00000000..4e324363 --- /dev/null +++ b/docs/models/customtaskinprogressrequest.md @@ -0,0 +1,21 @@ +# CustomTaskInProgressRequest + +Emitted during custom task execution to report progress. + +This event supports streaming updates via JSON or JSON Patch payloads, +enabling real-time progress tracking for long-running tasks. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_IN_PROGRESS"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskInProgressAttributesRequest](../models/customtaskinprogressattributesrequest.md) | :heavy_check_mark: | Attributes for custom task in-progress events with streaming updates. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressresponse.md b/docs/models/customtaskinprogressresponse.md new file mode 100644 index 00000000..72afa91f --- /dev/null +++ b/docs/models/customtaskinprogressresponse.md @@ -0,0 +1,21 @@ +# CustomTaskInProgressResponse + +Emitted during custom task execution to report progress. + +This event supports streaming updates via JSON or JSON Patch payloads, +enabling real-time progress tracking for long-running tasks. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_IN_PROGRESS"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskInProgressAttributesResponse](../models/customtaskinprogressattributesresponse.md) | :heavy_check_mark: | Attributes for custom task in-progress events with streaming updates. | \ No newline at end of file diff --git a/docs/models/customtaskstartedattributesrequest.md b/docs/models/customtaskstartedattributesrequest.md new file mode 100644 index 00000000..ff8d50ec --- /dev/null +++ b/docs/models/customtaskstartedattributesrequest.md @@ -0,0 +1,12 @@ +# CustomTaskStartedAttributesRequest + +Attributes for custom task started events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [Optional[models.JSONPayloadRequest]](../models/jsonpayloadrequest.md) | :heavy_minus_sign: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/customtaskstartedattributesresponse.md b/docs/models/customtaskstartedattributesresponse.md new file mode 100644 index 00000000..8bf43423 --- /dev/null +++ b/docs/models/customtaskstartedattributesresponse.md @@ -0,0 +1,12 @@ +# CustomTaskStartedAttributesResponse + +Attributes for custom task started events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [Optional[models.JSONPayloadResponse]](../models/jsonpayloadresponse.md) | :heavy_minus_sign: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/customtaskstartedrequest.md b/docs/models/customtaskstartedrequest.md new file mode 100644 index 00000000..aa4dc293 --- /dev/null +++ b/docs/models/customtaskstartedrequest.md @@ -0,0 +1,21 @@ +# CustomTaskStartedRequest + +Emitted when a custom task begins execution. + +Custom tasks represent user-defined units of work within a workflow, +such as LLM calls, API requests, or data processing steps. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskStartedAttributesRequest](../models/customtaskstartedattributesrequest.md) | :heavy_check_mark: | Attributes for custom task started events. | \ No newline at end of file diff --git a/docs/models/customtaskstartedresponse.md b/docs/models/customtaskstartedresponse.md new file mode 100644 index 00000000..80b1b08b --- /dev/null +++ b/docs/models/customtaskstartedresponse.md @@ -0,0 +1,21 @@ +# CustomTaskStartedResponse + +Emitted when a custom task begins execution. + +Custom tasks represent user-defined units of work within a workflow, +such as LLM calls, API requests, or data processing steps. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskStartedAttributesResponse](../models/customtaskstartedattributesresponse.md) | :heavy_check_mark: | Attributes for custom task started events. | \ No newline at end of file diff --git a/docs/models/customtasktimedoutattributes.md b/docs/models/customtasktimedoutattributes.md new file mode 100644 index 00000000..b302b076 --- /dev/null +++ b/docs/models/customtasktimedoutattributes.md @@ -0,0 +1,12 @@ +# CustomTaskTimedOutAttributes + +Attributes for custom task timed out events. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `timeout_type` | *OptionalNullable[str]* | :heavy_minus_sign: | The type of timeout that occurred. | \ No newline at end of file diff --git a/docs/models/customtasktimedoutrequest.md b/docs/models/customtasktimedoutrequest.md new file mode 100644 index 00000000..5be6c0af --- /dev/null +++ b/docs/models/customtasktimedoutrequest.md @@ -0,0 +1,20 @@ +# CustomTaskTimedOutRequest + +Emitted when a custom task exceeds its timeout. + +Indicates the task did not complete within its configured time limit. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_TIMED_OUT"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskTimedOutAttributes](../models/customtasktimedoutattributes.md) | :heavy_check_mark: | Attributes for custom task timed out events. | \ No newline at end of file diff --git a/docs/models/customtasktimedoutresponse.md b/docs/models/customtasktimedoutresponse.md new file mode 100644 index 00000000..75d49743 --- /dev/null +++ b/docs/models/customtasktimedoutresponse.md @@ -0,0 +1,20 @@ +# CustomTaskTimedOutResponse + +Emitted when a custom task exceeds its timeout. + +Indicates the task did not complete within its configured time limit. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["CUSTOM_TASK_TIMED_OUT"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.CustomTaskTimedOutAttributes](../models/customtasktimedoutattributes.md) | :heavy_check_mark: | Attributes for custom task timed out events. | \ No newline at end of file diff --git a/docs/models/deletebatchjobresponse.md b/docs/models/deletebatchjobresponse.md new file mode 100644 index 00000000..d0df2d19 --- /dev/null +++ b/docs/models/deletebatchjobresponse.md @@ -0,0 +1,10 @@ +# DeleteBatchJobResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `object` | *Optional[Literal["batch"]]* | :heavy_minus_sign: | N/A | +| `deleted` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/deploymentdetailresponse.md b/docs/models/deploymentdetailresponse.md new file mode 100644 index 00000000..e1d84e11 --- /dev/null +++ b/docs/models/deploymentdetailresponse.md @@ -0,0 +1,13 @@ +# DeploymentDetailResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | +| `name` | *str* | :heavy_check_mark: | Deployment name | +| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | +| `workers` | List[[models.DeploymentWorkerResponse](../models/deploymentworkerresponse.md)] | :heavy_check_mark: | Workers registered for the deployment | \ No newline at end of file diff --git a/docs/models/deploymentlistresponse.md b/docs/models/deploymentlistresponse.md new file mode 100644 index 00000000..22868512 --- /dev/null +++ b/docs/models/deploymentlistresponse.md @@ -0,0 +1,8 @@ +# DeploymentListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `deployments` | List[[models.DeploymentResponse](../models/deploymentresponse.md)] | :heavy_check_mark: | List of deployments | \ No newline at end of file diff --git a/docs/models/deploymentresponse.md b/docs/models/deploymentresponse.md new file mode 100644 index 00000000..f6f12836 --- /dev/null +++ b/docs/models/deploymentresponse.md @@ -0,0 +1,12 @@ +# DeploymentResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | +| `name` | *str* | :heavy_check_mark: | Deployment name | +| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | \ No newline at end of file diff --git a/docs/models/deploymentworkerresponse.md b/docs/models/deploymentworkerresponse.md new file mode 100644 index 00000000..9b76278e --- /dev/null +++ b/docs/models/deploymentworkerresponse.md @@ -0,0 +1,10 @@ +# DeploymentWorkerResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Worker name | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the worker first registered | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the worker last registered | \ No newline at end of file diff --git a/docs/models/encodedpayloadoptions.md b/docs/models/encodedpayloadoptions.md new file mode 100644 index 00000000..15367ce6 --- /dev/null +++ b/docs/models/encodedpayloadoptions.md @@ -0,0 +1,15 @@ +# EncodedPayloadOptions + +## Example Usage + +```python +from mistralai.client.models import EncodedPayloadOptions +value: EncodedPayloadOptions = "offloaded" +``` + + +## Values + +- `"offloaded"` +- `"encrypted"` +- `"encrypted-partial"` diff --git a/docs/models/eventprogressstatus.md b/docs/models/eventprogressstatus.md new file mode 100644 index 00000000..02033178 --- /dev/null +++ b/docs/models/eventprogressstatus.md @@ -0,0 +1,19 @@ +# EventProgressStatus + +## Example Usage + +```python +from mistralai.client.models import EventProgressStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: EventProgressStatus = "RUNNING" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"RUNNING"` +- `"COMPLETED"` +- `"FAILED"` diff --git a/docs/models/eventsource.md b/docs/models/eventsource.md new file mode 100644 index 00000000..ac53ccf7 --- /dev/null +++ b/docs/models/eventsource.md @@ -0,0 +1,14 @@ +# EventSource + +## Example Usage + +```python +from mistralai.client.models import EventSource +value: EventSource = "DATABASE" +``` + + +## Values + +- `"DATABASE"` +- `"LIVE"` diff --git a/docs/models/eventtype.md b/docs/models/eventtype.md new file mode 100644 index 00000000..6add793e --- /dev/null +++ b/docs/models/eventtype.md @@ -0,0 +1,18 @@ +# EventType + +## Example Usage + +```python +from mistralai.client.models import EventType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: EventType = "EVENT" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"EVENT"` +- `"EVENT_PROGRESS"` diff --git a/docs/models/executeworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepostrequest.md b/docs/models/executeworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepostrequest.md new file mode 100644 index 00000000..54de12a2 --- /dev/null +++ b/docs/models/executeworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepostrequest.md @@ -0,0 +1,9 @@ +# ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_execution_request` | [models.WorkflowExecutionRequest](../models/workflowexecutionrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/executeworkflowv1workflowsworkflowidentifierexecutepostrequest.md b/docs/models/executeworkflowv1workflowsworkflowidentifierexecutepostrequest.md new file mode 100644 index 00000000..29c55a77 --- /dev/null +++ b/docs/models/executeworkflowv1workflowsworkflowidentifierexecutepostrequest.md @@ -0,0 +1,9 @@ +# ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `workflow_execution_request` | [models.WorkflowExecutionRequest](../models/workflowexecutionrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/failure.md b/docs/models/failure.md new file mode 100644 index 00000000..259d7bcf --- /dev/null +++ b/docs/models/failure.md @@ -0,0 +1,10 @@ +# Failure + +Represents an error or exception that occurred during execution. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `message` | *str* | :heavy_check_mark: | A human-readable description of the failure. | \ No newline at end of file diff --git a/docs/models/ftmodelcard.md b/docs/models/ftmodelcard.md index f65ff6e8..0381dd81 100644 --- a/docs/models/ftmodelcard.md +++ b/docs/models/ftmodelcard.md @@ -20,6 +20,6 @@ Extra fields for fine-tuned models. | `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `type` | *Literal["fine-tuned"]* | :heavy_check_mark: | N/A | -| `job` | *str* | :heavy_check_mark: | N/A | +| `job` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `root` | *str* | :heavy_check_mark: | N/A | | `archived` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md b/docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md new file mode 100644 index 00000000..6af056b1 --- /dev/null +++ b/docs/models/getdeploymentv1workflowsdeploymentsnamegetrequest.md @@ -0,0 +1,8 @@ +# GetDeploymentV1WorkflowsDeploymentsNameGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md b/docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md new file mode 100644 index 00000000..8d4af732 --- /dev/null +++ b/docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md @@ -0,0 +1,8 @@ +# GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `run_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getrunv1workflowsrunsrunidgetrequest.md b/docs/models/getrunv1workflowsrunsrunidgetrequest.md new file mode 100644 index 00000000..6b033690 --- /dev/null +++ b/docs/models/getrunv1workflowsrunsrunidgetrequest.md @@ -0,0 +1,8 @@ +# GetRunV1WorkflowsRunsRunIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `run_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getstreameventsv1workflowseventsstreamgetrequest.md b/docs/models/getstreameventsv1workflowseventsstreamgetrequest.md new file mode 100644 index 00000000..9b5ae174 --- /dev/null +++ b/docs/models/getstreameventsv1workflowseventsstreamgetrequest.md @@ -0,0 +1,19 @@ +# GetStreamEventsV1WorkflowsEventsStreamGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `scope` | [Optional[models.Scope]](../models/scope.md) | :heavy_minus_sign: | N/A | +| `activity_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `activity_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `workflow_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `root_workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `parent_workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `start_seq` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `metadata_filters` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `workflow_event_types` | List[[models.WorkflowEventType](../models/workfloweventtype.md)] | :heavy_minus_sign: | N/A | +| `last_event_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getstreameventsv1workflowseventsstreamgetresponsebody.md b/docs/models/getstreameventsv1workflowseventsstreamgetresponsebody.md new file mode 100644 index 00000000..18f9b639 --- /dev/null +++ b/docs/models/getstreameventsv1workflowseventsstreamgetresponsebody.md @@ -0,0 +1,13 @@ +# GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + +Stream of Server-Sent Events (SSE) + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `event` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `data` | [Optional[models.StreamEventSsePayload]](../models/streameventssepayload.md) | :heavy_minus_sign: | N/A | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `retry` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getworkfloweventsv1workflowseventslistgetrequest.md b/docs/models/getworkfloweventsv1workflowseventslistgetrequest.md new file mode 100644 index 00000000..5594402c --- /dev/null +++ b/docs/models/getworkfloweventsv1workflowseventslistgetrequest.md @@ -0,0 +1,12 @@ +# GetWorkflowEventsV1WorkflowsEventsListGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `root_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the root workflow that initiated this execution chain. | +| `workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Run ID of the workflow that emitted this event. | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor for pagination. | \ No newline at end of file diff --git a/docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md b/docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md new file mode 100644 index 00000000..dc63ca0a --- /dev/null +++ b/docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md @@ -0,0 +1,8 @@ +# GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getworkflowexecutiontraceeventsrequest.md b/docs/models/getworkflowexecutiontraceeventsrequest.md new file mode 100644 index 00000000..4a1d8021 --- /dev/null +++ b/docs/models/getworkflowexecutiontraceeventsrequest.md @@ -0,0 +1,10 @@ +# GetWorkflowExecutionTraceEventsRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `merge_same_id_events` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `include_internal_events` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getworkflowexecutiontraceotelrequest.md b/docs/models/getworkflowexecutiontraceotelrequest.md new file mode 100644 index 00000000..8c4f9be7 --- /dev/null +++ b/docs/models/getworkflowexecutiontraceotelrequest.md @@ -0,0 +1,8 @@ +# GetWorkflowExecutionTraceOtelRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getworkflowexecutiontracesummaryrequest.md b/docs/models/getworkflowexecutiontracesummaryrequest.md new file mode 100644 index 00000000..a4524bbc --- /dev/null +++ b/docs/models/getworkflowexecutiontracesummaryrequest.md @@ -0,0 +1,8 @@ +# GetWorkflowExecutionTraceSummaryRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getworkflowexecutionv1workflowsexecutionsexecutionidgetrequest.md b/docs/models/getworkflowexecutionv1workflowsexecutionsexecutionidgetrequest.md new file mode 100644 index 00000000..f9566f1c --- /dev/null +++ b/docs/models/getworkflowexecutionv1workflowsexecutionsexecutionidgetrequest.md @@ -0,0 +1,8 @@ +# GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getworkflowmetricsv1workflowsworkflownamemetricsgetrequest.md b/docs/models/getworkflowmetricsv1workflowsworkflownamemetricsgetrequest.md new file mode 100644 index 00000000..a6e623dd --- /dev/null +++ b/docs/models/getworkflowmetricsv1workflowsworkflownamemetricsgetrequest.md @@ -0,0 +1,10 @@ +# GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `workflow_name` | *str* | :heavy_check_mark: | N/A | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter workflows started after this time (ISO 8601) | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter workflows started before this time (ISO 8601) | \ No newline at end of file diff --git a/docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md b/docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md new file mode 100644 index 00000000..ee724445 --- /dev/null +++ b/docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md @@ -0,0 +1,17 @@ +# GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `workflow_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The workflow ID to filter by | +| `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | The task queue to filter by | +| `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows versions | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflow versions | +| `workflow_search` | *OptionalNullable[str]* | :heavy_minus_sign: | The workflow name to filter by | +| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | +| `with_workflow` | *Optional[bool]* | :heavy_minus_sign: | Whether to include the workflow definition | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows versions to return | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | \ No newline at end of file diff --git a/docs/models/getworkflowregistrationv1workflowsregistrationsworkflowregistrationidgetrequest.md b/docs/models/getworkflowregistrationv1workflowsregistrationsworkflowregistrationidgetrequest.md new file mode 100644 index 00000000..ec43ad56 --- /dev/null +++ b/docs/models/getworkflowregistrationv1workflowsregistrationsworkflowregistrationidgetrequest.md @@ -0,0 +1,10 @@ +# GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | +| `with_workflow` | *Optional[bool]* | :heavy_minus_sign: | Whether to include the workflow definition | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflow versions | \ No newline at end of file diff --git a/docs/models/getworkflowsv1workflowsgetrequest.md b/docs/models/getworkflowsv1workflowsgetrequest.md new file mode 100644 index 00000000..c83ed6d1 --- /dev/null +++ b/docs/models/getworkflowsv1workflowsgetrequest.md @@ -0,0 +1,13 @@ +# GetWorkflowsV1WorkflowsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | +| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | \ No newline at end of file diff --git a/docs/models/getworkflowsv1workflowsgetresponse.md b/docs/models/getworkflowsv1workflowsgetresponse.md new file mode 100644 index 00000000..6ec4f4e7 --- /dev/null +++ b/docs/models/getworkflowsv1workflowsgetresponse.md @@ -0,0 +1,8 @@ +# GetWorkflowsV1WorkflowsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `result` | [models.WorkflowListResponse](../models/workflowlistresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getworkflowv1workflowsworkflowidentifiergetrequest.md b/docs/models/getworkflowv1workflowsworkflowidentifiergetrequest.md new file mode 100644 index 00000000..2f5c2b4d --- /dev/null +++ b/docs/models/getworkflowv1workflowsworkflowidentifiergetrequest.md @@ -0,0 +1,8 @@ +# GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/jobsapiroutesbatchdeletebatchjobrequest.md b/docs/models/jobsapiroutesbatchdeletebatchjobrequest.md new file mode 100644 index 00000000..02f1ec24 --- /dev/null +++ b/docs/models/jobsapiroutesbatchdeletebatchjobrequest.md @@ -0,0 +1,8 @@ +# JobsAPIRoutesBatchDeleteBatchJobRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `job_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/jsonpatchadd.md b/docs/models/jsonpatchadd.md new file mode 100644 index 00000000..2a091c8a --- /dev/null +++ b/docs/models/jsonpatchadd.md @@ -0,0 +1,10 @@ +# JSONPatchAdd + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | *str* | :heavy_check_mark: | A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations. | +| `value` | *Any* | :heavy_check_mark: | The value to use for the operation | +| `op` | *Literal["add"]* | :heavy_check_mark: | Add operation | \ No newline at end of file diff --git a/docs/models/jsonpatchappend.md b/docs/models/jsonpatchappend.md new file mode 100644 index 00000000..684cc896 --- /dev/null +++ b/docs/models/jsonpatchappend.md @@ -0,0 +1,10 @@ +# JSONPatchAppend + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | *str* | :heavy_check_mark: | A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations. | +| `value` | *str* | :heavy_check_mark: | The value to use for the operation. A string to append to the existing value | +| `op` | *Literal["append"]* | :heavy_check_mark: | 'append' is an extension for efficient string concatenation in streaming scenarios. | \ No newline at end of file diff --git a/docs/models/jsonpatchpayloadrequest.md b/docs/models/jsonpatchpayloadrequest.md new file mode 100644 index 00000000..fb4da675 --- /dev/null +++ b/docs/models/jsonpatchpayloadrequest.md @@ -0,0 +1,13 @@ +# JSONPatchPayloadRequest + +A payload containing a list of JSON Patch operations. + +Used for streaming incremental updates to workflow state. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `type` | *Literal["json_patch"]* | :heavy_check_mark: | Discriminator indicating this is a JSON Patch payload. | +| `value` | List[[models.JSONPatchPayloadRequestValue](../models/jsonpatchpayloadrequestvalue.md)] | :heavy_check_mark: | The list of JSON Patch operations to apply in order. | \ No newline at end of file diff --git a/docs/models/jsonpatchpayloadrequestvalue.md b/docs/models/jsonpatchpayloadrequestvalue.md new file mode 100644 index 00000000..d58a1323 --- /dev/null +++ b/docs/models/jsonpatchpayloadrequestvalue.md @@ -0,0 +1,29 @@ +# JSONPatchPayloadRequestValue + + +## Supported Types + +### `models.JSONPatchAdd` + +```python +value: models.JSONPatchAdd = /* values here */ +``` + +### `models.JSONPatchAppend` + +```python +value: models.JSONPatchAppend = /* values here */ +``` + +### `models.JSONPatchRemove` + +```python +value: models.JSONPatchRemove = /* values here */ +``` + +### `models.JSONPatchReplace` + +```python +value: models.JSONPatchReplace = /* values here */ +``` + diff --git a/docs/models/jsonpatchpayloadresponse.md b/docs/models/jsonpatchpayloadresponse.md new file mode 100644 index 00000000..ce9dbd90 --- /dev/null +++ b/docs/models/jsonpatchpayloadresponse.md @@ -0,0 +1,13 @@ +# JSONPatchPayloadResponse + +A payload containing a list of JSON Patch operations. + +Used for streaming incremental updates to workflow state. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `type` | *Literal["json_patch"]* | :heavy_check_mark: | Discriminator indicating this is a JSON Patch payload. | +| `value` | List[[models.JSONPatchPayloadResponseValue](../models/jsonpatchpayloadresponsevalue.md)] | :heavy_check_mark: | The list of JSON Patch operations to apply in order. | \ No newline at end of file diff --git a/docs/models/jsonpatchpayloadresponsevalue.md b/docs/models/jsonpatchpayloadresponsevalue.md new file mode 100644 index 00000000..21c7d186 --- /dev/null +++ b/docs/models/jsonpatchpayloadresponsevalue.md @@ -0,0 +1,29 @@ +# JSONPatchPayloadResponseValue + + +## Supported Types + +### `models.JSONPatchAdd` + +```python +value: models.JSONPatchAdd = /* values here */ +``` + +### `models.JSONPatchAppend` + +```python +value: models.JSONPatchAppend = /* values here */ +``` + +### `models.JSONPatchRemove` + +```python +value: models.JSONPatchRemove = /* values here */ +``` + +### `models.JSONPatchReplace` + +```python +value: models.JSONPatchReplace = /* values here */ +``` + diff --git a/docs/models/jsonpatchremove.md b/docs/models/jsonpatchremove.md new file mode 100644 index 00000000..735305cf --- /dev/null +++ b/docs/models/jsonpatchremove.md @@ -0,0 +1,10 @@ +# JSONPatchRemove + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | *str* | :heavy_check_mark: | A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations. | +| `value` | *Any* | :heavy_check_mark: | The value to use for the operation | +| `op` | *Literal["remove"]* | :heavy_check_mark: | Remove operation | \ No newline at end of file diff --git a/docs/models/jsonpatchreplace.md b/docs/models/jsonpatchreplace.md new file mode 100644 index 00000000..382b7d93 --- /dev/null +++ b/docs/models/jsonpatchreplace.md @@ -0,0 +1,10 @@ +# JSONPatchReplace + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `path` | *str* | :heavy_check_mark: | A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations. | +| `value` | *Any* | :heavy_check_mark: | The value to use for the operation | +| `op` | *Literal["replace"]* | :heavy_check_mark: | Replace operation | \ No newline at end of file diff --git a/docs/models/jsonpayloadrequest.md b/docs/models/jsonpayloadrequest.md new file mode 100644 index 00000000..63ec2142 --- /dev/null +++ b/docs/models/jsonpayloadrequest.md @@ -0,0 +1,13 @@ +# JSONPayloadRequest + +A payload containing arbitrary JSON data. + +Used for complete state snapshots or final results. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *Optional[Literal["json"]]* | :heavy_minus_sign: | Discriminator indicating this is a raw JSON payload. | +| `value` | *Any* | :heavy_check_mark: | The JSON-serializable payload value. | \ No newline at end of file diff --git a/docs/models/jsonpayloadresponse.md b/docs/models/jsonpayloadresponse.md new file mode 100644 index 00000000..01eaae61 --- /dev/null +++ b/docs/models/jsonpayloadresponse.md @@ -0,0 +1,13 @@ +# JSONPayloadResponse + +A payload containing arbitrary JSON data. + +Used for complete state snapshots or final results. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *Optional[Literal["json"]]* | :heavy_minus_sign: | Discriminator indicating this is a raw JSON payload. | +| `value` | *Any* | :heavy_check_mark: | The JSON-serializable payload value. | \ No newline at end of file diff --git a/docs/models/librarieslistv1request.md b/docs/models/librarieslistv1request.md new file mode 100644 index 00000000..b9f99a17 --- /dev/null +++ b/docs/models/librarieslistv1request.md @@ -0,0 +1,9 @@ +# LibrariesListV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/listdeploymentsv1workflowsdeploymentsgetrequest.md b/docs/models/listdeploymentsv1workflowsdeploymentsgetrequest.md new file mode 100644 index 00000000..c93c0dbb --- /dev/null +++ b/docs/models/listdeploymentsv1workflowsdeploymentsgetrequest.md @@ -0,0 +1,9 @@ +# ListDeploymentsV1WorkflowsDeploymentsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `active_only` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `workflow_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/listlibrariesresponse.md b/docs/models/listlibrariesresponse.md index e21b9ced..18cb63c1 100644 --- a/docs/models/listlibrariesresponse.md +++ b/docs/models/listlibrariesresponse.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `data` | List[[models.Library](../models/library.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `pagination` | [models.PaginationInfo](../models/paginationinfo.md) | :heavy_check_mark: | N/A | +| `data` | List[[models.Library](../models/library.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listrunsv1workflowsrunsgetrequest.md b/docs/models/listrunsv1workflowsrunsgetrequest.md new file mode 100644 index 00000000..259876c6 --- /dev/null +++ b/docs/models/listrunsv1workflowsrunsgetrequest.md @@ -0,0 +1,12 @@ +# ListRunsV1WorkflowsRunsGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | +| `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | \ No newline at end of file diff --git a/docs/models/listrunsv1workflowsrunsgetresponse.md b/docs/models/listrunsv1workflowsrunsgetresponse.md new file mode 100644 index 00000000..405119b0 --- /dev/null +++ b/docs/models/listrunsv1workflowsrunsgetresponse.md @@ -0,0 +1,8 @@ +# ListRunsV1WorkflowsRunsGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `result` | [models.WorkflowExecutionListResponse](../models/workflowexecutionlistresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/listrunsv1workflowsrunsgetstatus.md b/docs/models/listrunsv1workflowsrunsgetstatus.md new file mode 100644 index 00000000..e6f0d606 --- /dev/null +++ b/docs/models/listrunsv1workflowsrunsgetstatus.md @@ -0,0 +1,19 @@ +# ListRunsV1WorkflowsRunsGetStatus + +Filter by workflow status + + +## Supported Types + +### `models.WorkflowExecutionStatus` + +```python +value: models.WorkflowExecutionStatus = /* values here */ +``` + +### `List[models.WorkflowExecutionStatus]` + +```python +value: List[models.WorkflowExecutionStatus] = /* values here */ +``` + diff --git a/docs/models/listvoicesv1audiovoicesgetrequest.md b/docs/models/listvoicesv1audiovoicesgetrequest.md index f767d309..67c04d7c 100644 --- a/docs/models/listvoicesv1audiovoicesgetrequest.md +++ b/docs/models/listvoicesv1audiovoicesgetrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of voices to return | -| `offset` | *Optional[int]* | :heavy_minus_sign: | Offset for pagination | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of voices to return | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Offset for pagination | +| `type` | [Optional[models.ListVoicesV1AudioVoicesGetType]](../models/listvoicesv1audiovoicesgettype.md) | :heavy_minus_sign: | Filter the voices between customs and presets | \ No newline at end of file diff --git a/docs/models/listvoicesv1audiovoicesgettype.md b/docs/models/listvoicesv1audiovoicesgettype.md new file mode 100644 index 00000000..a44f95b3 --- /dev/null +++ b/docs/models/listvoicesv1audiovoicesgettype.md @@ -0,0 +1,17 @@ +# ListVoicesV1AudioVoicesGetType + +Filter the voices between customs and presets + +## Example Usage + +```python +from mistralai.client.models import ListVoicesV1AudioVoicesGetType +value: ListVoicesV1AudioVoicesGetType = "all" +``` + + +## Values + +- `"all"` +- `"custom"` +- `"preset"` diff --git a/docs/models/listworkfloweventresponse.md b/docs/models/listworkfloweventresponse.md new file mode 100644 index 00000000..72c51a16 --- /dev/null +++ b/docs/models/listworkfloweventresponse.md @@ -0,0 +1,9 @@ +# ListWorkflowEventResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `events` | List[[models.ListWorkflowEventResponseEvent](../models/listworkfloweventresponseevent.md)] | :heavy_check_mark: | List of workflow events. | +| `next_cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor for pagination. | \ No newline at end of file diff --git a/docs/models/listworkfloweventresponseevent.md b/docs/models/listworkfloweventresponseevent.md new file mode 100644 index 00000000..2b8cb1e4 --- /dev/null +++ b/docs/models/listworkfloweventresponseevent.md @@ -0,0 +1,107 @@ +# ListWorkflowEventResponseEvent + + +## Supported Types + +### `models.WorkflowExecutionStartedResponse` + +```python +value: models.WorkflowExecutionStartedResponse = /* values here */ +``` + +### `models.WorkflowExecutionCompletedResponse` + +```python +value: models.WorkflowExecutionCompletedResponse = /* values here */ +``` + +### `models.WorkflowExecutionFailedResponse` + +```python +value: models.WorkflowExecutionFailedResponse = /* values here */ +``` + +### `models.WorkflowExecutionCanceledResponse` + +```python +value: models.WorkflowExecutionCanceledResponse = /* values here */ +``` + +### `models.WorkflowExecutionContinuedAsNewResponse` + +```python +value: models.WorkflowExecutionContinuedAsNewResponse = /* values here */ +``` + +### `models.WorkflowTaskTimedOutResponse` + +```python +value: models.WorkflowTaskTimedOutResponse = /* values here */ +``` + +### `models.WorkflowTaskFailedResponse` + +```python +value: models.WorkflowTaskFailedResponse = /* values here */ +``` + +### `models.CustomTaskStartedResponse` + +```python +value: models.CustomTaskStartedResponse = /* values here */ +``` + +### `models.CustomTaskInProgressResponse` + +```python +value: models.CustomTaskInProgressResponse = /* values here */ +``` + +### `models.CustomTaskCompletedResponse` + +```python +value: models.CustomTaskCompletedResponse = /* values here */ +``` + +### `models.CustomTaskFailedResponse` + +```python +value: models.CustomTaskFailedResponse = /* values here */ +``` + +### `models.CustomTaskTimedOutResponse` + +```python +value: models.CustomTaskTimedOutResponse = /* values here */ +``` + +### `models.CustomTaskCanceledResponse` + +```python +value: models.CustomTaskCanceledResponse = /* values here */ +``` + +### `models.ActivityTaskStartedResponse` + +```python +value: models.ActivityTaskStartedResponse = /* values here */ +``` + +### `models.ActivityTaskCompletedResponse` + +```python +value: models.ActivityTaskCompletedResponse = /* values here */ +``` + +### `models.ActivityTaskRetryingResponse` + +```python +value: models.ActivityTaskRetryingResponse = /* values here */ +``` + +### `models.ActivityTaskFailedResponse` + +```python +value: models.ActivityTaskFailedResponse = /* values here */ +``` + diff --git a/docs/models/networkencodedinput.md b/docs/models/networkencodedinput.md new file mode 100644 index 00000000..71e38615 --- /dev/null +++ b/docs/models/networkencodedinput.md @@ -0,0 +1,10 @@ +# NetworkEncodedInput + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `b64payload` | *str* | :heavy_check_mark: | The encoded payload | +| `encoding_options` | List[[models.EncodedPayloadOptions](../models/encodedpayloadoptions.md)] | :heavy_minus_sign: | The encoding of the payload | +| `empty` | *Optional[bool]* | :heavy_minus_sign: | Whether the payload is empty | \ No newline at end of file diff --git a/docs/models/querydefinition.md b/docs/models/querydefinition.md new file mode 100644 index 00000000..9d094fda --- /dev/null +++ b/docs/models/querydefinition.md @@ -0,0 +1,11 @@ +# QueryDefinition + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Name of the query | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the query | +| `input_schema` | Dict[str, *Any*] | :heavy_check_mark: | Input JSON schema of the query's model | +| `output_schema` | Dict[str, *Any*] | :heavy_minus_sign: | Output JSON schema of the query's model | \ No newline at end of file diff --git a/docs/models/queryinvocationbody.md b/docs/models/queryinvocationbody.md new file mode 100644 index 00000000..3d4e5441 --- /dev/null +++ b/docs/models/queryinvocationbody.md @@ -0,0 +1,9 @@ +# QueryInvocationBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | The name of the query to request | +| `input` | [OptionalNullable[models.QueryInvocationBodyInput]](../models/queryinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the query, matching its schema | \ No newline at end of file diff --git a/docs/models/queryinvocationbodyinput.md b/docs/models/queryinvocationbodyinput.md new file mode 100644 index 00000000..deb0db27 --- /dev/null +++ b/docs/models/queryinvocationbodyinput.md @@ -0,0 +1,19 @@ +# QueryInvocationBodyInput + +Input data for the query, matching its schema + + +## Supported Types + +### `models.NetworkEncodedInput` + +```python +value: models.NetworkEncodedInput = /* values here */ +``` + +### `Dict[str, Any]` + +```python +value: Dict[str, Any] = /* values here */ +``` + diff --git a/docs/models/queryworkflowexecutionv1workflowsexecutionsexecutionidqueriespostrequest.md b/docs/models/queryworkflowexecutionv1workflowsexecutionsexecutionidqueriespostrequest.md new file mode 100644 index 00000000..0e0d378d --- /dev/null +++ b/docs/models/queryworkflowexecutionv1workflowsexecutionsexecutionidqueriespostrequest.md @@ -0,0 +1,9 @@ +# QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `query_invocation_body` | [models.QueryInvocationBody](../models/queryinvocationbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/queryworkflowresponse.md b/docs/models/queryworkflowresponse.md new file mode 100644 index 00000000..cc5b0866 --- /dev/null +++ b/docs/models/queryworkflowresponse.md @@ -0,0 +1,9 @@ +# QueryWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `query_name` | *str* | :heavy_check_mark: | N/A | +| `result` | *Any* | :heavy_check_mark: | The result of the Query workflow call | \ No newline at end of file diff --git a/docs/models/resetinvocationbody.md b/docs/models/resetinvocationbody.md new file mode 100644 index 00000000..9f306e2d --- /dev/null +++ b/docs/models/resetinvocationbody.md @@ -0,0 +1,11 @@ +# ResetInvocationBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `event_id` | *int* | :heavy_check_mark: | The event ID to reset the workflow execution to | +| `reason` | *OptionalNullable[str]* | :heavy_minus_sign: | Reason for resetting the workflow execution | +| `exclude_signals` | *Optional[bool]* | :heavy_minus_sign: | Whether to exclude signals that happened after the reset point | +| `exclude_updates` | *Optional[bool]* | :heavy_minus_sign: | Whether to exclude updates that happened after the reset point | \ No newline at end of file diff --git a/docs/models/resetworkflowv1workflowsexecutionsexecutionidresetpostrequest.md b/docs/models/resetworkflowv1workflowsexecutionsexecutionidresetpostrequest.md new file mode 100644 index 00000000..418c6c5a --- /dev/null +++ b/docs/models/resetworkflowv1workflowsexecutionsexecutionidresetpostrequest.md @@ -0,0 +1,9 @@ +# ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `reset_invocation_body` | [models.ResetInvocationBody](../models/resetinvocationbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/responseconnectorlisttoolsv1.md b/docs/models/responseconnectorlisttoolsv1.md new file mode 100644 index 00000000..18a31c56 --- /dev/null +++ b/docs/models/responseconnectorlisttoolsv1.md @@ -0,0 +1,25 @@ +# ResponseConnectorListToolsV1 + +Successful Response + + +## Supported Types + +### `List[models.ConnectorTool]` + +```python +value: List[models.ConnectorTool] = /* values here */ +``` + +### `List[models.MCPTool]` + +```python +value: List[models.MCPTool] = /* values here */ +``` + +### `List[Dict[str, Any]]` + +```python +value: List[Dict[str, Any]] = /* values here */ +``` + diff --git a/docs/models/responseconnectorlisttoolsv11.md b/docs/models/responseconnectorlisttoolsv11.md deleted file mode 100644 index 9b5c98c6..00000000 --- a/docs/models/responseconnectorlisttoolsv11.md +++ /dev/null @@ -1,17 +0,0 @@ -# ResponseConnectorListToolsV11 - - -## Supported Types - -### `models.ConnectorTool` - -```python -value: models.ConnectorTool = /* values here */ -``` - -### `models.MCPTool` - -```python -value: models.MCPTool = /* values here */ -``` - diff --git a/docs/models/responseconnectorlisttoolsv12.md b/docs/models/responseconnectorlisttoolsv12.md deleted file mode 100644 index 0266f66d..00000000 --- a/docs/models/responseconnectorlisttoolsv12.md +++ /dev/null @@ -1,19 +0,0 @@ -# ResponseConnectorListToolsV12 - -Successful Response - - -## Supported Types - -### `List[models.ResponseConnectorListToolsV11]` - -```python -value: List[models.ResponseConnectorListToolsV11] = /* values here */ -``` - -### `List[Dict[str, Any]]` - -```python -value: List[Dict[str, Any]] = /* values here */ -``` - diff --git a/docs/models/responseexecuteworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.md b/docs/models/responseexecuteworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.md new file mode 100644 index 00000000..381987b6 --- /dev/null +++ b/docs/models/responseexecuteworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.md @@ -0,0 +1,19 @@ +# ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost + +Successful Response + + +## Supported Types + +### `models.WorkflowExecutionResponse` + +```python +value: models.WorkflowExecutionResponse = /* values here */ +``` + +### `models.WorkflowExecutionSyncResponse` + +```python +value: models.WorkflowExecutionSyncResponse = /* values here */ +``` + diff --git a/docs/models/responseexecuteworkflowv1workflowsworkflowidentifierexecutepost.md b/docs/models/responseexecuteworkflowv1workflowsworkflowidentifierexecutepost.md new file mode 100644 index 00000000..368f2318 --- /dev/null +++ b/docs/models/responseexecuteworkflowv1workflowsworkflowidentifierexecutepost.md @@ -0,0 +1,19 @@ +# ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost + +Successful Response + + +## Supported Types + +### `models.WorkflowExecutionResponse` + +```python +value: models.WorkflowExecutionResponse = /* values here */ +``` + +### `models.WorkflowExecutionSyncResponse` + +```python +value: models.WorkflowExecutionSyncResponse = /* values here */ +``` + diff --git a/docs/models/scalarmetric.md b/docs/models/scalarmetric.md new file mode 100644 index 00000000..96b93231 --- /dev/null +++ b/docs/models/scalarmetric.md @@ -0,0 +1,10 @@ +# ScalarMetric + +Scalar metric with a single value. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `value` | [models.ScalarMetricValue](../models/scalarmetricvalue.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/scalarmetricvalue.md b/docs/models/scalarmetricvalue.md new file mode 100644 index 00000000..6723310e --- /dev/null +++ b/docs/models/scalarmetricvalue.md @@ -0,0 +1,17 @@ +# ScalarMetricValue + + +## Supported Types + +### `int` + +```python +value: int = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + diff --git a/docs/models/schedulecalendar.md b/docs/models/schedulecalendar.md new file mode 100644 index 00000000..4166bef5 --- /dev/null +++ b/docs/models/schedulecalendar.md @@ -0,0 +1,15 @@ +# ScheduleCalendar + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `second` | List[[models.ScheduleRange](../models/schedulerange.md)] | :heavy_minus_sign: | N/A | +| `minute` | List[[models.ScheduleRange](../models/schedulerange.md)] | :heavy_minus_sign: | N/A | +| `hour` | List[[models.ScheduleRange](../models/schedulerange.md)] | :heavy_minus_sign: | N/A | +| `day_of_month` | List[[models.ScheduleRange](../models/schedulerange.md)] | :heavy_minus_sign: | N/A | +| `month` | List[[models.ScheduleRange](../models/schedulerange.md)] | :heavy_minus_sign: | N/A | +| `year` | List[[models.ScheduleRange](../models/schedulerange.md)] | :heavy_minus_sign: | N/A | +| `day_of_week` | List[[models.ScheduleRange](../models/schedulerange.md)] | :heavy_minus_sign: | N/A | +| `comment` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/scheduledefinition.md b/docs/models/scheduledefinition.md new file mode 100644 index 00000000..4f8f8b80 --- /dev/null +++ b/docs/models/scheduledefinition.md @@ -0,0 +1,25 @@ +# ScheduleDefinition + +Specification of the times scheduled actions may occur. + +The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and +:py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + +Used for input where schedule_id is optional (can be provided or auto-generated). + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | *Any* | :heavy_check_mark: | Input to provide to the workflow when starting it. | +| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | +| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | +| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | +| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | +| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | +| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | +| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| +| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | +| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | +| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the schedule. | \ No newline at end of file diff --git a/docs/models/scheduledefinitionoutput.md b/docs/models/scheduledefinitionoutput.md new file mode 100644 index 00000000..c4937c69 --- /dev/null +++ b/docs/models/scheduledefinitionoutput.md @@ -0,0 +1,22 @@ +# ScheduleDefinitionOutput + +Output representation of a schedule with required schedule_id. + +Used when returning schedules from the API where schedule_id is always present. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | *Any* | :heavy_check_mark: | Input to provide to the workflow when starting it. | +| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | +| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | +| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | +| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | +| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | +| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | +| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| +| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | +| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | +| `schedule_id` | *str* | :heavy_check_mark: | Unique identifier for the schedule. | \ No newline at end of file diff --git a/docs/models/scheduleinterval.md b/docs/models/scheduleinterval.md new file mode 100644 index 00000000..e99d552f --- /dev/null +++ b/docs/models/scheduleinterval.md @@ -0,0 +1,9 @@ +# ScheduleInterval + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `every` | *str* | :heavy_check_mark: | N/A | +| `offset` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/scheduleoverlappolicy.md b/docs/models/scheduleoverlappolicy.md new file mode 100644 index 00000000..1df8c0ea --- /dev/null +++ b/docs/models/scheduleoverlappolicy.md @@ -0,0 +1,25 @@ +# ScheduleOverlapPolicy + +Controls what happens when a workflow would be started by a schedule but +one is already running. + +## Example Usage + +```python +from mistralai.client.models import ScheduleOverlapPolicy + +# Open enum: unrecognized values are captured as UnrecognizedInt +value: ScheduleOverlapPolicy = 1 +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `1` +- `2` +- `3` +- `4` +- `5` +- `6` diff --git a/docs/models/schedulepolicy.md b/docs/models/schedulepolicy.md new file mode 100644 index 00000000..5f079049 --- /dev/null +++ b/docs/models/schedulepolicy.md @@ -0,0 +1,10 @@ +# SchedulePolicy + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `catchup_window_seconds` | *Optional[int]* | :heavy_minus_sign: | After a Temporal server is unavailable, amount of time in seconds in the past to execute missed actions. | +| `overlap` | [Optional[models.ScheduleOverlapPolicy]](../models/scheduleoverlappolicy.md) | :heavy_minus_sign: | Controls what happens when a workflow would be started by a schedule but
one is already running. | +| `pause_on_failure` | *Optional[bool]* | :heavy_minus_sign: | Whether to pause the schedule after a workflow failure. | \ No newline at end of file diff --git a/docs/models/schedulerange.md b/docs/models/schedulerange.md new file mode 100644 index 00000000..d6cb0975 --- /dev/null +++ b/docs/models/schedulerange.md @@ -0,0 +1,10 @@ +# ScheduleRange + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `start` | *int* | :heavy_check_mark: | N/A | +| `end` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `step` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/scope.md b/docs/models/scope.md new file mode 100644 index 00000000..0dc29aa5 --- /dev/null +++ b/docs/models/scope.md @@ -0,0 +1,15 @@ +# Scope + +## Example Usage + +```python +from mistralai.client.models import Scope +value: Scope = "activity" +``` + + +## Values + +- `"activity"` +- `"workflow"` +- `"*"` diff --git a/docs/models/signaldefinition.md b/docs/models/signaldefinition.md new file mode 100644 index 00000000..c1974f70 --- /dev/null +++ b/docs/models/signaldefinition.md @@ -0,0 +1,10 @@ +# SignalDefinition + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Name of the signal | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the signal | +| `input_schema` | Dict[str, *Any*] | :heavy_check_mark: | Input JSON schema of the signal's model | \ No newline at end of file diff --git a/docs/models/signalinvocationbody.md b/docs/models/signalinvocationbody.md new file mode 100644 index 00000000..14dc23e0 --- /dev/null +++ b/docs/models/signalinvocationbody.md @@ -0,0 +1,9 @@ +# SignalInvocationBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the signal to send | +| `input` | [OptionalNullable[models.SignalInvocationBodyInput]](../models/signalinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the signal, matching its schema | \ No newline at end of file diff --git a/docs/models/signalinvocationbodyinput.md b/docs/models/signalinvocationbodyinput.md new file mode 100644 index 00000000..e9308bcb --- /dev/null +++ b/docs/models/signalinvocationbodyinput.md @@ -0,0 +1,19 @@ +# SignalInvocationBodyInput + +Input data for the signal, matching its schema + + +## Supported Types + +### `models.SignalInvocationBodyNetworkEncodedInput` + +```python +value: models.SignalInvocationBodyNetworkEncodedInput = /* values here */ +``` + +### `Dict[str, Any]` + +```python +value: Dict[str, Any] = /* values here */ +``` + diff --git a/docs/models/signalinvocationbodynetworkencodedinput.md b/docs/models/signalinvocationbodynetworkencodedinput.md new file mode 100644 index 00000000..09368656 --- /dev/null +++ b/docs/models/signalinvocationbodynetworkencodedinput.md @@ -0,0 +1,11 @@ +# SignalInvocationBodyNetworkEncodedInput + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `b64payload` | *str* | :heavy_check_mark: | The encoded payload | +| `encoding_options` | List[[models.EncodedPayloadOptions](../models/encodedpayloadoptions.md)] | :heavy_minus_sign: | The encoding of the payload | +| `empty` | *Optional[bool]* | :heavy_minus_sign: | Whether the payload is empty | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/signalworkflowexecutionv1workflowsexecutionsexecutionidsignalspostrequest.md b/docs/models/signalworkflowexecutionv1workflowsexecutionsexecutionidsignalspostrequest.md new file mode 100644 index 00000000..2ca356d8 --- /dev/null +++ b/docs/models/signalworkflowexecutionv1workflowsexecutionsexecutionidsignalspostrequest.md @@ -0,0 +1,9 @@ +# SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `signal_invocation_body` | [models.SignalInvocationBody](../models/signalinvocationbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/signalworkflowresponse.md b/docs/models/signalworkflowresponse.md new file mode 100644 index 00000000..f65d7924 --- /dev/null +++ b/docs/models/signalworkflowresponse.md @@ -0,0 +1,8 @@ +# SignalWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `message` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/streameventssepayload.md b/docs/models/streameventssepayload.md new file mode 100644 index 00000000..6ec6726a --- /dev/null +++ b/docs/models/streameventssepayload.md @@ -0,0 +1,13 @@ +# StreamEventSsePayload + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `stream` | *str* | :heavy_check_mark: | N/A | +| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `data` | [models.StreamEventSsePayloadData](../models/streameventssepayloaddata.md) | :heavy_check_mark: | N/A | +| `workflow_context` | [models.StreamEventWorkflowContext](../models/streameventworkflowcontext.md) | :heavy_check_mark: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `broker_sequence` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/streameventssepayloaddata.md b/docs/models/streameventssepayloaddata.md new file mode 100644 index 00000000..61e65562 --- /dev/null +++ b/docs/models/streameventssepayloaddata.md @@ -0,0 +1,107 @@ +# StreamEventSsePayloadData + + +## Supported Types + +### `models.WorkflowExecutionStartedResponse` + +```python +value: models.WorkflowExecutionStartedResponse = /* values here */ +``` + +### `models.WorkflowExecutionCompletedResponse` + +```python +value: models.WorkflowExecutionCompletedResponse = /* values here */ +``` + +### `models.WorkflowExecutionFailedResponse` + +```python +value: models.WorkflowExecutionFailedResponse = /* values here */ +``` + +### `models.WorkflowExecutionCanceledResponse` + +```python +value: models.WorkflowExecutionCanceledResponse = /* values here */ +``` + +### `models.WorkflowExecutionContinuedAsNewResponse` + +```python +value: models.WorkflowExecutionContinuedAsNewResponse = /* values here */ +``` + +### `models.WorkflowTaskTimedOutResponse` + +```python +value: models.WorkflowTaskTimedOutResponse = /* values here */ +``` + +### `models.WorkflowTaskFailedResponse` + +```python +value: models.WorkflowTaskFailedResponse = /* values here */ +``` + +### `models.CustomTaskStartedResponse` + +```python +value: models.CustomTaskStartedResponse = /* values here */ +``` + +### `models.CustomTaskInProgressResponse` + +```python +value: models.CustomTaskInProgressResponse = /* values here */ +``` + +### `models.CustomTaskCompletedResponse` + +```python +value: models.CustomTaskCompletedResponse = /* values here */ +``` + +### `models.CustomTaskFailedResponse` + +```python +value: models.CustomTaskFailedResponse = /* values here */ +``` + +### `models.CustomTaskTimedOutResponse` + +```python +value: models.CustomTaskTimedOutResponse = /* values here */ +``` + +### `models.CustomTaskCanceledResponse` + +```python +value: models.CustomTaskCanceledResponse = /* values here */ +``` + +### `models.ActivityTaskStartedResponse` + +```python +value: models.ActivityTaskStartedResponse = /* values here */ +``` + +### `models.ActivityTaskCompletedResponse` + +```python +value: models.ActivityTaskCompletedResponse = /* values here */ +``` + +### `models.ActivityTaskRetryingResponse` + +```python +value: models.ActivityTaskRetryingResponse = /* values here */ +``` + +### `models.ActivityTaskFailedResponse` + +```python +value: models.ActivityTaskFailedResponse = /* values here */ +``` + diff --git a/docs/models/streameventworkflowcontext.md b/docs/models/streameventworkflowcontext.md new file mode 100644 index 00000000..098f48fd --- /dev/null +++ b/docs/models/streameventworkflowcontext.md @@ -0,0 +1,12 @@ +# StreamEventWorkflowContext + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `namespace` | *str* | :heavy_check_mark: | N/A | +| `workflow_name` | *str* | :heavy_check_mark: | N/A | +| `workflow_exec_id` | *str* | :heavy_check_mark: | N/A | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `root_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/streamv1workflowsexecutionsexecutionidstreamgetrequest.md b/docs/models/streamv1workflowsexecutionsexecutionidstreamgetrequest.md new file mode 100644 index 00000000..19d02a40 --- /dev/null +++ b/docs/models/streamv1workflowsexecutionsexecutionidstreamgetrequest.md @@ -0,0 +1,10 @@ +# StreamV1WorkflowsExecutionsExecutionIDStreamGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `event_source` | [OptionalNullable[models.EventSource]](../models/eventsource.md) | :heavy_minus_sign: | N/A | +| `last_event_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/streamv1workflowsexecutionsexecutionidstreamgetresponsebody.md b/docs/models/streamv1workflowsexecutionsexecutionidstreamgetresponsebody.md new file mode 100644 index 00000000..e12bb938 --- /dev/null +++ b/docs/models/streamv1workflowsexecutionsexecutionidstreamgetresponsebody.md @@ -0,0 +1,13 @@ +# StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody + +Stream of Server-Sent Events (SSE) + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `event` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `data` | [Optional[models.StreamEventSsePayload]](../models/streameventssepayload.md) | :heavy_minus_sign: | N/A | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `retry` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/tempogettraceresponse.md b/docs/models/tempogettraceresponse.md new file mode 100644 index 00000000..cc4a4e93 --- /dev/null +++ b/docs/models/tempogettraceresponse.md @@ -0,0 +1,14 @@ +# TempoGetTraceResponse + +Trace response in OpenTelemetry format. + +This is the unified trace format used across all trace providers (Tempo, ClickHouse, etc.). +Regardless of the underlying backend, all trace data is normalized to this Tempo-compatible +OpenTelemetry format to ensure consistency in the API response structure. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `batches` | List[[models.TempoTraceBatch](../models/tempotracebatch.md)] | :heavy_minus_sign: | The batches of the trace | \ No newline at end of file diff --git a/docs/models/tempotraceattribute.md b/docs/models/tempotraceattribute.md new file mode 100644 index 00000000..6061df86 --- /dev/null +++ b/docs/models/tempotraceattribute.md @@ -0,0 +1,9 @@ +# TempoTraceAttribute + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `key` | *str* | :heavy_check_mark: | The key of the attribute | +| `value` | [models.TempoTraceAttributeValue](../models/tempotraceattributevalue.md) | :heavy_check_mark: | The value of the attribute | \ No newline at end of file diff --git a/docs/models/tempotraceattributeboolvalue.md b/docs/models/tempotraceattributeboolvalue.md new file mode 100644 index 00000000..07b77e43 --- /dev/null +++ b/docs/models/tempotraceattributeboolvalue.md @@ -0,0 +1,8 @@ +# TempoTraceAttributeBoolValue + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `bool_value` | *bool* | :heavy_check_mark: | The boolean value of the attribute | \ No newline at end of file diff --git a/docs/models/tempotraceattributeintvalue.md b/docs/models/tempotraceattributeintvalue.md new file mode 100644 index 00000000..5c47f1eb --- /dev/null +++ b/docs/models/tempotraceattributeintvalue.md @@ -0,0 +1,8 @@ +# TempoTraceAttributeIntValue + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `int_value` | *str* | :heavy_check_mark: | The integer value of the attribute | \ No newline at end of file diff --git a/docs/models/tempotraceattributestringvalue.md b/docs/models/tempotraceattributestringvalue.md new file mode 100644 index 00000000..61e7eb8a --- /dev/null +++ b/docs/models/tempotraceattributestringvalue.md @@ -0,0 +1,8 @@ +# TempoTraceAttributeStringValue + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `string_value` | *str* | :heavy_check_mark: | The string value of the attribute | \ No newline at end of file diff --git a/docs/models/tempotraceattributevalue.md b/docs/models/tempotraceattributevalue.md new file mode 100644 index 00000000..eb448c3b --- /dev/null +++ b/docs/models/tempotraceattributevalue.md @@ -0,0 +1,25 @@ +# TempoTraceAttributeValue + +The value of the attribute + + +## Supported Types + +### `models.TempoTraceAttributeStringValue` + +```python +value: models.TempoTraceAttributeStringValue = /* values here */ +``` + +### `models.TempoTraceAttributeIntValue` + +```python +value: models.TempoTraceAttributeIntValue = /* values here */ +``` + +### `models.TempoTraceAttributeBoolValue` + +```python +value: models.TempoTraceAttributeBoolValue = /* values here */ +``` + diff --git a/docs/models/tempotracebatch.md b/docs/models/tempotracebatch.md new file mode 100644 index 00000000..1e7779a2 --- /dev/null +++ b/docs/models/tempotracebatch.md @@ -0,0 +1,9 @@ +# TempoTraceBatch + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `resource` | [models.TempoTraceResource](../models/tempotraceresource.md) | :heavy_check_mark: | N/A | +| `scope_spans` | List[[models.TempoTraceScopeSpan](../models/tempotracescopespan.md)] | :heavy_minus_sign: | The spans of the scope | \ No newline at end of file diff --git a/docs/models/tempotraceevent.md b/docs/models/tempotraceevent.md new file mode 100644 index 00000000..e456fa7c --- /dev/null +++ b/docs/models/tempotraceevent.md @@ -0,0 +1,10 @@ +# TempoTraceEvent + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the event | +| `time_unix_nano` | *str* | :heavy_check_mark: | The time of the event in Unix nano | +| `attributes` | List[[models.TempoTraceAttribute](../models/tempotraceattribute.md)] | :heavy_minus_sign: | The attributes of the event | \ No newline at end of file diff --git a/docs/models/tempotraceresource.md b/docs/models/tempotraceresource.md new file mode 100644 index 00000000..0d0e2ded --- /dev/null +++ b/docs/models/tempotraceresource.md @@ -0,0 +1,8 @@ +# TempoTraceResource + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `attributes` | List[[models.TempoTraceAttribute](../models/tempotraceattribute.md)] | :heavy_minus_sign: | The attributes of the resource | \ No newline at end of file diff --git a/docs/models/tempotracescope.md b/docs/models/tempotracescope.md new file mode 100644 index 00000000..f3678a9f --- /dev/null +++ b/docs/models/tempotracescope.md @@ -0,0 +1,8 @@ +# TempoTraceScope + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the span | \ No newline at end of file diff --git a/docs/models/tempotracescopekind.md b/docs/models/tempotracescopekind.md new file mode 100644 index 00000000..e08cc9be --- /dev/null +++ b/docs/models/tempotracescopekind.md @@ -0,0 +1,19 @@ +# TempoTraceScopeKind + +## Example Usage + +```python +from mistralai.client.models import TempoTraceScopeKind + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: TempoTraceScopeKind = "SPAN_KIND_INTERNAL" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"SPAN_KIND_INTERNAL"` +- `"SPAN_KIND_SERVER"` +- `"SPAN_KIND_CLIENT"` diff --git a/docs/models/tempotracescopespan.md b/docs/models/tempotracescopespan.md new file mode 100644 index 00000000..e3b6d58a --- /dev/null +++ b/docs/models/tempotracescopespan.md @@ -0,0 +1,9 @@ +# TempoTraceScopeSpan + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `scope` | [models.TempoTraceScope](../models/tempotracescope.md) | :heavy_check_mark: | N/A | +| `spans` | List[[models.TempoTraceSpan](../models/tempotracespan.md)] | :heavy_minus_sign: | The spans of the scope | \ No newline at end of file diff --git a/docs/models/tempotracespan.md b/docs/models/tempotracespan.md new file mode 100644 index 00000000..f657acc6 --- /dev/null +++ b/docs/models/tempotracespan.md @@ -0,0 +1,16 @@ +# TempoTraceSpan + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `trace_id` | *str* | :heavy_check_mark: | The trace ID of the scope | +| `span_id` | *str* | :heavy_check_mark: | The span ID of the scope | +| `parent_span_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent span ID of the scope | +| `name` | *str* | :heavy_check_mark: | The name of the scope | +| `kind` | [models.TempoTraceScopeKind](../models/tempotracescopekind.md) | :heavy_check_mark: | N/A | +| `start_time_unix_nano` | *str* | :heavy_check_mark: | The start time of the scope in Unix nano | +| `end_time_unix_nano` | *str* | :heavy_check_mark: | The end time of the scope in Unix nano | +| `attributes` | List[[models.TempoTraceAttribute](../models/tempotraceattribute.md)] | :heavy_minus_sign: | The attributes of the scope | +| `events` | List[[models.TempoTraceEvent](../models/tempotraceevent.md)] | :heavy_minus_sign: | The events of the scope | \ No newline at end of file diff --git a/docs/models/terminateworkflowexecutionv1workflowsexecutionsexecutionidterminatepostrequest.md b/docs/models/terminateworkflowexecutionv1workflowsexecutionsexecutionidterminatepostrequest.md new file mode 100644 index 00000000..227066fb --- /dev/null +++ b/docs/models/terminateworkflowexecutionv1workflowsexecutionsexecutionidterminatepostrequest.md @@ -0,0 +1,8 @@ +# TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `execution_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/timeseriesmetric.md b/docs/models/timeseriesmetric.md new file mode 100644 index 00000000..2b5fc61d --- /dev/null +++ b/docs/models/timeseriesmetric.md @@ -0,0 +1,10 @@ +# TimeSeriesMetric + +Time-series metric with timestamp-value pairs. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `value` | List[List[[models.TimeSeriesMetricValue2](../models/timeseriesmetricvalue2.md)]] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/timeseriesmetricvalue1.md b/docs/models/timeseriesmetricvalue1.md new file mode 100644 index 00000000..f1783455 --- /dev/null +++ b/docs/models/timeseriesmetricvalue1.md @@ -0,0 +1,17 @@ +# TimeSeriesMetricValue1 + + +## Supported Types + +### `int` + +```python +value: int = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + diff --git a/docs/models/timeseriesmetricvalue2.md b/docs/models/timeseriesmetricvalue2.md new file mode 100644 index 00000000..c6ba5eca --- /dev/null +++ b/docs/models/timeseriesmetricvalue2.md @@ -0,0 +1,17 @@ +# TimeSeriesMetricValue2 + + +## Supported Types + +### `int` + +```python +value: int = /* values here */ +``` + +### `models.TimeSeriesMetricValue1` + +```python +value: models.TimeSeriesMetricValue1 = /* values here */ +``` + diff --git a/docs/models/unarchiveworkflowv1workflowsworkflowidentifierunarchiveputrequest.md b/docs/models/unarchiveworkflowv1workflowsworkflowidentifierunarchiveputrequest.md new file mode 100644 index 00000000..e25cd4bc --- /dev/null +++ b/docs/models/unarchiveworkflowv1workflowsworkflowidentifierunarchiveputrequest.md @@ -0,0 +1,8 @@ +# UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------- | --------------------- | --------------------- | --------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/unscheduleworkflowv1workflowsschedulesscheduleiddeleterequest.md b/docs/models/unscheduleworkflowv1workflowsschedulesscheduleiddeleterequest.md new file mode 100644 index 00000000..c2bc3373 --- /dev/null +++ b/docs/models/unscheduleworkflowv1workflowsschedulesscheduleiddeleterequest.md @@ -0,0 +1,8 @@ +# UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updatedefinition.md b/docs/models/updatedefinition.md new file mode 100644 index 00000000..8cf62617 --- /dev/null +++ b/docs/models/updatedefinition.md @@ -0,0 +1,11 @@ +# UpdateDefinition + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Name of the update | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the update | +| `input_schema` | Dict[str, *Any*] | :heavy_check_mark: | Input JSON schema of the update's model | +| `output_schema` | Dict[str, *Any*] | :heavy_minus_sign: | Output JSON schema of the update's model | \ No newline at end of file diff --git a/docs/models/updateinvocationbody.md b/docs/models/updateinvocationbody.md new file mode 100644 index 00000000..e810a041 --- /dev/null +++ b/docs/models/updateinvocationbody.md @@ -0,0 +1,9 @@ +# UpdateInvocationBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | The name of the update to request | +| `input` | [OptionalNullable[models.UpdateInvocationBodyInput]](../models/updateinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the update, matching its schema | \ No newline at end of file diff --git a/docs/models/updateinvocationbodyinput.md b/docs/models/updateinvocationbodyinput.md new file mode 100644 index 00000000..70665f9e --- /dev/null +++ b/docs/models/updateinvocationbodyinput.md @@ -0,0 +1,19 @@ +# UpdateInvocationBodyInput + +Input data for the update, matching its schema + + +## Supported Types + +### `models.NetworkEncodedInput` + +```python +value: models.NetworkEncodedInput = /* values here */ +``` + +### `Dict[str, Any]` + +```python +value: Dict[str, Any] = /* values here */ +``` + diff --git a/docs/models/updateworkflowexecutionv1workflowsexecutionsexecutionidupdatespostrequest.md b/docs/models/updateworkflowexecutionv1workflowsexecutionsexecutionidupdatespostrequest.md new file mode 100644 index 00000000..5705af6b --- /dev/null +++ b/docs/models/updateworkflowexecutionv1workflowsexecutionsexecutionidupdatespostrequest.md @@ -0,0 +1,9 @@ +# UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `update_invocation_body` | [models.UpdateInvocationBody](../models/updateinvocationbody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateworkflowresponse.md b/docs/models/updateworkflowresponse.md new file mode 100644 index 00000000..a4e9494e --- /dev/null +++ b/docs/models/updateworkflowresponse.md @@ -0,0 +1,9 @@ +# UpdateWorkflowResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `update_name` | *str* | :heavy_check_mark: | N/A | +| `result` | *Any* | :heavy_check_mark: | The result of the Update workflow call | \ No newline at end of file diff --git a/docs/models/updateworkflowv1workflowsworkflowidentifierputrequest.md b/docs/models/updateworkflowv1workflowsworkflowidentifierputrequest.md new file mode 100644 index 00000000..51877da9 --- /dev/null +++ b/docs/models/updateworkflowv1workflowsworkflowidentifierputrequest.md @@ -0,0 +1,9 @@ +# UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `workflow_update_request` | [models.WorkflowUpdateRequest](../models/workflowupdaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflow.md b/docs/models/workflow.md new file mode 100644 index 00000000..4b245e07 --- /dev/null +++ b/docs/models/workflow.md @@ -0,0 +1,18 @@ +# Workflow + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow | +| `name` | *str* | :heavy_check_mark: | Name of the workflow | +| `display_name` | *str* | :heavy_check_mark: | Display name of the workflow | +| `type` | [models.WorkflowType](../models/workflowtype.md) | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the workflow | +| `customer_id` | *str* | :heavy_check_mark: | Customer ID of the workflow | +| `workspace_id` | *str* | :heavy_check_mark: | Workspace ID of the workflow | +| `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | +| `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | +| `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | +| `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | \ No newline at end of file diff --git a/docs/models/workflowarchiveresponse.md b/docs/models/workflowarchiveresponse.md new file mode 100644 index 00000000..6192c2b2 --- /dev/null +++ b/docs/models/workflowarchiveresponse.md @@ -0,0 +1,8 @@ +# WorkflowArchiveResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `workflow` | [models.Workflow](../models/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowbasicdefinition.md b/docs/models/workflowbasicdefinition.md new file mode 100644 index 00000000..a534ad34 --- /dev/null +++ b/docs/models/workflowbasicdefinition.md @@ -0,0 +1,13 @@ +# WorkflowBasicDefinition + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | The name of the workflow | +| `display_name` | *str* | :heavy_check_mark: | The display name of the workflow | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | A description of the workflow | +| `metadata` | [Optional[models.WorkflowMetadata]](../models/workflowmetadata.md) | :heavy_minus_sign: | N/A | +| `archived` | *bool* | :heavy_check_mark: | Whether the workflow is archived | \ No newline at end of file diff --git a/docs/models/workflowcodedefinition.md b/docs/models/workflowcodedefinition.md new file mode 100644 index 00000000..2034f81f --- /dev/null +++ b/docs/models/workflowcodedefinition.md @@ -0,0 +1,14 @@ +# WorkflowCodeDefinition + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `input_schema` | Dict[str, *Any*] | :heavy_check_mark: | Input schema of the workflow's run method | +| `output_schema` | Dict[str, *Any*] | :heavy_minus_sign: | Output schema of the workflow's run method | +| `signals` | List[[models.SignalDefinition](../models/signaldefinition.md)] | :heavy_minus_sign: | Signal handlers defined by the workflow | +| `queries` | List[[models.QueryDefinition](../models/querydefinition.md)] | :heavy_minus_sign: | Query handlers defined by the workflow | +| `updates` | List[[models.UpdateDefinition](../models/updatedefinition.md)] | :heavy_minus_sign: | Update handlers defined by the workflow | +| `enforce_determinism` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow enforces deterministic execution | +| `execution_timeout` | *Optional[float]* | :heavy_minus_sign: | Maximum total execution time including retries and continue-as-new | \ No newline at end of file diff --git a/docs/models/workfloweventbatchrequest.md b/docs/models/workfloweventbatchrequest.md new file mode 100644 index 00000000..cf0af15f --- /dev/null +++ b/docs/models/workfloweventbatchrequest.md @@ -0,0 +1,10 @@ +# WorkflowEventBatchRequest + +Request model containing multiple workflow events. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `events` | List[[models.WorkflowEventBatchRequestEvent](../models/workfloweventbatchrequestevent.md)] | :heavy_check_mark: | List of workflow events to send. | \ No newline at end of file diff --git a/docs/models/workfloweventbatchrequestevent.md b/docs/models/workfloweventbatchrequestevent.md new file mode 100644 index 00000000..98ac66e8 --- /dev/null +++ b/docs/models/workfloweventbatchrequestevent.md @@ -0,0 +1,107 @@ +# WorkflowEventBatchRequestEvent + + +## Supported Types + +### `models.WorkflowExecutionStartedRequest` + +```python +value: models.WorkflowExecutionStartedRequest = /* values here */ +``` + +### `models.WorkflowExecutionCompletedRequest` + +```python +value: models.WorkflowExecutionCompletedRequest = /* values here */ +``` + +### `models.WorkflowExecutionFailedRequest` + +```python +value: models.WorkflowExecutionFailedRequest = /* values here */ +``` + +### `models.WorkflowExecutionCanceledRequest` + +```python +value: models.WorkflowExecutionCanceledRequest = /* values here */ +``` + +### `models.WorkflowExecutionContinuedAsNewRequest` + +```python +value: models.WorkflowExecutionContinuedAsNewRequest = /* values here */ +``` + +### `models.WorkflowTaskTimedOutRequest` + +```python +value: models.WorkflowTaskTimedOutRequest = /* values here */ +``` + +### `models.WorkflowTaskFailedRequest` + +```python +value: models.WorkflowTaskFailedRequest = /* values here */ +``` + +### `models.CustomTaskStartedRequest` + +```python +value: models.CustomTaskStartedRequest = /* values here */ +``` + +### `models.CustomTaskInProgressRequest` + +```python +value: models.CustomTaskInProgressRequest = /* values here */ +``` + +### `models.CustomTaskCompletedRequest` + +```python +value: models.CustomTaskCompletedRequest = /* values here */ +``` + +### `models.CustomTaskFailedRequest` + +```python +value: models.CustomTaskFailedRequest = /* values here */ +``` + +### `models.CustomTaskTimedOutRequest` + +```python +value: models.CustomTaskTimedOutRequest = /* values here */ +``` + +### `models.CustomTaskCanceledRequest` + +```python +value: models.CustomTaskCanceledRequest = /* values here */ +``` + +### `models.ActivityTaskStartedRequest` + +```python +value: models.ActivityTaskStartedRequest = /* values here */ +``` + +### `models.ActivityTaskCompletedRequest` + +```python +value: models.ActivityTaskCompletedRequest = /* values here */ +``` + +### `models.ActivityTaskRetryingRequest` + +```python +value: models.ActivityTaskRetryingRequest = /* values here */ +``` + +### `models.ActivityTaskFailedRequest` + +```python +value: models.ActivityTaskFailedRequest = /* values here */ +``` + diff --git a/docs/models/workfloweventbatchresponse.md b/docs/models/workfloweventbatchresponse.md new file mode 100644 index 00000000..84ab9e39 --- /dev/null +++ b/docs/models/workfloweventbatchresponse.md @@ -0,0 +1,12 @@ +# WorkflowEventBatchResponse + +Response model for batch workflow event reception. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `status` | [models.WorkflowEventBatchResponseStatus](../models/workfloweventbatchresponsestatus.md) | :heavy_check_mark: | Status of the batch event reception | +| `message` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional message | +| `events_received` | *int* | :heavy_check_mark: | Number of events successfully received | \ No newline at end of file diff --git a/docs/models/workfloweventbatchresponsestatus.md b/docs/models/workfloweventbatchresponsestatus.md new file mode 100644 index 00000000..47dd74bc --- /dev/null +++ b/docs/models/workfloweventbatchresponsestatus.md @@ -0,0 +1,20 @@ +# WorkflowEventBatchResponseStatus + +Status of the batch event reception + +## Example Usage + +```python +from mistralai.client.models import WorkflowEventBatchResponseStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: WorkflowEventBatchResponseStatus = "success" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"success"` +- `"error"` diff --git a/docs/models/workfloweventrequest.md b/docs/models/workfloweventrequest.md new file mode 100644 index 00000000..bec82172 --- /dev/null +++ b/docs/models/workfloweventrequest.md @@ -0,0 +1,10 @@ +# WorkflowEventRequest + +Request model containing a workflow event. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `event` | [models.WorkflowEventRequestEvent](../models/workfloweventrequestevent.md) | :heavy_check_mark: | The workflow event payload. | \ No newline at end of file diff --git a/docs/models/workfloweventrequestevent.md b/docs/models/workfloweventrequestevent.md new file mode 100644 index 00000000..2156cd37 --- /dev/null +++ b/docs/models/workfloweventrequestevent.md @@ -0,0 +1,109 @@ +# WorkflowEventRequestEvent + +The workflow event payload. + + +## Supported Types + +### `models.WorkflowExecutionStartedRequest` + +```python +value: models.WorkflowExecutionStartedRequest = /* values here */ +``` + +### `models.WorkflowExecutionCompletedRequest` + +```python +value: models.WorkflowExecutionCompletedRequest = /* values here */ +``` + +### `models.WorkflowExecutionFailedRequest` + +```python +value: models.WorkflowExecutionFailedRequest = /* values here */ +``` + +### `models.WorkflowExecutionCanceledRequest` + +```python +value: models.WorkflowExecutionCanceledRequest = /* values here */ +``` + +### `models.WorkflowExecutionContinuedAsNewRequest` + +```python +value: models.WorkflowExecutionContinuedAsNewRequest = /* values here */ +``` + +### `models.WorkflowTaskTimedOutRequest` + +```python +value: models.WorkflowTaskTimedOutRequest = /* values here */ +``` + +### `models.WorkflowTaskFailedRequest` + +```python +value: models.WorkflowTaskFailedRequest = /* values here */ +``` + +### `models.CustomTaskStartedRequest` + +```python +value: models.CustomTaskStartedRequest = /* values here */ +``` + +### `models.CustomTaskInProgressRequest` + +```python +value: models.CustomTaskInProgressRequest = /* values here */ +``` + +### `models.CustomTaskCompletedRequest` + +```python +value: models.CustomTaskCompletedRequest = /* values here */ +``` + +### `models.CustomTaskFailedRequest` + +```python +value: models.CustomTaskFailedRequest = /* values here */ +``` + +### `models.CustomTaskTimedOutRequest` + +```python +value: models.CustomTaskTimedOutRequest = /* values here */ +``` + +### `models.CustomTaskCanceledRequest` + +```python +value: models.CustomTaskCanceledRequest = /* values here */ +``` + +### `models.ActivityTaskStartedRequest` + +```python +value: models.ActivityTaskStartedRequest = /* values here */ +``` + +### `models.ActivityTaskCompletedRequest` + +```python +value: models.ActivityTaskCompletedRequest = /* values here */ +``` + +### `models.ActivityTaskRetryingRequest` + +```python +value: models.ActivityTaskRetryingRequest = /* values here */ +``` + +### `models.ActivityTaskFailedRequest` + +```python +value: models.ActivityTaskFailedRequest = /* values here */ +``` + diff --git a/docs/models/workfloweventresponse.md b/docs/models/workfloweventresponse.md new file mode 100644 index 00000000..e336dfb2 --- /dev/null +++ b/docs/models/workfloweventresponse.md @@ -0,0 +1,11 @@ +# WorkflowEventResponse + +Response model for workflow event reception. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `status` | [models.WorkflowEventResponseStatus](../models/workfloweventresponsestatus.md) | :heavy_check_mark: | Status of the event reception | +| `message` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional message | \ No newline at end of file diff --git a/docs/models/workfloweventresponsestatus.md b/docs/models/workfloweventresponsestatus.md new file mode 100644 index 00000000..684f3fc7 --- /dev/null +++ b/docs/models/workfloweventresponsestatus.md @@ -0,0 +1,20 @@ +# WorkflowEventResponseStatus + +Status of the event reception + +## Example Usage + +```python +from mistralai.client.models import WorkflowEventResponseStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: WorkflowEventResponseStatus = "success" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"success"` +- `"error"` diff --git a/docs/models/workfloweventtype.md b/docs/models/workfloweventtype.md new file mode 100644 index 00000000..ebfe2d86 --- /dev/null +++ b/docs/models/workfloweventtype.md @@ -0,0 +1,29 @@ +# WorkflowEventType + +## Example Usage + +```python +from mistralai.client.models import WorkflowEventType +value: WorkflowEventType = "WORKFLOW_EXECUTION_STARTED" +``` + + +## Values + +- `"WORKFLOW_EXECUTION_STARTED"` +- `"WORKFLOW_EXECUTION_COMPLETED"` +- `"WORKFLOW_EXECUTION_FAILED"` +- `"WORKFLOW_EXECUTION_CANCELED"` +- `"WORKFLOW_EXECUTION_CONTINUED_AS_NEW"` +- `"WORKFLOW_TASK_TIMED_OUT"` +- `"WORKFLOW_TASK_FAILED"` +- `"CUSTOM_TASK_STARTED"` +- `"CUSTOM_TASK_IN_PROGRESS"` +- `"CUSTOM_TASK_COMPLETED"` +- `"CUSTOM_TASK_FAILED"` +- `"CUSTOM_TASK_TIMED_OUT"` +- `"CUSTOM_TASK_CANCELED"` +- `"ACTIVITY_TASK_STARTED"` +- `"ACTIVITY_TASK_COMPLETED"` +- `"ACTIVITY_TASK_RETRYING"` +- `"ACTIVITY_TASK_FAILED"` diff --git a/docs/models/workflowexecutioncanceledattributes.md b/docs/models/workflowexecutioncanceledattributes.md new file mode 100644 index 00000000..8c2929eb --- /dev/null +++ b/docs/models/workflowexecutioncanceledattributes.md @@ -0,0 +1,11 @@ +# WorkflowExecutionCanceledAttributes + +Attributes for workflow execution canceled events. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `reason` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional reason provided for the cancellation. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncanceledrequest.md b/docs/models/workflowexecutioncanceledrequest.md new file mode 100644 index 00000000..e32f3c9d --- /dev/null +++ b/docs/models/workflowexecutioncanceledrequest.md @@ -0,0 +1,20 @@ +# WorkflowExecutionCanceledRequest + +Emitted when a workflow execution is canceled. + +This is a terminal event indicating the workflow was explicitly canceled. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_CANCELED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionCanceledAttributes](../models/workflowexecutioncanceledattributes.md) | :heavy_check_mark: | Attributes for workflow execution canceled events. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncanceledresponse.md b/docs/models/workflowexecutioncanceledresponse.md new file mode 100644 index 00000000..f9f4c01d --- /dev/null +++ b/docs/models/workflowexecutioncanceledresponse.md @@ -0,0 +1,20 @@ +# WorkflowExecutionCanceledResponse + +Emitted when a workflow execution is canceled. + +This is a terminal event indicating the workflow was explicitly canceled. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_CANCELED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionCanceledAttributes](../models/workflowexecutioncanceledattributes.md) | :heavy_check_mark: | Attributes for workflow execution canceled events. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncompletedattributesrequest.md b/docs/models/workflowexecutioncompletedattributesrequest.md new file mode 100644 index 00000000..5ab8341c --- /dev/null +++ b/docs/models/workflowexecutioncompletedattributesrequest.md @@ -0,0 +1,11 @@ +# WorkflowExecutionCompletedAttributesRequest + +Attributes for workflow execution completed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `result` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncompletedattributesresponse.md b/docs/models/workflowexecutioncompletedattributesresponse.md new file mode 100644 index 00000000..30a33052 --- /dev/null +++ b/docs/models/workflowexecutioncompletedattributesresponse.md @@ -0,0 +1,11 @@ +# WorkflowExecutionCompletedAttributesResponse + +Attributes for workflow execution completed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `result` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncompletedrequest.md b/docs/models/workflowexecutioncompletedrequest.md new file mode 100644 index 00000000..02bd2a44 --- /dev/null +++ b/docs/models/workflowexecutioncompletedrequest.md @@ -0,0 +1,20 @@ +# WorkflowExecutionCompletedRequest + +Emitted when a workflow execution completes successfully. + +This is a terminal event indicating the workflow finished without errors. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionCompletedAttributesRequest](../models/workflowexecutioncompletedattributesrequest.md) | :heavy_check_mark: | Attributes for workflow execution completed events. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncompletedresponse.md b/docs/models/workflowexecutioncompletedresponse.md new file mode 100644 index 00000000..a4d40dc5 --- /dev/null +++ b/docs/models/workflowexecutioncompletedresponse.md @@ -0,0 +1,20 @@ +# WorkflowExecutionCompletedResponse + +Emitted when a workflow execution completes successfully. + +This is a terminal event indicating the workflow finished without errors. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionCompletedAttributesResponse](../models/workflowexecutioncompletedattributesresponse.md) | :heavy_check_mark: | Attributes for workflow execution completed events. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncontinuedasnewattributesrequest.md b/docs/models/workflowexecutioncontinuedasnewattributesrequest.md new file mode 100644 index 00000000..c85a7b30 --- /dev/null +++ b/docs/models/workflowexecutioncontinuedasnewattributesrequest.md @@ -0,0 +1,13 @@ +# WorkflowExecutionContinuedAsNewAttributesRequest + +Attributes for workflow execution continued-as-new events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `new_execution_run_id` | *str* | :heavy_check_mark: | The run ID of the new workflow execution that continues this workflow. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the continued workflow. | +| `input` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncontinuedasnewattributesresponse.md b/docs/models/workflowexecutioncontinuedasnewattributesresponse.md new file mode 100644 index 00000000..b49a2596 --- /dev/null +++ b/docs/models/workflowexecutioncontinuedasnewattributesresponse.md @@ -0,0 +1,13 @@ +# WorkflowExecutionContinuedAsNewAttributesResponse + +Attributes for workflow execution continued-as-new events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `new_execution_run_id` | *str* | :heavy_check_mark: | The run ID of the new workflow execution that continues this workflow. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the continued workflow. | +| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncontinuedasnewrequest.md b/docs/models/workflowexecutioncontinuedasnewrequest.md new file mode 100644 index 00000000..f83f7b51 --- /dev/null +++ b/docs/models/workflowexecutioncontinuedasnewrequest.md @@ -0,0 +1,21 @@ +# WorkflowExecutionContinuedAsNewRequest + +Emitted when a workflow continues as a new execution. + +This occurs when a workflow uses continue-as-new to reset its history +while maintaining logical continuity. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionContinuedAsNewAttributesRequest](../models/workflowexecutioncontinuedasnewattributesrequest.md) | :heavy_check_mark: | Attributes for workflow execution continued-as-new events. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncontinuedasnewresponse.md b/docs/models/workflowexecutioncontinuedasnewresponse.md new file mode 100644 index 00000000..e6a7212a --- /dev/null +++ b/docs/models/workflowexecutioncontinuedasnewresponse.md @@ -0,0 +1,21 @@ +# WorkflowExecutionContinuedAsNewResponse + +Emitted when a workflow continues as a new execution. + +This occurs when a workflow uses continue-as-new to reset its history +while maintaining logical continuity. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionContinuedAsNewAttributesResponse](../models/workflowexecutioncontinuedasnewattributesresponse.md) | :heavy_check_mark: | Attributes for workflow execution continued-as-new events. | \ No newline at end of file diff --git a/docs/models/workflowexecutionfailedattributes.md b/docs/models/workflowexecutionfailedattributes.md new file mode 100644 index 00000000..9fa14fa4 --- /dev/null +++ b/docs/models/workflowexecutionfailedattributes.md @@ -0,0 +1,11 @@ +# WorkflowExecutionFailedAttributes + +Attributes for workflow execution failed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `failure` | [models.Failure](../models/failure.md) | :heavy_check_mark: | Represents an error or exception that occurred during execution. | \ No newline at end of file diff --git a/docs/models/workflowexecutionfailedrequest.md b/docs/models/workflowexecutionfailedrequest.md new file mode 100644 index 00000000..160cfd1a --- /dev/null +++ b/docs/models/workflowexecutionfailedrequest.md @@ -0,0 +1,20 @@ +# WorkflowExecutionFailedRequest + +Emitted when a workflow execution fails due to an unhandled exception. + +This is a terminal event indicating the workflow ended with an error. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionFailedAttributes](../models/workflowexecutionfailedattributes.md) | :heavy_check_mark: | Attributes for workflow execution failed events. | \ No newline at end of file diff --git a/docs/models/workflowexecutionfailedresponse.md b/docs/models/workflowexecutionfailedresponse.md new file mode 100644 index 00000000..222fbfd7 --- /dev/null +++ b/docs/models/workflowexecutionfailedresponse.md @@ -0,0 +1,20 @@ +# WorkflowExecutionFailedResponse + +Emitted when a workflow execution fails due to an unhandled exception. + +This is a terminal event indicating the workflow ended with an error. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionFailedAttributes](../models/workflowexecutionfailedattributes.md) | :heavy_check_mark: | Attributes for workflow execution failed events. | \ No newline at end of file diff --git a/docs/models/workflowexecutionlistresponse.md b/docs/models/workflowexecutionlistresponse.md new file mode 100644 index 00000000..3fe61f60 --- /dev/null +++ b/docs/models/workflowexecutionlistresponse.md @@ -0,0 +1,9 @@ +# WorkflowExecutionListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `executions` | List[[models.WorkflowExecutionWithoutResultResponse](../models/workflowexecutionwithoutresultresponse.md)] | :heavy_check_mark: | A list of workflow executions | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token to use for fetching the next page of results. Null if this is the last page. | \ No newline at end of file diff --git a/docs/models/workflowexecutionprogresstraceevent.md b/docs/models/workflowexecutionprogresstraceevent.md new file mode 100644 index 00000000..ac50a894 --- /dev/null +++ b/docs/models/workflowexecutionprogresstraceevent.md @@ -0,0 +1,17 @@ +# WorkflowExecutionProgressTraceEvent + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [Optional[models.EventType]](../models/eventtype.md) | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the event | +| `id` | *str* | :heavy_check_mark: | The ID of the event | +| `timestamp_unix_nano` | *int* | :heavy_check_mark: | The timestamp of the event in nanoseconds since the Unix epoch | +| `attributes` | Dict[str, [Nullable[models.WorkflowExecutionTraceSummaryAttributesValues]](../models/workflowexecutiontracesummaryattributesvalues.md)] | :heavy_check_mark: | The attributes of the event | +| `internal` | *Optional[bool]* | :heavy_minus_sign: | Whether the event is internal | +| `status` | [Optional[models.EventProgressStatus]](../models/eventprogressstatus.md) | :heavy_minus_sign: | N/A | +| `start_time_unix_ms` | *int* | :heavy_check_mark: | The start time of the event in milliseconds since the Unix epoch | +| `end_time_unix_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | The end time of the event in milliseconds since the Unix epoch | +| `error` | *OptionalNullable[str]* | :heavy_minus_sign: | The error message, if any | \ No newline at end of file diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md new file mode 100644 index 00000000..553119b1 --- /dev/null +++ b/docs/models/workflowexecutionrequest.md @@ -0,0 +1,15 @@ +# WorkflowExecutionRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | +| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | +| `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | +| `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | +| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| ~~`task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | \ No newline at end of file diff --git a/docs/models/workflowexecutionresponse.md b/docs/models/workflowexecutionresponse.md new file mode 100644 index 00000000..e414c47e --- /dev/null +++ b/docs/models/workflowexecutionresponse.md @@ -0,0 +1,16 @@ +# WorkflowExecutionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `workflow_name` | *str* | :heavy_check_mark: | The name of the workflow | +| `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | +| `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | +| `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | +| `total_duration_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | The total duration of the trace in milliseconds | +| `result` | *Nullable[Any]* | :heavy_check_mark: | The result of the workflow execution, if available | \ No newline at end of file diff --git a/docs/models/workflowexecutionstartedattributesrequest.md b/docs/models/workflowexecutionstartedattributesrequest.md new file mode 100644 index 00000000..a65df97a --- /dev/null +++ b/docs/models/workflowexecutionstartedattributesrequest.md @@ -0,0 +1,12 @@ +# WorkflowExecutionStartedAttributesRequest + +Attributes for workflow execution started events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow being executed. | +| `input` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutionstartedattributesresponse.md b/docs/models/workflowexecutionstartedattributesresponse.md new file mode 100644 index 00000000..c28de680 --- /dev/null +++ b/docs/models/workflowexecutionstartedattributesresponse.md @@ -0,0 +1,12 @@ +# WorkflowExecutionStartedAttributesResponse + +Attributes for workflow execution started events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow being executed. | +| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutionstartedrequest.md b/docs/models/workflowexecutionstartedrequest.md new file mode 100644 index 00000000..c2bce40e --- /dev/null +++ b/docs/models/workflowexecutionstartedrequest.md @@ -0,0 +1,20 @@ +# WorkflowExecutionStartedRequest + +Emitted when a workflow execution begins. + +This is the first event in any workflow execution lifecycle. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionStartedAttributesRequest](../models/workflowexecutionstartedattributesrequest.md) | :heavy_check_mark: | Attributes for workflow execution started events. | \ No newline at end of file diff --git a/docs/models/workflowexecutionstartedresponse.md b/docs/models/workflowexecutionstartedresponse.md new file mode 100644 index 00000000..7c370d46 --- /dev/null +++ b/docs/models/workflowexecutionstartedresponse.md @@ -0,0 +1,20 @@ +# WorkflowExecutionStartedResponse + +Emitted when a workflow execution begins. + +This is the first event in any workflow execution lifecycle. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowExecutionStartedAttributesResponse](../models/workflowexecutionstartedattributesresponse.md) | :heavy_check_mark: | Attributes for workflow execution started events. | \ No newline at end of file diff --git a/docs/models/workflowexecutionstatus.md b/docs/models/workflowexecutionstatus.md new file mode 100644 index 00000000..1be6d741 --- /dev/null +++ b/docs/models/workflowexecutionstatus.md @@ -0,0 +1,24 @@ +# WorkflowExecutionStatus + +## Example Usage + +```python +from mistralai.client.models import WorkflowExecutionStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: WorkflowExecutionStatus = "RUNNING" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"RUNNING"` +- `"COMPLETED"` +- `"FAILED"` +- `"CANCELED"` +- `"TERMINATED"` +- `"CONTINUED_AS_NEW"` +- `"TIMED_OUT"` +- `"RETRYING_AFTER_ERROR"` diff --git a/docs/models/workflowexecutionsyncresponse.md b/docs/models/workflowexecutionsyncresponse.md new file mode 100644 index 00000000..88cbc21c --- /dev/null +++ b/docs/models/workflowexecutionsyncresponse.md @@ -0,0 +1,12 @@ +# WorkflowExecutionSyncResponse + +Response model for synchronous workflow execution + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | +| `workflow_name` | *str* | :heavy_check_mark: | Name of the workflow that was executed | +| `execution_id` | *str* | :heavy_check_mark: | ID of the workflow execution | +| `result` | *Any* | :heavy_check_mark: | The result of the workflow execution | \ No newline at end of file diff --git a/docs/models/workflowexecutiontraceevent.md b/docs/models/workflowexecutiontraceevent.md new file mode 100644 index 00000000..b6bb388c --- /dev/null +++ b/docs/models/workflowexecutiontraceevent.md @@ -0,0 +1,13 @@ +# WorkflowExecutionTraceEvent + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [Optional[models.EventType]](../models/eventtype.md) | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the event | +| `id` | *str* | :heavy_check_mark: | The ID of the event | +| `timestamp_unix_nano` | *int* | :heavy_check_mark: | The timestamp of the event in nanoseconds since the Unix epoch | +| `attributes` | Dict[str, [Nullable[models.WorkflowExecutionTraceSummaryAttributesValues]](../models/workflowexecutiontracesummaryattributesvalues.md)] | :heavy_check_mark: | The attributes of the event | +| `internal` | *Optional[bool]* | :heavy_minus_sign: | Whether the event is internal | \ No newline at end of file diff --git a/docs/models/workflowexecutiontraceeventsresponse.md b/docs/models/workflowexecutiontraceeventsresponse.md new file mode 100644 index 00000000..a0e6e486 --- /dev/null +++ b/docs/models/workflowexecutiontraceeventsresponse.md @@ -0,0 +1,17 @@ +# WorkflowExecutionTraceEventsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `workflow_name` | *str* | :heavy_check_mark: | The name of the workflow | +| `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | +| `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | +| `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | +| `total_duration_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | The total duration of the trace in milliseconds | +| `result` | *Nullable[Any]* | :heavy_check_mark: | The result of the workflow execution, if available | +| `events` | List[[models.WorkflowExecutionTraceEventsResponseEvent](../models/workflowexecutiontraceeventsresponseevent.md)] | :heavy_minus_sign: | The events of the workflow execution | \ No newline at end of file diff --git a/docs/models/workflowexecutiontraceeventsresponseevent.md b/docs/models/workflowexecutiontraceeventsresponseevent.md new file mode 100644 index 00000000..81c4f573 --- /dev/null +++ b/docs/models/workflowexecutiontraceeventsresponseevent.md @@ -0,0 +1,17 @@ +# WorkflowExecutionTraceEventsResponseEvent + + +## Supported Types + +### `models.WorkflowExecutionTraceEvent` + +```python +value: models.WorkflowExecutionTraceEvent = /* values here */ +``` + +### `models.WorkflowExecutionProgressTraceEvent` + +```python +value: models.WorkflowExecutionProgressTraceEvent = /* values here */ +``` + diff --git a/docs/models/workflowexecutiontraceotelresponse.md b/docs/models/workflowexecutiontraceotelresponse.md new file mode 100644 index 00000000..62188776 --- /dev/null +++ b/docs/models/workflowexecutiontraceotelresponse.md @@ -0,0 +1,19 @@ +# WorkflowExecutionTraceOTelResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `workflow_name` | *str* | :heavy_check_mark: | The name of the workflow | +| `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | +| `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | +| `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | +| `total_duration_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | The total duration of the trace in milliseconds | +| `result` | *Nullable[Any]* | :heavy_check_mark: | The result of the workflow execution, if available | +| `data_source` | *str* | :heavy_check_mark: | The data source of the trace | +| `otel_trace_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the trace | +| `otel_trace_data` | [OptionalNullable[models.TempoGetTraceResponse]](../models/tempogettraceresponse.md) | :heavy_minus_sign: | The raw OpenTelemetry trace data | \ No newline at end of file diff --git a/docs/models/workflowexecutiontracesummaryattributesvalues.md b/docs/models/workflowexecutiontracesummaryattributesvalues.md new file mode 100644 index 00000000..c01a122f --- /dev/null +++ b/docs/models/workflowexecutiontracesummaryattributesvalues.md @@ -0,0 +1,29 @@ +# WorkflowExecutionTraceSummaryAttributesValues + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `int` + +```python +value: int = /* values here */ +``` + +### `float` + +```python +value: float = /* values here */ +``` + +### `bool` + +```python +value: bool = /* values here */ +``` + diff --git a/docs/models/workflowexecutiontracesummaryresponse.md b/docs/models/workflowexecutiontracesummaryresponse.md new file mode 100644 index 00000000..3c1ab0e5 --- /dev/null +++ b/docs/models/workflowexecutiontracesummaryresponse.md @@ -0,0 +1,17 @@ +# WorkflowExecutionTraceSummaryResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `workflow_name` | *str* | :heavy_check_mark: | The name of the workflow | +| `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | +| `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | +| `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | +| `total_duration_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | The total duration of the trace in milliseconds | +| `result` | *Nullable[Any]* | :heavy_check_mark: | The result of the workflow execution, if available | +| `span_tree` | [OptionalNullable[models.WorkflowExecutionTraceSummarySpan]](../models/workflowexecutiontracesummaryspan.md) | :heavy_minus_sign: | The root span of the trace | \ No newline at end of file diff --git a/docs/models/workflowexecutiontracesummaryspan.md b/docs/models/workflowexecutiontracesummaryspan.md new file mode 100644 index 00000000..8ee487a2 --- /dev/null +++ b/docs/models/workflowexecutiontracesummaryspan.md @@ -0,0 +1,14 @@ +# WorkflowExecutionTraceSummarySpan + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `span_id` | *str* | :heavy_check_mark: | The ID of the span | +| `name` | *str* | :heavy_check_mark: | The name of the span | +| `start_time_unix_nano` | *int* | :heavy_check_mark: | The start time of the span in nanoseconds since the Unix epoch | +| `end_time_unix_nano` | *Nullable[int]* | :heavy_check_mark: | The end time of the span in nanoseconds since the Unix epoch | +| `attributes` | Dict[str, [Nullable[models.WorkflowExecutionTraceSummaryAttributesValues]](../models/workflowexecutiontracesummaryattributesvalues.md)] | :heavy_check_mark: | The attributes of the span | +| `events` | List[[models.WorkflowExecutionTraceEvent](../models/workflowexecutiontraceevent.md)] | :heavy_check_mark: | The events of the span | +| `children` | List[[models.WorkflowExecutionTraceSummarySpan](../models/workflowexecutiontracesummaryspan.md)] | :heavy_minus_sign: | The child spans of the span | \ No newline at end of file diff --git a/docs/models/workflowexecutionwithoutresultresponse.md b/docs/models/workflowexecutionwithoutresultresponse.md new file mode 100644 index 00000000..f74414a6 --- /dev/null +++ b/docs/models/workflowexecutionwithoutresultresponse.md @@ -0,0 +1,15 @@ +# WorkflowExecutionWithoutResultResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `workflow_name` | *str* | :heavy_check_mark: | The name of the workflow | +| `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | +| `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | +| `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | +| `total_duration_ms` | *OptionalNullable[int]* | :heavy_minus_sign: | The total duration of the trace in milliseconds | \ No newline at end of file diff --git a/docs/models/workflowgetresponse.md b/docs/models/workflowgetresponse.md new file mode 100644 index 00000000..ef9baa44 --- /dev/null +++ b/docs/models/workflowgetresponse.md @@ -0,0 +1,8 @@ +# WorkflowGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `workflow` | [models.WorkflowWithWorkerStatus](../models/workflowwithworkerstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowlistresponse.md b/docs/models/workflowlistresponse.md new file mode 100644 index 00000000..d36e48c6 --- /dev/null +++ b/docs/models/workflowlistresponse.md @@ -0,0 +1,9 @@ +# WorkflowListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `workflows` | List[[models.WorkflowBasicDefinition](../models/workflowbasicdefinition.md)] | :heavy_check_mark: | A list of workflows | +| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowmetadata.md b/docs/models/workflowmetadata.md new file mode 100644 index 00000000..c69cb08b --- /dev/null +++ b/docs/models/workflowmetadata.md @@ -0,0 +1,8 @@ +# WorkflowMetadata + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Namespace for shared workflows, None if user-owned | \ No newline at end of file diff --git a/docs/models/workflowmetrics.md b/docs/models/workflowmetrics.md new file mode 100644 index 00000000..4936382b --- /dev/null +++ b/docs/models/workflowmetrics.md @@ -0,0 +1,17 @@ +# WorkflowMetrics + +Complete metrics for a specific workflow. + +This type combines all metric categories. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `execution_count` | [models.ScalarMetric](../models/scalarmetric.md) | :heavy_check_mark: | Scalar metric with a single value. | +| `success_count` | [models.ScalarMetric](../models/scalarmetric.md) | :heavy_check_mark: | Scalar metric with a single value. | +| `error_count` | [models.ScalarMetric](../models/scalarmetric.md) | :heavy_check_mark: | Scalar metric with a single value. | +| `average_latency_ms` | [models.ScalarMetric](../models/scalarmetric.md) | :heavy_check_mark: | Scalar metric with a single value. | +| `latency_over_time` | [models.TimeSeriesMetric](../models/timeseriesmetric.md) | :heavy_check_mark: | Time-series metric with timestamp-value pairs. | +| `retry_rate` | [models.ScalarMetric](../models/scalarmetric.md) | :heavy_check_mark: | Scalar metric with a single value. | \ No newline at end of file diff --git a/docs/models/workflowregistration.md b/docs/models/workflowregistration.md new file mode 100644 index 00000000..aad6831a --- /dev/null +++ b/docs/models/workflowregistration.md @@ -0,0 +1,13 @@ +# WorkflowRegistration + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | +| `task_queue` | *str* | :heavy_check_mark: | Project name of the workflow | +| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | +| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | \ No newline at end of file diff --git a/docs/models/workflowregistrationgetresponse.md b/docs/models/workflowregistrationgetresponse.md new file mode 100644 index 00000000..c524fc68 --- /dev/null +++ b/docs/models/workflowregistrationgetresponse.md @@ -0,0 +1,9 @@ +# WorkflowRegistrationGetResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `workflow_registration` | [models.WorkflowRegistrationWithWorkerStatus](../models/workflowregistrationwithworkerstatus.md) | :heavy_check_mark: | N/A | +| `workflow_version` | [models.WorkflowRegistrationWithWorkerStatus](../models/workflowregistrationwithworkerstatus.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowregistrationlistresponse.md b/docs/models/workflowregistrationlistresponse.md new file mode 100644 index 00000000..e37b3671 --- /dev/null +++ b/docs/models/workflowregistrationlistresponse.md @@ -0,0 +1,10 @@ +# WorkflowRegistrationListResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `workflow_registrations` | List[[models.WorkflowRegistration](../models/workflowregistration.md)] | :heavy_check_mark: | A list of workflow registrations | +| `next_cursor` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `workflow_versions` | List[[models.WorkflowRegistration](../models/workflowregistration.md)] | :heavy_check_mark: | Deprecated: use workflow_registrations | \ No newline at end of file diff --git a/docs/models/workflowregistrationwithworkerstatus.md b/docs/models/workflowregistrationwithworkerstatus.md new file mode 100644 index 00000000..625871c1 --- /dev/null +++ b/docs/models/workflowregistrationwithworkerstatus.md @@ -0,0 +1,14 @@ +# WorkflowRegistrationWithWorkerStatus + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | +| `task_queue` | *str* | :heavy_check_mark: | Project name of the workflow | +| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | +| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | +| `active` | *bool* | :heavy_check_mark: | Whether the workflow registration is active | \ No newline at end of file diff --git a/docs/models/workflowschedulelistresponse.md b/docs/models/workflowschedulelistresponse.md new file mode 100644 index 00000000..7142185b --- /dev/null +++ b/docs/models/workflowschedulelistresponse.md @@ -0,0 +1,8 @@ +# WorkflowScheduleListResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `schedules` | List[[models.ScheduleDefinitionOutput](../models/scheduledefinitionoutput.md)] | :heavy_check_mark: | A list of workflow schedules | \ No newline at end of file diff --git a/docs/models/workflowschedulerequest.md b/docs/models/workflowschedulerequest.md new file mode 100644 index 00000000..a6255c75 --- /dev/null +++ b/docs/models/workflowschedulerequest.md @@ -0,0 +1,14 @@ +# WorkflowScheduleRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `schedule` | [models.ScheduleDefinition](../models/scheduledefinition.md) | :heavy_check_mark: | Specification of the times scheduled actions may occur.

The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and
:py:attr:`cron_expressions` excluding anything in :py:attr:`skip`.

Used for input where schedule_id is optional (can be provided or auto-generated). | +| `workflow_registration_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the workflow registration to schedule | +| `workflow_version_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Deprecated: use workflow_registration_id | +| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | The name or ID of the workflow to schedule | +| ~~`workflow_task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | +| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom schedule ID. If not provided, a random ID will be generated. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this schedule to | \ No newline at end of file diff --git a/docs/models/workflowscheduleresponse.md b/docs/models/workflowscheduleresponse.md new file mode 100644 index 00000000..96d7ced7 --- /dev/null +++ b/docs/models/workflowscheduleresponse.md @@ -0,0 +1,8 @@ +# WorkflowScheduleResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | The ID of the schedule | \ No newline at end of file diff --git a/docs/models/workflowtaskfailedattributes.md b/docs/models/workflowtaskfailedattributes.md new file mode 100644 index 00000000..c6515f84 --- /dev/null +++ b/docs/models/workflowtaskfailedattributes.md @@ -0,0 +1,11 @@ +# WorkflowTaskFailedAttributes + +Attributes for workflow task failed events. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `failure` | [models.Failure](../models/failure.md) | :heavy_check_mark: | Represents an error or exception that occurred during execution. | \ No newline at end of file diff --git a/docs/models/workflowtaskfailedrequest.md b/docs/models/workflowtaskfailedrequest.md new file mode 100644 index 00000000..a39cd97c --- /dev/null +++ b/docs/models/workflowtaskfailedrequest.md @@ -0,0 +1,21 @@ +# WorkflowTaskFailedRequest + +Emitted when a workflow task fails. + +This indicates an error occurred during workflow task execution, +which may trigger a retry depending on configuration. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowTaskFailedAttributes](../models/workflowtaskfailedattributes.md) | :heavy_check_mark: | Attributes for workflow task failed events. | \ No newline at end of file diff --git a/docs/models/workflowtaskfailedresponse.md b/docs/models/workflowtaskfailedresponse.md new file mode 100644 index 00000000..731ed219 --- /dev/null +++ b/docs/models/workflowtaskfailedresponse.md @@ -0,0 +1,21 @@ +# WorkflowTaskFailedResponse + +Emitted when a workflow task fails. + +This indicates an error occurred during workflow task execution, +which may trigger a retry depending on configuration. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowTaskFailedAttributes](../models/workflowtaskfailedattributes.md) | :heavy_check_mark: | Attributes for workflow task failed events. | \ No newline at end of file diff --git a/docs/models/workflowtasktimedoutattributes.md b/docs/models/workflowtasktimedoutattributes.md new file mode 100644 index 00000000..7f298ea2 --- /dev/null +++ b/docs/models/workflowtasktimedoutattributes.md @@ -0,0 +1,11 @@ +# WorkflowTaskTimedOutAttributes + +Attributes for workflow task timed out events. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `timeout_type` | *OptionalNullable[str]* | :heavy_minus_sign: | The type of timeout that occurred (e.g., 'START_TO_CLOSE', 'SCHEDULE_TO_START'). | \ No newline at end of file diff --git a/docs/models/workflowtasktimedoutrequest.md b/docs/models/workflowtasktimedoutrequest.md new file mode 100644 index 00000000..6c87b8ce --- /dev/null +++ b/docs/models/workflowtasktimedoutrequest.md @@ -0,0 +1,21 @@ +# WorkflowTaskTimedOutRequest + +Emitted when a workflow task times out. + +This indicates the workflow task (a unit of workflow execution) exceeded +its configured timeout. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_TASK_TIMED_OUT"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowTaskTimedOutAttributes](../models/workflowtasktimedoutattributes.md) | :heavy_check_mark: | Attributes for workflow task timed out events. | \ No newline at end of file diff --git a/docs/models/workflowtasktimedoutresponse.md b/docs/models/workflowtasktimedoutresponse.md new file mode 100644 index 00000000..ea3edade --- /dev/null +++ b/docs/models/workflowtasktimedoutresponse.md @@ -0,0 +1,21 @@ +# WorkflowTaskTimedOutResponse + +Emitted when a workflow task times out. + +This indicates the workflow task (a unit of workflow execution) exceeded +its configured timeout. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | +| `event_timestamp` | *int* | :heavy_check_mark: | Unix timestamp in nanoseconds when the event was created. | +| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | +| `parent_workflow_exec_id` | *Nullable[str]* | :heavy_check_mark: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | +| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | +| `event_type` | *Optional[Literal["WORKFLOW_TASK_TIMED_OUT"]]* | :heavy_minus_sign: | Event type discriminator. | +| `attributes` | [models.WorkflowTaskTimedOutAttributes](../models/workflowtasktimedoutattributes.md) | :heavy_check_mark: | Attributes for workflow task timed out events. | \ No newline at end of file diff --git a/docs/models/workflowtype.md b/docs/models/workflowtype.md new file mode 100644 index 00000000..93aa31f1 --- /dev/null +++ b/docs/models/workflowtype.md @@ -0,0 +1,13 @@ +# WorkflowType + +## Example Usage + +```python +from mistralai.client.models import WorkflowType +value: WorkflowType = "code" +``` + + +## Values + +- `"code"` diff --git a/docs/models/workflowunarchiveresponse.md b/docs/models/workflowunarchiveresponse.md new file mode 100644 index 00000000..667c9387 --- /dev/null +++ b/docs/models/workflowunarchiveresponse.md @@ -0,0 +1,8 @@ +# WorkflowUnarchiveResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `workflow` | [models.Workflow](../models/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowupdaterequest.md b/docs/models/workflowupdaterequest.md new file mode 100644 index 00000000..f8ce41ed --- /dev/null +++ b/docs/models/workflowupdaterequest.md @@ -0,0 +1,10 @@ +# WorkflowUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | New display name value | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description value | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to make the workflow available in the chat assistant | \ No newline at end of file diff --git a/docs/models/workflowupdateresponse.md b/docs/models/workflowupdateresponse.md new file mode 100644 index 00000000..68faf7c0 --- /dev/null +++ b/docs/models/workflowupdateresponse.md @@ -0,0 +1,8 @@ +# WorkflowUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `workflow` | [models.Workflow](../models/workflow.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowwithworkerstatus.md b/docs/models/workflowwithworkerstatus.md new file mode 100644 index 00000000..ac6efb9c --- /dev/null +++ b/docs/models/workflowwithworkerstatus.md @@ -0,0 +1,19 @@ +# WorkflowWithWorkerStatus + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow | +| `name` | *str* | :heavy_check_mark: | Name of the workflow | +| `display_name` | *str* | :heavy_check_mark: | Display name of the workflow | +| `type` | [models.WorkflowType](../models/workflowtype.md) | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the workflow | +| `customer_id` | *str* | :heavy_check_mark: | Customer ID of the workflow | +| `workspace_id` | *str* | :heavy_check_mark: | Workspace ID of the workflow | +| `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | +| `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | +| `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | +| `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | +| `active` | *bool* | :heavy_check_mark: | Whether the workflow is active | \ No newline at end of file diff --git a/docs/sdks/batchjobs/README.md b/docs/sdks/batchjobs/README.md index 3633fe4e..3e082340 100644 --- a/docs/sdks/batchjobs/README.md +++ b/docs/sdks/batchjobs/README.md @@ -7,6 +7,7 @@ * [list](#list) - Get Batch Jobs * [create](#create) - Create Batch Job * [get](#get) - Get Batch Job +* [delete](#delete) - Delete Batch Job * [cancel](#cancel) - Cancel Batch Job ## list @@ -147,6 +148,46 @@ with Mistral( | --------------- | --------------- | --------------- | | errors.SDKError | 4XX, 5XX | \*/\* | +## delete + +Request the deletion of a batch job. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.batch.jobs.delete(job_id="d9e71426-5791-49ad-b8d1-cf0d90d1b7d0") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `job_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DeleteBatchJobResponse](../../models/deletebatchjobresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## cancel Request the cancellation of a batch job. diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index 99892188..f4a0a097 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -177,6 +177,7 @@ with Mistral( | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `tool_name` | *str* | :heavy_check_mark: | N/A | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `arguments` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -227,7 +228,7 @@ with Mistral( ### Response -**[models.ResponseConnectorListToolsV12](../../models/responseconnectorlisttoolsv12.md)** +**[models.ResponseConnectorListToolsV1](../../models/responseconnectorlisttoolsv1.md)** ### Errors diff --git a/docs/sdks/deployments/README.md b/docs/sdks/deployments/README.md new file mode 100644 index 00000000..941b5538 --- /dev/null +++ b/docs/sdks/deployments/README.md @@ -0,0 +1,91 @@ +# Workflows.Deployments + +## Overview + +### Available Operations + +* [list_deployments](#list_deployments) - List Deployments +* [get_deployment](#get_deployment) - Get Deployment + +## list_deployments + +List Deployments + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.deployments.list_deployments(active_only=True) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `active_only` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `workflow_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DeploymentListResponse](../../models/deploymentlistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_deployment + +Get Deployment + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.deployments.get_deployment(name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.DeploymentDetailResponse](../../models/deploymentdetailresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md new file mode 100644 index 00000000..1de37e5c --- /dev/null +++ b/docs/sdks/events/README.md @@ -0,0 +1,230 @@ +# Events + +## Overview + +### Available Operations + +* [receive_workflow_event](#receive_workflow_event) - Receive Workflow Event +* [receive_workflow_events_batch](#receive_workflow_events_batch) - Receive Workflow Events Batch +* [get_stream_events](#get_stream_events) - Get Stream Events +* [get_workflow_events](#get_workflow_events) - Get Workflow Events + +## receive_workflow_event + +Receive workflow events from workers. + +Events are published to NATS for real-time streaming and persisted in the database. + +For shared workers, the actual execution owner is resolved from the execution record, +ensuring events are streamed to the correct user's namespace. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.events.receive_workflow_event(event={ + "event_id": "", + "root_workflow_exec_id": "", + "workflow_exec_id": "", + "workflow_run_id": "", + "workflow_name": "", + "event_type": "CUSTOM_TASK_STARTED", + "attributes": { + "custom_task_id": "", + "custom_task_type": "", + }, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `event` | [models.WorkflowEventRequestEvent](../../models/workfloweventrequestevent.md) | :heavy_check_mark: | The workflow event payload. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowEventResponse](../../models/workfloweventresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## receive_workflow_events_batch + +Receive multiple workflow events from workers in a single batch. + +Events are published to NATS for real-time streaming and persisted in the database. +This endpoint processes events sequentially to maintain ordering guarantees. + +For shared workers, the actual execution owner is resolved from the execution record, +ensuring events are streamed to the correct user's namespace. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.events.receive_workflow_events_batch(events=[ + { + "event_id": "", + "root_workflow_exec_id": "", + "workflow_exec_id": "", + "workflow_run_id": "", + "workflow_name": "", + "event_type": "WORKFLOW_EXECUTION_STARTED", + "attributes": { + "task_id": "", + "workflow_name": "", + "input": { + "type": "json", + "value": "", + }, + }, + }, + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `events` | List[[models.WorkflowEventBatchRequestEvent](../../models/workfloweventbatchrequestevent.md)] | :heavy_check_mark: | List of workflow events to send. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowEventBatchResponse](../../models/workfloweventbatchresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_stream_events + +Get Stream Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.events.get_stream_events(scope="*", activity_name="*", activity_id="*", workflow_name="*", workflow_exec_id="*", root_workflow_exec_id="*", parent_workflow_exec_id="*", stream="*", start_seq=0) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `scope` | [Optional[models.Scope]](../../models/scope.md) | :heavy_minus_sign: | N/A | +| `activity_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `activity_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `workflow_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `root_workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `parent_workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `start_seq` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `metadata_filters` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `workflow_event_types` | List[[models.WorkflowEventType](../../models/workfloweventtype.md)] | :heavy_minus_sign: | N/A | +| `last_event_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Union[eventstreaming.EventStream[models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody], eventstreaming.EventStreamAsync[models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody]]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_events + +Get Workflow Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.events.get_workflow_events(limit=100) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `root_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the root workflow that initiated this execution chain. | +| `workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Run ID of the workflow that emitted this event. | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor for pagination. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListWorkflowEventResponse](../../models/listworkfloweventresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/executions/README.md b/docs/sdks/executions/README.md new file mode 100644 index 00000000..a2f4aeb0 --- /dev/null +++ b/docs/sdks/executions/README.md @@ -0,0 +1,598 @@ +# Workflows.Executions + +## Overview + +### Available Operations + +* [get_workflow_execution](#get_workflow_execution) - Get Workflow Execution +* [get_workflow_execution_history](#get_workflow_execution_history) - Get Workflow Execution History +* [signal_workflow_execution](#signal_workflow_execution) - Signal Workflow Execution +* [query_workflow_execution](#query_workflow_execution) - Query Workflow Execution +* [terminate_workflow_execution](#terminate_workflow_execution) - Terminate Workflow Execution +* [batch_terminate_workflow_executions](#batch_terminate_workflow_executions) - Batch Terminate Workflow Executions +* [cancel_workflow_execution](#cancel_workflow_execution) - Cancel Workflow Execution +* [batch_cancel_workflow_executions](#batch_cancel_workflow_executions) - Batch Cancel Workflow Executions +* [reset_workflow](#reset_workflow) - Reset Workflow +* [update_workflow_execution](#update_workflow_execution) - Update Workflow Execution +* [get_workflow_execution_trace_otel](#get_workflow_execution_trace_otel) - Get Workflow Execution Trace Otel +* [get_workflow_execution_trace_summary](#get_workflow_execution_trace_summary) - Get Workflow Execution Trace Summary +* [get_workflow_execution_trace_events](#get_workflow_execution_trace_events) - Get Workflow Execution Trace Events +* [stream](#stream) - Stream + +## get_workflow_execution + +Get Workflow Execution + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.get_workflow_execution(execution_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowExecutionResponse](../../models/workflowexecutionresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_execution_history + +Get Workflow Execution History + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.get_workflow_execution_history(execution_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Any](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## signal_workflow_execution + +Signal Workflow Execution + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.signal_workflow_execution(execution_id="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | The name of the signal to send | +| `input` | [OptionalNullable[models.SignalInvocationBodyInput]](../../models/signalinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the signal, matching its schema | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SignalWorkflowResponse](../../models/signalworkflowresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## query_workflow_execution + +Query Workflow Execution + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.query_workflow_execution(execution_id="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | The name of the query to request | +| `input` | [OptionalNullable[models.QueryInvocationBodyInput]](../../models/queryinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the query, matching its schema | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.QueryWorkflowResponse](../../models/queryworkflowresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## terminate_workflow_execution + +Terminate Workflow Execution + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.executions.terminate_workflow_execution(execution_id="") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## batch_terminate_workflow_executions + +Batch Terminate Workflow Executions + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.batch_terminate_workflow_executions(execution_ids=[ + "", + "", + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_ids` | List[*str*] | :heavy_check_mark: | List of execution IDs to process | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.BatchExecutionResponse](../../models/batchexecutionresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## cancel_workflow_execution + +Cancel Workflow Execution + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.executions.cancel_workflow_execution(execution_id="") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## batch_cancel_workflow_executions + +Batch Cancel Workflow Executions + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.batch_cancel_workflow_executions(execution_ids=[]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_ids` | List[*str*] | :heavy_check_mark: | List of execution IDs to process | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.BatchExecutionResponse](../../models/batchexecutionresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## reset_workflow + +Reset Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.executions.reset_workflow(execution_id="", event_id=24149, exclude_signals=False, exclude_updates=False) + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `event_id` | *int* | :heavy_check_mark: | The event ID to reset the workflow execution to | +| `reason` | *OptionalNullable[str]* | :heavy_minus_sign: | Reason for resetting the workflow execution | +| `exclude_signals` | *Optional[bool]* | :heavy_minus_sign: | Whether to exclude signals that happened after the reset point | +| `exclude_updates` | *Optional[bool]* | :heavy_minus_sign: | Whether to exclude updates that happened after the reset point | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update_workflow_execution + +Update Workflow Execution + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.update_workflow_execution(execution_id="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | The name of the update to request | +| `input` | [OptionalNullable[models.UpdateInvocationBodyInput]](../../models/updateinvocationbodyinput.md) | :heavy_minus_sign: | Input data for the update, matching its schema | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.UpdateWorkflowResponse](../../models/updateworkflowresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_execution_trace_otel + +Get Workflow Execution Trace Otel + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.get_workflow_execution_trace_otel(execution_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowExecutionTraceOTelResponse](../../models/workflowexecutiontraceotelresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_execution_trace_summary + +Get Workflow Execution Trace Summary + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.get_workflow_execution_trace_summary(execution_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowExecutionTraceSummaryResponse](../../models/workflowexecutiontracesummaryresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_execution_trace_events + +Get Workflow Execution Trace Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.get_workflow_execution_trace_events(execution_id="", merge_same_id_events=False, include_internal_events=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `merge_same_id_events` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `include_internal_events` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowExecutionTraceEventsResponse](../../models/workflowexecutiontraceeventsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## stream + +Stream + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.executions.stream(execution_id="") + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `event_source` | [OptionalNullable[models.EventSource]](../../models/eventsource.md) | :heavy_minus_sign: | N/A | +| `last_event_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Union[eventstreaming.EventStream[models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody], eventstreaming.EventStreamAsync[models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody]]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index 6a514e1f..25cd04b2 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -28,7 +28,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.libraries.list() + res = mistral.beta.libraries.list(page_size=100, page=0) # Handle response print(res) @@ -39,6 +39,8 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -47,9 +49,10 @@ with Mistral( ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## create diff --git a/docs/sdks/metrics/README.md b/docs/sdks/metrics/README.md new file mode 100644 index 00000000..08a5ccb9 --- /dev/null +++ b/docs/sdks/metrics/README.md @@ -0,0 +1,69 @@ +# Workflows.Metrics + +## Overview + +### Available Operations + +* [get_workflow_metrics](#get_workflow_metrics) - Get Workflow Metrics + +## get_workflow_metrics + +Get comprehensive metrics for a specific workflow. + +Args: + workflow_name: The name of the workflow type to get metrics for + start_time: Optional start time filter (ISO 8601 format) + end_time: Optional end time filter (ISO 8601 format) + +Returns: + WorkflowMetrics: Dictionary containing metrics: + - execution_count: Total number of executions + - success_count: Number of successful executions + - error_count: Number of failed/terminated executions + - average_latency_ms: Average execution duration in milliseconds + - retry_rate: Proportion of workflows with retries + - latency_over_time: Time-series data of execution durations + +Example: + GET /v1/workflows/MyWorkflow/metrics + GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00:00Z + GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00:00Z&end_time=2025-12-31T23:59:59Z + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.metrics.get_workflow_metrics(workflow_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `workflow_name` | *str* | :heavy_check_mark: | N/A | +| `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter workflows started after this time (ISO 8601) | +| `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter workflows started before this time (ISO 8601) | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowMetrics](../../models/workflowmetrics.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/runs/README.md b/docs/sdks/runs/README.md new file mode 100644 index 00000000..bd786544 --- /dev/null +++ b/docs/sdks/runs/README.md @@ -0,0 +1,138 @@ +# Workflows.Runs + +## Overview + +### Available Operations + +* [list_runs](#list_runs) - List Runs +* [get_run](#get_run) - Get Run +* [get_run_history](#get_run_history) - Get Run History + +## list_runs + +List Runs + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.runs.list_runs(page_size=50) + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | +| `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListRunsV1WorkflowsRunsGetResponse](../../models/listrunsv1workflowsrunsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_run + +Get Run + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.runs.get_run(run_id="553b071e-3d04-46aa-aa9a-0fca61dc60fa") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `run_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowExecutionResponse](../../models/workflowexecutionresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_run_history + +Get Run History + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.runs.get_run_history(run_id="f7296489-0212-4239-9e35-12fabfe8cd11") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `run_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Any](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/schedules/README.md b/docs/sdks/schedules/README.md new file mode 100644 index 00000000..dd1565e0 --- /dev/null +++ b/docs/sdks/schedules/README.md @@ -0,0 +1,133 @@ +# Workflows.Schedules + +## Overview + +### Available Operations + +* [get_schedules](#get_schedules) - Get Schedules +* [schedule_workflow](#schedule_workflow) - Schedule Workflow +* [unschedule_workflow](#unschedule_workflow) - Unschedule Workflow + +## get_schedules + +Get Schedules + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.schedules.get_schedules() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowScheduleListResponse](../../models/workflowschedulelistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## schedule_workflow + +Schedule Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.schedules.schedule_workflow(schedule={ + "input": "", + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `schedule` | [models.ScheduleDefinition](../../models/scheduledefinition.md) | :heavy_check_mark: | Specification of the times scheduled actions may occur.

The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and
:py:attr:`cron_expressions` excluding anything in :py:attr:`skip`.

Used for input where schedule_id is optional (can be provided or auto-generated). | +| `workflow_registration_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The ID of the workflow registration to schedule | +| `workflow_version_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Deprecated: use workflow_registration_id | +| `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | The name or ID of the workflow to schedule | +| `workflow_task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | +| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom schedule ID. If not provided, a random ID will be generated. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this schedule to | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowScheduleResponse](../../models/workflowscheduleresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## unschedule_workflow + +Unschedule Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.schedules.unschedule_workflow(schedule_id="") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/voices/README.md b/docs/sdks/voices/README.md index 3383e617..3b4d135f 100644 --- a/docs/sdks/voices/README.md +++ b/docs/sdks/voices/README.md @@ -27,7 +27,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.audio.voices.list(limit=10, offset=0) + res = mistral.audio.voices.list(limit=10, offset=0, type_="all") # Handle response print(res) @@ -36,11 +36,12 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of voices to return | -| `offset` | *Optional[int]* | :heavy_minus_sign: | Offset for pagination | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of voices to return | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Offset for pagination | +| `type` | [Optional[models.ListVoicesV1AudioVoicesGetType]](../../models/listvoicesv1audiovoicesgettype.md) | :heavy_minus_sign: | Filter the voices between customs and presets | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md new file mode 100644 index 00000000..e65383ca --- /dev/null +++ b/docs/sdks/workflows/README.md @@ -0,0 +1,423 @@ +# Workflows + +## Overview + +### Available Operations + +* [get_workflows](#get_workflows) - Get Workflows +* [get_workflow_registrations](#get_workflow_registrations) - Get Workflow Registrations +* [execute_workflow](#execute_workflow) - Execute Workflow +* [~~execute_workflow_registration~~](#execute_workflow_registration) - Execute Workflow Registration :warning: **Deprecated** +* [get_workflow](#get_workflow) - Get Workflow +* [update_workflow](#update_workflow) - Update Workflow +* [get_workflow_registration](#get_workflow_registration) - Get Workflow Registration +* [archive_workflow](#archive_workflow) - Archive Workflow +* [unarchive_workflow](#unarchive_workflow) - Unarchive Workflow + +## get_workflows + +Get Workflows + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.get_workflows(active_only=False, include_shared=True, limit=50) + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | +| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.GetWorkflowsV1WorkflowsGetResponse](../../models/getworkflowsv1workflowsgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_registrations + +Get Workflow Registrations + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.get_workflow_registrations(active_only=False, include_shared=True, with_workflow=False, limit=50) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `workflow_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The workflow ID to filter by | +| `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | The task queue to filter by | +| `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows versions | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflow versions | +| `workflow_search` | *OptionalNullable[str]* | :heavy_minus_sign: | The workflow name to filter by | +| `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | +| `with_workflow` | *Optional[bool]* | :heavy_minus_sign: | Whether to include the workflow definition | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows versions to return | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowRegistrationListResponse](../../models/workflowregistrationlistresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## execute_workflow + +Execute Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.execute_workflow(workflow_identifier="", wait_for_result=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | +| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | +| `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | +| `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | +| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost](../../models/responseexecuteworkflowv1workflowsworkflowidentifierexecutepost.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~execute_workflow_registration~~ + +Execute Workflow Registration + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.execute_workflow_registration(workflow_registration_id="de11d76a-e0fb-44dd-abd9-2e75fc275b94", wait_for_result=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | +| `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | +| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | +| `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | +| `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | +| `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | +| `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost](../../models/responseexecuteworkflowregistrationv1workflowsregistrationsworkflowregistrationidexecutepost.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow + +Get Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.get_workflow(workflow_identifier="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowGetResponse](../../models/workflowgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update_workflow + +Update Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.update_workflow(workflow_identifier="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | New display name value | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | New description value | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to make the workflow available in the chat assistant | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowUpdateResponse](../../models/workflowupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_registration + +Get Workflow Registration + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.get_workflow_registration(workflow_registration_id="c4d86c40-960f-4e9a-9d6f-ad8342d7aa83", with_workflow=False, include_shared=True) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | +| `with_workflow` | *Optional[bool]* | :heavy_minus_sign: | Whether to include the workflow definition | +| `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflow versions | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowRegistrationGetResponse](../../models/workflowregistrationgetresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## archive_workflow + +Archive Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.archive_workflow(workflow_identifier="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowArchiveResponse](../../models/workflowarchiveresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## unarchive_workflow + +Unarchive Workflow + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.unarchive_workflow(workflow_identifier="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_identifier` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowUnarchiveResponse](../../models/workflowunarchiveresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflowsevents/README.md b/docs/sdks/workflowsevents/README.md new file mode 100644 index 00000000..bae0cb90 --- /dev/null +++ b/docs/sdks/workflowsevents/README.md @@ -0,0 +1,230 @@ +# Workflows.Events + +## Overview + +### Available Operations + +* [receive_workflow_event](#receive_workflow_event) - Receive Workflow Event +* [receive_workflow_events_batch](#receive_workflow_events_batch) - Receive Workflow Events Batch +* [get_stream_events](#get_stream_events) - Get Stream Events +* [get_workflow_events](#get_workflow_events) - Get Workflow Events + +## receive_workflow_event + +Receive workflow events from workers. + +Events are published to NATS for real-time streaming and persisted in the database. + +For shared workers, the actual execution owner is resolved from the execution record, +ensuring events are streamed to the correct user's namespace. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.events.receive_workflow_event(event={ + "event_id": "", + "root_workflow_exec_id": "", + "workflow_exec_id": "", + "workflow_run_id": "", + "workflow_name": "", + "event_type": "CUSTOM_TASK_STARTED", + "attributes": { + "custom_task_id": "", + "custom_task_type": "", + }, + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `event` | [models.WorkflowEventRequestEvent](../../models/workfloweventrequestevent.md) | :heavy_check_mark: | The workflow event payload. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowEventResponse](../../models/workfloweventresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## receive_workflow_events_batch + +Receive multiple workflow events from workers in a single batch. + +Events are published to NATS for real-time streaming and persisted in the database. +This endpoint processes events sequentially to maintain ordering guarantees. + +For shared workers, the actual execution owner is resolved from the execution record, +ensuring events are streamed to the correct user's namespace. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.events.receive_workflow_events_batch(events=[ + { + "event_id": "", + "root_workflow_exec_id": "", + "workflow_exec_id": "", + "workflow_run_id": "", + "workflow_name": "", + "event_type": "WORKFLOW_EXECUTION_STARTED", + "attributes": { + "task_id": "", + "workflow_name": "", + "input": { + "type": "json", + "value": "", + }, + }, + }, + ]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `events` | List[[models.WorkflowEventBatchRequestEvent](../../models/workfloweventbatchrequestevent.md)] | :heavy_check_mark: | List of workflow events to send. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowEventBatchResponse](../../models/workfloweventbatchresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_stream_events + +Get Stream Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.events.get_stream_events(scope="*", activity_name="*", activity_id="*", workflow_name="*", workflow_exec_id="*", root_workflow_exec_id="*", parent_workflow_exec_id="*", stream="*", start_seq=0) + + with res as event_stream: + for event in event_stream: + # handle event + print(event, flush=True) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `scope` | [Optional[models.Scope]](../../models/scope.md) | :heavy_minus_sign: | N/A | +| `activity_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `activity_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `workflow_name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `root_workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `parent_workflow_exec_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `start_seq` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `metadata_filters` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `workflow_event_types` | List[[models.WorkflowEventType](../../models/workfloweventtype.md)] | :heavy_minus_sign: | N/A | +| `last_event_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[Union[eventstreaming.EventStream[models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody], eventstreaming.EventStreamAsync[models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody]]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get_workflow_events + +Get Workflow Events + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.events.get_workflow_events(limit=100) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `root_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the root workflow that initiated this execution chain. | +| `workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the workflow that emitted this event. | +| `workflow_run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Run ID of the workflow that emitted this event. | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of events to return. | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor for pagination. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ListWorkflowEventResponse](../../models/listworkfloweventresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/examples/mistral/workflows/async_workflow_execute.py b/examples/mistral/workflows/async_workflow_execute.py new file mode 100644 index 00000000..737253ab --- /dev/null +++ b/examples/mistral/workflows/async_workflow_execute.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +import asyncio +import os + +from mistralai.client import Mistral + +WORKFLOW_NAME = "example-hello-world-workflow" + + +async def main(): + api_key = os.environ["MISTRAL_API_KEY"] + + client = Mistral(api_key=api_key) + + # Execute workflow and wait for result using wait_for_result parameter + response = await client.workflows.execute_workflow_async( + workflow_identifier=WORKFLOW_NAME, + input={"document_title": "hello world"}, + wait_for_result=True, + timeout_seconds=60.0, + ) + + print(f"Workflow: {response.workflow_name}") + print(f"Execution ID: {response.execution_id}") + print(f"Result: {response.result}") + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/examples/mistral/workflows/async_workflow_execute_and_wait.py b/examples/mistral/workflows/async_workflow_execute_and_wait.py new file mode 100644 index 00000000..964bc75a --- /dev/null +++ b/examples/mistral/workflows/async_workflow_execute_and_wait.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +import asyncio +import os + +from mistralai.client import Mistral + +WORKFLOW_NAME = "example-hello-world-workflow" + + +async def main(): + api_key = os.environ["MISTRAL_API_KEY"] + + client = Mistral(api_key=api_key) + + # Example 1: Using API sync mode (server-side waiting) + result = await client.workflows.execute_workflow_and_wait_async( + workflow_identifier=WORKFLOW_NAME, + input={"document_title": "hello world"}, + use_api_sync=True, + timeout_seconds=60.0, + ) + print(f"Result (API sync): {result}") + + # Example 2: Using polling mode (client-side waiting) + result = await client.workflows.execute_workflow_and_wait_async( + workflow_identifier=WORKFLOW_NAME, + input={"document_title": "hello world"}, + use_api_sync=False, + polling_interval=5, + max_attempts=12, # 12 attempts * 5 seconds = 60 seconds max + ) + print(f"Result (polling): {result}") + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/examples/mistral/workflows/workflow_execute.py b/examples/mistral/workflows/workflow_execute.py new file mode 100644 index 00000000..650f9352 --- /dev/null +++ b/examples/mistral/workflows/workflow_execute.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python + +import os + +from mistralai.client import Mistral + +WORKFLOW_NAME = "example-hello-world-workflow" + + +def main(): + api_key = os.environ["MISTRAL_API_KEY"] + + client = Mistral(api_key=api_key) + + # Execute workflow and wait for result using wait_for_result parameter + response = client.workflows.execute_workflow( + workflow_identifier=WORKFLOW_NAME, + input={"document_title": "hello world"}, + wait_for_result=True, + timeout_seconds=60.0, + ) + + print(f"Workflow: {response.workflow_name}") + print(f"Execution ID: {response.execution_id}") + print(f"Result: {response.result}") + + +if __name__ == "__main__": + main() diff --git a/examples/mistral/workflows/workflow_execute_and_wait.py b/examples/mistral/workflows/workflow_execute_and_wait.py new file mode 100644 index 00000000..6a50aa88 --- /dev/null +++ b/examples/mistral/workflows/workflow_execute_and_wait.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +import os + +from mistralai.client import Mistral + +WORKFLOW_NAME = "example-hello-world-workflow" + + +def main(): + api_key = os.environ["MISTRAL_API_KEY"] + + client = Mistral(api_key=api_key) + + # Example 1: Using API sync mode (server-side waiting) + result = client.workflows.execute_workflow_and_wait( + workflow_identifier=WORKFLOW_NAME, + input={"document_title": "hello world"}, + use_api_sync=True, + timeout_seconds=60.0, + ) + print(f"Result (API sync): {result}") + + # Example 2: Using polling mode (client-side waiting) + result = client.workflows.execute_workflow_and_wait( + workflow_identifier=WORKFLOW_NAME, + input={"document_title": "hello world"}, + use_api_sync=False, + polling_interval=5, + max_attempts=12, # 12 attempts * 5 seconds = 60 seconds max + ) + print(f"Result (polling): {result}") + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml index 7be2c9e6..c15a2e80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.1.3" +version = "2.2.0rc1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/scripts/run_examples.sh b/scripts/run_examples.sh index eca854b4..83b866fb 100755 --- a/scripts/run_examples.sh +++ b/scripts/run_examples.sh @@ -49,6 +49,10 @@ exclude_files=( "examples/mistral/audio/async_realtime_transcription_microphone.py" "examples/mistral/audio/async_realtime_transcription_stream.py" "examples/mistral/audio/async_realtime_transcription_dual_delay_microphone.py" + "examples/mistral/workflows/workflow_execute_and_wait.py" + "examples/mistral/workflows/async_workflow_execute_and_wait.py" + "examples/mistral/workflows/workflow_execute.py" + "examples/mistral/workflows/async_workflow_execute.py" ) # Files that require extra dependencies (agents, mcp, audio, etc.) diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 68da4e56..5cebd130 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.1.3" +__version__: str = "2.2.0rc1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.1.3 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.2.0rc1 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/batch_jobs.py b/src/mistralai/client/batch_jobs.py index 0e135b30..dc378cde 100644 --- a/src/mistralai/client/batch_jobs.py +++ b/src/mistralai/client/batch_jobs.py @@ -626,6 +626,174 @@ async def get_async( raise errors.SDKError("Unexpected response received", http_res) + def delete( + self, + *, + job_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeleteBatchJobResponse: + r"""Delete Batch Job + + Request the deletion of a batch job. + + :param job_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.JobsAPIRoutesBatchDeleteBatchJobRequest( + job_id=job_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/batch/jobs/{job_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="jobs_api_routes_batch_delete_batch_job", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DeleteBatchJobResponse, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_async( + self, + *, + job_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeleteBatchJobResponse: + r"""Delete Batch Job + + Request the deletion of a batch job. + + :param job_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.JobsAPIRoutesBatchDeleteBatchJobRequest( + job_id=job_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/batch/jobs/{job_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="jobs_api_routes_batch_delete_batch_job", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DeleteBatchJobResponse, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def cancel( self, *, diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index e0c4793e..238f9277 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -640,6 +640,7 @@ def call_tool( *, tool_name: str, connector_id_or_name: str, + credentials_name: OptionalNullable[str] = UNSET, arguments: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -652,6 +653,7 @@ def call_tool( :param tool_name: :param connector_id_or_name: + :param credentials_name: :param arguments: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -670,6 +672,7 @@ def call_tool( request = models.ConnectorCallToolV1Request( tool_name=tool_name, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, connector_call_tool_request=models.ConnectorCallToolRequest( arguments=arguments, @@ -745,6 +748,7 @@ async def call_tool_async( *, tool_name: str, connector_id_or_name: str, + credentials_name: OptionalNullable[str] = UNSET, arguments: Optional[Dict[str, Any]] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -757,6 +761,7 @@ async def call_tool_async( :param tool_name: :param connector_id_or_name: + :param credentials_name: :param arguments: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -775,6 +780,7 @@ async def call_tool_async( request = models.ConnectorCallToolV1Request( tool_name=tool_name, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, connector_call_tool_request=models.ConnectorCallToolRequest( arguments=arguments, @@ -857,7 +863,7 @@ def list_tools( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ResponseConnectorListToolsV12: + ) -> models.ResponseConnectorListToolsV1: r"""List tools for a connector. List all tools available for an MCP connector. @@ -933,7 +939,7 @@ def list_tools( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - models.ResponseConnectorListToolsV12, http_res + models.ResponseConnectorListToolsV1, http_res ) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( @@ -961,7 +967,7 @@ async def list_tools_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.ResponseConnectorListToolsV12: + ) -> models.ResponseConnectorListToolsV1: r"""List tools for a connector. List all tools available for an MCP connector. @@ -1037,7 +1043,7 @@ async def list_tools_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - models.ResponseConnectorListToolsV12, http_res + models.ResponseConnectorListToolsV1, http_res ) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response( diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py new file mode 100644 index 00000000..a428c61c --- /dev/null +++ b/src/mistralai/client/deployments.py @@ -0,0 +1,370 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a874b267fcb9 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Deployments(BaseSDK): + def list_deployments( + self, + *, + active_only: Optional[bool] = True, + workflow_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentListResponse: + r"""List Deployments + + :param active_only: + :param workflow_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ListDeploymentsV1WorkflowsDeploymentsGetRequest( + active_only=active_only, + workflow_name=workflow_name, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/deployments", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_deployments_v1_workflows_deployments_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DeploymentListResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_deployments_async( + self, + *, + active_only: Optional[bool] = True, + workflow_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentListResponse: + r"""List Deployments + + :param active_only: + :param workflow_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ListDeploymentsV1WorkflowsDeploymentsGetRequest( + active_only=active_only, + workflow_name=workflow_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/deployments", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_deployments_v1_workflows_deployments_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DeploymentListResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_deployment( + self, + *, + name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentDetailResponse: + r"""Get Deployment + + :param name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDeploymentV1WorkflowsDeploymentsNameGetRequest( + name=name, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/deployments/{name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_deployment_v1_workflows_deployments__name__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DeploymentDetailResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_deployment_async( + self, + *, + name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.DeploymentDetailResponse: + r"""Get Deployment + + :param name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetDeploymentV1WorkflowsDeploymentsNameGetRequest( + name=name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/deployments/{name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_deployment_v1_workflows_deployments__name__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.DeploymentDetailResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/events.py b/src/mistralai/client/events.py new file mode 100644 index 00000000..d44c0692 --- /dev/null +++ b/src/mistralai/client/events.py @@ -0,0 +1,886 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ac9b961cc70d + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import eventstreaming, get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, List, Mapping, Optional, Union + + +class Events(BaseSDK): + def receive_workflow_event( + self, + *, + event: Union[ + models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventResponse: + r"""Receive Workflow Event + + Receive workflow events from workers. + + Events are published to NATS for real-time streaming and persisted in the database. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param event: The workflow event payload. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventRequest( + event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_event_v1_workflows_events_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def receive_workflow_event_async( + self, + *, + event: Union[ + models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventResponse: + r"""Receive Workflow Event + + Receive workflow events from workers. + + Events are published to NATS for real-time streaming and persisted in the database. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param event: The workflow event payload. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventRequest( + event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_event_v1_workflows_events_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def receive_workflow_events_batch( + self, + *, + events: Union[ + List[models.WorkflowEventBatchRequestEvent], + List[models.WorkflowEventBatchRequestEventTypedDict], + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventBatchResponse: + r"""Receive Workflow Events Batch + + Receive multiple workflow events from workers in a single batch. + + Events are published to NATS for real-time streaming and persisted in the database. + This endpoint processes events sequentially to maintain ordering guarantees. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param events: List of workflow events to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventBatchRequest( + events=utils.get_pydantic_model( + events, List[models.WorkflowEventBatchRequestEvent] + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/events/batch", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventBatchRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def receive_workflow_events_batch_async( + self, + *, + events: Union[ + List[models.WorkflowEventBatchRequestEvent], + List[models.WorkflowEventBatchRequestEventTypedDict], + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventBatchResponse: + r"""Receive Workflow Events Batch + + Receive multiple workflow events from workers in a single batch. + + Events are published to NATS for real-time streaming and persisted in the database. + This endpoint processes events sequentially to maintain ordering guarantees. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param events: List of workflow events to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventBatchRequest( + events=utils.get_pydantic_model( + events, List[models.WorkflowEventBatchRequestEvent] + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/events/batch", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventBatchRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_stream_events( + self, + *, + scope: Optional[models.Scope] = "*", + activity_name: Optional[str] = "*", + activity_id: Optional[str] = "*", + workflow_name: Optional[str] = "*", + workflow_exec_id: Optional[str] = "*", + root_workflow_exec_id: Optional[str] = "*", + parent_workflow_exec_id: Optional[str] = "*", + stream: Optional[str] = "*", + start_seq: Optional[int] = 0, + metadata_filters: OptionalNullable[Dict[str, Any]] = UNSET, + workflow_event_types: OptionalNullable[List[models.WorkflowEventType]] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStream[ + models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ]: + r"""Get Stream Events + + :param scope: + :param activity_name: + :param activity_id: + :param workflow_name: + :param workflow_exec_id: + :param root_workflow_exec_id: + :param parent_workflow_exec_id: + :param stream: + :param start_seq: + :param metadata_filters: + :param workflow_event_types: + :param last_event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetStreamEventsV1WorkflowsEventsStreamGetRequest( + scope=scope, + activity_name=activity_name, + activity_id=activity_id, + workflow_name=workflow_name, + workflow_exec_id=workflow_exec_id, + root_workflow_exec_id=root_workflow_exec_id, + parent_workflow_exec_id=parent_workflow_exec_id, + stream=stream, + start_seq=start_seq, + metadata_filters=metadata_filters, + workflow_event_types=workflow_event_types, + last_event_id=last_event_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/events/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_stream_events_v1_workflows_events_stream_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStream( + http_res, + lambda raw: utils.unmarshal_json( + raw, models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + async def get_stream_events_async( + self, + *, + scope: Optional[models.Scope] = "*", + activity_name: Optional[str] = "*", + activity_id: Optional[str] = "*", + workflow_name: Optional[str] = "*", + workflow_exec_id: Optional[str] = "*", + root_workflow_exec_id: Optional[str] = "*", + parent_workflow_exec_id: Optional[str] = "*", + stream: Optional[str] = "*", + start_seq: Optional[int] = 0, + metadata_filters: OptionalNullable[Dict[str, Any]] = UNSET, + workflow_event_types: OptionalNullable[List[models.WorkflowEventType]] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStreamAsync[ + models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ]: + r"""Get Stream Events + + :param scope: + :param activity_name: + :param activity_id: + :param workflow_name: + :param workflow_exec_id: + :param root_workflow_exec_id: + :param parent_workflow_exec_id: + :param stream: + :param start_seq: + :param metadata_filters: + :param workflow_event_types: + :param last_event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetStreamEventsV1WorkflowsEventsStreamGetRequest( + scope=scope, + activity_name=activity_name, + activity_id=activity_id, + workflow_name=workflow_name, + workflow_exec_id=workflow_exec_id, + root_workflow_exec_id=root_workflow_exec_id, + parent_workflow_exec_id=parent_workflow_exec_id, + stream=stream, + start_seq=start_seq, + metadata_filters=metadata_filters, + workflow_event_types=workflow_event_types, + last_event_id=last_event_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/events/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_stream_events_v1_workflows_events_stream_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStreamAsync( + http_res, + lambda raw: utils.unmarshal_json( + raw, models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + def get_workflow_events( + self, + *, + root_workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_run_id: OptionalNullable[str] = UNSET, + limit: Optional[int] = 100, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListWorkflowEventResponse: + r"""Get Workflow Events + + :param root_workflow_exec_id: Execution ID of the root workflow that initiated this execution chain. + :param workflow_exec_id: Execution ID of the workflow that emitted this event. + :param workflow_run_id: Run ID of the workflow that emitted this event. + :param limit: Maximum number of events to return. + :param cursor: Cursor for pagination. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowEventsV1WorkflowsEventsListGetRequest( + root_workflow_exec_id=root_workflow_exec_id, + workflow_exec_id=workflow_exec_id, + workflow_run_id=workflow_run_id, + limit=limit, + cursor=cursor, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/events/list", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_events_v1_workflows_events_list_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListWorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_events_async( + self, + *, + root_workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_run_id: OptionalNullable[str] = UNSET, + limit: Optional[int] = 100, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListWorkflowEventResponse: + r"""Get Workflow Events + + :param root_workflow_exec_id: Execution ID of the root workflow that initiated this execution chain. + :param workflow_exec_id: Execution ID of the workflow that emitted this event. + :param workflow_run_id: Run ID of the workflow that emitted this event. + :param limit: Maximum number of events to return. + :param cursor: Cursor for pagination. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowEventsV1WorkflowsEventsListGetRequest( + root_workflow_exec_id=root_workflow_exec_id, + workflow_exec_id=workflow_exec_id, + workflow_run_id=workflow_run_id, + limit=limit, + cursor=cursor, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/events/list", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_events_v1_workflows_events_list_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListWorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py new file mode 100644 index 00000000..7112dc1a --- /dev/null +++ b/src/mistralai/client/executions.py @@ -0,0 +1,2724 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 974004d347a2 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import eventstreaming, get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional, Union + + +class Executions(BaseSDK): + def get_workflow_execution( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionResponse: + r"""Get Workflow Execution + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequest( + execution_id=execution_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_v1_workflows_executions__execution_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_execution_async( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionResponse: + r"""Get Workflow Execution + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequest( + execution_id=execution_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_v1_workflows_executions__execution_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_workflow_execution_history( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Get Workflow Execution History + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest( + execution_id=execution_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}/history", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_history_v1_workflows_executions__execution_id__history_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_execution_history_async( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Get Workflow Execution History + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest( + execution_id=execution_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}/history", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_history_v1_workflows_executions__execution_id__history_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def signal_workflow_execution( + self, + *, + execution_id: str, + name: str, + input: OptionalNullable[ + Union[ + models.SignalInvocationBodyInput, + models.SignalInvocationBodyInputTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SignalWorkflowResponse: + r"""Signal Workflow Execution + + :param execution_id: + :param name: The name of the signal to send + :param input: Input data for the signal, matching its schema + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequest( + execution_id=execution_id, + signal_invocation_body=models.SignalInvocationBody( + name=name, + input=utils.get_pydantic_model( + input, OptionalNullable[models.SignalInvocationBodyInput] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/{execution_id}/signals", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.signal_invocation_body, + False, + False, + "json", + models.SignalInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="signal_workflow_execution_v1_workflows_executions__execution_id__signals_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.SignalWorkflowResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def signal_workflow_execution_async( + self, + *, + execution_id: str, + name: str, + input: OptionalNullable[ + Union[ + models.SignalInvocationBodyInput, + models.SignalInvocationBodyInputTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SignalWorkflowResponse: + r"""Signal Workflow Execution + + :param execution_id: + :param name: The name of the signal to send + :param input: Input data for the signal, matching its schema + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequest( + execution_id=execution_id, + signal_invocation_body=models.SignalInvocationBody( + name=name, + input=utils.get_pydantic_model( + input, OptionalNullable[models.SignalInvocationBodyInput] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/{execution_id}/signals", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.signal_invocation_body, + False, + False, + "json", + models.SignalInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="signal_workflow_execution_v1_workflows_executions__execution_id__signals_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "202", "application/json"): + return unmarshal_json_response(models.SignalWorkflowResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def query_workflow_execution( + self, + *, + execution_id: str, + name: str, + input: OptionalNullable[ + Union[ + models.QueryInvocationBodyInput, + models.QueryInvocationBodyInputTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.QueryWorkflowResponse: + r"""Query Workflow Execution + + :param execution_id: + :param name: The name of the query to request + :param input: Input data for the query, matching its schema + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest( + execution_id=execution_id, + query_invocation_body=models.QueryInvocationBody( + name=name, + input=utils.get_pydantic_model( + input, OptionalNullable[models.QueryInvocationBodyInput] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/{execution_id}/queries", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.query_invocation_body, + False, + False, + "json", + models.QueryInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="query_workflow_execution_v1_workflows_executions__execution_id__queries_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.QueryWorkflowResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def query_workflow_execution_async( + self, + *, + execution_id: str, + name: str, + input: OptionalNullable[ + Union[ + models.QueryInvocationBodyInput, + models.QueryInvocationBodyInputTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.QueryWorkflowResponse: + r"""Query Workflow Execution + + :param execution_id: + :param name: The name of the query to request + :param input: Input data for the query, matching its schema + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest( + execution_id=execution_id, + query_invocation_body=models.QueryInvocationBody( + name=name, + input=utils.get_pydantic_model( + input, OptionalNullable[models.QueryInvocationBodyInput] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/{execution_id}/queries", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.query_invocation_body, + False, + False, + "json", + models.QueryInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="query_workflow_execution_v1_workflows_executions__execution_id__queries_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.QueryWorkflowResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def terminate_workflow_execution( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Terminate Workflow Execution + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequest( + execution_id=execution_id, + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/{execution_id}/terminate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="terminate_workflow_execution_v1_workflows_executions__execution_id__terminate_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def terminate_workflow_execution_async( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Terminate Workflow Execution + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequest( + execution_id=execution_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/{execution_id}/terminate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="terminate_workflow_execution_v1_workflows_executions__execution_id__terminate_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def batch_terminate_workflow_executions( + self, + *, + execution_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.BatchExecutionResponse: + r"""Batch Terminate Workflow Executions + + :param execution_ids: List of execution IDs to process + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.BatchExecutionBody( + execution_ids=execution_ids, + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/terminate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.BatchExecutionBody + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="batch_terminate_workflow_executions_v1_workflows_executions_terminate_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.BatchExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def batch_terminate_workflow_executions_async( + self, + *, + execution_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.BatchExecutionResponse: + r"""Batch Terminate Workflow Executions + + :param execution_ids: List of execution IDs to process + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.BatchExecutionBody( + execution_ids=execution_ids, + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/terminate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.BatchExecutionBody + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="batch_terminate_workflow_executions_v1_workflows_executions_terminate_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.BatchExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def cancel_workflow_execution( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Cancel Workflow Execution + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequest( + execution_id=execution_id, + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/{execution_id}/cancel", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="cancel_workflow_execution_v1_workflows_executions__execution_id__cancel_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def cancel_workflow_execution_async( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Cancel Workflow Execution + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequest( + execution_id=execution_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/{execution_id}/cancel", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="cancel_workflow_execution_v1_workflows_executions__execution_id__cancel_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def batch_cancel_workflow_executions( + self, + *, + execution_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.BatchExecutionResponse: + r"""Batch Cancel Workflow Executions + + :param execution_ids: List of execution IDs to process + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.BatchExecutionBody( + execution_ids=execution_ids, + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/cancel", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.BatchExecutionBody + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="batch_cancel_workflow_executions_v1_workflows_executions_cancel_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.BatchExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def batch_cancel_workflow_executions_async( + self, + *, + execution_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.BatchExecutionResponse: + r"""Batch Cancel Workflow Executions + + :param execution_ids: List of execution IDs to process + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.BatchExecutionBody( + execution_ids=execution_ids, + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/cancel", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.BatchExecutionBody + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="batch_cancel_workflow_executions_v1_workflows_executions_cancel_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.BatchExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def reset_workflow( + self, + *, + execution_id: str, + event_id: int, + reason: OptionalNullable[str] = UNSET, + exclude_signals: Optional[bool] = False, + exclude_updates: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Reset Workflow + + :param execution_id: + :param event_id: The event ID to reset the workflow execution to + :param reason: Reason for resetting the workflow execution + :param exclude_signals: Whether to exclude signals that happened after the reset point + :param exclude_updates: Whether to exclude updates that happened after the reset point + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest( + execution_id=execution_id, + reset_invocation_body=models.ResetInvocationBody( + event_id=event_id, + reason=reason, + exclude_signals=exclude_signals, + exclude_updates=exclude_updates, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/{execution_id}/reset", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.reset_invocation_body, + False, + False, + "json", + models.ResetInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="reset_workflow_v1_workflows_executions__execution_id__reset_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def reset_workflow_async( + self, + *, + execution_id: str, + event_id: int, + reason: OptionalNullable[str] = UNSET, + exclude_signals: Optional[bool] = False, + exclude_updates: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Reset Workflow + + :param execution_id: + :param event_id: The event ID to reset the workflow execution to + :param reason: Reason for resetting the workflow execution + :param exclude_signals: Whether to exclude signals that happened after the reset point + :param exclude_updates: Whether to exclude updates that happened after the reset point + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest( + execution_id=execution_id, + reset_invocation_body=models.ResetInvocationBody( + event_id=event_id, + reason=reason, + exclude_signals=exclude_signals, + exclude_updates=exclude_updates, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/{execution_id}/reset", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.reset_invocation_body, + False, + False, + "json", + models.ResetInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="reset_workflow_v1_workflows_executions__execution_id__reset_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update_workflow_execution( + self, + *, + execution_id: str, + name: str, + input: OptionalNullable[ + Union[ + models.UpdateInvocationBodyInput, + models.UpdateInvocationBodyInputTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.UpdateWorkflowResponse: + r"""Update Workflow Execution + + :param execution_id: + :param name: The name of the update to request + :param input: Input data for the update, matching its schema + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest( + execution_id=execution_id, + update_invocation_body=models.UpdateInvocationBody( + name=name, + input=utils.get_pydantic_model( + input, OptionalNullable[models.UpdateInvocationBodyInput] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/executions/{execution_id}/updates", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_invocation_body, + False, + False, + "json", + models.UpdateInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_workflow_execution_v1_workflows_executions__execution_id__updates_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.UpdateWorkflowResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_workflow_execution_async( + self, + *, + execution_id: str, + name: str, + input: OptionalNullable[ + Union[ + models.UpdateInvocationBodyInput, + models.UpdateInvocationBodyInputTypedDict, + ] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.UpdateWorkflowResponse: + r"""Update Workflow Execution + + :param execution_id: + :param name: The name of the update to request + :param input: Input data for the update, matching its schema + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest( + execution_id=execution_id, + update_invocation_body=models.UpdateInvocationBody( + name=name, + input=utils.get_pydantic_model( + input, OptionalNullable[models.UpdateInvocationBodyInput] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/executions/{execution_id}/updates", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_invocation_body, + False, + False, + "json", + models.UpdateInvocationBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_workflow_execution_v1_workflows_executions__execution_id__updates_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.UpdateWorkflowResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_workflow_execution_trace_otel( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionTraceOTelResponse: + r"""Get Workflow Execution Trace Otel + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionTraceOtelRequest( + execution_id=execution_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}/trace/otel", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_trace_otel", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowExecutionTraceOTelResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_execution_trace_otel_async( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionTraceOTelResponse: + r"""Get Workflow Execution Trace Otel + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionTraceOtelRequest( + execution_id=execution_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}/trace/otel", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_trace_otel", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowExecutionTraceOTelResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_workflow_execution_trace_summary( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionTraceSummaryResponse: + r"""Get Workflow Execution Trace Summary + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionTraceSummaryRequest( + execution_id=execution_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}/trace/summary", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_trace_summary", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowExecutionTraceSummaryResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_execution_trace_summary_async( + self, + *, + execution_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionTraceSummaryResponse: + r"""Get Workflow Execution Trace Summary + + :param execution_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionTraceSummaryRequest( + execution_id=execution_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}/trace/summary", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_trace_summary", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowExecutionTraceSummaryResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_workflow_execution_trace_events( + self, + *, + execution_id: str, + merge_same_id_events: Optional[bool] = False, + include_internal_events: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionTraceEventsResponse: + r"""Get Workflow Execution Trace Events + + :param execution_id: + :param merge_same_id_events: + :param include_internal_events: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionTraceEventsRequest( + execution_id=execution_id, + merge_same_id_events=merge_same_id_events, + include_internal_events=include_internal_events, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}/trace/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_trace_events", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowExecutionTraceEventsResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_execution_trace_events_async( + self, + *, + execution_id: str, + merge_same_id_events: Optional[bool] = False, + include_internal_events: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionTraceEventsResponse: + r"""Get Workflow Execution Trace Events + + :param execution_id: + :param merge_same_id_events: + :param include_internal_events: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowExecutionTraceEventsRequest( + execution_id=execution_id, + merge_same_id_events=merge_same_id_events, + include_internal_events=include_internal_events, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}/trace/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_execution_trace_events", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowExecutionTraceEventsResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def stream( + self, + *, + execution_id: str, + event_source: OptionalNullable[models.EventSource] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStream[ + models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody + ]: + r"""Stream + + :param execution_id: + :param event_source: + :param last_event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.StreamV1WorkflowsExecutionsExecutionIDStreamGetRequest( + execution_id=execution_id, + event_source=event_source, + last_event_id=last_event_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/executions/{execution_id}/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="stream_v1_workflows_executions__execution_id__stream_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStream( + http_res, + lambda raw: utils.unmarshal_json( + raw, + models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody, + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + async def stream_async( + self, + *, + execution_id: str, + event_source: OptionalNullable[models.EventSource] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStreamAsync[ + models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody + ]: + r"""Stream + + :param execution_id: + :param event_source: + :param last_event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.StreamV1WorkflowsExecutionsExecutionIDStreamGetRequest( + execution_id=execution_id, + event_source=event_source, + last_event_id=last_event_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/executions/{execution_id}/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="stream_v1_workflows_executions__execution_id__stream_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStreamAsync( + http_res, + lambda raw: utils.unmarshal_json( + raw, + models.StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody, + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index b8728362..84624c4d 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -35,6 +35,8 @@ def _init_sdks(self): def list( self, *, + page_size: Optional[int] = 100, + page: Optional[int] = 0, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -44,6 +46,8 @@ def list( List all libraries that you have created or have been shared with you. + :param page_size: + :param page: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -58,12 +62,18 @@ def list( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesListV1Request( + page_size=page_size, + page=page, + ) + req = self._build_request( method="GET", path="/v1/libraries", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, request_has_path_params=False, request_has_query_params=True, @@ -94,12 +104,18 @@ def list( ), ), request=req, - error_status_codes=["4XX", "5XX"], + error_status_codes=["422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.ListLibrariesResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -112,6 +128,8 @@ def list( async def list_async( self, *, + page_size: Optional[int] = 100, + page: Optional[int] = 0, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -121,6 +139,8 @@ async def list_async( List all libraries that you have created or have been shared with you. + :param page_size: + :param page: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -135,12 +155,18 @@ async def list_async( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesListV1Request( + page_size=page_size, + page=page, + ) + req = self._build_request_async( method="GET", path="/v1/libraries", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, request_has_path_params=False, request_has_query_params=True, @@ -171,12 +197,18 @@ async def list_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + error_status_codes=["422", "4XX", "5XX"], retry_config=retry_config, ) + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response(models.ListLibrariesResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) diff --git a/src/mistralai/client/metrics.py b/src/mistralai/client/metrics.py new file mode 100644 index 00000000..3df1ca56 --- /dev/null +++ b/src/mistralai/client/metrics.py @@ -0,0 +1,243 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 937cb03f8130 + +from .basesdk import BaseSDK +from datetime import datetime +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional + + +class Metrics(BaseSDK): + def get_workflow_metrics( + self, + *, + workflow_name: str, + start_time: OptionalNullable[datetime] = UNSET, + end_time: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowMetrics: + r"""Get Workflow Metrics + + Get comprehensive metrics for a specific workflow. + + Args: + workflow_name: The name of the workflow type to get metrics for + start_time: Optional start time filter (ISO 8601 format) + end_time: Optional end time filter (ISO 8601 format) + + Returns: + WorkflowMetrics: Dictionary containing metrics: + - execution_count: Total number of executions + - success_count: Number of successful executions + - error_count: Number of failed/terminated executions + - average_latency_ms: Average execution duration in milliseconds + - retry_rate: Proportion of workflows with retries + - latency_over_time: Time-series data of execution durations + + Example: + GET /v1/workflows/MyWorkflow/metrics + GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00:00Z + GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00:00Z&end_time=2025-12-31T23:59:59Z + + :param workflow_name: + :param start_time: Filter workflows started after this time (ISO 8601) + :param end_time: Filter workflows started before this time (ISO 8601) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest( + workflow_name=workflow_name, + start_time=start_time, + end_time=end_time, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/{workflow_name}/metrics", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_metrics_v1_workflows__workflow_name__metrics_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowMetrics, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_metrics_async( + self, + *, + workflow_name: str, + start_time: OptionalNullable[datetime] = UNSET, + end_time: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowMetrics: + r"""Get Workflow Metrics + + Get comprehensive metrics for a specific workflow. + + Args: + workflow_name: The name of the workflow type to get metrics for + start_time: Optional start time filter (ISO 8601 format) + end_time: Optional end time filter (ISO 8601 format) + + Returns: + WorkflowMetrics: Dictionary containing metrics: + - execution_count: Total number of executions + - success_count: Number of successful executions + - error_count: Number of failed/terminated executions + - average_latency_ms: Average execution duration in milliseconds + - retry_rate: Proportion of workflows with retries + - latency_over_time: Time-series data of execution durations + + Example: + GET /v1/workflows/MyWorkflow/metrics + GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00:00Z + GET /v1/workflows/MyWorkflow/metrics?start_time=2025-01-01T00:00:00Z&end_time=2025-12-31T23:59:59Z + + :param workflow_name: + :param start_time: Filter workflows started after this time (ISO 8601) + :param end_time: Filter workflows started before this time (ISO 8601) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest( + workflow_name=workflow_name, + start_time=start_time, + end_time=end_time, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/{workflow_name}/metrics", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_metrics_v1_workflows__workflow_name__metrics_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowMetrics, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 3ace7584..a6ac62a6 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -14,6 +14,62 @@ from mistralai.client.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: + from .activitytaskcompletedattributesrequest import ( + ActivityTaskCompletedAttributesRequest, + ActivityTaskCompletedAttributesRequestTypedDict, + ) + from .activitytaskcompletedattributesresponse import ( + ActivityTaskCompletedAttributesResponse, + ActivityTaskCompletedAttributesResponseTypedDict, + ) + from .activitytaskcompletedrequest import ( + ActivityTaskCompletedRequest, + ActivityTaskCompletedRequestTypedDict, + ) + from .activitytaskcompletedresponse import ( + ActivityTaskCompletedResponse, + ActivityTaskCompletedResponseTypedDict, + ) + from .activitytaskfailedattributes import ( + ActivityTaskFailedAttributes, + ActivityTaskFailedAttributesTypedDict, + ) + from .activitytaskfailedrequest import ( + ActivityTaskFailedRequest, + ActivityTaskFailedRequestTypedDict, + ) + from .activitytaskfailedresponse import ( + ActivityTaskFailedResponse, + ActivityTaskFailedResponseTypedDict, + ) + from .activitytaskretryingattributes import ( + ActivityTaskRetryingAttributes, + ActivityTaskRetryingAttributesTypedDict, + ) + from .activitytaskretryingrequest import ( + ActivityTaskRetryingRequest, + ActivityTaskRetryingRequestTypedDict, + ) + from .activitytaskretryingresponse import ( + ActivityTaskRetryingResponse, + ActivityTaskRetryingResponseTypedDict, + ) + from .activitytaskstartedattributesrequest import ( + ActivityTaskStartedAttributesRequest, + ActivityTaskStartedAttributesRequestTypedDict, + ) + from .activitytaskstartedattributesresponse import ( + ActivityTaskStartedAttributesResponse, + ActivityTaskStartedAttributesResponseTypedDict, + ) + from .activitytaskstartedrequest import ( + ActivityTaskStartedRequest, + ActivityTaskStartedRequestTypedDict, + ) + from .activitytaskstartedresponse import ( + ActivityTaskStartedResponse, + ActivityTaskStartedResponseTypedDict, + ) from .agent import ( Agent, AgentTool, @@ -142,6 +198,10 @@ from .annotations import Annotations, AnnotationsTypedDict, Audience from .apiendpoint import APIEndpoint from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict + from .archive_workflow_v1_workflows_workflow_identifier_archive_putop import ( + ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest, + ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequestTypedDict, + ) from .archivemodelresponse import ( ArchiveModelResponse, ArchiveModelResponseTypedDict, @@ -168,13 +228,22 @@ from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, + BaseFieldDefinitionType, BaseFieldDefinitionTypedDict, SupportedOperator, - TypeEnum, ) from .basemodelcard import BaseModelCard, BaseModelCardTypedDict from .basetaskstatus import BaseTaskStatus from .batcherror import BatchError, BatchErrorTypedDict + from .batchexecutionbody import BatchExecutionBody, BatchExecutionBodyTypedDict + from .batchexecutionresponse import ( + BatchExecutionResponse, + BatchExecutionResponseTypedDict, + ) + from .batchexecutionresult import ( + BatchExecutionResult, + BatchExecutionResultTypedDict, + ) from .batchjob import BatchJob, BatchJobTypedDict from .batchjobstatus import BatchJobStatus from .batchrequest import BatchRequest, BatchRequestTypedDict @@ -184,6 +253,10 @@ ) from .builtinconnectors import BuiltInConnectors from .campaign import Campaign, CampaignTypedDict + from .cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop import ( + CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequest, + CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequestTypedDict, + ) from .chatclassificationrequest import ( ChatClassificationRequest, ChatClassificationRequestTypedDict, @@ -347,10 +420,8 @@ from .connector_list_tools_v1op import ( ConnectorListToolsV1Request, ConnectorListToolsV1RequestTypedDict, - ResponseConnectorListToolsV11, - ResponseConnectorListToolsV11TypedDict, - ResponseConnectorListToolsV12, - ResponseConnectorListToolsV12TypedDict, + ResponseConnectorListToolsV1, + ResponseConnectorListToolsV1TypedDict, ) from .connector_list_v1op import ( ConnectorListV1Request, @@ -520,6 +591,95 @@ CustomConnectorTypedDict, UnknownAuthorization, ) + from .customtaskcanceledattributes import ( + CustomTaskCanceledAttributes, + CustomTaskCanceledAttributesTypedDict, + ) + from .customtaskcanceledrequest import ( + CustomTaskCanceledRequest, + CustomTaskCanceledRequestTypedDict, + ) + from .customtaskcanceledresponse import ( + CustomTaskCanceledResponse, + CustomTaskCanceledResponseTypedDict, + ) + from .customtaskcompletedattributesrequest import ( + CustomTaskCompletedAttributesRequest, + CustomTaskCompletedAttributesRequestTypedDict, + ) + from .customtaskcompletedattributesresponse import ( + CustomTaskCompletedAttributesResponse, + CustomTaskCompletedAttributesResponseTypedDict, + ) + from .customtaskcompletedrequest import ( + CustomTaskCompletedRequest, + CustomTaskCompletedRequestTypedDict, + ) + from .customtaskcompletedresponse import ( + CustomTaskCompletedResponse, + CustomTaskCompletedResponseTypedDict, + ) + from .customtaskfailedattributes import ( + CustomTaskFailedAttributes, + CustomTaskFailedAttributesTypedDict, + ) + from .customtaskfailedrequest import ( + CustomTaskFailedRequest, + CustomTaskFailedRequestTypedDict, + ) + from .customtaskfailedresponse import ( + CustomTaskFailedResponse, + CustomTaskFailedResponseTypedDict, + ) + from .customtaskinprogressattributesrequest import ( + CustomTaskInProgressAttributesRequest, + CustomTaskInProgressAttributesRequestPayload, + CustomTaskInProgressAttributesRequestPayloadTypedDict, + CustomTaskInProgressAttributesRequestTypedDict, + ) + from .customtaskinprogressattributesresponse import ( + CustomTaskInProgressAttributesResponse, + CustomTaskInProgressAttributesResponsePayload, + CustomTaskInProgressAttributesResponsePayloadTypedDict, + CustomTaskInProgressAttributesResponseTypedDict, + UnknownCustomTaskInProgressAttributesResponsePayload, + ) + from .customtaskinprogressrequest import ( + CustomTaskInProgressRequest, + CustomTaskInProgressRequestTypedDict, + ) + from .customtaskinprogressresponse import ( + CustomTaskInProgressResponse, + CustomTaskInProgressResponseTypedDict, + ) + from .customtaskstartedattributesrequest import ( + CustomTaskStartedAttributesRequest, + CustomTaskStartedAttributesRequestTypedDict, + ) + from .customtaskstartedattributesresponse import ( + CustomTaskStartedAttributesResponse, + CustomTaskStartedAttributesResponseTypedDict, + ) + from .customtaskstartedrequest import ( + CustomTaskStartedRequest, + CustomTaskStartedRequestTypedDict, + ) + from .customtaskstartedresponse import ( + CustomTaskStartedResponse, + CustomTaskStartedResponseTypedDict, + ) + from .customtasktimedoutattributes import ( + CustomTaskTimedOutAttributes, + CustomTaskTimedOutAttributesTypedDict, + ) + from .customtasktimedoutrequest import ( + CustomTaskTimedOutRequest, + CustomTaskTimedOutRequestTypedDict, + ) + from .customtasktimedoutresponse import ( + CustomTaskTimedOutResponse, + CustomTaskTimedOutResponseTypedDict, + ) from .dataset import Dataset, DatasetTypedDict from .datasetimporttask import DatasetImportTask, DatasetImportTaskTypedDict from .datasetpreview import DatasetPreview, DatasetPreviewTypedDict @@ -548,6 +708,10 @@ DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest, DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict, ) + from .deletebatchjobresponse import ( + DeleteBatchJobResponse, + DeleteBatchJobResponseTypedDict, + ) from .deletedatasetrecordsrequest import ( DeleteDatasetRecordsRequest, DeleteDatasetRecordsRequestTypedDict, @@ -560,6 +724,19 @@ DeltaMessageContentTypedDict, DeltaMessageTypedDict, ) + from .deploymentdetailresponse import ( + DeploymentDetailResponse, + DeploymentDetailResponseTypedDict, + ) + from .deploymentlistresponse import ( + DeploymentListResponse, + DeploymentListResponseTypedDict, + ) + from .deploymentresponse import DeploymentResponse, DeploymentResponseTypedDict + from .deploymentworkerresponse import ( + DeploymentWorkerResponse, + DeploymentWorkerResponseTypedDict, + ) from .document import Document, DocumentTypedDict from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .documenttextcontent import DocumentTextContent, DocumentTextContentTypedDict @@ -582,9 +759,25 @@ EmbeddingResponseData, EmbeddingResponseDataTypedDict, ) + from .encodedpayloadoptions import EncodedPayloadOptions from .encodingformat import EncodingFormat from .entitytype import EntityType from .event import Event, EventTypedDict + from .eventprogressstatus import EventProgressStatus + from .eventsource import EventSource + from .eventtype import EventType + from .execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop import ( + ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequest, + ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequestTypedDict, + ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost, + ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostTypedDict, + ) + from .execute_workflow_v1_workflows_workflow_identifier_execute_postop import ( + ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest, + ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequestTypedDict, + ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost, + ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostTypedDict, + ) from .executionconfig import ExecutionConfig, ExecutionConfigTypedDict from .export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop import ( ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest, @@ -594,6 +787,7 @@ ExportDatasetResponse, ExportDatasetResponseTypedDict, ) + from .failure import Failure, FailureTypedDict from .feedresultchatcompletioneventpreview import ( FeedResultChatCompletionEventPreview, FeedResultChatCompletionEventPreviewTypedDict, @@ -762,6 +956,10 @@ GetDatasetsV1ObservabilityDatasetsGetRequest, GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict, ) + from .get_deployment_v1_workflows_deployments_name_getop import ( + GetDeploymentV1WorkflowsDeploymentsNameGetRequest, + GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict, + ) from .get_judge_by_id_v1_observability_judges_judge_id_getop import ( GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest, GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict, @@ -770,10 +968,25 @@ GetJudgesV1ObservabilityJudgesGetRequest, GetJudgesV1ObservabilityJudgesGetRequestTypedDict, ) + from .get_run_history_v1_workflows_runs_run_id_history_getop import ( + GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest, + GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict, + ) + from .get_run_v1_workflows_runs_run_id_getop import ( + GetRunV1WorkflowsRunsRunIDGetRequest, + GetRunV1WorkflowsRunsRunIDGetRequestTypedDict, + ) from .get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop import ( GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest, GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict, ) + from .get_stream_events_v1_workflows_events_stream_getop import ( + GetStreamEventsV1WorkflowsEventsStreamGetRequest, + GetStreamEventsV1WorkflowsEventsStreamGetRequestTypedDict, + GetStreamEventsV1WorkflowsEventsStreamGetResponseBody, + GetStreamEventsV1WorkflowsEventsStreamGetResponseBodyTypedDict, + Scope, + ) from .get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop import ( GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest, GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict, @@ -782,6 +995,52 @@ GetVoiceV1AudioVoicesVoiceIDGetRequest, GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict, ) + from .get_workflow_events_v1_workflows_events_list_getop import ( + GetWorkflowEventsV1WorkflowsEventsListGetRequest, + GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict, + ) + from .get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop import ( + GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest, + GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict, + ) + from .get_workflow_execution_trace_eventsop import ( + GetWorkflowExecutionTraceEventsRequest, + GetWorkflowExecutionTraceEventsRequestTypedDict, + ) + from .get_workflow_execution_trace_otelop import ( + GetWorkflowExecutionTraceOtelRequest, + GetWorkflowExecutionTraceOtelRequestTypedDict, + ) + from .get_workflow_execution_trace_summaryop import ( + GetWorkflowExecutionTraceSummaryRequest, + GetWorkflowExecutionTraceSummaryRequestTypedDict, + ) + from .get_workflow_execution_v1_workflows_executions_execution_id_getop import ( + GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequest, + GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequestTypedDict, + ) + from .get_workflow_metrics_v1_workflows_workflow_name_metrics_getop import ( + GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest, + GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequestTypedDict, + ) + from .get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop import ( + GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequest, + GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequestTypedDict, + ) + from .get_workflow_registrations_v1_workflows_registrations_getop import ( + GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest, + GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestTypedDict, + ) + from .get_workflow_v1_workflows_workflow_identifier_getop import ( + GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest, + GetWorkflowV1WorkflowsWorkflowIdentifierGetRequestTypedDict, + ) + from .get_workflows_v1_workflows_getop import ( + GetWorkflowsV1WorkflowsGetRequest, + GetWorkflowsV1WorkflowsGetRequestTypedDict, + GetWorkflowsV1WorkflowsGetResponse, + GetWorkflowsV1WorkflowsGetResponseTypedDict, + ) from .getfileresponse import GetFileResponse, GetFileResponseTypedDict from .getsignedurlresponse import ( GetSignedURLResponse, @@ -838,6 +1097,10 @@ JobsAPIRoutesBatchCancelBatchJobRequest, JobsAPIRoutesBatchCancelBatchJobRequestTypedDict, ) + from .jobs_api_routes_batch_delete_batch_jobop import ( + JobsAPIRoutesBatchDeleteBatchJobRequest, + JobsAPIRoutesBatchDeleteBatchJobRequestTypedDict, + ) from .jobs_api_routes_batch_get_batch_jobop import ( JobsAPIRoutesBatchGetBatchJobRequest, JobsAPIRoutesBatchGetBatchJobRequestTypedDict, @@ -895,6 +1158,25 @@ JobsAPIRoutesFineTuningUpdateFineTunedModelResponseTypedDict, UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse, ) + from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict + from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict + from .jsonpatchpayloadrequest import ( + JSONPatchPayloadRequest, + JSONPatchPayloadRequestTypedDict, + JSONPatchPayloadRequestValue, + JSONPatchPayloadRequestValueTypedDict, + ) + from .jsonpatchpayloadresponse import ( + JSONPatchPayloadResponse, + JSONPatchPayloadResponseTypedDict, + JSONPatchPayloadResponseValue, + JSONPatchPayloadResponseValueTypedDict, + UnknownJSONPatchPayloadResponseValue, + ) + from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict + from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict + from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict + from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict from .jsonschema import JSONSchema, JSONSchemaTypedDict from .judge import ( Judge, @@ -992,6 +1274,10 @@ LibrariesGetV1Request, LibrariesGetV1RequestTypedDict, ) + from .libraries_list_v1op import ( + LibrariesListV1Request, + LibrariesListV1RequestTypedDict, + ) from .libraries_share_create_v1op import ( LibrariesShareCreateV1Request, LibrariesShareCreateV1RequestTypedDict, @@ -1009,13 +1295,26 @@ LibrariesUpdateV1RequestTypedDict, ) from .library import Library, LibraryTypedDict + from .list_deployments_v1_workflows_deployments_getop import ( + ListDeploymentsV1WorkflowsDeploymentsGetRequest, + ListDeploymentsV1WorkflowsDeploymentsGetRequestTypedDict, + ) from .list_models_v1_models_getop import ( ListModelsV1ModelsGetRequest, ListModelsV1ModelsGetRequestTypedDict, ) + from .list_runs_v1_workflows_runs_getop import ( + ListRunsV1WorkflowsRunsGetRequest, + ListRunsV1WorkflowsRunsGetRequestTypedDict, + ListRunsV1WorkflowsRunsGetResponse, + ListRunsV1WorkflowsRunsGetResponseTypedDict, + ListRunsV1WorkflowsRunsGetStatus, + ListRunsV1WorkflowsRunsGetStatusTypedDict, + ) from .list_voices_v1_audio_voices_getop import ( ListVoicesV1AudioVoicesGetRequest, ListVoicesV1AudioVoicesGetRequestTypedDict, + ListVoicesV1AudioVoicesGetType, ) from .listbatchjobsresponse import ( ListBatchJobsResponse, @@ -1063,6 +1362,12 @@ ListLibrariesResponseTypedDict, ) from .listsharingresponse import ListSharingResponse, ListSharingResponseTypedDict + from .listworkfloweventresponse import ( + ListWorkflowEventResponse, + ListWorkflowEventResponseEvent, + ListWorkflowEventResponseEventTypedDict, + ListWorkflowEventResponseTypedDict, + ) from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict from .mcptool import MCPTool, MCPToolTypedDict from .mcptoolmeta import MCPToolMeta, MCPToolMetaTypedDict @@ -1136,6 +1441,7 @@ ) from .moderationobject import ModerationObject, ModerationObjectTypedDict from .moderationresponse import ModerationResponse, ModerationResponseTypedDict + from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict from .observabilityerrorcode import ObservabilityErrorCode from .observabilityerrordetail import ( @@ -1207,6 +1513,21 @@ from .processingstatus import ProcessingStatus, ProcessingStatusTypedDict from .processstatus import ProcessStatus from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict + from .query_workflow_execution_v1_workflows_executions_execution_id_queries_postop import ( + QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest, + QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict, + ) + from .querydefinition import QueryDefinition, QueryDefinitionTypedDict + from .queryinvocationbody import ( + QueryInvocationBody, + QueryInvocationBodyInput, + QueryInvocationBodyInputTypedDict, + QueryInvocationBodyTypedDict, + ) + from .queryworkflowresponse import ( + QueryWorkflowResponse, + QueryWorkflowResponseTypedDict, + ) from .realtimetranscriptionerror import ( RealtimeTranscriptionError, RealtimeTranscriptionErrorTypedDict, @@ -1257,6 +1578,11 @@ ReferenceIDTypedDict, ) from .requestsource import RequestSource + from .reset_workflow_v1_workflows_executions_execution_id_reset_postop import ( + ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest, + ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequestTypedDict, + ) + from .resetinvocationbody import ResetInvocationBody, ResetInvocationBodyTypedDict from .resourcelink import ResourceLink, ResourceLinkTypedDict from .resourcevisibility import ResourceVisibility from .responsedoneevent import ResponseDoneEvent, ResponseDoneEventTypedDict @@ -1276,6 +1602,22 @@ ) from .roles import Roles from .sampletype import SampleType + from .scalarmetric import ( + ScalarMetric, + ScalarMetricTypedDict, + ScalarMetricValue, + ScalarMetricValueTypedDict, + ) + from .schedulecalendar import ScheduleCalendar, ScheduleCalendarTypedDict + from .scheduledefinition import ScheduleDefinition, ScheduleDefinitionTypedDict + from .scheduledefinitionoutput import ( + ScheduleDefinitionOutput, + ScheduleDefinitionOutputTypedDict, + ) + from .scheduleinterval import ScheduleInterval, ScheduleIntervalTypedDict + from .scheduleoverlappolicy import ScheduleOverlapPolicy + from .schedulepolicy import SchedulePolicy, SchedulePolicyTypedDict + from .schedulerange import ScheduleRange, ScheduleRangeTypedDict from .searchchatcompletioneventidsrequest import ( SearchChatCompletionEventIdsRequest, SearchChatCompletionEventIdsRequestTypedDict, @@ -1297,6 +1639,23 @@ from .sharing import Sharing, SharingTypedDict from .sharingdelete import SharingDelete, SharingDeleteTypedDict from .sharingrequest import SharingRequest, SharingRequestTypedDict + from .signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop import ( + SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequest, + SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequestTypedDict, + ) + from .signaldefinition import SignalDefinition, SignalDefinitionTypedDict + from .signalinvocationbody import ( + SignalInvocationBody, + SignalInvocationBodyInput, + SignalInvocationBodyInputTypedDict, + SignalInvocationBodyNetworkEncodedInput, + SignalInvocationBodyNetworkEncodedInputTypedDict, + SignalInvocationBodyTypedDict, + ) + from .signalworkflowresponse import ( + SignalWorkflowResponse, + SignalWorkflowResponseTypedDict, + ) from .source import Source from .speech_v1_audio_speech_postop import ( SpeechResponse, @@ -1318,6 +1677,22 @@ from .speechstreamdone import SpeechStreamDone, SpeechStreamDoneTypedDict from .speechstreameventtypes import SpeechStreamEventTypes from .ssetypes import SSETypes + from .stream_v1_workflows_executions_execution_id_stream_getop import ( + StreamV1WorkflowsExecutionsExecutionIDStreamGetRequest, + StreamV1WorkflowsExecutionsExecutionIDStreamGetRequestTypedDict, + StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody, + StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBodyTypedDict, + ) + from .streameventssepayload import ( + StreamEventSsePayload, + StreamEventSsePayloadData, + StreamEventSsePayloadDataTypedDict, + StreamEventSsePayloadTypedDict, + ) + from .streameventworkflowcontext import ( + StreamEventWorkflowContext, + StreamEventWorkflowContextTypedDict, + ) from .systemmessage import ( SystemMessage, SystemMessageContent, @@ -1328,6 +1703,39 @@ SystemMessageContentChunks, SystemMessageContentChunksTypedDict, ) + from .tempogettraceresponse import ( + TempoGetTraceResponse, + TempoGetTraceResponseTypedDict, + ) + from .tempotraceattribute import ( + TempoTraceAttribute, + TempoTraceAttributeTypedDict, + TempoTraceAttributeValue, + TempoTraceAttributeValueTypedDict, + ) + from .tempotraceattributeboolvalue import ( + TempoTraceAttributeBoolValue, + TempoTraceAttributeBoolValueTypedDict, + ) + from .tempotraceattributeintvalue import ( + TempoTraceAttributeIntValue, + TempoTraceAttributeIntValueTypedDict, + ) + from .tempotraceattributestringvalue import ( + TempoTraceAttributeStringValue, + TempoTraceAttributeStringValueTypedDict, + ) + from .tempotracebatch import TempoTraceBatch, TempoTraceBatchTypedDict + from .tempotraceevent import TempoTraceEvent, TempoTraceEventTypedDict + from .tempotraceresource import TempoTraceResource, TempoTraceResourceTypedDict + from .tempotracescope import TempoTraceScope, TempoTraceScopeTypedDict + from .tempotracescopekind import TempoTraceScopeKind + from .tempotracescopespan import TempoTraceScopeSpan, TempoTraceScopeSpanTypedDict + from .tempotracespan import TempoTraceSpan, TempoTraceSpanTypedDict + from .terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop import ( + TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequest, + TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequestTypedDict, + ) from .textchunk import TextChunk, TextChunkTypedDict from .textcontent import TextContent, TextContentTypedDict from .textresourcecontents import ( @@ -1335,6 +1743,14 @@ TextResourceContentsTypedDict, ) from .thinkchunk import ThinkChunk, ThinkChunkTypedDict, Thinking, ThinkingTypedDict + from .timeseriesmetric import ( + TimeSeriesMetric, + TimeSeriesMetricTypedDict, + TimeSeriesMetricValue1, + TimeSeriesMetricValue1TypedDict, + TimeSeriesMetricValue2, + TimeSeriesMetricValue2TypedDict, + ) from .timestampgranularity import TimestampGranularity from .tool import Tool, ToolTypedDict from .toolannotations import ToolAnnotations, ToolAnnotationsTypedDict @@ -1427,10 +1843,18 @@ ) from .turbinetoollocale import TurbineToolLocale, TurbineToolLocaleTypedDict from .turbinetoolmeta import TurbineToolMeta, TurbineToolMetaTypedDict + from .unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop import ( + UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest, + UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequestTypedDict, + ) from .unarchivemodelresponse import ( UnarchiveModelResponse, UnarchiveModelResponseTypedDict, ) + from .unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop import ( + UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest, + UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict, + ) from .update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop import ( UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest, UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequestTypedDict, @@ -1451,6 +1875,14 @@ UpdateVoiceV1AudioVoicesVoiceIDPatchRequest, UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict, ) + from .update_workflow_execution_v1_workflows_executions_execution_id_updates_postop import ( + UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest, + UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequestTypedDict, + ) + from .update_workflow_v1_workflows_workflow_identifier_putop import ( + UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest, + UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequestTypedDict, + ) from .updateagentrequest import ( UpdateAgentRequest, UpdateAgentRequestTool, @@ -1473,12 +1905,19 @@ UpdateDatasetRequest, UpdateDatasetRequestTypedDict, ) + from .updatedefinition import UpdateDefinition, UpdateDefinitionTypedDict from .updatedocumentrequest import ( Attributes, AttributesTypedDict, UpdateDocumentRequest, UpdateDocumentRequestTypedDict, ) + from .updateinvocationbody import ( + UpdateInvocationBody, + UpdateInvocationBodyInput, + UpdateInvocationBodyInputTypedDict, + UpdateInvocationBodyTypedDict, + ) from .updatejudgerequest import ( UpdateJudgeRequest, UpdateJudgeRequestOutput, @@ -1490,6 +1929,10 @@ UpdateLibraryRequestTypedDict, ) from .updatemodelrequest import UpdateModelRequest, UpdateModelRequestTypedDict + from .updateworkflowresponse import ( + UpdateWorkflowResponse, + UpdateWorkflowResponseTypedDict, + ) from .usageinfo import UsageInfo, UsageInfoTypedDict from .usageinfo_dollar_defs import UsageInfoDollarDefs, UsageInfoDollarDefsTypedDict from .usermessage import ( @@ -1519,9 +1962,241 @@ WebSearchPremiumTool, WebSearchPremiumToolTypedDict, ) - from .websearchtool import ( - WebSearchTool, - WebSearchToolTypedDict, + from .websearchtool import WebSearchTool, WebSearchToolTypedDict + from .workflow import Workflow, WorkflowTypedDict + from .workflowarchiveresponse import ( + WorkflowArchiveResponse, + WorkflowArchiveResponseTypedDict, + ) + from .workflowbasicdefinition import ( + WorkflowBasicDefinition, + WorkflowBasicDefinitionTypedDict, + ) + from .workflowcodedefinition import ( + WorkflowCodeDefinition, + WorkflowCodeDefinitionTypedDict, + ) + from .workfloweventbatchrequest import ( + WorkflowEventBatchRequest, + WorkflowEventBatchRequestEvent, + WorkflowEventBatchRequestEventTypedDict, + WorkflowEventBatchRequestTypedDict, + ) + from .workfloweventbatchresponse import ( + WorkflowEventBatchResponse, + WorkflowEventBatchResponseStatus, + WorkflowEventBatchResponseTypedDict, + ) + from .workfloweventrequest import ( + WorkflowEventRequest, + WorkflowEventRequestEvent, + WorkflowEventRequestEventTypedDict, + WorkflowEventRequestTypedDict, + ) + from .workfloweventresponse import ( + WorkflowEventResponse, + WorkflowEventResponseStatus, + WorkflowEventResponseTypedDict, + ) + from .workfloweventtype import WorkflowEventType + from .workflowexecutioncanceledattributes import ( + WorkflowExecutionCanceledAttributes, + WorkflowExecutionCanceledAttributesTypedDict, + ) + from .workflowexecutioncanceledrequest import ( + WorkflowExecutionCanceledRequest, + WorkflowExecutionCanceledRequestTypedDict, + ) + from .workflowexecutioncanceledresponse import ( + WorkflowExecutionCanceledResponse, + WorkflowExecutionCanceledResponseTypedDict, + ) + from .workflowexecutioncompletedattributesrequest import ( + WorkflowExecutionCompletedAttributesRequest, + WorkflowExecutionCompletedAttributesRequestTypedDict, + ) + from .workflowexecutioncompletedattributesresponse import ( + WorkflowExecutionCompletedAttributesResponse, + WorkflowExecutionCompletedAttributesResponseTypedDict, + ) + from .workflowexecutioncompletedrequest import ( + WorkflowExecutionCompletedRequest, + WorkflowExecutionCompletedRequestTypedDict, + ) + from .workflowexecutioncompletedresponse import ( + WorkflowExecutionCompletedResponse, + WorkflowExecutionCompletedResponseTypedDict, + ) + from .workflowexecutioncontinuedasnewattributesrequest import ( + WorkflowExecutionContinuedAsNewAttributesRequest, + WorkflowExecutionContinuedAsNewAttributesRequestTypedDict, + ) + from .workflowexecutioncontinuedasnewattributesresponse import ( + WorkflowExecutionContinuedAsNewAttributesResponse, + WorkflowExecutionContinuedAsNewAttributesResponseTypedDict, + ) + from .workflowexecutioncontinuedasnewrequest import ( + WorkflowExecutionContinuedAsNewRequest, + WorkflowExecutionContinuedAsNewRequestTypedDict, + ) + from .workflowexecutioncontinuedasnewresponse import ( + WorkflowExecutionContinuedAsNewResponse, + WorkflowExecutionContinuedAsNewResponseTypedDict, + ) + from .workflowexecutionfailedattributes import ( + WorkflowExecutionFailedAttributes, + WorkflowExecutionFailedAttributesTypedDict, + ) + from .workflowexecutionfailedrequest import ( + WorkflowExecutionFailedRequest, + WorkflowExecutionFailedRequestTypedDict, + ) + from .workflowexecutionfailedresponse import ( + WorkflowExecutionFailedResponse, + WorkflowExecutionFailedResponseTypedDict, + ) + from .workflowexecutionlistresponse import ( + WorkflowExecutionListResponse, + WorkflowExecutionListResponseTypedDict, + ) + from .workflowexecutionprogresstraceevent import ( + WorkflowExecutionProgressTraceEvent, + WorkflowExecutionProgressTraceEventTypedDict, + ) + from .workflowexecutionrequest import ( + WorkflowExecutionRequest, + WorkflowExecutionRequestTypedDict, + ) + from .workflowexecutionresponse import ( + WorkflowExecutionResponse, + WorkflowExecutionResponseTypedDict, + ) + from .workflowexecutionstartedattributesrequest import ( + WorkflowExecutionStartedAttributesRequest, + WorkflowExecutionStartedAttributesRequestTypedDict, + ) + from .workflowexecutionstartedattributesresponse import ( + WorkflowExecutionStartedAttributesResponse, + WorkflowExecutionStartedAttributesResponseTypedDict, + ) + from .workflowexecutionstartedrequest import ( + WorkflowExecutionStartedRequest, + WorkflowExecutionStartedRequestTypedDict, + ) + from .workflowexecutionstartedresponse import ( + WorkflowExecutionStartedResponse, + WorkflowExecutionStartedResponseTypedDict, + ) + from .workflowexecutionstatus import WorkflowExecutionStatus + from .workflowexecutionsyncresponse import ( + WorkflowExecutionSyncResponse, + WorkflowExecutionSyncResponseTypedDict, + ) + from .workflowexecutiontraceevent import ( + WorkflowExecutionTraceEvent, + WorkflowExecutionTraceEventTypedDict, + ) + from .workflowexecutiontraceeventsresponse import ( + WorkflowExecutionTraceEventsResponse, + WorkflowExecutionTraceEventsResponseEvent, + WorkflowExecutionTraceEventsResponseEventTypedDict, + WorkflowExecutionTraceEventsResponseTypedDict, + ) + from .workflowexecutiontraceotelresponse import ( + WorkflowExecutionTraceOTelResponse, + WorkflowExecutionTraceOTelResponseTypedDict, + ) + from .workflowexecutiontracesummaryattributesvalues import ( + WorkflowExecutionTraceSummaryAttributesValues, + WorkflowExecutionTraceSummaryAttributesValuesTypedDict, + ) + from .workflowexecutiontracesummaryresponse import ( + WorkflowExecutionTraceSummaryResponse, + WorkflowExecutionTraceSummaryResponseTypedDict, + ) + from .workflowexecutiontracesummaryspan import ( + WorkflowExecutionTraceSummarySpan, + WorkflowExecutionTraceSummarySpanTypedDict, + ) + from .workflowexecutionwithoutresultresponse import ( + WorkflowExecutionWithoutResultResponse, + WorkflowExecutionWithoutResultResponseTypedDict, + ) + from .workflowgetresponse import WorkflowGetResponse, WorkflowGetResponseTypedDict + from .workflowlistresponse import ( + WorkflowListResponse, + WorkflowListResponseTypedDict, + ) + from .workflowmetadata import WorkflowMetadata, WorkflowMetadataTypedDict + from .workflowmetrics import WorkflowMetrics, WorkflowMetricsTypedDict + from .workflowregistration import ( + WorkflowRegistration, + WorkflowRegistrationTypedDict, + ) + from .workflowregistrationgetresponse import ( + WorkflowRegistrationGetResponse, + WorkflowRegistrationGetResponseTypedDict, + ) + from .workflowregistrationlistresponse import ( + WorkflowRegistrationListResponse, + WorkflowRegistrationListResponseTypedDict, + ) + from .workflowregistrationwithworkerstatus import ( + WorkflowRegistrationWithWorkerStatus, + WorkflowRegistrationWithWorkerStatusTypedDict, + ) + from .workflowschedulelistresponse import ( + WorkflowScheduleListResponse, + WorkflowScheduleListResponseTypedDict, + ) + from .workflowschedulerequest import ( + WorkflowScheduleRequest, + WorkflowScheduleRequestTypedDict, + ) + from .workflowscheduleresponse import ( + WorkflowScheduleResponse, + WorkflowScheduleResponseTypedDict, + ) + from .workflowtaskfailedattributes import ( + WorkflowTaskFailedAttributes, + WorkflowTaskFailedAttributesTypedDict, + ) + from .workflowtaskfailedrequest import ( + WorkflowTaskFailedRequest, + WorkflowTaskFailedRequestTypedDict, + ) + from .workflowtaskfailedresponse import ( + WorkflowTaskFailedResponse, + WorkflowTaskFailedResponseTypedDict, + ) + from .workflowtasktimedoutattributes import ( + WorkflowTaskTimedOutAttributes, + WorkflowTaskTimedOutAttributesTypedDict, + ) + from .workflowtasktimedoutrequest import ( + WorkflowTaskTimedOutRequest, + WorkflowTaskTimedOutRequestTypedDict, + ) + from .workflowtasktimedoutresponse import ( + WorkflowTaskTimedOutResponse, + WorkflowTaskTimedOutResponseTypedDict, + ) + from .workflowtype import WorkflowType + from .workflowunarchiveresponse import ( + WorkflowUnarchiveResponse, + WorkflowUnarchiveResponseTypedDict, + ) + from .workflowupdaterequest import ( + WorkflowUpdateRequest, + WorkflowUpdateRequestTypedDict, + ) + from .workflowupdateresponse import ( + WorkflowUpdateResponse, + WorkflowUpdateResponseTypedDict, + ) + from .workflowwithworkerstatus import ( + WorkflowWithWorkerStatus, + WorkflowWithWorkerStatusTypedDict, ) # Pydantic models with forward references FilterGroup.model_rebuild() @@ -1530,6 +2205,34 @@ "APIEndpoint", "APIKeyAuth", "APIKeyAuthTypedDict", + "ActivityTaskCompletedAttributesRequest", + "ActivityTaskCompletedAttributesRequestTypedDict", + "ActivityTaskCompletedAttributesResponse", + "ActivityTaskCompletedAttributesResponseTypedDict", + "ActivityTaskCompletedRequest", + "ActivityTaskCompletedRequestTypedDict", + "ActivityTaskCompletedResponse", + "ActivityTaskCompletedResponseTypedDict", + "ActivityTaskFailedAttributes", + "ActivityTaskFailedAttributesTypedDict", + "ActivityTaskFailedRequest", + "ActivityTaskFailedRequestTypedDict", + "ActivityTaskFailedResponse", + "ActivityTaskFailedResponseTypedDict", + "ActivityTaskRetryingAttributes", + "ActivityTaskRetryingAttributesTypedDict", + "ActivityTaskRetryingRequest", + "ActivityTaskRetryingRequestTypedDict", + "ActivityTaskRetryingResponse", + "ActivityTaskRetryingResponseTypedDict", + "ActivityTaskStartedAttributesRequest", + "ActivityTaskStartedAttributesRequestTypedDict", + "ActivityTaskStartedAttributesResponse", + "ActivityTaskStartedAttributesResponseTypedDict", + "ActivityTaskStartedRequest", + "ActivityTaskStartedRequestTypedDict", + "ActivityTaskStartedResponse", + "ActivityTaskStartedResponseTypedDict", "Agent", "AgentAliasResponse", "AgentAliasResponseTypedDict", @@ -1612,6 +2315,8 @@ "AnswerTypedDict", "ArchiveModelResponse", "ArchiveModelResponseTypedDict", + "ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest", + "ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequestTypedDict", "Arguments", "ArgumentsTypedDict", "AssistantMessage", @@ -1639,12 +2344,19 @@ "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", + "BaseFieldDefinitionType", "BaseFieldDefinitionTypedDict", "BaseModelCard", "BaseModelCardTypedDict", "BaseTaskStatus", "BatchError", "BatchErrorTypedDict", + "BatchExecutionBody", + "BatchExecutionBodyTypedDict", + "BatchExecutionResponse", + "BatchExecutionResponseTypedDict", + "BatchExecutionResult", + "BatchExecutionResultTypedDict", "BatchJob", "BatchJobStatus", "BatchJobTypedDict", @@ -1655,6 +2367,8 @@ "BuiltInConnectors", "Campaign", "CampaignTypedDict", + "CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequest", + "CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequestTypedDict", "ChatClassificationRequest", "ChatClassificationRequestTypedDict", "ChatCompletionChoice", @@ -1875,6 +2589,52 @@ "CreateLibraryRequestTypedDict", "CustomConnector", "CustomConnectorTypedDict", + "CustomTaskCanceledAttributes", + "CustomTaskCanceledAttributesTypedDict", + "CustomTaskCanceledRequest", + "CustomTaskCanceledRequestTypedDict", + "CustomTaskCanceledResponse", + "CustomTaskCanceledResponseTypedDict", + "CustomTaskCompletedAttributesRequest", + "CustomTaskCompletedAttributesRequestTypedDict", + "CustomTaskCompletedAttributesResponse", + "CustomTaskCompletedAttributesResponseTypedDict", + "CustomTaskCompletedRequest", + "CustomTaskCompletedRequestTypedDict", + "CustomTaskCompletedResponse", + "CustomTaskCompletedResponseTypedDict", + "CustomTaskFailedAttributes", + "CustomTaskFailedAttributesTypedDict", + "CustomTaskFailedRequest", + "CustomTaskFailedRequestTypedDict", + "CustomTaskFailedResponse", + "CustomTaskFailedResponseTypedDict", + "CustomTaskInProgressAttributesRequest", + "CustomTaskInProgressAttributesRequestPayload", + "CustomTaskInProgressAttributesRequestPayloadTypedDict", + "CustomTaskInProgressAttributesRequestTypedDict", + "CustomTaskInProgressAttributesResponse", + "CustomTaskInProgressAttributesResponsePayload", + "CustomTaskInProgressAttributesResponsePayloadTypedDict", + "CustomTaskInProgressAttributesResponseTypedDict", + "CustomTaskInProgressRequest", + "CustomTaskInProgressRequestTypedDict", + "CustomTaskInProgressResponse", + "CustomTaskInProgressResponseTypedDict", + "CustomTaskStartedAttributesRequest", + "CustomTaskStartedAttributesRequestTypedDict", + "CustomTaskStartedAttributesResponse", + "CustomTaskStartedAttributesResponseTypedDict", + "CustomTaskStartedRequest", + "CustomTaskStartedRequestTypedDict", + "CustomTaskStartedResponse", + "CustomTaskStartedResponseTypedDict", + "CustomTaskTimedOutAttributes", + "CustomTaskTimedOutAttributesTypedDict", + "CustomTaskTimedOutRequest", + "CustomTaskTimedOutRequestTypedDict", + "CustomTaskTimedOutResponse", + "CustomTaskTimedOutResponseTypedDict", "Dataset", "DatasetImportTask", "DatasetImportTaskTypedDict", @@ -1883,6 +2643,8 @@ "DatasetRecord", "DatasetRecordTypedDict", "DatasetTypedDict", + "DeleteBatchJobResponse", + "DeleteBatchJobResponseTypedDict", "DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequest", "DeleteCampaignV1ObservabilityCampaignsCampaignIDDeleteRequestTypedDict", "DeleteDatasetRecordV1ObservabilityDatasetRecordsDatasetRecordIDDeleteRequest", @@ -1905,6 +2667,14 @@ "DeltaMessageContent", "DeltaMessageContentTypedDict", "DeltaMessageTypedDict", + "DeploymentDetailResponse", + "DeploymentDetailResponseTypedDict", + "DeploymentListResponse", + "DeploymentListResponseTypedDict", + "DeploymentResponse", + "DeploymentResponseTypedDict", + "DeploymentWorkerResponse", + "DeploymentWorkerResponseTypedDict", "Document", "DocumentLibraryTool", "DocumentLibraryToolTypedDict", @@ -1928,12 +2698,20 @@ "EmbeddingResponseData", "EmbeddingResponseDataTypedDict", "EmbeddingResponseTypedDict", + "EncodedPayloadOptions", "EncodingFormat", "EntityType", "Entry", "EntryTypedDict", "Event", + "EventProgressStatus", + "EventSource", + "EventType", "EventTypedDict", + "ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequest", + "ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequestTypedDict", + "ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest", + "ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequestTypedDict", "ExecutionConfig", "ExecutionConfigTypedDict", "ExportDatasetResponse", @@ -1953,6 +2731,8 @@ "FTClassifierLossFunction", "FTModelCard", "FTModelCardTypedDict", + "Failure", + "FailureTypedDict", "FeedResultChatCompletionEventPreview", "FeedResultChatCompletionEventPreviewTypedDict", "FetchCampaignStatusResponse", @@ -2044,20 +2824,54 @@ "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict", "GetDatasetsV1ObservabilityDatasetsGetRequest", "GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict", + "GetDeploymentV1WorkflowsDeploymentsNameGetRequest", + "GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict", "GetFileResponse", "GetFileResponseTypedDict", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict", "GetJudgesV1ObservabilityJudgesGetRequest", "GetJudgesV1ObservabilityJudgesGetRequestTypedDict", + "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest", + "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict", + "GetRunV1WorkflowsRunsRunIDGetRequest", + "GetRunV1WorkflowsRunsRunIDGetRequestTypedDict", "GetSignedURLResponse", "GetSignedURLResponseTypedDict", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict", + "GetStreamEventsV1WorkflowsEventsStreamGetRequest", + "GetStreamEventsV1WorkflowsEventsStreamGetRequestTypedDict", + "GetStreamEventsV1WorkflowsEventsStreamGetResponseBody", + "GetStreamEventsV1WorkflowsEventsStreamGetResponseBodyTypedDict", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict", "GetVoiceV1AudioVoicesVoiceIDGetRequest", "GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict", + "GetWorkflowEventsV1WorkflowsEventsListGetRequest", + "GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict", + "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest", + "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict", + "GetWorkflowExecutionTraceEventsRequest", + "GetWorkflowExecutionTraceEventsRequestTypedDict", + "GetWorkflowExecutionTraceOtelRequest", + "GetWorkflowExecutionTraceOtelRequestTypedDict", + "GetWorkflowExecutionTraceSummaryRequest", + "GetWorkflowExecutionTraceSummaryRequestTypedDict", + "GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequest", + "GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequestTypedDict", + "GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest", + "GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequestTypedDict", + "GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequest", + "GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequestTypedDict", + "GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest", + "GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestTypedDict", + "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest", + "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequestTypedDict", + "GetWorkflowsV1WorkflowsGetRequest", + "GetWorkflowsV1WorkflowsGetRequestTypedDict", + "GetWorkflowsV1WorkflowsGetResponse", + "GetWorkflowsV1WorkflowsGetResponseTypedDict", "GithubRepository", "GithubRepositoryTypedDict", "GuardrailConfig", @@ -2097,12 +2911,34 @@ "InternalMetadataAgentVersion", "InternalMetadataAgentVersionTypedDict", "InternalMetadataTypedDict", + "JSONPatchAdd", + "JSONPatchAddTypedDict", + "JSONPatchAppend", + "JSONPatchAppendTypedDict", + "JSONPatchPayloadRequest", + "JSONPatchPayloadRequestTypedDict", + "JSONPatchPayloadRequestValue", + "JSONPatchPayloadRequestValueTypedDict", + "JSONPatchPayloadResponse", + "JSONPatchPayloadResponseTypedDict", + "JSONPatchPayloadResponseValue", + "JSONPatchPayloadResponseValueTypedDict", + "JSONPatchRemove", + "JSONPatchRemoveTypedDict", + "JSONPatchReplace", + "JSONPatchReplaceTypedDict", + "JSONPayloadRequest", + "JSONPayloadRequestTypedDict", + "JSONPayloadResponse", + "JSONPayloadResponseTypedDict", "JSONSchema", "JSONSchemaTypedDict", "JobMetadata", "JobMetadataTypedDict", "JobsAPIRoutesBatchCancelBatchJobRequest", "JobsAPIRoutesBatchCancelBatchJobRequestTypedDict", + "JobsAPIRoutesBatchDeleteBatchJobRequest", + "JobsAPIRoutesBatchDeleteBatchJobRequestTypedDict", "JobsAPIRoutesBatchGetBatchJobRequest", "JobsAPIRoutesBatchGetBatchJobRequestTypedDict", "JobsAPIRoutesBatchGetBatchJobsRequest", @@ -2183,6 +3019,8 @@ "LibrariesDocumentsUploadV1RequestTypedDict", "LibrariesGetV1Request", "LibrariesGetV1RequestTypedDict", + "LibrariesListV1Request", + "LibrariesListV1RequestTypedDict", "LibrariesShareCreateV1Request", "LibrariesShareCreateV1RequestTypedDict", "LibrariesShareDeleteV1Request", @@ -2207,6 +3045,8 @@ "ListDatasetRecordsResponseTypedDict", "ListDatasetsResponse", "ListDatasetsResponseTypedDict", + "ListDeploymentsV1WorkflowsDeploymentsGetRequest", + "ListDeploymentsV1WorkflowsDeploymentsGetRequestTypedDict", "ListDocumentsResponse", "ListDocumentsResponseTypedDict", "ListFilesResponse", @@ -2221,10 +3061,21 @@ "ListLibrariesResponseTypedDict", "ListModelsV1ModelsGetRequest", "ListModelsV1ModelsGetRequestTypedDict", + "ListRunsV1WorkflowsRunsGetRequest", + "ListRunsV1WorkflowsRunsGetRequestTypedDict", + "ListRunsV1WorkflowsRunsGetResponse", + "ListRunsV1WorkflowsRunsGetResponseTypedDict", + "ListRunsV1WorkflowsRunsGetStatus", + "ListRunsV1WorkflowsRunsGetStatusTypedDict", "ListSharingResponse", "ListSharingResponseTypedDict", "ListVoicesV1AudioVoicesGetRequest", "ListVoicesV1AudioVoicesGetRequestTypedDict", + "ListVoicesV1AudioVoicesGetType", + "ListWorkflowEventResponse", + "ListWorkflowEventResponseEvent", + "ListWorkflowEventResponseEventTypedDict", + "ListWorkflowEventResponseTypedDict", "Loc", "LocTypedDict", "MCPServerIcon", @@ -2291,6 +3142,8 @@ "ModerationResponseTypedDict", "MultiPartBodyParams", "MultiPartBodyParamsTypedDict", + "NetworkEncodedInput", + "NetworkEncodedInputTypedDict", "OAuth2TokenAuth", "OAuth2TokenAuthTypedDict", "OCRImageObject", @@ -2354,6 +3207,16 @@ "ProcessingStatusTypedDict", "PromptTokensDetails", "PromptTokensDetailsTypedDict", + "QueryDefinition", + "QueryDefinitionTypedDict", + "QueryInvocationBody", + "QueryInvocationBodyInput", + "QueryInvocationBodyInputTypedDict", + "QueryInvocationBodyTypedDict", + "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest", + "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict", + "QueryWorkflowResponse", + "QueryWorkflowResponseTypedDict", "RealtimeTranscriptionError", "RealtimeTranscriptionErrorDetail", "RealtimeTranscriptionErrorDetailMessage", @@ -2382,20 +3245,26 @@ "ReferenceID", "ReferenceIDTypedDict", "RequestSource", + "ResetInvocationBody", + "ResetInvocationBodyTypedDict", + "ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest", + "ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequestTypedDict", "Resource", "ResourceLink", "ResourceLinkTypedDict", "ResourceTypedDict", "ResourceVisibility", "Response", - "ResponseConnectorListToolsV11", - "ResponseConnectorListToolsV11TypedDict", - "ResponseConnectorListToolsV12", - "ResponseConnectorListToolsV12TypedDict", + "ResponseConnectorListToolsV1", + "ResponseConnectorListToolsV1TypedDict", "ResponseDoneEvent", "ResponseDoneEventTypedDict", "ResponseErrorEvent", "ResponseErrorEventTypedDict", + "ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost", + "ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostTypedDict", + "ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost", + "ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostTypedDict", "ResponseFormat", "ResponseFormatTypedDict", "ResponseFormats", @@ -2412,6 +3281,24 @@ "Roles", "SSETypes", "SampleType", + "ScalarMetric", + "ScalarMetricTypedDict", + "ScalarMetricValue", + "ScalarMetricValueTypedDict", + "ScheduleCalendar", + "ScheduleCalendarTypedDict", + "ScheduleDefinition", + "ScheduleDefinitionOutput", + "ScheduleDefinitionOutputTypedDict", + "ScheduleDefinitionTypedDict", + "ScheduleInterval", + "ScheduleIntervalTypedDict", + "ScheduleOverlapPolicy", + "SchedulePolicy", + "SchedulePolicyTypedDict", + "ScheduleRange", + "ScheduleRangeTypedDict", + "Scope", "SearchChatCompletionEventIdsRequest", "SearchChatCompletionEventIdsRequestTypedDict", "SearchChatCompletionEventIdsResponse", @@ -2429,6 +3316,18 @@ "SharingRequest", "SharingRequestTypedDict", "SharingTypedDict", + "SignalDefinition", + "SignalDefinitionTypedDict", + "SignalInvocationBody", + "SignalInvocationBodyInput", + "SignalInvocationBodyInputTypedDict", + "SignalInvocationBodyNetworkEncodedInput", + "SignalInvocationBodyNetworkEncodedInputTypedDict", + "SignalInvocationBodyTypedDict", + "SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequest", + "SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequestTypedDict", + "SignalWorkflowResponse", + "SignalWorkflowResponseTypedDict", "Source", "SpeechOutputFormat", "SpeechRequest", @@ -2446,6 +3345,16 @@ "SpeechV1AudioSpeechPostDataTypedDict", "SpeechV1AudioSpeechPostResponse", "SpeechV1AudioSpeechPostResponseTypedDict", + "StreamEventSsePayload", + "StreamEventSsePayloadData", + "StreamEventSsePayloadDataTypedDict", + "StreamEventSsePayloadTypedDict", + "StreamEventWorkflowContext", + "StreamEventWorkflowContextTypedDict", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetRequest", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetRequestTypedDict", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBodyTypedDict", "SupportedOperator", "SystemMessage", "SystemMessageContent", @@ -2455,6 +3364,33 @@ "SystemMessageTypedDict", "TableFormat", "TaskSupport", + "TempoGetTraceResponse", + "TempoGetTraceResponseTypedDict", + "TempoTraceAttribute", + "TempoTraceAttributeBoolValue", + "TempoTraceAttributeBoolValueTypedDict", + "TempoTraceAttributeIntValue", + "TempoTraceAttributeIntValueTypedDict", + "TempoTraceAttributeStringValue", + "TempoTraceAttributeStringValueTypedDict", + "TempoTraceAttributeTypedDict", + "TempoTraceAttributeValue", + "TempoTraceAttributeValueTypedDict", + "TempoTraceBatch", + "TempoTraceBatchTypedDict", + "TempoTraceEvent", + "TempoTraceEventTypedDict", + "TempoTraceResource", + "TempoTraceResourceTypedDict", + "TempoTraceScope", + "TempoTraceScopeKind", + "TempoTraceScopeSpan", + "TempoTraceScopeSpanTypedDict", + "TempoTraceScopeTypedDict", + "TempoTraceSpan", + "TempoTraceSpanTypedDict", + "TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequest", + "TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequestTypedDict", "TextChunk", "TextChunkTypedDict", "TextContent", @@ -2465,6 +3401,12 @@ "ThinkChunkTypedDict", "Thinking", "ThinkingTypedDict", + "TimeSeriesMetric", + "TimeSeriesMetricTypedDict", + "TimeSeriesMetricValue1", + "TimeSeriesMetricValue1TypedDict", + "TimeSeriesMetricValue2", + "TimeSeriesMetricValue2TypedDict", "TimestampGranularity", "Tool", "ToolAnnotations", @@ -2534,9 +3476,10 @@ "TurbineToolLocaleTypedDict", "TurbineToolMeta", "TurbineToolMetaTypedDict", - "TypeEnum", "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", + "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest", + "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequestTypedDict", "UnknownAgentTool", "UnknownAuthorization", "UnknownClassifierFineTuningJobDetailsIntegration", @@ -2548,6 +3491,8 @@ "UnknownConnectorToolCallResponseContent", "UnknownContentChunk", "UnknownConversationEventsData", + "UnknownCustomTaskInProgressAttributesResponsePayload", + "UnknownJSONPatchPayloadResponseValue", "UnknownJobsAPIRoutesFineTuningCancelFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningGetFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningStartFineTuningJobResponse", @@ -2560,6 +3505,8 @@ "UnknownResponseRetrieveModelV1ModelsModelIDGet", "UnknownSpeechV1AudioSpeechPostData", "UnknownTranscriptionStreamEventsData", + "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest", + "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict", "UpdateAgentRequest", "UpdateAgentRequestTool", "UpdateAgentRequestToolTypedDict", @@ -2578,8 +3525,14 @@ "UpdateDatasetRequestTypedDict", "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequest", "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict", + "UpdateDefinition", + "UpdateDefinitionTypedDict", "UpdateDocumentRequest", "UpdateDocumentRequestTypedDict", + "UpdateInvocationBody", + "UpdateInvocationBodyInput", + "UpdateInvocationBodyInputTypedDict", + "UpdateInvocationBodyTypedDict", "UpdateJudgeRequest", "UpdateJudgeRequestOutput", "UpdateJudgeRequestOutputTypedDict", @@ -2592,6 +3545,12 @@ "UpdateModelRequestTypedDict", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict", + "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest", + "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequestTypedDict", + "UpdateWorkflowResponse", + "UpdateWorkflowResponseTypedDict", + "UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest", + "UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequestTypedDict", "UsageInfo", "UsageInfoDollarDefs", "UsageInfoDollarDefsTypedDict", @@ -2619,9 +3578,166 @@ "WebSearchPremiumToolTypedDict", "WebSearchTool", "WebSearchToolTypedDict", + "Workflow", + "WorkflowArchiveResponse", + "WorkflowArchiveResponseTypedDict", + "WorkflowBasicDefinition", + "WorkflowBasicDefinitionTypedDict", + "WorkflowCodeDefinition", + "WorkflowCodeDefinitionTypedDict", + "WorkflowEventBatchRequest", + "WorkflowEventBatchRequestEvent", + "WorkflowEventBatchRequestEventTypedDict", + "WorkflowEventBatchRequestTypedDict", + "WorkflowEventBatchResponse", + "WorkflowEventBatchResponseStatus", + "WorkflowEventBatchResponseTypedDict", + "WorkflowEventRequest", + "WorkflowEventRequestEvent", + "WorkflowEventRequestEventTypedDict", + "WorkflowEventRequestTypedDict", + "WorkflowEventResponse", + "WorkflowEventResponseStatus", + "WorkflowEventResponseTypedDict", + "WorkflowEventType", + "WorkflowExecutionCanceledAttributes", + "WorkflowExecutionCanceledAttributesTypedDict", + "WorkflowExecutionCanceledRequest", + "WorkflowExecutionCanceledRequestTypedDict", + "WorkflowExecutionCanceledResponse", + "WorkflowExecutionCanceledResponseTypedDict", + "WorkflowExecutionCompletedAttributesRequest", + "WorkflowExecutionCompletedAttributesRequestTypedDict", + "WorkflowExecutionCompletedAttributesResponse", + "WorkflowExecutionCompletedAttributesResponseTypedDict", + "WorkflowExecutionCompletedRequest", + "WorkflowExecutionCompletedRequestTypedDict", + "WorkflowExecutionCompletedResponse", + "WorkflowExecutionCompletedResponseTypedDict", + "WorkflowExecutionContinuedAsNewAttributesRequest", + "WorkflowExecutionContinuedAsNewAttributesRequestTypedDict", + "WorkflowExecutionContinuedAsNewAttributesResponse", + "WorkflowExecutionContinuedAsNewAttributesResponseTypedDict", + "WorkflowExecutionContinuedAsNewRequest", + "WorkflowExecutionContinuedAsNewRequestTypedDict", + "WorkflowExecutionContinuedAsNewResponse", + "WorkflowExecutionContinuedAsNewResponseTypedDict", + "WorkflowExecutionFailedAttributes", + "WorkflowExecutionFailedAttributesTypedDict", + "WorkflowExecutionFailedRequest", + "WorkflowExecutionFailedRequestTypedDict", + "WorkflowExecutionFailedResponse", + "WorkflowExecutionFailedResponseTypedDict", + "WorkflowExecutionListResponse", + "WorkflowExecutionListResponseTypedDict", + "WorkflowExecutionProgressTraceEvent", + "WorkflowExecutionProgressTraceEventTypedDict", + "WorkflowExecutionRequest", + "WorkflowExecutionRequestTypedDict", + "WorkflowExecutionResponse", + "WorkflowExecutionResponseTypedDict", + "WorkflowExecutionStartedAttributesRequest", + "WorkflowExecutionStartedAttributesRequestTypedDict", + "WorkflowExecutionStartedAttributesResponse", + "WorkflowExecutionStartedAttributesResponseTypedDict", + "WorkflowExecutionStartedRequest", + "WorkflowExecutionStartedRequestTypedDict", + "WorkflowExecutionStartedResponse", + "WorkflowExecutionStartedResponseTypedDict", + "WorkflowExecutionStatus", + "WorkflowExecutionSyncResponse", + "WorkflowExecutionSyncResponseTypedDict", + "WorkflowExecutionTraceEvent", + "WorkflowExecutionTraceEventTypedDict", + "WorkflowExecutionTraceEventsResponse", + "WorkflowExecutionTraceEventsResponseEvent", + "WorkflowExecutionTraceEventsResponseEventTypedDict", + "WorkflowExecutionTraceEventsResponseTypedDict", + "WorkflowExecutionTraceOTelResponse", + "WorkflowExecutionTraceOTelResponseTypedDict", + "WorkflowExecutionTraceSummaryAttributesValues", + "WorkflowExecutionTraceSummaryAttributesValuesTypedDict", + "WorkflowExecutionTraceSummaryResponse", + "WorkflowExecutionTraceSummaryResponseTypedDict", + "WorkflowExecutionTraceSummarySpan", + "WorkflowExecutionTraceSummarySpanTypedDict", + "WorkflowExecutionWithoutResultResponse", + "WorkflowExecutionWithoutResultResponseTypedDict", + "WorkflowGetResponse", + "WorkflowGetResponseTypedDict", + "WorkflowListResponse", + "WorkflowListResponseTypedDict", + "WorkflowMetadata", + "WorkflowMetadataTypedDict", + "WorkflowMetrics", + "WorkflowMetricsTypedDict", + "WorkflowRegistration", + "WorkflowRegistrationGetResponse", + "WorkflowRegistrationGetResponseTypedDict", + "WorkflowRegistrationListResponse", + "WorkflowRegistrationListResponseTypedDict", + "WorkflowRegistrationTypedDict", + "WorkflowRegistrationWithWorkerStatus", + "WorkflowRegistrationWithWorkerStatusTypedDict", + "WorkflowScheduleListResponse", + "WorkflowScheduleListResponseTypedDict", + "WorkflowScheduleRequest", + "WorkflowScheduleRequestTypedDict", + "WorkflowScheduleResponse", + "WorkflowScheduleResponseTypedDict", + "WorkflowTaskFailedAttributes", + "WorkflowTaskFailedAttributesTypedDict", + "WorkflowTaskFailedRequest", + "WorkflowTaskFailedRequestTypedDict", + "WorkflowTaskFailedResponse", + "WorkflowTaskFailedResponseTypedDict", + "WorkflowTaskTimedOutAttributes", + "WorkflowTaskTimedOutAttributesTypedDict", + "WorkflowTaskTimedOutRequest", + "WorkflowTaskTimedOutRequestTypedDict", + "WorkflowTaskTimedOutResponse", + "WorkflowTaskTimedOutResponseTypedDict", + "WorkflowType", + "WorkflowTypedDict", + "WorkflowUnarchiveResponse", + "WorkflowUnarchiveResponseTypedDict", + "WorkflowUpdateRequest", + "WorkflowUpdateRequestTypedDict", + "WorkflowUpdateResponse", + "WorkflowUpdateResponseTypedDict", + "WorkflowWithWorkerStatus", + "WorkflowWithWorkerStatusTypedDict", ] _dynamic_imports: dict[str, str] = { + "ActivityTaskCompletedAttributesRequest": ".activitytaskcompletedattributesrequest", + "ActivityTaskCompletedAttributesRequestTypedDict": ".activitytaskcompletedattributesrequest", + "ActivityTaskCompletedAttributesResponse": ".activitytaskcompletedattributesresponse", + "ActivityTaskCompletedAttributesResponseTypedDict": ".activitytaskcompletedattributesresponse", + "ActivityTaskCompletedRequest": ".activitytaskcompletedrequest", + "ActivityTaskCompletedRequestTypedDict": ".activitytaskcompletedrequest", + "ActivityTaskCompletedResponse": ".activitytaskcompletedresponse", + "ActivityTaskCompletedResponseTypedDict": ".activitytaskcompletedresponse", + "ActivityTaskFailedAttributes": ".activitytaskfailedattributes", + "ActivityTaskFailedAttributesTypedDict": ".activitytaskfailedattributes", + "ActivityTaskFailedRequest": ".activitytaskfailedrequest", + "ActivityTaskFailedRequestTypedDict": ".activitytaskfailedrequest", + "ActivityTaskFailedResponse": ".activitytaskfailedresponse", + "ActivityTaskFailedResponseTypedDict": ".activitytaskfailedresponse", + "ActivityTaskRetryingAttributes": ".activitytaskretryingattributes", + "ActivityTaskRetryingAttributesTypedDict": ".activitytaskretryingattributes", + "ActivityTaskRetryingRequest": ".activitytaskretryingrequest", + "ActivityTaskRetryingRequestTypedDict": ".activitytaskretryingrequest", + "ActivityTaskRetryingResponse": ".activitytaskretryingresponse", + "ActivityTaskRetryingResponseTypedDict": ".activitytaskretryingresponse", + "ActivityTaskStartedAttributesRequest": ".activitytaskstartedattributesrequest", + "ActivityTaskStartedAttributesRequestTypedDict": ".activitytaskstartedattributesrequest", + "ActivityTaskStartedAttributesResponse": ".activitytaskstartedattributesresponse", + "ActivityTaskStartedAttributesResponseTypedDict": ".activitytaskstartedattributesresponse", + "ActivityTaskStartedRequest": ".activitytaskstartedrequest", + "ActivityTaskStartedRequestTypedDict": ".activitytaskstartedrequest", + "ActivityTaskStartedResponse": ".activitytaskstartedresponse", + "ActivityTaskStartedResponseTypedDict": ".activitytaskstartedresponse", "Agent": ".agent", "AgentTool": ".agent", "AgentToolTypedDict": ".agent", @@ -2705,6 +3821,8 @@ "APIEndpoint": ".apiendpoint", "APIKeyAuth": ".apikeyauth", "APIKeyAuthTypedDict": ".apikeyauth", + "ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest": ".archive_workflow_v1_workflows_workflow_identifier_archive_putop", + "ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequestTypedDict": ".archive_workflow_v1_workflows_workflow_identifier_archive_putop", "ArchiveModelResponse": ".archivemodelresponse", "ArchiveModelResponseTypedDict": ".archivemodelresponse", "AssistantMessage": ".assistantmessage", @@ -2727,14 +3845,20 @@ "AuthURLResponse": ".authurlresponse", "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", + "BaseFieldDefinitionType": ".basefielddefinition", "BaseFieldDefinitionTypedDict": ".basefielddefinition", "SupportedOperator": ".basefielddefinition", - "TypeEnum": ".basefielddefinition", "BaseModelCard": ".basemodelcard", "BaseModelCardTypedDict": ".basemodelcard", "BaseTaskStatus": ".basetaskstatus", "BatchError": ".batcherror", "BatchErrorTypedDict": ".batcherror", + "BatchExecutionBody": ".batchexecutionbody", + "BatchExecutionBodyTypedDict": ".batchexecutionbody", + "BatchExecutionResponse": ".batchexecutionresponse", + "BatchExecutionResponseTypedDict": ".batchexecutionresponse", + "BatchExecutionResult": ".batchexecutionresult", + "BatchExecutionResultTypedDict": ".batchexecutionresult", "BatchJob": ".batchjob", "BatchJobTypedDict": ".batchjob", "BatchJobStatus": ".batchjobstatus", @@ -2745,6 +3869,8 @@ "BuiltInConnectors": ".builtinconnectors", "Campaign": ".campaign", "CampaignTypedDict": ".campaign", + "CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequest": ".cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop", + "CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequestTypedDict": ".cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop", "ChatClassificationRequest": ".chatclassificationrequest", "ChatClassificationRequestTypedDict": ".chatclassificationrequest", "ChatCompletionChoice": ".chatcompletionchoice", @@ -2863,10 +3989,8 @@ "ConnectorGetV1RequestTypedDict": ".connector_get_v1op", "ConnectorListToolsV1Request": ".connector_list_tools_v1op", "ConnectorListToolsV1RequestTypedDict": ".connector_list_tools_v1op", - "ResponseConnectorListToolsV11": ".connector_list_tools_v1op", - "ResponseConnectorListToolsV11TypedDict": ".connector_list_tools_v1op", - "ResponseConnectorListToolsV12": ".connector_list_tools_v1op", - "ResponseConnectorListToolsV12TypedDict": ".connector_list_tools_v1op", + "ResponseConnectorListToolsV1": ".connector_list_tools_v1op", + "ResponseConnectorListToolsV1TypedDict": ".connector_list_tools_v1op", "ConnectorListV1Request": ".connector_list_v1op", "ConnectorListV1RequestTypedDict": ".connector_list_v1op", "ConnectorUpdateV1Request": ".connector_update_v1op", @@ -2982,6 +4106,53 @@ "CustomConnector": ".customconnector", "CustomConnectorTypedDict": ".customconnector", "UnknownAuthorization": ".customconnector", + "CustomTaskCanceledAttributes": ".customtaskcanceledattributes", + "CustomTaskCanceledAttributesTypedDict": ".customtaskcanceledattributes", + "CustomTaskCanceledRequest": ".customtaskcanceledrequest", + "CustomTaskCanceledRequestTypedDict": ".customtaskcanceledrequest", + "CustomTaskCanceledResponse": ".customtaskcanceledresponse", + "CustomTaskCanceledResponseTypedDict": ".customtaskcanceledresponse", + "CustomTaskCompletedAttributesRequest": ".customtaskcompletedattributesrequest", + "CustomTaskCompletedAttributesRequestTypedDict": ".customtaskcompletedattributesrequest", + "CustomTaskCompletedAttributesResponse": ".customtaskcompletedattributesresponse", + "CustomTaskCompletedAttributesResponseTypedDict": ".customtaskcompletedattributesresponse", + "CustomTaskCompletedRequest": ".customtaskcompletedrequest", + "CustomTaskCompletedRequestTypedDict": ".customtaskcompletedrequest", + "CustomTaskCompletedResponse": ".customtaskcompletedresponse", + "CustomTaskCompletedResponseTypedDict": ".customtaskcompletedresponse", + "CustomTaskFailedAttributes": ".customtaskfailedattributes", + "CustomTaskFailedAttributesTypedDict": ".customtaskfailedattributes", + "CustomTaskFailedRequest": ".customtaskfailedrequest", + "CustomTaskFailedRequestTypedDict": ".customtaskfailedrequest", + "CustomTaskFailedResponse": ".customtaskfailedresponse", + "CustomTaskFailedResponseTypedDict": ".customtaskfailedresponse", + "CustomTaskInProgressAttributesRequest": ".customtaskinprogressattributesrequest", + "CustomTaskInProgressAttributesRequestPayload": ".customtaskinprogressattributesrequest", + "CustomTaskInProgressAttributesRequestPayloadTypedDict": ".customtaskinprogressattributesrequest", + "CustomTaskInProgressAttributesRequestTypedDict": ".customtaskinprogressattributesrequest", + "CustomTaskInProgressAttributesResponse": ".customtaskinprogressattributesresponse", + "CustomTaskInProgressAttributesResponsePayload": ".customtaskinprogressattributesresponse", + "CustomTaskInProgressAttributesResponsePayloadTypedDict": ".customtaskinprogressattributesresponse", + "CustomTaskInProgressAttributesResponseTypedDict": ".customtaskinprogressattributesresponse", + "UnknownCustomTaskInProgressAttributesResponsePayload": ".customtaskinprogressattributesresponse", + "CustomTaskInProgressRequest": ".customtaskinprogressrequest", + "CustomTaskInProgressRequestTypedDict": ".customtaskinprogressrequest", + "CustomTaskInProgressResponse": ".customtaskinprogressresponse", + "CustomTaskInProgressResponseTypedDict": ".customtaskinprogressresponse", + "CustomTaskStartedAttributesRequest": ".customtaskstartedattributesrequest", + "CustomTaskStartedAttributesRequestTypedDict": ".customtaskstartedattributesrequest", + "CustomTaskStartedAttributesResponse": ".customtaskstartedattributesresponse", + "CustomTaskStartedAttributesResponseTypedDict": ".customtaskstartedattributesresponse", + "CustomTaskStartedRequest": ".customtaskstartedrequest", + "CustomTaskStartedRequestTypedDict": ".customtaskstartedrequest", + "CustomTaskStartedResponse": ".customtaskstartedresponse", + "CustomTaskStartedResponseTypedDict": ".customtaskstartedresponse", + "CustomTaskTimedOutAttributes": ".customtasktimedoutattributes", + "CustomTaskTimedOutAttributesTypedDict": ".customtasktimedoutattributes", + "CustomTaskTimedOutRequest": ".customtasktimedoutrequest", + "CustomTaskTimedOutRequestTypedDict": ".customtasktimedoutrequest", + "CustomTaskTimedOutResponse": ".customtasktimedoutresponse", + "CustomTaskTimedOutResponseTypedDict": ".customtasktimedoutresponse", "Dataset": ".dataset", "DatasetTypedDict": ".dataset", "DatasetImportTask": ".datasetimporttask", @@ -3002,6 +4173,8 @@ "DeleteModelV1ModelsModelIDDeleteRequestTypedDict": ".delete_model_v1_models_model_id_deleteop", "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequest": ".delete_voice_v1_audio_voices_voice_id_deleteop", "DeleteVoiceV1AudioVoicesVoiceIDDeleteRequestTypedDict": ".delete_voice_v1_audio_voices_voice_id_deleteop", + "DeleteBatchJobResponse": ".deletebatchjobresponse", + "DeleteBatchJobResponseTypedDict": ".deletebatchjobresponse", "DeleteDatasetRecordsRequest": ".deletedatasetrecordsrequest", "DeleteDatasetRecordsRequestTypedDict": ".deletedatasetrecordsrequest", "DeleteFileResponse": ".deletefileresponse", @@ -3012,6 +4185,14 @@ "DeltaMessageContent": ".deltamessage", "DeltaMessageContentTypedDict": ".deltamessage", "DeltaMessageTypedDict": ".deltamessage", + "DeploymentDetailResponse": ".deploymentdetailresponse", + "DeploymentDetailResponseTypedDict": ".deploymentdetailresponse", + "DeploymentListResponse": ".deploymentlistresponse", + "DeploymentListResponseTypedDict": ".deploymentlistresponse", + "DeploymentResponse": ".deploymentresponse", + "DeploymentResponseTypedDict": ".deploymentresponse", + "DeploymentWorkerResponse": ".deploymentworkerresponse", + "DeploymentWorkerResponseTypedDict": ".deploymentworkerresponse", "Document": ".document", "DocumentTypedDict": ".document", "DocumentLibraryTool": ".documentlibrarytool", @@ -3033,16 +4214,30 @@ "EmbeddingResponseTypedDict": ".embeddingresponse", "EmbeddingResponseData": ".embeddingresponsedata", "EmbeddingResponseDataTypedDict": ".embeddingresponsedata", + "EncodedPayloadOptions": ".encodedpayloadoptions", "EncodingFormat": ".encodingformat", "EntityType": ".entitytype", "Event": ".event", "EventTypedDict": ".event", + "EventProgressStatus": ".eventprogressstatus", + "EventSource": ".eventsource", + "EventType": ".eventtype", + "ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequest": ".execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop", + "ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequestTypedDict": ".execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop", + "ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost": ".execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop", + "ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostTypedDict": ".execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop", + "ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest": ".execute_workflow_v1_workflows_workflow_identifier_execute_postop", + "ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequestTypedDict": ".execute_workflow_v1_workflows_workflow_identifier_execute_postop", + "ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost": ".execute_workflow_v1_workflows_workflow_identifier_execute_postop", + "ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostTypedDict": ".execute_workflow_v1_workflows_workflow_identifier_execute_postop", "ExecutionConfig": ".executionconfig", "ExecutionConfigTypedDict": ".executionconfig", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest": ".export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict": ".export_dataset_to_jsonl_v1_observability_datasets_dataset_id_exports_to_jsonl_getop", "ExportDatasetResponse": ".exportdatasetresponse", "ExportDatasetResponseTypedDict": ".exportdatasetresponse", + "Failure": ".failure", + "FailureTypedDict": ".failure", "FeedResultChatCompletionEventPreview": ".feedresultchatcompletioneventpreview", "FeedResultChatCompletionEventPreviewTypedDict": ".feedresultchatcompletioneventpreview", "FetchCampaignStatusResponse": ".fetchcampaignstatusresponse", @@ -3152,16 +4347,51 @@ "GetDatasetRecordsV1ObservabilityDatasetsDatasetIDRecordsGetRequestTypedDict": ".get_dataset_records_v1_observability_datasets_dataset_id_records_getop", "GetDatasetsV1ObservabilityDatasetsGetRequest": ".get_datasets_v1_observability_datasets_getop", "GetDatasetsV1ObservabilityDatasetsGetRequestTypedDict": ".get_datasets_v1_observability_datasets_getop", + "GetDeploymentV1WorkflowsDeploymentsNameGetRequest": ".get_deployment_v1_workflows_deployments_name_getop", + "GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict": ".get_deployment_v1_workflows_deployments_name_getop", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequest": ".get_judge_by_id_v1_observability_judges_judge_id_getop", "GetJudgeByIDV1ObservabilityJudgesJudgeIDGetRequestTypedDict": ".get_judge_by_id_v1_observability_judges_judge_id_getop", "GetJudgesV1ObservabilityJudgesGetRequest": ".get_judges_v1_observability_judges_getop", "GetJudgesV1ObservabilityJudgesGetRequestTypedDict": ".get_judges_v1_observability_judges_getop", + "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest": ".get_run_history_v1_workflows_runs_run_id_history_getop", + "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict": ".get_run_history_v1_workflows_runs_run_id_history_getop", + "GetRunV1WorkflowsRunsRunIDGetRequest": ".get_run_v1_workflows_runs_run_id_getop", + "GetRunV1WorkflowsRunsRunIDGetRequestTypedDict": ".get_run_v1_workflows_runs_run_id_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", + "GetStreamEventsV1WorkflowsEventsStreamGetRequest": ".get_stream_events_v1_workflows_events_stream_getop", + "GetStreamEventsV1WorkflowsEventsStreamGetRequestTypedDict": ".get_stream_events_v1_workflows_events_stream_getop", + "GetStreamEventsV1WorkflowsEventsStreamGetResponseBody": ".get_stream_events_v1_workflows_events_stream_getop", + "GetStreamEventsV1WorkflowsEventsStreamGetResponseBodyTypedDict": ".get_stream_events_v1_workflows_events_stream_getop", + "Scope": ".get_stream_events_v1_workflows_events_stream_getop", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequest": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", "GetVoiceSampleAudioV1AudioVoicesVoiceIDSampleGetRequestTypedDict": ".get_voice_sample_audio_v1_audio_voices_voice_id_sample_getop", "GetVoiceV1AudioVoicesVoiceIDGetRequest": ".get_voice_v1_audio_voices_voice_id_getop", "GetVoiceV1AudioVoicesVoiceIDGetRequestTypedDict": ".get_voice_v1_audio_voices_voice_id_getop", + "GetWorkflowEventsV1WorkflowsEventsListGetRequest": ".get_workflow_events_v1_workflows_events_list_getop", + "GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict": ".get_workflow_events_v1_workflows_events_list_getop", + "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest": ".get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop", + "GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict": ".get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop", + "GetWorkflowExecutionTraceEventsRequest": ".get_workflow_execution_trace_eventsop", + "GetWorkflowExecutionTraceEventsRequestTypedDict": ".get_workflow_execution_trace_eventsop", + "GetWorkflowExecutionTraceOtelRequest": ".get_workflow_execution_trace_otelop", + "GetWorkflowExecutionTraceOtelRequestTypedDict": ".get_workflow_execution_trace_otelop", + "GetWorkflowExecutionTraceSummaryRequest": ".get_workflow_execution_trace_summaryop", + "GetWorkflowExecutionTraceSummaryRequestTypedDict": ".get_workflow_execution_trace_summaryop", + "GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequest": ".get_workflow_execution_v1_workflows_executions_execution_id_getop", + "GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequestTypedDict": ".get_workflow_execution_v1_workflows_executions_execution_id_getop", + "GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest": ".get_workflow_metrics_v1_workflows_workflow_name_metrics_getop", + "GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequestTypedDict": ".get_workflow_metrics_v1_workflows_workflow_name_metrics_getop", + "GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequest": ".get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop", + "GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequestTypedDict": ".get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop", + "GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest": ".get_workflow_registrations_v1_workflows_registrations_getop", + "GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestTypedDict": ".get_workflow_registrations_v1_workflows_registrations_getop", + "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest": ".get_workflow_v1_workflows_workflow_identifier_getop", + "GetWorkflowV1WorkflowsWorkflowIdentifierGetRequestTypedDict": ".get_workflow_v1_workflows_workflow_identifier_getop", + "GetWorkflowsV1WorkflowsGetRequest": ".get_workflows_v1_workflows_getop", + "GetWorkflowsV1WorkflowsGetRequestTypedDict": ".get_workflows_v1_workflows_getop", + "GetWorkflowsV1WorkflowsGetResponse": ".get_workflows_v1_workflows_getop", + "GetWorkflowsV1WorkflowsGetResponseTypedDict": ".get_workflows_v1_workflows_getop", "GetFileResponse": ".getfileresponse", "GetFileResponseTypedDict": ".getfileresponse", "GetSignedURLResponse": ".getsignedurlresponse", @@ -3207,6 +4437,8 @@ "JobMetadataTypedDict": ".jobmetadata", "JobsAPIRoutesBatchCancelBatchJobRequest": ".jobs_api_routes_batch_cancel_batch_jobop", "JobsAPIRoutesBatchCancelBatchJobRequestTypedDict": ".jobs_api_routes_batch_cancel_batch_jobop", + "JobsAPIRoutesBatchDeleteBatchJobRequest": ".jobs_api_routes_batch_delete_batch_jobop", + "JobsAPIRoutesBatchDeleteBatchJobRequestTypedDict": ".jobs_api_routes_batch_delete_batch_jobop", "JobsAPIRoutesBatchGetBatchJobRequest": ".jobs_api_routes_batch_get_batch_jobop", "JobsAPIRoutesBatchGetBatchJobRequestTypedDict": ".jobs_api_routes_batch_get_batch_jobop", "JobsAPIRoutesBatchGetBatchJobsRequest": ".jobs_api_routes_batch_get_batch_jobsop", @@ -3244,6 +4476,27 @@ "JobsAPIRoutesFineTuningUpdateFineTunedModelResponse": ".jobs_api_routes_fine_tuning_update_fine_tuned_modelop", "JobsAPIRoutesFineTuningUpdateFineTunedModelResponseTypedDict": ".jobs_api_routes_fine_tuning_update_fine_tuned_modelop", "UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse": ".jobs_api_routes_fine_tuning_update_fine_tuned_modelop", + "JSONPatchAdd": ".jsonpatchadd", + "JSONPatchAddTypedDict": ".jsonpatchadd", + "JSONPatchAppend": ".jsonpatchappend", + "JSONPatchAppendTypedDict": ".jsonpatchappend", + "JSONPatchPayloadRequest": ".jsonpatchpayloadrequest", + "JSONPatchPayloadRequestTypedDict": ".jsonpatchpayloadrequest", + "JSONPatchPayloadRequestValue": ".jsonpatchpayloadrequest", + "JSONPatchPayloadRequestValueTypedDict": ".jsonpatchpayloadrequest", + "JSONPatchPayloadResponse": ".jsonpatchpayloadresponse", + "JSONPatchPayloadResponseTypedDict": ".jsonpatchpayloadresponse", + "JSONPatchPayloadResponseValue": ".jsonpatchpayloadresponse", + "JSONPatchPayloadResponseValueTypedDict": ".jsonpatchpayloadresponse", + "UnknownJSONPatchPayloadResponseValue": ".jsonpatchpayloadresponse", + "JSONPatchRemove": ".jsonpatchremove", + "JSONPatchRemoveTypedDict": ".jsonpatchremove", + "JSONPatchReplace": ".jsonpatchreplace", + "JSONPatchReplaceTypedDict": ".jsonpatchreplace", + "JSONPayloadRequest": ".jsonpayloadrequest", + "JSONPayloadRequestTypedDict": ".jsonpayloadrequest", + "JSONPayloadResponse": ".jsonpayloadresponse", + "JSONPayloadResponseTypedDict": ".jsonpayloadresponse", "JSONSchema": ".jsonschema", "JSONSchemaTypedDict": ".jsonschema", "Judge": ".judge", @@ -3302,6 +4555,8 @@ "LibrariesDocumentsUploadV1RequestTypedDict": ".libraries_documents_upload_v1op", "LibrariesGetV1Request": ".libraries_get_v1op", "LibrariesGetV1RequestTypedDict": ".libraries_get_v1op", + "LibrariesListV1Request": ".libraries_list_v1op", + "LibrariesListV1RequestTypedDict": ".libraries_list_v1op", "LibrariesShareCreateV1Request": ".libraries_share_create_v1op", "LibrariesShareCreateV1RequestTypedDict": ".libraries_share_create_v1op", "LibrariesShareDeleteV1Request": ".libraries_share_delete_v1op", @@ -3312,10 +4567,19 @@ "LibrariesUpdateV1RequestTypedDict": ".libraries_update_v1op", "Library": ".library", "LibraryTypedDict": ".library", + "ListDeploymentsV1WorkflowsDeploymentsGetRequest": ".list_deployments_v1_workflows_deployments_getop", + "ListDeploymentsV1WorkflowsDeploymentsGetRequestTypedDict": ".list_deployments_v1_workflows_deployments_getop", "ListModelsV1ModelsGetRequest": ".list_models_v1_models_getop", "ListModelsV1ModelsGetRequestTypedDict": ".list_models_v1_models_getop", + "ListRunsV1WorkflowsRunsGetRequest": ".list_runs_v1_workflows_runs_getop", + "ListRunsV1WorkflowsRunsGetRequestTypedDict": ".list_runs_v1_workflows_runs_getop", + "ListRunsV1WorkflowsRunsGetResponse": ".list_runs_v1_workflows_runs_getop", + "ListRunsV1WorkflowsRunsGetResponseTypedDict": ".list_runs_v1_workflows_runs_getop", + "ListRunsV1WorkflowsRunsGetStatus": ".list_runs_v1_workflows_runs_getop", + "ListRunsV1WorkflowsRunsGetStatusTypedDict": ".list_runs_v1_workflows_runs_getop", "ListVoicesV1AudioVoicesGetRequest": ".list_voices_v1_audio_voices_getop", "ListVoicesV1AudioVoicesGetRequestTypedDict": ".list_voices_v1_audio_voices_getop", + "ListVoicesV1AudioVoicesGetType": ".list_voices_v1_audio_voices_getop", "ListBatchJobsResponse": ".listbatchjobsresponse", "ListBatchJobsResponseTypedDict": ".listbatchjobsresponse", "ListCampaignSelectedEventsResponse": ".listcampaignselectedeventsresponse", @@ -3345,6 +4609,10 @@ "ListLibrariesResponseTypedDict": ".listlibrariesresponse", "ListSharingResponse": ".listsharingresponse", "ListSharingResponseTypedDict": ".listsharingresponse", + "ListWorkflowEventResponse": ".listworkfloweventresponse", + "ListWorkflowEventResponseEvent": ".listworkfloweventresponse", + "ListWorkflowEventResponseEventTypedDict": ".listworkfloweventresponse", + "ListWorkflowEventResponseTypedDict": ".listworkfloweventresponse", "MCPServerIcon": ".mcpservericon", "MCPServerIconTypedDict": ".mcpservericon", "MCPTool": ".mcptool", @@ -3411,6 +4679,8 @@ "ModerationObjectTypedDict": ".moderationobject", "ModerationResponse": ".moderationresponse", "ModerationResponseTypedDict": ".moderationresponse", + "NetworkEncodedInput": ".networkencodedinput", + "NetworkEncodedInputTypedDict": ".networkencodedinput", "OAuth2TokenAuth": ".oauth2tokenauth", "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", "ObservabilityErrorCode": ".observabilityerrorcode", @@ -3471,6 +4741,16 @@ "ProcessStatus": ".processstatus", "PromptTokensDetails": ".prompttokensdetails", "PromptTokensDetailsTypedDict": ".prompttokensdetails", + "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", + "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", + "QueryDefinition": ".querydefinition", + "QueryDefinitionTypedDict": ".querydefinition", + "QueryInvocationBody": ".queryinvocationbody", + "QueryInvocationBodyInput": ".queryinvocationbody", + "QueryInvocationBodyInputTypedDict": ".queryinvocationbody", + "QueryInvocationBodyTypedDict": ".queryinvocationbody", + "QueryWorkflowResponse": ".queryworkflowresponse", + "QueryWorkflowResponseTypedDict": ".queryworkflowresponse", "RealtimeTranscriptionError": ".realtimetranscriptionerror", "RealtimeTranscriptionErrorTypedDict": ".realtimetranscriptionerror", "RealtimeTranscriptionErrorDetail": ".realtimetranscriptionerrordetail", @@ -3499,6 +4779,10 @@ "ReferenceID": ".referencechunk", "ReferenceIDTypedDict": ".referencechunk", "RequestSource": ".requestsource", + "ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest": ".reset_workflow_v1_workflows_executions_execution_id_reset_postop", + "ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequestTypedDict": ".reset_workflow_v1_workflows_executions_execution_id_reset_postop", + "ResetInvocationBody": ".resetinvocationbody", + "ResetInvocationBodyTypedDict": ".resetinvocationbody", "ResourceLink": ".resourcelink", "ResourceLinkTypedDict": ".resourcelink", "ResourceVisibility": ".resourcevisibility", @@ -3518,6 +4802,23 @@ "UnknownResponseRetrieveModelV1ModelsModelIDGet": ".retrieve_model_v1_models_model_id_getop", "Roles": ".roles", "SampleType": ".sampletype", + "ScalarMetric": ".scalarmetric", + "ScalarMetricTypedDict": ".scalarmetric", + "ScalarMetricValue": ".scalarmetric", + "ScalarMetricValueTypedDict": ".scalarmetric", + "ScheduleCalendar": ".schedulecalendar", + "ScheduleCalendarTypedDict": ".schedulecalendar", + "ScheduleDefinition": ".scheduledefinition", + "ScheduleDefinitionTypedDict": ".scheduledefinition", + "ScheduleDefinitionOutput": ".scheduledefinitionoutput", + "ScheduleDefinitionOutputTypedDict": ".scheduledefinitionoutput", + "ScheduleInterval": ".scheduleinterval", + "ScheduleIntervalTypedDict": ".scheduleinterval", + "ScheduleOverlapPolicy": ".scheduleoverlappolicy", + "SchedulePolicy": ".schedulepolicy", + "SchedulePolicyTypedDict": ".schedulepolicy", + "ScheduleRange": ".schedulerange", + "ScheduleRangeTypedDict": ".schedulerange", "SearchChatCompletionEventIdsRequest": ".searchchatcompletioneventidsrequest", "SearchChatCompletionEventIdsRequestTypedDict": ".searchchatcompletioneventidsrequest", "SearchChatCompletionEventIdsResponse": ".searchchatcompletioneventidsresponse", @@ -3535,6 +4836,18 @@ "SharingDeleteTypedDict": ".sharingdelete", "SharingRequest": ".sharingrequest", "SharingRequestTypedDict": ".sharingrequest", + "SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequest": ".signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop", + "SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequestTypedDict": ".signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop", + "SignalDefinition": ".signaldefinition", + "SignalDefinitionTypedDict": ".signaldefinition", + "SignalInvocationBody": ".signalinvocationbody", + "SignalInvocationBodyInput": ".signalinvocationbody", + "SignalInvocationBodyInputTypedDict": ".signalinvocationbody", + "SignalInvocationBodyNetworkEncodedInput": ".signalinvocationbody", + "SignalInvocationBodyNetworkEncodedInputTypedDict": ".signalinvocationbody", + "SignalInvocationBodyTypedDict": ".signalinvocationbody", + "SignalWorkflowResponse": ".signalworkflowresponse", + "SignalWorkflowResponseTypedDict": ".signalworkflowresponse", "Source": ".source", "SpeechResponse": ".speech_v1_audio_speech_postop", "SpeechResponseTypedDict": ".speech_v1_audio_speech_postop", @@ -3554,12 +4867,49 @@ "SpeechStreamDoneTypedDict": ".speechstreamdone", "SpeechStreamEventTypes": ".speechstreameventtypes", "SSETypes": ".ssetypes", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetRequest": ".stream_v1_workflows_executions_execution_id_stream_getop", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetRequestTypedDict": ".stream_v1_workflows_executions_execution_id_stream_getop", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody": ".stream_v1_workflows_executions_execution_id_stream_getop", + "StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBodyTypedDict": ".stream_v1_workflows_executions_execution_id_stream_getop", + "StreamEventSsePayload": ".streameventssepayload", + "StreamEventSsePayloadData": ".streameventssepayload", + "StreamEventSsePayloadDataTypedDict": ".streameventssepayload", + "StreamEventSsePayloadTypedDict": ".streameventssepayload", + "StreamEventWorkflowContext": ".streameventworkflowcontext", + "StreamEventWorkflowContextTypedDict": ".streameventworkflowcontext", "SystemMessage": ".systemmessage", "SystemMessageContent": ".systemmessage", "SystemMessageContentTypedDict": ".systemmessage", "SystemMessageTypedDict": ".systemmessage", "SystemMessageContentChunks": ".systemmessagecontentchunks", "SystemMessageContentChunksTypedDict": ".systemmessagecontentchunks", + "TempoGetTraceResponse": ".tempogettraceresponse", + "TempoGetTraceResponseTypedDict": ".tempogettraceresponse", + "TempoTraceAttribute": ".tempotraceattribute", + "TempoTraceAttributeTypedDict": ".tempotraceattribute", + "TempoTraceAttributeValue": ".tempotraceattribute", + "TempoTraceAttributeValueTypedDict": ".tempotraceattribute", + "TempoTraceAttributeBoolValue": ".tempotraceattributeboolvalue", + "TempoTraceAttributeBoolValueTypedDict": ".tempotraceattributeboolvalue", + "TempoTraceAttributeIntValue": ".tempotraceattributeintvalue", + "TempoTraceAttributeIntValueTypedDict": ".tempotraceattributeintvalue", + "TempoTraceAttributeStringValue": ".tempotraceattributestringvalue", + "TempoTraceAttributeStringValueTypedDict": ".tempotraceattributestringvalue", + "TempoTraceBatch": ".tempotracebatch", + "TempoTraceBatchTypedDict": ".tempotracebatch", + "TempoTraceEvent": ".tempotraceevent", + "TempoTraceEventTypedDict": ".tempotraceevent", + "TempoTraceResource": ".tempotraceresource", + "TempoTraceResourceTypedDict": ".tempotraceresource", + "TempoTraceScope": ".tempotracescope", + "TempoTraceScopeTypedDict": ".tempotracescope", + "TempoTraceScopeKind": ".tempotracescopekind", + "TempoTraceScopeSpan": ".tempotracescopespan", + "TempoTraceScopeSpanTypedDict": ".tempotracescopespan", + "TempoTraceSpan": ".tempotracespan", + "TempoTraceSpanTypedDict": ".tempotracespan", + "TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequest": ".terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop", + "TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequestTypedDict": ".terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop", "TextChunk": ".textchunk", "TextChunkTypedDict": ".textchunk", "TextContent": ".textcontent", @@ -3570,6 +4920,12 @@ "ThinkChunkTypedDict": ".thinkchunk", "Thinking": ".thinkchunk", "ThinkingTypedDict": ".thinkchunk", + "TimeSeriesMetric": ".timeseriesmetric", + "TimeSeriesMetricTypedDict": ".timeseriesmetric", + "TimeSeriesMetricValue1": ".timeseriesmetric", + "TimeSeriesMetricValue1TypedDict": ".timeseriesmetric", + "TimeSeriesMetricValue2": ".timeseriesmetric", + "TimeSeriesMetricValue2TypedDict": ".timeseriesmetric", "TimestampGranularity": ".timestampgranularity", "Tool": ".tool", "ToolTypedDict": ".tool", @@ -3642,8 +4998,12 @@ "TurbineToolLocaleTypedDict": ".turbinetoollocale", "TurbineToolMeta": ".turbinetoolmeta", "TurbineToolMetaTypedDict": ".turbinetoolmeta", + "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest": ".unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop", + "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequestTypedDict": ".unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop", "UnarchiveModelResponse": ".unarchivemodelresponse", "UnarchiveModelResponseTypedDict": ".unarchivemodelresponse", + "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest": ".unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop", + "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict": ".unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop", "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequest": ".update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop", "UpdateDatasetRecordPayloadV1ObservabilityDatasetRecordsDatasetRecordIDPayloadPutRequestTypedDict": ".update_dataset_record_payload_v1_observability_dataset_records_dataset_record_id_payload_putop", "UpdateDatasetRecordPropertiesV1ObservabilityDatasetRecordsDatasetRecordIDPropertiesPutRequest": ".update_dataset_record_properties_v1_observability_dataset_records_dataset_record_id_properties_putop", @@ -3654,6 +5014,10 @@ "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict": ".update_voice_v1_audio_voices_voice_id_patchop", + "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest": ".update_workflow_execution_v1_workflows_executions_execution_id_updates_postop", + "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequestTypedDict": ".update_workflow_execution_v1_workflows_executions_execution_id_updates_postop", + "UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest": ".update_workflow_v1_workflows_workflow_identifier_putop", + "UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequestTypedDict": ".update_workflow_v1_workflows_workflow_identifier_putop", "UpdateAgentRequest": ".updateagentrequest", "UpdateAgentRequestTool": ".updateagentrequest", "UpdateAgentRequestToolTypedDict": ".updateagentrequest", @@ -3666,10 +5030,16 @@ "UpdateDatasetRecordPropertiesRequestTypedDict": ".updatedatasetrecordpropertiesrequest", "UpdateDatasetRequest": ".updatedatasetrequest", "UpdateDatasetRequestTypedDict": ".updatedatasetrequest", + "UpdateDefinition": ".updatedefinition", + "UpdateDefinitionTypedDict": ".updatedefinition", "Attributes": ".updatedocumentrequest", "AttributesTypedDict": ".updatedocumentrequest", "UpdateDocumentRequest": ".updatedocumentrequest", "UpdateDocumentRequestTypedDict": ".updatedocumentrequest", + "UpdateInvocationBody": ".updateinvocationbody", + "UpdateInvocationBodyInput": ".updateinvocationbody", + "UpdateInvocationBodyInputTypedDict": ".updateinvocationbody", + "UpdateInvocationBodyTypedDict": ".updateinvocationbody", "UpdateJudgeRequest": ".updatejudgerequest", "UpdateJudgeRequestOutput": ".updatejudgerequest", "UpdateJudgeRequestOutputTypedDict": ".updatejudgerequest", @@ -3678,6 +5048,8 @@ "UpdateLibraryRequestTypedDict": ".updatelibraryrequest", "UpdateModelRequest": ".updatemodelrequest", "UpdateModelRequestTypedDict": ".updatemodelrequest", + "UpdateWorkflowResponse": ".updateworkflowresponse", + "UpdateWorkflowResponseTypedDict": ".updateworkflowresponse", "UsageInfo": ".usageinfo", "UsageInfoTypedDict": ".usageinfo", "UsageInfoDollarDefs": ".usageinfo_dollar_defs", @@ -3708,6 +5080,135 @@ "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", "WebSearchTool": ".websearchtool", "WebSearchToolTypedDict": ".websearchtool", + "Workflow": ".workflow", + "WorkflowTypedDict": ".workflow", + "WorkflowArchiveResponse": ".workflowarchiveresponse", + "WorkflowArchiveResponseTypedDict": ".workflowarchiveresponse", + "WorkflowBasicDefinition": ".workflowbasicdefinition", + "WorkflowBasicDefinitionTypedDict": ".workflowbasicdefinition", + "WorkflowCodeDefinition": ".workflowcodedefinition", + "WorkflowCodeDefinitionTypedDict": ".workflowcodedefinition", + "WorkflowEventBatchRequest": ".workfloweventbatchrequest", + "WorkflowEventBatchRequestEvent": ".workfloweventbatchrequest", + "WorkflowEventBatchRequestEventTypedDict": ".workfloweventbatchrequest", + "WorkflowEventBatchRequestTypedDict": ".workfloweventbatchrequest", + "WorkflowEventBatchResponse": ".workfloweventbatchresponse", + "WorkflowEventBatchResponseStatus": ".workfloweventbatchresponse", + "WorkflowEventBatchResponseTypedDict": ".workfloweventbatchresponse", + "WorkflowEventRequest": ".workfloweventrequest", + "WorkflowEventRequestEvent": ".workfloweventrequest", + "WorkflowEventRequestEventTypedDict": ".workfloweventrequest", + "WorkflowEventRequestTypedDict": ".workfloweventrequest", + "WorkflowEventResponse": ".workfloweventresponse", + "WorkflowEventResponseStatus": ".workfloweventresponse", + "WorkflowEventResponseTypedDict": ".workfloweventresponse", + "WorkflowEventType": ".workfloweventtype", + "WorkflowExecutionCanceledAttributes": ".workflowexecutioncanceledattributes", + "WorkflowExecutionCanceledAttributesTypedDict": ".workflowexecutioncanceledattributes", + "WorkflowExecutionCanceledRequest": ".workflowexecutioncanceledrequest", + "WorkflowExecutionCanceledRequestTypedDict": ".workflowexecutioncanceledrequest", + "WorkflowExecutionCanceledResponse": ".workflowexecutioncanceledresponse", + "WorkflowExecutionCanceledResponseTypedDict": ".workflowexecutioncanceledresponse", + "WorkflowExecutionCompletedAttributesRequest": ".workflowexecutioncompletedattributesrequest", + "WorkflowExecutionCompletedAttributesRequestTypedDict": ".workflowexecutioncompletedattributesrequest", + "WorkflowExecutionCompletedAttributesResponse": ".workflowexecutioncompletedattributesresponse", + "WorkflowExecutionCompletedAttributesResponseTypedDict": ".workflowexecutioncompletedattributesresponse", + "WorkflowExecutionCompletedRequest": ".workflowexecutioncompletedrequest", + "WorkflowExecutionCompletedRequestTypedDict": ".workflowexecutioncompletedrequest", + "WorkflowExecutionCompletedResponse": ".workflowexecutioncompletedresponse", + "WorkflowExecutionCompletedResponseTypedDict": ".workflowexecutioncompletedresponse", + "WorkflowExecutionContinuedAsNewAttributesRequest": ".workflowexecutioncontinuedasnewattributesrequest", + "WorkflowExecutionContinuedAsNewAttributesRequestTypedDict": ".workflowexecutioncontinuedasnewattributesrequest", + "WorkflowExecutionContinuedAsNewAttributesResponse": ".workflowexecutioncontinuedasnewattributesresponse", + "WorkflowExecutionContinuedAsNewAttributesResponseTypedDict": ".workflowexecutioncontinuedasnewattributesresponse", + "WorkflowExecutionContinuedAsNewRequest": ".workflowexecutioncontinuedasnewrequest", + "WorkflowExecutionContinuedAsNewRequestTypedDict": ".workflowexecutioncontinuedasnewrequest", + "WorkflowExecutionContinuedAsNewResponse": ".workflowexecutioncontinuedasnewresponse", + "WorkflowExecutionContinuedAsNewResponseTypedDict": ".workflowexecutioncontinuedasnewresponse", + "WorkflowExecutionFailedAttributes": ".workflowexecutionfailedattributes", + "WorkflowExecutionFailedAttributesTypedDict": ".workflowexecutionfailedattributes", + "WorkflowExecutionFailedRequest": ".workflowexecutionfailedrequest", + "WorkflowExecutionFailedRequestTypedDict": ".workflowexecutionfailedrequest", + "WorkflowExecutionFailedResponse": ".workflowexecutionfailedresponse", + "WorkflowExecutionFailedResponseTypedDict": ".workflowexecutionfailedresponse", + "WorkflowExecutionListResponse": ".workflowexecutionlistresponse", + "WorkflowExecutionListResponseTypedDict": ".workflowexecutionlistresponse", + "WorkflowExecutionProgressTraceEvent": ".workflowexecutionprogresstraceevent", + "WorkflowExecutionProgressTraceEventTypedDict": ".workflowexecutionprogresstraceevent", + "WorkflowExecutionRequest": ".workflowexecutionrequest", + "WorkflowExecutionRequestTypedDict": ".workflowexecutionrequest", + "WorkflowExecutionResponse": ".workflowexecutionresponse", + "WorkflowExecutionResponseTypedDict": ".workflowexecutionresponse", + "WorkflowExecutionStartedAttributesRequest": ".workflowexecutionstartedattributesrequest", + "WorkflowExecutionStartedAttributesRequestTypedDict": ".workflowexecutionstartedattributesrequest", + "WorkflowExecutionStartedAttributesResponse": ".workflowexecutionstartedattributesresponse", + "WorkflowExecutionStartedAttributesResponseTypedDict": ".workflowexecutionstartedattributesresponse", + "WorkflowExecutionStartedRequest": ".workflowexecutionstartedrequest", + "WorkflowExecutionStartedRequestTypedDict": ".workflowexecutionstartedrequest", + "WorkflowExecutionStartedResponse": ".workflowexecutionstartedresponse", + "WorkflowExecutionStartedResponseTypedDict": ".workflowexecutionstartedresponse", + "WorkflowExecutionStatus": ".workflowexecutionstatus", + "WorkflowExecutionSyncResponse": ".workflowexecutionsyncresponse", + "WorkflowExecutionSyncResponseTypedDict": ".workflowexecutionsyncresponse", + "WorkflowExecutionTraceEvent": ".workflowexecutiontraceevent", + "WorkflowExecutionTraceEventTypedDict": ".workflowexecutiontraceevent", + "WorkflowExecutionTraceEventsResponse": ".workflowexecutiontraceeventsresponse", + "WorkflowExecutionTraceEventsResponseEvent": ".workflowexecutiontraceeventsresponse", + "WorkflowExecutionTraceEventsResponseEventTypedDict": ".workflowexecutiontraceeventsresponse", + "WorkflowExecutionTraceEventsResponseTypedDict": ".workflowexecutiontraceeventsresponse", + "WorkflowExecutionTraceOTelResponse": ".workflowexecutiontraceotelresponse", + "WorkflowExecutionTraceOTelResponseTypedDict": ".workflowexecutiontraceotelresponse", + "WorkflowExecutionTraceSummaryAttributesValues": ".workflowexecutiontracesummaryattributesvalues", + "WorkflowExecutionTraceSummaryAttributesValuesTypedDict": ".workflowexecutiontracesummaryattributesvalues", + "WorkflowExecutionTraceSummaryResponse": ".workflowexecutiontracesummaryresponse", + "WorkflowExecutionTraceSummaryResponseTypedDict": ".workflowexecutiontracesummaryresponse", + "WorkflowExecutionTraceSummarySpan": ".workflowexecutiontracesummaryspan", + "WorkflowExecutionTraceSummarySpanTypedDict": ".workflowexecutiontracesummaryspan", + "WorkflowExecutionWithoutResultResponse": ".workflowexecutionwithoutresultresponse", + "WorkflowExecutionWithoutResultResponseTypedDict": ".workflowexecutionwithoutresultresponse", + "WorkflowGetResponse": ".workflowgetresponse", + "WorkflowGetResponseTypedDict": ".workflowgetresponse", + "WorkflowListResponse": ".workflowlistresponse", + "WorkflowListResponseTypedDict": ".workflowlistresponse", + "WorkflowMetadata": ".workflowmetadata", + "WorkflowMetadataTypedDict": ".workflowmetadata", + "WorkflowMetrics": ".workflowmetrics", + "WorkflowMetricsTypedDict": ".workflowmetrics", + "WorkflowRegistration": ".workflowregistration", + "WorkflowRegistrationTypedDict": ".workflowregistration", + "WorkflowRegistrationGetResponse": ".workflowregistrationgetresponse", + "WorkflowRegistrationGetResponseTypedDict": ".workflowregistrationgetresponse", + "WorkflowRegistrationListResponse": ".workflowregistrationlistresponse", + "WorkflowRegistrationListResponseTypedDict": ".workflowregistrationlistresponse", + "WorkflowRegistrationWithWorkerStatus": ".workflowregistrationwithworkerstatus", + "WorkflowRegistrationWithWorkerStatusTypedDict": ".workflowregistrationwithworkerstatus", + "WorkflowScheduleListResponse": ".workflowschedulelistresponse", + "WorkflowScheduleListResponseTypedDict": ".workflowschedulelistresponse", + "WorkflowScheduleRequest": ".workflowschedulerequest", + "WorkflowScheduleRequestTypedDict": ".workflowschedulerequest", + "WorkflowScheduleResponse": ".workflowscheduleresponse", + "WorkflowScheduleResponseTypedDict": ".workflowscheduleresponse", + "WorkflowTaskFailedAttributes": ".workflowtaskfailedattributes", + "WorkflowTaskFailedAttributesTypedDict": ".workflowtaskfailedattributes", + "WorkflowTaskFailedRequest": ".workflowtaskfailedrequest", + "WorkflowTaskFailedRequestTypedDict": ".workflowtaskfailedrequest", + "WorkflowTaskFailedResponse": ".workflowtaskfailedresponse", + "WorkflowTaskFailedResponseTypedDict": ".workflowtaskfailedresponse", + "WorkflowTaskTimedOutAttributes": ".workflowtasktimedoutattributes", + "WorkflowTaskTimedOutAttributesTypedDict": ".workflowtasktimedoutattributes", + "WorkflowTaskTimedOutRequest": ".workflowtasktimedoutrequest", + "WorkflowTaskTimedOutRequestTypedDict": ".workflowtasktimedoutrequest", + "WorkflowTaskTimedOutResponse": ".workflowtasktimedoutresponse", + "WorkflowTaskTimedOutResponseTypedDict": ".workflowtasktimedoutresponse", + "WorkflowType": ".workflowtype", + "WorkflowUnarchiveResponse": ".workflowunarchiveresponse", + "WorkflowUnarchiveResponseTypedDict": ".workflowunarchiveresponse", + "WorkflowUpdateRequest": ".workflowupdaterequest", + "WorkflowUpdateRequestTypedDict": ".workflowupdaterequest", + "WorkflowUpdateResponse": ".workflowupdateresponse", + "WorkflowUpdateResponseTypedDict": ".workflowupdateresponse", + "WorkflowWithWorkerStatus": ".workflowwithworkerstatus", + "WorkflowWithWorkerStatusTypedDict": ".workflowwithworkerstatus", } diff --git a/src/mistralai/client/models/activitytaskcompletedattributesrequest.py b/src/mistralai/client/models/activitytaskcompletedattributesrequest.py new file mode 100644 index 00000000..560310cf --- /dev/null +++ b/src/mistralai/client/models/activitytaskcompletedattributesrequest.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a9e5ef17794f + +from __future__ import annotations +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ActivityTaskCompletedAttributesRequestTypedDict(TypedDict): + r"""Attributes for activity task completed events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + activity_name: str + r"""The registered name of the activity being executed.""" + result: JSONPayloadRequestTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class ActivityTaskCompletedAttributesRequest(BaseModel): + r"""Attributes for activity task completed events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + + activity_name: str + r"""The registered name of the activity being executed.""" + + result: JSONPayloadRequest + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/activitytaskcompletedattributesresponse.py b/src/mistralai/client/models/activitytaskcompletedattributesresponse.py new file mode 100644 index 00000000..899acb62 --- /dev/null +++ b/src/mistralai/client/models/activitytaskcompletedattributesresponse.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8174941767cc + +from __future__ import annotations +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ActivityTaskCompletedAttributesResponseTypedDict(TypedDict): + r"""Attributes for activity task completed events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + activity_name: str + r"""The registered name of the activity being executed.""" + result: JSONPayloadResponseTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class ActivityTaskCompletedAttributesResponse(BaseModel): + r"""Attributes for activity task completed events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + + activity_name: str + r"""The registered name of the activity being executed.""" + + result: JSONPayloadResponse + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/activitytaskcompletedrequest.py b/src/mistralai/client/models/activitytaskcompletedrequest.py new file mode 100644 index 00000000..fae82f66 --- /dev/null +++ b/src/mistralai/client/models/activitytaskcompletedrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d051525d65ba + +from __future__ import annotations +from .activitytaskcompletedattributesrequest import ( + ActivityTaskCompletedAttributesRequest, + ActivityTaskCompletedAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ActivityTaskCompletedRequestTypedDict(TypedDict): + r"""Emitted when an activity task completes successfully. + + Contains timing information about the successful execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskCompletedAttributesRequestTypedDict + r"""Attributes for activity task completed events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["ACTIVITY_TASK_COMPLETED"] + r"""Event type discriminator.""" + + +class ActivityTaskCompletedRequest(BaseModel): + r"""Emitted when an activity task completes successfully. + + Contains timing information about the successful execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskCompletedAttributesRequest + r"""Attributes for activity task completed events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_COMPLETED"]], + AfterValidator(validate_const("ACTIVITY_TASK_COMPLETED")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_COMPLETED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskCompletedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/activitytaskcompletedresponse.py b/src/mistralai/client/models/activitytaskcompletedresponse.py new file mode 100644 index 00000000..b324066b --- /dev/null +++ b/src/mistralai/client/models/activitytaskcompletedresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 28373f0a2c9e + +from __future__ import annotations +from .activitytaskcompletedattributesresponse import ( + ActivityTaskCompletedAttributesResponse, + ActivityTaskCompletedAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ActivityTaskCompletedResponseTypedDict(TypedDict): + r"""Emitted when an activity task completes successfully. + + Contains timing information about the successful execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskCompletedAttributesResponseTypedDict + r"""Attributes for activity task completed events.""" + event_type: Literal["ACTIVITY_TASK_COMPLETED"] + r"""Event type discriminator.""" + + +class ActivityTaskCompletedResponse(BaseModel): + r"""Emitted when an activity task completes successfully. + + Contains timing information about the successful execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskCompletedAttributesResponse + r"""Attributes for activity task completed events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_COMPLETED"]], + AfterValidator(validate_const("ACTIVITY_TASK_COMPLETED")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_COMPLETED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskCompletedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/activitytaskfailedattributes.py b/src/mistralai/client/models/activitytaskfailedattributes.py new file mode 100644 index 00000000..37749d4a --- /dev/null +++ b/src/mistralai/client/models/activitytaskfailedattributes.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 12635cd17417 + +from __future__ import annotations +from .failure import Failure, FailureTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ActivityTaskFailedAttributesTypedDict(TypedDict): + r"""Attributes for activity task failed events (final failure after all retries).""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + activity_name: str + r"""The registered name of the activity being executed.""" + attempt: int + r"""The final attempt number that failed (1-indexed).""" + failure: FailureTypedDict + r"""Represents an error or exception that occurred during execution.""" + + +class ActivityTaskFailedAttributes(BaseModel): + r"""Attributes for activity task failed events (final failure after all retries).""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + + activity_name: str + r"""The registered name of the activity being executed.""" + + attempt: int + r"""The final attempt number that failed (1-indexed).""" + + failure: Failure + r"""Represents an error or exception that occurred during execution.""" diff --git a/src/mistralai/client/models/activitytaskfailedrequest.py b/src/mistralai/client/models/activitytaskfailedrequest.py new file mode 100644 index 00000000..1d1e9226 --- /dev/null +++ b/src/mistralai/client/models/activitytaskfailedrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1d4b5b52ae29 + +from __future__ import annotations +from .activitytaskfailedattributes import ( + ActivityTaskFailedAttributes, + ActivityTaskFailedAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ActivityTaskFailedRequestTypedDict(TypedDict): + r"""Emitted when an activity task fails after exhausting all retry attempts. + + This is a terminal event indicating the activity could not complete successfully. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskFailedAttributesTypedDict + r"""Attributes for activity task failed events (final failure after all retries).""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["ACTIVITY_TASK_FAILED"] + r"""Event type discriminator.""" + + +class ActivityTaskFailedRequest(BaseModel): + r"""Emitted when an activity task fails after exhausting all retry attempts. + + This is a terminal event indicating the activity could not complete successfully. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskFailedAttributes + r"""Attributes for activity task failed events (final failure after all retries).""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_FAILED"]], + AfterValidator(validate_const("ACTIVITY_TASK_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskFailedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/activitytaskfailedresponse.py b/src/mistralai/client/models/activitytaskfailedresponse.py new file mode 100644 index 00000000..3410ea84 --- /dev/null +++ b/src/mistralai/client/models/activitytaskfailedresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b739e8fc9b44 + +from __future__ import annotations +from .activitytaskfailedattributes import ( + ActivityTaskFailedAttributes, + ActivityTaskFailedAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ActivityTaskFailedResponseTypedDict(TypedDict): + r"""Emitted when an activity task fails after exhausting all retry attempts. + + This is a terminal event indicating the activity could not complete successfully. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskFailedAttributesTypedDict + r"""Attributes for activity task failed events (final failure after all retries).""" + event_type: Literal["ACTIVITY_TASK_FAILED"] + r"""Event type discriminator.""" + + +class ActivityTaskFailedResponse(BaseModel): + r"""Emitted when an activity task fails after exhausting all retry attempts. + + This is a terminal event indicating the activity could not complete successfully. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskFailedAttributes + r"""Attributes for activity task failed events (final failure after all retries).""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_FAILED"]], + AfterValidator(validate_const("ACTIVITY_TASK_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskFailedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/activitytaskretryingattributes.py b/src/mistralai/client/models/activitytaskretryingattributes.py new file mode 100644 index 00000000..b0ee11d8 --- /dev/null +++ b/src/mistralai/client/models/activitytaskretryingattributes.py @@ -0,0 +1,36 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9aaa9eecac09 + +from __future__ import annotations +from .failure import Failure, FailureTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ActivityTaskRetryingAttributesTypedDict(TypedDict): + r"""Attributes for activity task retrying events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + activity_name: str + r"""The registered name of the activity being executed.""" + attempt: int + r"""The attempt number that failed (1-indexed).""" + failure: FailureTypedDict + r"""Represents an error or exception that occurred during execution.""" + + +class ActivityTaskRetryingAttributes(BaseModel): + r"""Attributes for activity task retrying events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + + activity_name: str + r"""The registered name of the activity being executed.""" + + attempt: int + r"""The attempt number that failed (1-indexed).""" + + failure: Failure + r"""Represents an error or exception that occurred during execution.""" diff --git a/src/mistralai/client/models/activitytaskretryingrequest.py b/src/mistralai/client/models/activitytaskretryingrequest.py new file mode 100644 index 00000000..8c4d84f9 --- /dev/null +++ b/src/mistralai/client/models/activitytaskretryingrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6f2e394e1e75 + +from __future__ import annotations +from .activitytaskretryingattributes import ( + ActivityTaskRetryingAttributes, + ActivityTaskRetryingAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ActivityTaskRetryingRequestTypedDict(TypedDict): + r"""Emitted when an activity task fails and will be retried. + + Contains information about the failed attempt and the error that occurred. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskRetryingAttributesTypedDict + r"""Attributes for activity task retrying events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["ACTIVITY_TASK_RETRYING"] + r"""Event type discriminator.""" + + +class ActivityTaskRetryingRequest(BaseModel): + r"""Emitted when an activity task fails and will be retried. + + Contains information about the failed attempt and the error that occurred. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskRetryingAttributes + r"""Attributes for activity task retrying events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_RETRYING"]], + AfterValidator(validate_const("ACTIVITY_TASK_RETRYING")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_RETRYING" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskRetryingRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/activitytaskretryingresponse.py b/src/mistralai/client/models/activitytaskretryingresponse.py new file mode 100644 index 00000000..cf054a27 --- /dev/null +++ b/src/mistralai/client/models/activitytaskretryingresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3a4ff1e01fa1 + +from __future__ import annotations +from .activitytaskretryingattributes import ( + ActivityTaskRetryingAttributes, + ActivityTaskRetryingAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ActivityTaskRetryingResponseTypedDict(TypedDict): + r"""Emitted when an activity task fails and will be retried. + + Contains information about the failed attempt and the error that occurred. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskRetryingAttributesTypedDict + r"""Attributes for activity task retrying events.""" + event_type: Literal["ACTIVITY_TASK_RETRYING"] + r"""Event type discriminator.""" + + +class ActivityTaskRetryingResponse(BaseModel): + r"""Emitted when an activity task fails and will be retried. + + Contains information about the failed attempt and the error that occurred. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskRetryingAttributes + r"""Attributes for activity task retrying events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_RETRYING"]], + AfterValidator(validate_const("ACTIVITY_TASK_RETRYING")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_RETRYING" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskRetryingResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/activitytaskstartedattributesrequest.py b/src/mistralai/client/models/activitytaskstartedattributesrequest.py new file mode 100644 index 00000000..dfa3fa04 --- /dev/null +++ b/src/mistralai/client/models/activitytaskstartedattributesrequest.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 51b3e5622e0b + +from __future__ import annotations +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ActivityTaskStartedAttributesRequestTypedDict(TypedDict): + r"""Attributes for activity task started events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + activity_name: str + r"""The registered name of the activity being executed.""" + input: JSONPayloadRequestTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class ActivityTaskStartedAttributesRequest(BaseModel): + r"""Attributes for activity task started events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + + activity_name: str + r"""The registered name of the activity being executed.""" + + input: JSONPayloadRequest + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/activitytaskstartedattributesresponse.py b/src/mistralai/client/models/activitytaskstartedattributesresponse.py new file mode 100644 index 00000000..100626d4 --- /dev/null +++ b/src/mistralai/client/models/activitytaskstartedattributesresponse.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3a365e2c2942 + +from __future__ import annotations +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ActivityTaskStartedAttributesResponseTypedDict(TypedDict): + r"""Attributes for activity task started events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + activity_name: str + r"""The registered name of the activity being executed.""" + input: JSONPayloadResponseTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class ActivityTaskStartedAttributesResponse(BaseModel): + r"""Attributes for activity task started events.""" + + task_id: str + r"""Unique identifier for the activity task within the workflow.""" + + activity_name: str + r"""The registered name of the activity being executed.""" + + input: JSONPayloadResponse + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/activitytaskstartedrequest.py b/src/mistralai/client/models/activitytaskstartedrequest.py new file mode 100644 index 00000000..503b3998 --- /dev/null +++ b/src/mistralai/client/models/activitytaskstartedrequest.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: aa5813a6903a + +from __future__ import annotations +from .activitytaskstartedattributesrequest import ( + ActivityTaskStartedAttributesRequest, + ActivityTaskStartedAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ActivityTaskStartedRequestTypedDict(TypedDict): + r"""Emitted when an activity task begins execution. + + This is the first event for an activity, emitted on the first attempt only. + Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskStartedAttributesRequestTypedDict + r"""Attributes for activity task started events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["ACTIVITY_TASK_STARTED"] + r"""Event type discriminator.""" + + +class ActivityTaskStartedRequest(BaseModel): + r"""Emitted when an activity task begins execution. + + This is the first event for an activity, emitted on the first attempt only. + Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskStartedAttributesRequest + r"""Attributes for activity task started events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_STARTED"]], + AfterValidator(validate_const("ACTIVITY_TASK_STARTED")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_STARTED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskStartedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/activitytaskstartedresponse.py b/src/mistralai/client/models/activitytaskstartedresponse.py new file mode 100644 index 00000000..75186e02 --- /dev/null +++ b/src/mistralai/client/models/activitytaskstartedresponse.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d01ef9cb3955 + +from __future__ import annotations +from .activitytaskstartedattributesresponse import ( + ActivityTaskStartedAttributesResponse, + ActivityTaskStartedAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class ActivityTaskStartedResponseTypedDict(TypedDict): + r"""Emitted when an activity task begins execution. + + This is the first event for an activity, emitted on the first attempt only. + Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: ActivityTaskStartedAttributesResponseTypedDict + r"""Attributes for activity task started events.""" + event_type: Literal["ACTIVITY_TASK_STARTED"] + r"""Event type discriminator.""" + + +class ActivityTaskStartedResponse(BaseModel): + r"""Emitted when an activity task begins execution. + + This is the first event for an activity, emitted on the first attempt only. + Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: ActivityTaskStartedAttributesResponse + r"""Attributes for activity task started events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["ACTIVITY_TASK_STARTED"]], + AfterValidator(validate_const("ACTIVITY_TASK_STARTED")), + ], + pydantic.Field(alias="event_type"), + ] = "ACTIVITY_TASK_STARTED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ActivityTaskStartedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/archive_workflow_v1_workflows_workflow_identifier_archive_putop.py b/src/mistralai/client/models/archive_workflow_v1_workflows_workflow_identifier_archive_putop.py new file mode 100644 index 00000000..8582aaf5 --- /dev/null +++ b/src/mistralai/client/models/archive_workflow_v1_workflows_workflow_identifier_archive_putop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0be575ead94b + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequestTypedDict(TypedDict): + workflow_identifier: str + + +class ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest(BaseModel): + workflow_identifier: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index b57ff2ca..acf9cf8d 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -15,7 +15,7 @@ from typing_extensions import NotRequired, TypedDict -TypeEnum = Union[ +BaseFieldDefinitionType = Union[ Literal[ "ENUM", "TEXT", @@ -58,7 +58,7 @@ class BaseFieldDefinitionTypedDict(TypedDict): name: str label: str - type: TypeEnum + type: BaseFieldDefinitionType supported_operators: List[SupportedOperator] group: NotRequired[Nullable[str]] @@ -68,7 +68,7 @@ class BaseFieldDefinition(BaseModel): label: str - type: TypeEnum + type: BaseFieldDefinitionType supported_operators: List[SupportedOperator] diff --git a/src/mistralai/client/models/batchexecutionbody.py b/src/mistralai/client/models/batchexecutionbody.py new file mode 100644 index 00000000..7d9895e5 --- /dev/null +++ b/src/mistralai/client/models/batchexecutionbody.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6cfbee9c4ec7 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class BatchExecutionBodyTypedDict(TypedDict): + execution_ids: List[str] + r"""List of execution IDs to process""" + + +class BatchExecutionBody(BaseModel): + execution_ids: List[str] + r"""List of execution IDs to process""" diff --git a/src/mistralai/client/models/batchexecutionresponse.py b/src/mistralai/client/models/batchexecutionresponse.py new file mode 100644 index 00000000..a0c1f06e --- /dev/null +++ b/src/mistralai/client/models/batchexecutionresponse.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 37e6d5d616fe + +from __future__ import annotations +from .batchexecutionresult import BatchExecutionResult, BatchExecutionResultTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class BatchExecutionResponseTypedDict(TypedDict): + results: NotRequired[Dict[str, BatchExecutionResultTypedDict]] + r"""Mapping of execution_id to result with status and optional error message""" + + +class BatchExecutionResponse(BaseModel): + results: Optional[Dict[str, BatchExecutionResult]] = None + r"""Mapping of execution_id to result with status and optional error message""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["results"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/batchexecutionresult.py b/src/mistralai/client/models/batchexecutionresult.py new file mode 100644 index 00000000..ebe41e01 --- /dev/null +++ b/src/mistralai/client/models/batchexecutionresult.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ca6840204f22 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class BatchExecutionResultTypedDict(TypedDict): + status: str + r"""Status of the operation (success/failure)""" + error: NotRequired[Nullable[str]] + r"""Error message if operation failed""" + + +class BatchExecutionResult(BaseModel): + status: str + r"""Status of the operation (success/failure)""" + + error: OptionalNullable[str] = UNSET + r"""Error message if operation failed""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["error"]) + nullable_fields = set(["error"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop.py b/src/mistralai/client/models/cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop.py new file mode 100644 index 00000000..8ba7176c --- /dev/null +++ b/src/mistralai/client/models/cancel_workflow_execution_v1_workflows_executions_execution_id_cancel_postop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e26fc5a228af + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequestTypedDict( + TypedDict +): + execution_id: str + + +class CancelWorkflowExecutionV1WorkflowsExecutionsExecutionIDCancelPostRequest( + BaseModel +): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/classifierfinetunedmodel.py b/src/mistralai/client/models/classifierfinetunedmodel.py index 7c2bfc80..35d557aa 100644 --- a/src/mistralai/client/models/classifierfinetunedmodel.py +++ b/src/mistralai/client/models/classifierfinetunedmodel.py @@ -34,13 +34,13 @@ class ClassifierFineTunedModelTypedDict(TypedDict): root_version: str archived: bool capabilities: FineTunedModelCapabilitiesTypedDict - job: str classifier_targets: List[ClassifierTargetResultTypedDict] object: Literal["model"] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] max_context_length: NotRequired[int] aliases: NotRequired[List[str]] + job: NotRequired[Nullable[str]] model_type: Literal["classifier"] @@ -61,8 +61,6 @@ class ClassifierFineTunedModel(BaseModel): capabilities: FineTunedModelCapabilities - job: str - classifier_targets: List[ClassifierTargetResult] object: Annotated[ @@ -78,6 +76,8 @@ class ClassifierFineTunedModel(BaseModel): aliases: Optional[List[str]] = None + job: OptionalNullable[str] = UNSET + model_type: Annotated[ Annotated[Literal["classifier"], AfterValidator(validate_const("classifier"))], pydantic.Field(alias="model_type"), @@ -86,9 +86,9 @@ class ClassifierFineTunedModel(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["object", "name", "description", "max_context_length", "aliases"] + ["object", "name", "description", "max_context_length", "aliases", "job"] ) - nullable_fields = set(["name", "description"]) + nullable_fields = set(["name", "description", "job"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/completionfinetunedmodel.py b/src/mistralai/client/models/completionfinetunedmodel.py index e75b8d2f..9b420ed7 100644 --- a/src/mistralai/client/models/completionfinetunedmodel.py +++ b/src/mistralai/client/models/completionfinetunedmodel.py @@ -30,12 +30,12 @@ class CompletionFineTunedModelTypedDict(TypedDict): root_version: str archived: bool capabilities: FineTunedModelCapabilitiesTypedDict - job: str object: Literal["model"] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] max_context_length: NotRequired[int] aliases: NotRequired[List[str]] + job: NotRequired[Nullable[str]] model_type: Literal["completion"] @@ -56,8 +56,6 @@ class CompletionFineTunedModel(BaseModel): capabilities: FineTunedModelCapabilities - job: str - object: Annotated[ Annotated[Optional[Literal["model"]], AfterValidator(validate_const("model"))], pydantic.Field(alias="object"), @@ -71,6 +69,8 @@ class CompletionFineTunedModel(BaseModel): aliases: Optional[List[str]] = None + job: OptionalNullable[str] = UNSET + model_type: Annotated[ Annotated[Literal["completion"], AfterValidator(validate_const("completion"))], pydantic.Field(alias="model_type"), @@ -79,9 +79,9 @@ class CompletionFineTunedModel(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["object", "name", "description", "max_context_length", "aliases"] + ["object", "name", "description", "max_context_length", "aliases", "job"] ) - nullable_fields = set(["name", "description"]) + nullable_fields = set(["name", "description", "job"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector_call_tool_v1op.py b/src/mistralai/client/models/connector_call_tool_v1op.py index df5783d0..9c77123e 100644 --- a/src/mistralai/client/models/connector_call_tool_v1op.py +++ b/src/mistralai/client/models/connector_call_tool_v1op.py @@ -6,15 +6,28 @@ ConnectorCallToolRequest, ConnectorCallToolRequestTypedDict, ) -from mistralai.client.types import BaseModel -from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata -from typing_extensions import Annotated, TypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import ( + FieldMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict class ConnectorCallToolV1RequestTypedDict(TypedDict): tool_name: str connector_id_or_name: str connector_call_tool_request: ConnectorCallToolRequestTypedDict + credentials_name: NotRequired[Nullable[str]] class ConnectorCallToolV1Request(BaseModel): @@ -30,3 +43,33 @@ class ConnectorCallToolV1Request(BaseModel): ConnectorCallToolRequest, FieldMetadata(request=RequestMetadata(media_type="application/json")), ] + + credentials_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["credentials_name"]) + nullable_fields = set(["credentials_name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_list_tools_v1op.py b/src/mistralai/client/models/connector_list_tools_v1op.py index eb5de321..030ffb2c 100644 --- a/src/mistralai/client/models/connector_list_tools_v1op.py +++ b/src/mistralai/client/models/connector_list_tools_v1op.py @@ -63,26 +63,15 @@ def serialize_model(self, handler): return m -ResponseConnectorListToolsV11TypedDict = TypeAliasType( - "ResponseConnectorListToolsV11TypedDict", - Union[MCPToolTypedDict, ConnectorToolTypedDict], -) - - -ResponseConnectorListToolsV11 = TypeAliasType( - "ResponseConnectorListToolsV11", Union[MCPTool, ConnectorTool] -) - - -ResponseConnectorListToolsV12TypedDict = TypeAliasType( - "ResponseConnectorListToolsV12TypedDict", - Union[List[ResponseConnectorListToolsV11TypedDict], List[Dict[str, Any]]], +ResponseConnectorListToolsV1TypedDict = TypeAliasType( + "ResponseConnectorListToolsV1TypedDict", + Union[List[ConnectorToolTypedDict], List[MCPToolTypedDict], List[Dict[str, Any]]], ) r"""Successful Response""" -ResponseConnectorListToolsV12 = TypeAliasType( - "ResponseConnectorListToolsV12", - Union[List[ResponseConnectorListToolsV11], List[Dict[str, Any]]], +ResponseConnectorListToolsV1 = TypeAliasType( + "ResponseConnectorListToolsV1", + Union[List[ConnectorTool], List[MCPTool], List[Dict[str, Any]]], ) r"""Successful Response""" diff --git a/src/mistralai/client/models/customtaskcanceledattributes.py b/src/mistralai/client/models/customtaskcanceledattributes.py new file mode 100644 index 00000000..cea2137e --- /dev/null +++ b/src/mistralai/client/models/customtaskcanceledattributes.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c20b8be67b8c + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class CustomTaskCanceledAttributesTypedDict(TypedDict): + r"""Attributes for custom task canceled events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + reason: NotRequired[Nullable[str]] + r"""Optional reason provided for the cancellation.""" + + +class CustomTaskCanceledAttributes(BaseModel): + r"""Attributes for custom task canceled events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + reason: OptionalNullable[str] = UNSET + r"""Optional reason provided for the cancellation.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["reason"]) + nullable_fields = set(["reason"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/customtaskcanceledrequest.py b/src/mistralai/client/models/customtaskcanceledrequest.py new file mode 100644 index 00000000..0cb82aea --- /dev/null +++ b/src/mistralai/client/models/customtaskcanceledrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4b4f6b8c8ffd + +from __future__ import annotations +from .customtaskcanceledattributes import ( + CustomTaskCanceledAttributes, + CustomTaskCanceledAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomTaskCanceledRequestTypedDict(TypedDict): + r"""Emitted when a custom task is canceled. + + Indicates the task was explicitly stopped before completion. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskCanceledAttributesTypedDict + r"""Attributes for custom task canceled events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["CUSTOM_TASK_CANCELED"] + r"""Event type discriminator.""" + + +class CustomTaskCanceledRequest(BaseModel): + r"""Emitted when a custom task is canceled. + + Indicates the task was explicitly stopped before completion. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskCanceledAttributes + r"""Attributes for custom task canceled events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_CANCELED"]], + AfterValidator(validate_const("CUSTOM_TASK_CANCELED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_CANCELED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskCanceledRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskcanceledresponse.py b/src/mistralai/client/models/customtaskcanceledresponse.py new file mode 100644 index 00000000..7873b3ca --- /dev/null +++ b/src/mistralai/client/models/customtaskcanceledresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0eeb9d6cf409 + +from __future__ import annotations +from .customtaskcanceledattributes import ( + CustomTaskCanceledAttributes, + CustomTaskCanceledAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CustomTaskCanceledResponseTypedDict(TypedDict): + r"""Emitted when a custom task is canceled. + + Indicates the task was explicitly stopped before completion. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskCanceledAttributesTypedDict + r"""Attributes for custom task canceled events.""" + event_type: Literal["CUSTOM_TASK_CANCELED"] + r"""Event type discriminator.""" + + +class CustomTaskCanceledResponse(BaseModel): + r"""Emitted when a custom task is canceled. + + Indicates the task was explicitly stopped before completion. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskCanceledAttributes + r"""Attributes for custom task canceled events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_CANCELED"]], + AfterValidator(validate_const("CUSTOM_TASK_CANCELED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_CANCELED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskCanceledResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskcompletedattributesrequest.py b/src/mistralai/client/models/customtaskcompletedattributesrequest.py new file mode 100644 index 00000000..5e344a32 --- /dev/null +++ b/src/mistralai/client/models/customtaskcompletedattributesrequest.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9ec058aedb96 + +from __future__ import annotations +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CustomTaskCompletedAttributesRequestTypedDict(TypedDict): + r"""Attributes for custom task completed events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + payload: JSONPayloadRequestTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class CustomTaskCompletedAttributesRequest(BaseModel): + r"""Attributes for custom task completed events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + payload: JSONPayloadRequest + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/customtaskcompletedattributesresponse.py b/src/mistralai/client/models/customtaskcompletedattributesresponse.py new file mode 100644 index 00000000..8b28d105 --- /dev/null +++ b/src/mistralai/client/models/customtaskcompletedattributesresponse.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0b9fb891f354 + +from __future__ import annotations +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CustomTaskCompletedAttributesResponseTypedDict(TypedDict): + r"""Attributes for custom task completed events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + payload: JSONPayloadResponseTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class CustomTaskCompletedAttributesResponse(BaseModel): + r"""Attributes for custom task completed events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + payload: JSONPayloadResponse + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/customtaskcompletedrequest.py b/src/mistralai/client/models/customtaskcompletedrequest.py new file mode 100644 index 00000000..eee10e8e --- /dev/null +++ b/src/mistralai/client/models/customtaskcompletedrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ca7326e72707 + +from __future__ import annotations +from .customtaskcompletedattributesrequest import ( + CustomTaskCompletedAttributesRequest, + CustomTaskCompletedAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomTaskCompletedRequestTypedDict(TypedDict): + r"""Emitted when a custom task completes successfully. + + Contains the final result of the task execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskCompletedAttributesRequestTypedDict + r"""Attributes for custom task completed events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["CUSTOM_TASK_COMPLETED"] + r"""Event type discriminator.""" + + +class CustomTaskCompletedRequest(BaseModel): + r"""Emitted when a custom task completes successfully. + + Contains the final result of the task execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskCompletedAttributesRequest + r"""Attributes for custom task completed events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_COMPLETED"]], + AfterValidator(validate_const("CUSTOM_TASK_COMPLETED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_COMPLETED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskCompletedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskcompletedresponse.py b/src/mistralai/client/models/customtaskcompletedresponse.py new file mode 100644 index 00000000..5d2a8686 --- /dev/null +++ b/src/mistralai/client/models/customtaskcompletedresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 719b68571f4c + +from __future__ import annotations +from .customtaskcompletedattributesresponse import ( + CustomTaskCompletedAttributesResponse, + CustomTaskCompletedAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CustomTaskCompletedResponseTypedDict(TypedDict): + r"""Emitted when a custom task completes successfully. + + Contains the final result of the task execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskCompletedAttributesResponseTypedDict + r"""Attributes for custom task completed events.""" + event_type: Literal["CUSTOM_TASK_COMPLETED"] + r"""Event type discriminator.""" + + +class CustomTaskCompletedResponse(BaseModel): + r"""Emitted when a custom task completes successfully. + + Contains the final result of the task execution. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskCompletedAttributesResponse + r"""Attributes for custom task completed events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_COMPLETED"]], + AfterValidator(validate_const("CUSTOM_TASK_COMPLETED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_COMPLETED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskCompletedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskfailedattributes.py b/src/mistralai/client/models/customtaskfailedattributes.py new file mode 100644 index 00000000..b66d7d3c --- /dev/null +++ b/src/mistralai/client/models/customtaskfailedattributes.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ff33698df363 + +from __future__ import annotations +from .failure import Failure, FailureTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CustomTaskFailedAttributesTypedDict(TypedDict): + r"""Attributes for custom task failed events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + failure: FailureTypedDict + r"""Represents an error or exception that occurred during execution.""" + + +class CustomTaskFailedAttributes(BaseModel): + r"""Attributes for custom task failed events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + failure: Failure + r"""Represents an error or exception that occurred during execution.""" diff --git a/src/mistralai/client/models/customtaskfailedrequest.py b/src/mistralai/client/models/customtaskfailedrequest.py new file mode 100644 index 00000000..abf2d74f --- /dev/null +++ b/src/mistralai/client/models/customtaskfailedrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 844b7e2b33de + +from __future__ import annotations +from .customtaskfailedattributes import ( + CustomTaskFailedAttributes, + CustomTaskFailedAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomTaskFailedRequestTypedDict(TypedDict): + r"""Emitted when a custom task fails. + + Contains details about the failure for debugging and error handling. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskFailedAttributesTypedDict + r"""Attributes for custom task failed events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["CUSTOM_TASK_FAILED"] + r"""Event type discriminator.""" + + +class CustomTaskFailedRequest(BaseModel): + r"""Emitted when a custom task fails. + + Contains details about the failure for debugging and error handling. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskFailedAttributes + r"""Attributes for custom task failed events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_FAILED"]], + AfterValidator(validate_const("CUSTOM_TASK_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskFailedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskfailedresponse.py b/src/mistralai/client/models/customtaskfailedresponse.py new file mode 100644 index 00000000..1f9835ec --- /dev/null +++ b/src/mistralai/client/models/customtaskfailedresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1cde7920833f + +from __future__ import annotations +from .customtaskfailedattributes import ( + CustomTaskFailedAttributes, + CustomTaskFailedAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CustomTaskFailedResponseTypedDict(TypedDict): + r"""Emitted when a custom task fails. + + Contains details about the failure for debugging and error handling. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskFailedAttributesTypedDict + r"""Attributes for custom task failed events.""" + event_type: Literal["CUSTOM_TASK_FAILED"] + r"""Event type discriminator.""" + + +class CustomTaskFailedResponse(BaseModel): + r"""Emitted when a custom task fails. + + Contains details about the failure for debugging and error handling. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskFailedAttributes + r"""Attributes for custom task failed events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_FAILED"]], + AfterValidator(validate_const("CUSTOM_TASK_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskFailedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskinprogressattributesrequest.py b/src/mistralai/client/models/customtaskinprogressattributesrequest.py new file mode 100644 index 00000000..5737a4e1 --- /dev/null +++ b/src/mistralai/client/models/customtaskinprogressattributesrequest.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d003c9954634 + +from __future__ import annotations +from .jsonpatchpayloadrequest import ( + JSONPatchPayloadRequest, + JSONPatchPayloadRequestTypedDict, +) +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import get_discriminator +from pydantic import Discriminator, Tag +from typing import Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +CustomTaskInProgressAttributesRequestPayloadTypedDict = TypeAliasType( + "CustomTaskInProgressAttributesRequestPayloadTypedDict", + Union[JSONPayloadRequestTypedDict, JSONPatchPayloadRequestTypedDict], +) +r"""The current state or incremental update for the task.""" + + +CustomTaskInProgressAttributesRequestPayload = Annotated[ + Union[ + Annotated[JSONPayloadRequest, Tag("json")], + Annotated[JSONPatchPayloadRequest, Tag("json_patch")], + ], + Discriminator(lambda m: get_discriminator(m, "type", "type")), +] +r"""The current state or incremental update for the task.""" + + +class CustomTaskInProgressAttributesRequestTypedDict(TypedDict): + r"""Attributes for custom task in-progress events with streaming updates.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + payload: CustomTaskInProgressAttributesRequestPayloadTypedDict + r"""The current state or incremental update for the task.""" + + +class CustomTaskInProgressAttributesRequest(BaseModel): + r"""Attributes for custom task in-progress events with streaming updates.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + payload: CustomTaskInProgressAttributesRequestPayload + r"""The current state or incremental update for the task.""" diff --git a/src/mistralai/client/models/customtaskinprogressattributesresponse.py b/src/mistralai/client/models/customtaskinprogressattributesresponse.py new file mode 100644 index 00000000..9b5fd20a --- /dev/null +++ b/src/mistralai/client/models/customtaskinprogressattributesresponse.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 895147a1a6a8 + +from __future__ import annotations +from .jsonpatchpayloadresponse import ( + JSONPatchPayloadResponse, + JSONPatchPayloadResponseTypedDict, +) +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from functools import partial +from mistralai.client.types import BaseModel +from mistralai.client.utils.unions import parse_open_union +from pydantic import ConfigDict +from pydantic.functional_validators import BeforeValidator +from typing import Any, Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +CustomTaskInProgressAttributesResponsePayloadTypedDict = TypeAliasType( + "CustomTaskInProgressAttributesResponsePayloadTypedDict", + Union[JSONPayloadResponseTypedDict, JSONPatchPayloadResponseTypedDict], +) +r"""The current state or incremental update for the task.""" + + +class UnknownCustomTaskInProgressAttributesResponsePayload(BaseModel): + r"""A CustomTaskInProgressAttributesResponsePayload variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_CUSTOM_TASK_IN_PROGRESS_ATTRIBUTES_RESPONSE_PAYLOAD_VARIANTS: dict[str, Any] = { + "json": JSONPayloadResponse, + "json_patch": JSONPatchPayloadResponse, +} + + +CustomTaskInProgressAttributesResponsePayload = Annotated[ + Union[ + JSONPayloadResponse, + JSONPatchPayloadResponse, + UnknownCustomTaskInProgressAttributesResponsePayload, + ], + BeforeValidator( + partial( + parse_open_union, + disc_key="type", + variants=_CUSTOM_TASK_IN_PROGRESS_ATTRIBUTES_RESPONSE_PAYLOAD_VARIANTS, + unknown_cls=UnknownCustomTaskInProgressAttributesResponsePayload, + union_name="CustomTaskInProgressAttributesResponsePayload", + ) + ), +] +r"""The current state or incremental update for the task.""" + + +class CustomTaskInProgressAttributesResponseTypedDict(TypedDict): + r"""Attributes for custom task in-progress events with streaming updates.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + payload: CustomTaskInProgressAttributesResponsePayloadTypedDict + r"""The current state or incremental update for the task.""" + + +class CustomTaskInProgressAttributesResponse(BaseModel): + r"""Attributes for custom task in-progress events with streaming updates.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + payload: CustomTaskInProgressAttributesResponsePayload + r"""The current state or incremental update for the task.""" diff --git a/src/mistralai/client/models/customtaskinprogressrequest.py b/src/mistralai/client/models/customtaskinprogressrequest.py new file mode 100644 index 00000000..c2c2faab --- /dev/null +++ b/src/mistralai/client/models/customtaskinprogressrequest.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d62648fe4f1e + +from __future__ import annotations +from .customtaskinprogressattributesrequest import ( + CustomTaskInProgressAttributesRequest, + CustomTaskInProgressAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomTaskInProgressRequestTypedDict(TypedDict): + r"""Emitted during custom task execution to report progress. + + This event supports streaming updates via JSON or JSON Patch payloads, + enabling real-time progress tracking for long-running tasks. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskInProgressAttributesRequestTypedDict + r"""Attributes for custom task in-progress events with streaming updates.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["CUSTOM_TASK_IN_PROGRESS"] + r"""Event type discriminator.""" + + +class CustomTaskInProgressRequest(BaseModel): + r"""Emitted during custom task execution to report progress. + + This event supports streaming updates via JSON or JSON Patch payloads, + enabling real-time progress tracking for long-running tasks. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskInProgressAttributesRequest + r"""Attributes for custom task in-progress events with streaming updates.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_IN_PROGRESS"]], + AfterValidator(validate_const("CUSTOM_TASK_IN_PROGRESS")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_IN_PROGRESS" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskInProgressRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskinprogressresponse.py b/src/mistralai/client/models/customtaskinprogressresponse.py new file mode 100644 index 00000000..33c126f7 --- /dev/null +++ b/src/mistralai/client/models/customtaskinprogressresponse.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9d012ecb7626 + +from __future__ import annotations +from .customtaskinprogressattributesresponse import ( + CustomTaskInProgressAttributesResponse, + CustomTaskInProgressAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CustomTaskInProgressResponseTypedDict(TypedDict): + r"""Emitted during custom task execution to report progress. + + This event supports streaming updates via JSON or JSON Patch payloads, + enabling real-time progress tracking for long-running tasks. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskInProgressAttributesResponseTypedDict + r"""Attributes for custom task in-progress events with streaming updates.""" + event_type: Literal["CUSTOM_TASK_IN_PROGRESS"] + r"""Event type discriminator.""" + + +class CustomTaskInProgressResponse(BaseModel): + r"""Emitted during custom task execution to report progress. + + This event supports streaming updates via JSON or JSON Patch payloads, + enabling real-time progress tracking for long-running tasks. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskInProgressAttributesResponse + r"""Attributes for custom task in-progress events with streaming updates.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_IN_PROGRESS"]], + AfterValidator(validate_const("CUSTOM_TASK_IN_PROGRESS")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_IN_PROGRESS" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskInProgressResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskstartedattributesrequest.py b/src/mistralai/client/models/customtaskstartedattributesrequest.py new file mode 100644 index 00000000..db1ecbb6 --- /dev/null +++ b/src/mistralai/client/models/customtaskstartedattributesrequest.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 23ea4ebe9e0b + +from __future__ import annotations +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomTaskStartedAttributesRequestTypedDict(TypedDict): + r"""Attributes for custom task started events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + payload: NotRequired[JSONPayloadRequestTypedDict] + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class CustomTaskStartedAttributesRequest(BaseModel): + r"""Attributes for custom task started events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + payload: Optional[JSONPayloadRequest] = None + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["payload"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/customtaskstartedattributesresponse.py b/src/mistralai/client/models/customtaskstartedattributesresponse.py new file mode 100644 index 00000000..71bed58f --- /dev/null +++ b/src/mistralai/client/models/customtaskstartedattributesresponse.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6b8946c77018 + +from __future__ import annotations +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomTaskStartedAttributesResponseTypedDict(TypedDict): + r"""Attributes for custom task started events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + payload: NotRequired[JSONPayloadResponseTypedDict] + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class CustomTaskStartedAttributesResponse(BaseModel): + r"""Attributes for custom task started events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + payload: Optional[JSONPayloadResponse] = None + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["payload"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/customtaskstartedrequest.py b/src/mistralai/client/models/customtaskstartedrequest.py new file mode 100644 index 00000000..c4bb6c2a --- /dev/null +++ b/src/mistralai/client/models/customtaskstartedrequest.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 39792cc12bde + +from __future__ import annotations +from .customtaskstartedattributesrequest import ( + CustomTaskStartedAttributesRequest, + CustomTaskStartedAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomTaskStartedRequestTypedDict(TypedDict): + r"""Emitted when a custom task begins execution. + + Custom tasks represent user-defined units of work within a workflow, + such as LLM calls, API requests, or data processing steps. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskStartedAttributesRequestTypedDict + r"""Attributes for custom task started events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["CUSTOM_TASK_STARTED"] + r"""Event type discriminator.""" + + +class CustomTaskStartedRequest(BaseModel): + r"""Emitted when a custom task begins execution. + + Custom tasks represent user-defined units of work within a workflow, + such as LLM calls, API requests, or data processing steps. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskStartedAttributesRequest + r"""Attributes for custom task started events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_STARTED"]], + AfterValidator(validate_const("CUSTOM_TASK_STARTED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_STARTED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskStartedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtaskstartedresponse.py b/src/mistralai/client/models/customtaskstartedresponse.py new file mode 100644 index 00000000..59d11fa8 --- /dev/null +++ b/src/mistralai/client/models/customtaskstartedresponse.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 02b330a5292e + +from __future__ import annotations +from .customtaskstartedattributesresponse import ( + CustomTaskStartedAttributesResponse, + CustomTaskStartedAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CustomTaskStartedResponseTypedDict(TypedDict): + r"""Emitted when a custom task begins execution. + + Custom tasks represent user-defined units of work within a workflow, + such as LLM calls, API requests, or data processing steps. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskStartedAttributesResponseTypedDict + r"""Attributes for custom task started events.""" + event_type: Literal["CUSTOM_TASK_STARTED"] + r"""Event type discriminator.""" + + +class CustomTaskStartedResponse(BaseModel): + r"""Emitted when a custom task begins execution. + + Custom tasks represent user-defined units of work within a workflow, + such as LLM calls, API requests, or data processing steps. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskStartedAttributesResponse + r"""Attributes for custom task started events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_STARTED"]], + AfterValidator(validate_const("CUSTOM_TASK_STARTED")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_STARTED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskStartedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtasktimedoutattributes.py b/src/mistralai/client/models/customtasktimedoutattributes.py new file mode 100644 index 00000000..47517ab1 --- /dev/null +++ b/src/mistralai/client/models/customtasktimedoutattributes.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9cc865098add + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class CustomTaskTimedOutAttributesTypedDict(TypedDict): + r"""Attributes for custom task timed out events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + timeout_type: NotRequired[Nullable[str]] + r"""The type of timeout that occurred.""" + + +class CustomTaskTimedOutAttributes(BaseModel): + r"""Attributes for custom task timed out events.""" + + custom_task_id: str + r"""Unique identifier for the custom task within the workflow.""" + + custom_task_type: str + r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" + + timeout_type: OptionalNullable[str] = UNSET + r"""The type of timeout that occurred.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["timeout_type"]) + nullable_fields = set(["timeout_type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/customtasktimedoutrequest.py b/src/mistralai/client/models/customtasktimedoutrequest.py new file mode 100644 index 00000000..def540f4 --- /dev/null +++ b/src/mistralai/client/models/customtasktimedoutrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 75499a6e7c0e + +from __future__ import annotations +from .customtasktimedoutattributes import ( + CustomTaskTimedOutAttributes, + CustomTaskTimedOutAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CustomTaskTimedOutRequestTypedDict(TypedDict): + r"""Emitted when a custom task exceeds its timeout. + + Indicates the task did not complete within its configured time limit. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskTimedOutAttributesTypedDict + r"""Attributes for custom task timed out events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["CUSTOM_TASK_TIMED_OUT"] + r"""Event type discriminator.""" + + +class CustomTaskTimedOutRequest(BaseModel): + r"""Emitted when a custom task exceeds its timeout. + + Indicates the task did not complete within its configured time limit. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskTimedOutAttributes + r"""Attributes for custom task timed out events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_TIMED_OUT"]], + AfterValidator(validate_const("CUSTOM_TASK_TIMED_OUT")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_TIMED_OUT" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskTimedOutRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/customtasktimedoutresponse.py b/src/mistralai/client/models/customtasktimedoutresponse.py new file mode 100644 index 00000000..7f274a53 --- /dev/null +++ b/src/mistralai/client/models/customtasktimedoutresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2dbbc78b85d1 + +from __future__ import annotations +from .customtasktimedoutattributes import ( + CustomTaskTimedOutAttributes, + CustomTaskTimedOutAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class CustomTaskTimedOutResponseTypedDict(TypedDict): + r"""Emitted when a custom task exceeds its timeout. + + Indicates the task did not complete within its configured time limit. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: CustomTaskTimedOutAttributesTypedDict + r"""Attributes for custom task timed out events.""" + event_type: Literal["CUSTOM_TASK_TIMED_OUT"] + r"""Event type discriminator.""" + + +class CustomTaskTimedOutResponse(BaseModel): + r"""Emitted when a custom task exceeds its timeout. + + Indicates the task did not complete within its configured time limit. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: CustomTaskTimedOutAttributes + r"""Attributes for custom task timed out events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["CUSTOM_TASK_TIMED_OUT"]], + AfterValidator(validate_const("CUSTOM_TASK_TIMED_OUT")), + ], + pydantic.Field(alias="event_type"), + ] = "CUSTOM_TASK_TIMED_OUT" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomTaskTimedOutResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/deletebatchjobresponse.py b/src/mistralai/client/models/deletebatchjobresponse.py new file mode 100644 index 00000000..958f0c4f --- /dev/null +++ b/src/mistralai/client/models/deletebatchjobresponse.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 79a43aab6cf9 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteBatchJobResponseTypedDict(TypedDict): + id: str + object: Literal["batch"] + deleted: NotRequired[bool] + + +class DeleteBatchJobResponse(BaseModel): + id: str + + object: Annotated[ + Annotated[Optional[Literal["batch"]], AfterValidator(validate_const("batch"))], + pydantic.Field(alias="object"), + ] = "batch" + + deleted: Optional[bool] = True + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["object", "deleted"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + DeleteBatchJobResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/deploymentdetailresponse.py b/src/mistralai/client/models/deploymentdetailresponse.py new file mode 100644 index 00000000..82f021f1 --- /dev/null +++ b/src/mistralai/client/models/deploymentdetailresponse.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7f4a17a1c7ca + +from __future__ import annotations +from .deploymentworkerresponse import ( + DeploymentWorkerResponse, + DeploymentWorkerResponseTypedDict, +) +from datetime import datetime +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class DeploymentDetailResponseTypedDict(TypedDict): + id: str + r"""Unique identifier of the deployment""" + name: str + r"""Deployment name""" + is_active: bool + r"""Whether at least one worker is currently live""" + created_at: datetime + r"""When the deployment was first registered""" + updated_at: datetime + r"""When the deployment was last updated""" + workers: List[DeploymentWorkerResponseTypedDict] + r"""Workers registered for the deployment""" + + +class DeploymentDetailResponse(BaseModel): + id: str + r"""Unique identifier of the deployment""" + + name: str + r"""Deployment name""" + + is_active: bool + r"""Whether at least one worker is currently live""" + + created_at: datetime + r"""When the deployment was first registered""" + + updated_at: datetime + r"""When the deployment was last updated""" + + workers: List[DeploymentWorkerResponse] + r"""Workers registered for the deployment""" diff --git a/src/mistralai/client/models/deploymentlistresponse.py b/src/mistralai/client/models/deploymentlistresponse.py new file mode 100644 index 00000000..7926cde7 --- /dev/null +++ b/src/mistralai/client/models/deploymentlistresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1f0b404ba621 + +from __future__ import annotations +from .deploymentresponse import DeploymentResponse, DeploymentResponseTypedDict +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class DeploymentListResponseTypedDict(TypedDict): + deployments: List[DeploymentResponseTypedDict] + r"""List of deployments""" + + +class DeploymentListResponse(BaseModel): + deployments: List[DeploymentResponse] + r"""List of deployments""" diff --git a/src/mistralai/client/models/deploymentresponse.py b/src/mistralai/client/models/deploymentresponse.py new file mode 100644 index 00000000..7f8ed3a3 --- /dev/null +++ b/src/mistralai/client/models/deploymentresponse.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ea15ddd64402 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class DeploymentResponseTypedDict(TypedDict): + id: str + r"""Unique identifier of the deployment""" + name: str + r"""Deployment name""" + is_active: bool + r"""Whether at least one worker is currently live""" + created_at: datetime + r"""When the deployment was first registered""" + updated_at: datetime + r"""When the deployment was last updated""" + + +class DeploymentResponse(BaseModel): + id: str + r"""Unique identifier of the deployment""" + + name: str + r"""Deployment name""" + + is_active: bool + r"""Whether at least one worker is currently live""" + + created_at: datetime + r"""When the deployment was first registered""" + + updated_at: datetime + r"""When the deployment was last updated""" diff --git a/src/mistralai/client/models/deploymentworkerresponse.py b/src/mistralai/client/models/deploymentworkerresponse.py new file mode 100644 index 00000000..0adcb4d6 --- /dev/null +++ b/src/mistralai/client/models/deploymentworkerresponse.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b11a9947bd19 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class DeploymentWorkerResponseTypedDict(TypedDict): + name: str + r"""Worker name""" + created_at: datetime + r"""When the worker first registered""" + updated_at: datetime + r"""When the worker last registered""" + + +class DeploymentWorkerResponse(BaseModel): + name: str + r"""Worker name""" + + created_at: datetime + r"""When the worker first registered""" + + updated_at: datetime + r"""When the worker last registered""" diff --git a/src/mistralai/client/models/encodedpayloadoptions.py b/src/mistralai/client/models/encodedpayloadoptions.py new file mode 100644 index 00000000..5c369046 --- /dev/null +++ b/src/mistralai/client/models/encodedpayloadoptions.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 97955ebc2eb9 + +from __future__ import annotations +from typing import Literal + + +EncodedPayloadOptions = Literal[ + "offloaded", + "encrypted", + "encrypted-partial", +] diff --git a/src/mistralai/client/models/eventprogressstatus.py b/src/mistralai/client/models/eventprogressstatus.py new file mode 100644 index 00000000..6fde1c39 --- /dev/null +++ b/src/mistralai/client/models/eventprogressstatus.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 48623263df72 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +EventProgressStatus = Union[ + Literal[ + "RUNNING", + "COMPLETED", + "FAILED", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/eventsource.py b/src/mistralai/client/models/eventsource.py new file mode 100644 index 00000000..d0f4d5e3 --- /dev/null +++ b/src/mistralai/client/models/eventsource.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8b926028b7b2 + +from __future__ import annotations +from typing import Literal + + +EventSource = Literal[ + "DATABASE", + "LIVE", +] diff --git a/src/mistralai/client/models/eventtype.py b/src/mistralai/client/models/eventtype.py new file mode 100644 index 00000000..a85321b2 --- /dev/null +++ b/src/mistralai/client/models/eventtype.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f70686df1fa5 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +EventType = Union[ + Literal[ + "EVENT", + "EVENT_PROGRESS", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop.py b/src/mistralai/client/models/execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop.py new file mode 100644 index 00000000..2e79ef25 --- /dev/null +++ b/src/mistralai/client/models/execute_workflow_registration_v1_workflows_registrations_workflow_registration_id_execute_postop.py @@ -0,0 +1,54 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3e2249825144 + +from __future__ import annotations +from .workflowexecutionrequest import ( + WorkflowExecutionRequest, + WorkflowExecutionRequestTypedDict, +) +from .workflowexecutionresponse import ( + WorkflowExecutionResponse, + WorkflowExecutionResponseTypedDict, +) +from .workflowexecutionsyncresponse import ( + WorkflowExecutionSyncResponse, + WorkflowExecutionSyncResponseTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing import Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +class ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequestTypedDict( + TypedDict +): + workflow_registration_id: str + workflow_execution_request: WorkflowExecutionRequestTypedDict + + +class ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequest( + BaseModel +): + workflow_registration_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_execution_request: Annotated[ + WorkflowExecutionRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + +ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostTypedDict = TypeAliasType( + "ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostTypedDict", + Union[WorkflowExecutionSyncResponseTypedDict, WorkflowExecutionResponseTypedDict], +) +r"""Successful Response""" + + +ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost = TypeAliasType( + "ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost", + Union[WorkflowExecutionSyncResponse, WorkflowExecutionResponse], +) +r"""Successful Response""" diff --git a/src/mistralai/client/models/execute_workflow_v1_workflows_workflow_identifier_execute_postop.py b/src/mistralai/client/models/execute_workflow_v1_workflows_workflow_identifier_execute_postop.py new file mode 100644 index 00000000..bd9496a2 --- /dev/null +++ b/src/mistralai/client/models/execute_workflow_v1_workflows_workflow_identifier_execute_postop.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5da876c66fc5 + +from __future__ import annotations +from .workflowexecutionrequest import ( + WorkflowExecutionRequest, + WorkflowExecutionRequestTypedDict, +) +from .workflowexecutionresponse import ( + WorkflowExecutionResponse, + WorkflowExecutionResponseTypedDict, +) +from .workflowexecutionsyncresponse import ( + WorkflowExecutionSyncResponse, + WorkflowExecutionSyncResponseTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing import Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +class ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequestTypedDict( + TypedDict +): + workflow_identifier: str + workflow_execution_request: WorkflowExecutionRequestTypedDict + + +class ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest(BaseModel): + workflow_identifier: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_execution_request: Annotated[ + WorkflowExecutionRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + +ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostTypedDict = ( + TypeAliasType( + "ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostTypedDict", + Union[ + WorkflowExecutionSyncResponseTypedDict, WorkflowExecutionResponseTypedDict + ], + ) +) +r"""Successful Response""" + + +ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost = TypeAliasType( + "ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost", + Union[WorkflowExecutionSyncResponse, WorkflowExecutionResponse], +) +r"""Successful Response""" diff --git a/src/mistralai/client/models/failure.py b/src/mistralai/client/models/failure.py new file mode 100644 index 00000000..85ca77a5 --- /dev/null +++ b/src/mistralai/client/models/failure.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 596e38493eaa + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class FailureTypedDict(TypedDict): + r"""Represents an error or exception that occurred during execution.""" + + message: str + r"""A human-readable description of the failure.""" + + +class Failure(BaseModel): + r"""Represents an error or exception that occurred during execution.""" + + message: str + r"""A human-readable description of the failure.""" diff --git a/src/mistralai/client/models/ftmodelcard.py b/src/mistralai/client/models/ftmodelcard.py index bb7c52c8..922667b0 100644 --- a/src/mistralai/client/models/ftmodelcard.py +++ b/src/mistralai/client/models/ftmodelcard.py @@ -27,7 +27,6 @@ class FTModelCardTypedDict(TypedDict): r"""This is populated by Harmattan, but some fields have a name that we don't want to expose in the API. """ - job: str root: str object: NotRequired[str] created: NotRequired[int] @@ -40,6 +39,7 @@ class FTModelCardTypedDict(TypedDict): deprecation_replacement_model: NotRequired[Nullable[str]] default_model_temperature: NotRequired[Nullable[float]] type: Literal["fine-tuned"] + job: NotRequired[Nullable[str]] archived: NotRequired[bool] @@ -53,8 +53,6 @@ class FTModelCard(BaseModel): that we don't want to expose in the API. """ - job: str - root: str object: Optional[str] = "model" @@ -82,6 +80,8 @@ class FTModelCard(BaseModel): pydantic.Field(alias="type"), ] = "fine-tuned" + job: OptionalNullable[str] = UNSET + archived: Optional[bool] = False @model_serializer(mode="wrap") @@ -98,6 +98,7 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", + "job", "archived", ] ) @@ -108,6 +109,7 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", + "job", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py b/src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py new file mode 100644 index 00000000..1f699bed --- /dev/null +++ b/src/mistralai/client/models/get_deployment_v1_workflows_deployments_name_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3fae92e2573a + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetDeploymentV1WorkflowsDeploymentsNameGetRequestTypedDict(TypedDict): + name: str + + +class GetDeploymentV1WorkflowsDeploymentsNameGetRequest(BaseModel): + name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py b/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py new file mode 100644 index 00000000..d974f981 --- /dev/null +++ b/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9d566ab77998 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict(TypedDict): + run_id: str + + +class GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest(BaseModel): + run_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_run_v1_workflows_runs_run_id_getop.py b/src/mistralai/client/models/get_run_v1_workflows_runs_run_id_getop.py new file mode 100644 index 00000000..d9b6758f --- /dev/null +++ b/src/mistralai/client/models/get_run_v1_workflows_runs_run_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 60463c59ff01 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetRunV1WorkflowsRunsRunIDGetRequestTypedDict(TypedDict): + run_id: str + + +class GetRunV1WorkflowsRunsRunIDGetRequest(BaseModel): + run_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_stream_events_v1_workflows_events_stream_getop.py b/src/mistralai/client/models/get_stream_events_v1_workflows_events_stream_getop.py new file mode 100644 index 00000000..442a7a94 --- /dev/null +++ b/src/mistralai/client/models/get_stream_events_v1_workflows_events_stream_getop.py @@ -0,0 +1,182 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8dd6ce0e8d66 + +from __future__ import annotations +from .streameventssepayload import StreamEventSsePayload, StreamEventSsePayloadTypedDict +from .workfloweventtype import WorkflowEventType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +Scope = Literal[ + "activity", + "workflow", + "*", +] + + +class GetStreamEventsV1WorkflowsEventsStreamGetRequestTypedDict(TypedDict): + scope: NotRequired[Scope] + activity_name: NotRequired[str] + activity_id: NotRequired[str] + workflow_name: NotRequired[str] + workflow_exec_id: NotRequired[str] + root_workflow_exec_id: NotRequired[str] + parent_workflow_exec_id: NotRequired[str] + stream: NotRequired[str] + start_seq: NotRequired[int] + metadata_filters: NotRequired[Nullable[Dict[str, Any]]] + workflow_event_types: NotRequired[Nullable[List[WorkflowEventType]]] + last_event_id: NotRequired[Nullable[str]] + + +class GetStreamEventsV1WorkflowsEventsStreamGetRequest(BaseModel): + scope: Annotated[ + Optional[Scope], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + activity_name: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + activity_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + workflow_name: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + workflow_exec_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + root_workflow_exec_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + parent_workflow_exec_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + stream: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "*" + + start_seq: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + + metadata_filters: Annotated[ + OptionalNullable[Dict[str, Any]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + workflow_event_types: Annotated[ + OptionalNullable[List[WorkflowEventType]], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + last_event_id: Annotated[ + OptionalNullable[str], + pydantic.Field(alias="last-event-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "scope", + "activity_name", + "activity_id", + "workflow_name", + "workflow_exec_id", + "root_workflow_exec_id", + "parent_workflow_exec_id", + "stream", + "start_seq", + "metadata_filters", + "workflow_event_types", + "last-event-id", + ] + ) + nullable_fields = set( + ["metadata_filters", "workflow_event_types", "last-event-id"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class GetStreamEventsV1WorkflowsEventsStreamGetResponseBodyTypedDict(TypedDict): + r"""Stream of Server-Sent Events (SSE)""" + + event: NotRequired[str] + data: NotRequired[StreamEventSsePayloadTypedDict] + id: NotRequired[str] + retry: NotRequired[int] + + +class GetStreamEventsV1WorkflowsEventsStreamGetResponseBody(BaseModel): + r"""Stream of Server-Sent Events (SSE)""" + + event: Optional[str] = None + + data: Optional[StreamEventSsePayload] = None + + id: Optional[str] = None + + retry: Optional[int] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event", "data", "id", "retry"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_events_v1_workflows_events_list_getop.py b/src/mistralai/client/models/get_workflow_events_v1_workflows_events_list_getop.py new file mode 100644 index 00000000..186c5548 --- /dev/null +++ b/src/mistralai/client/models/get_workflow_events_v1_workflows_events_list_getop.py @@ -0,0 +1,95 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9d6d093835d6 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetWorkflowEventsV1WorkflowsEventsListGetRequestTypedDict(TypedDict): + root_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: NotRequired[Nullable[str]] + r"""Run ID of the workflow that emitted this event.""" + limit: NotRequired[int] + r"""Maximum number of events to return.""" + cursor: NotRequired[Nullable[str]] + r"""Cursor for pagination.""" + + +class GetWorkflowEventsV1WorkflowsEventsListGetRequest(BaseModel): + root_workflow_exec_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Run ID of the workflow that emitted this event.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 100 + r"""Maximum number of events to return.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Cursor for pagination.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "root_workflow_exec_id", + "workflow_exec_id", + "workflow_run_id", + "limit", + "cursor", + ] + ) + nullable_fields = set( + ["root_workflow_exec_id", "workflow_exec_id", "workflow_run_id", "cursor"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py b/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py new file mode 100644 index 00000000..66c6fb06 --- /dev/null +++ b/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8d636c8cad1e + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict( + TypedDict +): + execution_id: str + + +class GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest( + BaseModel +): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_workflow_execution_trace_eventsop.py b/src/mistralai/client/models/get_workflow_execution_trace_eventsop.py new file mode 100644 index 00000000..a60fb536 --- /dev/null +++ b/src/mistralai/client/models/get_workflow_execution_trace_eventsop.py @@ -0,0 +1,47 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 75438195bf19 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetWorkflowExecutionTraceEventsRequestTypedDict(TypedDict): + execution_id: str + merge_same_id_events: NotRequired[bool] + include_internal_events: NotRequired[bool] + + +class GetWorkflowExecutionTraceEventsRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + merge_same_id_events: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + include_internal_events: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["merge_same_id_events", "include_internal_events"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_execution_trace_otelop.py b/src/mistralai/client/models/get_workflow_execution_trace_otelop.py new file mode 100644 index 00000000..0abdd75f --- /dev/null +++ b/src/mistralai/client/models/get_workflow_execution_trace_otelop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f24457d6ea21 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetWorkflowExecutionTraceOtelRequestTypedDict(TypedDict): + execution_id: str + + +class GetWorkflowExecutionTraceOtelRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_workflow_execution_trace_summaryop.py b/src/mistralai/client/models/get_workflow_execution_trace_summaryop.py new file mode 100644 index 00000000..54b080e0 --- /dev/null +++ b/src/mistralai/client/models/get_workflow_execution_trace_summaryop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e44e62e3c444 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetWorkflowExecutionTraceSummaryRequestTypedDict(TypedDict): + execution_id: str + + +class GetWorkflowExecutionTraceSummaryRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_workflow_execution_v1_workflows_executions_execution_id_getop.py b/src/mistralai/client/models/get_workflow_execution_v1_workflows_executions_execution_id_getop.py new file mode 100644 index 00000000..c9926054 --- /dev/null +++ b/src/mistralai/client/models/get_workflow_execution_v1_workflows_executions_execution_id_getop.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 25bc5d3fec8d + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequestTypedDict( + TypedDict +): + execution_id: str + + +class GetWorkflowExecutionV1WorkflowsExecutionsExecutionIDGetRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_workflow_metrics_v1_workflows_workflow_name_metrics_getop.py b/src/mistralai/client/models/get_workflow_metrics_v1_workflows_workflow_name_metrics_getop.py new file mode 100644 index 00000000..1d9c8989 --- /dev/null +++ b/src/mistralai/client/models/get_workflow_metrics_v1_workflows_workflow_name_metrics_getop.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 449550c7f76a + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequestTypedDict(TypedDict): + workflow_name: str + start_time: NotRequired[Nullable[datetime]] + r"""Filter workflows started after this time (ISO 8601)""" + end_time: NotRequired[Nullable[datetime]] + r"""Filter workflows started before this time (ISO 8601)""" + + +class GetWorkflowMetricsV1WorkflowsWorkflowNameMetricsGetRequest(BaseModel): + workflow_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + start_time: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter workflows started after this time (ISO 8601)""" + + end_time: Annotated[ + OptionalNullable[datetime], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter workflows started before this time (ISO 8601)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["start_time", "end_time"]) + nullable_fields = set(["start_time", "end_time"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop.py b/src/mistralai/client/models/get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop.py new file mode 100644 index 00000000..fe7d639d --- /dev/null +++ b/src/mistralai/client/models/get_workflow_registration_v1_workflows_registrations_workflow_registration_id_getop.py @@ -0,0 +1,55 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a6b7d0f559ef + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequestTypedDict( + TypedDict +): + workflow_registration_id: str + with_workflow: NotRequired[bool] + r"""Whether to include the workflow definition""" + include_shared: NotRequired[bool] + r"""Whether to include shared workflow versions""" + + +class GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequest( + BaseModel +): + workflow_registration_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + with_workflow: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Whether to include the workflow definition""" + + include_shared: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = True + r"""Whether to include shared workflow versions""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["with_workflow", "include_shared"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py b/src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py new file mode 100644 index 00000000..478ee3fb --- /dev/null +++ b/src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py @@ -0,0 +1,147 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 822f256b2372 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestTypedDict(TypedDict): + workflow_id: NotRequired[Nullable[str]] + r"""The workflow ID to filter by""" + task_queue: NotRequired[Nullable[str]] + r"""The task queue to filter by""" + active_only: NotRequired[bool] + r"""Whether to only return active workflows versions""" + include_shared: NotRequired[bool] + r"""Whether to include shared workflow versions""" + workflow_search: NotRequired[Nullable[str]] + r"""The workflow name to filter by""" + archived: NotRequired[Nullable[bool]] + r"""Filter by archived state. False=exclude archived, True=only archived, None=include all""" + with_workflow: NotRequired[bool] + r"""Whether to include the workflow definition""" + available_in_chat_assistant: NotRequired[Nullable[bool]] + r"""Whether to only return workflows compatible with chat assistant""" + limit: NotRequired[int] + r"""The maximum number of workflows versions to return""" + cursor: NotRequired[Nullable[str]] + r"""The cursor for pagination""" + + +class GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest(BaseModel): + workflow_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The workflow ID to filter by""" + + task_queue: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The task queue to filter by""" + + active_only: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Whether to only return active workflows versions""" + + include_shared: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = True + r"""Whether to include shared workflow versions""" + + workflow_search: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The workflow name to filter by""" + + archived: Annotated[ + OptionalNullable[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by archived state. False=exclude archived, True=only archived, None=include all""" + + with_workflow: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Whether to include the workflow definition""" + + available_in_chat_assistant: Annotated[ + OptionalNullable[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Whether to only return workflows compatible with chat assistant""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""The maximum number of workflows versions to return""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The cursor for pagination""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "workflow_id", + "task_queue", + "active_only", + "include_shared", + "workflow_search", + "archived", + "with_workflow", + "available_in_chat_assistant", + "limit", + "cursor", + ] + ) + nullable_fields = set( + [ + "workflow_id", + "task_queue", + "workflow_search", + "archived", + "available_in_chat_assistant", + "cursor", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_v1_workflows_workflow_identifier_getop.py b/src/mistralai/client/models/get_workflow_v1_workflows_workflow_identifier_getop.py new file mode 100644 index 00000000..20d0b6dd --- /dev/null +++ b/src/mistralai/client/models/get_workflow_v1_workflows_workflow_identifier_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 097af37374fd + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetWorkflowV1WorkflowsWorkflowIdentifierGetRequestTypedDict(TypedDict): + workflow_identifier: str + + +class GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest(BaseModel): + workflow_identifier: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_workflows_v1_workflows_getop.py b/src/mistralai/client/models/get_workflows_v1_workflows_getop.py new file mode 100644 index 00000000..6cbad5e4 --- /dev/null +++ b/src/mistralai/client/models/get_workflows_v1_workflows_getop.py @@ -0,0 +1,116 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a128585aee76 + +from __future__ import annotations +from .workflowlistresponse import WorkflowListResponse, WorkflowListResponseTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Awaitable, Callable, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetWorkflowsV1WorkflowsGetRequestTypedDict(TypedDict): + active_only: NotRequired[bool] + r"""Whether to only return active workflows""" + include_shared: NotRequired[bool] + r"""Whether to include shared workflows""" + available_in_chat_assistant: NotRequired[Nullable[bool]] + r"""Whether to only return workflows compatible with chat assistant""" + archived: NotRequired[Nullable[bool]] + r"""Filter by archived state. False=exclude archived, True=only archived, None=include all""" + cursor: NotRequired[Nullable[str]] + r"""The cursor for pagination""" + limit: NotRequired[int] + r"""The maximum number of workflows to return""" + + +class GetWorkflowsV1WorkflowsGetRequest(BaseModel): + active_only: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Whether to only return active workflows""" + + include_shared: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = True + r"""Whether to include shared workflows""" + + available_in_chat_assistant: Annotated[ + OptionalNullable[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Whether to only return workflows compatible with chat assistant""" + + archived: Annotated[ + OptionalNullable[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by archived state. False=exclude archived, True=only archived, None=include all""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The cursor for pagination""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""The maximum number of workflows to return""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "active_only", + "include_shared", + "available_in_chat_assistant", + "archived", + "cursor", + "limit", + ] + ) + nullable_fields = set(["available_in_chat_assistant", "archived", "cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class GetWorkflowsV1WorkflowsGetResponseTypedDict(TypedDict): + result: WorkflowListResponseTypedDict + + +class GetWorkflowsV1WorkflowsGetResponse(BaseModel): + next: Union[ + Callable[[], Optional[GetWorkflowsV1WorkflowsGetResponse]], + Callable[[], Awaitable[Optional[GetWorkflowsV1WorkflowsGetResponse]]], + ] + + result: WorkflowListResponse diff --git a/src/mistralai/client/models/jobs_api_routes_batch_delete_batch_jobop.py b/src/mistralai/client/models/jobs_api_routes_batch_delete_batch_jobop.py new file mode 100644 index 00000000..9fc4a7e7 --- /dev/null +++ b/src/mistralai/client/models/jobs_api_routes_batch_delete_batch_jobop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8c43af108342 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class JobsAPIRoutesBatchDeleteBatchJobRequestTypedDict(TypedDict): + job_id: str + + +class JobsAPIRoutesBatchDeleteBatchJobRequest(BaseModel): + job_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/jsonpatchadd.py b/src/mistralai/client/models/jsonpatchadd.py new file mode 100644 index 00000000..d4242f11 --- /dev/null +++ b/src/mistralai/client/models/jsonpatchadd.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fb2a1e58a6a5 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Any, Literal +from typing_extensions import Annotated, TypedDict + + +class JSONPatchAddTypedDict(TypedDict): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + value: Any + r"""The value to use for the operation""" + op: Literal["add"] + r"""Add operation""" + + +class JSONPatchAdd(BaseModel): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + + value: Any + r"""The value to use for the operation""" + + op: Annotated[ + Annotated[Literal["add"], AfterValidator(validate_const("add"))], + pydantic.Field(alias="op"), + ] = "add" + r"""Add operation""" + + +try: + JSONPatchAdd.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/jsonpatchappend.py b/src/mistralai/client/models/jsonpatchappend.py new file mode 100644 index 00000000..7181ddac --- /dev/null +++ b/src/mistralai/client/models/jsonpatchappend.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 61801f21f4b0 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class JSONPatchAppendTypedDict(TypedDict): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + value: str + r"""The value to use for the operation. A string to append to the existing value""" + op: Literal["append"] + r"""'append' is an extension for efficient string concatenation in streaming scenarios.""" + + +class JSONPatchAppend(BaseModel): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + + value: str + r"""The value to use for the operation. A string to append to the existing value""" + + op: Annotated[ + Annotated[Literal["append"], AfterValidator(validate_const("append"))], + pydantic.Field(alias="op"), + ] = "append" + r"""'append' is an extension for efficient string concatenation in streaming scenarios.""" + + +try: + JSONPatchAppend.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/jsonpatchpayloadrequest.py b/src/mistralai/client/models/jsonpatchpayloadrequest.py new file mode 100644 index 00000000..96a6d689 --- /dev/null +++ b/src/mistralai/client/models/jsonpatchpayloadrequest.py @@ -0,0 +1,66 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3f10ecfda228 + +from __future__ import annotations +from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict +from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict +from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict +from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic import Field +from pydantic.functional_validators import AfterValidator +from typing import List, Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +JSONPatchPayloadRequestValueTypedDict = TypeAliasType( + "JSONPatchPayloadRequestValueTypedDict", + Union[ + JSONPatchAppendTypedDict, + JSONPatchAddTypedDict, + JSONPatchReplaceTypedDict, + JSONPatchRemoveTypedDict, + ], +) + + +JSONPatchPayloadRequestValue = Annotated[ + Union[JSONPatchAdd, JSONPatchAppend, JSONPatchRemove, JSONPatchReplace], + Field(discriminator="op"), +] + + +class JSONPatchPayloadRequestTypedDict(TypedDict): + r"""A payload containing a list of JSON Patch operations. + + Used for streaming incremental updates to workflow state. + """ + + value: List[JSONPatchPayloadRequestValueTypedDict] + r"""The list of JSON Patch operations to apply in order.""" + type: Literal["json_patch"] + r"""Discriminator indicating this is a JSON Patch payload.""" + + +class JSONPatchPayloadRequest(BaseModel): + r"""A payload containing a list of JSON Patch operations. + + Used for streaming incremental updates to workflow state. + """ + + value: List[JSONPatchPayloadRequestValue] + r"""The list of JSON Patch operations to apply in order.""" + + type: Annotated[ + Annotated[Literal["json_patch"], AfterValidator(validate_const("json_patch"))], + pydantic.Field(alias="type"), + ] = "json_patch" + r"""Discriminator indicating this is a JSON Patch payload.""" + + +try: + JSONPatchPayloadRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/jsonpatchpayloadresponse.py b/src/mistralai/client/models/jsonpatchpayloadresponse.py new file mode 100644 index 00000000..345e6d14 --- /dev/null +++ b/src/mistralai/client/models/jsonpatchpayloadresponse.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1b39f46f529f + +from __future__ import annotations +from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict +from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict +from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict +from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict +from functools import partial +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +from mistralai.client.utils.unions import parse_open_union +import pydantic +from pydantic import ConfigDict +from pydantic.functional_validators import AfterValidator, BeforeValidator +from typing import Any, List, Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +JSONPatchPayloadResponseValueTypedDict = TypeAliasType( + "JSONPatchPayloadResponseValueTypedDict", + Union[ + JSONPatchAppendTypedDict, + JSONPatchAddTypedDict, + JSONPatchReplaceTypedDict, + JSONPatchRemoveTypedDict, + ], +) + + +class UnknownJSONPatchPayloadResponseValue(BaseModel): + r"""A JSONPatchPayloadResponseValue variant the SDK doesn't recognize. Preserves the raw payload.""" + + op: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_JSON_PATCH_PAYLOAD_RESPONSE_VALUE_VARIANTS: dict[str, Any] = { + "add": JSONPatchAdd, + "append": JSONPatchAppend, + "remove": JSONPatchRemove, + "replace": JSONPatchReplace, +} + + +JSONPatchPayloadResponseValue = Annotated[ + Union[ + JSONPatchAdd, + JSONPatchAppend, + JSONPatchRemove, + JSONPatchReplace, + UnknownJSONPatchPayloadResponseValue, + ], + BeforeValidator( + partial( + parse_open_union, + disc_key="op", + variants=_JSON_PATCH_PAYLOAD_RESPONSE_VALUE_VARIANTS, + unknown_cls=UnknownJSONPatchPayloadResponseValue, + union_name="JSONPatchPayloadResponseValue", + ) + ), +] + + +class JSONPatchPayloadResponseTypedDict(TypedDict): + r"""A payload containing a list of JSON Patch operations. + + Used for streaming incremental updates to workflow state. + """ + + value: List[JSONPatchPayloadResponseValueTypedDict] + r"""The list of JSON Patch operations to apply in order.""" + type: Literal["json_patch"] + r"""Discriminator indicating this is a JSON Patch payload.""" + + +class JSONPatchPayloadResponse(BaseModel): + r"""A payload containing a list of JSON Patch operations. + + Used for streaming incremental updates to workflow state. + """ + + value: List[JSONPatchPayloadResponseValue] + r"""The list of JSON Patch operations to apply in order.""" + + type: Annotated[ + Annotated[Literal["json_patch"], AfterValidator(validate_const("json_patch"))], + pydantic.Field(alias="type"), + ] = "json_patch" + r"""Discriminator indicating this is a JSON Patch payload.""" + + +try: + JSONPatchPayloadResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/jsonpatchremove.py b/src/mistralai/client/models/jsonpatchremove.py new file mode 100644 index 00000000..5bcedf87 --- /dev/null +++ b/src/mistralai/client/models/jsonpatchremove.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e472e5b752ec + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Any, Literal +from typing_extensions import Annotated, TypedDict + + +class JSONPatchRemoveTypedDict(TypedDict): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + value: Any + r"""The value to use for the operation""" + op: Literal["remove"] + r"""Remove operation""" + + +class JSONPatchRemove(BaseModel): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + + value: Any + r"""The value to use for the operation""" + + op: Annotated[ + Annotated[Literal["remove"], AfterValidator(validate_const("remove"))], + pydantic.Field(alias="op"), + ] = "remove" + r"""Remove operation""" + + +try: + JSONPatchRemove.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/jsonpatchreplace.py b/src/mistralai/client/models/jsonpatchreplace.py new file mode 100644 index 00000000..3dd7aee6 --- /dev/null +++ b/src/mistralai/client/models/jsonpatchreplace.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 816f9df2f3c9 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Any, Literal +from typing_extensions import Annotated, TypedDict + + +class JSONPatchReplaceTypedDict(TypedDict): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + value: Any + r"""The value to use for the operation""" + op: Literal["replace"] + r"""Replace operation""" + + +class JSONPatchReplace(BaseModel): + path: str + r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" + + value: Any + r"""The value to use for the operation""" + + op: Annotated[ + Annotated[Literal["replace"], AfterValidator(validate_const("replace"))], + pydantic.Field(alias="op"), + ] = "replace" + r"""Replace operation""" + + +try: + JSONPatchReplace.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/jsonpayloadrequest.py b/src/mistralai/client/models/jsonpayloadrequest.py new file mode 100644 index 00000000..252b8dac --- /dev/null +++ b/src/mistralai/client/models/jsonpayloadrequest.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0d49a02162ea + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Any, Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class JSONPayloadRequestTypedDict(TypedDict): + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + value: Any + r"""The JSON-serializable payload value.""" + type: Literal["json"] + r"""Discriminator indicating this is a raw JSON payload.""" + + +class JSONPayloadRequest(BaseModel): + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + value: Any + r"""The JSON-serializable payload value.""" + + type: Annotated[ + Annotated[Optional[Literal["json"]], AfterValidator(validate_const("json"))], + pydantic.Field(alias="type"), + ] = "json" + r"""Discriminator indicating this is a raw JSON payload.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + JSONPayloadRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/jsonpayloadresponse.py b/src/mistralai/client/models/jsonpayloadresponse.py new file mode 100644 index 00000000..038ea329 --- /dev/null +++ b/src/mistralai/client/models/jsonpayloadresponse.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ba3265f85453 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Any, Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class JSONPayloadResponseTypedDict(TypedDict): + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + value: Any + r"""The JSON-serializable payload value.""" + type: Literal["json"] + r"""Discriminator indicating this is a raw JSON payload.""" + + +class JSONPayloadResponse(BaseModel): + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + value: Any + r"""The JSON-serializable payload value.""" + + type: Annotated[ + Annotated[Optional[Literal["json"]], AfterValidator(validate_const("json"))], + pydantic.Field(alias="type"), + ] = "json" + r"""Discriminator indicating this is a raw JSON payload.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + JSONPayloadResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/libraries_list_v1op.py b/src/mistralai/client/models/libraries_list_v1op.py new file mode 100644 index 00000000..088a41b2 --- /dev/null +++ b/src/mistralai/client/models/libraries_list_v1op.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2d9b1b4deeb0 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class LibrariesListV1RequestTypedDict(TypedDict): + page_size: NotRequired[int] + page: NotRequired[int] + + +class LibrariesListV1Request(BaseModel): + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 100 + + page: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_size", "page"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py b/src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py new file mode 100644 index 00000000..066b8db1 --- /dev/null +++ b/src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0c6586ffcab0 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ListDeploymentsV1WorkflowsDeploymentsGetRequestTypedDict(TypedDict): + active_only: NotRequired[bool] + workflow_name: NotRequired[Nullable[str]] + + +class ListDeploymentsV1WorkflowsDeploymentsGetRequest(BaseModel): + active_only: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = True + + workflow_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["active_only", "workflow_name"]) + nullable_fields = set(["workflow_name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py new file mode 100644 index 00000000..e61140cf --- /dev/null +++ b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py @@ -0,0 +1,121 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2f1b225158c3 + +from __future__ import annotations +from .workflowexecutionlistresponse import ( + WorkflowExecutionListResponse, + WorkflowExecutionListResponseTypedDict, +) +from .workflowexecutionstatus import WorkflowExecutionStatus +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Awaitable, Callable, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ListRunsV1WorkflowsRunsGetStatusTypedDict = TypeAliasType( + "ListRunsV1WorkflowsRunsGetStatusTypedDict", + Union[WorkflowExecutionStatus, List[WorkflowExecutionStatus]], +) +r"""Filter by workflow status""" + + +ListRunsV1WorkflowsRunsGetStatus = TypeAliasType( + "ListRunsV1WorkflowsRunsGetStatus", + Union[WorkflowExecutionStatus, List[WorkflowExecutionStatus]], +) +r"""Filter by workflow status""" + + +class ListRunsV1WorkflowsRunsGetRequestTypedDict(TypedDict): + workflow_identifier: NotRequired[Nullable[str]] + r"""Filter by workflow name or id""" + search: NotRequired[Nullable[str]] + r"""Search by workflow name, display name or id""" + status: NotRequired[Nullable[ListRunsV1WorkflowsRunsGetStatusTypedDict]] + r"""Filter by workflow status""" + page_size: NotRequired[int] + r"""Number of items per page""" + next_page_token: NotRequired[Nullable[str]] + r"""Token for the next page of results""" + + +class ListRunsV1WorkflowsRunsGetRequest(BaseModel): + workflow_identifier: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by workflow name or id""" + + search: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Search by workflow name, display name or id""" + + status: Annotated[ + OptionalNullable[ListRunsV1WorkflowsRunsGetStatus], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by workflow status""" + + page_size: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 50 + r"""Number of items per page""" + + next_page_token: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Token for the next page of results""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["workflow_identifier", "search", "status", "page_size", "next_page_token"] + ) + nullable_fields = set( + ["workflow_identifier", "search", "status", "next_page_token"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class ListRunsV1WorkflowsRunsGetResponseTypedDict(TypedDict): + result: WorkflowExecutionListResponseTypedDict + + +class ListRunsV1WorkflowsRunsGetResponse(BaseModel): + next: Union[ + Callable[[], Optional[ListRunsV1WorkflowsRunsGetResponse]], + Callable[[], Awaitable[Optional[ListRunsV1WorkflowsRunsGetResponse]]], + ] + + result: WorkflowExecutionListResponse diff --git a/src/mistralai/client/models/list_voices_v1_audio_voices_getop.py b/src/mistralai/client/models/list_voices_v1_audio_voices_getop.py index 16ae81c7..30161b33 100644 --- a/src/mistralai/client/models/list_voices_v1_audio_voices_getop.py +++ b/src/mistralai/client/models/list_voices_v1_audio_voices_getop.py @@ -5,15 +5,25 @@ from mistralai.client.types import BaseModel, UNSET_SENTINEL from mistralai.client.utils import FieldMetadata, QueryParamMetadata from pydantic import model_serializer -from typing import Optional +from typing import Literal, Optional from typing_extensions import Annotated, NotRequired, TypedDict +ListVoicesV1AudioVoicesGetType = Literal[ + "all", + "custom", + "preset", +] +r"""Filter the voices between customs and presets""" + + class ListVoicesV1AudioVoicesGetRequestTypedDict(TypedDict): limit: NotRequired[int] r"""Maximum number of voices to return""" offset: NotRequired[int] r"""Offset for pagination""" + type: NotRequired[ListVoicesV1AudioVoicesGetType] + r"""Filter the voices between customs and presets""" class ListVoicesV1AudioVoicesGetRequest(BaseModel): @@ -29,9 +39,15 @@ class ListVoicesV1AudioVoicesGetRequest(BaseModel): ] = 0 r"""Offset for pagination""" + type: Annotated[ + Optional[ListVoicesV1AudioVoicesGetType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = "all" + r"""Filter the voices between customs and presets""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["limit", "offset"]) + optional_fields = set(["limit", "offset", "type"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/listlibrariesresponse.py b/src/mistralai/client/models/listlibrariesresponse.py index 337fe105..be4125f2 100644 --- a/src/mistralai/client/models/listlibrariesresponse.py +++ b/src/mistralai/client/models/listlibrariesresponse.py @@ -3,14 +3,18 @@ from __future__ import annotations from .library import Library, LibraryTypedDict +from .paginationinfo import PaginationInfo, PaginationInfoTypedDict from mistralai.client.types import BaseModel from typing import List from typing_extensions import TypedDict class ListLibrariesResponseTypedDict(TypedDict): + pagination: PaginationInfoTypedDict data: List[LibraryTypedDict] class ListLibrariesResponse(BaseModel): + pagination: PaginationInfo + data: List[Library] diff --git a/src/mistralai/client/models/listworkfloweventresponse.py b/src/mistralai/client/models/listworkfloweventresponse.py new file mode 100644 index 00000000..be99ccea --- /dev/null +++ b/src/mistralai/client/models/listworkfloweventresponse.py @@ -0,0 +1,170 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 20a423148117 + +from __future__ import annotations +from .activitytaskcompletedresponse import ( + ActivityTaskCompletedResponse, + ActivityTaskCompletedResponseTypedDict, +) +from .activitytaskfailedresponse import ( + ActivityTaskFailedResponse, + ActivityTaskFailedResponseTypedDict, +) +from .activitytaskretryingresponse import ( + ActivityTaskRetryingResponse, + ActivityTaskRetryingResponseTypedDict, +) +from .activitytaskstartedresponse import ( + ActivityTaskStartedResponse, + ActivityTaskStartedResponseTypedDict, +) +from .customtaskcanceledresponse import ( + CustomTaskCanceledResponse, + CustomTaskCanceledResponseTypedDict, +) +from .customtaskcompletedresponse import ( + CustomTaskCompletedResponse, + CustomTaskCompletedResponseTypedDict, +) +from .customtaskfailedresponse import ( + CustomTaskFailedResponse, + CustomTaskFailedResponseTypedDict, +) +from .customtaskinprogressresponse import ( + CustomTaskInProgressResponse, + CustomTaskInProgressResponseTypedDict, +) +from .customtaskstartedresponse import ( + CustomTaskStartedResponse, + CustomTaskStartedResponseTypedDict, +) +from .customtasktimedoutresponse import ( + CustomTaskTimedOutResponse, + CustomTaskTimedOutResponseTypedDict, +) +from .workflowexecutioncanceledresponse import ( + WorkflowExecutionCanceledResponse, + WorkflowExecutionCanceledResponseTypedDict, +) +from .workflowexecutioncompletedresponse import ( + WorkflowExecutionCompletedResponse, + WorkflowExecutionCompletedResponseTypedDict, +) +from .workflowexecutioncontinuedasnewresponse import ( + WorkflowExecutionContinuedAsNewResponse, + WorkflowExecutionContinuedAsNewResponseTypedDict, +) +from .workflowexecutionfailedresponse import ( + WorkflowExecutionFailedResponse, + WorkflowExecutionFailedResponseTypedDict, +) +from .workflowexecutionstartedresponse import ( + WorkflowExecutionStartedResponse, + WorkflowExecutionStartedResponseTypedDict, +) +from .workflowtaskfailedresponse import ( + WorkflowTaskFailedResponse, + WorkflowTaskFailedResponseTypedDict, +) +from .workflowtasktimedoutresponse import ( + WorkflowTaskTimedOutResponse, + WorkflowTaskTimedOutResponseTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +ListWorkflowEventResponseEventTypedDict = TypeAliasType( + "ListWorkflowEventResponseEventTypedDict", + Union[ + WorkflowExecutionStartedResponseTypedDict, + WorkflowExecutionCompletedResponseTypedDict, + WorkflowExecutionFailedResponseTypedDict, + WorkflowExecutionCanceledResponseTypedDict, + WorkflowExecutionContinuedAsNewResponseTypedDict, + WorkflowTaskTimedOutResponseTypedDict, + WorkflowTaskFailedResponseTypedDict, + CustomTaskStartedResponseTypedDict, + CustomTaskInProgressResponseTypedDict, + CustomTaskCompletedResponseTypedDict, + CustomTaskFailedResponseTypedDict, + CustomTaskTimedOutResponseTypedDict, + CustomTaskCanceledResponseTypedDict, + ActivityTaskStartedResponseTypedDict, + ActivityTaskCompletedResponseTypedDict, + ActivityTaskRetryingResponseTypedDict, + ActivityTaskFailedResponseTypedDict, + ], +) + + +ListWorkflowEventResponseEvent = TypeAliasType( + "ListWorkflowEventResponseEvent", + Union[ + WorkflowExecutionStartedResponse, + WorkflowExecutionCompletedResponse, + WorkflowExecutionFailedResponse, + WorkflowExecutionCanceledResponse, + WorkflowExecutionContinuedAsNewResponse, + WorkflowTaskTimedOutResponse, + WorkflowTaskFailedResponse, + CustomTaskStartedResponse, + CustomTaskInProgressResponse, + CustomTaskCompletedResponse, + CustomTaskFailedResponse, + CustomTaskTimedOutResponse, + CustomTaskCanceledResponse, + ActivityTaskStartedResponse, + ActivityTaskCompletedResponse, + ActivityTaskRetryingResponse, + ActivityTaskFailedResponse, + ], +) + + +class ListWorkflowEventResponseTypedDict(TypedDict): + events: List[ListWorkflowEventResponseEventTypedDict] + r"""List of workflow events.""" + next_cursor: NotRequired[Nullable[str]] + r"""Cursor for pagination.""" + + +class ListWorkflowEventResponse(BaseModel): + events: List[ListWorkflowEventResponseEvent] + r"""List of workflow events.""" + + next_cursor: OptionalNullable[str] = UNSET + r"""Cursor for pagination.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next_cursor"]) + nullable_fields = set(["next_cursor"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/networkencodedinput.py b/src/mistralai/client/models/networkencodedinput.py new file mode 100644 index 00000000..70d92414 --- /dev/null +++ b/src/mistralai/client/models/networkencodedinput.py @@ -0,0 +1,45 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6dc5321dbe77 + +from __future__ import annotations +from .encodedpayloadoptions import EncodedPayloadOptions +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class NetworkEncodedInputTypedDict(TypedDict): + b64payload: str + r"""The encoded payload""" + encoding_options: NotRequired[List[EncodedPayloadOptions]] + r"""The encoding of the payload""" + empty: NotRequired[bool] + r"""Whether the payload is empty""" + + +class NetworkEncodedInput(BaseModel): + b64payload: str + r"""The encoded payload""" + + encoding_options: Optional[List[EncodedPayloadOptions]] = None + r"""The encoding of the payload""" + + empty: Optional[bool] = False + r"""Whether the payload is empty""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["encoding_options", "empty"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py b/src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py new file mode 100644 index 00000000..5598c4b6 --- /dev/null +++ b/src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 73826dbd3f5b + +from __future__ import annotations +from .queryinvocationbody import QueryInvocationBody, QueryInvocationBodyTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict( + TypedDict +): + execution_id: str + query_invocation_body: QueryInvocationBodyTypedDict + + +class QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest( + BaseModel +): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + query_invocation_body: Annotated[ + QueryInvocationBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/querydefinition.py b/src/mistralai/client/models/querydefinition.py new file mode 100644 index 00000000..bc9b4f20 --- /dev/null +++ b/src/mistralai/client/models/querydefinition.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9648273c8b7d + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class QueryDefinitionTypedDict(TypedDict): + name: str + r"""Name of the query""" + input_schema: Dict[str, Any] + r"""Input JSON schema of the query's model""" + description: NotRequired[Nullable[str]] + r"""Description of the query""" + output_schema: NotRequired[Nullable[Dict[str, Any]]] + r"""Output JSON schema of the query's model""" + + +class QueryDefinition(BaseModel): + name: str + r"""Name of the query""" + + input_schema: Dict[str, Any] + r"""Input JSON schema of the query's model""" + + description: OptionalNullable[str] = UNSET + r"""Description of the query""" + + output_schema: OptionalNullable[Dict[str, Any]] = UNSET + r"""Output JSON schema of the query's model""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description", "output_schema"]) + nullable_fields = set(["description", "output_schema"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/queryinvocationbody.py b/src/mistralai/client/models/queryinvocationbody.py new file mode 100644 index 00000000..550e1d7b --- /dev/null +++ b/src/mistralai/client/models/queryinvocationbody.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d78662a1a9bf + +from __future__ import annotations +from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +QueryInvocationBodyInputTypedDict = TypeAliasType( + "QueryInvocationBodyInputTypedDict", + Union[NetworkEncodedInputTypedDict, Dict[str, Any]], +) +r"""Input data for the query, matching its schema""" + + +QueryInvocationBodyInput = TypeAliasType( + "QueryInvocationBodyInput", Union[NetworkEncodedInput, Dict[str, Any]] +) +r"""Input data for the query, matching its schema""" + + +class QueryInvocationBodyTypedDict(TypedDict): + name: str + r"""The name of the query to request""" + input: NotRequired[Nullable[QueryInvocationBodyInputTypedDict]] + r"""Input data for the query, matching its schema""" + + +class QueryInvocationBody(BaseModel): + name: str + r"""The name of the query to request""" + + input: OptionalNullable[QueryInvocationBodyInput] = UNSET + r"""Input data for the query, matching its schema""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["input"]) + nullable_fields = set(["input"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/queryworkflowresponse.py b/src/mistralai/client/models/queryworkflowresponse.py new file mode 100644 index 00000000..aed982d5 --- /dev/null +++ b/src/mistralai/client/models/queryworkflowresponse.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 30281fcedce6 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Any +from typing_extensions import TypedDict + + +class QueryWorkflowResponseTypedDict(TypedDict): + query_name: str + result: Any + r"""The result of the Query workflow call""" + + +class QueryWorkflowResponse(BaseModel): + query_name: str + + result: Any + r"""The result of the Query workflow call""" diff --git a/src/mistralai/client/models/reset_workflow_v1_workflows_executions_execution_id_reset_postop.py b/src/mistralai/client/models/reset_workflow_v1_workflows_executions_execution_id_reset_postop.py new file mode 100644 index 00000000..eda20e53 --- /dev/null +++ b/src/mistralai/client/models/reset_workflow_v1_workflows_executions_execution_id_reset_postop.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3e9d229cd8ba + +from __future__ import annotations +from .resetinvocationbody import ResetInvocationBody, ResetInvocationBodyTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequestTypedDict(TypedDict): + execution_id: str + reset_invocation_body: ResetInvocationBodyTypedDict + + +class ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + reset_invocation_body: Annotated[ + ResetInvocationBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/resetinvocationbody.py b/src/mistralai/client/models/resetinvocationbody.py new file mode 100644 index 00000000..26c3389f --- /dev/null +++ b/src/mistralai/client/models/resetinvocationbody.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3c0a985a5a77 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ResetInvocationBodyTypedDict(TypedDict): + event_id: int + r"""The event ID to reset the workflow execution to""" + reason: NotRequired[Nullable[str]] + r"""Reason for resetting the workflow execution""" + exclude_signals: NotRequired[bool] + r"""Whether to exclude signals that happened after the reset point""" + exclude_updates: NotRequired[bool] + r"""Whether to exclude updates that happened after the reset point""" + + +class ResetInvocationBody(BaseModel): + event_id: int + r"""The event ID to reset the workflow execution to""" + + reason: OptionalNullable[str] = UNSET + r"""Reason for resetting the workflow execution""" + + exclude_signals: Optional[bool] = False + r"""Whether to exclude signals that happened after the reset point""" + + exclude_updates: Optional[bool] = False + r"""Whether to exclude updates that happened after the reset point""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["reason", "exclude_signals", "exclude_updates"]) + nullable_fields = set(["reason"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/scalarmetric.py b/src/mistralai/client/models/scalarmetric.py new file mode 100644 index 00000000..b9c70a77 --- /dev/null +++ b/src/mistralai/client/models/scalarmetric.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ae8eb1017da6 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Union +from typing_extensions import TypeAliasType, TypedDict + + +ScalarMetricValueTypedDict = TypeAliasType( + "ScalarMetricValueTypedDict", Union[int, float] +) + + +ScalarMetricValue = TypeAliasType("ScalarMetricValue", Union[int, float]) + + +class ScalarMetricTypedDict(TypedDict): + r"""Scalar metric with a single value.""" + + value: ScalarMetricValueTypedDict + + +class ScalarMetric(BaseModel): + r"""Scalar metric with a single value.""" + + value: ScalarMetricValue diff --git a/src/mistralai/client/models/schedulecalendar.py b/src/mistralai/client/models/schedulecalendar.py new file mode 100644 index 00000000..2cb179eb --- /dev/null +++ b/src/mistralai/client/models/schedulecalendar.py @@ -0,0 +1,80 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 76d72d187023 + +from __future__ import annotations +from .schedulerange import ScheduleRange, ScheduleRangeTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ScheduleCalendarTypedDict(TypedDict): + second: NotRequired[List[ScheduleRangeTypedDict]] + minute: NotRequired[List[ScheduleRangeTypedDict]] + hour: NotRequired[List[ScheduleRangeTypedDict]] + day_of_month: NotRequired[List[ScheduleRangeTypedDict]] + month: NotRequired[List[ScheduleRangeTypedDict]] + year: NotRequired[List[ScheduleRangeTypedDict]] + day_of_week: NotRequired[List[ScheduleRangeTypedDict]] + comment: NotRequired[Nullable[str]] + + +class ScheduleCalendar(BaseModel): + second: Optional[List[ScheduleRange]] = None + + minute: Optional[List[ScheduleRange]] = None + + hour: Optional[List[ScheduleRange]] = None + + day_of_month: Optional[List[ScheduleRange]] = None + + month: Optional[List[ScheduleRange]] = None + + year: Optional[List[ScheduleRange]] = None + + day_of_week: Optional[List[ScheduleRange]] = None + + comment: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "second", + "minute", + "hour", + "day_of_month", + "month", + "year", + "day_of_week", + "comment", + ] + ) + nullable_fields = set(["comment"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/scheduledefinition.py b/src/mistralai/client/models/scheduledefinition.py new file mode 100644 index 00000000..dc622c3a --- /dev/null +++ b/src/mistralai/client/models/scheduledefinition.py @@ -0,0 +1,142 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6ea58a356f77 + +from __future__ import annotations +from .schedulecalendar import ScheduleCalendar, ScheduleCalendarTypedDict +from .scheduleinterval import ScheduleInterval, ScheduleIntervalTypedDict +from .schedulepolicy import SchedulePolicy, SchedulePolicyTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ScheduleDefinitionTypedDict(TypedDict): + r"""Specification of the times scheduled actions may occur. + + The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and + :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + + Used for input where schedule_id is optional (can be provided or auto-generated). + """ + + input: Any + r"""Input to provide to the workflow when starting it.""" + calendars: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Calendar-based specification of times.""" + intervals: NotRequired[List[ScheduleIntervalTypedDict]] + r"""Interval-based specification of times.""" + cron_expressions: NotRequired[List[str]] + r"""Cron-based specification of times.""" + skip: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Set of calendar times to skip.""" + start_at: NotRequired[Nullable[datetime]] + r"""Time after which the first action may be run.""" + end_at: NotRequired[Nullable[datetime]] + r"""Time after which no more actions will be run.""" + jitter: NotRequired[Nullable[str]] + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + time_zone_name: NotRequired[Nullable[str]] + r"""IANA time zone name, for example ``US/Central``.""" + policy: NotRequired[SchedulePolicyTypedDict] + schedule_id: NotRequired[Nullable[str]] + r"""Unique identifier for the schedule.""" + + +class ScheduleDefinition(BaseModel): + r"""Specification of the times scheduled actions may occur. + + The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and + :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + + Used for input where schedule_id is optional (can be provided or auto-generated). + """ + + input: Any + r"""Input to provide to the workflow when starting it.""" + + calendars: Optional[List[ScheduleCalendar]] = None + r"""Calendar-based specification of times.""" + + intervals: Optional[List[ScheduleInterval]] = None + r"""Interval-based specification of times.""" + + cron_expressions: Optional[List[str]] = None + r"""Cron-based specification of times.""" + + skip: Optional[List[ScheduleCalendar]] = None + r"""Set of calendar times to skip.""" + + start_at: OptionalNullable[datetime] = UNSET + r"""Time after which the first action may be run.""" + + end_at: OptionalNullable[datetime] = UNSET + r"""Time after which no more actions will be run.""" + + jitter: OptionalNullable[str] = UNSET + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + + time_zone_name: OptionalNullable[str] = UNSET + r"""IANA time zone name, for example ``US/Central``.""" + + policy: Optional[SchedulePolicy] = None + + schedule_id: OptionalNullable[str] = UNSET + r"""Unique identifier for the schedule.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "calendars", + "intervals", + "cron_expressions", + "skip", + "start_at", + "end_at", + "jitter", + "time_zone_name", + "policy", + "schedule_id", + ] + ) + nullable_fields = set( + ["start_at", "end_at", "jitter", "time_zone_name", "schedule_id"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/scheduledefinitionoutput.py b/src/mistralai/client/models/scheduledefinitionoutput.py new file mode 100644 index 00000000..f40470fa --- /dev/null +++ b/src/mistralai/client/models/scheduledefinitionoutput.py @@ -0,0 +1,133 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 69dc15b9a0d6 + +from __future__ import annotations +from .schedulecalendar import ScheduleCalendar, ScheduleCalendarTypedDict +from .scheduleinterval import ScheduleInterval, ScheduleIntervalTypedDict +from .schedulepolicy import SchedulePolicy, SchedulePolicyTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ScheduleDefinitionOutputTypedDict(TypedDict): + r"""Output representation of a schedule with required schedule_id. + + Used when returning schedules from the API where schedule_id is always present. + """ + + input: Any + r"""Input to provide to the workflow when starting it.""" + schedule_id: str + r"""Unique identifier for the schedule.""" + calendars: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Calendar-based specification of times.""" + intervals: NotRequired[List[ScheduleIntervalTypedDict]] + r"""Interval-based specification of times.""" + cron_expressions: NotRequired[List[str]] + r"""Cron-based specification of times.""" + skip: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Set of calendar times to skip.""" + start_at: NotRequired[Nullable[datetime]] + r"""Time after which the first action may be run.""" + end_at: NotRequired[Nullable[datetime]] + r"""Time after which no more actions will be run.""" + jitter: NotRequired[Nullable[str]] + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + time_zone_name: NotRequired[Nullable[str]] + r"""IANA time zone name, for example ``US/Central``.""" + policy: NotRequired[SchedulePolicyTypedDict] + + +class ScheduleDefinitionOutput(BaseModel): + r"""Output representation of a schedule with required schedule_id. + + Used when returning schedules from the API where schedule_id is always present. + """ + + input: Any + r"""Input to provide to the workflow when starting it.""" + + schedule_id: str + r"""Unique identifier for the schedule.""" + + calendars: Optional[List[ScheduleCalendar]] = None + r"""Calendar-based specification of times.""" + + intervals: Optional[List[ScheduleInterval]] = None + r"""Interval-based specification of times.""" + + cron_expressions: Optional[List[str]] = None + r"""Cron-based specification of times.""" + + skip: Optional[List[ScheduleCalendar]] = None + r"""Set of calendar times to skip.""" + + start_at: OptionalNullable[datetime] = UNSET + r"""Time after which the first action may be run.""" + + end_at: OptionalNullable[datetime] = UNSET + r"""Time after which no more actions will be run.""" + + jitter: OptionalNullable[str] = UNSET + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + + time_zone_name: OptionalNullable[str] = UNSET + r"""IANA time zone name, for example ``US/Central``.""" + + policy: Optional[SchedulePolicy] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "calendars", + "intervals", + "cron_expressions", + "skip", + "start_at", + "end_at", + "jitter", + "time_zone_name", + "policy", + ] + ) + nullable_fields = set(["start_at", "end_at", "jitter", "time_zone_name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/scheduleinterval.py b/src/mistralai/client/models/scheduleinterval.py new file mode 100644 index 00000000..c01cf852 --- /dev/null +++ b/src/mistralai/client/models/scheduleinterval.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1d89c2043566 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ScheduleIntervalTypedDict(TypedDict): + every: str + offset: NotRequired[Nullable[str]] + + +class ScheduleInterval(BaseModel): + every: str + + offset: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["offset"]) + nullable_fields = set(["offset"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/scheduleoverlappolicy.py b/src/mistralai/client/models/scheduleoverlappolicy.py new file mode 100644 index 00000000..13db3947 --- /dev/null +++ b/src/mistralai/client/models/scheduleoverlappolicy.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a729c26f9c43 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedInt +from typing import Literal, Union + + +ScheduleOverlapPolicy = Union[ + Literal[ + 1, + 2, + 3, + 4, + 5, + 6, + ], + UnrecognizedInt, +] +r"""Controls what happens when a workflow would be started by a schedule but +one is already running. +""" diff --git a/src/mistralai/client/models/schedulepolicy.py b/src/mistralai/client/models/schedulepolicy.py new file mode 100644 index 00000000..9a507656 --- /dev/null +++ b/src/mistralai/client/models/schedulepolicy.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f326afe63958 + +from __future__ import annotations +from .scheduleoverlappolicy import ScheduleOverlapPolicy +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class SchedulePolicyTypedDict(TypedDict): + catchup_window_seconds: NotRequired[int] + r"""After a Temporal server is unavailable, amount of time in seconds in the past to execute missed actions.""" + overlap: NotRequired[ScheduleOverlapPolicy] + r"""Controls what happens when a workflow would be started by a schedule but + one is already running. + """ + pause_on_failure: NotRequired[bool] + r"""Whether to pause the schedule after a workflow failure.""" + + +class SchedulePolicy(BaseModel): + catchup_window_seconds: Optional[int] = 31536000 + r"""After a Temporal server is unavailable, amount of time in seconds in the past to execute missed actions.""" + + overlap: Optional[ScheduleOverlapPolicy] = None + r"""Controls what happens when a workflow would be started by a schedule but + one is already running. + """ + + pause_on_failure: Optional[bool] = False + r"""Whether to pause the schedule after a workflow failure.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["catchup_window_seconds", "overlap", "pause_on_failure"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/schedulerange.py b/src/mistralai/client/models/schedulerange.py new file mode 100644 index 00000000..e30eed16 --- /dev/null +++ b/src/mistralai/client/models/schedulerange.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f9d442a062b5 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ScheduleRangeTypedDict(TypedDict): + start: int + end: NotRequired[int] + step: NotRequired[int] + + +class ScheduleRange(BaseModel): + start: int + + end: Optional[int] = 0 + + step: Optional[int] = 0 + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["end", "step"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop.py b/src/mistralai/client/models/signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop.py new file mode 100644 index 00000000..c61ed019 --- /dev/null +++ b/src/mistralai/client/models/signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 16c54f54e60f + +from __future__ import annotations +from .signalinvocationbody import SignalInvocationBody, SignalInvocationBodyTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequestTypedDict( + TypedDict +): + execution_id: str + signal_invocation_body: SignalInvocationBodyTypedDict + + +class SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequest( + BaseModel +): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + signal_invocation_body: Annotated[ + SignalInvocationBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/signaldefinition.py b/src/mistralai/client/models/signaldefinition.py new file mode 100644 index 00000000..434e1230 --- /dev/null +++ b/src/mistralai/client/models/signaldefinition.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f1c1ac98a427 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class SignalDefinitionTypedDict(TypedDict): + name: str + r"""Name of the signal""" + input_schema: Dict[str, Any] + r"""Input JSON schema of the signal's model""" + description: NotRequired[Nullable[str]] + r"""Description of the signal""" + + +class SignalDefinition(BaseModel): + name: str + r"""Name of the signal""" + + input_schema: Dict[str, Any] + r"""Input JSON schema of the signal's model""" + + description: OptionalNullable[str] = UNSET + r"""Description of the signal""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description"]) + nullable_fields = set(["description"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/signalinvocationbody.py b/src/mistralai/client/models/signalinvocationbody.py new file mode 100644 index 00000000..3b7a1ff1 --- /dev/null +++ b/src/mistralai/client/models/signalinvocationbody.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0fd96a7c058b + +from __future__ import annotations +from .encodedpayloadoptions import EncodedPayloadOptions +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +class SignalInvocationBodyNetworkEncodedInputTypedDict(TypedDict): + b64payload: str + r"""The encoded payload""" + encoding_options: NotRequired[List[EncodedPayloadOptions]] + r"""The encoding of the payload""" + empty: NotRequired[bool] + r"""Whether the payload is empty""" + + +class SignalInvocationBodyNetworkEncodedInput(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + b64payload: str + r"""The encoded payload""" + + encoding_options: Optional[List[EncodedPayloadOptions]] = None + r"""The encoding of the payload""" + + empty: Optional[bool] = False + r"""Whether the payload is empty""" + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["encoding_options", "empty"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +SignalInvocationBodyInputTypedDict = TypeAliasType( + "SignalInvocationBodyInputTypedDict", + Union[SignalInvocationBodyNetworkEncodedInputTypedDict, Dict[str, Any]], +) +r"""Input data for the signal, matching its schema""" + + +SignalInvocationBodyInput = TypeAliasType( + "SignalInvocationBodyInput", + Union[SignalInvocationBodyNetworkEncodedInput, Dict[str, Any]], +) +r"""Input data for the signal, matching its schema""" + + +class SignalInvocationBodyTypedDict(TypedDict): + name: str + r"""The name of the signal to send""" + input: NotRequired[Nullable[SignalInvocationBodyInputTypedDict]] + r"""Input data for the signal, matching its schema""" + + +class SignalInvocationBody(BaseModel): + name: str + r"""The name of the signal to send""" + + input: OptionalNullable[SignalInvocationBodyInput] = UNSET + r"""Input data for the signal, matching its schema""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["input"]) + nullable_fields = set(["input"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/signalworkflowresponse.py b/src/mistralai/client/models/signalworkflowresponse.py new file mode 100644 index 00000000..2d9ea356 --- /dev/null +++ b/src/mistralai/client/models/signalworkflowresponse.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e1844a7da20b + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class SignalWorkflowResponseTypedDict(TypedDict): + message: NotRequired[str] + + +class SignalWorkflowResponse(BaseModel): + message: Optional[str] = "Signal accepted" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/stream_v1_workflows_executions_execution_id_stream_getop.py b/src/mistralai/client/models/stream_v1_workflows_executions_execution_id_stream_getop.py new file mode 100644 index 00000000..5282e52a --- /dev/null +++ b/src/mistralai/client/models/stream_v1_workflows_executions_execution_id_stream_getop.py @@ -0,0 +1,101 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 793a9301522f + +from __future__ import annotations +from .eventsource import EventSource +from .streameventssepayload import StreamEventSsePayload, StreamEventSsePayloadTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class StreamV1WorkflowsExecutionsExecutionIDStreamGetRequestTypedDict(TypedDict): + execution_id: str + event_source: NotRequired[Nullable[EventSource]] + last_event_id: NotRequired[Nullable[str]] + + +class StreamV1WorkflowsExecutionsExecutionIDStreamGetRequest(BaseModel): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + event_source: Annotated[ + OptionalNullable[EventSource], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + last_event_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_source", "last_event_id"]) + nullable_fields = set(["event_source", "last_event_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBodyTypedDict(TypedDict): + r"""Stream of Server-Sent Events (SSE)""" + + event: NotRequired[str] + data: NotRequired[StreamEventSsePayloadTypedDict] + id: NotRequired[str] + retry: NotRequired[int] + + +class StreamV1WorkflowsExecutionsExecutionIDStreamGetResponseBody(BaseModel): + r"""Stream of Server-Sent Events (SSE)""" + + event: Optional[str] = None + + data: Optional[StreamEventSsePayload] = None + + id: Optional[str] = None + + retry: Optional[int] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event", "data", "id", "retry"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/streameventssepayload.py b/src/mistralai/client/models/streameventssepayload.py new file mode 100644 index 00000000..2c662a65 --- /dev/null +++ b/src/mistralai/client/models/streameventssepayload.py @@ -0,0 +1,168 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c6becbbd80bc + +from __future__ import annotations +from .activitytaskcompletedresponse import ( + ActivityTaskCompletedResponse, + ActivityTaskCompletedResponseTypedDict, +) +from .activitytaskfailedresponse import ( + ActivityTaskFailedResponse, + ActivityTaskFailedResponseTypedDict, +) +from .activitytaskretryingresponse import ( + ActivityTaskRetryingResponse, + ActivityTaskRetryingResponseTypedDict, +) +from .activitytaskstartedresponse import ( + ActivityTaskStartedResponse, + ActivityTaskStartedResponseTypedDict, +) +from .customtaskcanceledresponse import ( + CustomTaskCanceledResponse, + CustomTaskCanceledResponseTypedDict, +) +from .customtaskcompletedresponse import ( + CustomTaskCompletedResponse, + CustomTaskCompletedResponseTypedDict, +) +from .customtaskfailedresponse import ( + CustomTaskFailedResponse, + CustomTaskFailedResponseTypedDict, +) +from .customtaskinprogressresponse import ( + CustomTaskInProgressResponse, + CustomTaskInProgressResponseTypedDict, +) +from .customtaskstartedresponse import ( + CustomTaskStartedResponse, + CustomTaskStartedResponseTypedDict, +) +from .customtasktimedoutresponse import ( + CustomTaskTimedOutResponse, + CustomTaskTimedOutResponseTypedDict, +) +from .streameventworkflowcontext import ( + StreamEventWorkflowContext, + StreamEventWorkflowContextTypedDict, +) +from .workflowexecutioncanceledresponse import ( + WorkflowExecutionCanceledResponse, + WorkflowExecutionCanceledResponseTypedDict, +) +from .workflowexecutioncompletedresponse import ( + WorkflowExecutionCompletedResponse, + WorkflowExecutionCompletedResponseTypedDict, +) +from .workflowexecutioncontinuedasnewresponse import ( + WorkflowExecutionContinuedAsNewResponse, + WorkflowExecutionContinuedAsNewResponseTypedDict, +) +from .workflowexecutionfailedresponse import ( + WorkflowExecutionFailedResponse, + WorkflowExecutionFailedResponseTypedDict, +) +from .workflowexecutionstartedresponse import ( + WorkflowExecutionStartedResponse, + WorkflowExecutionStartedResponseTypedDict, +) +from .workflowtaskfailedresponse import ( + WorkflowTaskFailedResponse, + WorkflowTaskFailedResponseTypedDict, +) +from .workflowtasktimedoutresponse import ( + WorkflowTaskTimedOutResponse, + WorkflowTaskTimedOutResponseTypedDict, +) +from datetime import datetime +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Any, Dict, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +StreamEventSsePayloadDataTypedDict = TypeAliasType( + "StreamEventSsePayloadDataTypedDict", + Union[ + WorkflowExecutionStartedResponseTypedDict, + WorkflowExecutionCompletedResponseTypedDict, + WorkflowExecutionFailedResponseTypedDict, + WorkflowExecutionCanceledResponseTypedDict, + WorkflowExecutionContinuedAsNewResponseTypedDict, + WorkflowTaskTimedOutResponseTypedDict, + WorkflowTaskFailedResponseTypedDict, + CustomTaskStartedResponseTypedDict, + CustomTaskInProgressResponseTypedDict, + CustomTaskCompletedResponseTypedDict, + CustomTaskFailedResponseTypedDict, + CustomTaskTimedOutResponseTypedDict, + CustomTaskCanceledResponseTypedDict, + ActivityTaskStartedResponseTypedDict, + ActivityTaskCompletedResponseTypedDict, + ActivityTaskRetryingResponseTypedDict, + ActivityTaskFailedResponseTypedDict, + ], +) + + +StreamEventSsePayloadData = TypeAliasType( + "StreamEventSsePayloadData", + Union[ + WorkflowExecutionStartedResponse, + WorkflowExecutionCompletedResponse, + WorkflowExecutionFailedResponse, + WorkflowExecutionCanceledResponse, + WorkflowExecutionContinuedAsNewResponse, + WorkflowTaskTimedOutResponse, + WorkflowTaskFailedResponse, + CustomTaskStartedResponse, + CustomTaskInProgressResponse, + CustomTaskCompletedResponse, + CustomTaskFailedResponse, + CustomTaskTimedOutResponse, + CustomTaskCanceledResponse, + ActivityTaskStartedResponse, + ActivityTaskCompletedResponse, + ActivityTaskRetryingResponse, + ActivityTaskFailedResponse, + ], +) + + +class StreamEventSsePayloadTypedDict(TypedDict): + stream: str + data: StreamEventSsePayloadDataTypedDict + workflow_context: StreamEventWorkflowContextTypedDict + broker_sequence: int + timestamp: NotRequired[datetime] + metadata: NotRequired[Dict[str, Any]] + + +class StreamEventSsePayload(BaseModel): + stream: str + + data: StreamEventSsePayloadData + + workflow_context: StreamEventWorkflowContext + + broker_sequence: int + + timestamp: Optional[datetime] = None + + metadata: Optional[Dict[str, Any]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["timestamp", "metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/streameventworkflowcontext.py b/src/mistralai/client/models/streameventworkflowcontext.py new file mode 100644 index 00000000..f24de860 --- /dev/null +++ b/src/mistralai/client/models/streameventworkflowcontext.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 14c00c79de78 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class StreamEventWorkflowContextTypedDict(TypedDict): + namespace: str + workflow_name: str + workflow_exec_id: str + parent_workflow_exec_id: NotRequired[Nullable[str]] + root_workflow_exec_id: NotRequired[Nullable[str]] + + +class StreamEventWorkflowContext(BaseModel): + namespace: str + + workflow_name: str + + workflow_exec_id: str + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + + root_workflow_exec_id: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["parent_workflow_exec_id", "root_workflow_exec_id"]) + nullable_fields = set(["parent_workflow_exec_id", "root_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/tempogettraceresponse.py b/src/mistralai/client/models/tempogettraceresponse.py new file mode 100644 index 00000000..8575b954 --- /dev/null +++ b/src/mistralai/client/models/tempogettraceresponse.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8bb3c013aa76 + +from __future__ import annotations +from .tempotracebatch import TempoTraceBatch, TempoTraceBatchTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class TempoGetTraceResponseTypedDict(TypedDict): + r"""Trace response in OpenTelemetry format. + + This is the unified trace format used across all trace providers (Tempo, ClickHouse, etc.). + Regardless of the underlying backend, all trace data is normalized to this Tempo-compatible + OpenTelemetry format to ensure consistency in the API response structure. + """ + + batches: NotRequired[List[TempoTraceBatchTypedDict]] + r"""The batches of the trace""" + + +class TempoGetTraceResponse(BaseModel): + r"""Trace response in OpenTelemetry format. + + This is the unified trace format used across all trace providers (Tempo, ClickHouse, etc.). + Regardless of the underlying backend, all trace data is normalized to this Tempo-compatible + OpenTelemetry format to ensure consistency in the API response structure. + """ + + batches: Optional[List[TempoTraceBatch]] = None + r"""The batches of the trace""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["batches"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/tempotraceattribute.py b/src/mistralai/client/models/tempotraceattribute.py new file mode 100644 index 00000000..71c1b1f2 --- /dev/null +++ b/src/mistralai/client/models/tempotraceattribute.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7d0ec3402dc0 + +from __future__ import annotations +from .tempotraceattributeboolvalue import ( + TempoTraceAttributeBoolValue, + TempoTraceAttributeBoolValueTypedDict, +) +from .tempotraceattributeintvalue import ( + TempoTraceAttributeIntValue, + TempoTraceAttributeIntValueTypedDict, +) +from .tempotraceattributestringvalue import ( + TempoTraceAttributeStringValue, + TempoTraceAttributeStringValueTypedDict, +) +from mistralai.client.types import BaseModel +from typing import Union +from typing_extensions import TypeAliasType, TypedDict + + +TempoTraceAttributeValueTypedDict = TypeAliasType( + "TempoTraceAttributeValueTypedDict", + Union[ + TempoTraceAttributeStringValueTypedDict, + TempoTraceAttributeIntValueTypedDict, + TempoTraceAttributeBoolValueTypedDict, + ], +) +r"""The value of the attribute""" + + +TempoTraceAttributeValue = TypeAliasType( + "TempoTraceAttributeValue", + Union[ + TempoTraceAttributeStringValue, + TempoTraceAttributeIntValue, + TempoTraceAttributeBoolValue, + ], +) +r"""The value of the attribute""" + + +class TempoTraceAttributeTypedDict(TypedDict): + key: str + r"""The key of the attribute""" + value: TempoTraceAttributeValueTypedDict + r"""The value of the attribute""" + + +class TempoTraceAttribute(BaseModel): + key: str + r"""The key of the attribute""" + + value: TempoTraceAttributeValue + r"""The value of the attribute""" diff --git a/src/mistralai/client/models/tempotraceattributeboolvalue.py b/src/mistralai/client/models/tempotraceattributeboolvalue.py new file mode 100644 index 00000000..72fb79d0 --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributeboolvalue.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c7c383a6c05f + +from __future__ import annotations +from mistralai.client.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class TempoTraceAttributeBoolValueTypedDict(TypedDict): + bool_value: bool + r"""The boolean value of the attribute""" + + +class TempoTraceAttributeBoolValue(BaseModel): + bool_value: Annotated[bool, pydantic.Field(alias="boolValue")] + r"""The boolean value of the attribute""" + + +try: + TempoTraceAttributeBoolValue.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tempotraceattributeintvalue.py b/src/mistralai/client/models/tempotraceattributeintvalue.py new file mode 100644 index 00000000..6ffe7efe --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributeintvalue.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c4659ad7a2a5 + +from __future__ import annotations +from mistralai.client.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class TempoTraceAttributeIntValueTypedDict(TypedDict): + int_value: str + r"""The integer value of the attribute""" + + +class TempoTraceAttributeIntValue(BaseModel): + int_value: Annotated[str, pydantic.Field(alias="intValue")] + r"""The integer value of the attribute""" + + +try: + TempoTraceAttributeIntValue.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tempotraceattributestringvalue.py b/src/mistralai/client/models/tempotraceattributestringvalue.py new file mode 100644 index 00000000..f4dea639 --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributestringvalue.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2dcdd05a5115 + +from __future__ import annotations +from mistralai.client.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class TempoTraceAttributeStringValueTypedDict(TypedDict): + string_value: str + r"""The string value of the attribute""" + + +class TempoTraceAttributeStringValue(BaseModel): + string_value: Annotated[str, pydantic.Field(alias="stringValue")] + r"""The string value of the attribute""" + + +try: + TempoTraceAttributeStringValue.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tempotracebatch.py b/src/mistralai/client/models/tempotracebatch.py new file mode 100644 index 00000000..7f508047 --- /dev/null +++ b/src/mistralai/client/models/tempotracebatch.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 969acd9d6220 + +from __future__ import annotations +from .tempotraceresource import TempoTraceResource, TempoTraceResourceTypedDict +from .tempotracescopespan import TempoTraceScopeSpan, TempoTraceScopeSpanTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TempoTraceBatchTypedDict(TypedDict): + resource: TempoTraceResourceTypedDict + scope_spans: NotRequired[List[TempoTraceScopeSpanTypedDict]] + r"""The spans of the scope""" + + +class TempoTraceBatch(BaseModel): + resource: TempoTraceResource + + scope_spans: Annotated[ + Optional[List[TempoTraceScopeSpan]], pydantic.Field(alias="scopeSpans") + ] = None + r"""The spans of the scope""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["scopeSpans"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + TempoTraceBatch.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tempotraceevent.py b/src/mistralai/client/models/tempotraceevent.py new file mode 100644 index 00000000..bda2115a --- /dev/null +++ b/src/mistralai/client/models/tempotraceevent.py @@ -0,0 +1,52 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 98dd1b838524 + +from __future__ import annotations +from .tempotraceattribute import TempoTraceAttribute, TempoTraceAttributeTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TempoTraceEventTypedDict(TypedDict): + name: str + r"""The name of the event""" + time_unix_nano: str + r"""The time of the event in Unix nano""" + attributes: NotRequired[List[TempoTraceAttributeTypedDict]] + r"""The attributes of the event""" + + +class TempoTraceEvent(BaseModel): + name: str + r"""The name of the event""" + + time_unix_nano: Annotated[str, pydantic.Field(alias="timeUnixNano")] + r"""The time of the event in Unix nano""" + + attributes: Optional[List[TempoTraceAttribute]] = None + r"""The attributes of the event""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["attributes"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + TempoTraceEvent.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tempotraceresource.py b/src/mistralai/client/models/tempotraceresource.py new file mode 100644 index 00000000..42c4d56a --- /dev/null +++ b/src/mistralai/client/models/tempotraceresource.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cc8a7ff3feea + +from __future__ import annotations +from .tempotraceattribute import TempoTraceAttribute, TempoTraceAttributeTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class TempoTraceResourceTypedDict(TypedDict): + attributes: NotRequired[List[TempoTraceAttributeTypedDict]] + r"""The attributes of the resource""" + + +class TempoTraceResource(BaseModel): + attributes: Optional[List[TempoTraceAttribute]] = None + r"""The attributes of the resource""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["attributes"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/tempotracescope.py b/src/mistralai/client/models/tempotracescope.py new file mode 100644 index 00000000..3e302f81 --- /dev/null +++ b/src/mistralai/client/models/tempotracescope.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a2da1a3b8198 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class TempoTraceScopeTypedDict(TypedDict): + name: str + r"""The name of the span""" + + +class TempoTraceScope(BaseModel): + name: str + r"""The name of the span""" diff --git a/src/mistralai/client/models/tempotracescopekind.py b/src/mistralai/client/models/tempotracescopekind.py new file mode 100644 index 00000000..a26d5c38 --- /dev/null +++ b/src/mistralai/client/models/tempotracescopekind.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 40c697c1e617 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +TempoTraceScopeKind = Union[ + Literal[ + "SPAN_KIND_INTERNAL", + "SPAN_KIND_SERVER", + "SPAN_KIND_CLIENT", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/tempotracescopespan.py b/src/mistralai/client/models/tempotracescopespan.py new file mode 100644 index 00000000..362f3c99 --- /dev/null +++ b/src/mistralai/client/models/tempotracescopespan.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cb248e9c0a00 + +from __future__ import annotations +from .tempotracescope import TempoTraceScope, TempoTraceScopeTypedDict +from .tempotracespan import TempoTraceSpan, TempoTraceSpanTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class TempoTraceScopeSpanTypedDict(TypedDict): + scope: TempoTraceScopeTypedDict + spans: NotRequired[List[TempoTraceSpanTypedDict]] + r"""The spans of the scope""" + + +class TempoTraceScopeSpan(BaseModel): + scope: TempoTraceScope + + spans: Optional[List[TempoTraceSpan]] = None + r"""The spans of the scope""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["spans"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/tempotracespan.py b/src/mistralai/client/models/tempotracespan.py new file mode 100644 index 00000000..51b181ba --- /dev/null +++ b/src/mistralai/client/models/tempotracespan.py @@ -0,0 +1,99 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f36568c83a96 + +from __future__ import annotations +from .tempotraceattribute import TempoTraceAttribute, TempoTraceAttributeTypedDict +from .tempotraceevent import TempoTraceEvent, TempoTraceEventTypedDict +from .tempotracescopekind import TempoTraceScopeKind +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TempoTraceSpanTypedDict(TypedDict): + trace_id: str + r"""The trace ID of the scope""" + span_id: str + r"""The span ID of the scope""" + name: str + r"""The name of the scope""" + kind: TempoTraceScopeKind + start_time_unix_nano: str + r"""The start time of the scope in Unix nano""" + end_time_unix_nano: str + r"""The end time of the scope in Unix nano""" + parent_span_id: NotRequired[Nullable[str]] + r"""The parent span ID of the scope""" + attributes: NotRequired[List[TempoTraceAttributeTypedDict]] + r"""The attributes of the scope""" + events: NotRequired[List[TempoTraceEventTypedDict]] + r"""The events of the scope""" + + +class TempoTraceSpan(BaseModel): + trace_id: Annotated[str, pydantic.Field(alias="traceId")] + r"""The trace ID of the scope""" + + span_id: Annotated[str, pydantic.Field(alias="spanId")] + r"""The span ID of the scope""" + + name: str + r"""The name of the scope""" + + kind: TempoTraceScopeKind + + start_time_unix_nano: Annotated[str, pydantic.Field(alias="startTimeUnixNano")] + r"""The start time of the scope in Unix nano""" + + end_time_unix_nano: Annotated[str, pydantic.Field(alias="endTimeUnixNano")] + r"""The end time of the scope in Unix nano""" + + parent_span_id: Annotated[ + OptionalNullable[str], pydantic.Field(alias="parentSpanId") + ] = UNSET + r"""The parent span ID of the scope""" + + attributes: Optional[List[TempoTraceAttribute]] = None + r"""The attributes of the scope""" + + events: Optional[List[TempoTraceEvent]] = None + r"""The events of the scope""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["parentSpanId", "attributes", "events"]) + nullable_fields = set(["parentSpanId"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + TempoTraceSpan.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop.py b/src/mistralai/client/models/terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop.py new file mode 100644 index 00000000..771c1650 --- /dev/null +++ b/src/mistralai/client/models/terminate_workflow_execution_v1_workflows_executions_execution_id_terminate_postop.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 458eee7d2603 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequestTypedDict( + TypedDict +): + execution_id: str + + +class TerminateWorkflowExecutionV1WorkflowsExecutionsExecutionIDTerminatePostRequest( + BaseModel +): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/timeseriesmetric.py b/src/mistralai/client/models/timeseriesmetric.py new file mode 100644 index 00000000..a0eb0c9c --- /dev/null +++ b/src/mistralai/client/models/timeseriesmetric.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7f91751795ac + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List, Union +from typing_extensions import TypeAliasType, TypedDict + + +TimeSeriesMetricValue1TypedDict = TypeAliasType( + "TimeSeriesMetricValue1TypedDict", Union[int, float] +) + + +TimeSeriesMetricValue1 = TypeAliasType("TimeSeriesMetricValue1", Union[int, float]) + + +TimeSeriesMetricValue2TypedDict = TypeAliasType( + "TimeSeriesMetricValue2TypedDict", Union[int, TimeSeriesMetricValue1TypedDict] +) + + +TimeSeriesMetricValue2 = TypeAliasType( + "TimeSeriesMetricValue2", Union[int, TimeSeriesMetricValue1] +) + + +class TimeSeriesMetricTypedDict(TypedDict): + r"""Time-series metric with timestamp-value pairs.""" + + value: List[List[TimeSeriesMetricValue2TypedDict]] + + +class TimeSeriesMetric(BaseModel): + r"""Time-series metric with timestamp-value pairs.""" + + value: List[List[TimeSeriesMetricValue2]] diff --git a/src/mistralai/client/models/unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop.py b/src/mistralai/client/models/unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop.py new file mode 100644 index 00000000..3dc55512 --- /dev/null +++ b/src/mistralai/client/models/unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9df426343c2c + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequestTypedDict( + TypedDict +): + workflow_identifier: str + + +class UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest(BaseModel): + workflow_identifier: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop.py b/src/mistralai/client/models/unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop.py new file mode 100644 index 00000000..eac992d5 --- /dev/null +++ b/src/mistralai/client/models/unschedule_workflow_v1_workflows_schedules_schedule_id_deleteop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 114f67717003 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequestTypedDict(TypedDict): + schedule_id: str + + +class UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/update_workflow_execution_v1_workflows_executions_execution_id_updates_postop.py b/src/mistralai/client/models/update_workflow_execution_v1_workflows_executions_execution_id_updates_postop.py new file mode 100644 index 00000000..30ff2bae --- /dev/null +++ b/src/mistralai/client/models/update_workflow_execution_v1_workflows_executions_execution_id_updates_postop.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5799cc4ab66e + +from __future__ import annotations +from .updateinvocationbody import UpdateInvocationBody, UpdateInvocationBodyTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequestTypedDict( + TypedDict +): + execution_id: str + update_invocation_body: UpdateInvocationBodyTypedDict + + +class UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest( + BaseModel +): + execution_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_invocation_body: Annotated[ + UpdateInvocationBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/update_workflow_v1_workflows_workflow_identifier_putop.py b/src/mistralai/client/models/update_workflow_v1_workflows_workflow_identifier_putop.py new file mode 100644 index 00000000..9ee9b6d2 --- /dev/null +++ b/src/mistralai/client/models/update_workflow_v1_workflows_workflow_identifier_putop.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c537bd5a9dd1 + +from __future__ import annotations +from .workflowupdaterequest import WorkflowUpdateRequest, WorkflowUpdateRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequestTypedDict(TypedDict): + workflow_identifier: str + workflow_update_request: WorkflowUpdateRequestTypedDict + + +class UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest(BaseModel): + workflow_identifier: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_update_request: Annotated[ + WorkflowUpdateRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/updatedefinition.py b/src/mistralai/client/models/updatedefinition.py new file mode 100644 index 00000000..e878c876 --- /dev/null +++ b/src/mistralai/client/models/updatedefinition.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 143f97683a02 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class UpdateDefinitionTypedDict(TypedDict): + name: str + r"""Name of the update""" + input_schema: Dict[str, Any] + r"""Input JSON schema of the update's model""" + description: NotRequired[Nullable[str]] + r"""Description of the update""" + output_schema: NotRequired[Nullable[Dict[str, Any]]] + r"""Output JSON schema of the update's model""" + + +class UpdateDefinition(BaseModel): + name: str + r"""Name of the update""" + + input_schema: Dict[str, Any] + r"""Input JSON schema of the update's model""" + + description: OptionalNullable[str] = UNSET + r"""Description of the update""" + + output_schema: OptionalNullable[Dict[str, Any]] = UNSET + r"""Output JSON schema of the update's model""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description", "output_schema"]) + nullable_fields = set(["description", "output_schema"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/updateinvocationbody.py b/src/mistralai/client/models/updateinvocationbody.py new file mode 100644 index 00000000..a300bd20 --- /dev/null +++ b/src/mistralai/client/models/updateinvocationbody.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b8558eff0be0 + +from __future__ import annotations +from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +UpdateInvocationBodyInputTypedDict = TypeAliasType( + "UpdateInvocationBodyInputTypedDict", + Union[NetworkEncodedInputTypedDict, Dict[str, Any]], +) +r"""Input data for the update, matching its schema""" + + +UpdateInvocationBodyInput = TypeAliasType( + "UpdateInvocationBodyInput", Union[NetworkEncodedInput, Dict[str, Any]] +) +r"""Input data for the update, matching its schema""" + + +class UpdateInvocationBodyTypedDict(TypedDict): + name: str + r"""The name of the update to request""" + input: NotRequired[Nullable[UpdateInvocationBodyInputTypedDict]] + r"""Input data for the update, matching its schema""" + + +class UpdateInvocationBody(BaseModel): + name: str + r"""The name of the update to request""" + + input: OptionalNullable[UpdateInvocationBodyInput] = UNSET + r"""Input data for the update, matching its schema""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["input"]) + nullable_fields = set(["input"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/updateworkflowresponse.py b/src/mistralai/client/models/updateworkflowresponse.py new file mode 100644 index 00000000..699bef98 --- /dev/null +++ b/src/mistralai/client/models/updateworkflowresponse.py @@ -0,0 +1,20 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f5dcf717a0a1 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Any +from typing_extensions import TypedDict + + +class UpdateWorkflowResponseTypedDict(TypedDict): + update_name: str + result: Any + r"""The result of the Update workflow call""" + + +class UpdateWorkflowResponse(BaseModel): + update_name: str + + result: Any + r"""The result of the Update workflow call""" diff --git a/src/mistralai/client/models/workflow.py b/src/mistralai/client/models/workflow.py new file mode 100644 index 00000000..5edf326c --- /dev/null +++ b/src/mistralai/client/models/workflow.py @@ -0,0 +1,106 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1548cd73984e + +from __future__ import annotations +from .workflowtype import WorkflowType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowTypedDict(TypedDict): + id: str + r"""Unique identifier of the workflow""" + name: str + r"""Name of the workflow""" + display_name: str + r"""Display name of the workflow""" + type: WorkflowType + customer_id: str + r"""Customer ID of the workflow""" + workspace_id: str + r"""Workspace ID of the workflow""" + description: NotRequired[Nullable[str]] + r"""Description of the workflow""" + shared_namespace: NotRequired[Nullable[str]] + r"""Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow')""" + available_in_chat_assistant: NotRequired[bool] + r"""Whether the workflow is available in chat assistant""" + is_technical: NotRequired[bool] + r"""Whether the workflow is technical (e.g. SDK-managed)""" + archived: NotRequired[bool] + r"""Whether the workflow is archived""" + + +class Workflow(BaseModel): + id: str + r"""Unique identifier of the workflow""" + + name: str + r"""Name of the workflow""" + + display_name: str + r"""Display name of the workflow""" + + type: WorkflowType + + customer_id: str + r"""Customer ID of the workflow""" + + workspace_id: str + r"""Workspace ID of the workflow""" + + description: OptionalNullable[str] = UNSET + r"""Description of the workflow""" + + shared_namespace: OptionalNullable[str] = UNSET + r"""Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow')""" + + available_in_chat_assistant: Optional[bool] = False + r"""Whether the workflow is available in chat assistant""" + + is_technical: Optional[bool] = False + r"""Whether the workflow is technical (e.g. SDK-managed)""" + + archived: Optional[bool] = False + r"""Whether the workflow is archived""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "description", + "shared_namespace", + "available_in_chat_assistant", + "is_technical", + "archived", + ] + ) + nullable_fields = set(["description", "shared_namespace"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowarchiveresponse.py b/src/mistralai/client/models/workflowarchiveresponse.py new file mode 100644 index 00000000..18eeccf2 --- /dev/null +++ b/src/mistralai/client/models/workflowarchiveresponse.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 64c479b7f9da + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowArchiveResponseTypedDict(TypedDict): + workflow: WorkflowTypedDict + + +class WorkflowArchiveResponse(BaseModel): + workflow: Workflow diff --git a/src/mistralai/client/models/workflowbasicdefinition.py b/src/mistralai/client/models/workflowbasicdefinition.py new file mode 100644 index 00000000..d2f3db1f --- /dev/null +++ b/src/mistralai/client/models/workflowbasicdefinition.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 34623036478d + +from __future__ import annotations +from .workflowmetadata import WorkflowMetadata, WorkflowMetadataTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowBasicDefinitionTypedDict(TypedDict): + id: str + name: str + r"""The name of the workflow""" + display_name: str + r"""The display name of the workflow""" + archived: bool + r"""Whether the workflow is archived""" + description: NotRequired[Nullable[str]] + r"""A description of the workflow""" + metadata: NotRequired[WorkflowMetadataTypedDict] + + +class WorkflowBasicDefinition(BaseModel): + id: str + + name: str + r"""The name of the workflow""" + + display_name: str + r"""The display name of the workflow""" + + archived: bool + r"""Whether the workflow is archived""" + + description: OptionalNullable[str] = UNSET + r"""A description of the workflow""" + + metadata: Optional[WorkflowMetadata] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description", "metadata"]) + nullable_fields = set(["description"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowcodedefinition.py b/src/mistralai/client/models/workflowcodedefinition.py new file mode 100644 index 00000000..f71b9ff1 --- /dev/null +++ b/src/mistralai/client/models/workflowcodedefinition.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 36fd5b898ddd + +from __future__ import annotations +from .querydefinition import QueryDefinition, QueryDefinitionTypedDict +from .signaldefinition import SignalDefinition, SignalDefinitionTypedDict +from .updatedefinition import UpdateDefinition, UpdateDefinitionTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowCodeDefinitionTypedDict(TypedDict): + input_schema: Dict[str, Any] + r"""Input schema of the workflow's run method""" + output_schema: NotRequired[Nullable[Dict[str, Any]]] + r"""Output schema of the workflow's run method""" + signals: NotRequired[List[SignalDefinitionTypedDict]] + r"""Signal handlers defined by the workflow""" + queries: NotRequired[List[QueryDefinitionTypedDict]] + r"""Query handlers defined by the workflow""" + updates: NotRequired[List[UpdateDefinitionTypedDict]] + r"""Update handlers defined by the workflow""" + enforce_determinism: NotRequired[bool] + r"""Whether the workflow enforces deterministic execution""" + execution_timeout: NotRequired[float] + r"""Maximum total execution time including retries and continue-as-new""" + + +class WorkflowCodeDefinition(BaseModel): + input_schema: Dict[str, Any] + r"""Input schema of the workflow's run method""" + + output_schema: OptionalNullable[Dict[str, Any]] = UNSET + r"""Output schema of the workflow's run method""" + + signals: Optional[List[SignalDefinition]] = None + r"""Signal handlers defined by the workflow""" + + queries: Optional[List[QueryDefinition]] = None + r"""Query handlers defined by the workflow""" + + updates: Optional[List[UpdateDefinition]] = None + r"""Update handlers defined by the workflow""" + + enforce_determinism: Optional[bool] = False + r"""Whether the workflow enforces deterministic execution""" + + execution_timeout: Optional[float] = None + r"""Maximum total execution time including retries and continue-as-new""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "output_schema", + "signals", + "queries", + "updates", + "enforce_determinism", + "execution_timeout", + ] + ) + nullable_fields = set(["output_schema"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workfloweventbatchrequest.py b/src/mistralai/client/models/workfloweventbatchrequest.py new file mode 100644 index 00000000..fba4a160 --- /dev/null +++ b/src/mistralai/client/models/workfloweventbatchrequest.py @@ -0,0 +1,137 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c0c0986a6b07 + +from __future__ import annotations +from .activitytaskcompletedrequest import ( + ActivityTaskCompletedRequest, + ActivityTaskCompletedRequestTypedDict, +) +from .activitytaskfailedrequest import ( + ActivityTaskFailedRequest, + ActivityTaskFailedRequestTypedDict, +) +from .activitytaskretryingrequest import ( + ActivityTaskRetryingRequest, + ActivityTaskRetryingRequestTypedDict, +) +from .activitytaskstartedrequest import ( + ActivityTaskStartedRequest, + ActivityTaskStartedRequestTypedDict, +) +from .customtaskcanceledrequest import ( + CustomTaskCanceledRequest, + CustomTaskCanceledRequestTypedDict, +) +from .customtaskcompletedrequest import ( + CustomTaskCompletedRequest, + CustomTaskCompletedRequestTypedDict, +) +from .customtaskfailedrequest import ( + CustomTaskFailedRequest, + CustomTaskFailedRequestTypedDict, +) +from .customtaskinprogressrequest import ( + CustomTaskInProgressRequest, + CustomTaskInProgressRequestTypedDict, +) +from .customtaskstartedrequest import ( + CustomTaskStartedRequest, + CustomTaskStartedRequestTypedDict, +) +from .customtasktimedoutrequest import ( + CustomTaskTimedOutRequest, + CustomTaskTimedOutRequestTypedDict, +) +from .workflowexecutioncanceledrequest import ( + WorkflowExecutionCanceledRequest, + WorkflowExecutionCanceledRequestTypedDict, +) +from .workflowexecutioncompletedrequest import ( + WorkflowExecutionCompletedRequest, + WorkflowExecutionCompletedRequestTypedDict, +) +from .workflowexecutioncontinuedasnewrequest import ( + WorkflowExecutionContinuedAsNewRequest, + WorkflowExecutionContinuedAsNewRequestTypedDict, +) +from .workflowexecutionfailedrequest import ( + WorkflowExecutionFailedRequest, + WorkflowExecutionFailedRequestTypedDict, +) +from .workflowexecutionstartedrequest import ( + WorkflowExecutionStartedRequest, + WorkflowExecutionStartedRequestTypedDict, +) +from .workflowtaskfailedrequest import ( + WorkflowTaskFailedRequest, + WorkflowTaskFailedRequestTypedDict, +) +from .workflowtasktimedoutrequest import ( + WorkflowTaskTimedOutRequest, + WorkflowTaskTimedOutRequestTypedDict, +) +from mistralai.client.types import BaseModel +from typing import List, Union +from typing_extensions import TypeAliasType, TypedDict + + +WorkflowEventBatchRequestEventTypedDict = TypeAliasType( + "WorkflowEventBatchRequestEventTypedDict", + Union[ + WorkflowExecutionStartedRequestTypedDict, + WorkflowExecutionCompletedRequestTypedDict, + WorkflowExecutionFailedRequestTypedDict, + WorkflowExecutionCanceledRequestTypedDict, + WorkflowExecutionContinuedAsNewRequestTypedDict, + WorkflowTaskTimedOutRequestTypedDict, + WorkflowTaskFailedRequestTypedDict, + CustomTaskStartedRequestTypedDict, + CustomTaskInProgressRequestTypedDict, + CustomTaskCompletedRequestTypedDict, + CustomTaskFailedRequestTypedDict, + CustomTaskTimedOutRequestTypedDict, + CustomTaskCanceledRequestTypedDict, + ActivityTaskStartedRequestTypedDict, + ActivityTaskCompletedRequestTypedDict, + ActivityTaskRetryingRequestTypedDict, + ActivityTaskFailedRequestTypedDict, + ], +) + + +WorkflowEventBatchRequestEvent = TypeAliasType( + "WorkflowEventBatchRequestEvent", + Union[ + WorkflowExecutionStartedRequest, + WorkflowExecutionCompletedRequest, + WorkflowExecutionFailedRequest, + WorkflowExecutionCanceledRequest, + WorkflowExecutionContinuedAsNewRequest, + WorkflowTaskTimedOutRequest, + WorkflowTaskFailedRequest, + CustomTaskStartedRequest, + CustomTaskInProgressRequest, + CustomTaskCompletedRequest, + CustomTaskFailedRequest, + CustomTaskTimedOutRequest, + CustomTaskCanceledRequest, + ActivityTaskStartedRequest, + ActivityTaskCompletedRequest, + ActivityTaskRetryingRequest, + ActivityTaskFailedRequest, + ], +) + + +class WorkflowEventBatchRequestTypedDict(TypedDict): + r"""Request model containing multiple workflow events.""" + + events: List[WorkflowEventBatchRequestEventTypedDict] + r"""List of workflow events to send.""" + + +class WorkflowEventBatchRequest(BaseModel): + r"""Request model containing multiple workflow events.""" + + events: List[WorkflowEventBatchRequestEvent] + r"""List of workflow events to send.""" diff --git a/src/mistralai/client/models/workfloweventbatchresponse.py b/src/mistralai/client/models/workfloweventbatchresponse.py new file mode 100644 index 00000000..0aa842a3 --- /dev/null +++ b/src/mistralai/client/models/workfloweventbatchresponse.py @@ -0,0 +1,74 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4cafe49944be + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from pydantic import model_serializer +from typing import Literal, Union +from typing_extensions import NotRequired, TypedDict + + +WorkflowEventBatchResponseStatus = Union[ + Literal[ + "success", + "error", + ], + UnrecognizedStr, +] +r"""Status of the batch event reception""" + + +class WorkflowEventBatchResponseTypedDict(TypedDict): + r"""Response model for batch workflow event reception.""" + + status: WorkflowEventBatchResponseStatus + r"""Status of the batch event reception""" + events_received: int + r"""Number of events successfully received""" + message: NotRequired[Nullable[str]] + r"""Optional message""" + + +class WorkflowEventBatchResponse(BaseModel): + r"""Response model for batch workflow event reception.""" + + status: WorkflowEventBatchResponseStatus + r"""Status of the batch event reception""" + + events_received: int + r"""Number of events successfully received""" + + message: OptionalNullable[str] = UNSET + r"""Optional message""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message"]) + nullable_fields = set(["message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workfloweventrequest.py b/src/mistralai/client/models/workfloweventrequest.py new file mode 100644 index 00000000..0a2c7579 --- /dev/null +++ b/src/mistralai/client/models/workfloweventrequest.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f41edbb269a4 + +from __future__ import annotations +from .activitytaskcompletedrequest import ( + ActivityTaskCompletedRequest, + ActivityTaskCompletedRequestTypedDict, +) +from .activitytaskfailedrequest import ( + ActivityTaskFailedRequest, + ActivityTaskFailedRequestTypedDict, +) +from .activitytaskretryingrequest import ( + ActivityTaskRetryingRequest, + ActivityTaskRetryingRequestTypedDict, +) +from .activitytaskstartedrequest import ( + ActivityTaskStartedRequest, + ActivityTaskStartedRequestTypedDict, +) +from .customtaskcanceledrequest import ( + CustomTaskCanceledRequest, + CustomTaskCanceledRequestTypedDict, +) +from .customtaskcompletedrequest import ( + CustomTaskCompletedRequest, + CustomTaskCompletedRequestTypedDict, +) +from .customtaskfailedrequest import ( + CustomTaskFailedRequest, + CustomTaskFailedRequestTypedDict, +) +from .customtaskinprogressrequest import ( + CustomTaskInProgressRequest, + CustomTaskInProgressRequestTypedDict, +) +from .customtaskstartedrequest import ( + CustomTaskStartedRequest, + CustomTaskStartedRequestTypedDict, +) +from .customtasktimedoutrequest import ( + CustomTaskTimedOutRequest, + CustomTaskTimedOutRequestTypedDict, +) +from .workflowexecutioncanceledrequest import ( + WorkflowExecutionCanceledRequest, + WorkflowExecutionCanceledRequestTypedDict, +) +from .workflowexecutioncompletedrequest import ( + WorkflowExecutionCompletedRequest, + WorkflowExecutionCompletedRequestTypedDict, +) +from .workflowexecutioncontinuedasnewrequest import ( + WorkflowExecutionContinuedAsNewRequest, + WorkflowExecutionContinuedAsNewRequestTypedDict, +) +from .workflowexecutionfailedrequest import ( + WorkflowExecutionFailedRequest, + WorkflowExecutionFailedRequestTypedDict, +) +from .workflowexecutionstartedrequest import ( + WorkflowExecutionStartedRequest, + WorkflowExecutionStartedRequestTypedDict, +) +from .workflowtaskfailedrequest import ( + WorkflowTaskFailedRequest, + WorkflowTaskFailedRequestTypedDict, +) +from .workflowtasktimedoutrequest import ( + WorkflowTaskTimedOutRequest, + WorkflowTaskTimedOutRequestTypedDict, +) +from mistralai.client.types import BaseModel +from typing import Union +from typing_extensions import TypeAliasType, TypedDict + + +WorkflowEventRequestEventTypedDict = TypeAliasType( + "WorkflowEventRequestEventTypedDict", + Union[ + WorkflowExecutionStartedRequestTypedDict, + WorkflowExecutionCompletedRequestTypedDict, + WorkflowExecutionFailedRequestTypedDict, + WorkflowExecutionCanceledRequestTypedDict, + WorkflowExecutionContinuedAsNewRequestTypedDict, + WorkflowTaskTimedOutRequestTypedDict, + WorkflowTaskFailedRequestTypedDict, + CustomTaskStartedRequestTypedDict, + CustomTaskInProgressRequestTypedDict, + CustomTaskCompletedRequestTypedDict, + CustomTaskFailedRequestTypedDict, + CustomTaskTimedOutRequestTypedDict, + CustomTaskCanceledRequestTypedDict, + ActivityTaskStartedRequestTypedDict, + ActivityTaskCompletedRequestTypedDict, + ActivityTaskRetryingRequestTypedDict, + ActivityTaskFailedRequestTypedDict, + ], +) +r"""The workflow event payload.""" + + +WorkflowEventRequestEvent = TypeAliasType( + "WorkflowEventRequestEvent", + Union[ + WorkflowExecutionStartedRequest, + WorkflowExecutionCompletedRequest, + WorkflowExecutionFailedRequest, + WorkflowExecutionCanceledRequest, + WorkflowExecutionContinuedAsNewRequest, + WorkflowTaskTimedOutRequest, + WorkflowTaskFailedRequest, + CustomTaskStartedRequest, + CustomTaskInProgressRequest, + CustomTaskCompletedRequest, + CustomTaskFailedRequest, + CustomTaskTimedOutRequest, + CustomTaskCanceledRequest, + ActivityTaskStartedRequest, + ActivityTaskCompletedRequest, + ActivityTaskRetryingRequest, + ActivityTaskFailedRequest, + ], +) +r"""The workflow event payload.""" + + +class WorkflowEventRequestTypedDict(TypedDict): + r"""Request model containing a workflow event.""" + + event: WorkflowEventRequestEventTypedDict + r"""The workflow event payload.""" + + +class WorkflowEventRequest(BaseModel): + r"""Request model containing a workflow event.""" + + event: WorkflowEventRequestEvent + r"""The workflow event payload.""" diff --git a/src/mistralai/client/models/workfloweventresponse.py b/src/mistralai/client/models/workfloweventresponse.py new file mode 100644 index 00000000..4649da80 --- /dev/null +++ b/src/mistralai/client/models/workfloweventresponse.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e1a984989f65 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +from pydantic import model_serializer +from typing import Literal, Union +from typing_extensions import NotRequired, TypedDict + + +WorkflowEventResponseStatus = Union[ + Literal[ + "success", + "error", + ], + UnrecognizedStr, +] +r"""Status of the event reception""" + + +class WorkflowEventResponseTypedDict(TypedDict): + r"""Response model for workflow event reception.""" + + status: WorkflowEventResponseStatus + r"""Status of the event reception""" + message: NotRequired[Nullable[str]] + r"""Optional message""" + + +class WorkflowEventResponse(BaseModel): + r"""Response model for workflow event reception.""" + + status: WorkflowEventResponseStatus + r"""Status of the event reception""" + + message: OptionalNullable[str] = UNSET + r"""Optional message""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message"]) + nullable_fields = set(["message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workfloweventtype.py b/src/mistralai/client/models/workfloweventtype.py new file mode 100644 index 00000000..8c386b01 --- /dev/null +++ b/src/mistralai/client/models/workfloweventtype.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b4aeeb03b57a + +from __future__ import annotations +from typing import Literal + + +WorkflowEventType = Literal[ + "WORKFLOW_EXECUTION_STARTED", + "WORKFLOW_EXECUTION_COMPLETED", + "WORKFLOW_EXECUTION_FAILED", + "WORKFLOW_EXECUTION_CANCELED", + "WORKFLOW_EXECUTION_CONTINUED_AS_NEW", + "WORKFLOW_TASK_TIMED_OUT", + "WORKFLOW_TASK_FAILED", + "CUSTOM_TASK_STARTED", + "CUSTOM_TASK_IN_PROGRESS", + "CUSTOM_TASK_COMPLETED", + "CUSTOM_TASK_FAILED", + "CUSTOM_TASK_TIMED_OUT", + "CUSTOM_TASK_CANCELED", + "ACTIVITY_TASK_STARTED", + "ACTIVITY_TASK_COMPLETED", + "ACTIVITY_TASK_RETRYING", + "ACTIVITY_TASK_FAILED", +] diff --git a/src/mistralai/client/models/workflowexecutioncanceledattributes.py b/src/mistralai/client/models/workflowexecutioncanceledattributes.py new file mode 100644 index 00000000..6c06bfa9 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncanceledattributes.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c0802a5de5e5 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionCanceledAttributesTypedDict(TypedDict): + r"""Attributes for workflow execution canceled events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + reason: NotRequired[Nullable[str]] + r"""Optional reason provided for the cancellation.""" + + +class WorkflowExecutionCanceledAttributes(BaseModel): + r"""Attributes for workflow execution canceled events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + reason: OptionalNullable[str] = UNSET + r"""Optional reason provided for the cancellation.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["reason"]) + nullable_fields = set(["reason"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutioncanceledrequest.py b/src/mistralai/client/models/workflowexecutioncanceledrequest.py new file mode 100644 index 00000000..09873446 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncanceledrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7bdfdeddd5c4 + +from __future__ import annotations +from .workflowexecutioncanceledattributes import ( + WorkflowExecutionCanceledAttributes, + WorkflowExecutionCanceledAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowExecutionCanceledRequestTypedDict(TypedDict): + r"""Emitted when a workflow execution is canceled. + + This is a terminal event indicating the workflow was explicitly canceled. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionCanceledAttributesTypedDict + r"""Attributes for workflow execution canceled events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["WORKFLOW_EXECUTION_CANCELED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionCanceledRequest(BaseModel): + r"""Emitted when a workflow execution is canceled. + + This is a terminal event indicating the workflow was explicitly canceled. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionCanceledAttributes + r"""Attributes for workflow execution canceled events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_CANCELED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_CANCELED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_CANCELED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionCanceledRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutioncanceledresponse.py b/src/mistralai/client/models/workflowexecutioncanceledresponse.py new file mode 100644 index 00000000..ee1c4e71 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncanceledresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: bcc392d67222 + +from __future__ import annotations +from .workflowexecutioncanceledattributes import ( + WorkflowExecutionCanceledAttributes, + WorkflowExecutionCanceledAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WorkflowExecutionCanceledResponseTypedDict(TypedDict): + r"""Emitted when a workflow execution is canceled. + + This is a terminal event indicating the workflow was explicitly canceled. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionCanceledAttributesTypedDict + r"""Attributes for workflow execution canceled events.""" + event_type: Literal["WORKFLOW_EXECUTION_CANCELED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionCanceledResponse(BaseModel): + r"""Emitted when a workflow execution is canceled. + + This is a terminal event indicating the workflow was explicitly canceled. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionCanceledAttributes + r"""Attributes for workflow execution canceled events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_CANCELED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_CANCELED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_CANCELED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionCanceledResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py b/src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py new file mode 100644 index 00000000..fb48a0fc --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9d69c2f471c1 + +from __future__ import annotations +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowExecutionCompletedAttributesRequestTypedDict(TypedDict): + r"""Attributes for workflow execution completed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + result: JSONPayloadRequestTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class WorkflowExecutionCompletedAttributesRequest(BaseModel): + r"""Attributes for workflow execution completed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + result: JSONPayloadRequest + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py b/src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py new file mode 100644 index 00000000..3afc8dcf --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f831331b0eb1 + +from __future__ import annotations +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowExecutionCompletedAttributesResponseTypedDict(TypedDict): + r"""Attributes for workflow execution completed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + result: JSONPayloadResponseTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class WorkflowExecutionCompletedAttributesResponse(BaseModel): + r"""Attributes for workflow execution completed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + result: JSONPayloadResponse + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/workflowexecutioncompletedrequest.py b/src/mistralai/client/models/workflowexecutioncompletedrequest.py new file mode 100644 index 00000000..81bde0f1 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncompletedrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 54326e5805ed + +from __future__ import annotations +from .workflowexecutioncompletedattributesrequest import ( + WorkflowExecutionCompletedAttributesRequest, + WorkflowExecutionCompletedAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowExecutionCompletedRequestTypedDict(TypedDict): + r"""Emitted when a workflow execution completes successfully. + + This is a terminal event indicating the workflow finished without errors. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionCompletedAttributesRequestTypedDict + r"""Attributes for workflow execution completed events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["WORKFLOW_EXECUTION_COMPLETED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionCompletedRequest(BaseModel): + r"""Emitted when a workflow execution completes successfully. + + This is a terminal event indicating the workflow finished without errors. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionCompletedAttributesRequest + r"""Attributes for workflow execution completed events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_COMPLETED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_COMPLETED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_COMPLETED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionCompletedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutioncompletedresponse.py b/src/mistralai/client/models/workflowexecutioncompletedresponse.py new file mode 100644 index 00000000..17716668 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncompletedresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a1bec20dfb0e + +from __future__ import annotations +from .workflowexecutioncompletedattributesresponse import ( + WorkflowExecutionCompletedAttributesResponse, + WorkflowExecutionCompletedAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WorkflowExecutionCompletedResponseTypedDict(TypedDict): + r"""Emitted when a workflow execution completes successfully. + + This is a terminal event indicating the workflow finished without errors. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionCompletedAttributesResponseTypedDict + r"""Attributes for workflow execution completed events.""" + event_type: Literal["WORKFLOW_EXECUTION_COMPLETED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionCompletedResponse(BaseModel): + r"""Emitted when a workflow execution completes successfully. + + This is a terminal event indicating the workflow finished without errors. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionCompletedAttributesResponse + r"""Attributes for workflow execution completed events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_COMPLETED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_COMPLETED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_COMPLETED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionCompletedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py b/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py new file mode 100644 index 00000000..1aba37ae --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8517ed95b5c7 + +from __future__ import annotations +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowExecutionContinuedAsNewAttributesRequestTypedDict(TypedDict): + r"""Attributes for workflow execution continued-as-new events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + new_execution_run_id: str + r"""The run ID of the new workflow execution that continues this workflow.""" + workflow_name: str + r"""The registered name of the continued workflow.""" + input: JSONPayloadRequestTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class WorkflowExecutionContinuedAsNewAttributesRequest(BaseModel): + r"""Attributes for workflow execution continued-as-new events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + new_execution_run_id: str + r"""The run ID of the new workflow execution that continues this workflow.""" + + workflow_name: str + r"""The registered name of the continued workflow.""" + + input: JSONPayloadRequest + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py b/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py new file mode 100644 index 00000000..943e5ebc --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py @@ -0,0 +1,42 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2dd61dcd7b48 + +from __future__ import annotations +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowExecutionContinuedAsNewAttributesResponseTypedDict(TypedDict): + r"""Attributes for workflow execution continued-as-new events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + new_execution_run_id: str + r"""The run ID of the new workflow execution that continues this workflow.""" + workflow_name: str + r"""The registered name of the continued workflow.""" + input: JSONPayloadResponseTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class WorkflowExecutionContinuedAsNewAttributesResponse(BaseModel): + r"""Attributes for workflow execution continued-as-new events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + new_execution_run_id: str + r"""The run ID of the new workflow execution that continues this workflow.""" + + workflow_name: str + r"""The registered name of the continued workflow.""" + + input: JSONPayloadResponse + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py b/src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py new file mode 100644 index 00000000..f8c94604 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d1057d583b8c + +from __future__ import annotations +from .workflowexecutioncontinuedasnewattributesrequest import ( + WorkflowExecutionContinuedAsNewAttributesRequest, + WorkflowExecutionContinuedAsNewAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowExecutionContinuedAsNewRequestTypedDict(TypedDict): + r"""Emitted when a workflow continues as a new execution. + + This occurs when a workflow uses continue-as-new to reset its history + while maintaining logical continuity. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionContinuedAsNewAttributesRequestTypedDict + r"""Attributes for workflow execution continued-as-new events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"] + r"""Event type discriminator.""" + + +class WorkflowExecutionContinuedAsNewRequest(BaseModel): + r"""Emitted when a workflow continues as a new execution. + + This occurs when a workflow uses continue-as-new to reset its history + while maintaining logical continuity. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionContinuedAsNewAttributesRequest + r"""Attributes for workflow execution continued-as-new events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_CONTINUED_AS_NEW")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionContinuedAsNewRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutioncontinuedasnewresponse.py b/src/mistralai/client/models/workflowexecutioncontinuedasnewresponse.py new file mode 100644 index 00000000..0f60a5be --- /dev/null +++ b/src/mistralai/client/models/workflowexecutioncontinuedasnewresponse.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: be26cd87dcb3 + +from __future__ import annotations +from .workflowexecutioncontinuedasnewattributesresponse import ( + WorkflowExecutionContinuedAsNewAttributesResponse, + WorkflowExecutionContinuedAsNewAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WorkflowExecutionContinuedAsNewResponseTypedDict(TypedDict): + r"""Emitted when a workflow continues as a new execution. + + This occurs when a workflow uses continue-as-new to reset its history + while maintaining logical continuity. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionContinuedAsNewAttributesResponseTypedDict + r"""Attributes for workflow execution continued-as-new events.""" + event_type: Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"] + r"""Event type discriminator.""" + + +class WorkflowExecutionContinuedAsNewResponse(BaseModel): + r"""Emitted when a workflow continues as a new execution. + + This occurs when a workflow uses continue-as-new to reset its history + while maintaining logical continuity. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionContinuedAsNewAttributesResponse + r"""Attributes for workflow execution continued-as-new events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_CONTINUED_AS_NEW")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_CONTINUED_AS_NEW" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionContinuedAsNewResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutionfailedattributes.py b/src/mistralai/client/models/workflowexecutionfailedattributes.py new file mode 100644 index 00000000..1e61f344 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionfailedattributes.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: dbb7fb36a4fd + +from __future__ import annotations +from .failure import Failure, FailureTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowExecutionFailedAttributesTypedDict(TypedDict): + r"""Attributes for workflow execution failed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + failure: FailureTypedDict + r"""Represents an error or exception that occurred during execution.""" + + +class WorkflowExecutionFailedAttributes(BaseModel): + r"""Attributes for workflow execution failed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + failure: Failure + r"""Represents an error or exception that occurred during execution.""" diff --git a/src/mistralai/client/models/workflowexecutionfailedrequest.py b/src/mistralai/client/models/workflowexecutionfailedrequest.py new file mode 100644 index 00000000..5c4e445a --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionfailedrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 873155c8e314 + +from __future__ import annotations +from .workflowexecutionfailedattributes import ( + WorkflowExecutionFailedAttributes, + WorkflowExecutionFailedAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowExecutionFailedRequestTypedDict(TypedDict): + r"""Emitted when a workflow execution fails due to an unhandled exception. + + This is a terminal event indicating the workflow ended with an error. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionFailedAttributesTypedDict + r"""Attributes for workflow execution failed events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["WORKFLOW_EXECUTION_FAILED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionFailedRequest(BaseModel): + r"""Emitted when a workflow execution fails due to an unhandled exception. + + This is a terminal event indicating the workflow ended with an error. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionFailedAttributes + r"""Attributes for workflow execution failed events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_FAILED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionFailedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutionfailedresponse.py b/src/mistralai/client/models/workflowexecutionfailedresponse.py new file mode 100644 index 00000000..687d33a9 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionfailedresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a0836009f9de + +from __future__ import annotations +from .workflowexecutionfailedattributes import ( + WorkflowExecutionFailedAttributes, + WorkflowExecutionFailedAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WorkflowExecutionFailedResponseTypedDict(TypedDict): + r"""Emitted when a workflow execution fails due to an unhandled exception. + + This is a terminal event indicating the workflow ended with an error. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionFailedAttributesTypedDict + r"""Attributes for workflow execution failed events.""" + event_type: Literal["WORKFLOW_EXECUTION_FAILED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionFailedResponse(BaseModel): + r"""Emitted when a workflow execution fails due to an unhandled exception. + + This is a terminal event indicating the workflow ended with an error. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionFailedAttributes + r"""Attributes for workflow execution failed events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_FAILED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionFailedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutionlistresponse.py b/src/mistralai/client/models/workflowexecutionlistresponse.py new file mode 100644 index 00000000..442ed972 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionlistresponse.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c2b2e1ab4821 + +from __future__ import annotations +from .workflowexecutionwithoutresultresponse import ( + WorkflowExecutionWithoutResultResponse, + WorkflowExecutionWithoutResultResponseTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionListResponseTypedDict(TypedDict): + executions: List[WorkflowExecutionWithoutResultResponseTypedDict] + r"""A list of workflow executions""" + next_page_token: NotRequired[Nullable[str]] + r"""Token to use for fetching the next page of results. Null if this is the last page.""" + + +class WorkflowExecutionListResponse(BaseModel): + executions: List[WorkflowExecutionWithoutResultResponse] + r"""A list of workflow executions""" + + next_page_token: OptionalNullable[str] = UNSET + r"""Token to use for fetching the next page of results. Null if this is the last page.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next_page_token"]) + nullable_fields = set(["next_page_token"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutionprogresstraceevent.py b/src/mistralai/client/models/workflowexecutionprogresstraceevent.py new file mode 100644 index 00000000..ffebdb82 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionprogresstraceevent.py @@ -0,0 +1,100 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6ea7078aaca3 + +from __future__ import annotations +from .eventprogressstatus import EventProgressStatus +from .eventtype import EventType +from .workflowexecutiontracesummaryattributesvalues import ( + WorkflowExecutionTraceSummaryAttributesValues, + WorkflowExecutionTraceSummaryAttributesValuesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionProgressTraceEventTypedDict(TypedDict): + name: str + r"""Name of the event""" + id: str + r"""The ID of the event""" + timestamp_unix_nano: int + r"""The timestamp of the event in nanoseconds since the Unix epoch""" + attributes: Dict[ + str, Nullable[WorkflowExecutionTraceSummaryAttributesValuesTypedDict] + ] + r"""The attributes of the event""" + start_time_unix_ms: int + r"""The start time of the event in milliseconds since the Unix epoch""" + type: NotRequired[EventType] + internal: NotRequired[bool] + r"""Whether the event is internal""" + status: NotRequired[EventProgressStatus] + end_time_unix_ms: NotRequired[Nullable[int]] + r"""The end time of the event in milliseconds since the Unix epoch""" + error: NotRequired[Nullable[str]] + r"""The error message, if any""" + + +class WorkflowExecutionProgressTraceEvent(BaseModel): + name: str + r"""Name of the event""" + + id: str + r"""The ID of the event""" + + timestamp_unix_nano: int + r"""The timestamp of the event in nanoseconds since the Unix epoch""" + + attributes: Dict[str, Nullable[WorkflowExecutionTraceSummaryAttributesValues]] + r"""The attributes of the event""" + + start_time_unix_ms: int + r"""The start time of the event in milliseconds since the Unix epoch""" + + type: Optional[EventType] = None + + internal: Optional[bool] = False + r"""Whether the event is internal""" + + status: Optional[EventProgressStatus] = None + + end_time_unix_ms: OptionalNullable[int] = UNSET + r"""The end time of the event in milliseconds since the Unix epoch""" + + error: OptionalNullable[str] = UNSET + r"""The error message, if any""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["type", "internal", "status", "end_time_unix_ms", "error"] + ) + nullable_fields = set(["end_time_unix_ms", "error"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py new file mode 100644 index 00000000..bf6a5fa0 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 806340497ed4 + +from __future__ import annotations +from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowExecutionRequestTypedDict(TypedDict): + execution_id: NotRequired[Nullable[str]] + r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" + input: NotRequired[Nullable[Dict[str, Any]]] + r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + encoded_input: NotRequired[Nullable[NetworkEncodedInputTypedDict]] + r"""Encoded input to the workflow, used when payload encoding is enabled.""" + wait_for_result: NotRequired[bool] + r"""If true, wait for the workflow to complete and return the result directly.""" + timeout_seconds: NotRequired[Nullable[float]] + r"""Maximum time to wait for completion when wait_for_result is true.""" + custom_tracing_attributes: NotRequired[Nullable[Dict[str, str]]] + task_queue: NotRequired[Nullable[str]] + r"""Deprecated. Use deployment_name instead.""" + deployment_name: NotRequired[Nullable[str]] + r"""Name of the deployment to route this execution to""" + + +class WorkflowExecutionRequest(BaseModel): + execution_id: OptionalNullable[str] = UNSET + r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" + + input: OptionalNullable[Dict[str, Any]] = UNSET + r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + + encoded_input: OptionalNullable[NetworkEncodedInput] = UNSET + r"""Encoded input to the workflow, used when payload encoding is enabled.""" + + wait_for_result: Optional[bool] = False + r"""If true, wait for the workflow to complete and return the result directly.""" + + timeout_seconds: OptionalNullable[float] = UNSET + r"""Maximum time to wait for completion when wait_for_result is true.""" + + custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET + + task_queue: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use deployment_name instead.""" + + deployment_name: OptionalNullable[str] = UNSET + r"""Name of the deployment to route this execution to""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "execution_id", + "input", + "encoded_input", + "wait_for_result", + "timeout_seconds", + "custom_tracing_attributes", + "task_queue", + "deployment_name", + ] + ) + nullable_fields = set( + [ + "execution_id", + "input", + "encoded_input", + "timeout_seconds", + "custom_tracing_attributes", + "task_queue", + "deployment_name", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutionresponse.py b/src/mistralai/client/models/workflowexecutionresponse.py new file mode 100644 index 00000000..84398375 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionresponse.py @@ -0,0 +1,93 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 758786637be5 + +from __future__ import annotations +from .workflowexecutionstatus import WorkflowExecutionStatus +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionResponseTypedDict(TypedDict): + workflow_name: str + r"""The name of the workflow""" + execution_id: str + r"""The ID of the workflow execution""" + root_execution_id: str + r"""The root execution ID of the workflow execution""" + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + start_time: datetime + r"""The start time of the workflow execution""" + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + parent_execution_id: NotRequired[Nullable[str]] + r"""The parent execution ID of the workflow execution""" + total_duration_ms: NotRequired[Nullable[int]] + r"""The total duration of the trace in milliseconds""" + + +class WorkflowExecutionResponse(BaseModel): + workflow_name: str + r"""The name of the workflow""" + + execution_id: str + r"""The ID of the workflow execution""" + + root_execution_id: str + r"""The root execution ID of the workflow execution""" + + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + + start_time: datetime + r"""The start time of the workflow execution""" + + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + + parent_execution_id: OptionalNullable[str] = UNSET + r"""The parent execution ID of the workflow execution""" + + total_duration_ms: OptionalNullable[int] = UNSET + r"""The total duration of the trace in milliseconds""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["parent_execution_id", "total_duration_ms"]) + nullable_fields = set( + ["parent_execution_id", "status", "end_time", "total_duration_ms", "result"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutionstartedattributesrequest.py b/src/mistralai/client/models/workflowexecutionstartedattributesrequest.py new file mode 100644 index 00000000..ff74345f --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionstartedattributesrequest.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ee480cd77d79 + +from __future__ import annotations +from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowExecutionStartedAttributesRequestTypedDict(TypedDict): + r"""Attributes for workflow execution started events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + workflow_name: str + r"""The registered name of the workflow being executed.""" + input: JSONPayloadRequestTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class WorkflowExecutionStartedAttributesRequest(BaseModel): + r"""Attributes for workflow execution started events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + workflow_name: str + r"""The registered name of the workflow being executed.""" + + input: JSONPayloadRequest + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py b/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py new file mode 100644 index 00000000..74e55c29 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d2276919a895 + +from __future__ import annotations +from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowExecutionStartedAttributesResponseTypedDict(TypedDict): + r"""Attributes for workflow execution started events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + workflow_name: str + r"""The registered name of the workflow being executed.""" + input: JSONPayloadResponseTypedDict + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ + + +class WorkflowExecutionStartedAttributesResponse(BaseModel): + r"""Attributes for workflow execution started events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + workflow_name: str + r"""The registered name of the workflow being executed.""" + + input: JSONPayloadResponse + r"""A payload containing arbitrary JSON data. + + Used for complete state snapshots or final results. + """ diff --git a/src/mistralai/client/models/workflowexecutionstartedrequest.py b/src/mistralai/client/models/workflowexecutionstartedrequest.py new file mode 100644 index 00000000..0ce8bbce --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionstartedrequest.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 15e73dddf8c4 + +from __future__ import annotations +from .workflowexecutionstartedattributesrequest import ( + WorkflowExecutionStartedAttributesRequest, + WorkflowExecutionStartedAttributesRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowExecutionStartedRequestTypedDict(TypedDict): + r"""Emitted when a workflow execution begins. + + This is the first event in any workflow execution lifecycle. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionStartedAttributesRequestTypedDict + r"""Attributes for workflow execution started events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["WORKFLOW_EXECUTION_STARTED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionStartedRequest(BaseModel): + r"""Emitted when a workflow execution begins. + + This is the first event in any workflow execution lifecycle. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionStartedAttributesRequest + r"""Attributes for workflow execution started events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_STARTED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_STARTED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_STARTED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionStartedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutionstartedresponse.py b/src/mistralai/client/models/workflowexecutionstartedresponse.py new file mode 100644 index 00000000..fa1e46a0 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionstartedresponse.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e1a597c911ea + +from __future__ import annotations +from .workflowexecutionstartedattributesresponse import ( + WorkflowExecutionStartedAttributesResponse, + WorkflowExecutionStartedAttributesResponseTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WorkflowExecutionStartedResponseTypedDict(TypedDict): + r"""Emitted when a workflow execution begins. + + This is the first event in any workflow execution lifecycle. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowExecutionStartedAttributesResponseTypedDict + r"""Attributes for workflow execution started events.""" + event_type: Literal["WORKFLOW_EXECUTION_STARTED"] + r"""Event type discriminator.""" + + +class WorkflowExecutionStartedResponse(BaseModel): + r"""Emitted when a workflow execution begins. + + This is the first event in any workflow execution lifecycle. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowExecutionStartedAttributesResponse + r"""Attributes for workflow execution started events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_EXECUTION_STARTED"]], + AfterValidator(validate_const("WORKFLOW_EXECUTION_STARTED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_EXECUTION_STARTED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowExecutionStartedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowexecutionstatus.py b/src/mistralai/client/models/workflowexecutionstatus.py new file mode 100644 index 00000000..611f3aa1 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionstatus.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 56a16810d5de + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +WorkflowExecutionStatus = Union[ + Literal[ + "RUNNING", + "COMPLETED", + "FAILED", + "CANCELED", + "TERMINATED", + "CONTINUED_AS_NEW", + "TIMED_OUT", + "RETRYING_AFTER_ERROR", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/workflowexecutionsyncresponse.py b/src/mistralai/client/models/workflowexecutionsyncresponse.py new file mode 100644 index 00000000..6ed0f038 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionsyncresponse.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ef77c54a11b5 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Any +from typing_extensions import TypedDict + + +class WorkflowExecutionSyncResponseTypedDict(TypedDict): + r"""Response model for synchronous workflow execution""" + + workflow_name: str + r"""Name of the workflow that was executed""" + execution_id: str + r"""ID of the workflow execution""" + result: Any + r"""The result of the workflow execution""" + + +class WorkflowExecutionSyncResponse(BaseModel): + r"""Response model for synchronous workflow execution""" + + workflow_name: str + r"""Name of the workflow that was executed""" + + execution_id: str + r"""ID of the workflow execution""" + + result: Any + r"""The result of the workflow execution""" diff --git a/src/mistralai/client/models/workflowexecutiontraceevent.py b/src/mistralai/client/models/workflowexecutiontraceevent.py new file mode 100644 index 00000000..f74cd5ab --- /dev/null +++ b/src/mistralai/client/models/workflowexecutiontraceevent.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 584e0a98082a + +from __future__ import annotations +from .eventtype import EventType +from .workflowexecutiontracesummaryattributesvalues import ( + WorkflowExecutionTraceSummaryAttributesValues, + WorkflowExecutionTraceSummaryAttributesValuesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionTraceEventTypedDict(TypedDict): + name: str + r"""Name of the event""" + id: str + r"""The ID of the event""" + timestamp_unix_nano: int + r"""The timestamp of the event in nanoseconds since the Unix epoch""" + attributes: Dict[ + str, Nullable[WorkflowExecutionTraceSummaryAttributesValuesTypedDict] + ] + r"""The attributes of the event""" + type: NotRequired[EventType] + internal: NotRequired[bool] + r"""Whether the event is internal""" + + +class WorkflowExecutionTraceEvent(BaseModel): + name: str + r"""Name of the event""" + + id: str + r"""The ID of the event""" + + timestamp_unix_nano: int + r"""The timestamp of the event in nanoseconds since the Unix epoch""" + + attributes: Dict[str, Nullable[WorkflowExecutionTraceSummaryAttributesValues]] + r"""The attributes of the event""" + + type: Optional[EventType] = None + + internal: Optional[bool] = False + r"""Whether the event is internal""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "internal"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py b/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py new file mode 100644 index 00000000..0c24a1ea --- /dev/null +++ b/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py @@ -0,0 +1,121 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 94d92762ccb7 + +from __future__ import annotations +from .workflowexecutionprogresstraceevent import ( + WorkflowExecutionProgressTraceEvent, + WorkflowExecutionProgressTraceEventTypedDict, +) +from .workflowexecutionstatus import WorkflowExecutionStatus +from .workflowexecutiontraceevent import ( + WorkflowExecutionTraceEvent, + WorkflowExecutionTraceEventTypedDict, +) +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, List, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +WorkflowExecutionTraceEventsResponseEventTypedDict = TypeAliasType( + "WorkflowExecutionTraceEventsResponseEventTypedDict", + Union[ + WorkflowExecutionTraceEventTypedDict, + WorkflowExecutionProgressTraceEventTypedDict, + ], +) + + +WorkflowExecutionTraceEventsResponseEvent = TypeAliasType( + "WorkflowExecutionTraceEventsResponseEvent", + Union[WorkflowExecutionTraceEvent, WorkflowExecutionProgressTraceEvent], +) + + +class WorkflowExecutionTraceEventsResponseTypedDict(TypedDict): + workflow_name: str + r"""The name of the workflow""" + execution_id: str + r"""The ID of the workflow execution""" + root_execution_id: str + r"""The root execution ID of the workflow execution""" + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + start_time: datetime + r"""The start time of the workflow execution""" + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + parent_execution_id: NotRequired[Nullable[str]] + r"""The parent execution ID of the workflow execution""" + total_duration_ms: NotRequired[Nullable[int]] + r"""The total duration of the trace in milliseconds""" + events: NotRequired[List[WorkflowExecutionTraceEventsResponseEventTypedDict]] + r"""The events of the workflow execution""" + + +class WorkflowExecutionTraceEventsResponse(BaseModel): + workflow_name: str + r"""The name of the workflow""" + + execution_id: str + r"""The ID of the workflow execution""" + + root_execution_id: str + r"""The root execution ID of the workflow execution""" + + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + + start_time: datetime + r"""The start time of the workflow execution""" + + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + + parent_execution_id: OptionalNullable[str] = UNSET + r"""The parent execution ID of the workflow execution""" + + total_duration_ms: OptionalNullable[int] = UNSET + r"""The total duration of the trace in milliseconds""" + + events: Optional[List[WorkflowExecutionTraceEventsResponseEvent]] = None + r"""The events of the workflow execution""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["parent_execution_id", "total_duration_ms", "events"]) + nullable_fields = set( + ["parent_execution_id", "status", "end_time", "total_duration_ms", "result"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutiontraceotelresponse.py b/src/mistralai/client/models/workflowexecutiontraceotelresponse.py new file mode 100644 index 00000000..b4320b83 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutiontraceotelresponse.py @@ -0,0 +1,124 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7531bf461dc2 + +from __future__ import annotations +from .tempogettraceresponse import TempoGetTraceResponse, TempoGetTraceResponseTypedDict +from .workflowexecutionstatus import WorkflowExecutionStatus +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionTraceOTelResponseTypedDict(TypedDict): + workflow_name: str + r"""The name of the workflow""" + execution_id: str + r"""The ID of the workflow execution""" + root_execution_id: str + r"""The root execution ID of the workflow execution""" + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + start_time: datetime + r"""The start time of the workflow execution""" + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + data_source: str + r"""The data source of the trace""" + parent_execution_id: NotRequired[Nullable[str]] + r"""The parent execution ID of the workflow execution""" + total_duration_ms: NotRequired[Nullable[int]] + r"""The total duration of the trace in milliseconds""" + otel_trace_id: NotRequired[Nullable[str]] + r"""The ID of the trace""" + otel_trace_data: NotRequired[Nullable[TempoGetTraceResponseTypedDict]] + r"""The raw OpenTelemetry trace data""" + + +class WorkflowExecutionTraceOTelResponse(BaseModel): + workflow_name: str + r"""The name of the workflow""" + + execution_id: str + r"""The ID of the workflow execution""" + + root_execution_id: str + r"""The root execution ID of the workflow execution""" + + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + + start_time: datetime + r"""The start time of the workflow execution""" + + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + + data_source: str + r"""The data source of the trace""" + + parent_execution_id: OptionalNullable[str] = UNSET + r"""The parent execution ID of the workflow execution""" + + total_duration_ms: OptionalNullable[int] = UNSET + r"""The total duration of the trace in milliseconds""" + + otel_trace_id: OptionalNullable[str] = UNSET + r"""The ID of the trace""" + + otel_trace_data: OptionalNullable[TempoGetTraceResponse] = UNSET + r"""The raw OpenTelemetry trace data""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "parent_execution_id", + "total_duration_ms", + "otel_trace_id", + "otel_trace_data", + ] + ) + nullable_fields = set( + [ + "parent_execution_id", + "status", + "end_time", + "total_duration_ms", + "result", + "otel_trace_id", + "otel_trace_data", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py b/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py new file mode 100644 index 00000000..e288146d --- /dev/null +++ b/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 5e3448a39a40 + +from __future__ import annotations +from typing import Union +from typing_extensions import TypeAliasType + + +WorkflowExecutionTraceSummaryAttributesValuesTypedDict = TypeAliasType( + "WorkflowExecutionTraceSummaryAttributesValuesTypedDict", + Union[str, int, float, bool], +) + + +WorkflowExecutionTraceSummaryAttributesValues = TypeAliasType( + "WorkflowExecutionTraceSummaryAttributesValues", Union[str, int, float, bool] +) diff --git a/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py b/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py new file mode 100644 index 00000000..d2cc7c6b --- /dev/null +++ b/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py @@ -0,0 +1,109 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2ea199810f5f + +from __future__ import annotations +from .workflowexecutionstatus import WorkflowExecutionStatus +from .workflowexecutiontracesummaryspan import ( + WorkflowExecutionTraceSummarySpan, + WorkflowExecutionTraceSummarySpanTypedDict, +) +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionTraceSummaryResponseTypedDict(TypedDict): + workflow_name: str + r"""The name of the workflow""" + execution_id: str + r"""The ID of the workflow execution""" + root_execution_id: str + r"""The root execution ID of the workflow execution""" + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + start_time: datetime + r"""The start time of the workflow execution""" + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + parent_execution_id: NotRequired[Nullable[str]] + r"""The parent execution ID of the workflow execution""" + total_duration_ms: NotRequired[Nullable[int]] + r"""The total duration of the trace in milliseconds""" + span_tree: NotRequired[Nullable[WorkflowExecutionTraceSummarySpanTypedDict]] + r"""The root span of the trace""" + + +class WorkflowExecutionTraceSummaryResponse(BaseModel): + workflow_name: str + r"""The name of the workflow""" + + execution_id: str + r"""The ID of the workflow execution""" + + root_execution_id: str + r"""The root execution ID of the workflow execution""" + + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + + start_time: datetime + r"""The start time of the workflow execution""" + + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + + result: Nullable[Any] + r"""The result of the workflow execution, if available""" + + parent_execution_id: OptionalNullable[str] = UNSET + r"""The parent execution ID of the workflow execution""" + + total_duration_ms: OptionalNullable[int] = UNSET + r"""The total duration of the trace in milliseconds""" + + span_tree: OptionalNullable[WorkflowExecutionTraceSummarySpan] = UNSET + r"""The root span of the trace""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["parent_execution_id", "total_duration_ms", "span_tree"]) + nullable_fields = set( + [ + "parent_execution_id", + "status", + "end_time", + "total_duration_ms", + "result", + "span_tree", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutiontracesummaryspan.py b/src/mistralai/client/models/workflowexecutiontracesummaryspan.py new file mode 100644 index 00000000..e80db90f --- /dev/null +++ b/src/mistralai/client/models/workflowexecutiontracesummaryspan.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 750353cbd052 + +from __future__ import annotations +from .workflowexecutiontraceevent import ( + WorkflowExecutionTraceEvent, + WorkflowExecutionTraceEventTypedDict, +) +from .workflowexecutiontracesummaryattributesvalues import ( + WorkflowExecutionTraceSummaryAttributesValues, + WorkflowExecutionTraceSummaryAttributesValuesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionTraceSummarySpanTypedDict(TypedDict): + span_id: str + r"""The ID of the span""" + name: str + r"""The name of the span""" + start_time_unix_nano: int + r"""The start time of the span in nanoseconds since the Unix epoch""" + end_time_unix_nano: Nullable[int] + r"""The end time of the span in nanoseconds since the Unix epoch""" + attributes: Dict[ + str, Nullable[WorkflowExecutionTraceSummaryAttributesValuesTypedDict] + ] + r"""The attributes of the span""" + events: List[WorkflowExecutionTraceEventTypedDict] + r"""The events of the span""" + children: NotRequired[List[WorkflowExecutionTraceSummarySpanTypedDict]] + r"""The child spans of the span""" + + +class WorkflowExecutionTraceSummarySpan(BaseModel): + span_id: str + r"""The ID of the span""" + + name: str + r"""The name of the span""" + + start_time_unix_nano: int + r"""The start time of the span in nanoseconds since the Unix epoch""" + + end_time_unix_nano: Nullable[int] + r"""The end time of the span in nanoseconds since the Unix epoch""" + + attributes: Dict[str, Nullable[WorkflowExecutionTraceSummaryAttributesValues]] + r"""The attributes of the span""" + + events: List[WorkflowExecutionTraceEvent] + r"""The events of the span""" + + children: Optional[List[WorkflowExecutionTraceSummarySpan]] = None + r"""The child spans of the span""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["children"]) + nullable_fields = set(["end_time_unix_nano"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py b/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py new file mode 100644 index 00000000..082653c8 --- /dev/null +++ b/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py @@ -0,0 +1,87 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: dd70ba8def79 + +from __future__ import annotations +from .workflowexecutionstatus import WorkflowExecutionStatus +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowExecutionWithoutResultResponseTypedDict(TypedDict): + workflow_name: str + r"""The name of the workflow""" + execution_id: str + r"""The ID of the workflow execution""" + root_execution_id: str + r"""The root execution ID of the workflow execution""" + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + start_time: datetime + r"""The start time of the workflow execution""" + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + parent_execution_id: NotRequired[Nullable[str]] + r"""The parent execution ID of the workflow execution""" + total_duration_ms: NotRequired[Nullable[int]] + r"""The total duration of the trace in milliseconds""" + + +class WorkflowExecutionWithoutResultResponse(BaseModel): + workflow_name: str + r"""The name of the workflow""" + + execution_id: str + r"""The ID of the workflow execution""" + + root_execution_id: str + r"""The root execution ID of the workflow execution""" + + status: Nullable[WorkflowExecutionStatus] + r"""The status of the workflow execution""" + + start_time: datetime + r"""The start time of the workflow execution""" + + end_time: Nullable[datetime] + r"""The end time of the workflow execution, if available""" + + parent_execution_id: OptionalNullable[str] = UNSET + r"""The parent execution ID of the workflow execution""" + + total_duration_ms: OptionalNullable[int] = UNSET + r"""The total duration of the trace in milliseconds""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["parent_execution_id", "total_duration_ms"]) + nullable_fields = set( + ["parent_execution_id", "status", "end_time", "total_duration_ms"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowgetresponse.py b/src/mistralai/client/models/workflowgetresponse.py new file mode 100644 index 00000000..ef1391c9 --- /dev/null +++ b/src/mistralai/client/models/workflowgetresponse.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 230f55a36ebf + +from __future__ import annotations +from .workflowwithworkerstatus import ( + WorkflowWithWorkerStatus, + WorkflowWithWorkerStatusTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowGetResponseTypedDict(TypedDict): + workflow: WorkflowWithWorkerStatusTypedDict + + +class WorkflowGetResponse(BaseModel): + workflow: WorkflowWithWorkerStatus diff --git a/src/mistralai/client/models/workflowlistresponse.py b/src/mistralai/client/models/workflowlistresponse.py new file mode 100644 index 00000000..a6497e82 --- /dev/null +++ b/src/mistralai/client/models/workflowlistresponse.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b255b05e7395 + +from __future__ import annotations +from .workflowbasicdefinition import ( + WorkflowBasicDefinition, + WorkflowBasicDefinitionTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class WorkflowListResponseTypedDict(TypedDict): + workflows: List[WorkflowBasicDefinitionTypedDict] + r"""A list of workflows""" + next_cursor: Nullable[str] + + +class WorkflowListResponse(BaseModel): + workflows: List[WorkflowBasicDefinition] + r"""A list of workflows""" + + next_cursor: Nullable[str] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowmetadata.py b/src/mistralai/client/models/workflowmetadata.py new file mode 100644 index 00000000..59752539 --- /dev/null +++ b/src/mistralai/client/models/workflowmetadata.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0435707d6944 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowMetadataTypedDict(TypedDict): + shared_namespace: NotRequired[Nullable[str]] + r"""Namespace for shared workflows, None if user-owned""" + + +class WorkflowMetadata(BaseModel): + shared_namespace: OptionalNullable[str] = UNSET + r"""Namespace for shared workflows, None if user-owned""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["shared_namespace"]) + nullable_fields = set(["shared_namespace"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowmetrics.py b/src/mistralai/client/models/workflowmetrics.py new file mode 100644 index 00000000..d80bb3db --- /dev/null +++ b/src/mistralai/client/models/workflowmetrics.py @@ -0,0 +1,53 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 471fb1e10716 + +from __future__ import annotations +from .scalarmetric import ScalarMetric, ScalarMetricTypedDict +from .timeseriesmetric import TimeSeriesMetric, TimeSeriesMetricTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowMetricsTypedDict(TypedDict): + r"""Complete metrics for a specific workflow. + + This type combines all metric categories. + """ + + execution_count: ScalarMetricTypedDict + r"""Scalar metric with a single value.""" + success_count: ScalarMetricTypedDict + r"""Scalar metric with a single value.""" + error_count: ScalarMetricTypedDict + r"""Scalar metric with a single value.""" + average_latency_ms: ScalarMetricTypedDict + r"""Scalar metric with a single value.""" + latency_over_time: TimeSeriesMetricTypedDict + r"""Time-series metric with timestamp-value pairs.""" + retry_rate: ScalarMetricTypedDict + r"""Scalar metric with a single value.""" + + +class WorkflowMetrics(BaseModel): + r"""Complete metrics for a specific workflow. + + This type combines all metric categories. + """ + + execution_count: ScalarMetric + r"""Scalar metric with a single value.""" + + success_count: ScalarMetric + r"""Scalar metric with a single value.""" + + error_count: ScalarMetric + r"""Scalar metric with a single value.""" + + average_latency_ms: ScalarMetric + r"""Scalar metric with a single value.""" + + latency_over_time: TimeSeriesMetric + r"""Time-series metric with timestamp-value pairs.""" + + retry_rate: ScalarMetric + r"""Scalar metric with a single value.""" diff --git a/src/mistralai/client/models/workflowregistration.py b/src/mistralai/client/models/workflowregistration.py new file mode 100644 index 00000000..e23f9fb2 --- /dev/null +++ b/src/mistralai/client/models/workflowregistration.py @@ -0,0 +1,77 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2b937728c88b + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from .workflowcodedefinition import ( + WorkflowCodeDefinition, + WorkflowCodeDefinitionTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowRegistrationTypedDict(TypedDict): + id: str + r"""Unique identifier of the workflow registration""" + task_queue: str + r"""Project name of the workflow""" + definition: WorkflowCodeDefinitionTypedDict + workflow_id: str + r"""Workflow ID of the workflow""" + workflow: NotRequired[Nullable[WorkflowTypedDict]] + r"""Workflow of the workflow registration""" + compatible_with_chat_assistant: NotRequired[bool] + r"""Whether the workflow is compatible with chat assistant""" + + +class WorkflowRegistration(BaseModel): + id: str + r"""Unique identifier of the workflow registration""" + + task_queue: str + r"""Project name of the workflow""" + + definition: WorkflowCodeDefinition + + workflow_id: str + r"""Workflow ID of the workflow""" + + workflow: OptionalNullable[Workflow] = UNSET + r"""Workflow of the workflow registration""" + + compatible_with_chat_assistant: Optional[bool] = False + r"""Whether the workflow is compatible with chat assistant""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["workflow", "compatible_with_chat_assistant"]) + nullable_fields = set(["workflow"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowregistrationgetresponse.py b/src/mistralai/client/models/workflowregistrationgetresponse.py new file mode 100644 index 00000000..3105856d --- /dev/null +++ b/src/mistralai/client/models/workflowregistrationgetresponse.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f063656f22ae + +from __future__ import annotations +from .workflowregistrationwithworkerstatus import ( + WorkflowRegistrationWithWorkerStatus, + WorkflowRegistrationWithWorkerStatusTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowRegistrationGetResponseTypedDict(TypedDict): + workflow_registration: WorkflowRegistrationWithWorkerStatusTypedDict + workflow_version: WorkflowRegistrationWithWorkerStatusTypedDict + + +class WorkflowRegistrationGetResponse(BaseModel): + workflow_registration: WorkflowRegistrationWithWorkerStatus + + workflow_version: WorkflowRegistrationWithWorkerStatus diff --git a/src/mistralai/client/models/workflowregistrationlistresponse.py b/src/mistralai/client/models/workflowregistrationlistresponse.py new file mode 100644 index 00000000..e66f219b --- /dev/null +++ b/src/mistralai/client/models/workflowregistrationlistresponse.py @@ -0,0 +1,41 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3752e5b776db + +from __future__ import annotations +from .workflowregistration import WorkflowRegistration, WorkflowRegistrationTypedDict +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List +from typing_extensions import TypedDict + + +class WorkflowRegistrationListResponseTypedDict(TypedDict): + workflow_registrations: List[WorkflowRegistrationTypedDict] + r"""A list of workflow registrations""" + next_cursor: Nullable[str] + workflow_versions: List[WorkflowRegistrationTypedDict] + r"""Deprecated: use workflow_registrations""" + + +class WorkflowRegistrationListResponse(BaseModel): + workflow_registrations: List[WorkflowRegistration] + r"""A list of workflow registrations""" + + next_cursor: Nullable[str] + + workflow_versions: List[WorkflowRegistration] + r"""Deprecated: use workflow_registrations""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowregistrationwithworkerstatus.py b/src/mistralai/client/models/workflowregistrationwithworkerstatus.py new file mode 100644 index 00000000..c0d9a69e --- /dev/null +++ b/src/mistralai/client/models/workflowregistrationwithworkerstatus.py @@ -0,0 +1,82 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 23b661b9496f + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from .workflowcodedefinition import ( + WorkflowCodeDefinition, + WorkflowCodeDefinitionTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowRegistrationWithWorkerStatusTypedDict(TypedDict): + id: str + r"""Unique identifier of the workflow registration""" + task_queue: str + r"""Project name of the workflow""" + definition: WorkflowCodeDefinitionTypedDict + workflow_id: str + r"""Workflow ID of the workflow""" + active: bool + r"""Whether the workflow registration is active""" + workflow: NotRequired[Nullable[WorkflowTypedDict]] + r"""Workflow of the workflow registration""" + compatible_with_chat_assistant: NotRequired[bool] + r"""Whether the workflow is compatible with chat assistant""" + + +class WorkflowRegistrationWithWorkerStatus(BaseModel): + id: str + r"""Unique identifier of the workflow registration""" + + task_queue: str + r"""Project name of the workflow""" + + definition: WorkflowCodeDefinition + + workflow_id: str + r"""Workflow ID of the workflow""" + + active: bool + r"""Whether the workflow registration is active""" + + workflow: OptionalNullable[Workflow] = UNSET + r"""Workflow of the workflow registration""" + + compatible_with_chat_assistant: Optional[bool] = False + r"""Whether the workflow is compatible with chat assistant""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["workflow", "compatible_with_chat_assistant"]) + nullable_fields = set(["workflow"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowschedulelistresponse.py b/src/mistralai/client/models/workflowschedulelistresponse.py new file mode 100644 index 00000000..3c9eb3d7 --- /dev/null +++ b/src/mistralai/client/models/workflowschedulelistresponse.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e5247c5183bb + +from __future__ import annotations +from .scheduledefinitionoutput import ( + ScheduleDefinitionOutput, + ScheduleDefinitionOutputTypedDict, +) +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class WorkflowScheduleListResponseTypedDict(TypedDict): + schedules: List[ScheduleDefinitionOutputTypedDict] + r"""A list of workflow schedules""" + + +class WorkflowScheduleListResponse(BaseModel): + schedules: List[ScheduleDefinitionOutput] + r"""A list of workflow schedules""" diff --git a/src/mistralai/client/models/workflowschedulerequest.py b/src/mistralai/client/models/workflowschedulerequest.py new file mode 100644 index 00000000..2ded66b9 --- /dev/null +++ b/src/mistralai/client/models/workflowschedulerequest.py @@ -0,0 +1,115 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2d8256704c6b + +from __future__ import annotations +from .scheduledefinition import ScheduleDefinition, ScheduleDefinitionTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowScheduleRequestTypedDict(TypedDict): + schedule: ScheduleDefinitionTypedDict + r"""Specification of the times scheduled actions may occur. + + The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and + :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + + Used for input where schedule_id is optional (can be provided or auto-generated). + """ + workflow_registration_id: NotRequired[Nullable[str]] + r"""The ID of the workflow registration to schedule""" + workflow_version_id: NotRequired[Nullable[str]] + r"""Deprecated: use workflow_registration_id""" + workflow_identifier: NotRequired[Nullable[str]] + r"""The name or ID of the workflow to schedule""" + workflow_task_queue: NotRequired[Nullable[str]] + r"""Deprecated. Use deployment_name instead.""" + schedule_id: NotRequired[Nullable[str]] + r"""Allows you to specify a custom schedule ID. If not provided, a random ID will be generated.""" + deployment_name: NotRequired[Nullable[str]] + r"""Name of the deployment to route this schedule to""" + + +class WorkflowScheduleRequest(BaseModel): + schedule: ScheduleDefinition + r"""Specification of the times scheduled actions may occur. + + The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and + :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + + Used for input where schedule_id is optional (can be provided or auto-generated). + """ + + workflow_registration_id: OptionalNullable[str] = UNSET + r"""The ID of the workflow registration to schedule""" + + workflow_version_id: OptionalNullable[str] = UNSET + r"""Deprecated: use workflow_registration_id""" + + workflow_identifier: OptionalNullable[str] = UNSET + r"""The name or ID of the workflow to schedule""" + + workflow_task_queue: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use deployment_name instead.""" + + schedule_id: OptionalNullable[str] = UNSET + r"""Allows you to specify a custom schedule ID. If not provided, a random ID will be generated.""" + + deployment_name: OptionalNullable[str] = UNSET + r"""Name of the deployment to route this schedule to""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "workflow_registration_id", + "workflow_version_id", + "workflow_identifier", + "workflow_task_queue", + "schedule_id", + "deployment_name", + ] + ) + nullable_fields = set( + [ + "workflow_registration_id", + "workflow_version_id", + "workflow_identifier", + "workflow_task_queue", + "schedule_id", + "deployment_name", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowscheduleresponse.py b/src/mistralai/client/models/workflowscheduleresponse.py new file mode 100644 index 00000000..d74ba1da --- /dev/null +++ b/src/mistralai/client/models/workflowscheduleresponse.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c77172c4a9f6 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowScheduleResponseTypedDict(TypedDict): + schedule_id: str + r"""The ID of the schedule""" + + +class WorkflowScheduleResponse(BaseModel): + schedule_id: str + r"""The ID of the schedule""" diff --git a/src/mistralai/client/models/workflowtaskfailedattributes.py b/src/mistralai/client/models/workflowtaskfailedattributes.py new file mode 100644 index 00000000..49444347 --- /dev/null +++ b/src/mistralai/client/models/workflowtaskfailedattributes.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c4c09c4d5ea7 + +from __future__ import annotations +from .failure import Failure, FailureTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowTaskFailedAttributesTypedDict(TypedDict): + r"""Attributes for workflow task failed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + failure: FailureTypedDict + r"""Represents an error or exception that occurred during execution.""" + + +class WorkflowTaskFailedAttributes(BaseModel): + r"""Attributes for workflow task failed events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + failure: Failure + r"""Represents an error or exception that occurred during execution.""" diff --git a/src/mistralai/client/models/workflowtaskfailedrequest.py b/src/mistralai/client/models/workflowtaskfailedrequest.py new file mode 100644 index 00000000..9075b0bc --- /dev/null +++ b/src/mistralai/client/models/workflowtaskfailedrequest.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d26184215fe3 + +from __future__ import annotations +from .workflowtaskfailedattributes import ( + WorkflowTaskFailedAttributes, + WorkflowTaskFailedAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowTaskFailedRequestTypedDict(TypedDict): + r"""Emitted when a workflow task fails. + + This indicates an error occurred during workflow task execution, + which may trigger a retry depending on configuration. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowTaskFailedAttributesTypedDict + r"""Attributes for workflow task failed events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["WORKFLOW_TASK_FAILED"] + r"""Event type discriminator.""" + + +class WorkflowTaskFailedRequest(BaseModel): + r"""Emitted when a workflow task fails. + + This indicates an error occurred during workflow task execution, + which may trigger a retry depending on configuration. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowTaskFailedAttributes + r"""Attributes for workflow task failed events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_TASK_FAILED"]], + AfterValidator(validate_const("WORKFLOW_TASK_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_TASK_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowTaskFailedRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowtaskfailedresponse.py b/src/mistralai/client/models/workflowtaskfailedresponse.py new file mode 100644 index 00000000..154145e3 --- /dev/null +++ b/src/mistralai/client/models/workflowtaskfailedresponse.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a02b01867b7f + +from __future__ import annotations +from .workflowtaskfailedattributes import ( + WorkflowTaskFailedAttributes, + WorkflowTaskFailedAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WorkflowTaskFailedResponseTypedDict(TypedDict): + r"""Emitted when a workflow task fails. + + This indicates an error occurred during workflow task execution, + which may trigger a retry depending on configuration. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowTaskFailedAttributesTypedDict + r"""Attributes for workflow task failed events.""" + event_type: Literal["WORKFLOW_TASK_FAILED"] + r"""Event type discriminator.""" + + +class WorkflowTaskFailedResponse(BaseModel): + r"""Emitted when a workflow task fails. + + This indicates an error occurred during workflow task execution, + which may trigger a retry depending on configuration. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowTaskFailedAttributes + r"""Attributes for workflow task failed events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_TASK_FAILED"]], + AfterValidator(validate_const("WORKFLOW_TASK_FAILED")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_TASK_FAILED" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowTaskFailedResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowtasktimedoutattributes.py b/src/mistralai/client/models/workflowtasktimedoutattributes.py new file mode 100644 index 00000000..1824990e --- /dev/null +++ b/src/mistralai/client/models/workflowtasktimedoutattributes.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 43369570cb96 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowTaskTimedOutAttributesTypedDict(TypedDict): + r"""Attributes for workflow task timed out events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + timeout_type: NotRequired[Nullable[str]] + r"""The type of timeout that occurred (e.g., 'START_TO_CLOSE', 'SCHEDULE_TO_START').""" + + +class WorkflowTaskTimedOutAttributes(BaseModel): + r"""Attributes for workflow task timed out events.""" + + task_id: str + r"""Unique identifier for the task within the workflow execution.""" + + timeout_type: OptionalNullable[str] = UNSET + r"""The type of timeout that occurred (e.g., 'START_TO_CLOSE', 'SCHEDULE_TO_START').""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["timeout_type"]) + nullable_fields = set(["timeout_type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowtasktimedoutrequest.py b/src/mistralai/client/models/workflowtasktimedoutrequest.py new file mode 100644 index 00000000..86a6bcdb --- /dev/null +++ b/src/mistralai/client/models/workflowtasktimedoutrequest.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 70f37007e50f + +from __future__ import annotations +from .workflowtasktimedoutattributes import ( + WorkflowTaskTimedOutAttributes, + WorkflowTaskTimedOutAttributesTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WorkflowTaskTimedOutRequestTypedDict(TypedDict): + r"""Emitted when a workflow task times out. + + This indicates the workflow task (a unit of workflow execution) exceeded + its configured timeout. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowTaskTimedOutAttributesTypedDict + r"""Attributes for workflow task timed out events.""" + event_timestamp: NotRequired[int] + r"""Unix timestamp in nanoseconds when the event was created.""" + parent_workflow_exec_id: NotRequired[Nullable[str]] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + event_type: Literal["WORKFLOW_TASK_TIMED_OUT"] + r"""Event type discriminator.""" + + +class WorkflowTaskTimedOutRequest(BaseModel): + r"""Emitted when a workflow task times out. + + This indicates the workflow task (a unit of workflow execution) exceeded + its configured timeout. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowTaskTimedOutAttributes + r"""Attributes for workflow task timed out events.""" + + event_timestamp: Optional[int] = None + r"""Unix timestamp in nanoseconds when the event was created.""" + + parent_workflow_exec_id: OptionalNullable[str] = UNSET + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_TASK_TIMED_OUT"]], + AfterValidator(validate_const("WORKFLOW_TASK_TIMED_OUT")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_TASK_TIMED_OUT" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["event_timestamp", "parent_workflow_exec_id", "event_type"] + ) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowTaskTimedOutRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowtasktimedoutresponse.py b/src/mistralai/client/models/workflowtasktimedoutresponse.py new file mode 100644 index 00000000..2c3350e0 --- /dev/null +++ b/src/mistralai/client/models/workflowtasktimedoutresponse.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8b7540c47083 + +from __future__ import annotations +from .workflowtasktimedoutattributes import ( + WorkflowTaskTimedOutAttributes, + WorkflowTaskTimedOutAttributesTypedDict, +) +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, TypedDict + + +class WorkflowTaskTimedOutResponseTypedDict(TypedDict): + r"""Emitted when a workflow task times out. + + This indicates the workflow task (a unit of workflow execution) exceeded + its configured timeout. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + attributes: WorkflowTaskTimedOutAttributesTypedDict + r"""Attributes for workflow task timed out events.""" + event_type: Literal["WORKFLOW_TASK_TIMED_OUT"] + r"""Event type discriminator.""" + + +class WorkflowTaskTimedOutResponse(BaseModel): + r"""Emitted when a workflow task times out. + + This indicates the workflow task (a unit of workflow execution) exceeded + its configured timeout. + """ + + event_id: str + r"""Unique identifier for this event instance.""" + + event_timestamp: int + r"""Unix timestamp in nanoseconds when the event was created.""" + + root_workflow_exec_id: str + r"""Execution ID of the root workflow that initiated this execution chain.""" + + parent_workflow_exec_id: Nullable[str] + r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" + + workflow_exec_id: str + r"""Execution ID of the workflow that emitted this event.""" + + workflow_run_id: str + r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" + + workflow_name: str + r"""The registered name of the workflow that emitted this event.""" + + attributes: WorkflowTaskTimedOutAttributes + r"""Attributes for workflow task timed out events.""" + + event_type: Annotated[ + Annotated[ + Optional[Literal["WORKFLOW_TASK_TIMED_OUT"]], + AfterValidator(validate_const("WORKFLOW_TASK_TIMED_OUT")), + ], + pydantic.Field(alias="event_type"), + ] = "WORKFLOW_TASK_TIMED_OUT" + r"""Event type discriminator.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["event_type"]) + nullable_fields = set(["parent_workflow_exec_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WorkflowTaskTimedOutResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/workflowtype.py b/src/mistralai/client/models/workflowtype.py new file mode 100644 index 00000000..67858c88 --- /dev/null +++ b/src/mistralai/client/models/workflowtype.py @@ -0,0 +1,8 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 01f37d193b17 + +from __future__ import annotations +from typing import Literal + + +WorkflowType = Literal["code",] diff --git a/src/mistralai/client/models/workflowunarchiveresponse.py b/src/mistralai/client/models/workflowunarchiveresponse.py new file mode 100644 index 00000000..16717856 --- /dev/null +++ b/src/mistralai/client/models/workflowunarchiveresponse.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 30bdd050feac + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowUnarchiveResponseTypedDict(TypedDict): + workflow: WorkflowTypedDict + + +class WorkflowUnarchiveResponse(BaseModel): + workflow: Workflow diff --git a/src/mistralai/client/models/workflowupdaterequest.py b/src/mistralai/client/models/workflowupdaterequest.py new file mode 100644 index 00000000..480fa47d --- /dev/null +++ b/src/mistralai/client/models/workflowupdaterequest.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8f3878d3c7c7 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowUpdateRequestTypedDict(TypedDict): + display_name: NotRequired[Nullable[str]] + r"""New display name value""" + description: NotRequired[Nullable[str]] + r"""New description value""" + available_in_chat_assistant: NotRequired[Nullable[bool]] + r"""Whether to make the workflow available in the chat assistant""" + + +class WorkflowUpdateRequest(BaseModel): + display_name: OptionalNullable[str] = UNSET + r"""New display name value""" + + description: OptionalNullable[str] = UNSET + r"""New description value""" + + available_in_chat_assistant: OptionalNullable[bool] = UNSET + r"""Whether to make the workflow available in the chat assistant""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["display_name", "description", "available_in_chat_assistant"] + ) + nullable_fields = set( + ["display_name", "description", "available_in_chat_assistant"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowupdateresponse.py b/src/mistralai/client/models/workflowupdateresponse.py new file mode 100644 index 00000000..3336e448 --- /dev/null +++ b/src/mistralai/client/models/workflowupdateresponse.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0ae165cc7a82 + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowUpdateResponseTypedDict(TypedDict): + workflow: WorkflowTypedDict + + +class WorkflowUpdateResponse(BaseModel): + workflow: Workflow diff --git a/src/mistralai/client/models/workflowwithworkerstatus.py b/src/mistralai/client/models/workflowwithworkerstatus.py new file mode 100644 index 00000000..7f469007 --- /dev/null +++ b/src/mistralai/client/models/workflowwithworkerstatus.py @@ -0,0 +1,111 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e1055203af7d + +from __future__ import annotations +from .workflowtype import WorkflowType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowWithWorkerStatusTypedDict(TypedDict): + id: str + r"""Unique identifier of the workflow""" + name: str + r"""Name of the workflow""" + display_name: str + r"""Display name of the workflow""" + type: WorkflowType + customer_id: str + r"""Customer ID of the workflow""" + workspace_id: str + r"""Workspace ID of the workflow""" + active: bool + r"""Whether the workflow is active""" + description: NotRequired[Nullable[str]] + r"""Description of the workflow""" + shared_namespace: NotRequired[Nullable[str]] + r"""Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow')""" + available_in_chat_assistant: NotRequired[bool] + r"""Whether the workflow is available in chat assistant""" + is_technical: NotRequired[bool] + r"""Whether the workflow is technical (e.g. SDK-managed)""" + archived: NotRequired[bool] + r"""Whether the workflow is archived""" + + +class WorkflowWithWorkerStatus(BaseModel): + id: str + r"""Unique identifier of the workflow""" + + name: str + r"""Name of the workflow""" + + display_name: str + r"""Display name of the workflow""" + + type: WorkflowType + + customer_id: str + r"""Customer ID of the workflow""" + + workspace_id: str + r"""Workspace ID of the workflow""" + + active: bool + r"""Whether the workflow is active""" + + description: OptionalNullable[str] = UNSET + r"""Description of the workflow""" + + shared_namespace: OptionalNullable[str] = UNSET + r"""Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow')""" + + available_in_chat_assistant: Optional[bool] = False + r"""Whether the workflow is available in chat assistant""" + + is_technical: Optional[bool] = False + r"""Whether the workflow is technical (e.g. SDK-managed)""" + + archived: Optional[bool] = False + r"""Whether the workflow is archived""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "description", + "shared_namespace", + "available_in_chat_assistant", + "is_technical", + "archived", + ] + ) + nullable_fields = set(["description", "shared_namespace"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py new file mode 100644 index 00000000..01b667cf --- /dev/null +++ b/src/mistralai/client/runs.py @@ -0,0 +1,644 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4297d58aeb21 + +from .basesdk import BaseSDK +from jsonpath import JSONPath +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union + + +class Runs(BaseSDK): + def list_runs( + self, + *, + workflow_identifier: OptionalNullable[str] = UNSET, + search: OptionalNullable[str] = UNSET, + status: OptionalNullable[ + Union[ + models.ListRunsV1WorkflowsRunsGetStatus, + models.ListRunsV1WorkflowsRunsGetStatusTypedDict, + ] + ] = UNSET, + page_size: Optional[int] = 50, + next_page_token: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: + r"""List Runs + + :param workflow_identifier: Filter by workflow name or id + :param search: Search by workflow name, display name or id + :param status: Filter by workflow status + :param page_size: Number of items per page + :param next_page_token: Token for the next page of results + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ListRunsV1WorkflowsRunsGetRequest( + workflow_identifier=workflow_identifier, + search=search, + status=status, + page_size=page_size, + next_page_token=next_page_token, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/runs", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_runs_v1_workflows_runs_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + next_cursor = JSONPath("$.next_page_token").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + results = JSONPath("$.executions").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit = request.page_size if not request.page_size is None else 50 + if len(results[0]) < limit: + return None + + return self.list_runs( + workflow_identifier=workflow_identifier, + search=search, + status=status, + page_size=page_size, + next_page_token=next_cursor, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.ListRunsV1WorkflowsRunsGetResponse( + result=unmarshal_json_response( + models.WorkflowExecutionListResponse, http_res + ), + next=next_func, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_runs_async( + self, + *, + workflow_identifier: OptionalNullable[str] = UNSET, + search: OptionalNullable[str] = UNSET, + status: OptionalNullable[ + Union[ + models.ListRunsV1WorkflowsRunsGetStatus, + models.ListRunsV1WorkflowsRunsGetStatusTypedDict, + ] + ] = UNSET, + page_size: Optional[int] = 50, + next_page_token: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: + r"""List Runs + + :param workflow_identifier: Filter by workflow name or id + :param search: Search by workflow name, display name or id + :param status: Filter by workflow status + :param page_size: Number of items per page + :param next_page_token: Token for the next page of results + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ListRunsV1WorkflowsRunsGetRequest( + workflow_identifier=workflow_identifier, + search=search, + status=status, + page_size=page_size, + next_page_token=next_page_token, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/runs", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="list_runs_v1_workflows_runs_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> ( + Awaitable[Optional[models.ListRunsV1WorkflowsRunsGetResponse]] + ): + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + next_cursor = JSONPath("$.next_page_token").parse(body) + + if len(next_cursor) == 0: + return empty_result() + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return empty_result() + results = JSONPath("$.executions").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit = request.page_size if not request.page_size is None else 50 + if len(results[0]) < limit: + return empty_result() + + return self.list_runs_async( + workflow_identifier=workflow_identifier, + search=search, + status=status, + page_size=page_size, + next_page_token=next_cursor, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.ListRunsV1WorkflowsRunsGetResponse( + result=unmarshal_json_response( + models.WorkflowExecutionListResponse, http_res + ), + next=next_func, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_run( + self, + *, + run_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionResponse: + r"""Get Run + + :param run_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetRunV1WorkflowsRunsRunIDGetRequest( + run_id=run_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/runs/{run_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_run_v1_workflows_runs__run_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_run_async( + self, + *, + run_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowExecutionResponse: + r"""Get Run + + :param run_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetRunV1WorkflowsRunsRunIDGetRequest( + run_id=run_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/runs/{run_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_run_v1_workflows_runs__run_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowExecutionResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_run_history( + self, + *, + run_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Get Run History + + :param run_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest( + run_id=run_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/runs/{run_id}/history", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_run_history_v1_workflows_runs__run_id__history_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_run_history_async( + self, + *, + run_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Any: + r"""Get Run History + + :param run_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest( + run_id=run_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/runs/{run_id}/history", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_run_history_v1_workflows_runs__run_id__history_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(Any, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/schedules.py b/src/mistralai/client/schedules.py new file mode 100644 index 00000000..d6f2e5ff --- /dev/null +++ b/src/mistralai/client/schedules.py @@ -0,0 +1,570 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d3b4fe452390 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union + + +class Schedules(BaseSDK): + def get_schedules( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleListResponse: + r"""Get Schedules + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/workflows/schedules", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_schedules_v1_workflows_schedules_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowScheduleListResponse, http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_schedules_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleListResponse: + r"""Get Schedules + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/workflows/schedules", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_schedules_v1_workflows_schedules_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowScheduleListResponse, http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def schedule_workflow( + self, + *, + schedule: Union[models.ScheduleDefinition, models.ScheduleDefinitionTypedDict], + workflow_registration_id: OptionalNullable[str] = UNSET, + workflow_version_id: OptionalNullable[str] = UNSET, + workflow_identifier: OptionalNullable[str] = UNSET, + workflow_task_queue: OptionalNullable[str] = UNSET, + schedule_id: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleResponse: + r"""Schedule Workflow + + :param schedule: Specification of the times scheduled actions may occur. + + The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and + :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + + Used for input where schedule_id is optional (can be provided or auto-generated). + :param workflow_registration_id: The ID of the workflow registration to schedule + :param workflow_version_id: Deprecated: use workflow_registration_id + :param workflow_identifier: The name or ID of the workflow to schedule + :param workflow_task_queue: Deprecated. Use deployment_name instead. + :param schedule_id: Allows you to specify a custom schedule ID. If not provided, a random ID will be generated. + :param deployment_name: Name of the deployment to route this schedule to + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowScheduleRequest( + schedule=utils.get_pydantic_model(schedule, models.ScheduleDefinition), + workflow_registration_id=workflow_registration_id, + workflow_version_id=workflow_version_id, + workflow_identifier=workflow_identifier, + workflow_task_queue=workflow_task_queue, + schedule_id=schedule_id, + deployment_name=deployment_name, + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/schedules", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowScheduleRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="schedule_workflow_v1_workflows_schedules_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.WorkflowScheduleResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def schedule_workflow_async( + self, + *, + schedule: Union[models.ScheduleDefinition, models.ScheduleDefinitionTypedDict], + workflow_registration_id: OptionalNullable[str] = UNSET, + workflow_version_id: OptionalNullable[str] = UNSET, + workflow_identifier: OptionalNullable[str] = UNSET, + workflow_task_queue: OptionalNullable[str] = UNSET, + schedule_id: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleResponse: + r"""Schedule Workflow + + :param schedule: Specification of the times scheduled actions may occur. + + The times are the union of :py:attr:`calendars`, :py:attr:`intervals`, and + :py:attr:`cron_expressions` excluding anything in :py:attr:`skip`. + + Used for input where schedule_id is optional (can be provided or auto-generated). + :param workflow_registration_id: The ID of the workflow registration to schedule + :param workflow_version_id: Deprecated: use workflow_registration_id + :param workflow_identifier: The name or ID of the workflow to schedule + :param workflow_task_queue: Deprecated. Use deployment_name instead. + :param schedule_id: Allows you to specify a custom schedule ID. If not provided, a random ID will be generated. + :param deployment_name: Name of the deployment to route this schedule to + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowScheduleRequest( + schedule=utils.get_pydantic_model(schedule, models.ScheduleDefinition), + workflow_registration_id=workflow_registration_id, + workflow_version_id=workflow_version_id, + workflow_identifier=workflow_identifier, + workflow_task_queue=workflow_task_queue, + schedule_id=schedule_id, + deployment_name=deployment_name, + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/schedules", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowScheduleRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="schedule_workflow_v1_workflows_schedules_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return unmarshal_json_response(models.WorkflowScheduleResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def unschedule_workflow( + self, + *, + schedule_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Unschedule Workflow + + :param schedule_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest( + schedule_id=schedule_id, + ) + + req = self._build_request( + method="DELETE", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="unschedule_workflow_v1_workflows_schedules__schedule_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def unschedule_workflow_async( + self, + *, + schedule_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Unschedule Workflow + + :param schedule_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest( + schedule_id=schedule_id, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="unschedule_workflow_v1_workflows_schedules__schedule_id__delete", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index 52fc5d9a..03338f46 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -23,11 +23,13 @@ from mistralai.client.chat import Chat from mistralai.client.classifiers import Classifiers from mistralai.client.embeddings import Embeddings + from mistralai.client.events import Events from mistralai.client.files import Files from mistralai.client.fim import Fim from mistralai.client.fine_tuning import FineTuning from mistralai.client.models_ import Models from mistralai.client.ocr import Ocr + from mistralai.client.workflows import Workflows class Mistral(BaseSDK): @@ -53,6 +55,8 @@ class Mistral(BaseSDK): r"""Classifiers API.""" ocr: "Ocr" r"""OCR API""" + workflows: "Workflows" + events: "Events" _sub_sdk_map = { "audio": ("mistralai.client.audio", "Audio"), "models": ("mistralai.client.models_", "Models"), @@ -66,6 +70,8 @@ class Mistral(BaseSDK): "embeddings": ("mistralai.client.embeddings", "Embeddings"), "classifiers": ("mistralai.client.classifiers", "Classifiers"), "ocr": ("mistralai.client.ocr", "Ocr"), + "workflows": ("mistralai.client.workflows", "Workflows"), + "events": ("mistralai.client.events", "Events"), } def __init__( diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py index 68d4bb5b..2d571857 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -16,6 +16,7 @@ def list( *, limit: Optional[int] = 10, offset: Optional[int] = 0, + type_: Optional[models.ListVoicesV1AudioVoicesGetType] = "all", retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -27,6 +28,7 @@ def list( :param limit: Maximum number of voices to return :param offset: Offset for pagination + :param type: Filter the voices between customs and presets :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -45,6 +47,7 @@ def list( request = models.ListVoicesV1AudioVoicesGetRequest( limit=limit, offset=offset, + type=type_, ) req = self._build_request( @@ -109,6 +112,7 @@ async def list_async( *, limit: Optional[int] = 10, offset: Optional[int] = 0, + type_: Optional[models.ListVoicesV1AudioVoicesGetType] = "all", retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -120,6 +124,7 @@ async def list_async( :param limit: Maximum number of voices to return :param offset: Offset for pagination + :param type: Filter the voices between customs and presets :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -138,6 +143,7 @@ async def list_async( request = models.ListVoicesV1AudioVoicesGetRequest( limit=limit, offset=offset, + type=type_, ) req = self._build_request_async( diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py new file mode 100644 index 00000000..f3150791 --- /dev/null +++ b/src/mistralai/client/workflows.py @@ -0,0 +1,2213 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: e2a0381191f6 + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from jsonpath import JSONPath +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.deployments import Deployments +from mistralai.client.executions import Executions +from mistralai.client.metrics import Metrics +from mistralai.client.runs import Runs +from mistralai.client.schedules import Schedules +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from mistralai.client.workflows_events import WorkflowsEvents +from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union +from typing_extensions import deprecated + +# region imports +import asyncio +import time +# endregion imports + + +class Workflows(BaseSDK): + executions: Executions + metrics: Metrics + runs: Runs + schedules: Schedules + events: WorkflowsEvents + deployments: Deployments + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.executions = Executions(self.sdk_configuration, parent_ref=self.parent_ref) + self.metrics = Metrics(self.sdk_configuration, parent_ref=self.parent_ref) + self.runs = Runs(self.sdk_configuration, parent_ref=self.parent_ref) + self.schedules = Schedules(self.sdk_configuration, parent_ref=self.parent_ref) + self.events = WorkflowsEvents( + self.sdk_configuration, parent_ref=self.parent_ref + ) + self.deployments = Deployments( + self.sdk_configuration, parent_ref=self.parent_ref + ) + + # region sdk-class-body + def execute_workflow_and_wait( + self, + workflow_identifier: str, + input: OptionalNullable[Dict[str, Any]] = UNSET, + execution_id: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + polling_interval: int = 5, + max_attempts: Optional[int] = None, + use_api_sync: bool = False, + timeout_seconds: OptionalNullable[float] = UNSET, + ) -> Any: + """Execute a workflow and wait for its completion. + + Args: + workflow_identifier: The workflow name or ID. + input: Input parameters for the workflow + execution_id: Optional custom execution ID + deployment_name: Name of the deployment to route this execution to + custom_tracing_attributes: Custom tracing attributes + polling_interval: Seconds between status checks when polling + max_attempts: Maximum number of polling attempts when polling (None for unlimited) + use_api_sync: Whether to use the API's built-in sync execution capability + timeout_seconds: Maximum time to wait in seconds when using API sync + + Returns: + The workflow result directly + + Raises: + TimeoutError: If max_attempts is reached and workflow is still running + RuntimeError: If workflow fails or terminates abnormally + """ + if use_api_sync: + # Use the API's built-in synchronous execution + response = self.execute_workflow( + workflow_identifier=workflow_identifier, + input=input, + execution_id=execution_id, + wait_for_result=True, + timeout_seconds=timeout_seconds, + custom_tracing_attributes=custom_tracing_attributes, + deployment_name=deployment_name, + ) + return response.result + # Use polling method + execution = self.execute_workflow( + workflow_identifier=workflow_identifier, + input=input, + execution_id=execution_id, + custom_tracing_attributes=custom_tracing_attributes, + deployment_name=deployment_name, + ) + + # Wait for completion + final_execution = self.wait_for_workflow_completion( + execution.execution_id, polling_interval, max_attempts + ) + + return final_execution.result + + def wait_for_workflow_completion( + self, + execution_id: str, + polling_interval: int = 5, + max_attempts: Optional[int] = None, + ) -> models.WorkflowExecutionResponse: + """Wait for a workflow to complete by polling its status. + + Args: + execution_id: Execution ID of the workflow + polling_interval: Seconds between status checks + max_attempts: Maximum number of polling attempts (None for unlimited) + + Returns: + WorkflowExecutionResponse with the final execution details + + Raises: + TimeoutError: If max_attempts is reached and workflow is still running + RuntimeError: If workflow fails or terminates abnormally + """ + attempts = 0 + while True: + response = self.executions.get_workflow_execution(execution_id=execution_id) + + if response.status != "RUNNING": + if response.status == "COMPLETED": + return response + raise RuntimeError(f"Workflow failed with status: {response.status}") + + attempts += 1 + if max_attempts is not None and attempts >= max_attempts: + raise TimeoutError( + f"Workflow is still running after {max_attempts} polling attempts" + ) + + time.sleep(polling_interval) + + async def execute_workflow_and_wait_async( + self, + workflow_identifier: str, + input: OptionalNullable[Dict[str, Any]] = UNSET, + execution_id: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + polling_interval: int = 5, + max_attempts: Optional[int] = None, + use_api_sync: bool = False, + timeout_seconds: OptionalNullable[float] = UNSET, + ) -> Any: + """Execute a workflow and wait for its completion (async version). + + Args: + workflow_identifier: The workflow name or ID. + input: Input parameters for the workflow + execution_id: Optional custom execution ID + deployment_name: Name of the deployment to route this execution to + custom_tracing_attributes: Custom tracing attributes + polling_interval: Seconds between status checks when polling + max_attempts: Maximum number of polling attempts when polling (None for unlimited) + use_api_sync: Whether to use the API's built-in sync execution capability + timeout_seconds: Maximum time to wait in seconds when using API sync + + Returns: + The workflow result directly + + Raises: + TimeoutError: If max_attempts is reached and workflow is still running + RuntimeError: If workflow fails or terminates abnormally + """ + if use_api_sync: + # Use the API's built-in synchronous execution + response = await self.execute_workflow_async( + workflow_identifier=workflow_identifier, + input=input, + execution_id=execution_id, + wait_for_result=True, + timeout_seconds=timeout_seconds, + custom_tracing_attributes=custom_tracing_attributes, + deployment_name=deployment_name, + ) + return response.result + + # Use polling method + execution = await self.execute_workflow_async( + workflow_identifier=workflow_identifier, + input=input, + execution_id=execution_id, + custom_tracing_attributes=custom_tracing_attributes, + deployment_name=deployment_name, + ) + + # Wait for completion + final_execution = await self.wait_for_workflow_completion_async( + execution.execution_id, polling_interval, max_attempts + ) + + return final_execution.result + + async def wait_for_workflow_completion_async( + self, + execution_id: str, + polling_interval: int = 5, + max_attempts: Optional[int] = None, + ) -> models.WorkflowExecutionResponse: + """Wait for a workflow to complete by polling its status (async version). + + Args: + execution_id: Execution ID of the workflow + polling_interval: Seconds between status checks + max_attempts: Maximum number of polling attempts (None for unlimited) + + Returns: + WorkflowExecutionResponse with the final execution details + + Raises: + TimeoutError: If max_attempts is reached and workflow is still running + RuntimeError: If workflow fails or terminates abnormally + """ + attempts = 0 + while True: + response = await self.executions.get_workflow_execution_async( + execution_id=execution_id + ) + + if response.status != "RUNNING": + if response.status == "COMPLETED": + return response + raise RuntimeError(f"Workflow failed with status: {response.status}") + + attempts += 1 + if max_attempts is not None and attempts >= max_attempts: + raise TimeoutError( + f"Workflow is still running after {max_attempts} polling attempts" + ) + + await asyncio.sleep(polling_interval) + + # endregion sdk-class-body + + def get_workflows( + self, + *, + active_only: Optional[bool] = False, + include_shared: Optional[bool] = True, + available_in_chat_assistant: OptionalNullable[bool] = UNSET, + archived: OptionalNullable[bool] = UNSET, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 50, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: + r"""Get Workflows + + :param active_only: Whether to only return active workflows + :param include_shared: Whether to include shared workflows + :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all + :param cursor: The cursor for pagination + :param limit: The maximum number of workflows to return + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowsV1WorkflowsGetRequest( + active_only=active_only, + include_shared=include_shared, + available_in_chat_assistant=available_in_chat_assistant, + archived=archived, + cursor=cursor, + limit=limit, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflows_v1_workflows_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + next_cursor = JSONPath("$.next_cursor").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + results = JSONPath("$.workflows").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit = request.limit if not request.limit is None else 50 + if len(results[0]) < limit: + return None + + return self.get_workflows( + active_only=active_only, + include_shared=include_shared, + available_in_chat_assistant=available_in_chat_assistant, + archived=archived, + cursor=next_cursor, + limit=limit, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.GetWorkflowsV1WorkflowsGetResponse( + result=unmarshal_json_response(models.WorkflowListResponse, http_res), + next=next_func, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflows_async( + self, + *, + active_only: Optional[bool] = False, + include_shared: Optional[bool] = True, + available_in_chat_assistant: OptionalNullable[bool] = UNSET, + archived: OptionalNullable[bool] = UNSET, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 50, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: + r"""Get Workflows + + :param active_only: Whether to only return active workflows + :param include_shared: Whether to include shared workflows + :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all + :param cursor: The cursor for pagination + :param limit: The maximum number of workflows to return + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowsV1WorkflowsGetRequest( + active_only=active_only, + include_shared=include_shared, + available_in_chat_assistant=available_in_chat_assistant, + archived=archived, + cursor=cursor, + limit=limit, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflows_v1_workflows_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> ( + Awaitable[Optional[models.GetWorkflowsV1WorkflowsGetResponse]] + ): + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + next_cursor = JSONPath("$.next_cursor").parse(body) + + if len(next_cursor) == 0: + return empty_result() + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return empty_result() + results = JSONPath("$.workflows").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit = request.limit if not request.limit is None else 50 + if len(results[0]) < limit: + return empty_result() + + return self.get_workflows_async( + active_only=active_only, + include_shared=include_shared, + available_in_chat_assistant=available_in_chat_assistant, + archived=archived, + cursor=next_cursor, + limit=limit, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.GetWorkflowsV1WorkflowsGetResponse( + result=unmarshal_json_response(models.WorkflowListResponse, http_res), + next=next_func, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_workflow_registrations( + self, + *, + workflow_id: OptionalNullable[str] = UNSET, + task_queue: OptionalNullable[str] = UNSET, + active_only: Optional[bool] = False, + include_shared: Optional[bool] = True, + workflow_search: OptionalNullable[str] = UNSET, + archived: OptionalNullable[bool] = UNSET, + with_workflow: Optional[bool] = False, + available_in_chat_assistant: OptionalNullable[bool] = UNSET, + limit: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowRegistrationListResponse: + r"""Get Workflow Registrations + + :param workflow_id: The workflow ID to filter by + :param task_queue: The task queue to filter by + :param active_only: Whether to only return active workflows versions + :param include_shared: Whether to include shared workflow versions + :param workflow_search: The workflow name to filter by + :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all + :param with_workflow: Whether to include the workflow definition + :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param limit: The maximum number of workflows versions to return + :param cursor: The cursor for pagination + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest( + workflow_id=workflow_id, + task_queue=task_queue, + active_only=active_only, + include_shared=include_shared, + workflow_search=workflow_search, + archived=archived, + with_workflow=with_workflow, + available_in_chat_assistant=available_in_chat_assistant, + limit=limit, + cursor=cursor, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/registrations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_registrations_v1_workflows_registrations_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowRegistrationListResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_registrations_async( + self, + *, + workflow_id: OptionalNullable[str] = UNSET, + task_queue: OptionalNullable[str] = UNSET, + active_only: Optional[bool] = False, + include_shared: Optional[bool] = True, + workflow_search: OptionalNullable[str] = UNSET, + archived: OptionalNullable[bool] = UNSET, + with_workflow: Optional[bool] = False, + available_in_chat_assistant: OptionalNullable[bool] = UNSET, + limit: Optional[int] = 50, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowRegistrationListResponse: + r"""Get Workflow Registrations + + :param workflow_id: The workflow ID to filter by + :param task_queue: The task queue to filter by + :param active_only: Whether to only return active workflows versions + :param include_shared: Whether to include shared workflow versions + :param workflow_search: The workflow name to filter by + :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all + :param with_workflow: Whether to include the workflow definition + :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param limit: The maximum number of workflows versions to return + :param cursor: The cursor for pagination + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest( + workflow_id=workflow_id, + task_queue=task_queue, + active_only=active_only, + include_shared=include_shared, + workflow_search=workflow_search, + archived=archived, + with_workflow=with_workflow, + available_in_chat_assistant=available_in_chat_assistant, + limit=limit, + cursor=cursor, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/registrations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_registrations_v1_workflows_registrations_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowRegistrationListResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def execute_workflow( + self, + *, + workflow_identifier: str, + execution_id: OptionalNullable[str] = UNSET, + input: OptionalNullable[Dict[str, Any]] = UNSET, + encoded_input: OptionalNullable[ + Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] + ] = UNSET, + wait_for_result: Optional[bool] = False, + timeout_seconds: OptionalNullable[float] = UNSET, + custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + task_queue: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost: + r"""Execute Workflow + + :param workflow_identifier: + :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. + :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. + :param wait_for_result: If true, wait for the workflow to complete and return the result directly. + :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. + :param custom_tracing_attributes: + :param task_queue: Deprecated. Use deployment_name instead. + :param deployment_name: Name of the deployment to route this execution to + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest( + workflow_identifier=workflow_identifier, + workflow_execution_request=models.WorkflowExecutionRequest( + execution_id=execution_id, + input=input, + encoded_input=utils.get_pydantic_model( + encoded_input, OptionalNullable[models.NetworkEncodedInput] + ), + wait_for_result=wait_for_result, + timeout_seconds=timeout_seconds, + custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, + deployment_name=deployment_name, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/{workflow_identifier}/execute", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_execution_request, + False, + False, + "json", + models.WorkflowExecutionRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="execute_workflow_v1_workflows__workflow_identifier__execute_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def execute_workflow_async( + self, + *, + workflow_identifier: str, + execution_id: OptionalNullable[str] = UNSET, + input: OptionalNullable[Dict[str, Any]] = UNSET, + encoded_input: OptionalNullable[ + Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] + ] = UNSET, + wait_for_result: Optional[bool] = False, + timeout_seconds: OptionalNullable[float] = UNSET, + custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + task_queue: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost: + r"""Execute Workflow + + :param workflow_identifier: + :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. + :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. + :param wait_for_result: If true, wait for the workflow to complete and return the result directly. + :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. + :param custom_tracing_attributes: + :param task_queue: Deprecated. Use deployment_name instead. + :param deployment_name: Name of the deployment to route this execution to + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePostRequest( + workflow_identifier=workflow_identifier, + workflow_execution_request=models.WorkflowExecutionRequest( + execution_id=execution_id, + input=input, + encoded_input=utils.get_pydantic_model( + encoded_input, OptionalNullable[models.NetworkEncodedInput] + ), + wait_for_result=wait_for_result, + timeout_seconds=timeout_seconds, + custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, + deployment_name=deployment_name, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/{workflow_identifier}/execute", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_execution_request, + False, + False, + "json", + models.WorkflowExecutionRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="execute_workflow_v1_workflows__workflow_identifier__execute_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ResponseExecuteWorkflowV1WorkflowsWorkflowIdentifierExecutePost, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + @deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ) + def execute_workflow_registration( + self, + *, + workflow_registration_id: str, + execution_id: OptionalNullable[str] = UNSET, + input: OptionalNullable[Dict[str, Any]] = UNSET, + encoded_input: OptionalNullable[ + Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] + ] = UNSET, + wait_for_result: Optional[bool] = False, + timeout_seconds: OptionalNullable[float] = UNSET, + custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + task_queue: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost: + r"""Execute Workflow Registration + + :param workflow_registration_id: + :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. + :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. + :param wait_for_result: If true, wait for the workflow to complete and return the result directly. + :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. + :param custom_tracing_attributes: + :param task_queue: Deprecated. Use deployment_name instead. + :param deployment_name: Name of the deployment to route this execution to + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequest( + workflow_registration_id=workflow_registration_id, + workflow_execution_request=models.WorkflowExecutionRequest( + execution_id=execution_id, + input=input, + encoded_input=utils.get_pydantic_model( + encoded_input, OptionalNullable[models.NetworkEncodedInput] + ), + wait_for_result=wait_for_result, + timeout_seconds=timeout_seconds, + custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, + deployment_name=deployment_name, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/registrations/{workflow_registration_id}/execute", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_execution_request, + False, + False, + "json", + models.WorkflowExecutionRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="execute_workflow_registration_v1_workflows_registrations__workflow_registration_id__execute_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + @deprecated( + "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ) + async def execute_workflow_registration_async( + self, + *, + workflow_registration_id: str, + execution_id: OptionalNullable[str] = UNSET, + input: OptionalNullable[Dict[str, Any]] = UNSET, + encoded_input: OptionalNullable[ + Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] + ] = UNSET, + wait_for_result: Optional[bool] = False, + timeout_seconds: OptionalNullable[float] = UNSET, + custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + task_queue: OptionalNullable[str] = UNSET, + deployment_name: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost: + r"""Execute Workflow Registration + + :param workflow_registration_id: + :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. + :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. + :param wait_for_result: If true, wait for the workflow to complete and return the result directly. + :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. + :param custom_tracing_attributes: + :param task_queue: Deprecated. Use deployment_name instead. + :param deployment_name: Name of the deployment to route this execution to + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePostRequest( + workflow_registration_id=workflow_registration_id, + workflow_execution_request=models.WorkflowExecutionRequest( + execution_id=execution_id, + input=input, + encoded_input=utils.get_pydantic_model( + encoded_input, OptionalNullable[models.NetworkEncodedInput] + ), + wait_for_result=wait_for_result, + timeout_seconds=timeout_seconds, + custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, + deployment_name=deployment_name, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/registrations/{workflow_registration_id}/execute", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_execution_request, + False, + False, + "json", + models.WorkflowExecutionRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="execute_workflow_registration_v1_workflows_registrations__workflow_registration_id__execute_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.ResponseExecuteWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDExecutePost, + http_res, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_workflow( + self, + *, + workflow_identifier: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowGetResponse: + r"""Get Workflow + + :param workflow_identifier: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest( + workflow_identifier=workflow_identifier, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/{workflow_identifier}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_v1_workflows__workflow_identifier__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowGetResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_async( + self, + *, + workflow_identifier: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowGetResponse: + r"""Get Workflow + + :param workflow_identifier: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowV1WorkflowsWorkflowIdentifierGetRequest( + workflow_identifier=workflow_identifier, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/{workflow_identifier}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_v1_workflows__workflow_identifier__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowGetResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def update_workflow( + self, + *, + workflow_identifier: str, + display_name: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + available_in_chat_assistant: OptionalNullable[bool] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowUpdateResponse: + r"""Update Workflow + + :param workflow_identifier: + :param display_name: New display name value + :param description: New description value + :param available_in_chat_assistant: Whether to make the workflow available in the chat assistant + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest( + workflow_identifier=workflow_identifier, + workflow_update_request=models.WorkflowUpdateRequest( + display_name=display_name, + description=description, + available_in_chat_assistant=available_in_chat_assistant, + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/workflows/{workflow_identifier}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_update_request, + False, + False, + "json", + models.WorkflowUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_workflow_v1_workflows__workflow_identifier__put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowUpdateResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_workflow_async( + self, + *, + workflow_identifier: str, + display_name: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + available_in_chat_assistant: OptionalNullable[bool] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowUpdateResponse: + r"""Update Workflow + + :param workflow_identifier: + :param display_name: New display name value + :param description: New description value + :param available_in_chat_assistant: Whether to make the workflow available in the chat assistant + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateWorkflowV1WorkflowsWorkflowIdentifierPutRequest( + workflow_identifier=workflow_identifier, + workflow_update_request=models.WorkflowUpdateRequest( + display_name=display_name, + description=description, + available_in_chat_assistant=available_in_chat_assistant, + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/workflows/{workflow_identifier}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_update_request, + False, + False, + "json", + models.WorkflowUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_workflow_v1_workflows__workflow_identifier__put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowUpdateResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_workflow_registration( + self, + *, + workflow_registration_id: str, + with_workflow: Optional[bool] = False, + include_shared: Optional[bool] = True, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowRegistrationGetResponse: + r"""Get Workflow Registration + + :param workflow_registration_id: + :param with_workflow: Whether to include the workflow definition + :param include_shared: Whether to include shared workflow versions + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequest( + workflow_registration_id=workflow_registration_id, + with_workflow=with_workflow, + include_shared=include_shared, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/registrations/{workflow_registration_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_registration_v1_workflows_registrations__workflow_registration_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowRegistrationGetResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_registration_async( + self, + *, + workflow_registration_id: str, + with_workflow: Optional[bool] = False, + include_shared: Optional[bool] = True, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowRegistrationGetResponse: + r"""Get Workflow Registration + + :param workflow_registration_id: + :param with_workflow: Whether to include the workflow definition + :param include_shared: Whether to include shared workflow versions + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIDGetRequest( + workflow_registration_id=workflow_registration_id, + with_workflow=with_workflow, + include_shared=include_shared, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/registrations/{workflow_registration_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_registration_v1_workflows_registrations__workflow_registration_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowRegistrationGetResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def archive_workflow( + self, + *, + workflow_identifier: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowArchiveResponse: + r"""Archive Workflow + + :param workflow_identifier: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest( + workflow_identifier=workflow_identifier, + ) + + req = self._build_request( + method="PUT", + path="/v1/workflows/{workflow_identifier}/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="archive_workflow_v1_workflows__workflow_identifier__archive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowArchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def archive_workflow_async( + self, + *, + workflow_identifier: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowArchiveResponse: + r"""Archive Workflow + + :param workflow_identifier: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ArchiveWorkflowV1WorkflowsWorkflowIdentifierArchivePutRequest( + workflow_identifier=workflow_identifier, + ) + + req = self._build_request_async( + method="PUT", + path="/v1/workflows/{workflow_identifier}/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="archive_workflow_v1_workflows__workflow_identifier__archive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowArchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def unarchive_workflow( + self, + *, + workflow_identifier: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowUnarchiveResponse: + r"""Unarchive Workflow + + :param workflow_identifier: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest( + workflow_identifier=workflow_identifier, + ) + ) + + req = self._build_request( + method="PUT", + path="/v1/workflows/{workflow_identifier}/unarchive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="unarchive_workflow_v1_workflows__workflow_identifier__unarchive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowUnarchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def unarchive_workflow_async( + self, + *, + workflow_identifier: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowUnarchiveResponse: + r"""Unarchive Workflow + + :param workflow_identifier: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest( + workflow_identifier=workflow_identifier, + ) + ) + + req = self._build_request_async( + method="PUT", + path="/v1/workflows/{workflow_identifier}/unarchive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="unarchive_workflow_v1_workflows__workflow_identifier__unarchive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowUnarchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/workflows_events.py b/src/mistralai/client/workflows_events.py new file mode 100644 index 00000000..03df3f78 --- /dev/null +++ b/src/mistralai/client/workflows_events.py @@ -0,0 +1,886 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6d4f674ce8ef + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import eventstreaming, get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Dict, List, Mapping, Optional, Union + + +class WorkflowsEvents(BaseSDK): + def receive_workflow_event( + self, + *, + event: Union[ + models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventResponse: + r"""Receive Workflow Event + + Receive workflow events from workers. + + Events are published to NATS for real-time streaming and persisted in the database. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param event: The workflow event payload. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventRequest( + event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_event_v1_workflows_events_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def receive_workflow_event_async( + self, + *, + event: Union[ + models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventResponse: + r"""Receive Workflow Event + + Receive workflow events from workers. + + Events are published to NATS for real-time streaming and persisted in the database. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param event: The workflow event payload. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventRequest( + event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_event_v1_workflows_events_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def receive_workflow_events_batch( + self, + *, + events: Union[ + List[models.WorkflowEventBatchRequestEvent], + List[models.WorkflowEventBatchRequestEventTypedDict], + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventBatchResponse: + r"""Receive Workflow Events Batch + + Receive multiple workflow events from workers in a single batch. + + Events are published to NATS for real-time streaming and persisted in the database. + This endpoint processes events sequentially to maintain ordering guarantees. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param events: List of workflow events to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventBatchRequest( + events=utils.get_pydantic_model( + events, List[models.WorkflowEventBatchRequestEvent] + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/events/batch", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventBatchRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def receive_workflow_events_batch_async( + self, + *, + events: Union[ + List[models.WorkflowEventBatchRequestEvent], + List[models.WorkflowEventBatchRequestEventTypedDict], + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowEventBatchResponse: + r"""Receive Workflow Events Batch + + Receive multiple workflow events from workers in a single batch. + + Events are published to NATS for real-time streaming and persisted in the database. + This endpoint processes events sequentially to maintain ordering guarantees. + + For shared workers, the actual execution owner is resolved from the execution record, + ensuring events are streamed to the correct user's namespace. + + :param events: List of workflow events to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowEventBatchRequest( + events=utils.get_pydantic_model( + events, List[models.WorkflowEventBatchRequestEvent] + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/events/batch", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowEventBatchRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def get_stream_events( + self, + *, + scope: Optional[models.Scope] = "*", + activity_name: Optional[str] = "*", + activity_id: Optional[str] = "*", + workflow_name: Optional[str] = "*", + workflow_exec_id: Optional[str] = "*", + root_workflow_exec_id: Optional[str] = "*", + parent_workflow_exec_id: Optional[str] = "*", + stream: Optional[str] = "*", + start_seq: Optional[int] = 0, + metadata_filters: OptionalNullable[Dict[str, Any]] = UNSET, + workflow_event_types: OptionalNullable[List[models.WorkflowEventType]] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStream[ + models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ]: + r"""Get Stream Events + + :param scope: + :param activity_name: + :param activity_id: + :param workflow_name: + :param workflow_exec_id: + :param root_workflow_exec_id: + :param parent_workflow_exec_id: + :param stream: + :param start_seq: + :param metadata_filters: + :param workflow_event_types: + :param last_event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetStreamEventsV1WorkflowsEventsStreamGetRequest( + scope=scope, + activity_name=activity_name, + activity_id=activity_id, + workflow_name=workflow_name, + workflow_exec_id=workflow_exec_id, + root_workflow_exec_id=root_workflow_exec_id, + parent_workflow_exec_id=parent_workflow_exec_id, + stream=stream, + start_seq=start_seq, + metadata_filters=metadata_filters, + workflow_event_types=workflow_event_types, + last_event_id=last_event_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/events/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_stream_events_v1_workflows_events_stream_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStream( + http_res, + lambda raw: utils.unmarshal_json( + raw, models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = utils.stream_to_text(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + async def get_stream_events_async( + self, + *, + scope: Optional[models.Scope] = "*", + activity_name: Optional[str] = "*", + activity_id: Optional[str] = "*", + workflow_name: Optional[str] = "*", + workflow_exec_id: Optional[str] = "*", + root_workflow_exec_id: Optional[str] = "*", + parent_workflow_exec_id: Optional[str] = "*", + stream: Optional[str] = "*", + start_seq: Optional[int] = 0, + metadata_filters: OptionalNullable[Dict[str, Any]] = UNSET, + workflow_event_types: OptionalNullable[List[models.WorkflowEventType]] = UNSET, + last_event_id: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> eventstreaming.EventStreamAsync[ + models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ]: + r"""Get Stream Events + + :param scope: + :param activity_name: + :param activity_id: + :param workflow_name: + :param workflow_exec_id: + :param root_workflow_exec_id: + :param parent_workflow_exec_id: + :param stream: + :param start_seq: + :param metadata_filters: + :param workflow_event_types: + :param last_event_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetStreamEventsV1WorkflowsEventsStreamGetRequest( + scope=scope, + activity_name=activity_name, + activity_id=activity_id, + workflow_name=workflow_name, + workflow_exec_id=workflow_exec_id, + root_workflow_exec_id=root_workflow_exec_id, + parent_workflow_exec_id=parent_workflow_exec_id, + stream=stream, + start_seq=start_seq, + metadata_filters=metadata_filters, + workflow_event_types=workflow_event_types, + last_event_id=last_event_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/events/stream", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="text/event-stream", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_stream_events_v1_workflows_events_stream_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + stream=True, + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "text/event-stream"): + return eventstreaming.EventStreamAsync( + http_res, + lambda raw: utils.unmarshal_json( + raw, models.GetStreamEventsV1WorkflowsEventsStreamGetResponseBody + ), + client_ref=self, + data_required=False, + ) + if utils.match_response(http_res, "422", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res, http_res_text + ) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) + + def get_workflow_events( + self, + *, + root_workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_run_id: OptionalNullable[str] = UNSET, + limit: Optional[int] = 100, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListWorkflowEventResponse: + r"""Get Workflow Events + + :param root_workflow_exec_id: Execution ID of the root workflow that initiated this execution chain. + :param workflow_exec_id: Execution ID of the workflow that emitted this event. + :param workflow_run_id: Run ID of the workflow that emitted this event. + :param limit: Maximum number of events to return. + :param cursor: Cursor for pagination. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowEventsV1WorkflowsEventsListGetRequest( + root_workflow_exec_id=root_workflow_exec_id, + workflow_exec_id=workflow_exec_id, + workflow_run_id=workflow_run_id, + limit=limit, + cursor=cursor, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/events/list", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_events_v1_workflows_events_list_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListWorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_workflow_events_async( + self, + *, + root_workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_exec_id: OptionalNullable[str] = UNSET, + workflow_run_id: OptionalNullable[str] = UNSET, + limit: Optional[int] = 100, + cursor: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ListWorkflowEventResponse: + r"""Get Workflow Events + + :param root_workflow_exec_id: Execution ID of the root workflow that initiated this execution chain. + :param workflow_exec_id: Execution ID of the workflow that emitted this event. + :param workflow_run_id: Run ID of the workflow that emitted this event. + :param limit: Maximum number of events to return. + :param cursor: Cursor for pagination. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetWorkflowEventsV1WorkflowsEventsListGetRequest( + root_workflow_exec_id=root_workflow_exec_id, + workflow_exec_id=workflow_exec_id, + workflow_run_id=workflow_run_id, + limit=limit, + cursor=cursor, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/events/list", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_workflow_events_v1_workflows_events_list_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ListWorkflowEventResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/uv.lock b/uv.lock index 3769cd61..9064878e 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.1.3" +version = "2.2.0rc1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From c28d33dc636df050e56a969cc8acedd94295af3a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 18:00:12 +0200 Subject: [PATCH 30/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.2.0rc2=20(#457)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.workflows.workers.whoami()`: **Added** * `mistral.workflows.events.send_event()`: **Added** * `mistral.workflows.events.send_events_batch()`: **Added** * `mistral.events.send_event()`: **Added** * `mistral.events.send_events_batch()`: **Added** * `mistral.workflows.events.receive_workflow_event()`: **Removed** (Breaking ⚠️) * `mistral.workflows.events.receive_workflow_events_batch()`: **Removed** (Breaking ⚠️) * `mistral.events.receive_workflow_event()`: **Removed** (Breaking ⚠️) * `mistral.events.receive_workflow_events_batch()`: **Removed** (Breaking ⚠️) * `mistral.workflows.executions.get_workflow_execution_history()`: `request.decode_payloads` **Added** * `mistral.workflows.runs.get_run_history()`: `request.decode_payloads` **Added** * chore: align pyproject.toml and uv.lock to version 2.2.0rc2 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 113 ++++++++---- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 16 +- README.md | 16 +- RELEASES.md | 12 +- ...ryv1workflowsrunsrunidhistorygetrequest.md | 3 +- ...sexecutionsexecutionidhistorygetrequest.md | 3 +- docs/models/workerinfo.md | 10 ++ docs/sdks/events/README.md | 12 +- docs/sdks/executions/README.md | 3 +- docs/sdks/runs/README.md | 3 +- docs/sdks/workers/README.md | 46 +++++ docs/sdks/workflowsevents/README.md | 12 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/events.py | 8 +- src/mistralai/client/executions.py | 6 + src/mistralai/client/models/__init__.py | 5 + ..._v1_workflows_runs_run_id_history_getop.py | 30 +++- ...s_executions_execution_id_history_getop.py | 30 +++- src/mistralai/client/models/workerinfo.py | 38 ++++ src/mistralai/client/runs.py | 6 + src/mistralai/client/workers.py | 162 ++++++++++++++++++ src/mistralai/client/workflows.py | 3 + src/mistralai/client/workflows_events.py | 8 +- uv.lock | 2 +- 27 files changed, 474 insertions(+), 91 deletions(-) create mode 100644 docs/models/workerinfo.md create mode 100644 docs/sdks/workers/README.md create mode 100644 src/mistralai/client/models/workerinfo.py create mode 100644 src/mistralai/client/workers.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 28b65901..2f14be1c 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 463d7bdb3f827922fff6e7a9e1dc09ec + docChecksum: 5dc178f76bda42bff2a1efe2ade6ce1a docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.2.0rc1 - configChecksum: c8c010d5fe5b11bf44e0ab048a2f7e9a + releaseVersion: 2.2.0rc2 + configChecksum: a070d48160a03b893e2a26141ff4723f repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: ea079c2e-a12c-493c-8efb-a9762e991b50 - pristine_commit_hash: e2352f93e359fc65c00ad6cc04c6e2167424ff5f - pristine_tree_hash: 60f2f179ff27fe8be3c50ff8dded0f32427ee36b + generation_id: fe447a6a-75de-45e0-a302-05d34989224a + pristine_commit_hash: 3ae1d96a2924cd1ae4e3d600f959687a7f82ddc1 + pristine_tree_hash: 7ddaa03b8484400c18b7e77566625ddda654248d features: python: acceptHeaders: 3.0.0 @@ -1407,8 +1407,8 @@ trackedFiles: pristine_git_object: 154ece82c1932053d4764d7d8fb2ab0f394027b2 docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md: id: d0010e389ace - last_write_checksum: sha1:656aedb84d30a4f532ed0e2247f5424023fb4fe2 - pristine_git_object: 8d4af7322e4ebe359216fb794c7209c3dc624d69 + last_write_checksum: sha1:9083de20179b09071ac9f5ded13a15b70d4fea87 + pristine_git_object: a2d1f1b4aa6663e205dfd98ecac7c6964ec68188 docs/models/getrunv1workflowsrunsrunidgetrequest.md: id: ac9de7c67a5f last_write_checksum: sha1:40fa492321f18e77792d49cb9142b0293be7ffe3 @@ -1443,8 +1443,8 @@ trackedFiles: pristine_git_object: 5594402ce103f05e902b33c465fbaa225a3e5eb6 docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md: id: 7524ddab7997 - last_write_checksum: sha1:b47a3b47cee2e582a58d2504511c37266bb3b0b3 - pristine_git_object: dc63ca0a3d798c3be90f3b126357e239edb34806 + last_write_checksum: sha1:39f74888b1cc5ff5257f890f2d17725ec313d57f + pristine_git_object: 1934b7f961625c636fa020a655b61b0302e2b725 docs/models/getworkflowexecutiontraceeventsrequest.md: id: 6722ae5f7115 last_write_checksum: sha1:2764ba45e55fe648e50f8d397826cebbf3a3dced @@ -2921,6 +2921,10 @@ trackedFiles: id: fc4df52fb9b5 last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 + docs/models/workerinfo.md: + id: f8e56340a1d8 + last_write_checksum: sha1:29c6d1ac23a55a0a8ecb108833c516332d358b11 + pristine_git_object: 997f62ab0242d0017871a434ffbfbc2c58c69294 docs/models/workflow.md: id: a782201b7327 last_write_checksum: sha1:0a6dbea734dc94626fb53ab37c619fef48b9db63 @@ -3247,12 +3251,12 @@ trackedFiles: pristine_git_object: cb207d8be2ca86b00dc797fc06eabd1498adb770 docs/sdks/events/README.md: id: cf45a4390b9b - last_write_checksum: sha1:9305fbb844865a70722fc3d4354537a5e2939e1c - pristine_git_object: 1de37e5c9aad042cacde48d885f16210ea08b817 + last_write_checksum: sha1:45137ac490479dc39fbfdb62942724c3b1d57140 + pristine_git_object: 436bb6a31703d248395ac8b8675b2894e975c78c docs/sdks/executions/README.md: id: 401745b17323 - last_write_checksum: sha1:74e97aa7308bebb4865de66110386f3d863049f2 - pristine_git_object: a2f4aeb06e6b7e609a0def9347864201122a40f0 + last_write_checksum: sha1:67b02156343207bfd48b4199908c6543ea2e23bb + pristine_git_object: 43c3c0519c994ea678b492e54d2a466336429dfa docs/sdks/fields/README.md: id: fdb6c4f3bd69 last_write_checksum: sha1:ea6dea75f85d25fd0ccdd2c659ecec43d0e5242d @@ -3295,8 +3299,8 @@ trackedFiles: pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 docs/sdks/runs/README.md: id: 4598fd39b715 - last_write_checksum: sha1:e049a4caff6e27e6fc62b44f372c0dd4877c79dc - pristine_git_object: bd7865446b10d0ce2728a763a535d919dc2b4446 + last_write_checksum: sha1:9b5afa2866e24ef4dc188f0b388187cd5ec80083 + pristine_git_object: 6efc34e27adc1c0c1a3b619049c458b398770fa9 docs/sdks/schedules/README.md: id: 2f28c809a225 last_write_checksum: sha1:70cf78f4dd201a70da97aa86a1f5d936dfabbe13 @@ -3313,14 +3317,18 @@ trackedFiles: id: 4f1a657c8f68 last_write_checksum: sha1:8ddfebe91ff50ea863d4c0bd85c75458a482667e pristine_git_object: 3b4d135f39bdfc3237c36c03367952eae54bdd48 + docs/sdks/workers/README.md: + id: aaba95bc3191 + last_write_checksum: sha1:d940b7a4fc0866c94714f1e2a994cf08f1f83b58 + pristine_git_object: 5e2380d1d15afd204e20d0a16adc84f30e91e041 docs/sdks/workflows/README.md: id: 80c76ce944c0 last_write_checksum: sha1:572ef0ec9cadcd850e3966dad909a3d2e901280a pristine_git_object: e65383ca453849b3bab58f921f80f5b8e7df7839 docs/sdks/workflowsevents/README.md: id: 514b42269280 - last_write_checksum: sha1:819db9d9561cc4802f139bbd1dec8045b718866f - pristine_git_object: bae0cb908bf2dcc0ddabfc340d929eddaea38c97 + last_write_checksum: sha1:dd4afb7d9af0f71d9049131227f7da2b135589cb + pristine_git_object: b89cde24eef4083057d3c22f947d5e1e0fe90b49 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -3347,8 +3355,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:b98fd6b10eefa6ebd5e051393980c124cd65058d - pristine_git_object: 5cebd13059e236d30d9d91cd3fdd5a7da81c42b5 + last_write_checksum: sha1:3630c9f9a0c2fecfaca2d6e32559673f72bf2172 + pristine_git_object: 54dfc8a03fcbaa15a3e1986b5a0ffc066773ae25 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -3451,12 +3459,12 @@ trackedFiles: pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d src/mistralai/client/events.py: id: ac9b961cc70d - last_write_checksum: sha1:2b128064a9cf9c1b99552fd2d7ec3e81f9aa6160 - pristine_git_object: d44c0692278f07df2a1a21bc77f55cfe0ddc65c4 + last_write_checksum: sha1:cd92fc550a2b4887b247863acfeb77597a2211e7 + pristine_git_object: 22d3b1a27f696f6d1bb3dd8d4a43c1b3e38d5c27 src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:6e2247d95aa58732722c58b9ce57cfbf9e669c15 - pristine_git_object: 7112dc1a94cb55a753246f5c7a83ff6a4d469bcc + last_write_checksum: sha1:295214ac21dd54e789c8e38d6ae0c71c63a414c6 + pristine_git_object: 779097b507f9b16311d9686aac016032d3ffbf3b src/mistralai/client/fields.py: id: 862335210b20 last_write_checksum: sha1:789ac221e3aec61d0d31abd1761e368e383fba88 @@ -3495,8 +3503,8 @@ trackedFiles: pristine_git_object: 3df1ca56638d59e5a8bd36fd762e49fd1c5df7b9 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:767af34246fb87d24793c8235c2e7a8f3ebdb6bf - pristine_git_object: a6ac62a6b71432a3b7b2de1678458f4e7a24a4bd + last_write_checksum: sha1:7946adb2598f1384fb2f0a4e6601abe9b09604ac + pristine_git_object: caaf77092f522379e1da167ee4c94d0727993c02 src/mistralai/client/models/activitytaskcompletedattributesrequest.py: id: a9e5ef17794f last_write_checksum: sha1:c9862308564483a8da1e373ab2d94f0eb798a5a9 @@ -4523,8 +4531,8 @@ trackedFiles: pristine_git_object: b5d0980e197c19eaa70ac26f3b118a8e60364e3e src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py: id: 9d566ab77998 - last_write_checksum: sha1:de2b5f449d510a05c9c8805e35f43085e5592e1d - pristine_git_object: d974f981d5b3e9055c787fec446e55f642c8823a + last_write_checksum: sha1:d3f4cd875f677a479976cf843559f366b13a0fec + pristine_git_object: 24f1e8daf5eea541c8b0550aa642609178654877 src/mistralai/client/models/get_run_v1_workflows_runs_run_id_getop.py: id: 60463c59ff01 last_write_checksum: sha1:a851312a3e0c91273ad444c6e2cc81c8c541c9cd @@ -4551,8 +4559,8 @@ trackedFiles: pristine_git_object: 186c55486ef2f9ba01b4c5ace5b91a416b0a6bcb src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py: id: 8d636c8cad1e - last_write_checksum: sha1:026e7390d2df0f6f67bbd62fe6aa9ebaa0142f76 - pristine_git_object: 66c6fb065dd395fbcd02031c968d49c757cb8da2 + last_write_checksum: sha1:71ed0aba0f677e7a245527ee8954310f060456f9 + pristine_git_object: cfb0c991333f1c23311109ca29362158910204b2 src/mistralai/client/models/get_workflow_execution_trace_eventsop.py: id: 75438195bf19 last_write_checksum: sha1:3fc47c8b7c301c1029f6a10e30298d8bc776d140 @@ -5749,6 +5757,10 @@ trackedFiles: id: 26b0903423e5 last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae + src/mistralai/client/models/workerinfo.py: + id: 0c231087534e + last_write_checksum: sha1:0d9e4e56c7a4c570ccf49bcdc835b33f7500629b + pristine_git_object: 65edcec61125e3276bddabf424ec289667b3b671 src/mistralai/client/models/workflow.py: id: 1548cd73984e last_write_checksum: sha1:14e1db57af8784d77633d7dc1d22198f2377909b @@ -6019,8 +6031,8 @@ trackedFiles: pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:779390755335dda530d2e563bbcf38e5ea161009 - pristine_git_object: 01b667cf9daf9ea37064f8e489fb45f84c87f203 + last_write_checksum: sha1:c3bf240846fefbf97e63283b3e5cd217c41816ea + pristine_git_object: 5b534b63106ee5133032ec9cb8c6ca4a5437d553 src/mistralai/client/schedules.py: id: d3b4fe452390 last_write_checksum: sha1:74a1455c5ba17253d2e878f638b7314edca66e21 @@ -6129,14 +6141,18 @@ trackedFiles: id: ab76b1377d79 last_write_checksum: sha1:a71af619fe7d44cb4e537b739cf3ae71d1f8da68 pristine_git_object: 2d57185746c0b2deee7c614c69a528c4a6565ee7 + src/mistralai/client/workers.py: + id: 54a46aba8359 + last_write_checksum: sha1:009ae7cbfc6ff8eb8bf29a6ccca93192ef643416 + pristine_git_object: e2d41c70ecaeec1439ff9398b79de2af7eca54f1 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:95e516c32702cfcf121f8278fcaf1bf6f5847c76 - pristine_git_object: e2de6524a730c7c0d1877e51dac901e354c4c201 + last_write_checksum: sha1:df0555b350409d103ca9715c69fab2e061d7ea41 + pristine_git_object: aae12f774608d18baf1bf5ccedd1a39363c0c29d src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef - last_write_checksum: sha1:3c9d60fa7c49e547a25ae62b941cae7a5437c21c - pristine_git_object: 03df3f78288f2b3263bf1ed5ce7aa3a8d138d0f0 + last_write_checksum: sha1:7196b5cfb3329b3234cd0a9d85b99dc2c82e5a4d + pristine_git_object: 2c6b14ee58712adc3fdc7fd53dbea341fb621722 examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -8288,6 +8304,8 @@ examples: parameters: path: execution_id: "" + query: + decode_payloads: false responses: "200": application/json: "" @@ -8449,6 +8467,8 @@ examples: parameters: path: run_id: "f7296489-0212-4239-9e35-12fabfe8cd11" + query: + decode_payloads: false responses: "200": application/json: "" @@ -8517,7 +8537,7 @@ examples: limit: 100 responses: "200": - application/json: {"events": [{"event_id": "", "event_timestamp": 93683, "root_workflow_exec_id": "", "parent_workflow_exec_id": "", "workflow_exec_id": "", "workflow_run_id": "", "workflow_name": "", "event_type": "CUSTOM_TASK_IN_PROGRESS", "attributes": {"custom_task_id": "", "custom_task_type": "", "payload": {"type": "json_patch", "value": [{"path": "/sys", "value": "", "op": "remove"}]}}}]} + application/json: {"events": [{"event_id": "", "event_timestamp": 93683, "root_workflow_exec_id": "", "parent_workflow_exec_id": "", "workflow_exec_id": "", "workflow_run_id": "", "workflow_name": "", "event_type": "CUSTOM_TASK_STARTED", "attributes": {"custom_task_id": "", "custom_task_type": "", "payload": {"type": "json", "value": [{"path": "/sys", "value": "", "op": "remove"}]}}}]} "422": application/json: {} list_deployments_v1_workflows_deployments_get: @@ -8540,9 +8560,26 @@ examples: application/json: {"id": "c3310963-59e6-41a6-b644-84aca97cc893", "name": "", "is_active": true, "created_at": "2024-10-22T00:46:19.102Z", "updated_at": "2024-10-19T15:10:50.721Z", "workers": []} "422": application/json: {} + get_worker_info_v1_workflows_workers_whoami_get: + speakeasy-default-get-worker-info-v1-workflows-workers-whoami-get: + responses: + "200": + application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.beta.connectors.list_tools()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.models.update()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.workflows.metrics.get_workflow_metrics()`: **Added**\n* `mistral.workflows.get_workflow()`: **Added**\n* `mistral.workflows.update_workflow()`: **Added**\n* `mistral.workflows.get_workflow_registration()`: **Added**\n* `mistral.workflows.archive_workflow()`: **Added**\n* `mistral.workflows.unarchive_workflow()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_history()`: **Added**\n* `mistral.workflows.executions.signal_workflow_execution()`: **Added**\n* `mistral.workflows.executions.query_workflow_execution()`: **Added**\n* `mistral.workflows.executions.terminate_workflow_execution()`: **Added**\n* `mistral.workflows.executions.batch_terminate_workflow_executions()`: **Added**\n* `mistral.workflows.executions.cancel_workflow_execution()`: **Added**\n* `mistral.workflows.executions.batch_cancel_workflow_executions()`: **Added**\n* `mistral.workflows.executions.reset_workflow()`: **Added**\n* `mistral.workflows.executions.update_workflow_execution()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_otel()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_summary()`: **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_events()`: **Added**\n* `mistral.workflows.executions.stream()`: **Added**\n* `mistral.workflows.runs.get_run()`: **Added**\n* `mistral.batch.jobs.delete()`: **Added**\n* `mistral.workflows.runs.list_runs()`: **Added**\n* `mistral.workflows.runs.get_run_history()`: **Added**\n* `mistral.workflows.schedules.get_schedules()`: **Added**\n* `mistral.workflows.schedules.schedule_workflow()`: **Added**\n* `mistral.workflows.schedules.unschedule_workflow()`: **Added**\n* `mistral.workflows.events.receive_workflow_event()`: **Added**\n* `mistral.workflows.events.receive_workflow_events_batch()`: **Added**\n* `mistral.workflows.events.get_stream_events()`: **Added**\n* `mistral.workflows.events.get_workflow_events()`: **Added**\n* `mistral.workflows.deployments.list_deployments()`: **Added**\n* `mistral.workflows.deployments.get_deployment()`: **Added**\n* `mistral.events.receive_workflow_event()`: **Added**\n* `mistral.events.receive_workflow_events_batch()`: **Added**\n* `mistral.events.get_stream_events()`: **Added**\n* `mistral.events.get_workflow_events()`: **Added**\n* `mistral.audio.voices.list()`: `request.type` **Added**\n* `mistral.workflows.execute_workflow_registration()`: **Added**\n* `mistral.workflows.execute_workflow()`: **Added**\n* `mistral.workflows.get_workflow_registrations()`: **Added**\n* `mistral.beta.libraries.list()`: \n * `request` **Changed**\n * `response.pagination` **Added**\n * `error.status[422]` **Added**\n* `mistral.beta.connectors.call_tool()`: `request.credentials_name` **Added**\n* `mistral.workflows.get_workflows()`: **Added**\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.workflows.workers.whoami()`: **Added** + * `mistral.workflows.events.send_event()`: **Added** + * `mistral.workflows.events.send_events_batch()`: **Added** + * `mistral.events.send_event()`: **Added** + * `mistral.events.send_events_batch()`: **Added** + * `mistral.workflows.events.receive_workflow_event()`: **Removed** (Breaking ⚠️) + * `mistral.workflows.events.receive_workflow_events_batch()`: **Removed** (Breaking ⚠️) + * `mistral.events.receive_workflow_event()`: **Removed** (Breaking ⚠️) + * `mistral.events.receive_workflow_events_batch()`: **Removed** (Breaking ⚠️) + * `mistral.workflows.executions.get_workflow_execution_history()`: `request.decode_payloads` **Added** + * `mistral.workflows.runs.get_run_history()`: `request.decode_payloads` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 48ee12a0..818fc000 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.2.0rc1 + version: 2.2.0rc2 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ab4814ee..f219aba0 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:edeef4396c29b9a5960e150514289777d4aef71037b03d14444238455fc1c1bd - sourceBlobDigest: sha256:b8b6deb9c127b45ad0cd5700c1e9d69f63927b070817e5986f7131f14dba6ba7 + sourceRevisionDigest: sha256:b0edc400c913c03cb63b1d50e468c855b7d9d393a816a7aec8b3c9b2e264acbb + sourceBlobDigest: sha256:e893659c7767d3bc967d4a5a98f0fb5e2a27f7db03d8b1946de13c22b9321b0a tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:edeef4396c29b9a5960e150514289777d4aef71037b03d14444238455fc1c1bd - sourceBlobDigest: sha256:b8b6deb9c127b45ad0cd5700c1e9d69f63927b070817e5986f7131f14dba6ba7 + sourceRevisionDigest: sha256:b0edc400c913c03cb63b1d50e468c855b7d9d393a816a7aec8b3c9b2e264acbb + sourceBlobDigest: sha256:e893659c7767d3bc967d4a5a98f0fb5e2a27f7db03d8b1946de13c22b9321b0a codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:6fc37de5c06926f4bb561b007ea0856a0436829f465b0b054c19cb916cb25909 + codeSamplesRevisionDigest: sha256:1231751d127af0b0bfed6d1b2c7dff8376e587c60d1d368ba1b13c5d3090b9c7 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/README-PYPI.md b/README-PYPI.md index a178ef56..12064b0c 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -637,8 +637,8 @@ print(res.choices[0].message.content) ### [Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md) -* [receive_workflow_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#receive_workflow_event) - Receive Workflow Event -* [receive_workflow_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [send_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#send_event) - Receive Workflow Event +* [send_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_workflow_events) - Get Workflow Events @@ -696,8 +696,8 @@ print(res.choices[0].message.content) #### [Workflows.Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md) -* [receive_workflow_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#receive_workflow_event) - Receive Workflow Event -* [receive_workflow_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [send_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#send_event) - Receive Workflow Event +* [send_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_workflow_events) - Get Workflow Events @@ -734,6 +734,10 @@ print(res.choices[0].message.content) * [schedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow +#### [Workflows.Workers](https://github.com/mistralai/client-python/blob/main/docs/sdks/workers/README.md) + +* [whoami](https://github.com/mistralai/client-python/blob/main/docs/sdks/workers/README.md#whoami) - Get Worker Info + @@ -944,8 +948,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 172 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 172 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 173 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 173 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index 4c64fb09..b1d3486b 100644 --- a/README.md +++ b/README.md @@ -637,8 +637,8 @@ print(res.choices[0].message.content) ### [Events](docs/sdks/events/README.md) -* [receive_workflow_event](docs/sdks/events/README.md#receive_workflow_event) - Receive Workflow Event -* [receive_workflow_events_batch](docs/sdks/events/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [send_event](docs/sdks/events/README.md#send_event) - Receive Workflow Event +* [send_events_batch](docs/sdks/events/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](docs/sdks/events/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](docs/sdks/events/README.md#get_workflow_events) - Get Workflow Events @@ -696,8 +696,8 @@ print(res.choices[0].message.content) #### [Workflows.Events](docs/sdks/workflowsevents/README.md) -* [receive_workflow_event](docs/sdks/workflowsevents/README.md#receive_workflow_event) - Receive Workflow Event -* [receive_workflow_events_batch](docs/sdks/workflowsevents/README.md#receive_workflow_events_batch) - Receive Workflow Events Batch +* [send_event](docs/sdks/workflowsevents/README.md#send_event) - Receive Workflow Event +* [send_events_batch](docs/sdks/workflowsevents/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](docs/sdks/workflowsevents/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](docs/sdks/workflowsevents/README.md#get_workflow_events) - Get Workflow Events @@ -734,6 +734,10 @@ print(res.choices[0].message.content) * [schedule_workflow](docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow +#### [Workflows.Workers](docs/sdks/workers/README.md) + +* [whoami](docs/sdks/workers/README.md#whoami) - Get Worker Info + @@ -944,8 +948,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 172 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 172 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 173 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 173 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index ed266e46..83128c9b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -498,4 +498,14 @@ Based on: ### Generated - [python v2.2.0rc1] . ### Releases -- [PyPI v2.2.0rc1] https://pypi.org/project/mistralai/2.2.0rc1 - . \ No newline at end of file +- [PyPI v2.2.0rc1] https://pypi.org/project/mistralai/2.2.0rc1 - . + +## 2026-03-30 15:55:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.2.0rc2] . +### Releases +- [PyPI v2.2.0rc2] https://pypi.org/project/mistralai/2.2.0rc2 - . \ No newline at end of file diff --git a/docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md b/docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md index 8d4af732..a2d1f1b4 100644 --- a/docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md +++ b/docs/models/getrunhistoryv1workflowsrunsrunidhistorygetrequest.md @@ -5,4 +5,5 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `run_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `run_id` | *str* | :heavy_check_mark: | N/A | +| `decode_payloads` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md b/docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md index dc63ca0a..1934b7f9 100644 --- a/docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md +++ b/docs/models/getworkflowexecutionhistoryv1workflowsexecutionsexecutionidhistorygetrequest.md @@ -5,4 +5,5 @@ | Field | Type | Required | Description | | ------------------ | ------------------ | ------------------ | ------------------ | -| `execution_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| `execution_id` | *str* | :heavy_check_mark: | N/A | +| `decode_payloads` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/workerinfo.md b/docs/models/workerinfo.md new file mode 100644 index 00000000..997f62ab --- /dev/null +++ b/docs/models/workerinfo.md @@ -0,0 +1,10 @@ +# WorkerInfo + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `scheduler_url` | *str* | :heavy_check_mark: | N/A | +| `namespace` | *str* | :heavy_check_mark: | N/A | +| `tls` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 1de37e5c..436bb6a3 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -4,12 +4,12 @@ ### Available Operations -* [receive_workflow_event](#receive_workflow_event) - Receive Workflow Event -* [receive_workflow_events_batch](#receive_workflow_events_batch) - Receive Workflow Events Batch +* [send_event](#send_event) - Receive Workflow Event +* [send_events_batch](#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](#get_stream_events) - Get Stream Events * [get_workflow_events](#get_workflow_events) - Get Workflow Events -## receive_workflow_event +## send_event Receive workflow events from workers. @@ -30,7 +30,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.events.receive_workflow_event(event={ + res = mistral.events.send_event(event={ "event_id": "", "root_workflow_exec_id": "", "workflow_exec_id": "", @@ -66,7 +66,7 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | -## receive_workflow_events_batch +## send_events_batch Receive multiple workflow events from workers in a single batch. @@ -88,7 +88,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.events.receive_workflow_events_batch(events=[ + res = mistral.events.send_events_batch(events=[ { "event_id": "", "root_workflow_exec_id": "", diff --git a/docs/sdks/executions/README.md b/docs/sdks/executions/README.md index a2f4aeb0..43c3c051 100644 --- a/docs/sdks/executions/README.md +++ b/docs/sdks/executions/README.md @@ -76,7 +76,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.executions.get_workflow_execution_history(execution_id="") + res = mistral.workflows.executions.get_workflow_execution_history(execution_id="", decode_payloads=False) # Handle response print(res) @@ -88,6 +88,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `execution_id` | *str* | :heavy_check_mark: | N/A | +| `decode_payloads` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/runs/README.md b/docs/sdks/runs/README.md index bd786544..6efc34e2 100644 --- a/docs/sdks/runs/README.md +++ b/docs/sdks/runs/README.md @@ -112,7 +112,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.runs.get_run_history(run_id="f7296489-0212-4239-9e35-12fabfe8cd11") + res = mistral.workflows.runs.get_run_history(run_id="f7296489-0212-4239-9e35-12fabfe8cd11", decode_payloads=False) # Handle response print(res) @@ -124,6 +124,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `run_id` | *str* | :heavy_check_mark: | N/A | +| `decode_payloads` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/workers/README.md b/docs/sdks/workers/README.md new file mode 100644 index 00000000..5e2380d1 --- /dev/null +++ b/docs/sdks/workers/README.md @@ -0,0 +1,46 @@ +# Workflows.Workers + +## Overview + +### Available Operations + +* [whoami](#whoami) - Get Worker Info + +## whoami + +Get Worker Info + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.workers.whoami() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkerInfo](../../models/workerinfo.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflowsevents/README.md b/docs/sdks/workflowsevents/README.md index bae0cb90..b89cde24 100644 --- a/docs/sdks/workflowsevents/README.md +++ b/docs/sdks/workflowsevents/README.md @@ -4,12 +4,12 @@ ### Available Operations -* [receive_workflow_event](#receive_workflow_event) - Receive Workflow Event -* [receive_workflow_events_batch](#receive_workflow_events_batch) - Receive Workflow Events Batch +* [send_event](#send_event) - Receive Workflow Event +* [send_events_batch](#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](#get_stream_events) - Get Stream Events * [get_workflow_events](#get_workflow_events) - Get Workflow Events -## receive_workflow_event +## send_event Receive workflow events from workers. @@ -30,7 +30,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.events.receive_workflow_event(event={ + res = mistral.workflows.events.send_event(event={ "event_id": "", "root_workflow_exec_id": "", "workflow_exec_id": "", @@ -66,7 +66,7 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | -## receive_workflow_events_batch +## send_events_batch Receive multiple workflow events from workers in a single batch. @@ -88,7 +88,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.events.receive_workflow_events_batch(events=[ + res = mistral.workflows.events.send_events_batch(events=[ { "event_id": "", "root_workflow_exec_id": "", diff --git a/pyproject.toml b/pyproject.toml index c15a2e80..2c2e6158 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.2.0rc1" +version = "2.2.0rc2" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 5cebd130..54dfc8a0 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.2.0rc1" +__version__: str = "2.2.0rc2" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.2.0rc1 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.2.0rc2 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/events.py b/src/mistralai/client/events.py index d44c0692..22d3b1a2 100644 --- a/src/mistralai/client/events.py +++ b/src/mistralai/client/events.py @@ -11,7 +11,7 @@ class Events(BaseSDK): - def receive_workflow_event( + def send_event( self, *, event: Union[ @@ -111,7 +111,7 @@ def receive_workflow_event( raise errors.SDKError("Unexpected response received", http_res) - async def receive_workflow_event_async( + async def send_event_async( self, *, event: Union[ @@ -211,7 +211,7 @@ async def receive_workflow_event_async( raise errors.SDKError("Unexpected response received", http_res) - def receive_workflow_events_batch( + def send_events_batch( self, *, events: Union[ @@ -315,7 +315,7 @@ def receive_workflow_events_batch( raise errors.SDKError("Unexpected response received", http_res) - async def receive_workflow_events_batch_async( + async def send_events_batch_async( self, *, events: Union[ diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index 7112dc1a..779097b5 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -191,6 +191,7 @@ def get_workflow_execution_history( self, *, execution_id: str, + decode_payloads: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -199,6 +200,7 @@ def get_workflow_execution_history( r"""Get Workflow Execution History :param execution_id: + :param decode_payloads: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -216,6 +218,7 @@ def get_workflow_execution_history( request = models.GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest( execution_id=execution_id, + decode_payloads=decode_payloads, ) req = self._build_request( @@ -279,6 +282,7 @@ async def get_workflow_execution_history_async( self, *, execution_id: str, + decode_payloads: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -287,6 +291,7 @@ async def get_workflow_execution_history_async( r"""Get Workflow Execution History :param execution_id: + :param decode_payloads: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -304,6 +309,7 @@ async def get_workflow_execution_history_async( request = models.GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest( execution_id=execution_id, + decode_payloads=decode_payloads, ) req = self._build_request_async( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index a6ac62a6..caaf7709 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -1963,6 +1963,7 @@ WebSearchPremiumToolTypedDict, ) from .websearchtool import WebSearchTool, WebSearchToolTypedDict + from .workerinfo import WorkerInfo, WorkerInfoTypedDict from .workflow import Workflow, WorkflowTypedDict from .workflowarchiveresponse import ( WorkflowArchiveResponse, @@ -3578,6 +3579,8 @@ "WebSearchPremiumToolTypedDict", "WebSearchTool", "WebSearchToolTypedDict", + "WorkerInfo", + "WorkerInfoTypedDict", "Workflow", "WorkflowArchiveResponse", "WorkflowArchiveResponseTypedDict", @@ -5080,6 +5083,8 @@ "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", "WebSearchTool": ".websearchtool", "WebSearchToolTypedDict": ".websearchtool", + "WorkerInfo": ".workerinfo", + "WorkerInfoTypedDict": ".workerinfo", "Workflow": ".workflow", "WorkflowTypedDict": ".workflow", "WorkflowArchiveResponse": ".workflowarchiveresponse", diff --git a/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py b/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py index d974f981..24f1e8da 100644 --- a/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py +++ b/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py @@ -2,16 +2,40 @@ # @generated-id: 9d566ab77998 from __future__ import annotations -from mistralai.client.types import BaseModel -from mistralai.client.utils import FieldMetadata, PathParamMetadata -from typing_extensions import Annotated, TypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict(TypedDict): run_id: str + decode_payloads: NotRequired[bool] class GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest(BaseModel): run_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] + + decode_payloads: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["decode_payloads"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py b/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py index 66c6fb06..cfb0c991 100644 --- a/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py +++ b/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py @@ -2,15 +2,18 @@ # @generated-id: 8d636c8cad1e from __future__ import annotations -from mistralai.client.types import BaseModel -from mistralai.client.utils import FieldMetadata, PathParamMetadata -from typing_extensions import Annotated, TypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequestTypedDict( TypedDict ): execution_id: str + decode_payloads: NotRequired[bool] class GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetRequest( @@ -19,3 +22,24 @@ class GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetReque execution_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] + + decode_payloads: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["decode_payloads"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/workerinfo.py b/src/mistralai/client/models/workerinfo.py new file mode 100644 index 00000000..65edcec6 --- /dev/null +++ b/src/mistralai/client/models/workerinfo.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0c231087534e + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkerInfoTypedDict(TypedDict): + scheduler_url: str + namespace: str + tls: NotRequired[bool] + + +class WorkerInfo(BaseModel): + scheduler_url: str + + namespace: str + + tls: Optional[bool] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tls"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 01b667cf..5b534b63 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -471,6 +471,7 @@ def get_run_history( self, *, run_id: str, + decode_payloads: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -479,6 +480,7 @@ def get_run_history( r"""Get Run History :param run_id: + :param decode_payloads: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -496,6 +498,7 @@ def get_run_history( request = models.GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest( run_id=run_id, + decode_payloads=decode_payloads, ) req = self._build_request( @@ -559,6 +562,7 @@ async def get_run_history_async( self, *, run_id: str, + decode_payloads: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -567,6 +571,7 @@ async def get_run_history_async( r"""Get Run History :param run_id: + :param decode_payloads: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -584,6 +589,7 @@ async def get_run_history_async( request = models.GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest( run_id=run_id, + decode_payloads=decode_payloads, ) req = self._build_request_async( diff --git a/src/mistralai/client/workers.py b/src/mistralai/client/workers.py new file mode 100644 index 00000000..e2d41c70 --- /dev/null +++ b/src/mistralai/client/workers.py @@ -0,0 +1,162 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 54a46aba8359 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Mapping, Optional + + +class Workers(BaseSDK): + def whoami( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkerInfo: + r"""Get Worker Info + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/workflows/workers/whoami", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_worker_info_v1_workflows_workers_whoami_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkerInfo, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def whoami_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkerInfo: + r"""Get Worker Info + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/workflows/workers/whoami", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_worker_info_v1_workflows_workers_whoami_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkerInfo, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index f3150791..aae12f77 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -14,6 +14,7 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from mistralai.client.workers import Workers from mistralai.client.workflows_events import WorkflowsEvents from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union from typing_extensions import deprecated @@ -29,6 +30,7 @@ class Workflows(BaseSDK): metrics: Metrics runs: Runs schedules: Schedules + workers: Workers events: WorkflowsEvents deployments: Deployments @@ -44,6 +46,7 @@ def _init_sdks(self): self.metrics = Metrics(self.sdk_configuration, parent_ref=self.parent_ref) self.runs = Runs(self.sdk_configuration, parent_ref=self.parent_ref) self.schedules = Schedules(self.sdk_configuration, parent_ref=self.parent_ref) + self.workers = Workers(self.sdk_configuration, parent_ref=self.parent_ref) self.events = WorkflowsEvents( self.sdk_configuration, parent_ref=self.parent_ref ) diff --git a/src/mistralai/client/workflows_events.py b/src/mistralai/client/workflows_events.py index 03df3f78..2c6b14ee 100644 --- a/src/mistralai/client/workflows_events.py +++ b/src/mistralai/client/workflows_events.py @@ -11,7 +11,7 @@ class WorkflowsEvents(BaseSDK): - def receive_workflow_event( + def send_event( self, *, event: Union[ @@ -111,7 +111,7 @@ def receive_workflow_event( raise errors.SDKError("Unexpected response received", http_res) - async def receive_workflow_event_async( + async def send_event_async( self, *, event: Union[ @@ -211,7 +211,7 @@ async def receive_workflow_event_async( raise errors.SDKError("Unexpected response received", http_res) - def receive_workflow_events_batch( + def send_events_batch( self, *, events: Union[ @@ -315,7 +315,7 @@ def receive_workflow_events_batch( raise errors.SDKError("Unexpected response received", http_res) - async def receive_workflow_events_batch_async( + async def send_events_batch_async( self, *, events: Union[ diff --git a/uv.lock b/uv.lock index 9064878e..8fd36666 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.2.0rc1" +version = "2.2.0rc2" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 60874654f324cae3472ec63072d3a9e22351bcc3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 19:31:08 +0200 Subject: [PATCH 31/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.2.0rc3=20(#458)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.workflows.events.send_event()`: **Removed** (Breaking ⚠️) * `mistral.workflows.events.send_events_batch()`: **Removed** (Breaking ⚠️) * `mistral.events.send_event()`: **Removed** (Breaking ⚠️) * `mistral.events.send_events_batch()`: **Removed** (Breaking ⚠️) * chore: align pyproject.toml and uv.lock to version 2.2.0rc3 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 367 ++-------------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 8 +- README.md | 8 +- RELEASES.md | 12 +- .../activitytaskcompletedattributesrequest.md | 12 - docs/models/activitytaskcompletedrequest.md | 20 - docs/models/activitytaskfailedrequest.md | 20 - docs/models/activitytaskretryingrequest.md | 20 - .../activitytaskstartedattributesrequest.md | 12 - docs/models/activitytaskstartedrequest.md | 21 - docs/models/customtaskcanceledrequest.md | 20 - .../customtaskcompletedattributesrequest.md | 12 - docs/models/customtaskcompletedrequest.md | 20 - docs/models/customtaskfailedrequest.md | 20 - .../customtaskinprogressattributesrequest.md | 12 - ...mtaskinprogressattributesrequestpayload.md | 19 - .../customtaskinprogressattributesresponse.md | 10 +- docs/models/customtaskinprogressrequest.md | 21 - .../customtaskstartedattributesrequest.md | 12 - docs/models/customtaskstartedrequest.md | 21 - docs/models/customtasktimedoutrequest.md | 20 - docs/models/jsonpatchpayloadrequest.md | 13 - docs/models/jsonpatchpayloadrequestvalue.md | 29 -- docs/models/jsonpayloadrequest.md | 13 - ...ttributesresponsepayload.md => payload.md} | 2 +- docs/models/workfloweventbatchrequest.md | 10 - docs/models/workfloweventbatchrequestevent.md | 107 ----- docs/models/workfloweventbatchresponse.md | 12 - .../workfloweventbatchresponsestatus.md | 20 - docs/models/workfloweventrequest.md | 10 - docs/models/workfloweventrequestevent.md | 109 ----- docs/models/workfloweventresponse.md | 11 - docs/models/workfloweventresponsestatus.md | 20 - .../workflowexecutioncanceledrequest.md | 20 - ...flowexecutioncompletedattributesrequest.md | 11 - .../workflowexecutioncompletedrequest.md | 20 - ...xecutioncontinuedasnewattributesrequest.md | 13 - .../workflowexecutioncontinuedasnewrequest.md | 21 - docs/models/workflowexecutionfailedrequest.md | 20 - ...rkflowexecutionstartedattributesrequest.md | 12 - .../models/workflowexecutionstartedrequest.md | 20 - docs/models/workflowtaskfailedrequest.md | 21 - docs/models/workflowtasktimedoutrequest.md | 21 - docs/sdks/events/README.md | 123 ------ docs/sdks/executions/README.md | 2 +- docs/sdks/runs/README.md | 2 +- docs/sdks/workflowsevents/README.md | 123 ------ pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/events.py | 410 +----------------- src/mistralai/client/executions.py | 4 +- src/mistralai/client/models/__init__.py | 293 +------------ .../activitytaskcompletedattributesrequest.py | 37 -- .../models/activitytaskcompletedrequest.py | 120 ----- .../models/activitytaskfailedrequest.py | 120 ----- .../models/activitytaskretryingrequest.py | 120 ----- .../activitytaskstartedattributesrequest.py | 37 -- .../models/activitytaskstartedrequest.py | 122 ------ .../models/customtaskcanceledrequest.py | 120 ----- .../customtaskcompletedattributesrequest.py | 37 -- .../models/customtaskcompletedrequest.py | 120 ----- .../client/models/customtaskfailedrequest.py | 120 ----- .../customtaskinprogressattributesrequest.py | 55 --- .../customtaskinprogressattributesresponse.py | 28 +- .../models/customtaskinprogressrequest.py | 122 ------ .../customtaskstartedattributesrequest.py | 55 --- .../client/models/customtaskstartedrequest.py | 122 ------ .../models/customtasktimedoutrequest.py | 120 ----- ..._v1_workflows_runs_run_id_history_getop.py | 2 +- ...s_executions_execution_id_history_getop.py | 2 +- .../client/models/jsonpatchpayloadrequest.py | 66 --- .../client/models/jsonpayloadrequest.py | 61 --- .../models/workfloweventbatchrequest.py | 137 ------ .../models/workfloweventbatchresponse.py | 74 ---- .../client/models/workfloweventrequest.py | 139 ------ .../client/models/workfloweventresponse.py | 69 --- .../workflowexecutioncanceledrequest.py | 120 ----- ...flowexecutioncompletedattributesrequest.py | 32 -- .../workflowexecutioncompletedrequest.py | 120 ----- ...xecutioncontinuedasnewattributesrequest.py | 42 -- .../workflowexecutioncontinuedasnewrequest.py | 122 ------ .../models/workflowexecutionfailedrequest.py | 120 ----- ...rkflowexecutionstartedattributesrequest.py | 37 -- .../models/workflowexecutionstartedrequest.py | 120 ----- .../models/workflowtaskfailedrequest.py | 122 ------ .../models/workflowtasktimedoutrequest.py | 122 ------ src/mistralai/client/runs.py | 4 +- src/mistralai/client/workflows_events.py | 410 +----------------- uv.lock | 2 +- 91 files changed, 106 insertions(+), 5469 deletions(-) delete mode 100644 docs/models/activitytaskcompletedattributesrequest.md delete mode 100644 docs/models/activitytaskcompletedrequest.md delete mode 100644 docs/models/activitytaskfailedrequest.md delete mode 100644 docs/models/activitytaskretryingrequest.md delete mode 100644 docs/models/activitytaskstartedattributesrequest.md delete mode 100644 docs/models/activitytaskstartedrequest.md delete mode 100644 docs/models/customtaskcanceledrequest.md delete mode 100644 docs/models/customtaskcompletedattributesrequest.md delete mode 100644 docs/models/customtaskcompletedrequest.md delete mode 100644 docs/models/customtaskfailedrequest.md delete mode 100644 docs/models/customtaskinprogressattributesrequest.md delete mode 100644 docs/models/customtaskinprogressattributesrequestpayload.md delete mode 100644 docs/models/customtaskinprogressrequest.md delete mode 100644 docs/models/customtaskstartedattributesrequest.md delete mode 100644 docs/models/customtaskstartedrequest.md delete mode 100644 docs/models/customtasktimedoutrequest.md delete mode 100644 docs/models/jsonpatchpayloadrequest.md delete mode 100644 docs/models/jsonpatchpayloadrequestvalue.md delete mode 100644 docs/models/jsonpayloadrequest.md rename docs/models/{customtaskinprogressattributesresponsepayload.md => payload.md} (85%) delete mode 100644 docs/models/workfloweventbatchrequest.md delete mode 100644 docs/models/workfloweventbatchrequestevent.md delete mode 100644 docs/models/workfloweventbatchresponse.md delete mode 100644 docs/models/workfloweventbatchresponsestatus.md delete mode 100644 docs/models/workfloweventrequest.md delete mode 100644 docs/models/workfloweventrequestevent.md delete mode 100644 docs/models/workfloweventresponse.md delete mode 100644 docs/models/workfloweventresponsestatus.md delete mode 100644 docs/models/workflowexecutioncanceledrequest.md delete mode 100644 docs/models/workflowexecutioncompletedattributesrequest.md delete mode 100644 docs/models/workflowexecutioncompletedrequest.md delete mode 100644 docs/models/workflowexecutioncontinuedasnewattributesrequest.md delete mode 100644 docs/models/workflowexecutioncontinuedasnewrequest.md delete mode 100644 docs/models/workflowexecutionfailedrequest.md delete mode 100644 docs/models/workflowexecutionstartedattributesrequest.md delete mode 100644 docs/models/workflowexecutionstartedrequest.md delete mode 100644 docs/models/workflowtaskfailedrequest.md delete mode 100644 docs/models/workflowtasktimedoutrequest.md delete mode 100644 src/mistralai/client/models/activitytaskcompletedattributesrequest.py delete mode 100644 src/mistralai/client/models/activitytaskcompletedrequest.py delete mode 100644 src/mistralai/client/models/activitytaskfailedrequest.py delete mode 100644 src/mistralai/client/models/activitytaskretryingrequest.py delete mode 100644 src/mistralai/client/models/activitytaskstartedattributesrequest.py delete mode 100644 src/mistralai/client/models/activitytaskstartedrequest.py delete mode 100644 src/mistralai/client/models/customtaskcanceledrequest.py delete mode 100644 src/mistralai/client/models/customtaskcompletedattributesrequest.py delete mode 100644 src/mistralai/client/models/customtaskcompletedrequest.py delete mode 100644 src/mistralai/client/models/customtaskfailedrequest.py delete mode 100644 src/mistralai/client/models/customtaskinprogressattributesrequest.py delete mode 100644 src/mistralai/client/models/customtaskinprogressrequest.py delete mode 100644 src/mistralai/client/models/customtaskstartedattributesrequest.py delete mode 100644 src/mistralai/client/models/customtaskstartedrequest.py delete mode 100644 src/mistralai/client/models/customtasktimedoutrequest.py delete mode 100644 src/mistralai/client/models/jsonpatchpayloadrequest.py delete mode 100644 src/mistralai/client/models/jsonpayloadrequest.py delete mode 100644 src/mistralai/client/models/workfloweventbatchrequest.py delete mode 100644 src/mistralai/client/models/workfloweventbatchresponse.py delete mode 100644 src/mistralai/client/models/workfloweventrequest.py delete mode 100644 src/mistralai/client/models/workfloweventresponse.py delete mode 100644 src/mistralai/client/models/workflowexecutioncanceledrequest.py delete mode 100644 src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py delete mode 100644 src/mistralai/client/models/workflowexecutioncompletedrequest.py delete mode 100644 src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py delete mode 100644 src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py delete mode 100644 src/mistralai/client/models/workflowexecutionfailedrequest.py delete mode 100644 src/mistralai/client/models/workflowexecutionstartedattributesrequest.py delete mode 100644 src/mistralai/client/models/workflowexecutionstartedrequest.py delete mode 100644 src/mistralai/client/models/workflowtaskfailedrequest.py delete mode 100644 src/mistralai/client/models/workflowtasktimedoutrequest.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 2f14be1c..5312b8f3 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 5dc178f76bda42bff2a1efe2ade6ce1a + docChecksum: 42ee0bdf8fcf0fa3ee261db644fe8154 docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.2.0rc2 - configChecksum: a070d48160a03b893e2a26141ff4723f + releaseVersion: 2.2.0rc3 + configChecksum: 8d1009e9db71a2652f088ee569fe5127 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: fe447a6a-75de-45e0-a302-05d34989224a - pristine_commit_hash: 3ae1d96a2924cd1ae4e3d600f959687a7f82ddc1 - pristine_tree_hash: 7ddaa03b8484400c18b7e77566625ddda654248d + generation_id: ab642f78-4f68-4ede-8d20-e3dcf0b0890a + pristine_commit_hash: 887bc7bbf7e576b5744938985652c7d8b26336bb + pristine_tree_hash: cf45f9d57a91e07050136255cbf5a28b9b41e187 features: python: acceptHeaders: 3.0.0 @@ -73,18 +73,10 @@ trackedFiles: id: 750ead4ce7ee last_write_checksum: sha1:a3fa64f01329ca02fdd8d7a6470c3d2f051985e5 pristine_git_object: 615552c32013c702b3e7476b1691952b0a4a65df - docs/models/activitytaskcompletedattributesrequest.md: - id: 9509b84041b6 - last_write_checksum: sha1:bf7116695175ef6664a86b84ebcaa2c095c55bf2 - pristine_git_object: 5050b558d58657f0869d3140e3949b9cca2afcfb docs/models/activitytaskcompletedattributesresponse.md: id: 972b526f8415 last_write_checksum: sha1:d04ffa5085fcf5e440a922bdb130035b86277ff1 pristine_git_object: 5baaffa6840cb04dbb8eb2379fcea08c96826455 - docs/models/activitytaskcompletedrequest.md: - id: fc911027e2e5 - last_write_checksum: sha1:3897f394900cb847c6efcf67beff158d330035a9 - pristine_git_object: 9008bbf1e50e37546029205d756e5ef8493724d8 docs/models/activitytaskcompletedresponse.md: id: 6aade3f8c26c last_write_checksum: sha1:944b923aa932452372abebfe6d61ab739555109f @@ -93,10 +85,6 @@ trackedFiles: id: a69d5f4b0b99 last_write_checksum: sha1:e5371dae85ec79f485b5e3afc1ac8c29a2424163 pristine_git_object: 5cb9cafe9ce235ff996c3f1529babedfc6ebe239 - docs/models/activitytaskfailedrequest.md: - id: 7f9c3fa2ddf7 - last_write_checksum: sha1:2cf9ff1213584c3a20993eb2e29175f5ee528a90 - pristine_git_object: 1db1d90a44ba364f9d64e15c1d4663e549be9701 docs/models/activitytaskfailedresponse.md: id: 325e821a4d2f last_write_checksum: sha1:165eb54c023c8d29fa1093542cf62b69cbc4657b @@ -105,26 +93,14 @@ trackedFiles: id: 4d2e278266f7 last_write_checksum: sha1:a79f27b4272efab1378a0f2d7de12939dfb7a933 pristine_git_object: 9216607678cc149d446bf30ba92a6cf9b3d4d3d2 - docs/models/activitytaskretryingrequest.md: - id: fe8bf3783cda - last_write_checksum: sha1:b6f5c9dc5bc15ca1d5d7fd85f5541657c803fe59 - pristine_git_object: fb6e27b5cb4585f2496edea5cf060df59cb7495f docs/models/activitytaskretryingresponse.md: id: ca0fb7b72379 last_write_checksum: sha1:0ede54e73f1c5c77e585e8c9f3892c626bede7cf pristine_git_object: 8b7bdd42e45eb8b3c5ad33a2de5ac2d15d8b3453 - docs/models/activitytaskstartedattributesrequest.md: - id: a33e1e21c741 - last_write_checksum: sha1:caa2e31f0a6fdc73de5df68136a585dfe7f18d93 - pristine_git_object: e264b20b3e50d78a37f15bcd5bbf7dd207a87ac4 docs/models/activitytaskstartedattributesresponse.md: id: b0d2e886ad19 last_write_checksum: sha1:81ddc501fe7c04dc2313ef93ec5897a806934798 pristine_git_object: 5d1f59a838412b1fc863dc51f4269548c760e584 - docs/models/activitytaskstartedrequest.md: - id: 29ea1621e782 - last_write_checksum: sha1:d6aa2804105baceb53fa31a5ab2ff15d3f20a371 - pristine_git_object: 02421624f37cfefbb8544a2b207b0b0fdd421a30 docs/models/activitytaskstartedresponse.md: id: c25113506e99 last_write_checksum: sha1:3cd53ec4c3c8bdc389c55cf527c960b3b8a91c30 @@ -893,26 +869,14 @@ trackedFiles: id: 5a2768dda295 last_write_checksum: sha1:0a1df1ffa17cd0857bf3e0ac884406d7dfeb07f0 pristine_git_object: 3a5facdd3be90098f0f22bcf05215472cf2d4ec9 - docs/models/customtaskcanceledrequest.md: - id: d6ef1bfd85d9 - last_write_checksum: sha1:c03f0e55f8a90476dea366bf3246a458cab76734 - pristine_git_object: 4a313ab15cc92a231b9ae3361a745e1ad0c3f767 docs/models/customtaskcanceledresponse.md: id: 79e4f2bbf720 last_write_checksum: sha1:c65ddfa80c6bd5ce96fcd0de194f1dbb68423dea pristine_git_object: 0bcee2279755656a624d626acea0a157fa3b381c - docs/models/customtaskcompletedattributesrequest.md: - id: 841c933a0d4d - last_write_checksum: sha1:11ecb1aa3f1be3c38ea6e42e5c47a2c714800d0c - pristine_git_object: 43671ef9518e80fde77ee2023c2caf282388b0f9 docs/models/customtaskcompletedattributesresponse.md: id: c12961b43e1c last_write_checksum: sha1:772f6aa0610241727b090426384fcf883fa919cb pristine_git_object: a6a136e75a0625d155eb57808fc6f967dc10cc47 - docs/models/customtaskcompletedrequest.md: - id: 7591787e3f54 - last_write_checksum: sha1:d4d3e2e6f96a194a0988b9f264f739c961d0b03b - pristine_git_object: 90ec92a736e9c6edb95871cda81c49b74492e446 docs/models/customtaskcompletedresponse.md: id: 81d843216312 last_write_checksum: sha1:0439d35a428e5d8d321da8b710ce72c188802085 @@ -921,50 +885,22 @@ trackedFiles: id: cd0cdf6bd8d8 last_write_checksum: sha1:71cf249d1b1bd2df1cf3ec4426da9b8c9bb82c37 pristine_git_object: f4e3ab2d57ec9d447c3570e6832f911c93c94f96 - docs/models/customtaskfailedrequest.md: - id: 59a1820fceef - last_write_checksum: sha1:6d6edbc9e05d3d76a0b42501777d61a367ea5a26 - pristine_git_object: ddfd79a608ba60d960defd5909492fd941233d1e docs/models/customtaskfailedresponse.md: id: 16c047b0f70f last_write_checksum: sha1:639353633a2fd6f383896673750338235a1c442e pristine_git_object: e14e4afa4b1fe76d10a2f8505ce88e9a828d845e - docs/models/customtaskinprogressattributesrequest.md: - id: 44d737ed33c5 - last_write_checksum: sha1:5eca2ef7c833740ac20e48e8e967fa25a8678033 - pristine_git_object: 6241f13a2b45926044aa71636c4a2c2e18decacb - docs/models/customtaskinprogressattributesrequestpayload.md: - id: 0452df61c52a - last_write_checksum: sha1:b347ebe1758df4bfc98db6e73cca8c44ac596320 - pristine_git_object: 776898babb4af16af124e4103e17651f9d75d308 docs/models/customtaskinprogressattributesresponse.md: id: 8482e22b58c4 - last_write_checksum: sha1:1716403748b86df8b8c78dd60c34098130789a0b - pristine_git_object: 311e4fb5215ae3cbf1617f5049abc3318237e615 - docs/models/customtaskinprogressattributesresponsepayload.md: - id: 95c1fda66b5d - last_write_checksum: sha1:48304d42e556419f50e7f294f9124f0e6175194b - pristine_git_object: 96e460227d2a9eba0da11aca8d03b944695b94d0 - docs/models/customtaskinprogressrequest.md: - id: 794c9c4840e2 - last_write_checksum: sha1:fc9d8ed5220d423fb1bb1a6f418e2c50cbd3da28 - pristine_git_object: 4e32436301d575da50f1c9833f46606b45906b07 + last_write_checksum: sha1:0681737168dc45c08b085a4cf084903fedc127e3 + pristine_git_object: d55b81379969289edd586c03cfc8eda46a615fb2 docs/models/customtaskinprogressresponse.md: id: a181c7602b7f last_write_checksum: sha1:43caaf16e8ef772ab4a4b1f2cd926a59c87b627f pristine_git_object: 72afa91fb2baadd7dd8cf32aad2b2812316a6953 - docs/models/customtaskstartedattributesrequest.md: - id: 402fc0112fce - last_write_checksum: sha1:d23c2c717dcad52fc6e2afaa88853df95f7e066f - pristine_git_object: ff8d50ece8f2d89fe7158210f5954f7c475a0bf8 docs/models/customtaskstartedattributesresponse.md: id: 272cf75ac5d3 last_write_checksum: sha1:cd16d650b11898966e3950305b3ca2cf035fc6d5 pristine_git_object: 8bf43423f0dbba2d89429e4d98f7ae1ac1c460b1 - docs/models/customtaskstartedrequest.md: - id: 7735ab9faa24 - last_write_checksum: sha1:c531b566a1bd31ce7f1118043ce20c1616b2eb7c - pristine_git_object: aa4dc293d80e71142e1c3594b6a06f3d812aa865 docs/models/customtaskstartedresponse.md: id: 6ccd9fe137bc last_write_checksum: sha1:031eac9a01bc24b36a9cf2eb4ea864c89ba709e5 @@ -973,10 +909,6 @@ trackedFiles: id: b941e1c031db last_write_checksum: sha1:db82046ed2aa47a5c206a9e5cea7f7ab066a3329 pristine_git_object: b302b07666ad0b807990d42d6ef67a3c9c213bc8 - docs/models/customtasktimedoutrequest.md: - id: 45967446735d - last_write_checksum: sha1:389f1926ae5168214d774bf9aa915bef1cac2a62 - pristine_git_object: 5be6c0af5c5363a812fe417f56eeb9527961f0ef docs/models/customtasktimedoutresponse.md: id: b4f8e7f006e7 last_write_checksum: sha1:9b167994685d056179122eeed0df39c6b52c9cf4 @@ -1645,14 +1577,6 @@ trackedFiles: id: 5d68c9614b70 last_write_checksum: sha1:c1d5ac89195b6712b8a4b61450450a4f9b0e910e pristine_git_object: 684cc896b4ba80ba1bbc278e119fc9fc1dbbf924 - docs/models/jsonpatchpayloadrequest.md: - id: 581f55578656 - last_write_checksum: sha1:a8a92eb17cdf8227cc266792e62200fee47b5665 - pristine_git_object: fb4da675da1092185beb217b8edf72e31e6b1ffd - docs/models/jsonpatchpayloadrequestvalue.md: - id: 94fb761c9ad9 - last_write_checksum: sha1:a420f0be2cdcad371a4d9449e58b981910832616 - pristine_git_object: d58a1323190368d62d563b2cf679cae86aff813e docs/models/jsonpatchpayloadresponse.md: id: fb6daf532ebb last_write_checksum: sha1:bb2d72a81a43a44a183fea86372e037b072ae085 @@ -1669,10 +1593,6 @@ trackedFiles: id: c7115b07e32f last_write_checksum: sha1:698ad1a5ce80a06bdcd5e7c6dc582f9f05d94e31 pristine_git_object: 382b7d93925d0d68af43c4a745144a71d1f61dcf - docs/models/jsonpayloadrequest.md: - id: 92f7a9ed39ae - last_write_checksum: sha1:e1f66388d6c407091bb9af5846e8f3c8602aa368 - pristine_git_object: 63ec21420a788d7b108fc9dc75ae3c9346d1971d docs/models/jsonpayloadresponse.md: id: ce61786a7c2e last_write_checksum: sha1:369e120be622bd6deb9d2d5161482e018cb8ef42 @@ -2141,6 +2061,10 @@ trackedFiles: id: 592cf80526b8 last_write_checksum: sha1:e72a2238fe984cc4fa0d2522b462aa9ad247af78 pristine_git_object: 7ed17a697771f10febe2b893f092865b09dc04c7 + docs/models/payload.md: + id: cd93a0338683 + last_write_checksum: sha1:58bb76cb62da4c0c3c0f41965854dac205dcae3c + pristine_git_object: 22b47fa5d1a09c31ceacca958e094b9f37ea994a docs/models/postdatasetrecordsfromcampaignv1observabilitydatasetsdatasetidimportsfromcampaignpostrequest.md: id: d5158d7e7b7f last_write_checksum: sha1:7e425ce967a5d92b14b2efa1b98e9fcf578d9c92 @@ -2941,38 +2865,6 @@ trackedFiles: id: 16ce7d540f36 last_write_checksum: sha1:35fce15dd70e7c8eb85b9f54919cca1b0a0e1dcb pristine_git_object: 2034f81fff68465c568b5d189086094c5635bff8 - docs/models/workfloweventbatchrequest.md: - id: 7caeaf762e39 - last_write_checksum: sha1:28a13d5121fa878814b784ad24dd14c6f2bcaf03 - pristine_git_object: cf0af15fd4a1f6a977a81b887a06dde3ab2b5d98 - docs/models/workfloweventbatchrequestevent.md: - id: 90eae031de76 - last_write_checksum: sha1:99a7e986f51ddf240922f5144447ffc0afd021c4 - pristine_git_object: 98ac66e85eba7b8d979f0fe610f0f4fdd0ac0984 - docs/models/workfloweventbatchresponse.md: - id: 2f360869f319 - last_write_checksum: sha1:5a8e27b9b398bd298317184f9ad9e5961118b3a0 - pristine_git_object: 84ab9e3945052b4f675d8468eabcaf118f6b9355 - docs/models/workfloweventbatchresponsestatus.md: - id: 719bafb1fd93 - last_write_checksum: sha1:84b7cfe727c48142b5ddb921d272171da62e4021 - pristine_git_object: 47dd74bc0cad72e159d35c8ac74fc58fde59fd95 - docs/models/workfloweventrequest.md: - id: e036e83eefeb - last_write_checksum: sha1:384d69360ccf715f947bf8ecea71e0e423a42a2a - pristine_git_object: bec821725e8b95714bb668669bed6755ba523162 - docs/models/workfloweventrequestevent.md: - id: ed43510bd1a1 - last_write_checksum: sha1:f032d827b0ec57bcd023f084b3806f0399d4ebcd - pristine_git_object: 2156cd37b95c12d5cce0089bc32d2083b99f8fa8 - docs/models/workfloweventresponse.md: - id: d4bd90a2e937 - last_write_checksum: sha1:8032460df2a92279008be067f21e15714080a3b2 - pristine_git_object: e336dfb2a593b739240dfb665aadbcc68c423936 - docs/models/workfloweventresponsestatus.md: - id: 7ffd009a0514 - last_write_checksum: sha1:4dcecd8af02f1b7142f63ab1e91b2e8792077656 - pristine_git_object: 684f3fc728a44bb0515dad483d9ea9df32dc78de docs/models/workfloweventtype.md: id: 0ea616e53d9b last_write_checksum: sha1:97e9654b44b627a610b3a30f14b3dc56dab1d725 @@ -2981,42 +2873,22 @@ trackedFiles: id: 2eb975976d1a last_write_checksum: sha1:63f7d6bbbbca074ebc2988988477d95d2f147c11 pristine_git_object: 8c2929eb3de33ac39ebf3b243af978957c6a43f5 - docs/models/workflowexecutioncanceledrequest.md: - id: bcb7b2a53948 - last_write_checksum: sha1:8ed5c7d5147417a842fc1cc7df18167298d81d29 - pristine_git_object: e32f3c9d8cdb16de1df9e3aa36dda6b98f6d0da3 docs/models/workflowexecutioncanceledresponse.md: id: c56b39b95831 last_write_checksum: sha1:3fc990c9fd4b7b3b0368b80840d737cf355a8759 pristine_git_object: f9f4c01d263fb222de033128cd43f86c56f2b8cd - docs/models/workflowexecutioncompletedattributesrequest.md: - id: 073b3acc2ebf - last_write_checksum: sha1:47ae4322597198da507a5515c559bd3c32e5e9ef - pristine_git_object: 5ab8341c23827306b788e1a351a82594b4736b30 docs/models/workflowexecutioncompletedattributesresponse.md: id: ee786dd87f88 last_write_checksum: sha1:56f6a37a7e59b6026988373b0d88b09bd6062ee5 pristine_git_object: 30a33052d50278e5cb14e08e4631caf68cc8e058 - docs/models/workflowexecutioncompletedrequest.md: - id: 62b0e626688c - last_write_checksum: sha1:8a08360f267188b72bbef3ca5f6fb8223c830241 - pristine_git_object: 02bd2a4452faeb26f7c9b68d90cc33f62ab9864d docs/models/workflowexecutioncompletedresponse.md: id: c1888ba90ec6 last_write_checksum: sha1:491656749133e6b0d7714d2a9cbc8de8aa9c92d7 pristine_git_object: a4d40dc52ead7c8a525cfd838fc0aa336570fb3b - docs/models/workflowexecutioncontinuedasnewattributesrequest.md: - id: eb5c1bb4f634 - last_write_checksum: sha1:561a29856a9f90badf31b2c634e94a6335171d06 - pristine_git_object: c85a7b3049137295f02b1e9e0c5769f2c98eddb1 docs/models/workflowexecutioncontinuedasnewattributesresponse.md: id: 30eef6da0d67 last_write_checksum: sha1:10f85d5ec5f9fbb442d3d69319b651604baf9a0b pristine_git_object: b49a25964981bb48a5563b230413cb2ff6c5bd70 - docs/models/workflowexecutioncontinuedasnewrequest.md: - id: a18d2f94b134 - last_write_checksum: sha1:75368c1e435af748ced2a483799452b2903817d9 - pristine_git_object: f83f7b516019c4420c5534db9aa7e8b8b8ebebd6 docs/models/workflowexecutioncontinuedasnewresponse.md: id: 1ea81bc536b4 last_write_checksum: sha1:e65c01b128029322249b28e4152cd60af2443b18 @@ -3025,10 +2897,6 @@ trackedFiles: id: b5ddf561c50e last_write_checksum: sha1:097719213eeb253420f6bc7167f96c58d00bb5b4 pristine_git_object: 9fa14fa42e0d11148df4ceb227e35d808b3b7909 - docs/models/workflowexecutionfailedrequest.md: - id: 1f34d50f9f72 - last_write_checksum: sha1:74d90184e36d11a269d668337c3b5e823dbe5d38 - pristine_git_object: 160cfd1a8f28adebaa55ce6cc941dde5e467fc2a docs/models/workflowexecutionfailedresponse.md: id: 1c88150815b1 last_write_checksum: sha1:92a46ae195053013887496ae827cfd8853e864c5 @@ -3049,18 +2917,10 @@ trackedFiles: id: 73595cfc443f last_write_checksum: sha1:3861cb1972cca17c595d1eb23518bfa54c382e89 pristine_git_object: e414c47eb7a01e677cef6cc3ebda77fd28566450 - docs/models/workflowexecutionstartedattributesrequest.md: - id: 40b21129ca0e - last_write_checksum: sha1:920ab1f7115f6e16d744e450f3210aa37514c468 - pristine_git_object: a65df97ada042def878557af930d5bdc66143f62 docs/models/workflowexecutionstartedattributesresponse.md: id: 384d48b3e104 last_write_checksum: sha1:be35194c22fa533235fe930bf9aa83acd5b8ca40 pristine_git_object: c28de680eb4e49295610414f052164833e28265a - docs/models/workflowexecutionstartedrequest.md: - id: 049cff94a306 - last_write_checksum: sha1:ab51a3214f8083dc79d6e9bfb21216528d40d5ec - pristine_git_object: c2bce40e3b280a7a2aa09e812c9aa187a1dabcf3 docs/models/workflowexecutionstartedresponse.md: id: 64174669ff20 last_write_checksum: sha1:8eee734d26442d9c6e6693386c78eb204a932847 @@ -3153,10 +3013,6 @@ trackedFiles: id: 7f329c44d7fb last_write_checksum: sha1:432c70ec990e81e2de79c14efbbb6161b60e1b3e pristine_git_object: c6515f84fb66f59e6b35a4524dbd1f3edc73a7ad - docs/models/workflowtaskfailedrequest.md: - id: 44b5e84af2b2 - last_write_checksum: sha1:91ea900d446b03f2233227458b6a9b41a4131412 - pristine_git_object: a39cd97c861a47bc022b3cb4b2e9ec43bcb2a337 docs/models/workflowtaskfailedresponse.md: id: 9e6bdbc8ec6d last_write_checksum: sha1:3c83e4760483063bed3f48ec1babddd0b53e9a22 @@ -3165,10 +3021,6 @@ trackedFiles: id: e9ab5a25e976 last_write_checksum: sha1:52fb7ed9cfce65338b381616afac1dfc1e676d16 pristine_git_object: 7f298ea251febc1a35510655d14a84c37172c899 - docs/models/workflowtasktimedoutrequest.md: - id: 23e590babe17 - last_write_checksum: sha1:70c24971218bc0edb067fc6b8b12765115d0689b - pristine_git_object: 6c87b8cef524b65107a6cc60d6f0415e025a3fc4 docs/models/workflowtasktimedoutresponse.md: id: f53d1e6e4141 last_write_checksum: sha1:8c3355239dce116da33ebc288363b20ddbf3a335 @@ -3251,12 +3103,12 @@ trackedFiles: pristine_git_object: cb207d8be2ca86b00dc797fc06eabd1498adb770 docs/sdks/events/README.md: id: cf45a4390b9b - last_write_checksum: sha1:45137ac490479dc39fbfdb62942724c3b1d57140 - pristine_git_object: 436bb6a31703d248395ac8b8675b2894e975c78c + last_write_checksum: sha1:cc73282a4eafa837ee37f9db1517853e5ada0562 + pristine_git_object: de6b43fcbbcbadef17a4e35978815289146925ec docs/sdks/executions/README.md: id: 401745b17323 - last_write_checksum: sha1:67b02156343207bfd48b4199908c6543ea2e23bb - pristine_git_object: 43c3c0519c994ea678b492e54d2a466336429dfa + last_write_checksum: sha1:deb3ec67034ab14cf9b4dc56abe7cafadb84b6d1 + pristine_git_object: 1bf4ed25ebc0b9f0c93b50da16119f4371219346 docs/sdks/fields/README.md: id: fdb6c4f3bd69 last_write_checksum: sha1:ea6dea75f85d25fd0ccdd2c659ecec43d0e5242d @@ -3299,8 +3151,8 @@ trackedFiles: pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 docs/sdks/runs/README.md: id: 4598fd39b715 - last_write_checksum: sha1:9b5afa2866e24ef4dc188f0b388187cd5ec80083 - pristine_git_object: 6efc34e27adc1c0c1a3b619049c458b398770fa9 + last_write_checksum: sha1:1b27c50c01a0754ae978b5e59252193a2bdc03d4 + pristine_git_object: 33a551c5d4d455675e22d5391072cda56252683d docs/sdks/schedules/README.md: id: 2f28c809a225 last_write_checksum: sha1:70cf78f4dd201a70da97aa86a1f5d936dfabbe13 @@ -3327,8 +3179,8 @@ trackedFiles: pristine_git_object: e65383ca453849b3bab58f921f80f5b8e7df7839 docs/sdks/workflowsevents/README.md: id: 514b42269280 - last_write_checksum: sha1:dd4afb7d9af0f71d9049131227f7da2b135589cb - pristine_git_object: b89cde24eef4083057d3c22f947d5e1e0fe90b49 + last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 + pristine_git_object: 3915eb2498986000282ace30f486dce558efb4e2 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -3355,8 +3207,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:3630c9f9a0c2fecfaca2d6e32559673f72bf2172 - pristine_git_object: 54dfc8a03fcbaa15a3e1986b5a0ffc066773ae25 + last_write_checksum: sha1:7c4b8f8436c7e5c45a2d3558401950ec81133c45 + pristine_git_object: 0c0161c82d1aa0061e2e86ccc8a53eb216434083 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -3459,12 +3311,12 @@ trackedFiles: pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d src/mistralai/client/events.py: id: ac9b961cc70d - last_write_checksum: sha1:cd92fc550a2b4887b247863acfeb77597a2211e7 - pristine_git_object: 22d3b1a27f696f6d1bb3dd8d4a43c1b3e38d5c27 + last_write_checksum: sha1:8ec0c8993e2d8839f9b83b0674ad83866308593f + pristine_git_object: c57ad094c6e521448ae299fcb2184acc466d99a4 src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:295214ac21dd54e789c8e38d6ae0c71c63a414c6 - pristine_git_object: 779097b507f9b16311d9686aac016032d3ffbf3b + last_write_checksum: sha1:fe54e0d46152727ceec431d06c2d635f8ce6ff9b + pristine_git_object: 66ec396bfc42e67aff34e2b6d986452168339a01 src/mistralai/client/fields.py: id: 862335210b20 last_write_checksum: sha1:789ac221e3aec61d0d31abd1761e368e383fba88 @@ -3503,20 +3355,12 @@ trackedFiles: pristine_git_object: 3df1ca56638d59e5a8bd36fd762e49fd1c5df7b9 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:7946adb2598f1384fb2f0a4e6601abe9b09604ac - pristine_git_object: caaf77092f522379e1da167ee4c94d0727993c02 - src/mistralai/client/models/activitytaskcompletedattributesrequest.py: - id: a9e5ef17794f - last_write_checksum: sha1:c9862308564483a8da1e373ab2d94f0eb798a5a9 - pristine_git_object: 560310cf389f15c34b8d83934caae9975be949c7 + last_write_checksum: sha1:6fb0669e1dbb4fcd2b249b20a6ef5f88761c2dc6 + pristine_git_object: 6c15ed3a5ea208cb974b0c5757487282a38e9cf0 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 pristine_git_object: 899acb62afc89955ccb4ccb7a4e4d4bb8a4ce424 - src/mistralai/client/models/activitytaskcompletedrequest.py: - id: d051525d65ba - last_write_checksum: sha1:e08a49cae43cd75716dc086f608b8e7d2ab6a7db - pristine_git_object: fae82f6611122ae9795ffb1a6b006f3fbcffa894 src/mistralai/client/models/activitytaskcompletedresponse.py: id: 28373f0a2c9e last_write_checksum: sha1:93e29f246bdade11ed0bcd55e5781fe86d352f89 @@ -3525,10 +3369,6 @@ trackedFiles: id: 12635cd17417 last_write_checksum: sha1:d9f8dbbc30720e66e0d3da8046dbdc3a6a350198 pristine_git_object: 37749d4a7fe8f6c3dfa007a2a6db3cf480761663 - src/mistralai/client/models/activitytaskfailedrequest.py: - id: 1d4b5b52ae29 - last_write_checksum: sha1:5a7b26a18786cc170996a412dca46b5fe33ac547 - pristine_git_object: 1d1e9226f2df4edb1c86f1a6e553e45d45d0d4af src/mistralai/client/models/activitytaskfailedresponse.py: id: b739e8fc9b44 last_write_checksum: sha1:a4624cf0d6177e940004e180e1ed372d43cb3534 @@ -3537,26 +3377,14 @@ trackedFiles: id: 9aaa9eecac09 last_write_checksum: sha1:811a7631992abea7dbcabc4a33d43b135ca1c4ce pristine_git_object: b0ee11d8ae7005e3c1fb7cb403602841632ad1c6 - src/mistralai/client/models/activitytaskretryingrequest.py: - id: 6f2e394e1e75 - last_write_checksum: sha1:dd456e903ef879559d6adf5e8920f14f7224b009 - pristine_git_object: 8c4d84f999647a6bcaa308646d95be2c3e943dbf src/mistralai/client/models/activitytaskretryingresponse.py: id: 3a4ff1e01fa1 last_write_checksum: sha1:770c9b60721c8ba1f60f193ec1c4f8ac10a4e075 pristine_git_object: cf054a27d05dc1683275094a40336cc6f4164eb5 - src/mistralai/client/models/activitytaskstartedattributesrequest.py: - id: 51b3e5622e0b - last_write_checksum: sha1:cd3ba7db9a44cdecf5cb2638d02f6e52b826ea92 - pristine_git_object: dfa3fa04747a7cd33b764724760baa8d920fba1e src/mistralai/client/models/activitytaskstartedattributesresponse.py: id: 3a365e2c2942 last_write_checksum: sha1:7a125f9f9cb1a2eb14bb929742981b488686ab81 pristine_git_object: 100626d49be3d849b35e0e041d02f7eb9c7964a2 - src/mistralai/client/models/activitytaskstartedrequest.py: - id: aa5813a6903a - last_write_checksum: sha1:8f007fc54025d262d5d5e72b179742d5de5eee08 - pristine_git_object: 503b3998373b2a35da365f52b7714432297ac318 src/mistralai/client/models/activitytaskstartedresponse.py: id: d01ef9cb3955 last_write_checksum: sha1:1f1dda76127bdb08549b0dd94f68dafd1d6a71fc @@ -4073,26 +3901,14 @@ trackedFiles: id: c20b8be67b8c last_write_checksum: sha1:94e8aa92de645553991a5a0940aee90c19a6adc1 pristine_git_object: cea2137e5356e636b44a3b1107aa9e29a69fd504 - src/mistralai/client/models/customtaskcanceledrequest.py: - id: 4b4f6b8c8ffd - last_write_checksum: sha1:db9c0e11711bd0c973c94ff19bf516cedcd5df90 - pristine_git_object: 0cb82aea95d197e7f39de308e806ef1f5503d25a src/mistralai/client/models/customtaskcanceledresponse.py: id: 0eeb9d6cf409 last_write_checksum: sha1:99a1b1ce86f1636abd7f00e746d183cbe8e5c665 pristine_git_object: 7873b3ca5fdb61c6c4d1205894727cd09e8d939d - src/mistralai/client/models/customtaskcompletedattributesrequest.py: - id: 9ec058aedb96 - last_write_checksum: sha1:f7fc636cc3e19b9a48b357d87509929164649e72 - pristine_git_object: 5e344a32379026246738dc5fa98bc507ca67bb93 src/mistralai/client/models/customtaskcompletedattributesresponse.py: id: 0b9fb891f354 last_write_checksum: sha1:d0c1d0c181c3b0d2c9e73a09a40cd84dd5e49b85 pristine_git_object: 8b28d1058d3ffc20d9c86c1cbac03ea343d0947a - src/mistralai/client/models/customtaskcompletedrequest.py: - id: ca7326e72707 - last_write_checksum: sha1:0eb76ca446cfa3ad883d80df2129db147915d60a - pristine_git_object: eee10e8e20c317b02d30657110d070121c765ea5 src/mistralai/client/models/customtaskcompletedresponse.py: id: 719b68571f4c last_write_checksum: sha1:4d8b84868e4d94be8ca9190e29dc8dbf37c442fe @@ -4101,42 +3917,22 @@ trackedFiles: id: ff33698df363 last_write_checksum: sha1:dbbd423357a0d653ba20e94737126e9919bf2ff9 pristine_git_object: b66d7d3c973307e23a73f45a1e654e375f55140c - src/mistralai/client/models/customtaskfailedrequest.py: - id: 844b7e2b33de - last_write_checksum: sha1:0c194c3b7711b6c27ad8d5e7aec834c637362cc9 - pristine_git_object: abf2d74f1b1a8f6babb27cf8b0f75d1c6191f608 src/mistralai/client/models/customtaskfailedresponse.py: id: 1cde7920833f last_write_checksum: sha1:faa16c185064c28a2c58a4ac9ece342fdf4e1d52 pristine_git_object: 1f9835ec2cd05a55d2f545b23a223b0039609805 - src/mistralai/client/models/customtaskinprogressattributesrequest.py: - id: d003c9954634 - last_write_checksum: sha1:fa48517b90b04ac689a852dfe6b0b3cc32705630 - pristine_git_object: 5737a4e1995572770b558a3823d3c1474d8f2e0b src/mistralai/client/models/customtaskinprogressattributesresponse.py: id: 895147a1a6a8 - last_write_checksum: sha1:b78742124f3c95c0b542cb5756aa39e466538a19 - pristine_git_object: 9b5fd20a3c379c4f06edea49f2a853c745e185be - src/mistralai/client/models/customtaskinprogressrequest.py: - id: d62648fe4f1e - last_write_checksum: sha1:a7dfd8c6465029c70dc72c1cb627c2b87a3c612f - pristine_git_object: c2c2faab83cb4b9fb16aaf9d472f1f989d199de7 + last_write_checksum: sha1:67a5a511f40f83c678f591a2f6e9be632e5c622b + pristine_git_object: 45ee5e4244bd011c0a271f4429abb72f41fe92b3 src/mistralai/client/models/customtaskinprogressresponse.py: id: 9d012ecb7626 last_write_checksum: sha1:ed0824ea2641df6e5284030f0906ee4d14ce7bde pristine_git_object: 33c126f716d9b63fef593498a2442bfa1637d5dc - src/mistralai/client/models/customtaskstartedattributesrequest.py: - id: 23ea4ebe9e0b - last_write_checksum: sha1:011c21a19451f90ec3177ac7cde70b912f80f900 - pristine_git_object: db1ecbb6829f22b061688fb8b4a524af72003c3c src/mistralai/client/models/customtaskstartedattributesresponse.py: id: 6b8946c77018 last_write_checksum: sha1:25f404c0770dac0b612c67d3445b40fd8659fb59 pristine_git_object: 71bed58f6bb9b88110a79dbff38bb32f9fde6090 - src/mistralai/client/models/customtaskstartedrequest.py: - id: 39792cc12bde - last_write_checksum: sha1:b2dc31635070213fee4f5db093ada888b8d23d3c - pristine_git_object: c4bb6c2ae25bcb34f2db11cf11a82291c1f3215d src/mistralai/client/models/customtaskstartedresponse.py: id: 02b330a5292e last_write_checksum: sha1:676b985755499c4691c1ac615d04fb35481d9a0f @@ -4145,10 +3941,6 @@ trackedFiles: id: 9cc865098add last_write_checksum: sha1:229037a374553cf8523d2c0e0f0aa017adb8790b pristine_git_object: 47517ab1924cfce787805e9a528b04b1d4766a19 - src/mistralai/client/models/customtasktimedoutrequest.py: - id: 75499a6e7c0e - last_write_checksum: sha1:b32297b801a02fc119f7d749011e8fbd61700744 - pristine_git_object: def540f444e6a8b27d8aac76189382f14ff2b405 src/mistralai/client/models/customtasktimedoutresponse.py: id: 2dbbc78b85d1 last_write_checksum: sha1:da1f0487cccc52c38a8132124efe085d3eeb334f @@ -4531,8 +4323,8 @@ trackedFiles: pristine_git_object: b5d0980e197c19eaa70ac26f3b118a8e60364e3e src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py: id: 9d566ab77998 - last_write_checksum: sha1:d3f4cd875f677a479976cf843559f366b13a0fec - pristine_git_object: 24f1e8daf5eea541c8b0550aa642609178654877 + last_write_checksum: sha1:d75b0ea41941a0d1a0b748cf5181a976ecba068f + pristine_git_object: e297367919706bb21f8950aa38f21be4fd67eb2c src/mistralai/client/models/get_run_v1_workflows_runs_run_id_getop.py: id: 60463c59ff01 last_write_checksum: sha1:a851312a3e0c91273ad444c6e2cc81c8c541c9cd @@ -4559,8 +4351,8 @@ trackedFiles: pristine_git_object: 186c55486ef2f9ba01b4c5ace5b91a416b0a6bcb src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py: id: 8d636c8cad1e - last_write_checksum: sha1:71ed0aba0f677e7a245527ee8954310f060456f9 - pristine_git_object: cfb0c991333f1c23311109ca29362158910204b2 + last_write_checksum: sha1:783549db97e2001b739d807715242c8428c4d922 + pristine_git_object: c71a23052cd42092941951cf0157734253535e0a src/mistralai/client/models/get_workflow_execution_trace_eventsop.py: id: 75438195bf19 last_write_checksum: sha1:3fc47c8b7c301c1029f6a10e30298d8bc776d140 @@ -4729,10 +4521,6 @@ trackedFiles: id: 61801f21f4b0 last_write_checksum: sha1:f0400cf42fa6c776042487285cf18c1970e17ad6 pristine_git_object: 7181ddac1956f1c29b815231f30c3405d4f50754 - src/mistralai/client/models/jsonpatchpayloadrequest.py: - id: 3f10ecfda228 - last_write_checksum: sha1:93efb55ddcc2cc77f9d70596586061f9d112ea36 - pristine_git_object: 96a6d689c531f366704cdbd67b36f0c9be8dd9d3 src/mistralai/client/models/jsonpatchpayloadresponse.py: id: 1b39f46f529f last_write_checksum: sha1:bf48ca0dd13e374dec8c2ee082fe9b78cab391e5 @@ -4745,10 +4533,6 @@ trackedFiles: id: 816f9df2f3c9 last_write_checksum: sha1:9448e1181ad7913305712966d0984ebad3a9dc4b pristine_git_object: 3dd7aee65f0c4f0a2218762a9b9ea8cd571c406d - src/mistralai/client/models/jsonpayloadrequest.py: - id: 0d49a02162ea - last_write_checksum: sha1:304afed33d57eb0177012ef2d4c08f669cd59014 - pristine_git_object: 252b8dacd6cdc4b07a46f1feae2fd67f961e5bee src/mistralai/client/models/jsonpayloadresponse.py: id: ba3265f85453 last_write_checksum: sha1:9103c6d30a65222458b9bc9b5b15cc88126f4284 @@ -5777,22 +5561,6 @@ trackedFiles: id: 36fd5b898ddd last_write_checksum: sha1:70e771dc21affc971eb01de18d3c439c1f3cc8c5 pristine_git_object: f71b9ff1885114e764665d2620e5c3fc01862ff8 - src/mistralai/client/models/workfloweventbatchrequest.py: - id: c0c0986a6b07 - last_write_checksum: sha1:b45258b26ecf5b5f6578eeaf3e6fddd9264c753b - pristine_git_object: fba4a160d5490e4ae70eda660557ef7a36fda417 - src/mistralai/client/models/workfloweventbatchresponse.py: - id: 4cafe49944be - last_write_checksum: sha1:7d4b3a64acf8cc98b32b418adcb7a5141f731d9f - pristine_git_object: 0aa842a34158f4413232c76edc78a00b3e6fbbc9 - src/mistralai/client/models/workfloweventrequest.py: - id: f41edbb269a4 - last_write_checksum: sha1:bb6092cf910c2b77bb186dd62040d055bce5ac6b - pristine_git_object: 0a2c757947e654d257c5733f7f9e4a22e77bfe0a - src/mistralai/client/models/workfloweventresponse.py: - id: e1a984989f65 - last_write_checksum: sha1:0724ac05bed376ec722f376bc57ec8091ae70c6e - pristine_git_object: 4649da8096cc06140c7a910bce2cc16ad7d77101 src/mistralai/client/models/workfloweventtype.py: id: b4aeeb03b57a last_write_checksum: sha1:451a78dadc17941f397d73ff83c14d552f7150d7 @@ -5801,42 +5569,22 @@ trackedFiles: id: c0802a5de5e5 last_write_checksum: sha1:954a39fa24c0f24e603d66532fb18f31f9b06eec pristine_git_object: 6c06bfa93bd601b4c2b6f5358d24045dc6fc3d5b - src/mistralai/client/models/workflowexecutioncanceledrequest.py: - id: 7bdfdeddd5c4 - last_write_checksum: sha1:08dd298674384fb349c1747dca0f386cba3bad06 - pristine_git_object: 09873446f6c24e77a6022a3120c9e3ea955338b5 src/mistralai/client/models/workflowexecutioncanceledresponse.py: id: bcc392d67222 last_write_checksum: sha1:6fcd8350bcc05ff4eb87a3587bb8d2eefa11d227 pristine_git_object: ee1c4e71acecff7f4a94078aae1560ca43c36e31 - src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py: - id: 9d69c2f471c1 - last_write_checksum: sha1:34cda256b1ebf0c40adbe926e1c45ec7882e145d - pristine_git_object: fb48a0fccf1ab5aabbb501e696d92aba0f5128a5 src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py: id: f831331b0eb1 last_write_checksum: sha1:113cbedfc242da04a708e29b23a55742bc0de084 pristine_git_object: 3afc8dcf36f4f5fea19263095c14b245b32b76f9 - src/mistralai/client/models/workflowexecutioncompletedrequest.py: - id: 54326e5805ed - last_write_checksum: sha1:bf8e762ca99b13534e3f5f1202b4a99b183f5916 - pristine_git_object: 81bde0f107733777aaa8330320aaa1c02ee57945 src/mistralai/client/models/workflowexecutioncompletedresponse.py: id: a1bec20dfb0e last_write_checksum: sha1:c6c891ed6fdae6204c47d425e0391e2163f20a2e pristine_git_object: 17716668a30d68aad23a98d312e965171ca71306 - src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py: - id: 8517ed95b5c7 - last_write_checksum: sha1:cdd83d80b7ce55f4b1258da0a47ef7b86ecfcc16 - pristine_git_object: 1aba37ae6d2b7b64e2b223143f7b18ba55ab3572 src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py: id: 2dd61dcd7b48 last_write_checksum: sha1:e7737a3bb65c1ca887c0f28a1e18102d80755e04 pristine_git_object: 943e5ebc979c9381d36e92e1e94d818bb17a83bf - src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py: - id: d1057d583b8c - last_write_checksum: sha1:6a114eb3f253654d038fe1d15712560f05527f91 - pristine_git_object: f8c9460423dcc8ca16e91542fe853f20930a7ae9 src/mistralai/client/models/workflowexecutioncontinuedasnewresponse.py: id: be26cd87dcb3 last_write_checksum: sha1:4947f8cbfa73eae9607e252e85236894a34123d5 @@ -5845,10 +5593,6 @@ trackedFiles: id: dbb7fb36a4fd last_write_checksum: sha1:d2922a566ccc93b7979cb9411ef46882606b76c7 pristine_git_object: 1e61f3444594307656141cc999cf19f4d66763fa - src/mistralai/client/models/workflowexecutionfailedrequest.py: - id: 873155c8e314 - last_write_checksum: sha1:d050e259874c24a6812a0ee45f869b19b3d588ff - pristine_git_object: 5c4e445a6cc05804b7ce0c905c088922a1121d12 src/mistralai/client/models/workflowexecutionfailedresponse.py: id: a0836009f9de last_write_checksum: sha1:07ea35829fb0411f39c019b42d17807d0aec02c2 @@ -5869,18 +5613,10 @@ trackedFiles: id: 758786637be5 last_write_checksum: sha1:2544bf94e8d64a9bd33f37ff4737f320fcd84733 pristine_git_object: 84398375dde630f5aa2dd6363bb3fff43c1766f3 - src/mistralai/client/models/workflowexecutionstartedattributesrequest.py: - id: ee480cd77d79 - last_write_checksum: sha1:14e5ef6b80a358bf042e8ec64d2be5e78e214a90 - pristine_git_object: ff74345f2b305e6db8737bfa3991f00769462b90 src/mistralai/client/models/workflowexecutionstartedattributesresponse.py: id: d2276919a895 last_write_checksum: sha1:5861816b3b992c9a7e2dd044b56307d677f2fc10 pristine_git_object: 74e55c2977c6357077d414f799c59c7854fa2d08 - src/mistralai/client/models/workflowexecutionstartedrequest.py: - id: 15e73dddf8c4 - last_write_checksum: sha1:294047bce91d82283e0d5c929b169f280e3eb55d - pristine_git_object: 0ce8bbce27d48a88bfec92181eb190e5d1f29def src/mistralai/client/models/workflowexecutionstartedresponse.py: id: e1a597c911ea last_write_checksum: sha1:9c761698883844061bf5cae76e3bc6444941124e @@ -5969,10 +5705,6 @@ trackedFiles: id: c4c09c4d5ea7 last_write_checksum: sha1:b1faee3ed43b88829ca68f5cd642f24d8f1fe9f5 pristine_git_object: 49444347a46acf8f24c17a0f2b87c961c79efaca - src/mistralai/client/models/workflowtaskfailedrequest.py: - id: d26184215fe3 - last_write_checksum: sha1:bb5f93ed8c401aa0b285998d7c3791b0faa2a1c1 - pristine_git_object: 9075b0bcb3d3d34c044702a530834049fabc3654 src/mistralai/client/models/workflowtaskfailedresponse.py: id: a02b01867b7f last_write_checksum: sha1:47813f0c9b611079c346d5d11a80fbf4a51a3164 @@ -5981,10 +5713,6 @@ trackedFiles: id: 43369570cb96 last_write_checksum: sha1:dd30ece2ca4bd84318494f4f49ca63446677f6d4 pristine_git_object: 1824990e1e9bf911e0dc422743268a97091576a7 - src/mistralai/client/models/workflowtasktimedoutrequest.py: - id: 70f37007e50f - last_write_checksum: sha1:f47efad477bcea8f80e03f26707c0c193d1b9b54 - pristine_git_object: 86a6bcdb3f18d2ee420783ac26c9eeb0d97fdb59 src/mistralai/client/models/workflowtasktimedoutresponse.py: id: 8b7540c47083 last_write_checksum: sha1:6ecfe5907b5cdb05054b8e107977527a584e1b08 @@ -6031,8 +5759,8 @@ trackedFiles: pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:c3bf240846fefbf97e63283b3e5cd217c41816ea - pristine_git_object: 5b534b63106ee5133032ec9cb8c6ca4a5437d553 + last_write_checksum: sha1:a93e99bb1a5e8ba9afbe9a5dd6869c1a5f45c7b8 + pristine_git_object: 3e875ba8927d9b2e1829bbaa2ebeeb006696509e src/mistralai/client/schedules.py: id: d3b4fe452390 last_write_checksum: sha1:74a1455c5ba17253d2e878f638b7314edca66e21 @@ -6151,8 +5879,8 @@ trackedFiles: pristine_git_object: aae12f774608d18baf1bf5ccedd1a39363c0c29d src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef - last_write_checksum: sha1:7196b5cfb3329b3234cd0a9d85b99dc2c82e5a4d - pristine_git_object: 2c6b14ee58712adc3fdc7fd53dbea341fb621722 + last_write_checksum: sha1:ee029cad739604429d7cff743f2a469cd3cd4076 + pristine_git_object: db39e37006754e212084cab34f47480e07c36bbf examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -8305,7 +8033,7 @@ examples: path: execution_id: "" query: - decode_payloads: false + decode_payloads: true responses: "200": application/json: "" @@ -8468,7 +8196,7 @@ examples: path: run_id: "f7296489-0212-4239-9e35-12fabfe8cd11" query: - decode_payloads: false + decode_payloads: true responses: "200": application/json: "" @@ -8569,17 +8297,10 @@ examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Python SDK Changes: - * `mistral.workflows.workers.whoami()`: **Added** - * `mistral.workflows.events.send_event()`: **Added** - * `mistral.workflows.events.send_events_batch()`: **Added** - * `mistral.events.send_event()`: **Added** - * `mistral.events.send_events_batch()`: **Added** - * `mistral.workflows.events.receive_workflow_event()`: **Removed** (Breaking ⚠️) - * `mistral.workflows.events.receive_workflow_events_batch()`: **Removed** (Breaking ⚠️) - * `mistral.events.receive_workflow_event()`: **Removed** (Breaking ⚠️) - * `mistral.events.receive_workflow_events_batch()`: **Removed** (Breaking ⚠️) - * `mistral.workflows.executions.get_workflow_execution_history()`: `request.decode_payloads` **Added** - * `mistral.workflows.runs.get_run_history()`: `request.decode_payloads` **Added** + * `mistral.workflows.events.send_event()`: **Removed** (Breaking ⚠️) + * `mistral.workflows.events.send_events_batch()`: **Removed** (Breaking ⚠️) + * `mistral.events.send_event()`: **Removed** (Breaking ⚠️) + * `mistral.events.send_events_batch()`: **Removed** (Breaking ⚠️) generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 818fc000..0f252e1b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.2.0rc2 + version: 2.2.0rc3 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index f219aba0..1aaf3879 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:b0edc400c913c03cb63b1d50e468c855b7d9d393a816a7aec8b3c9b2e264acbb - sourceBlobDigest: sha256:e893659c7767d3bc967d4a5a98f0fb5e2a27f7db03d8b1946de13c22b9321b0a + sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf + sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:b0edc400c913c03cb63b1d50e468c855b7d9d393a816a7aec8b3c9b2e264acbb - sourceBlobDigest: sha256:e893659c7767d3bc967d4a5a98f0fb5e2a27f7db03d8b1946de13c22b9321b0a + sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf + sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:1231751d127af0b0bfed6d1b2c7dff8376e587c60d1d368ba1b13c5d3090b9c7 + codeSamplesRevisionDigest: sha256:5c4ab11a61b82db21d8567c51a430c9dbc522aced5a46537cb5e075218452a02 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/README-PYPI.md b/README-PYPI.md index 12064b0c..8c97f93c 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -637,8 +637,6 @@ print(res.choices[0].message.content) ### [Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md) -* [send_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#send_event) - Receive Workflow Event -* [send_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/events/README.md#get_workflow_events) - Get Workflow Events @@ -696,8 +694,6 @@ print(res.choices[0].message.content) #### [Workflows.Events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md) -* [send_event](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#send_event) - Receive Workflow Event -* [send_events_batch](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](https://github.com/mistralai/client-python/blob/main/docs/sdks/workflowsevents/README.md#get_workflow_events) - Get Workflow Events @@ -948,8 +944,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 173 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 173 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 169 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 169 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index b1d3486b..156f344f 100644 --- a/README.md +++ b/README.md @@ -637,8 +637,6 @@ print(res.choices[0].message.content) ### [Events](docs/sdks/events/README.md) -* [send_event](docs/sdks/events/README.md#send_event) - Receive Workflow Event -* [send_events_batch](docs/sdks/events/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](docs/sdks/events/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](docs/sdks/events/README.md#get_workflow_events) - Get Workflow Events @@ -696,8 +694,6 @@ print(res.choices[0].message.content) #### [Workflows.Events](docs/sdks/workflowsevents/README.md) -* [send_event](docs/sdks/workflowsevents/README.md#send_event) - Receive Workflow Event -* [send_events_batch](docs/sdks/workflowsevents/README.md#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](docs/sdks/workflowsevents/README.md#get_stream_events) - Get Stream Events * [get_workflow_events](docs/sdks/workflowsevents/README.md#get_workflow_events) - Get Workflow Events @@ -948,8 +944,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 105 of 173 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 173 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 169 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 169 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 83128c9b..45e8e389 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -508,4 +508,14 @@ Based on: ### Generated - [python v2.2.0rc2] . ### Releases -- [PyPI v2.2.0rc2] https://pypi.org/project/mistralai/2.2.0rc2 - . \ No newline at end of file +- [PyPI v2.2.0rc2] https://pypi.org/project/mistralai/2.2.0rc2 - . + +## 2026-03-30 17:24:31 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.2.0rc3] . +### Releases +- [PyPI v2.2.0rc3] https://pypi.org/project/mistralai/2.2.0rc3 - . \ No newline at end of file diff --git a/docs/models/activitytaskcompletedattributesrequest.md b/docs/models/activitytaskcompletedattributesrequest.md deleted file mode 100644 index 5050b558..00000000 --- a/docs/models/activitytaskcompletedattributesrequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActivityTaskCompletedAttributesRequest - -Attributes for activity task completed events. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | -| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | -| `result` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/activitytaskcompletedrequest.md b/docs/models/activitytaskcompletedrequest.md deleted file mode 100644 index 9008bbf1..00000000 --- a/docs/models/activitytaskcompletedrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# ActivityTaskCompletedRequest - -Emitted when an activity task completes successfully. - -Contains timing information about the successful execution. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["ACTIVITY_TASK_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.ActivityTaskCompletedAttributesRequest](../models/activitytaskcompletedattributesrequest.md) | :heavy_check_mark: | Attributes for activity task completed events. | \ No newline at end of file diff --git a/docs/models/activitytaskfailedrequest.md b/docs/models/activitytaskfailedrequest.md deleted file mode 100644 index 1db1d90a..00000000 --- a/docs/models/activitytaskfailedrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# ActivityTaskFailedRequest - -Emitted when an activity task fails after exhausting all retry attempts. - -This is a terminal event indicating the activity could not complete successfully. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["ACTIVITY_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.ActivityTaskFailedAttributes](../models/activitytaskfailedattributes.md) | :heavy_check_mark: | Attributes for activity task failed events (final failure after all retries). | \ No newline at end of file diff --git a/docs/models/activitytaskretryingrequest.md b/docs/models/activitytaskretryingrequest.md deleted file mode 100644 index fb6e27b5..00000000 --- a/docs/models/activitytaskretryingrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# ActivityTaskRetryingRequest - -Emitted when an activity task fails and will be retried. - -Contains information about the failed attempt and the error that occurred. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["ACTIVITY_TASK_RETRYING"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.ActivityTaskRetryingAttributes](../models/activitytaskretryingattributes.md) | :heavy_check_mark: | Attributes for activity task retrying events. | \ No newline at end of file diff --git a/docs/models/activitytaskstartedattributesrequest.md b/docs/models/activitytaskstartedattributesrequest.md deleted file mode 100644 index e264b20b..00000000 --- a/docs/models/activitytaskstartedattributesrequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ActivityTaskStartedAttributesRequest - -Attributes for activity task started events. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | -| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | -| `input` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/activitytaskstartedrequest.md b/docs/models/activitytaskstartedrequest.md deleted file mode 100644 index 02421624..00000000 --- a/docs/models/activitytaskstartedrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# ActivityTaskStartedRequest - -Emitted when an activity task begins execution. - -This is the first event for an activity, emitted on the first attempt only. -Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["ACTIVITY_TASK_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.ActivityTaskStartedAttributesRequest](../models/activitytaskstartedattributesrequest.md) | :heavy_check_mark: | Attributes for activity task started events. | \ No newline at end of file diff --git a/docs/models/customtaskcanceledrequest.md b/docs/models/customtaskcanceledrequest.md deleted file mode 100644 index 4a313ab1..00000000 --- a/docs/models/customtaskcanceledrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# CustomTaskCanceledRequest - -Emitted when a custom task is canceled. - -Indicates the task was explicitly stopped before completion. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["CUSTOM_TASK_CANCELED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.CustomTaskCanceledAttributes](../models/customtaskcanceledattributes.md) | :heavy_check_mark: | Attributes for custom task canceled events. | \ No newline at end of file diff --git a/docs/models/customtaskcompletedattributesrequest.md b/docs/models/customtaskcompletedattributesrequest.md deleted file mode 100644 index 43671ef9..00000000 --- a/docs/models/customtaskcompletedattributesrequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CustomTaskCompletedAttributesRequest - -Attributes for custom task completed events. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | -| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | -| `payload` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/customtaskcompletedrequest.md b/docs/models/customtaskcompletedrequest.md deleted file mode 100644 index 90ec92a7..00000000 --- a/docs/models/customtaskcompletedrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# CustomTaskCompletedRequest - -Emitted when a custom task completes successfully. - -Contains the final result of the task execution. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["CUSTOM_TASK_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.CustomTaskCompletedAttributesRequest](../models/customtaskcompletedattributesrequest.md) | :heavy_check_mark: | Attributes for custom task completed events. | \ No newline at end of file diff --git a/docs/models/customtaskfailedrequest.md b/docs/models/customtaskfailedrequest.md deleted file mode 100644 index ddfd79a6..00000000 --- a/docs/models/customtaskfailedrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# CustomTaskFailedRequest - -Emitted when a custom task fails. - -Contains details about the failure for debugging and error handling. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["CUSTOM_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.CustomTaskFailedAttributes](../models/customtaskfailedattributes.md) | :heavy_check_mark: | Attributes for custom task failed events. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressattributesrequest.md b/docs/models/customtaskinprogressattributesrequest.md deleted file mode 100644 index 6241f13a..00000000 --- a/docs/models/customtaskinprogressattributesrequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CustomTaskInProgressAttributesRequest - -Attributes for custom task in-progress events with streaming updates. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | -| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | -| `payload` | [models.CustomTaskInProgressAttributesRequestPayload](../models/customtaskinprogressattributesrequestpayload.md) | :heavy_check_mark: | The current state or incremental update for the task. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressattributesrequestpayload.md b/docs/models/customtaskinprogressattributesrequestpayload.md deleted file mode 100644 index 776898ba..00000000 --- a/docs/models/customtaskinprogressattributesrequestpayload.md +++ /dev/null @@ -1,19 +0,0 @@ -# CustomTaskInProgressAttributesRequestPayload - -The current state or incremental update for the task. - - -## Supported Types - -### `models.JSONPayloadRequest` - -```python -value: models.JSONPayloadRequest = /* values here */ -``` - -### `models.JSONPatchPayloadRequest` - -```python -value: models.JSONPatchPayloadRequest = /* values here */ -``` - diff --git a/docs/models/customtaskinprogressattributesresponse.md b/docs/models/customtaskinprogressattributesresponse.md index 311e4fb5..d55b8137 100644 --- a/docs/models/customtaskinprogressattributesresponse.md +++ b/docs/models/customtaskinprogressattributesresponse.md @@ -5,8 +5,8 @@ Attributes for custom task in-progress events with streaming updates. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | -| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | -| `payload` | [models.CustomTaskInProgressAttributesResponsePayload](../models/customtaskinprogressattributesresponsepayload.md) | :heavy_check_mark: | The current state or incremental update for the task. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [models.Payload](../models/payload.md) | :heavy_check_mark: | The current state or incremental update for the task. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressrequest.md b/docs/models/customtaskinprogressrequest.md deleted file mode 100644 index 4e324363..00000000 --- a/docs/models/customtaskinprogressrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CustomTaskInProgressRequest - -Emitted during custom task execution to report progress. - -This event supports streaming updates via JSON or JSON Patch payloads, -enabling real-time progress tracking for long-running tasks. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["CUSTOM_TASK_IN_PROGRESS"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.CustomTaskInProgressAttributesRequest](../models/customtaskinprogressattributesrequest.md) | :heavy_check_mark: | Attributes for custom task in-progress events with streaming updates. | \ No newline at end of file diff --git a/docs/models/customtaskstartedattributesrequest.md b/docs/models/customtaskstartedattributesrequest.md deleted file mode 100644 index ff8d50ec..00000000 --- a/docs/models/customtaskstartedattributesrequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CustomTaskStartedAttributesRequest - -Attributes for custom task started events. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | -| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | -| `payload` | [Optional[models.JSONPayloadRequest]](../models/jsonpayloadrequest.md) | :heavy_minus_sign: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/customtaskstartedrequest.md b/docs/models/customtaskstartedrequest.md deleted file mode 100644 index aa4dc293..00000000 --- a/docs/models/customtaskstartedrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# CustomTaskStartedRequest - -Emitted when a custom task begins execution. - -Custom tasks represent user-defined units of work within a workflow, -such as LLM calls, API requests, or data processing steps. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["CUSTOM_TASK_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.CustomTaskStartedAttributesRequest](../models/customtaskstartedattributesrequest.md) | :heavy_check_mark: | Attributes for custom task started events. | \ No newline at end of file diff --git a/docs/models/customtasktimedoutrequest.md b/docs/models/customtasktimedoutrequest.md deleted file mode 100644 index 5be6c0af..00000000 --- a/docs/models/customtasktimedoutrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# CustomTaskTimedOutRequest - -Emitted when a custom task exceeds its timeout. - -Indicates the task did not complete within its configured time limit. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["CUSTOM_TASK_TIMED_OUT"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.CustomTaskTimedOutAttributes](../models/customtasktimedoutattributes.md) | :heavy_check_mark: | Attributes for custom task timed out events. | \ No newline at end of file diff --git a/docs/models/jsonpatchpayloadrequest.md b/docs/models/jsonpatchpayloadrequest.md deleted file mode 100644 index fb4da675..00000000 --- a/docs/models/jsonpatchpayloadrequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# JSONPatchPayloadRequest - -A payload containing a list of JSON Patch operations. - -Used for streaming incremental updates to workflow state. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `type` | *Literal["json_patch"]* | :heavy_check_mark: | Discriminator indicating this is a JSON Patch payload. | -| `value` | List[[models.JSONPatchPayloadRequestValue](../models/jsonpatchpayloadrequestvalue.md)] | :heavy_check_mark: | The list of JSON Patch operations to apply in order. | \ No newline at end of file diff --git a/docs/models/jsonpatchpayloadrequestvalue.md b/docs/models/jsonpatchpayloadrequestvalue.md deleted file mode 100644 index d58a1323..00000000 --- a/docs/models/jsonpatchpayloadrequestvalue.md +++ /dev/null @@ -1,29 +0,0 @@ -# JSONPatchPayloadRequestValue - - -## Supported Types - -### `models.JSONPatchAdd` - -```python -value: models.JSONPatchAdd = /* values here */ -``` - -### `models.JSONPatchAppend` - -```python -value: models.JSONPatchAppend = /* values here */ -``` - -### `models.JSONPatchRemove` - -```python -value: models.JSONPatchRemove = /* values here */ -``` - -### `models.JSONPatchReplace` - -```python -value: models.JSONPatchReplace = /* values here */ -``` - diff --git a/docs/models/jsonpayloadrequest.md b/docs/models/jsonpayloadrequest.md deleted file mode 100644 index 63ec2142..00000000 --- a/docs/models/jsonpayloadrequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# JSONPayloadRequest - -A payload containing arbitrary JSON data. - -Used for complete state snapshots or final results. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `type` | *Optional[Literal["json"]]* | :heavy_minus_sign: | Discriminator indicating this is a raw JSON payload. | -| `value` | *Any* | :heavy_check_mark: | The JSON-serializable payload value. | \ No newline at end of file diff --git a/docs/models/customtaskinprogressattributesresponsepayload.md b/docs/models/payload.md similarity index 85% rename from docs/models/customtaskinprogressattributesresponsepayload.md rename to docs/models/payload.md index 96e46022..22b47fa5 100644 --- a/docs/models/customtaskinprogressattributesresponsepayload.md +++ b/docs/models/payload.md @@ -1,4 +1,4 @@ -# CustomTaskInProgressAttributesResponsePayload +# Payload The current state or incremental update for the task. diff --git a/docs/models/workfloweventbatchrequest.md b/docs/models/workfloweventbatchrequest.md deleted file mode 100644 index cf0af15f..00000000 --- a/docs/models/workfloweventbatchrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# WorkflowEventBatchRequest - -Request model containing multiple workflow events. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `events` | List[[models.WorkflowEventBatchRequestEvent](../models/workfloweventbatchrequestevent.md)] | :heavy_check_mark: | List of workflow events to send. | \ No newline at end of file diff --git a/docs/models/workfloweventbatchrequestevent.md b/docs/models/workfloweventbatchrequestevent.md deleted file mode 100644 index 98ac66e8..00000000 --- a/docs/models/workfloweventbatchrequestevent.md +++ /dev/null @@ -1,107 +0,0 @@ -# WorkflowEventBatchRequestEvent - - -## Supported Types - -### `models.WorkflowExecutionStartedRequest` - -```python -value: models.WorkflowExecutionStartedRequest = /* values here */ -``` - -### `models.WorkflowExecutionCompletedRequest` - -```python -value: models.WorkflowExecutionCompletedRequest = /* values here */ -``` - -### `models.WorkflowExecutionFailedRequest` - -```python -value: models.WorkflowExecutionFailedRequest = /* values here */ -``` - -### `models.WorkflowExecutionCanceledRequest` - -```python -value: models.WorkflowExecutionCanceledRequest = /* values here */ -``` - -### `models.WorkflowExecutionContinuedAsNewRequest` - -```python -value: models.WorkflowExecutionContinuedAsNewRequest = /* values here */ -``` - -### `models.WorkflowTaskTimedOutRequest` - -```python -value: models.WorkflowTaskTimedOutRequest = /* values here */ -``` - -### `models.WorkflowTaskFailedRequest` - -```python -value: models.WorkflowTaskFailedRequest = /* values here */ -``` - -### `models.CustomTaskStartedRequest` - -```python -value: models.CustomTaskStartedRequest = /* values here */ -``` - -### `models.CustomTaskInProgressRequest` - -```python -value: models.CustomTaskInProgressRequest = /* values here */ -``` - -### `models.CustomTaskCompletedRequest` - -```python -value: models.CustomTaskCompletedRequest = /* values here */ -``` - -### `models.CustomTaskFailedRequest` - -```python -value: models.CustomTaskFailedRequest = /* values here */ -``` - -### `models.CustomTaskTimedOutRequest` - -```python -value: models.CustomTaskTimedOutRequest = /* values here */ -``` - -### `models.CustomTaskCanceledRequest` - -```python -value: models.CustomTaskCanceledRequest = /* values here */ -``` - -### `models.ActivityTaskStartedRequest` - -```python -value: models.ActivityTaskStartedRequest = /* values here */ -``` - -### `models.ActivityTaskCompletedRequest` - -```python -value: models.ActivityTaskCompletedRequest = /* values here */ -``` - -### `models.ActivityTaskRetryingRequest` - -```python -value: models.ActivityTaskRetryingRequest = /* values here */ -``` - -### `models.ActivityTaskFailedRequest` - -```python -value: models.ActivityTaskFailedRequest = /* values here */ -``` - diff --git a/docs/models/workfloweventbatchresponse.md b/docs/models/workfloweventbatchresponse.md deleted file mode 100644 index 84ab9e39..00000000 --- a/docs/models/workfloweventbatchresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# WorkflowEventBatchResponse - -Response model for batch workflow event reception. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `status` | [models.WorkflowEventBatchResponseStatus](../models/workfloweventbatchresponsestatus.md) | :heavy_check_mark: | Status of the batch event reception | -| `message` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional message | -| `events_received` | *int* | :heavy_check_mark: | Number of events successfully received | \ No newline at end of file diff --git a/docs/models/workfloweventbatchresponsestatus.md b/docs/models/workfloweventbatchresponsestatus.md deleted file mode 100644 index 47dd74bc..00000000 --- a/docs/models/workfloweventbatchresponsestatus.md +++ /dev/null @@ -1,20 +0,0 @@ -# WorkflowEventBatchResponseStatus - -Status of the batch event reception - -## Example Usage - -```python -from mistralai.client.models import WorkflowEventBatchResponseStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: WorkflowEventBatchResponseStatus = "success" -``` - - -## Values - -This is an open enum. Unrecognized values will not fail type checks. - -- `"success"` -- `"error"` diff --git a/docs/models/workfloweventrequest.md b/docs/models/workfloweventrequest.md deleted file mode 100644 index bec82172..00000000 --- a/docs/models/workfloweventrequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# WorkflowEventRequest - -Request model containing a workflow event. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `event` | [models.WorkflowEventRequestEvent](../models/workfloweventrequestevent.md) | :heavy_check_mark: | The workflow event payload. | \ No newline at end of file diff --git a/docs/models/workfloweventrequestevent.md b/docs/models/workfloweventrequestevent.md deleted file mode 100644 index 2156cd37..00000000 --- a/docs/models/workfloweventrequestevent.md +++ /dev/null @@ -1,109 +0,0 @@ -# WorkflowEventRequestEvent - -The workflow event payload. - - -## Supported Types - -### `models.WorkflowExecutionStartedRequest` - -```python -value: models.WorkflowExecutionStartedRequest = /* values here */ -``` - -### `models.WorkflowExecutionCompletedRequest` - -```python -value: models.WorkflowExecutionCompletedRequest = /* values here */ -``` - -### `models.WorkflowExecutionFailedRequest` - -```python -value: models.WorkflowExecutionFailedRequest = /* values here */ -``` - -### `models.WorkflowExecutionCanceledRequest` - -```python -value: models.WorkflowExecutionCanceledRequest = /* values here */ -``` - -### `models.WorkflowExecutionContinuedAsNewRequest` - -```python -value: models.WorkflowExecutionContinuedAsNewRequest = /* values here */ -``` - -### `models.WorkflowTaskTimedOutRequest` - -```python -value: models.WorkflowTaskTimedOutRequest = /* values here */ -``` - -### `models.WorkflowTaskFailedRequest` - -```python -value: models.WorkflowTaskFailedRequest = /* values here */ -``` - -### `models.CustomTaskStartedRequest` - -```python -value: models.CustomTaskStartedRequest = /* values here */ -``` - -### `models.CustomTaskInProgressRequest` - -```python -value: models.CustomTaskInProgressRequest = /* values here */ -``` - -### `models.CustomTaskCompletedRequest` - -```python -value: models.CustomTaskCompletedRequest = /* values here */ -``` - -### `models.CustomTaskFailedRequest` - -```python -value: models.CustomTaskFailedRequest = /* values here */ -``` - -### `models.CustomTaskTimedOutRequest` - -```python -value: models.CustomTaskTimedOutRequest = /* values here */ -``` - -### `models.CustomTaskCanceledRequest` - -```python -value: models.CustomTaskCanceledRequest = /* values here */ -``` - -### `models.ActivityTaskStartedRequest` - -```python -value: models.ActivityTaskStartedRequest = /* values here */ -``` - -### `models.ActivityTaskCompletedRequest` - -```python -value: models.ActivityTaskCompletedRequest = /* values here */ -``` - -### `models.ActivityTaskRetryingRequest` - -```python -value: models.ActivityTaskRetryingRequest = /* values here */ -``` - -### `models.ActivityTaskFailedRequest` - -```python -value: models.ActivityTaskFailedRequest = /* values here */ -``` - diff --git a/docs/models/workfloweventresponse.md b/docs/models/workfloweventresponse.md deleted file mode 100644 index e336dfb2..00000000 --- a/docs/models/workfloweventresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# WorkflowEventResponse - -Response model for workflow event reception. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `status` | [models.WorkflowEventResponseStatus](../models/workfloweventresponsestatus.md) | :heavy_check_mark: | Status of the event reception | -| `message` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional message | \ No newline at end of file diff --git a/docs/models/workfloweventresponsestatus.md b/docs/models/workfloweventresponsestatus.md deleted file mode 100644 index 684f3fc7..00000000 --- a/docs/models/workfloweventresponsestatus.md +++ /dev/null @@ -1,20 +0,0 @@ -# WorkflowEventResponseStatus - -Status of the event reception - -## Example Usage - -```python -from mistralai.client.models import WorkflowEventResponseStatus - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: WorkflowEventResponseStatus = "success" -``` - - -## Values - -This is an open enum. Unrecognized values will not fail type checks. - -- `"success"` -- `"error"` diff --git a/docs/models/workflowexecutioncanceledrequest.md b/docs/models/workflowexecutioncanceledrequest.md deleted file mode 100644 index e32f3c9d..00000000 --- a/docs/models/workflowexecutioncanceledrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# WorkflowExecutionCanceledRequest - -Emitted when a workflow execution is canceled. - -This is a terminal event indicating the workflow was explicitly canceled. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_CANCELED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.WorkflowExecutionCanceledAttributes](../models/workflowexecutioncanceledattributes.md) | :heavy_check_mark: | Attributes for workflow execution canceled events. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncompletedattributesrequest.md b/docs/models/workflowexecutioncompletedattributesrequest.md deleted file mode 100644 index 5ab8341c..00000000 --- a/docs/models/workflowexecutioncompletedattributesrequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# WorkflowExecutionCompletedAttributesRequest - -Attributes for workflow execution completed events. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | -| `result` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncompletedrequest.md b/docs/models/workflowexecutioncompletedrequest.md deleted file mode 100644 index 02bd2a44..00000000 --- a/docs/models/workflowexecutioncompletedrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# WorkflowExecutionCompletedRequest - -Emitted when a workflow execution completes successfully. - -This is a terminal event indicating the workflow finished without errors. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_COMPLETED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.WorkflowExecutionCompletedAttributesRequest](../models/workflowexecutioncompletedattributesrequest.md) | :heavy_check_mark: | Attributes for workflow execution completed events. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncontinuedasnewattributesrequest.md b/docs/models/workflowexecutioncontinuedasnewattributesrequest.md deleted file mode 100644 index c85a7b30..00000000 --- a/docs/models/workflowexecutioncontinuedasnewattributesrequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# WorkflowExecutionContinuedAsNewAttributesRequest - -Attributes for workflow execution continued-as-new events. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | -| `new_execution_run_id` | *str* | :heavy_check_mark: | The run ID of the new workflow execution that continues this workflow. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the continued workflow. | -| `input` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncontinuedasnewrequest.md b/docs/models/workflowexecutioncontinuedasnewrequest.md deleted file mode 100644 index f83f7b51..00000000 --- a/docs/models/workflowexecutioncontinuedasnewrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# WorkflowExecutionContinuedAsNewRequest - -Emitted when a workflow continues as a new execution. - -This occurs when a workflow uses continue-as-new to reset its history -while maintaining logical continuity. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.WorkflowExecutionContinuedAsNewAttributesRequest](../models/workflowexecutioncontinuedasnewattributesrequest.md) | :heavy_check_mark: | Attributes for workflow execution continued-as-new events. | \ No newline at end of file diff --git a/docs/models/workflowexecutionfailedrequest.md b/docs/models/workflowexecutionfailedrequest.md deleted file mode 100644 index 160cfd1a..00000000 --- a/docs/models/workflowexecutionfailedrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# WorkflowExecutionFailedRequest - -Emitted when a workflow execution fails due to an unhandled exception. - -This is a terminal event indicating the workflow ended with an error. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.WorkflowExecutionFailedAttributes](../models/workflowexecutionfailedattributes.md) | :heavy_check_mark: | Attributes for workflow execution failed events. | \ No newline at end of file diff --git a/docs/models/workflowexecutionstartedattributesrequest.md b/docs/models/workflowexecutionstartedattributesrequest.md deleted file mode 100644 index a65df97a..00000000 --- a/docs/models/workflowexecutionstartedattributesrequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# WorkflowExecutionStartedAttributesRequest - -Attributes for workflow execution started events. - - -## Fields - -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow being executed. | -| `input` | [models.JSONPayloadRequest](../models/jsonpayloadrequest.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutionstartedrequest.md b/docs/models/workflowexecutionstartedrequest.md deleted file mode 100644 index c2bce40e..00000000 --- a/docs/models/workflowexecutionstartedrequest.md +++ /dev/null @@ -1,20 +0,0 @@ -# WorkflowExecutionStartedRequest - -Emitted when a workflow execution begins. - -This is the first event in any workflow execution lifecycle. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["WORKFLOW_EXECUTION_STARTED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.WorkflowExecutionStartedAttributesRequest](../models/workflowexecutionstartedattributesrequest.md) | :heavy_check_mark: | Attributes for workflow execution started events. | \ No newline at end of file diff --git a/docs/models/workflowtaskfailedrequest.md b/docs/models/workflowtaskfailedrequest.md deleted file mode 100644 index a39cd97c..00000000 --- a/docs/models/workflowtaskfailedrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# WorkflowTaskFailedRequest - -Emitted when a workflow task fails. - -This indicates an error occurred during workflow task execution, -which may trigger a retry depending on configuration. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["WORKFLOW_TASK_FAILED"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.WorkflowTaskFailedAttributes](../models/workflowtaskfailedattributes.md) | :heavy_check_mark: | Attributes for workflow task failed events. | \ No newline at end of file diff --git a/docs/models/workflowtasktimedoutrequest.md b/docs/models/workflowtasktimedoutrequest.md deleted file mode 100644 index 6c87b8ce..00000000 --- a/docs/models/workflowtasktimedoutrequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# WorkflowTaskTimedOutRequest - -Emitted when a workflow task times out. - -This indicates the workflow task (a unit of workflow execution) exceeded -its configured timeout. - - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `event_id` | *str* | :heavy_check_mark: | Unique identifier for this event instance. | -| `event_timestamp` | *Optional[int]* | :heavy_minus_sign: | Unix timestamp in nanoseconds when the event was created. | -| `root_workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the root workflow that initiated this execution chain. | -| `parent_workflow_exec_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set. | -| `workflow_exec_id` | *str* | :heavy_check_mark: | Execution ID of the workflow that emitted this event. | -| `workflow_run_id` | *str* | :heavy_check_mark: | Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow that emitted this event. | -| `event_type` | *Optional[Literal["WORKFLOW_TASK_TIMED_OUT"]]* | :heavy_minus_sign: | Event type discriminator. | -| `attributes` | [models.WorkflowTaskTimedOutAttributes](../models/workflowtasktimedoutattributes.md) | :heavy_check_mark: | Attributes for workflow task timed out events. | \ No newline at end of file diff --git a/docs/sdks/events/README.md b/docs/sdks/events/README.md index 436bb6a3..de6b43fc 100644 --- a/docs/sdks/events/README.md +++ b/docs/sdks/events/README.md @@ -4,132 +4,9 @@ ### Available Operations -* [send_event](#send_event) - Receive Workflow Event -* [send_events_batch](#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](#get_stream_events) - Get Stream Events * [get_workflow_events](#get_workflow_events) - Get Workflow Events -## send_event - -Receive workflow events from workers. - -Events are published to NATS for real-time streaming and persisted in the database. - -For shared workers, the actual execution owner is resolved from the execution record, -ensuring events are streamed to the correct user's namespace. - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY", ""), -) as mistral: - - res = mistral.events.send_event(event={ - "event_id": "", - "root_workflow_exec_id": "", - "workflow_exec_id": "", - "workflow_run_id": "", - "workflow_name": "", - "event_type": "CUSTOM_TASK_STARTED", - "attributes": { - "custom_task_id": "", - "custom_task_type": "", - }, - }) - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `event` | [models.WorkflowEventRequestEvent](../../models/workfloweventrequestevent.md) | :heavy_check_mark: | The workflow event payload. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.WorkflowEventResponse](../../models/workfloweventresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.HTTPValidationError | 422 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## send_events_batch - -Receive multiple workflow events from workers in a single batch. - -Events are published to NATS for real-time streaming and persisted in the database. -This endpoint processes events sequentially to maintain ordering guarantees. - -For shared workers, the actual execution owner is resolved from the execution record, -ensuring events are streamed to the correct user's namespace. - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY", ""), -) as mistral: - - res = mistral.events.send_events_batch(events=[ - { - "event_id": "", - "root_workflow_exec_id": "", - "workflow_exec_id": "", - "workflow_run_id": "", - "workflow_name": "", - "event_type": "WORKFLOW_EXECUTION_STARTED", - "attributes": { - "task_id": "", - "workflow_name": "", - "input": { - "type": "json", - "value": "", - }, - }, - }, - ]) - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `events` | List[[models.WorkflowEventBatchRequestEvent](../../models/workfloweventbatchrequestevent.md)] | :heavy_check_mark: | List of workflow events to send. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.WorkflowEventBatchResponse](../../models/workfloweventbatchresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.HTTPValidationError | 422 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - ## get_stream_events Get Stream Events diff --git a/docs/sdks/executions/README.md b/docs/sdks/executions/README.md index 43c3c051..1bf4ed25 100644 --- a/docs/sdks/executions/README.md +++ b/docs/sdks/executions/README.md @@ -76,7 +76,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.executions.get_workflow_execution_history(execution_id="", decode_payloads=False) + res = mistral.workflows.executions.get_workflow_execution_history(execution_id="", decode_payloads=True) # Handle response print(res) diff --git a/docs/sdks/runs/README.md b/docs/sdks/runs/README.md index 6efc34e2..33a551c5 100644 --- a/docs/sdks/runs/README.md +++ b/docs/sdks/runs/README.md @@ -112,7 +112,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.workflows.runs.get_run_history(run_id="f7296489-0212-4239-9e35-12fabfe8cd11", decode_payloads=False) + res = mistral.workflows.runs.get_run_history(run_id="f7296489-0212-4239-9e35-12fabfe8cd11", decode_payloads=True) # Handle response print(res) diff --git a/docs/sdks/workflowsevents/README.md b/docs/sdks/workflowsevents/README.md index b89cde24..3915eb24 100644 --- a/docs/sdks/workflowsevents/README.md +++ b/docs/sdks/workflowsevents/README.md @@ -4,132 +4,9 @@ ### Available Operations -* [send_event](#send_event) - Receive Workflow Event -* [send_events_batch](#send_events_batch) - Receive Workflow Events Batch * [get_stream_events](#get_stream_events) - Get Stream Events * [get_workflow_events](#get_workflow_events) - Get Workflow Events -## send_event - -Receive workflow events from workers. - -Events are published to NATS for real-time streaming and persisted in the database. - -For shared workers, the actual execution owner is resolved from the execution record, -ensuring events are streamed to the correct user's namespace. - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY", ""), -) as mistral: - - res = mistral.workflows.events.send_event(event={ - "event_id": "", - "root_workflow_exec_id": "", - "workflow_exec_id": "", - "workflow_run_id": "", - "workflow_name": "", - "event_type": "CUSTOM_TASK_STARTED", - "attributes": { - "custom_task_id": "", - "custom_task_type": "", - }, - }) - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `event` | [models.WorkflowEventRequestEvent](../../models/workfloweventrequestevent.md) | :heavy_check_mark: | The workflow event payload. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.WorkflowEventResponse](../../models/workfloweventresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.HTTPValidationError | 422 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - -## send_events_batch - -Receive multiple workflow events from workers in a single batch. - -Events are published to NATS for real-time streaming and persisted in the database. -This endpoint processes events sequentially to maintain ordering guarantees. - -For shared workers, the actual execution owner is resolved from the execution record, -ensuring events are streamed to the correct user's namespace. - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY", ""), -) as mistral: - - res = mistral.workflows.events.send_events_batch(events=[ - { - "event_id": "", - "root_workflow_exec_id": "", - "workflow_exec_id": "", - "workflow_run_id": "", - "workflow_name": "", - "event_type": "WORKFLOW_EXECUTION_STARTED", - "attributes": { - "task_id": "", - "workflow_name": "", - "input": { - "type": "json", - "value": "", - }, - }, - }, - ]) - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `events` | List[[models.WorkflowEventBatchRequestEvent](../../models/workfloweventbatchrequestevent.md)] | :heavy_check_mark: | List of workflow events to send. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.WorkflowEventBatchResponse](../../models/workfloweventbatchresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| errors.HTTPValidationError | 422 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | - ## get_stream_events Get Stream Events diff --git a/pyproject.toml b/pyproject.toml index 2c2e6158..b4e239e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.2.0rc2" +version = "2.2.0rc3" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 54dfc8a0..0c0161c8 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.2.0rc2" +__version__: str = "2.2.0rc3" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.2.0rc2 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.2.0rc3 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/events.py b/src/mistralai/client/events.py index 22d3b1a2..c57ad094 100644 --- a/src/mistralai/client/events.py +++ b/src/mistralai/client/events.py @@ -7,418 +7,10 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import eventstreaming, get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Dict, List, Mapping, Optional, Union +from typing import Any, Dict, List, Mapping, Optional class Events(BaseSDK): - def send_event( - self, - *, - event: Union[ - models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventResponse: - r"""Receive Workflow Event - - Receive workflow events from workers. - - Events are published to NATS for real-time streaming and persisted in the database. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param event: The workflow event payload. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventRequest( - event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), - ) - - req = self._build_request( - method="POST", - path="/v1/workflows/events", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_event_v1_workflows_events_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - async def send_event_async( - self, - *, - event: Union[ - models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventResponse: - r"""Receive Workflow Event - - Receive workflow events from workers. - - Events are published to NATS for real-time streaming and persisted in the database. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param event: The workflow event payload. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventRequest( - event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), - ) - - req = self._build_request_async( - method="POST", - path="/v1/workflows/events", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_event_v1_workflows_events_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - def send_events_batch( - self, - *, - events: Union[ - List[models.WorkflowEventBatchRequestEvent], - List[models.WorkflowEventBatchRequestEventTypedDict], - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventBatchResponse: - r"""Receive Workflow Events Batch - - Receive multiple workflow events from workers in a single batch. - - Events are published to NATS for real-time streaming and persisted in the database. - This endpoint processes events sequentially to maintain ordering guarantees. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param events: List of workflow events to send. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventBatchRequest( - events=utils.get_pydantic_model( - events, List[models.WorkflowEventBatchRequestEvent] - ), - ) - - req = self._build_request( - method="POST", - path="/v1/workflows/events/batch", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventBatchRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - async def send_events_batch_async( - self, - *, - events: Union[ - List[models.WorkflowEventBatchRequestEvent], - List[models.WorkflowEventBatchRequestEventTypedDict], - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventBatchResponse: - r"""Receive Workflow Events Batch - - Receive multiple workflow events from workers in a single batch. - - Events are published to NATS for real-time streaming and persisted in the database. - This endpoint processes events sequentially to maintain ordering guarantees. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param events: List of workflow events to send. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventBatchRequest( - events=utils.get_pydantic_model( - events, List[models.WorkflowEventBatchRequestEvent] - ), - ) - - req = self._build_request_async( - method="POST", - path="/v1/workflows/events/batch", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventBatchRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - def get_stream_events( self, *, diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index 779097b5..66ec396b 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -191,7 +191,7 @@ def get_workflow_execution_history( self, *, execution_id: str, - decode_payloads: Optional[bool] = False, + decode_payloads: Optional[bool] = True, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -282,7 +282,7 @@ async def get_workflow_execution_history_async( self, *, execution_id: str, - decode_payloads: Optional[bool] = False, + decode_payloads: Optional[bool] = True, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index caaf7709..6c15ed3a 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -14,18 +14,10 @@ from mistralai.client.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: - from .activitytaskcompletedattributesrequest import ( - ActivityTaskCompletedAttributesRequest, - ActivityTaskCompletedAttributesRequestTypedDict, - ) from .activitytaskcompletedattributesresponse import ( ActivityTaskCompletedAttributesResponse, ActivityTaskCompletedAttributesResponseTypedDict, ) - from .activitytaskcompletedrequest import ( - ActivityTaskCompletedRequest, - ActivityTaskCompletedRequestTypedDict, - ) from .activitytaskcompletedresponse import ( ActivityTaskCompletedResponse, ActivityTaskCompletedResponseTypedDict, @@ -34,10 +26,6 @@ ActivityTaskFailedAttributes, ActivityTaskFailedAttributesTypedDict, ) - from .activitytaskfailedrequest import ( - ActivityTaskFailedRequest, - ActivityTaskFailedRequestTypedDict, - ) from .activitytaskfailedresponse import ( ActivityTaskFailedResponse, ActivityTaskFailedResponseTypedDict, @@ -46,26 +34,14 @@ ActivityTaskRetryingAttributes, ActivityTaskRetryingAttributesTypedDict, ) - from .activitytaskretryingrequest import ( - ActivityTaskRetryingRequest, - ActivityTaskRetryingRequestTypedDict, - ) from .activitytaskretryingresponse import ( ActivityTaskRetryingResponse, ActivityTaskRetryingResponseTypedDict, ) - from .activitytaskstartedattributesrequest import ( - ActivityTaskStartedAttributesRequest, - ActivityTaskStartedAttributesRequestTypedDict, - ) from .activitytaskstartedattributesresponse import ( ActivityTaskStartedAttributesResponse, ActivityTaskStartedAttributesResponseTypedDict, ) - from .activitytaskstartedrequest import ( - ActivityTaskStartedRequest, - ActivityTaskStartedRequestTypedDict, - ) from .activitytaskstartedresponse import ( ActivityTaskStartedResponse, ActivityTaskStartedResponseTypedDict, @@ -595,26 +571,14 @@ CustomTaskCanceledAttributes, CustomTaskCanceledAttributesTypedDict, ) - from .customtaskcanceledrequest import ( - CustomTaskCanceledRequest, - CustomTaskCanceledRequestTypedDict, - ) from .customtaskcanceledresponse import ( CustomTaskCanceledResponse, CustomTaskCanceledResponseTypedDict, ) - from .customtaskcompletedattributesrequest import ( - CustomTaskCompletedAttributesRequest, - CustomTaskCompletedAttributesRequestTypedDict, - ) from .customtaskcompletedattributesresponse import ( CustomTaskCompletedAttributesResponse, CustomTaskCompletedAttributesResponseTypedDict, ) - from .customtaskcompletedrequest import ( - CustomTaskCompletedRequest, - CustomTaskCompletedRequestTypedDict, - ) from .customtaskcompletedresponse import ( CustomTaskCompletedResponse, CustomTaskCompletedResponseTypedDict, @@ -623,47 +587,25 @@ CustomTaskFailedAttributes, CustomTaskFailedAttributesTypedDict, ) - from .customtaskfailedrequest import ( - CustomTaskFailedRequest, - CustomTaskFailedRequestTypedDict, - ) from .customtaskfailedresponse import ( CustomTaskFailedResponse, CustomTaskFailedResponseTypedDict, ) - from .customtaskinprogressattributesrequest import ( - CustomTaskInProgressAttributesRequest, - CustomTaskInProgressAttributesRequestPayload, - CustomTaskInProgressAttributesRequestPayloadTypedDict, - CustomTaskInProgressAttributesRequestTypedDict, - ) from .customtaskinprogressattributesresponse import ( CustomTaskInProgressAttributesResponse, - CustomTaskInProgressAttributesResponsePayload, - CustomTaskInProgressAttributesResponsePayloadTypedDict, CustomTaskInProgressAttributesResponseTypedDict, - UnknownCustomTaskInProgressAttributesResponsePayload, - ) - from .customtaskinprogressrequest import ( - CustomTaskInProgressRequest, - CustomTaskInProgressRequestTypedDict, + Payload, + PayloadTypedDict, + UnknownPayload, ) from .customtaskinprogressresponse import ( CustomTaskInProgressResponse, CustomTaskInProgressResponseTypedDict, ) - from .customtaskstartedattributesrequest import ( - CustomTaskStartedAttributesRequest, - CustomTaskStartedAttributesRequestTypedDict, - ) from .customtaskstartedattributesresponse import ( CustomTaskStartedAttributesResponse, CustomTaskStartedAttributesResponseTypedDict, ) - from .customtaskstartedrequest import ( - CustomTaskStartedRequest, - CustomTaskStartedRequestTypedDict, - ) from .customtaskstartedresponse import ( CustomTaskStartedResponse, CustomTaskStartedResponseTypedDict, @@ -672,10 +614,6 @@ CustomTaskTimedOutAttributes, CustomTaskTimedOutAttributesTypedDict, ) - from .customtasktimedoutrequest import ( - CustomTaskTimedOutRequest, - CustomTaskTimedOutRequestTypedDict, - ) from .customtasktimedoutresponse import ( CustomTaskTimedOutResponse, CustomTaskTimedOutResponseTypedDict, @@ -1160,12 +1098,6 @@ ) from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict - from .jsonpatchpayloadrequest import ( - JSONPatchPayloadRequest, - JSONPatchPayloadRequestTypedDict, - JSONPatchPayloadRequestValue, - JSONPatchPayloadRequestValueTypedDict, - ) from .jsonpatchpayloadresponse import ( JSONPatchPayloadResponse, JSONPatchPayloadResponseTypedDict, @@ -1175,7 +1107,6 @@ ) from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict - from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict from .jsonschema import JSONSchema, JSONSchemaTypedDict from .judge import ( @@ -1977,69 +1908,27 @@ WorkflowCodeDefinition, WorkflowCodeDefinitionTypedDict, ) - from .workfloweventbatchrequest import ( - WorkflowEventBatchRequest, - WorkflowEventBatchRequestEvent, - WorkflowEventBatchRequestEventTypedDict, - WorkflowEventBatchRequestTypedDict, - ) - from .workfloweventbatchresponse import ( - WorkflowEventBatchResponse, - WorkflowEventBatchResponseStatus, - WorkflowEventBatchResponseTypedDict, - ) - from .workfloweventrequest import ( - WorkflowEventRequest, - WorkflowEventRequestEvent, - WorkflowEventRequestEventTypedDict, - WorkflowEventRequestTypedDict, - ) - from .workfloweventresponse import ( - WorkflowEventResponse, - WorkflowEventResponseStatus, - WorkflowEventResponseTypedDict, - ) from .workfloweventtype import WorkflowEventType from .workflowexecutioncanceledattributes import ( WorkflowExecutionCanceledAttributes, WorkflowExecutionCanceledAttributesTypedDict, ) - from .workflowexecutioncanceledrequest import ( - WorkflowExecutionCanceledRequest, - WorkflowExecutionCanceledRequestTypedDict, - ) from .workflowexecutioncanceledresponse import ( WorkflowExecutionCanceledResponse, WorkflowExecutionCanceledResponseTypedDict, ) - from .workflowexecutioncompletedattributesrequest import ( - WorkflowExecutionCompletedAttributesRequest, - WorkflowExecutionCompletedAttributesRequestTypedDict, - ) from .workflowexecutioncompletedattributesresponse import ( WorkflowExecutionCompletedAttributesResponse, WorkflowExecutionCompletedAttributesResponseTypedDict, ) - from .workflowexecutioncompletedrequest import ( - WorkflowExecutionCompletedRequest, - WorkflowExecutionCompletedRequestTypedDict, - ) from .workflowexecutioncompletedresponse import ( WorkflowExecutionCompletedResponse, WorkflowExecutionCompletedResponseTypedDict, ) - from .workflowexecutioncontinuedasnewattributesrequest import ( - WorkflowExecutionContinuedAsNewAttributesRequest, - WorkflowExecutionContinuedAsNewAttributesRequestTypedDict, - ) from .workflowexecutioncontinuedasnewattributesresponse import ( WorkflowExecutionContinuedAsNewAttributesResponse, WorkflowExecutionContinuedAsNewAttributesResponseTypedDict, ) - from .workflowexecutioncontinuedasnewrequest import ( - WorkflowExecutionContinuedAsNewRequest, - WorkflowExecutionContinuedAsNewRequestTypedDict, - ) from .workflowexecutioncontinuedasnewresponse import ( WorkflowExecutionContinuedAsNewResponse, WorkflowExecutionContinuedAsNewResponseTypedDict, @@ -2048,10 +1937,6 @@ WorkflowExecutionFailedAttributes, WorkflowExecutionFailedAttributesTypedDict, ) - from .workflowexecutionfailedrequest import ( - WorkflowExecutionFailedRequest, - WorkflowExecutionFailedRequestTypedDict, - ) from .workflowexecutionfailedresponse import ( WorkflowExecutionFailedResponse, WorkflowExecutionFailedResponseTypedDict, @@ -2072,18 +1957,10 @@ WorkflowExecutionResponse, WorkflowExecutionResponseTypedDict, ) - from .workflowexecutionstartedattributesrequest import ( - WorkflowExecutionStartedAttributesRequest, - WorkflowExecutionStartedAttributesRequestTypedDict, - ) from .workflowexecutionstartedattributesresponse import ( WorkflowExecutionStartedAttributesResponse, WorkflowExecutionStartedAttributesResponseTypedDict, ) - from .workflowexecutionstartedrequest import ( - WorkflowExecutionStartedRequest, - WorkflowExecutionStartedRequestTypedDict, - ) from .workflowexecutionstartedresponse import ( WorkflowExecutionStartedResponse, WorkflowExecutionStartedResponseTypedDict, @@ -2162,10 +2039,6 @@ WorkflowTaskFailedAttributes, WorkflowTaskFailedAttributesTypedDict, ) - from .workflowtaskfailedrequest import ( - WorkflowTaskFailedRequest, - WorkflowTaskFailedRequestTypedDict, - ) from .workflowtaskfailedresponse import ( WorkflowTaskFailedResponse, WorkflowTaskFailedResponseTypedDict, @@ -2174,10 +2047,6 @@ WorkflowTaskTimedOutAttributes, WorkflowTaskTimedOutAttributesTypedDict, ) - from .workflowtasktimedoutrequest import ( - WorkflowTaskTimedOutRequest, - WorkflowTaskTimedOutRequestTypedDict, - ) from .workflowtasktimedoutresponse import ( WorkflowTaskTimedOutResponse, WorkflowTaskTimedOutResponseTypedDict, @@ -2206,32 +2075,20 @@ "APIEndpoint", "APIKeyAuth", "APIKeyAuthTypedDict", - "ActivityTaskCompletedAttributesRequest", - "ActivityTaskCompletedAttributesRequestTypedDict", "ActivityTaskCompletedAttributesResponse", "ActivityTaskCompletedAttributesResponseTypedDict", - "ActivityTaskCompletedRequest", - "ActivityTaskCompletedRequestTypedDict", "ActivityTaskCompletedResponse", "ActivityTaskCompletedResponseTypedDict", "ActivityTaskFailedAttributes", "ActivityTaskFailedAttributesTypedDict", - "ActivityTaskFailedRequest", - "ActivityTaskFailedRequestTypedDict", "ActivityTaskFailedResponse", "ActivityTaskFailedResponseTypedDict", "ActivityTaskRetryingAttributes", "ActivityTaskRetryingAttributesTypedDict", - "ActivityTaskRetryingRequest", - "ActivityTaskRetryingRequestTypedDict", "ActivityTaskRetryingResponse", "ActivityTaskRetryingResponseTypedDict", - "ActivityTaskStartedAttributesRequest", - "ActivityTaskStartedAttributesRequestTypedDict", "ActivityTaskStartedAttributesResponse", "ActivityTaskStartedAttributesResponseTypedDict", - "ActivityTaskStartedRequest", - "ActivityTaskStartedRequestTypedDict", "ActivityTaskStartedResponse", "ActivityTaskStartedResponseTypedDict", "Agent", @@ -2592,48 +2449,26 @@ "CustomConnectorTypedDict", "CustomTaskCanceledAttributes", "CustomTaskCanceledAttributesTypedDict", - "CustomTaskCanceledRequest", - "CustomTaskCanceledRequestTypedDict", "CustomTaskCanceledResponse", "CustomTaskCanceledResponseTypedDict", - "CustomTaskCompletedAttributesRequest", - "CustomTaskCompletedAttributesRequestTypedDict", "CustomTaskCompletedAttributesResponse", "CustomTaskCompletedAttributesResponseTypedDict", - "CustomTaskCompletedRequest", - "CustomTaskCompletedRequestTypedDict", "CustomTaskCompletedResponse", "CustomTaskCompletedResponseTypedDict", "CustomTaskFailedAttributes", "CustomTaskFailedAttributesTypedDict", - "CustomTaskFailedRequest", - "CustomTaskFailedRequestTypedDict", "CustomTaskFailedResponse", "CustomTaskFailedResponseTypedDict", - "CustomTaskInProgressAttributesRequest", - "CustomTaskInProgressAttributesRequestPayload", - "CustomTaskInProgressAttributesRequestPayloadTypedDict", - "CustomTaskInProgressAttributesRequestTypedDict", "CustomTaskInProgressAttributesResponse", - "CustomTaskInProgressAttributesResponsePayload", - "CustomTaskInProgressAttributesResponsePayloadTypedDict", "CustomTaskInProgressAttributesResponseTypedDict", - "CustomTaskInProgressRequest", - "CustomTaskInProgressRequestTypedDict", "CustomTaskInProgressResponse", "CustomTaskInProgressResponseTypedDict", - "CustomTaskStartedAttributesRequest", - "CustomTaskStartedAttributesRequestTypedDict", "CustomTaskStartedAttributesResponse", "CustomTaskStartedAttributesResponseTypedDict", - "CustomTaskStartedRequest", - "CustomTaskStartedRequestTypedDict", "CustomTaskStartedResponse", "CustomTaskStartedResponseTypedDict", "CustomTaskTimedOutAttributes", "CustomTaskTimedOutAttributesTypedDict", - "CustomTaskTimedOutRequest", - "CustomTaskTimedOutRequestTypedDict", "CustomTaskTimedOutResponse", "CustomTaskTimedOutResponseTypedDict", "Dataset", @@ -2916,10 +2751,6 @@ "JSONPatchAddTypedDict", "JSONPatchAppend", "JSONPatchAppendTypedDict", - "JSONPatchPayloadRequest", - "JSONPatchPayloadRequestTypedDict", - "JSONPatchPayloadRequestValue", - "JSONPatchPayloadRequestValueTypedDict", "JSONPatchPayloadResponse", "JSONPatchPayloadResponseTypedDict", "JSONPatchPayloadResponseValue", @@ -2928,8 +2759,6 @@ "JSONPatchRemoveTypedDict", "JSONPatchReplace", "JSONPatchReplaceTypedDict", - "JSONPayloadRequest", - "JSONPayloadRequestTypedDict", "JSONPayloadResponse", "JSONPayloadResponseTypedDict", "JSONSchema", @@ -3191,6 +3020,8 @@ "PaginationInfoTypedDict", "PaginationResponse", "PaginationResponseTypedDict", + "Payload", + "PayloadTypedDict", "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest", "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequestTypedDict", "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest", @@ -3492,7 +3323,6 @@ "UnknownConnectorToolCallResponseContent", "UnknownContentChunk", "UnknownConversationEventsData", - "UnknownCustomTaskInProgressAttributesResponsePayload", "UnknownJSONPatchPayloadResponseValue", "UnknownJobsAPIRoutesFineTuningCancelFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningGetFineTuningJobResponse", @@ -3502,6 +3332,7 @@ "UnknownListFineTuningJobsResponseData", "UnknownModelConversationTool", "UnknownModelListData", + "UnknownPayload", "UnknownResponse", "UnknownResponseRetrieveModelV1ModelsModelIDGet", "UnknownSpeechV1AudioSpeechPostData", @@ -3588,47 +3419,21 @@ "WorkflowBasicDefinitionTypedDict", "WorkflowCodeDefinition", "WorkflowCodeDefinitionTypedDict", - "WorkflowEventBatchRequest", - "WorkflowEventBatchRequestEvent", - "WorkflowEventBatchRequestEventTypedDict", - "WorkflowEventBatchRequestTypedDict", - "WorkflowEventBatchResponse", - "WorkflowEventBatchResponseStatus", - "WorkflowEventBatchResponseTypedDict", - "WorkflowEventRequest", - "WorkflowEventRequestEvent", - "WorkflowEventRequestEventTypedDict", - "WorkflowEventRequestTypedDict", - "WorkflowEventResponse", - "WorkflowEventResponseStatus", - "WorkflowEventResponseTypedDict", "WorkflowEventType", "WorkflowExecutionCanceledAttributes", "WorkflowExecutionCanceledAttributesTypedDict", - "WorkflowExecutionCanceledRequest", - "WorkflowExecutionCanceledRequestTypedDict", "WorkflowExecutionCanceledResponse", "WorkflowExecutionCanceledResponseTypedDict", - "WorkflowExecutionCompletedAttributesRequest", - "WorkflowExecutionCompletedAttributesRequestTypedDict", "WorkflowExecutionCompletedAttributesResponse", "WorkflowExecutionCompletedAttributesResponseTypedDict", - "WorkflowExecutionCompletedRequest", - "WorkflowExecutionCompletedRequestTypedDict", "WorkflowExecutionCompletedResponse", "WorkflowExecutionCompletedResponseTypedDict", - "WorkflowExecutionContinuedAsNewAttributesRequest", - "WorkflowExecutionContinuedAsNewAttributesRequestTypedDict", "WorkflowExecutionContinuedAsNewAttributesResponse", "WorkflowExecutionContinuedAsNewAttributesResponseTypedDict", - "WorkflowExecutionContinuedAsNewRequest", - "WorkflowExecutionContinuedAsNewRequestTypedDict", "WorkflowExecutionContinuedAsNewResponse", "WorkflowExecutionContinuedAsNewResponseTypedDict", "WorkflowExecutionFailedAttributes", "WorkflowExecutionFailedAttributesTypedDict", - "WorkflowExecutionFailedRequest", - "WorkflowExecutionFailedRequestTypedDict", "WorkflowExecutionFailedResponse", "WorkflowExecutionFailedResponseTypedDict", "WorkflowExecutionListResponse", @@ -3639,12 +3444,8 @@ "WorkflowExecutionRequestTypedDict", "WorkflowExecutionResponse", "WorkflowExecutionResponseTypedDict", - "WorkflowExecutionStartedAttributesRequest", - "WorkflowExecutionStartedAttributesRequestTypedDict", "WorkflowExecutionStartedAttributesResponse", "WorkflowExecutionStartedAttributesResponseTypedDict", - "WorkflowExecutionStartedRequest", - "WorkflowExecutionStartedRequestTypedDict", "WorkflowExecutionStartedResponse", "WorkflowExecutionStartedResponseTypedDict", "WorkflowExecutionStatus", @@ -3690,14 +3491,10 @@ "WorkflowScheduleResponseTypedDict", "WorkflowTaskFailedAttributes", "WorkflowTaskFailedAttributesTypedDict", - "WorkflowTaskFailedRequest", - "WorkflowTaskFailedRequestTypedDict", "WorkflowTaskFailedResponse", "WorkflowTaskFailedResponseTypedDict", "WorkflowTaskTimedOutAttributes", "WorkflowTaskTimedOutAttributesTypedDict", - "WorkflowTaskTimedOutRequest", - "WorkflowTaskTimedOutRequestTypedDict", "WorkflowTaskTimedOutResponse", "WorkflowTaskTimedOutResponseTypedDict", "WorkflowType", @@ -3713,32 +3510,20 @@ ] _dynamic_imports: dict[str, str] = { - "ActivityTaskCompletedAttributesRequest": ".activitytaskcompletedattributesrequest", - "ActivityTaskCompletedAttributesRequestTypedDict": ".activitytaskcompletedattributesrequest", "ActivityTaskCompletedAttributesResponse": ".activitytaskcompletedattributesresponse", "ActivityTaskCompletedAttributesResponseTypedDict": ".activitytaskcompletedattributesresponse", - "ActivityTaskCompletedRequest": ".activitytaskcompletedrequest", - "ActivityTaskCompletedRequestTypedDict": ".activitytaskcompletedrequest", "ActivityTaskCompletedResponse": ".activitytaskcompletedresponse", "ActivityTaskCompletedResponseTypedDict": ".activitytaskcompletedresponse", "ActivityTaskFailedAttributes": ".activitytaskfailedattributes", "ActivityTaskFailedAttributesTypedDict": ".activitytaskfailedattributes", - "ActivityTaskFailedRequest": ".activitytaskfailedrequest", - "ActivityTaskFailedRequestTypedDict": ".activitytaskfailedrequest", "ActivityTaskFailedResponse": ".activitytaskfailedresponse", "ActivityTaskFailedResponseTypedDict": ".activitytaskfailedresponse", "ActivityTaskRetryingAttributes": ".activitytaskretryingattributes", "ActivityTaskRetryingAttributesTypedDict": ".activitytaskretryingattributes", - "ActivityTaskRetryingRequest": ".activitytaskretryingrequest", - "ActivityTaskRetryingRequestTypedDict": ".activitytaskretryingrequest", "ActivityTaskRetryingResponse": ".activitytaskretryingresponse", "ActivityTaskRetryingResponseTypedDict": ".activitytaskretryingresponse", - "ActivityTaskStartedAttributesRequest": ".activitytaskstartedattributesrequest", - "ActivityTaskStartedAttributesRequestTypedDict": ".activitytaskstartedattributesrequest", "ActivityTaskStartedAttributesResponse": ".activitytaskstartedattributesresponse", "ActivityTaskStartedAttributesResponseTypedDict": ".activitytaskstartedattributesresponse", - "ActivityTaskStartedRequest": ".activitytaskstartedrequest", - "ActivityTaskStartedRequestTypedDict": ".activitytaskstartedrequest", "ActivityTaskStartedResponse": ".activitytaskstartedresponse", "ActivityTaskStartedResponseTypedDict": ".activitytaskstartedresponse", "Agent": ".agent", @@ -4111,49 +3896,29 @@ "UnknownAuthorization": ".customconnector", "CustomTaskCanceledAttributes": ".customtaskcanceledattributes", "CustomTaskCanceledAttributesTypedDict": ".customtaskcanceledattributes", - "CustomTaskCanceledRequest": ".customtaskcanceledrequest", - "CustomTaskCanceledRequestTypedDict": ".customtaskcanceledrequest", "CustomTaskCanceledResponse": ".customtaskcanceledresponse", "CustomTaskCanceledResponseTypedDict": ".customtaskcanceledresponse", - "CustomTaskCompletedAttributesRequest": ".customtaskcompletedattributesrequest", - "CustomTaskCompletedAttributesRequestTypedDict": ".customtaskcompletedattributesrequest", "CustomTaskCompletedAttributesResponse": ".customtaskcompletedattributesresponse", "CustomTaskCompletedAttributesResponseTypedDict": ".customtaskcompletedattributesresponse", - "CustomTaskCompletedRequest": ".customtaskcompletedrequest", - "CustomTaskCompletedRequestTypedDict": ".customtaskcompletedrequest", "CustomTaskCompletedResponse": ".customtaskcompletedresponse", "CustomTaskCompletedResponseTypedDict": ".customtaskcompletedresponse", "CustomTaskFailedAttributes": ".customtaskfailedattributes", "CustomTaskFailedAttributesTypedDict": ".customtaskfailedattributes", - "CustomTaskFailedRequest": ".customtaskfailedrequest", - "CustomTaskFailedRequestTypedDict": ".customtaskfailedrequest", "CustomTaskFailedResponse": ".customtaskfailedresponse", "CustomTaskFailedResponseTypedDict": ".customtaskfailedresponse", - "CustomTaskInProgressAttributesRequest": ".customtaskinprogressattributesrequest", - "CustomTaskInProgressAttributesRequestPayload": ".customtaskinprogressattributesrequest", - "CustomTaskInProgressAttributesRequestPayloadTypedDict": ".customtaskinprogressattributesrequest", - "CustomTaskInProgressAttributesRequestTypedDict": ".customtaskinprogressattributesrequest", "CustomTaskInProgressAttributesResponse": ".customtaskinprogressattributesresponse", - "CustomTaskInProgressAttributesResponsePayload": ".customtaskinprogressattributesresponse", - "CustomTaskInProgressAttributesResponsePayloadTypedDict": ".customtaskinprogressattributesresponse", "CustomTaskInProgressAttributesResponseTypedDict": ".customtaskinprogressattributesresponse", - "UnknownCustomTaskInProgressAttributesResponsePayload": ".customtaskinprogressattributesresponse", - "CustomTaskInProgressRequest": ".customtaskinprogressrequest", - "CustomTaskInProgressRequestTypedDict": ".customtaskinprogressrequest", + "Payload": ".customtaskinprogressattributesresponse", + "PayloadTypedDict": ".customtaskinprogressattributesresponse", + "UnknownPayload": ".customtaskinprogressattributesresponse", "CustomTaskInProgressResponse": ".customtaskinprogressresponse", "CustomTaskInProgressResponseTypedDict": ".customtaskinprogressresponse", - "CustomTaskStartedAttributesRequest": ".customtaskstartedattributesrequest", - "CustomTaskStartedAttributesRequestTypedDict": ".customtaskstartedattributesrequest", "CustomTaskStartedAttributesResponse": ".customtaskstartedattributesresponse", "CustomTaskStartedAttributesResponseTypedDict": ".customtaskstartedattributesresponse", - "CustomTaskStartedRequest": ".customtaskstartedrequest", - "CustomTaskStartedRequestTypedDict": ".customtaskstartedrequest", "CustomTaskStartedResponse": ".customtaskstartedresponse", "CustomTaskStartedResponseTypedDict": ".customtaskstartedresponse", "CustomTaskTimedOutAttributes": ".customtasktimedoutattributes", "CustomTaskTimedOutAttributesTypedDict": ".customtasktimedoutattributes", - "CustomTaskTimedOutRequest": ".customtasktimedoutrequest", - "CustomTaskTimedOutRequestTypedDict": ".customtasktimedoutrequest", "CustomTaskTimedOutResponse": ".customtasktimedoutresponse", "CustomTaskTimedOutResponseTypedDict": ".customtasktimedoutresponse", "Dataset": ".dataset", @@ -4483,10 +4248,6 @@ "JSONPatchAddTypedDict": ".jsonpatchadd", "JSONPatchAppend": ".jsonpatchappend", "JSONPatchAppendTypedDict": ".jsonpatchappend", - "JSONPatchPayloadRequest": ".jsonpatchpayloadrequest", - "JSONPatchPayloadRequestTypedDict": ".jsonpatchpayloadrequest", - "JSONPatchPayloadRequestValue": ".jsonpatchpayloadrequest", - "JSONPatchPayloadRequestValueTypedDict": ".jsonpatchpayloadrequest", "JSONPatchPayloadResponse": ".jsonpatchpayloadresponse", "JSONPatchPayloadResponseTypedDict": ".jsonpatchpayloadresponse", "JSONPatchPayloadResponseValue": ".jsonpatchpayloadresponse", @@ -4496,8 +4257,6 @@ "JSONPatchRemoveTypedDict": ".jsonpatchremove", "JSONPatchReplace": ".jsonpatchreplace", "JSONPatchReplaceTypedDict": ".jsonpatchreplace", - "JSONPayloadRequest": ".jsonpayloadrequest", - "JSONPayloadRequestTypedDict": ".jsonpayloadrequest", "JSONPayloadResponse": ".jsonpayloadresponse", "JSONPayloadResponseTypedDict": ".jsonpayloadresponse", "JSONSchema": ".jsonschema", @@ -5093,47 +4852,21 @@ "WorkflowBasicDefinitionTypedDict": ".workflowbasicdefinition", "WorkflowCodeDefinition": ".workflowcodedefinition", "WorkflowCodeDefinitionTypedDict": ".workflowcodedefinition", - "WorkflowEventBatchRequest": ".workfloweventbatchrequest", - "WorkflowEventBatchRequestEvent": ".workfloweventbatchrequest", - "WorkflowEventBatchRequestEventTypedDict": ".workfloweventbatchrequest", - "WorkflowEventBatchRequestTypedDict": ".workfloweventbatchrequest", - "WorkflowEventBatchResponse": ".workfloweventbatchresponse", - "WorkflowEventBatchResponseStatus": ".workfloweventbatchresponse", - "WorkflowEventBatchResponseTypedDict": ".workfloweventbatchresponse", - "WorkflowEventRequest": ".workfloweventrequest", - "WorkflowEventRequestEvent": ".workfloweventrequest", - "WorkflowEventRequestEventTypedDict": ".workfloweventrequest", - "WorkflowEventRequestTypedDict": ".workfloweventrequest", - "WorkflowEventResponse": ".workfloweventresponse", - "WorkflowEventResponseStatus": ".workfloweventresponse", - "WorkflowEventResponseTypedDict": ".workfloweventresponse", "WorkflowEventType": ".workfloweventtype", "WorkflowExecutionCanceledAttributes": ".workflowexecutioncanceledattributes", "WorkflowExecutionCanceledAttributesTypedDict": ".workflowexecutioncanceledattributes", - "WorkflowExecutionCanceledRequest": ".workflowexecutioncanceledrequest", - "WorkflowExecutionCanceledRequestTypedDict": ".workflowexecutioncanceledrequest", "WorkflowExecutionCanceledResponse": ".workflowexecutioncanceledresponse", "WorkflowExecutionCanceledResponseTypedDict": ".workflowexecutioncanceledresponse", - "WorkflowExecutionCompletedAttributesRequest": ".workflowexecutioncompletedattributesrequest", - "WorkflowExecutionCompletedAttributesRequestTypedDict": ".workflowexecutioncompletedattributesrequest", "WorkflowExecutionCompletedAttributesResponse": ".workflowexecutioncompletedattributesresponse", "WorkflowExecutionCompletedAttributesResponseTypedDict": ".workflowexecutioncompletedattributesresponse", - "WorkflowExecutionCompletedRequest": ".workflowexecutioncompletedrequest", - "WorkflowExecutionCompletedRequestTypedDict": ".workflowexecutioncompletedrequest", "WorkflowExecutionCompletedResponse": ".workflowexecutioncompletedresponse", "WorkflowExecutionCompletedResponseTypedDict": ".workflowexecutioncompletedresponse", - "WorkflowExecutionContinuedAsNewAttributesRequest": ".workflowexecutioncontinuedasnewattributesrequest", - "WorkflowExecutionContinuedAsNewAttributesRequestTypedDict": ".workflowexecutioncontinuedasnewattributesrequest", "WorkflowExecutionContinuedAsNewAttributesResponse": ".workflowexecutioncontinuedasnewattributesresponse", "WorkflowExecutionContinuedAsNewAttributesResponseTypedDict": ".workflowexecutioncontinuedasnewattributesresponse", - "WorkflowExecutionContinuedAsNewRequest": ".workflowexecutioncontinuedasnewrequest", - "WorkflowExecutionContinuedAsNewRequestTypedDict": ".workflowexecutioncontinuedasnewrequest", "WorkflowExecutionContinuedAsNewResponse": ".workflowexecutioncontinuedasnewresponse", "WorkflowExecutionContinuedAsNewResponseTypedDict": ".workflowexecutioncontinuedasnewresponse", "WorkflowExecutionFailedAttributes": ".workflowexecutionfailedattributes", "WorkflowExecutionFailedAttributesTypedDict": ".workflowexecutionfailedattributes", - "WorkflowExecutionFailedRequest": ".workflowexecutionfailedrequest", - "WorkflowExecutionFailedRequestTypedDict": ".workflowexecutionfailedrequest", "WorkflowExecutionFailedResponse": ".workflowexecutionfailedresponse", "WorkflowExecutionFailedResponseTypedDict": ".workflowexecutionfailedresponse", "WorkflowExecutionListResponse": ".workflowexecutionlistresponse", @@ -5144,12 +4877,8 @@ "WorkflowExecutionRequestTypedDict": ".workflowexecutionrequest", "WorkflowExecutionResponse": ".workflowexecutionresponse", "WorkflowExecutionResponseTypedDict": ".workflowexecutionresponse", - "WorkflowExecutionStartedAttributesRequest": ".workflowexecutionstartedattributesrequest", - "WorkflowExecutionStartedAttributesRequestTypedDict": ".workflowexecutionstartedattributesrequest", "WorkflowExecutionStartedAttributesResponse": ".workflowexecutionstartedattributesresponse", "WorkflowExecutionStartedAttributesResponseTypedDict": ".workflowexecutionstartedattributesresponse", - "WorkflowExecutionStartedRequest": ".workflowexecutionstartedrequest", - "WorkflowExecutionStartedRequestTypedDict": ".workflowexecutionstartedrequest", "WorkflowExecutionStartedResponse": ".workflowexecutionstartedresponse", "WorkflowExecutionStartedResponseTypedDict": ".workflowexecutionstartedresponse", "WorkflowExecutionStatus": ".workflowexecutionstatus", @@ -5195,14 +4924,10 @@ "WorkflowScheduleResponseTypedDict": ".workflowscheduleresponse", "WorkflowTaskFailedAttributes": ".workflowtaskfailedattributes", "WorkflowTaskFailedAttributesTypedDict": ".workflowtaskfailedattributes", - "WorkflowTaskFailedRequest": ".workflowtaskfailedrequest", - "WorkflowTaskFailedRequestTypedDict": ".workflowtaskfailedrequest", "WorkflowTaskFailedResponse": ".workflowtaskfailedresponse", "WorkflowTaskFailedResponseTypedDict": ".workflowtaskfailedresponse", "WorkflowTaskTimedOutAttributes": ".workflowtasktimedoutattributes", "WorkflowTaskTimedOutAttributesTypedDict": ".workflowtasktimedoutattributes", - "WorkflowTaskTimedOutRequest": ".workflowtasktimedoutrequest", - "WorkflowTaskTimedOutRequestTypedDict": ".workflowtasktimedoutrequest", "WorkflowTaskTimedOutResponse": ".workflowtasktimedoutresponse", "WorkflowTaskTimedOutResponseTypedDict": ".workflowtasktimedoutresponse", "WorkflowType": ".workflowtype", diff --git a/src/mistralai/client/models/activitytaskcompletedattributesrequest.py b/src/mistralai/client/models/activitytaskcompletedattributesrequest.py deleted file mode 100644 index 560310cf..00000000 --- a/src/mistralai/client/models/activitytaskcompletedattributesrequest.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: a9e5ef17794f - -from __future__ import annotations -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class ActivityTaskCompletedAttributesRequestTypedDict(TypedDict): - r"""Attributes for activity task completed events.""" - - task_id: str - r"""Unique identifier for the activity task within the workflow.""" - activity_name: str - r"""The registered name of the activity being executed.""" - result: JSONPayloadRequestTypedDict - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - -class ActivityTaskCompletedAttributesRequest(BaseModel): - r"""Attributes for activity task completed events.""" - - task_id: str - r"""Unique identifier for the activity task within the workflow.""" - - activity_name: str - r"""The registered name of the activity being executed.""" - - result: JSONPayloadRequest - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ diff --git a/src/mistralai/client/models/activitytaskcompletedrequest.py b/src/mistralai/client/models/activitytaskcompletedrequest.py deleted file mode 100644 index fae82f66..00000000 --- a/src/mistralai/client/models/activitytaskcompletedrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: d051525d65ba - -from __future__ import annotations -from .activitytaskcompletedattributesrequest import ( - ActivityTaskCompletedAttributesRequest, - ActivityTaskCompletedAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class ActivityTaskCompletedRequestTypedDict(TypedDict): - r"""Emitted when an activity task completes successfully. - - Contains timing information about the successful execution. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: ActivityTaskCompletedAttributesRequestTypedDict - r"""Attributes for activity task completed events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["ACTIVITY_TASK_COMPLETED"] - r"""Event type discriminator.""" - - -class ActivityTaskCompletedRequest(BaseModel): - r"""Emitted when an activity task completes successfully. - - Contains timing information about the successful execution. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: ActivityTaskCompletedAttributesRequest - r"""Attributes for activity task completed events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["ACTIVITY_TASK_COMPLETED"]], - AfterValidator(validate_const("ACTIVITY_TASK_COMPLETED")), - ], - pydantic.Field(alias="event_type"), - ] = "ACTIVITY_TASK_COMPLETED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - ActivityTaskCompletedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/activitytaskfailedrequest.py b/src/mistralai/client/models/activitytaskfailedrequest.py deleted file mode 100644 index 1d1e9226..00000000 --- a/src/mistralai/client/models/activitytaskfailedrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 1d4b5b52ae29 - -from __future__ import annotations -from .activitytaskfailedattributes import ( - ActivityTaskFailedAttributes, - ActivityTaskFailedAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class ActivityTaskFailedRequestTypedDict(TypedDict): - r"""Emitted when an activity task fails after exhausting all retry attempts. - - This is a terminal event indicating the activity could not complete successfully. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: ActivityTaskFailedAttributesTypedDict - r"""Attributes for activity task failed events (final failure after all retries).""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["ACTIVITY_TASK_FAILED"] - r"""Event type discriminator.""" - - -class ActivityTaskFailedRequest(BaseModel): - r"""Emitted when an activity task fails after exhausting all retry attempts. - - This is a terminal event indicating the activity could not complete successfully. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: ActivityTaskFailedAttributes - r"""Attributes for activity task failed events (final failure after all retries).""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["ACTIVITY_TASK_FAILED"]], - AfterValidator(validate_const("ACTIVITY_TASK_FAILED")), - ], - pydantic.Field(alias="event_type"), - ] = "ACTIVITY_TASK_FAILED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - ActivityTaskFailedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/activitytaskretryingrequest.py b/src/mistralai/client/models/activitytaskretryingrequest.py deleted file mode 100644 index 8c4d84f9..00000000 --- a/src/mistralai/client/models/activitytaskretryingrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 6f2e394e1e75 - -from __future__ import annotations -from .activitytaskretryingattributes import ( - ActivityTaskRetryingAttributes, - ActivityTaskRetryingAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class ActivityTaskRetryingRequestTypedDict(TypedDict): - r"""Emitted when an activity task fails and will be retried. - - Contains information about the failed attempt and the error that occurred. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: ActivityTaskRetryingAttributesTypedDict - r"""Attributes for activity task retrying events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["ACTIVITY_TASK_RETRYING"] - r"""Event type discriminator.""" - - -class ActivityTaskRetryingRequest(BaseModel): - r"""Emitted when an activity task fails and will be retried. - - Contains information about the failed attempt and the error that occurred. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: ActivityTaskRetryingAttributes - r"""Attributes for activity task retrying events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["ACTIVITY_TASK_RETRYING"]], - AfterValidator(validate_const("ACTIVITY_TASK_RETRYING")), - ], - pydantic.Field(alias="event_type"), - ] = "ACTIVITY_TASK_RETRYING" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - ActivityTaskRetryingRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/activitytaskstartedattributesrequest.py b/src/mistralai/client/models/activitytaskstartedattributesrequest.py deleted file mode 100644 index dfa3fa04..00000000 --- a/src/mistralai/client/models/activitytaskstartedattributesrequest.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 51b3e5622e0b - -from __future__ import annotations -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class ActivityTaskStartedAttributesRequestTypedDict(TypedDict): - r"""Attributes for activity task started events.""" - - task_id: str - r"""Unique identifier for the activity task within the workflow.""" - activity_name: str - r"""The registered name of the activity being executed.""" - input: JSONPayloadRequestTypedDict - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - -class ActivityTaskStartedAttributesRequest(BaseModel): - r"""Attributes for activity task started events.""" - - task_id: str - r"""Unique identifier for the activity task within the workflow.""" - - activity_name: str - r"""The registered name of the activity being executed.""" - - input: JSONPayloadRequest - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ diff --git a/src/mistralai/client/models/activitytaskstartedrequest.py b/src/mistralai/client/models/activitytaskstartedrequest.py deleted file mode 100644 index 503b3998..00000000 --- a/src/mistralai/client/models/activitytaskstartedrequest.py +++ /dev/null @@ -1,122 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: aa5813a6903a - -from __future__ import annotations -from .activitytaskstartedattributesrequest import ( - ActivityTaskStartedAttributesRequest, - ActivityTaskStartedAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class ActivityTaskStartedRequestTypedDict(TypedDict): - r"""Emitted when an activity task begins execution. - - This is the first event for an activity, emitted on the first attempt only. - Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: ActivityTaskStartedAttributesRequestTypedDict - r"""Attributes for activity task started events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["ACTIVITY_TASK_STARTED"] - r"""Event type discriminator.""" - - -class ActivityTaskStartedRequest(BaseModel): - r"""Emitted when an activity task begins execution. - - This is the first event for an activity, emitted on the first attempt only. - Subsequent retry attempts emit ACTIVITY_TASK_RETRYING instead. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: ActivityTaskStartedAttributesRequest - r"""Attributes for activity task started events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["ACTIVITY_TASK_STARTED"]], - AfterValidator(validate_const("ACTIVITY_TASK_STARTED")), - ], - pydantic.Field(alias="event_type"), - ] = "ACTIVITY_TASK_STARTED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - ActivityTaskStartedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/customtaskcanceledrequest.py b/src/mistralai/client/models/customtaskcanceledrequest.py deleted file mode 100644 index 0cb82aea..00000000 --- a/src/mistralai/client/models/customtaskcanceledrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 4b4f6b8c8ffd - -from __future__ import annotations -from .customtaskcanceledattributes import ( - CustomTaskCanceledAttributes, - CustomTaskCanceledAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CustomTaskCanceledRequestTypedDict(TypedDict): - r"""Emitted when a custom task is canceled. - - Indicates the task was explicitly stopped before completion. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: CustomTaskCanceledAttributesTypedDict - r"""Attributes for custom task canceled events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["CUSTOM_TASK_CANCELED"] - r"""Event type discriminator.""" - - -class CustomTaskCanceledRequest(BaseModel): - r"""Emitted when a custom task is canceled. - - Indicates the task was explicitly stopped before completion. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: CustomTaskCanceledAttributes - r"""Attributes for custom task canceled events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["CUSTOM_TASK_CANCELED"]], - AfterValidator(validate_const("CUSTOM_TASK_CANCELED")), - ], - pydantic.Field(alias="event_type"), - ] = "CUSTOM_TASK_CANCELED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - CustomTaskCanceledRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/customtaskcompletedattributesrequest.py b/src/mistralai/client/models/customtaskcompletedattributesrequest.py deleted file mode 100644 index 5e344a32..00000000 --- a/src/mistralai/client/models/customtaskcompletedattributesrequest.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 9ec058aedb96 - -from __future__ import annotations -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class CustomTaskCompletedAttributesRequestTypedDict(TypedDict): - r"""Attributes for custom task completed events.""" - - custom_task_id: str - r"""Unique identifier for the custom task within the workflow.""" - custom_task_type: str - r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - payload: JSONPayloadRequestTypedDict - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - -class CustomTaskCompletedAttributesRequest(BaseModel): - r"""Attributes for custom task completed events.""" - - custom_task_id: str - r"""Unique identifier for the custom task within the workflow.""" - - custom_task_type: str - r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - - payload: JSONPayloadRequest - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ diff --git a/src/mistralai/client/models/customtaskcompletedrequest.py b/src/mistralai/client/models/customtaskcompletedrequest.py deleted file mode 100644 index eee10e8e..00000000 --- a/src/mistralai/client/models/customtaskcompletedrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: ca7326e72707 - -from __future__ import annotations -from .customtaskcompletedattributesrequest import ( - CustomTaskCompletedAttributesRequest, - CustomTaskCompletedAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CustomTaskCompletedRequestTypedDict(TypedDict): - r"""Emitted when a custom task completes successfully. - - Contains the final result of the task execution. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: CustomTaskCompletedAttributesRequestTypedDict - r"""Attributes for custom task completed events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["CUSTOM_TASK_COMPLETED"] - r"""Event type discriminator.""" - - -class CustomTaskCompletedRequest(BaseModel): - r"""Emitted when a custom task completes successfully. - - Contains the final result of the task execution. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: CustomTaskCompletedAttributesRequest - r"""Attributes for custom task completed events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["CUSTOM_TASK_COMPLETED"]], - AfterValidator(validate_const("CUSTOM_TASK_COMPLETED")), - ], - pydantic.Field(alias="event_type"), - ] = "CUSTOM_TASK_COMPLETED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - CustomTaskCompletedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/customtaskfailedrequest.py b/src/mistralai/client/models/customtaskfailedrequest.py deleted file mode 100644 index abf2d74f..00000000 --- a/src/mistralai/client/models/customtaskfailedrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 844b7e2b33de - -from __future__ import annotations -from .customtaskfailedattributes import ( - CustomTaskFailedAttributes, - CustomTaskFailedAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CustomTaskFailedRequestTypedDict(TypedDict): - r"""Emitted when a custom task fails. - - Contains details about the failure for debugging and error handling. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: CustomTaskFailedAttributesTypedDict - r"""Attributes for custom task failed events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["CUSTOM_TASK_FAILED"] - r"""Event type discriminator.""" - - -class CustomTaskFailedRequest(BaseModel): - r"""Emitted when a custom task fails. - - Contains details about the failure for debugging and error handling. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: CustomTaskFailedAttributes - r"""Attributes for custom task failed events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["CUSTOM_TASK_FAILED"]], - AfterValidator(validate_const("CUSTOM_TASK_FAILED")), - ], - pydantic.Field(alias="event_type"), - ] = "CUSTOM_TASK_FAILED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - CustomTaskFailedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/customtaskinprogressattributesrequest.py b/src/mistralai/client/models/customtaskinprogressattributesrequest.py deleted file mode 100644 index 5737a4e1..00000000 --- a/src/mistralai/client/models/customtaskinprogressattributesrequest.py +++ /dev/null @@ -1,55 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: d003c9954634 - -from __future__ import annotations -from .jsonpatchpayloadrequest import ( - JSONPatchPayloadRequest, - JSONPatchPayloadRequestTypedDict, -) -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel -from mistralai.client.utils import get_discriminator -from pydantic import Discriminator, Tag -from typing import Union -from typing_extensions import Annotated, TypeAliasType, TypedDict - - -CustomTaskInProgressAttributesRequestPayloadTypedDict = TypeAliasType( - "CustomTaskInProgressAttributesRequestPayloadTypedDict", - Union[JSONPayloadRequestTypedDict, JSONPatchPayloadRequestTypedDict], -) -r"""The current state or incremental update for the task.""" - - -CustomTaskInProgressAttributesRequestPayload = Annotated[ - Union[ - Annotated[JSONPayloadRequest, Tag("json")], - Annotated[JSONPatchPayloadRequest, Tag("json_patch")], - ], - Discriminator(lambda m: get_discriminator(m, "type", "type")), -] -r"""The current state or incremental update for the task.""" - - -class CustomTaskInProgressAttributesRequestTypedDict(TypedDict): - r"""Attributes for custom task in-progress events with streaming updates.""" - - custom_task_id: str - r"""Unique identifier for the custom task within the workflow.""" - custom_task_type: str - r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - payload: CustomTaskInProgressAttributesRequestPayloadTypedDict - r"""The current state or incremental update for the task.""" - - -class CustomTaskInProgressAttributesRequest(BaseModel): - r"""Attributes for custom task in-progress events with streaming updates.""" - - custom_task_id: str - r"""Unique identifier for the custom task within the workflow.""" - - custom_task_type: str - r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - - payload: CustomTaskInProgressAttributesRequestPayload - r"""The current state or incremental update for the task.""" diff --git a/src/mistralai/client/models/customtaskinprogressattributesresponse.py b/src/mistralai/client/models/customtaskinprogressattributesresponse.py index 9b5fd20a..45ee5e42 100644 --- a/src/mistralai/client/models/customtaskinprogressattributesresponse.py +++ b/src/mistralai/client/models/customtaskinprogressattributesresponse.py @@ -16,15 +16,15 @@ from typing_extensions import Annotated, TypeAliasType, TypedDict -CustomTaskInProgressAttributesResponsePayloadTypedDict = TypeAliasType( - "CustomTaskInProgressAttributesResponsePayloadTypedDict", +PayloadTypedDict = TypeAliasType( + "PayloadTypedDict", Union[JSONPayloadResponseTypedDict, JSONPatchPayloadResponseTypedDict], ) r"""The current state or incremental update for the task.""" -class UnknownCustomTaskInProgressAttributesResponsePayload(BaseModel): - r"""A CustomTaskInProgressAttributesResponsePayload variant the SDK doesn't recognize. Preserves the raw payload.""" +class UnknownPayload(BaseModel): + r"""A Payload variant the SDK doesn't recognize. Preserves the raw payload.""" type: Literal["UNKNOWN"] = "UNKNOWN" raw: Any @@ -33,25 +33,21 @@ class UnknownCustomTaskInProgressAttributesResponsePayload(BaseModel): model_config = ConfigDict(frozen=True) -_CUSTOM_TASK_IN_PROGRESS_ATTRIBUTES_RESPONSE_PAYLOAD_VARIANTS: dict[str, Any] = { +_PAYLOAD_VARIANTS: dict[str, Any] = { "json": JSONPayloadResponse, "json_patch": JSONPatchPayloadResponse, } -CustomTaskInProgressAttributesResponsePayload = Annotated[ - Union[ - JSONPayloadResponse, - JSONPatchPayloadResponse, - UnknownCustomTaskInProgressAttributesResponsePayload, - ], +Payload = Annotated[ + Union[JSONPayloadResponse, JSONPatchPayloadResponse, UnknownPayload], BeforeValidator( partial( parse_open_union, disc_key="type", - variants=_CUSTOM_TASK_IN_PROGRESS_ATTRIBUTES_RESPONSE_PAYLOAD_VARIANTS, - unknown_cls=UnknownCustomTaskInProgressAttributesResponsePayload, - union_name="CustomTaskInProgressAttributesResponsePayload", + variants=_PAYLOAD_VARIANTS, + unknown_cls=UnknownPayload, + union_name="Payload", ) ), ] @@ -65,7 +61,7 @@ class CustomTaskInProgressAttributesResponseTypedDict(TypedDict): r"""Unique identifier for the custom task within the workflow.""" custom_task_type: str r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - payload: CustomTaskInProgressAttributesResponsePayloadTypedDict + payload: PayloadTypedDict r"""The current state or incremental update for the task.""" @@ -78,5 +74,5 @@ class CustomTaskInProgressAttributesResponse(BaseModel): custom_task_type: str r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - payload: CustomTaskInProgressAttributesResponsePayload + payload: Payload r"""The current state or incremental update for the task.""" diff --git a/src/mistralai/client/models/customtaskinprogressrequest.py b/src/mistralai/client/models/customtaskinprogressrequest.py deleted file mode 100644 index c2c2faab..00000000 --- a/src/mistralai/client/models/customtaskinprogressrequest.py +++ /dev/null @@ -1,122 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: d62648fe4f1e - -from __future__ import annotations -from .customtaskinprogressattributesrequest import ( - CustomTaskInProgressAttributesRequest, - CustomTaskInProgressAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CustomTaskInProgressRequestTypedDict(TypedDict): - r"""Emitted during custom task execution to report progress. - - This event supports streaming updates via JSON or JSON Patch payloads, - enabling real-time progress tracking for long-running tasks. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: CustomTaskInProgressAttributesRequestTypedDict - r"""Attributes for custom task in-progress events with streaming updates.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["CUSTOM_TASK_IN_PROGRESS"] - r"""Event type discriminator.""" - - -class CustomTaskInProgressRequest(BaseModel): - r"""Emitted during custom task execution to report progress. - - This event supports streaming updates via JSON or JSON Patch payloads, - enabling real-time progress tracking for long-running tasks. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: CustomTaskInProgressAttributesRequest - r"""Attributes for custom task in-progress events with streaming updates.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["CUSTOM_TASK_IN_PROGRESS"]], - AfterValidator(validate_const("CUSTOM_TASK_IN_PROGRESS")), - ], - pydantic.Field(alias="event_type"), - ] = "CUSTOM_TASK_IN_PROGRESS" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - CustomTaskInProgressRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/customtaskstartedattributesrequest.py b/src/mistralai/client/models/customtaskstartedattributesrequest.py deleted file mode 100644 index db1ecbb6..00000000 --- a/src/mistralai/client/models/customtaskstartedattributesrequest.py +++ /dev/null @@ -1,55 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 23ea4ebe9e0b - -from __future__ import annotations -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class CustomTaskStartedAttributesRequestTypedDict(TypedDict): - r"""Attributes for custom task started events.""" - - custom_task_id: str - r"""Unique identifier for the custom task within the workflow.""" - custom_task_type: str - r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - payload: NotRequired[JSONPayloadRequestTypedDict] - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - -class CustomTaskStartedAttributesRequest(BaseModel): - r"""Attributes for custom task started events.""" - - custom_task_id: str - r"""Unique identifier for the custom task within the workflow.""" - - custom_task_type: str - r"""The type/category of the custom task (e.g., 'llm_call', 'api_request').""" - - payload: Optional[JSONPayloadRequest] = None - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["payload"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m diff --git a/src/mistralai/client/models/customtaskstartedrequest.py b/src/mistralai/client/models/customtaskstartedrequest.py deleted file mode 100644 index c4bb6c2a..00000000 --- a/src/mistralai/client/models/customtaskstartedrequest.py +++ /dev/null @@ -1,122 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 39792cc12bde - -from __future__ import annotations -from .customtaskstartedattributesrequest import ( - CustomTaskStartedAttributesRequest, - CustomTaskStartedAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CustomTaskStartedRequestTypedDict(TypedDict): - r"""Emitted when a custom task begins execution. - - Custom tasks represent user-defined units of work within a workflow, - such as LLM calls, API requests, or data processing steps. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: CustomTaskStartedAttributesRequestTypedDict - r"""Attributes for custom task started events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["CUSTOM_TASK_STARTED"] - r"""Event type discriminator.""" - - -class CustomTaskStartedRequest(BaseModel): - r"""Emitted when a custom task begins execution. - - Custom tasks represent user-defined units of work within a workflow, - such as LLM calls, API requests, or data processing steps. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: CustomTaskStartedAttributesRequest - r"""Attributes for custom task started events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["CUSTOM_TASK_STARTED"]], - AfterValidator(validate_const("CUSTOM_TASK_STARTED")), - ], - pydantic.Field(alias="event_type"), - ] = "CUSTOM_TASK_STARTED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - CustomTaskStartedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/customtasktimedoutrequest.py b/src/mistralai/client/models/customtasktimedoutrequest.py deleted file mode 100644 index def540f4..00000000 --- a/src/mistralai/client/models/customtasktimedoutrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 75499a6e7c0e - -from __future__ import annotations -from .customtasktimedoutattributes import ( - CustomTaskTimedOutAttributes, - CustomTaskTimedOutAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class CustomTaskTimedOutRequestTypedDict(TypedDict): - r"""Emitted when a custom task exceeds its timeout. - - Indicates the task did not complete within its configured time limit. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: CustomTaskTimedOutAttributesTypedDict - r"""Attributes for custom task timed out events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["CUSTOM_TASK_TIMED_OUT"] - r"""Event type discriminator.""" - - -class CustomTaskTimedOutRequest(BaseModel): - r"""Emitted when a custom task exceeds its timeout. - - Indicates the task did not complete within its configured time limit. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: CustomTaskTimedOutAttributes - r"""Attributes for custom task timed out events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["CUSTOM_TASK_TIMED_OUT"]], - AfterValidator(validate_const("CUSTOM_TASK_TIMED_OUT")), - ], - pydantic.Field(alias="event_type"), - ] = "CUSTOM_TASK_TIMED_OUT" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - CustomTaskTimedOutRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py b/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py index 24f1e8da..e2973679 100644 --- a/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py +++ b/src/mistralai/client/models/get_run_history_v1_workflows_runs_run_id_history_getop.py @@ -22,7 +22,7 @@ class GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequest(BaseModel): decode_payloads: Annotated[ Optional[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False + ] = True @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py b/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py index cfb0c991..c71a2305 100644 --- a/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py +++ b/src/mistralai/client/models/get_workflow_execution_history_v1_workflows_executions_execution_id_history_getop.py @@ -26,7 +26,7 @@ class GetWorkflowExecutionHistoryV1WorkflowsExecutionsExecutionIDHistoryGetReque decode_payloads: Annotated[ Optional[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), - ] = False + ] = True @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/jsonpatchpayloadrequest.py b/src/mistralai/client/models/jsonpatchpayloadrequest.py deleted file mode 100644 index 96a6d689..00000000 --- a/src/mistralai/client/models/jsonpatchpayloadrequest.py +++ /dev/null @@ -1,66 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 3f10ecfda228 - -from __future__ import annotations -from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict -from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict -from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict -from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict -from mistralai.client.types import BaseModel -from mistralai.client.utils import validate_const -import pydantic -from pydantic import Field -from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Union -from typing_extensions import Annotated, TypeAliasType, TypedDict - - -JSONPatchPayloadRequestValueTypedDict = TypeAliasType( - "JSONPatchPayloadRequestValueTypedDict", - Union[ - JSONPatchAppendTypedDict, - JSONPatchAddTypedDict, - JSONPatchReplaceTypedDict, - JSONPatchRemoveTypedDict, - ], -) - - -JSONPatchPayloadRequestValue = Annotated[ - Union[JSONPatchAdd, JSONPatchAppend, JSONPatchRemove, JSONPatchReplace], - Field(discriminator="op"), -] - - -class JSONPatchPayloadRequestTypedDict(TypedDict): - r"""A payload containing a list of JSON Patch operations. - - Used for streaming incremental updates to workflow state. - """ - - value: List[JSONPatchPayloadRequestValueTypedDict] - r"""The list of JSON Patch operations to apply in order.""" - type: Literal["json_patch"] - r"""Discriminator indicating this is a JSON Patch payload.""" - - -class JSONPatchPayloadRequest(BaseModel): - r"""A payload containing a list of JSON Patch operations. - - Used for streaming incremental updates to workflow state. - """ - - value: List[JSONPatchPayloadRequestValue] - r"""The list of JSON Patch operations to apply in order.""" - - type: Annotated[ - Annotated[Literal["json_patch"], AfterValidator(validate_const("json_patch"))], - pydantic.Field(alias="type"), - ] = "json_patch" - r"""Discriminator indicating this is a JSON Patch payload.""" - - -try: - JSONPatchPayloadRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/jsonpayloadrequest.py b/src/mistralai/client/models/jsonpayloadrequest.py deleted file mode 100644 index 252b8dac..00000000 --- a/src/mistralai/client/models/jsonpayloadrequest.py +++ /dev/null @@ -1,61 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 0d49a02162ea - -from __future__ import annotations -from mistralai.client.types import BaseModel, UNSET_SENTINEL -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Any, Literal, Optional -from typing_extensions import Annotated, TypedDict - - -class JSONPayloadRequestTypedDict(TypedDict): - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - value: Any - r"""The JSON-serializable payload value.""" - type: Literal["json"] - r"""Discriminator indicating this is a raw JSON payload.""" - - -class JSONPayloadRequest(BaseModel): - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - value: Any - r"""The JSON-serializable payload value.""" - - type: Annotated[ - Annotated[Optional[Literal["json"]], AfterValidator(validate_const("json"))], - pydantic.Field(alias="type"), - ] = "json" - r"""Discriminator indicating this is a raw JSON payload.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["type"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m - - -try: - JSONPayloadRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/workfloweventbatchrequest.py b/src/mistralai/client/models/workfloweventbatchrequest.py deleted file mode 100644 index fba4a160..00000000 --- a/src/mistralai/client/models/workfloweventbatchrequest.py +++ /dev/null @@ -1,137 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: c0c0986a6b07 - -from __future__ import annotations -from .activitytaskcompletedrequest import ( - ActivityTaskCompletedRequest, - ActivityTaskCompletedRequestTypedDict, -) -from .activitytaskfailedrequest import ( - ActivityTaskFailedRequest, - ActivityTaskFailedRequestTypedDict, -) -from .activitytaskretryingrequest import ( - ActivityTaskRetryingRequest, - ActivityTaskRetryingRequestTypedDict, -) -from .activitytaskstartedrequest import ( - ActivityTaskStartedRequest, - ActivityTaskStartedRequestTypedDict, -) -from .customtaskcanceledrequest import ( - CustomTaskCanceledRequest, - CustomTaskCanceledRequestTypedDict, -) -from .customtaskcompletedrequest import ( - CustomTaskCompletedRequest, - CustomTaskCompletedRequestTypedDict, -) -from .customtaskfailedrequest import ( - CustomTaskFailedRequest, - CustomTaskFailedRequestTypedDict, -) -from .customtaskinprogressrequest import ( - CustomTaskInProgressRequest, - CustomTaskInProgressRequestTypedDict, -) -from .customtaskstartedrequest import ( - CustomTaskStartedRequest, - CustomTaskStartedRequestTypedDict, -) -from .customtasktimedoutrequest import ( - CustomTaskTimedOutRequest, - CustomTaskTimedOutRequestTypedDict, -) -from .workflowexecutioncanceledrequest import ( - WorkflowExecutionCanceledRequest, - WorkflowExecutionCanceledRequestTypedDict, -) -from .workflowexecutioncompletedrequest import ( - WorkflowExecutionCompletedRequest, - WorkflowExecutionCompletedRequestTypedDict, -) -from .workflowexecutioncontinuedasnewrequest import ( - WorkflowExecutionContinuedAsNewRequest, - WorkflowExecutionContinuedAsNewRequestTypedDict, -) -from .workflowexecutionfailedrequest import ( - WorkflowExecutionFailedRequest, - WorkflowExecutionFailedRequestTypedDict, -) -from .workflowexecutionstartedrequest import ( - WorkflowExecutionStartedRequest, - WorkflowExecutionStartedRequestTypedDict, -) -from .workflowtaskfailedrequest import ( - WorkflowTaskFailedRequest, - WorkflowTaskFailedRequestTypedDict, -) -from .workflowtasktimedoutrequest import ( - WorkflowTaskTimedOutRequest, - WorkflowTaskTimedOutRequestTypedDict, -) -from mistralai.client.types import BaseModel -from typing import List, Union -from typing_extensions import TypeAliasType, TypedDict - - -WorkflowEventBatchRequestEventTypedDict = TypeAliasType( - "WorkflowEventBatchRequestEventTypedDict", - Union[ - WorkflowExecutionStartedRequestTypedDict, - WorkflowExecutionCompletedRequestTypedDict, - WorkflowExecutionFailedRequestTypedDict, - WorkflowExecutionCanceledRequestTypedDict, - WorkflowExecutionContinuedAsNewRequestTypedDict, - WorkflowTaskTimedOutRequestTypedDict, - WorkflowTaskFailedRequestTypedDict, - CustomTaskStartedRequestTypedDict, - CustomTaskInProgressRequestTypedDict, - CustomTaskCompletedRequestTypedDict, - CustomTaskFailedRequestTypedDict, - CustomTaskTimedOutRequestTypedDict, - CustomTaskCanceledRequestTypedDict, - ActivityTaskStartedRequestTypedDict, - ActivityTaskCompletedRequestTypedDict, - ActivityTaskRetryingRequestTypedDict, - ActivityTaskFailedRequestTypedDict, - ], -) - - -WorkflowEventBatchRequestEvent = TypeAliasType( - "WorkflowEventBatchRequestEvent", - Union[ - WorkflowExecutionStartedRequest, - WorkflowExecutionCompletedRequest, - WorkflowExecutionFailedRequest, - WorkflowExecutionCanceledRequest, - WorkflowExecutionContinuedAsNewRequest, - WorkflowTaskTimedOutRequest, - WorkflowTaskFailedRequest, - CustomTaskStartedRequest, - CustomTaskInProgressRequest, - CustomTaskCompletedRequest, - CustomTaskFailedRequest, - CustomTaskTimedOutRequest, - CustomTaskCanceledRequest, - ActivityTaskStartedRequest, - ActivityTaskCompletedRequest, - ActivityTaskRetryingRequest, - ActivityTaskFailedRequest, - ], -) - - -class WorkflowEventBatchRequestTypedDict(TypedDict): - r"""Request model containing multiple workflow events.""" - - events: List[WorkflowEventBatchRequestEventTypedDict] - r"""List of workflow events to send.""" - - -class WorkflowEventBatchRequest(BaseModel): - r"""Request model containing multiple workflow events.""" - - events: List[WorkflowEventBatchRequestEvent] - r"""List of workflow events to send.""" diff --git a/src/mistralai/client/models/workfloweventbatchresponse.py b/src/mistralai/client/models/workfloweventbatchresponse.py deleted file mode 100644 index 0aa842a3..00000000 --- a/src/mistralai/client/models/workfloweventbatchresponse.py +++ /dev/null @@ -1,74 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 4cafe49944be - -from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from pydantic import model_serializer -from typing import Literal, Union -from typing_extensions import NotRequired, TypedDict - - -WorkflowEventBatchResponseStatus = Union[ - Literal[ - "success", - "error", - ], - UnrecognizedStr, -] -r"""Status of the batch event reception""" - - -class WorkflowEventBatchResponseTypedDict(TypedDict): - r"""Response model for batch workflow event reception.""" - - status: WorkflowEventBatchResponseStatus - r"""Status of the batch event reception""" - events_received: int - r"""Number of events successfully received""" - message: NotRequired[Nullable[str]] - r"""Optional message""" - - -class WorkflowEventBatchResponse(BaseModel): - r"""Response model for batch workflow event reception.""" - - status: WorkflowEventBatchResponseStatus - r"""Status of the batch event reception""" - - events_received: int - r"""Number of events successfully received""" - - message: OptionalNullable[str] = UNSET - r"""Optional message""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["message"]) - nullable_fields = set(["message"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/src/mistralai/client/models/workfloweventrequest.py b/src/mistralai/client/models/workfloweventrequest.py deleted file mode 100644 index 0a2c7579..00000000 --- a/src/mistralai/client/models/workfloweventrequest.py +++ /dev/null @@ -1,139 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: f41edbb269a4 - -from __future__ import annotations -from .activitytaskcompletedrequest import ( - ActivityTaskCompletedRequest, - ActivityTaskCompletedRequestTypedDict, -) -from .activitytaskfailedrequest import ( - ActivityTaskFailedRequest, - ActivityTaskFailedRequestTypedDict, -) -from .activitytaskretryingrequest import ( - ActivityTaskRetryingRequest, - ActivityTaskRetryingRequestTypedDict, -) -from .activitytaskstartedrequest import ( - ActivityTaskStartedRequest, - ActivityTaskStartedRequestTypedDict, -) -from .customtaskcanceledrequest import ( - CustomTaskCanceledRequest, - CustomTaskCanceledRequestTypedDict, -) -from .customtaskcompletedrequest import ( - CustomTaskCompletedRequest, - CustomTaskCompletedRequestTypedDict, -) -from .customtaskfailedrequest import ( - CustomTaskFailedRequest, - CustomTaskFailedRequestTypedDict, -) -from .customtaskinprogressrequest import ( - CustomTaskInProgressRequest, - CustomTaskInProgressRequestTypedDict, -) -from .customtaskstartedrequest import ( - CustomTaskStartedRequest, - CustomTaskStartedRequestTypedDict, -) -from .customtasktimedoutrequest import ( - CustomTaskTimedOutRequest, - CustomTaskTimedOutRequestTypedDict, -) -from .workflowexecutioncanceledrequest import ( - WorkflowExecutionCanceledRequest, - WorkflowExecutionCanceledRequestTypedDict, -) -from .workflowexecutioncompletedrequest import ( - WorkflowExecutionCompletedRequest, - WorkflowExecutionCompletedRequestTypedDict, -) -from .workflowexecutioncontinuedasnewrequest import ( - WorkflowExecutionContinuedAsNewRequest, - WorkflowExecutionContinuedAsNewRequestTypedDict, -) -from .workflowexecutionfailedrequest import ( - WorkflowExecutionFailedRequest, - WorkflowExecutionFailedRequestTypedDict, -) -from .workflowexecutionstartedrequest import ( - WorkflowExecutionStartedRequest, - WorkflowExecutionStartedRequestTypedDict, -) -from .workflowtaskfailedrequest import ( - WorkflowTaskFailedRequest, - WorkflowTaskFailedRequestTypedDict, -) -from .workflowtasktimedoutrequest import ( - WorkflowTaskTimedOutRequest, - WorkflowTaskTimedOutRequestTypedDict, -) -from mistralai.client.types import BaseModel -from typing import Union -from typing_extensions import TypeAliasType, TypedDict - - -WorkflowEventRequestEventTypedDict = TypeAliasType( - "WorkflowEventRequestEventTypedDict", - Union[ - WorkflowExecutionStartedRequestTypedDict, - WorkflowExecutionCompletedRequestTypedDict, - WorkflowExecutionFailedRequestTypedDict, - WorkflowExecutionCanceledRequestTypedDict, - WorkflowExecutionContinuedAsNewRequestTypedDict, - WorkflowTaskTimedOutRequestTypedDict, - WorkflowTaskFailedRequestTypedDict, - CustomTaskStartedRequestTypedDict, - CustomTaskInProgressRequestTypedDict, - CustomTaskCompletedRequestTypedDict, - CustomTaskFailedRequestTypedDict, - CustomTaskTimedOutRequestTypedDict, - CustomTaskCanceledRequestTypedDict, - ActivityTaskStartedRequestTypedDict, - ActivityTaskCompletedRequestTypedDict, - ActivityTaskRetryingRequestTypedDict, - ActivityTaskFailedRequestTypedDict, - ], -) -r"""The workflow event payload.""" - - -WorkflowEventRequestEvent = TypeAliasType( - "WorkflowEventRequestEvent", - Union[ - WorkflowExecutionStartedRequest, - WorkflowExecutionCompletedRequest, - WorkflowExecutionFailedRequest, - WorkflowExecutionCanceledRequest, - WorkflowExecutionContinuedAsNewRequest, - WorkflowTaskTimedOutRequest, - WorkflowTaskFailedRequest, - CustomTaskStartedRequest, - CustomTaskInProgressRequest, - CustomTaskCompletedRequest, - CustomTaskFailedRequest, - CustomTaskTimedOutRequest, - CustomTaskCanceledRequest, - ActivityTaskStartedRequest, - ActivityTaskCompletedRequest, - ActivityTaskRetryingRequest, - ActivityTaskFailedRequest, - ], -) -r"""The workflow event payload.""" - - -class WorkflowEventRequestTypedDict(TypedDict): - r"""Request model containing a workflow event.""" - - event: WorkflowEventRequestEventTypedDict - r"""The workflow event payload.""" - - -class WorkflowEventRequest(BaseModel): - r"""Request model containing a workflow event.""" - - event: WorkflowEventRequestEvent - r"""The workflow event payload.""" diff --git a/src/mistralai/client/models/workfloweventresponse.py b/src/mistralai/client/models/workfloweventresponse.py deleted file mode 100644 index 4649da80..00000000 --- a/src/mistralai/client/models/workfloweventresponse.py +++ /dev/null @@ -1,69 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: e1a984989f65 - -from __future__ import annotations -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, - UnrecognizedStr, -) -from pydantic import model_serializer -from typing import Literal, Union -from typing_extensions import NotRequired, TypedDict - - -WorkflowEventResponseStatus = Union[ - Literal[ - "success", - "error", - ], - UnrecognizedStr, -] -r"""Status of the event reception""" - - -class WorkflowEventResponseTypedDict(TypedDict): - r"""Response model for workflow event reception.""" - - status: WorkflowEventResponseStatus - r"""Status of the event reception""" - message: NotRequired[Nullable[str]] - r"""Optional message""" - - -class WorkflowEventResponse(BaseModel): - r"""Response model for workflow event reception.""" - - status: WorkflowEventResponseStatus - r"""Status of the event reception""" - - message: OptionalNullable[str] = UNSET - r"""Optional message""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["message"]) - nullable_fields = set(["message"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/src/mistralai/client/models/workflowexecutioncanceledrequest.py b/src/mistralai/client/models/workflowexecutioncanceledrequest.py deleted file mode 100644 index 09873446..00000000 --- a/src/mistralai/client/models/workflowexecutioncanceledrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 7bdfdeddd5c4 - -from __future__ import annotations -from .workflowexecutioncanceledattributes import ( - WorkflowExecutionCanceledAttributes, - WorkflowExecutionCanceledAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WorkflowExecutionCanceledRequestTypedDict(TypedDict): - r"""Emitted when a workflow execution is canceled. - - This is a terminal event indicating the workflow was explicitly canceled. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: WorkflowExecutionCanceledAttributesTypedDict - r"""Attributes for workflow execution canceled events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["WORKFLOW_EXECUTION_CANCELED"] - r"""Event type discriminator.""" - - -class WorkflowExecutionCanceledRequest(BaseModel): - r"""Emitted when a workflow execution is canceled. - - This is a terminal event indicating the workflow was explicitly canceled. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: WorkflowExecutionCanceledAttributes - r"""Attributes for workflow execution canceled events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["WORKFLOW_EXECUTION_CANCELED"]], - AfterValidator(validate_const("WORKFLOW_EXECUTION_CANCELED")), - ], - pydantic.Field(alias="event_type"), - ] = "WORKFLOW_EXECUTION_CANCELED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - WorkflowExecutionCanceledRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py b/src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py deleted file mode 100644 index fb48a0fc..00000000 --- a/src/mistralai/client/models/workflowexecutioncompletedattributesrequest.py +++ /dev/null @@ -1,32 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 9d69c2f471c1 - -from __future__ import annotations -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class WorkflowExecutionCompletedAttributesRequestTypedDict(TypedDict): - r"""Attributes for workflow execution completed events.""" - - task_id: str - r"""Unique identifier for the task within the workflow execution.""" - result: JSONPayloadRequestTypedDict - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - -class WorkflowExecutionCompletedAttributesRequest(BaseModel): - r"""Attributes for workflow execution completed events.""" - - task_id: str - r"""Unique identifier for the task within the workflow execution.""" - - result: JSONPayloadRequest - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ diff --git a/src/mistralai/client/models/workflowexecutioncompletedrequest.py b/src/mistralai/client/models/workflowexecutioncompletedrequest.py deleted file mode 100644 index 81bde0f1..00000000 --- a/src/mistralai/client/models/workflowexecutioncompletedrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 54326e5805ed - -from __future__ import annotations -from .workflowexecutioncompletedattributesrequest import ( - WorkflowExecutionCompletedAttributesRequest, - WorkflowExecutionCompletedAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WorkflowExecutionCompletedRequestTypedDict(TypedDict): - r"""Emitted when a workflow execution completes successfully. - - This is a terminal event indicating the workflow finished without errors. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: WorkflowExecutionCompletedAttributesRequestTypedDict - r"""Attributes for workflow execution completed events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["WORKFLOW_EXECUTION_COMPLETED"] - r"""Event type discriminator.""" - - -class WorkflowExecutionCompletedRequest(BaseModel): - r"""Emitted when a workflow execution completes successfully. - - This is a terminal event indicating the workflow finished without errors. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: WorkflowExecutionCompletedAttributesRequest - r"""Attributes for workflow execution completed events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["WORKFLOW_EXECUTION_COMPLETED"]], - AfterValidator(validate_const("WORKFLOW_EXECUTION_COMPLETED")), - ], - pydantic.Field(alias="event_type"), - ] = "WORKFLOW_EXECUTION_COMPLETED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - WorkflowExecutionCompletedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py b/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py deleted file mode 100644 index 1aba37ae..00000000 --- a/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesrequest.py +++ /dev/null @@ -1,42 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 8517ed95b5c7 - -from __future__ import annotations -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class WorkflowExecutionContinuedAsNewAttributesRequestTypedDict(TypedDict): - r"""Attributes for workflow execution continued-as-new events.""" - - task_id: str - r"""Unique identifier for the task within the workflow execution.""" - new_execution_run_id: str - r"""The run ID of the new workflow execution that continues this workflow.""" - workflow_name: str - r"""The registered name of the continued workflow.""" - input: JSONPayloadRequestTypedDict - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - -class WorkflowExecutionContinuedAsNewAttributesRequest(BaseModel): - r"""Attributes for workflow execution continued-as-new events.""" - - task_id: str - r"""Unique identifier for the task within the workflow execution.""" - - new_execution_run_id: str - r"""The run ID of the new workflow execution that continues this workflow.""" - - workflow_name: str - r"""The registered name of the continued workflow.""" - - input: JSONPayloadRequest - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ diff --git a/src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py b/src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py deleted file mode 100644 index f8c94604..00000000 --- a/src/mistralai/client/models/workflowexecutioncontinuedasnewrequest.py +++ /dev/null @@ -1,122 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: d1057d583b8c - -from __future__ import annotations -from .workflowexecutioncontinuedasnewattributesrequest import ( - WorkflowExecutionContinuedAsNewAttributesRequest, - WorkflowExecutionContinuedAsNewAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WorkflowExecutionContinuedAsNewRequestTypedDict(TypedDict): - r"""Emitted when a workflow continues as a new execution. - - This occurs when a workflow uses continue-as-new to reset its history - while maintaining logical continuity. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: WorkflowExecutionContinuedAsNewAttributesRequestTypedDict - r"""Attributes for workflow execution continued-as-new events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"] - r"""Event type discriminator.""" - - -class WorkflowExecutionContinuedAsNewRequest(BaseModel): - r"""Emitted when a workflow continues as a new execution. - - This occurs when a workflow uses continue-as-new to reset its history - while maintaining logical continuity. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: WorkflowExecutionContinuedAsNewAttributesRequest - r"""Attributes for workflow execution continued-as-new events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["WORKFLOW_EXECUTION_CONTINUED_AS_NEW"]], - AfterValidator(validate_const("WORKFLOW_EXECUTION_CONTINUED_AS_NEW")), - ], - pydantic.Field(alias="event_type"), - ] = "WORKFLOW_EXECUTION_CONTINUED_AS_NEW" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - WorkflowExecutionContinuedAsNewRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/workflowexecutionfailedrequest.py b/src/mistralai/client/models/workflowexecutionfailedrequest.py deleted file mode 100644 index 5c4e445a..00000000 --- a/src/mistralai/client/models/workflowexecutionfailedrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 873155c8e314 - -from __future__ import annotations -from .workflowexecutionfailedattributes import ( - WorkflowExecutionFailedAttributes, - WorkflowExecutionFailedAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WorkflowExecutionFailedRequestTypedDict(TypedDict): - r"""Emitted when a workflow execution fails due to an unhandled exception. - - This is a terminal event indicating the workflow ended with an error. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: WorkflowExecutionFailedAttributesTypedDict - r"""Attributes for workflow execution failed events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["WORKFLOW_EXECUTION_FAILED"] - r"""Event type discriminator.""" - - -class WorkflowExecutionFailedRequest(BaseModel): - r"""Emitted when a workflow execution fails due to an unhandled exception. - - This is a terminal event indicating the workflow ended with an error. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: WorkflowExecutionFailedAttributes - r"""Attributes for workflow execution failed events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["WORKFLOW_EXECUTION_FAILED"]], - AfterValidator(validate_const("WORKFLOW_EXECUTION_FAILED")), - ], - pydantic.Field(alias="event_type"), - ] = "WORKFLOW_EXECUTION_FAILED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - WorkflowExecutionFailedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/workflowexecutionstartedattributesrequest.py b/src/mistralai/client/models/workflowexecutionstartedattributesrequest.py deleted file mode 100644 index ff74345f..00000000 --- a/src/mistralai/client/models/workflowexecutionstartedattributesrequest.py +++ /dev/null @@ -1,37 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: ee480cd77d79 - -from __future__ import annotations -from .jsonpayloadrequest import JSONPayloadRequest, JSONPayloadRequestTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class WorkflowExecutionStartedAttributesRequestTypedDict(TypedDict): - r"""Attributes for workflow execution started events.""" - - task_id: str - r"""Unique identifier for the task within the workflow execution.""" - workflow_name: str - r"""The registered name of the workflow being executed.""" - input: JSONPayloadRequestTypedDict - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ - - -class WorkflowExecutionStartedAttributesRequest(BaseModel): - r"""Attributes for workflow execution started events.""" - - task_id: str - r"""Unique identifier for the task within the workflow execution.""" - - workflow_name: str - r"""The registered name of the workflow being executed.""" - - input: JSONPayloadRequest - r"""A payload containing arbitrary JSON data. - - Used for complete state snapshots or final results. - """ diff --git a/src/mistralai/client/models/workflowexecutionstartedrequest.py b/src/mistralai/client/models/workflowexecutionstartedrequest.py deleted file mode 100644 index 0ce8bbce..00000000 --- a/src/mistralai/client/models/workflowexecutionstartedrequest.py +++ /dev/null @@ -1,120 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 15e73dddf8c4 - -from __future__ import annotations -from .workflowexecutionstartedattributesrequest import ( - WorkflowExecutionStartedAttributesRequest, - WorkflowExecutionStartedAttributesRequestTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WorkflowExecutionStartedRequestTypedDict(TypedDict): - r"""Emitted when a workflow execution begins. - - This is the first event in any workflow execution lifecycle. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: WorkflowExecutionStartedAttributesRequestTypedDict - r"""Attributes for workflow execution started events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["WORKFLOW_EXECUTION_STARTED"] - r"""Event type discriminator.""" - - -class WorkflowExecutionStartedRequest(BaseModel): - r"""Emitted when a workflow execution begins. - - This is the first event in any workflow execution lifecycle. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: WorkflowExecutionStartedAttributesRequest - r"""Attributes for workflow execution started events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["WORKFLOW_EXECUTION_STARTED"]], - AfterValidator(validate_const("WORKFLOW_EXECUTION_STARTED")), - ], - pydantic.Field(alias="event_type"), - ] = "WORKFLOW_EXECUTION_STARTED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - WorkflowExecutionStartedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/workflowtaskfailedrequest.py b/src/mistralai/client/models/workflowtaskfailedrequest.py deleted file mode 100644 index 9075b0bc..00000000 --- a/src/mistralai/client/models/workflowtaskfailedrequest.py +++ /dev/null @@ -1,122 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: d26184215fe3 - -from __future__ import annotations -from .workflowtaskfailedattributes import ( - WorkflowTaskFailedAttributes, - WorkflowTaskFailedAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WorkflowTaskFailedRequestTypedDict(TypedDict): - r"""Emitted when a workflow task fails. - - This indicates an error occurred during workflow task execution, - which may trigger a retry depending on configuration. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: WorkflowTaskFailedAttributesTypedDict - r"""Attributes for workflow task failed events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["WORKFLOW_TASK_FAILED"] - r"""Event type discriminator.""" - - -class WorkflowTaskFailedRequest(BaseModel): - r"""Emitted when a workflow task fails. - - This indicates an error occurred during workflow task execution, - which may trigger a retry depending on configuration. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: WorkflowTaskFailedAttributes - r"""Attributes for workflow task failed events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["WORKFLOW_TASK_FAILED"]], - AfterValidator(validate_const("WORKFLOW_TASK_FAILED")), - ], - pydantic.Field(alias="event_type"), - ] = "WORKFLOW_TASK_FAILED" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - WorkflowTaskFailedRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/models/workflowtasktimedoutrequest.py b/src/mistralai/client/models/workflowtasktimedoutrequest.py deleted file mode 100644 index 86a6bcdb..00000000 --- a/src/mistralai/client/models/workflowtasktimedoutrequest.py +++ /dev/null @@ -1,122 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 70f37007e50f - -from __future__ import annotations -from .workflowtasktimedoutattributes import ( - WorkflowTaskTimedOutAttributes, - WorkflowTaskTimedOutAttributesTypedDict, -) -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from mistralai.client.utils import validate_const -import pydantic -from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional -from typing_extensions import Annotated, NotRequired, TypedDict - - -class WorkflowTaskTimedOutRequestTypedDict(TypedDict): - r"""Emitted when a workflow task times out. - - This indicates the workflow task (a unit of workflow execution) exceeded - its configured timeout. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - attributes: WorkflowTaskTimedOutAttributesTypedDict - r"""Attributes for workflow task timed out events.""" - event_timestamp: NotRequired[int] - r"""Unix timestamp in nanoseconds when the event was created.""" - parent_workflow_exec_id: NotRequired[Nullable[str]] - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - event_type: Literal["WORKFLOW_TASK_TIMED_OUT"] - r"""Event type discriminator.""" - - -class WorkflowTaskTimedOutRequest(BaseModel): - r"""Emitted when a workflow task times out. - - This indicates the workflow task (a unit of workflow execution) exceeded - its configured timeout. - """ - - event_id: str - r"""Unique identifier for this event instance.""" - - root_workflow_exec_id: str - r"""Execution ID of the root workflow that initiated this execution chain.""" - - workflow_exec_id: str - r"""Execution ID of the workflow that emitted this event.""" - - workflow_run_id: str - r"""Run ID of the workflow execution. Changes on continue-as-new while workflow_exec_id stays the same.""" - - workflow_name: str - r"""The registered name of the workflow that emitted this event.""" - - attributes: WorkflowTaskTimedOutAttributes - r"""Attributes for workflow task timed out events.""" - - event_timestamp: Optional[int] = None - r"""Unix timestamp in nanoseconds when the event was created.""" - - parent_workflow_exec_id: OptionalNullable[str] = UNSET - r"""Execution ID of the parent workflow that initiated this execution. If this is a root workflow, this field is not set.""" - - event_type: Annotated[ - Annotated[ - Optional[Literal["WORKFLOW_TASK_TIMED_OUT"]], - AfterValidator(validate_const("WORKFLOW_TASK_TIMED_OUT")), - ], - pydantic.Field(alias="event_type"), - ] = "WORKFLOW_TASK_TIMED_OUT" - r"""Event type discriminator.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["event_timestamp", "parent_workflow_exec_id", "event_type"] - ) - nullable_fields = set(["parent_workflow_exec_id"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m - - -try: - WorkflowTaskTimedOutRequest.model_rebuild() -except NameError: - pass diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 5b534b63..3e875ba8 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -471,7 +471,7 @@ def get_run_history( self, *, run_id: str, - decode_payloads: Optional[bool] = False, + decode_payloads: Optional[bool] = True, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -562,7 +562,7 @@ async def get_run_history_async( self, *, run_id: str, - decode_payloads: Optional[bool] = False, + decode_payloads: Optional[bool] = True, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, diff --git a/src/mistralai/client/workflows_events.py b/src/mistralai/client/workflows_events.py index 2c6b14ee..db39e370 100644 --- a/src/mistralai/client/workflows_events.py +++ b/src/mistralai/client/workflows_events.py @@ -7,418 +7,10 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import eventstreaming, get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Dict, List, Mapping, Optional, Union +from typing import Any, Dict, List, Mapping, Optional class WorkflowsEvents(BaseSDK): - def send_event( - self, - *, - event: Union[ - models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventResponse: - r"""Receive Workflow Event - - Receive workflow events from workers. - - Events are published to NATS for real-time streaming and persisted in the database. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param event: The workflow event payload. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventRequest( - event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), - ) - - req = self._build_request( - method="POST", - path="/v1/workflows/events", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_event_v1_workflows_events_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - async def send_event_async( - self, - *, - event: Union[ - models.WorkflowEventRequestEvent, models.WorkflowEventRequestEventTypedDict - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventResponse: - r"""Receive Workflow Event - - Receive workflow events from workers. - - Events are published to NATS for real-time streaming and persisted in the database. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param event: The workflow event payload. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventRequest( - event=utils.get_pydantic_model(event, models.WorkflowEventRequestEvent), - ) - - req = self._build_request_async( - method="POST", - path="/v1/workflows/events", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_event_v1_workflows_events_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - def send_events_batch( - self, - *, - events: Union[ - List[models.WorkflowEventBatchRequestEvent], - List[models.WorkflowEventBatchRequestEventTypedDict], - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventBatchResponse: - r"""Receive Workflow Events Batch - - Receive multiple workflow events from workers in a single batch. - - Events are published to NATS for real-time streaming and persisted in the database. - This endpoint processes events sequentially to maintain ordering guarantees. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param events: List of workflow events to send. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventBatchRequest( - events=utils.get_pydantic_model( - events, List[models.WorkflowEventBatchRequestEvent] - ), - ) - - req = self._build_request( - method="POST", - path="/v1/workflows/events/batch", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventBatchRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - async def send_events_batch_async( - self, - *, - events: Union[ - List[models.WorkflowEventBatchRequestEvent], - List[models.WorkflowEventBatchRequestEventTypedDict], - ], - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowEventBatchResponse: - r"""Receive Workflow Events Batch - - Receive multiple workflow events from workers in a single batch. - - Events are published to NATS for real-time streaming and persisted in the database. - This endpoint processes events sequentially to maintain ordering guarantees. - - For shared workers, the actual execution owner is resolved from the execution record, - ensuring events are streamed to the correct user's namespace. - - :param events: List of workflow events to send. - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.WorkflowEventBatchRequest( - events=utils.get_pydantic_model( - events, List[models.WorkflowEventBatchRequestEvent] - ), - ) - - req = self._build_request_async( - method="POST", - path="/v1/workflows/events/batch", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=True, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - get_serialized_body=lambda: utils.serialize_request_body( - request, False, False, "json", models.WorkflowEventBatchRequest - ), - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="receive_workflow_events_batch_v1_workflows_events_batch_post", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["422", "4XX", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkflowEventBatchResponse, http_res) - if utils.match_response(http_res, "422", "application/json"): - response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res - ) - raise errors.HTTPValidationError(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - def get_stream_events( self, *, diff --git a/uv.lock b/uv.lock index 8fd36666..a1607607 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.2.0rc2" +version = "2.2.0rc3" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 3336a78c01dc3990c769d8a63f3280c7936b80e3 Mon Sep 17 00:00:00 2001 From: Arnaud dE Date: Tue, 31 Mar 2026 10:20:19 +0200 Subject: [PATCH 32/82] Inject sampled traceparent on workflow execute calls (#459) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Inject sampled traceparent on workflow execute calls Without a traceparent header, external workers inherit the API's HTTP span context via Temporal. In production the API's spans are frequently unsampled (ParentBasedTraceIdRatio), so workers produce no-op spans and traces never reach the collector — /trace/otel returns WF_1500. Adds a BeforeRequestHook that fires on any /execute path and injects a sampled W3C traceparent: forwarding the active OTEL span if it is already sampled, otherwise generating a fresh sampled one. An explicitly set traceparent header is never overwritten. * Add tests for TraceparentInjectionHook Covers: no-op on non-execute paths, sampled header injection, explicit header preservation, OTEL context propagation, fallback for unsampled or absent spans, and uniqueness of generated IDs. * Address review comments - Shorten TraceparentInjectionHook docstring to one line - Remove module docstring from test file - Drop low-ROI uniqueness test * Fix lint errors in test file Remove unused opentelemetry.trace import (ruff F401) and add isinstance assertions so pyright can narrow Union[Request, Exception] before accessing .headers. * Use operation ID instead of URL path to identify execute calls Matching on request.url.path.endswith("/execute") would affect any future endpoint that happens to share that suffix. Keying on the operation ID is explicit and safe. * Remove unused _EXECUTE_OPERATION_IDS import --- src/mistralai/client/_hooks/registration.py | 2 + src/mistralai/client/_hooks/traceparent.py | 38 ++++++ .../extra/tests/test_traceparent_hook.py | 112 ++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 src/mistralai/client/_hooks/traceparent.py create mode 100644 src/mistralai/extra/tests/test_traceparent_hook.py diff --git a/src/mistralai/client/_hooks/registration.py b/src/mistralai/client/_hooks/registration.py index 58bebab0..de781de7 100644 --- a/src/mistralai/client/_hooks/registration.py +++ b/src/mistralai/client/_hooks/registration.py @@ -1,5 +1,6 @@ from .custom_user_agent import CustomUserAgentHook from .deprecation_warning import DeprecationWarningHook +from .traceparent import TraceparentInjectionHook from .tracing import TracingHook from .types import Hooks @@ -16,6 +17,7 @@ def init_hooks(hooks: Hooks): """ tracing_hook = TracingHook() hooks.register_before_request_hook(CustomUserAgentHook()) + hooks.register_before_request_hook(TraceparentInjectionHook()) hooks.register_after_success_hook(DeprecationWarningHook()) hooks.register_after_success_hook(tracing_hook) hooks.register_before_request_hook(tracing_hook) diff --git a/src/mistralai/client/_hooks/traceparent.py b/src/mistralai/client/_hooks/traceparent.py new file mode 100644 index 00000000..a8ddedf4 --- /dev/null +++ b/src/mistralai/client/_hooks/traceparent.py @@ -0,0 +1,38 @@ +import random +from typing import Dict, Union + +import httpx +from opentelemetry.propagate import inject + +from .types import BeforeRequestContext, BeforeRequestHook + + +_EXECUTE_OPERATION_IDS = { + "execute_workflow_v1_workflows__workflow_identifier__execute_post", + "execute_workflow_registration_v1_workflows_registrations__workflow_registration_id__execute_post", +} + + +class TraceparentInjectionHook(BeforeRequestHook): + """Inject a sampled traceparent on /execute requests so worker traces are always recorded.""" + + def before_request( + self, hook_ctx: BeforeRequestContext, request: httpx.Request + ) -> Union[httpx.Request, Exception]: + if hook_ctx.operation_id not in _EXECUTE_OPERATION_IDS: + return request + + # Don't overwrite an explicitly provided traceparent. + if "traceparent" in request.headers: + return request + + carrier: Dict[str, str] = {} + inject(carrier) + traceparent = carrier.get("traceparent", "") + if not traceparent.endswith("-01"): + trace_id = random.getrandbits(128) + span_id = random.getrandbits(64) + traceparent = f"00-{trace_id:032x}-{span_id:016x}-01" + + request.headers["traceparent"] = traceparent + return request diff --git a/src/mistralai/extra/tests/test_traceparent_hook.py b/src/mistralai/extra/tests/test_traceparent_hook.py new file mode 100644 index 00000000..8202f3d6 --- /dev/null +++ b/src/mistralai/extra/tests/test_traceparent_hook.py @@ -0,0 +1,112 @@ +import re +import unittest +from unittest.mock import MagicMock + +import httpx +from opentelemetry.sdk.trace import TracerProvider +from opentelemetry.sdk.trace.export import SimpleSpanProcessor +from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter +from opentelemetry.sdk.trace.sampling import ALWAYS_OFF + +from mistralai.client._hooks.traceparent import TraceparentInjectionHook +from mistralai.client._hooks.types import BeforeRequestContext, HookContext + + +TRACEPARENT_RE = re.compile(r"^00-[0-9a-f]{32}-[0-9a-f]{16}-01$") + +_EXECUTE_OP_ID = "execute_workflow_v1_workflows__workflow_identifier__execute_post" +_EXECUTE_REG_OP_ID = "execute_workflow_registration_v1_workflows_registrations__workflow_registration_id__execute_post" +_OTHER_OP_ID = "list_executions_v1_workflows__workflow_identifier__executions_get" + + +def _make_hook_ctx(operation_id: str = _EXECUTE_OP_ID) -> BeforeRequestContext: + ctx = HookContext( + config=MagicMock(), + base_url="https://api.mistral.ai", + operation_id=operation_id, + oauth2_scopes=None, + security_source=None, + ) + return BeforeRequestContext(ctx) + + +def _make_request(path: str, traceparent: str | None = None) -> httpx.Request: + headers = {} + if traceparent is not None: + headers["traceparent"] = traceparent + return httpx.Request("POST", f"https://api.mistral.ai{path}", headers=headers) + + +class TestTraceparentInjectionHook(unittest.TestCase): + def setUp(self): + self.hook = TraceparentInjectionHook() + + # --- non-execute operations must NOT be touched --- + + def test_other_operation_is_unchanged(self): + req = _make_request("/v1/workflows/my-wf/executions") + result = self.hook.before_request(_make_hook_ctx(_OTHER_OP_ID), req) + assert isinstance(result, httpx.Request) + self.assertNotIn("traceparent", result.headers) + + # --- execute operations: header injected --- + + def test_execute_gets_sampled_traceparent(self): + req = _make_request("/v1/workflows/my-wf/execute") + result = self.hook.before_request(_make_hook_ctx(_EXECUTE_OP_ID), req) + assert isinstance(result, httpx.Request) + self.assertIn("traceparent", result.headers) + self.assertRegex(result.headers["traceparent"], TRACEPARENT_RE) + + def test_execute_registration_gets_sampled_traceparent(self): + req = _make_request("/v1/workflows/registrations/reg-id/execute") + result = self.hook.before_request(_make_hook_ctx(_EXECUTE_REG_OP_ID), req) + assert isinstance(result, httpx.Request) + self.assertIn("traceparent", result.headers) + self.assertRegex(result.headers["traceparent"], TRACEPARENT_RE) + + def test_explicit_traceparent_is_not_overwritten(self): + explicit = "00-aabbccddeeff00112233445566778899-0102030405060708-01" + req = _make_request("/v1/workflows/my-wf/execute", traceparent=explicit) + result = self.hook.before_request(_make_hook_ctx(_EXECUTE_OP_ID), req) + assert isinstance(result, httpx.Request) + self.assertEqual(result.headers["traceparent"], explicit) + + # --- OTEL context propagation --- + + def test_propagates_sampled_active_span(self): + exporter = InMemorySpanExporter() + provider = TracerProvider() + provider.add_span_processor(SimpleSpanProcessor(exporter)) + tracer = provider.get_tracer("test") + + with tracer.start_as_current_span("parent") as span: + req = _make_request("/v1/workflows/my-wf/execute") + result = self.hook.before_request(_make_hook_ctx(_EXECUTE_OP_ID), req) + + assert isinstance(result, httpx.Request) + injected = result.headers["traceparent"] + self.assertTrue(injected.endswith("-01")) + trace_id_hex = f"{span.get_span_context().trace_id:032x}" + self.assertIn(trace_id_hex, injected) + + def test_generates_fresh_traceparent_when_no_active_span(self): + req = _make_request("/v1/workflows/my-wf/execute") + result = self.hook.before_request(_make_hook_ctx(_EXECUTE_OP_ID), req) + assert isinstance(result, httpx.Request) + self.assertRegex(result.headers["traceparent"], TRACEPARENT_RE) + + def test_generates_fresh_traceparent_when_span_is_unsampled(self): + provider = TracerProvider(sampler=ALWAYS_OFF) + tracer = provider.get_tracer("test") + + with tracer.start_as_current_span("unsampled-parent"): + req = _make_request("/v1/workflows/my-wf/execute") + result = self.hook.before_request(_make_hook_ctx(_EXECUTE_OP_ID), req) + + assert isinstance(result, httpx.Request) + injected = result.headers["traceparent"] + self.assertTrue(injected.endswith("-01"), f"Expected sampled, got: {injected}") + +if __name__ == "__main__": + unittest.main() From 777cd601f5a0e278892d641aadeb8b67b506d478 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 13:19:32 +0200 Subject: [PATCH 33/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.2.0=20(#461)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.754.0 * chore: align pyproject.toml and uv.lock to version 2.2.0 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 20 +++++++------------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- RELEASES.md | 12 +++++++++++- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 ++-- uv.lock | 2 +- 7 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5312b8f3..cd97e129 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,15 +5,15 @@ management: docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.2.0rc3 - configChecksum: 8d1009e9db71a2652f088ee569fe5127 + releaseVersion: 2.2.0 + configChecksum: ed5cc4cf5a87eaacbf1b77366abd2467 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: ab642f78-4f68-4ede-8d20-e3dcf0b0890a - pristine_commit_hash: 887bc7bbf7e576b5744938985652c7d8b26336bb - pristine_tree_hash: cf45f9d57a91e07050136255cbf5a28b9b41e187 + generation_id: 6b0c3b1d-b7b3-4318-b2a1-5d44dd7fa3ac + pristine_commit_hash: 2e766581e0b9c6c42cbd61b500b0b6469a27a175 + pristine_tree_hash: ded10775e62be5fb057ebf7819d56da121f02829 features: python: acceptHeaders: 3.0.0 @@ -3207,8 +3207,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:7c4b8f8436c7e5c45a2d3558401950ec81133c45 - pristine_git_object: 0c0161c82d1aa0061e2e86ccc8a53eb216434083 + last_write_checksum: sha1:e0d4cdfdf25c401429c0e9beb40be8846cb2a235 + pristine_git_object: 0473419e2e46dbf2e975a7fdcc5355d056752cdf src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -8295,12 +8295,6 @@ examples: application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.workflows.events.send_event()`: **Removed** (Breaking ⚠️) - * `mistral.workflows.events.send_events_batch()`: **Removed** (Breaking ⚠️) - * `mistral.events.send_event()`: **Removed** (Breaking ⚠️) - * `mistral.events.send_events_batch()`: **Removed** (Breaking ⚠️) generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0f252e1b..0c50d415 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.2.0rc3 + version: 2.2.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1aaf3879..fff0c8c6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -41,7 +41,7 @@ targets: sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:5c4ab11a61b82db21d8567c51a430c9dbc522aced5a46537cb5e075218452a02 + codeSamplesRevisionDigest: sha256:87ec31b36ce736c3f60cce2c11b8192bb5617b5ce9d881aadc0cf4a86563173c workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/RELEASES.md b/RELEASES.md index 45e8e389..852ddced 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -518,4 +518,14 @@ Based on: ### Generated - [python v2.2.0rc3] . ### Releases -- [PyPI v2.2.0rc3] https://pypi.org/project/mistralai/2.2.0rc3 - . \ No newline at end of file +- [PyPI v2.2.0rc3] https://pypi.org/project/mistralai/2.2.0rc3 - . + +## 2026-03-31 11:09:18 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.2.0] . +### Releases +- [PyPI v2.2.0] https://pypi.org/project/mistralai/2.2.0 - . \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b4e239e7..54d2b372 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.2.0rc3" +version = "2.2.0" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 0c0161c8..0473419e 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.2.0rc3" +__version__: str = "2.2.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.2.0rc3 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.2.0 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/uv.lock b/uv.lock index a1607607..ae8cabb5 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.2.0rc3" +version = "2.2.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 21a7e44f860ad9732af843b99c5d1f57eda97336 Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:47:38 +0200 Subject: [PATCH 34/82] test(azure): improve integration tests and fix pre-commit mypy config (#462) - Add OCR integration tests (sync + async) - Remove hardcoded endpoints/models in favor of env vars - Remove internal references (Bitwarden, Tailscale, specific project IDs) - Add missing httpx/pydantic deps to mypy pre-commit hook --- .pre-commit-config.yaml | 1 + tests/test_azure_integration.py | 86 ++++++++++++++++++++++----------- tests/test_gcp_integration.py | 4 +- 3 files changed, 62 insertions(+), 29 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9be71784..7517b816 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,5 +16,6 @@ repos: rev: v1.15.0 hooks: - id: mypy + additional_dependencies: [httpx, pydantic] files: ^(examples/|src/mistralai/|packages/(azure|gcp)/src/mistralai/).*\.py$ exclude: ^src/mistralai/(__init__|sdkhooks|types)\.py$ diff --git a/tests/test_azure_integration.py b/tests/test_azure_integration.py index ac4e38a1..ad6da971 100644 --- a/tests/test_azure_integration.py +++ b/tests/test_azure_integration.py @@ -4,28 +4,23 @@ These tests require credentials and make real API calls. Skip if AZURE_API_KEY env var is not set. -Prerequisites: - 1. Azure API key (stored in Bitwarden at "[MaaS] - Azure Foundry API key") - 2. Tailscale connected via gw-0 exit node - Usage: - AZURE_API_KEY=xxx pytest tests/test_azure_integration.py -v + AZURE_API_KEY=xxx AZURE_SERVER_URL=https://.services.ai.azure.com AZURE_MODEL= AZURE_OCR_MODEL= pytest tests/test_azure_integration.py -v Environment variables: AZURE_API_KEY: API key (required) - AZURE_ENDPOINT: Base URL (default: https://maas-qa-aifoundry.services.ai.azure.com/models) - AZURE_MODEL: Model name (default: maas-qa-ministral-3b) + AZURE_SERVER_URL: Base host URL (required, e.g. https://.services.ai.azure.com) + AZURE_MODEL: Chat model name (required) + AZURE_OCR_MODEL: OCR model name (required) AZURE_API_VERSION: API version (default: 2024-05-01-preview) -Note: AZURE_ENDPOINT should be the base URL without path suffixes. -The SDK appends /chat/completions to this URL. The api_version parameter -is automatically injected as a query parameter by the SDK. - -Available models: - Chat: maas-qa-ministral-3b, maas-qa-mistral-large-3, maas-qa-mistral-medium-2505 - OCR: maas-qa-mistral-document-ai-2505, maas-qa-mistral-document-ai-2512 - (OCR uses a separate endpoint, not tested here) +Note: AZURE_SERVER_URL should be the base host URL without any path suffix. +The SDK appends the correct path per operation type: + - Chat: /models/chat/completions + - OCR: /providers/mistral/azure/ocr +The api_version parameter is automatically injected as a query parameter. """ +import base64 import json import os @@ -33,18 +28,16 @@ # Configuration from env vars AZURE_API_KEY = os.environ.get("AZURE_API_KEY") -AZURE_ENDPOINT = os.environ.get( - "AZURE_ENDPOINT", - "https://maas-qa-aifoundry.services.ai.azure.com/models", -) -AZURE_MODEL = os.environ.get("AZURE_MODEL", "maas-qa-ministral-3b") +AZURE_SERVER_URL = os.environ.get("AZURE_SERVER_URL") +AZURE_MODEL = os.environ.get("AZURE_MODEL") +AZURE_OCR_MODEL = os.environ.get("AZURE_OCR_MODEL") AZURE_API_VERSION = os.environ.get("AZURE_API_VERSION", "2024-05-01-preview") -SKIP_REASON = "AZURE_API_KEY env var required" +SKIP_REASON = "Required env vars: AZURE_API_KEY, AZURE_SERVER_URL, AZURE_MODEL, AZURE_OCR_MODEL" pytestmark = pytest.mark.skipif( - not AZURE_API_KEY, - reason=SKIP_REASON + not all([AZURE_API_KEY, AZURE_SERVER_URL, AZURE_MODEL, AZURE_OCR_MODEL]), + reason=SKIP_REASON, ) # Shared tool definition for tool-call tests @@ -61,15 +54,23 @@ }, } +# Minimal valid PDF for OCR tests (single blank page) +MINIMAL_PDF = ( + b"%PDF-1.0\n1 0 obj<>endobj\n" + b"2 0 obj<>endobj\n" + b"3 0 obj<>endobj\n" + b"trailer<>" +) + @pytest.fixture def azure_client(): - """Create an Azure client with api_version parameter.""" + """Create an Azure client for Foundry Resource endpoints.""" from mistralai.azure.client import MistralAzure assert AZURE_API_KEY is not None, "AZURE_API_KEY must be set" return MistralAzure( api_key=AZURE_API_KEY, - server_url=AZURE_ENDPOINT, + server_url=AZURE_SERVER_URL, api_version=AZURE_API_VERSION, ) @@ -323,6 +324,37 @@ def test_stream_tool_call(self, azure_client): assert tool_call_found, "Expected tool_call delta chunks in stream" +class TestAzureOcr: + """Test OCR endpoint.""" + + def test_basic_ocr(self, azure_client): + """Test OCR processes a document and returns pages.""" + encoded = base64.b64encode(MINIMAL_PDF).decode("utf-8") + res = azure_client.ocr.process( + model=AZURE_OCR_MODEL, + document={ + "type": "document_url", + "document_url": f"data:application/pdf;base64,{encoded}", + }, + ) + assert res is not None + assert res.pages is not None + + @pytest.mark.asyncio + async def test_basic_ocr_async(self, azure_client): + """Test async OCR processes a document and returns pages.""" + encoded = base64.b64encode(MINIMAL_PDF).decode("utf-8") + res = await azure_client.ocr.process_async( + model=AZURE_OCR_MODEL, + document={ + "type": "document_url", + "document_url": f"data:application/pdf;base64,{encoded}", + }, + ) + assert res is not None + assert res.pages is not None + + class TestAzureChatCompleteAsync: """Test async chat completion.""" @@ -401,7 +433,7 @@ def test_sync_context_manager(self): assert AZURE_API_KEY is not None, "AZURE_API_KEY must be set" with MistralAzure( api_key=AZURE_API_KEY, - server_url=AZURE_ENDPOINT, + server_url=AZURE_SERVER_URL, api_version=AZURE_API_VERSION, ) as client: res = client.chat.complete( @@ -420,7 +452,7 @@ async def test_async_context_manager(self): assert AZURE_API_KEY is not None, "AZURE_API_KEY must be set" async with MistralAzure( api_key=AZURE_API_KEY, - server_url=AZURE_ENDPOINT, + server_url=AZURE_SERVER_URL, api_version=AZURE_API_VERSION, ) as client: res = await client.chat.complete_async( diff --git a/tests/test_gcp_integration.py b/tests/test_gcp_integration.py index fe24b8b0..1ed2fecc 100644 --- a/tests/test_gcp_integration.py +++ b/tests/test_gcp_integration.py @@ -6,7 +6,7 @@ Prerequisites: 1. Authenticate with GCP: gcloud auth application-default login - 2. Have "Vertex AI User" role on the project (e.g. model-garden-420509) + 2. Have "Vertex AI User" role on the project The SDK automatically: - Detects credentials via google.auth.default() @@ -19,7 +19,7 @@ See: https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/mistral Usage: - GCP_PROJECT_ID=model-garden-420509 pytest tests/test_gcp_integration.py -v + GCP_PROJECT_ID= pytest tests/test_gcp_integration.py -v Environment variables: GCP_PROJECT_ID: GCP project ID (required, or auto-detected from credentials) From 68a4cb74b5b22253343a30565584003aa21460c4 Mon Sep 17 00:00:00 2001 From: Antoine <33425718+anth2o@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:11:30 +0200 Subject: [PATCH 35/82] speakeasy: update version to 1.761.1 (#465) --- .speakeasy/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 548733b0..5e708727 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,5 +1,5 @@ workflowVersion: 1.0.0 -speakeasyVersion: 1.754.0 +speakeasyVersion: 1.761.1 sources: mistral-azure-source: inputs: From 77a33edec420be10898c7687132c729a4588a6b5 Mon Sep 17 00:00:00 2001 From: Antoine <33425718+anth2o@users.noreply.github.com> Date: Thu, 2 Apr 2026 18:53:26 +0200 Subject: [PATCH 36/82] clean: add harcoded route for whoami to remove it from publicly exposed ones (#467) --- .../_workflow_get_scheduler_namespace.py | 18 ++++ src/mistralai/extra/workflows/__init__.py | 0 src/mistralai/extra/workflows/helpers.py | 84 +++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 examples/mistral/workflows/_workflow_get_scheduler_namespace.py create mode 100644 src/mistralai/extra/workflows/__init__.py create mode 100644 src/mistralai/extra/workflows/helpers.py diff --git a/examples/mistral/workflows/_workflow_get_scheduler_namespace.py b/examples/mistral/workflows/_workflow_get_scheduler_namespace.py new file mode 100644 index 00000000..10a9b760 --- /dev/null +++ b/examples/mistral/workflows/_workflow_get_scheduler_namespace.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +import asyncio +import os + +from mistralai.client import Mistral +from mistralai.extra.workflows.helpers import get_scheduler_namespace + + +async def main(): + api_key = os.environ["MISTRAL_API_KEY"] + + client = Mistral(api_key=api_key) + print(await get_scheduler_namespace(client)) + + +if __name__ == "__main__": + asyncio.run(main()) diff --git a/src/mistralai/extra/workflows/__init__.py b/src/mistralai/extra/workflows/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/mistralai/extra/workflows/helpers.py b/src/mistralai/extra/workflows/helpers.py new file mode 100644 index 00000000..c2f9caff --- /dev/null +++ b/src/mistralai/extra/workflows/helpers.py @@ -0,0 +1,84 @@ +from typing import Mapping, Optional + +from pydantic import BaseModel + +from mistralai.client import errors, models, utils +from mistralai.client._hooks.types import HookContext +from mistralai.client.sdk import Mistral +from mistralai.client.types.basemodel import UNSET, OptionalNullable +from mistralai.client.utils.security import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response + + +class WorkerInfo(BaseModel): + scheduler_url: str + namespace: str + + +async def get_scheduler_namespace( + client: Mistral, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, +) -> str: + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = client.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = client._get_url(base_url, url_variables) + req = client._build_request_async( + method="GET", + path="/v1/workflows/workers/whoami", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=client.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if client.sdk_configuration.retry_config is not UNSET: + retries = client.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await client.do_request_async( + hook_ctx=HookContext( + config=client.sdk_configuration, + base_url=base_url or "", + operation_id="get_worker_info_v1_workflows_workers_whoami_get", + oauth2_scopes=None, + security_source=get_security_from_env( + client.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(WorkerInfo, http_res).namespace + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) From eee98b91f206cc9241620701c88741eece389be7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:04:44 +0200 Subject: [PATCH 37/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.3.0=20(#469)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️) * `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️) * `mistral.chat.complete()`: * `request` **Changed** (Breaking ⚠️) * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.chat.stream()`: * `request` **Changed** (Breaking ⚠️) * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.fim.complete()`: `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.fim.stream()`: `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed** (Breaking ⚠️) * `mistral.workflows.execute_workflow_registration()`: `request.input` **Changed** (Breaking ⚠️) * `mistral.workflows.execute_workflow()`: `request.input` **Changed** (Breaking ⚠️) * `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed** (Breaking ⚠️) * `mistral.classifiers.classify_chat()`: * `request.input.union(InstructRequest).messages[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.classifiers.moderate_chat()`: * `request.inputs.union(Array<>)[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.agents.stream()`: * `request` **Changed** (Breaking ⚠️) * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.agents.complete()`: * `request` **Changed** (Breaking ⚠️) * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️) * `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_explorer()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.update()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.create()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.fetch_status()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.list_events()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_campaign()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.create()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fields.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.judge()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.search_ids()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.search()`: `error.detail.error_code` **Changed** * `mistral.workflows.workers.whoami()`: **Removed** (Breaking ⚠️) * `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed** * chore: align pyproject.toml and uv.lock to version 2.3.0 * custom code: change type hinting execute_workflow_and_wait to handle pydantic BaseModel * fix(mypy): changed type hinting of tools --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action Co-authored-by: Antoine Hoorelbeke --- .speakeasy/gen.lock | 350 +++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +- README-PYPI.md | 8 +- README.md | 8 +- RELEASES.md | 12 +- docs/models/agentscompletionrequest.md | 2 +- docs/models/agentscompletionrequesttool.md | 47 +++ docs/models/agentscompletionstreamrequest.md | 2 +- .../agentscompletionstreamrequesttool.md | 47 +++ docs/models/chatcompletionrequest.md | 2 +- docs/models/chatcompletionrequesttool.md | 47 +++ docs/models/chatcompletionstreamrequest.md | 2 +- .../models/chatcompletionstreamrequesttool.md | 47 +++ .../filesapiroutesgetsignedurlrequest.md | 8 +- docs/models/ftmodelcard.md | 2 +- docs/models/library.md | 36 +- docs/models/observabilityerrorcode.md | 3 + docs/models/tool.md | 8 +- docs/models/toolcall.md | 12 +- docs/models/toolchoice.md | 2 +- docs/models/tooltypes.md | 17 - docs/models/workerinfo.md | 10 - docs/models/workflowexecutionrequest.md | 2 +- docs/models/workflowregistration.md | 17 +- .../workflowregistrationwithworkerstatus.md | 19 +- docs/sdks/agents/README.md | 4 +- docs/sdks/chat/README.md | 4 +- docs/sdks/files/README.md | 10 +- docs/sdks/workers/README.md | 46 --- docs/sdks/workflows/README.md | 4 +- examples/mistral/chat/function_calling.py | 3 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 6 +- src/mistralai/client/accesses.py | 18 + src/mistralai/client/agents.py | 48 ++- src/mistralai/client/basesdk.py | 15 +- src/mistralai/client/batch_jobs.py | 30 ++ src/mistralai/client/beta_agents.py | 66 ++++ src/mistralai/client/campaigns.py | 36 ++ src/mistralai/client/chat.py | 48 ++- .../client/chat_completion_events.py | 30 ++ src/mistralai/client/classifiers.py | 24 ++ src/mistralai/client/connectors.py | 48 +++ src/mistralai/client/conversations.py | 66 ++++ src/mistralai/client/datasets.py | 90 +++++ src/mistralai/client/deployments.py | 12 + src/mistralai/client/documents.py | 60 +++ src/mistralai/client/embeddings.py | 6 + src/mistralai/client/events.py | 12 + src/mistralai/client/executions.py | 84 +++++ src/mistralai/client/fields.py | 18 + src/mistralai/client/files.py | 40 +- src/mistralai/client/fim.py | 12 + src/mistralai/client/fine_tuning_jobs.py | 30 ++ src/mistralai/client/judges.py | 36 ++ src/mistralai/client/libraries.py | 30 ++ src/mistralai/client/metrics.py | 6 + src/mistralai/client/models/__init__.py | 32 +- .../client/models/agentscompletionrequest.py | 35 +- .../models/agentscompletionstreamrequest.py | 35 +- .../client/models/chatcompletionrequest.py | 35 +- .../models/chatcompletionstreamrequest.py | 35 +- .../files_api_routes_get_signed_urlop.py | 4 +- src/mistralai/client/models/ftmodelcard.py | 8 +- src/mistralai/client/models/library.py | 10 +- .../client/models/observabilityerrorcode.py | 3 + src/mistralai/client/models/tool.py | 39 +- src/mistralai/client/models/toolcall.py | 5 +- src/mistralai/client/models/toolchoice.py | 5 +- src/mistralai/client/models/tooltypes.py | 9 - src/mistralai/client/models/workerinfo.py | 38 -- .../client/models/workflowexecutionrequest.py | 8 +- .../client/models/workflowregistration.py | 34 +- .../workflowregistrationwithworkerstatus.py | 34 +- src/mistralai/client/models_.py | 36 ++ src/mistralai/client/ocr.py | 6 + src/mistralai/client/records.py | 36 ++ src/mistralai/client/runs.py | 28 +- src/mistralai/client/schedules.py | 18 + src/mistralai/client/speech.py | 6 + src/mistralai/client/transcriptions.py | 12 + src/mistralai/client/utils/metadata.py | 1 + src/mistralai/client/utils/security.py | 31 +- src/mistralai/client/utils/serializers.py | 12 +- src/mistralai/client/voices.py | 36 ++ src/mistralai/client/workers.py | 162 -------- src/mistralai/client/workflows.py | 92 ++++- src/mistralai/client/workflows_events.py | 12 + uv.lock | 2 +- 90 files changed, 1851 insertions(+), 678 deletions(-) create mode 100644 docs/models/agentscompletionrequesttool.md create mode 100644 docs/models/agentscompletionstreamrequesttool.md create mode 100644 docs/models/chatcompletionrequesttool.md create mode 100644 docs/models/chatcompletionstreamrequesttool.md delete mode 100644 docs/models/tooltypes.md delete mode 100644 docs/models/workerinfo.md delete mode 100644 docs/sdks/workers/README.md delete mode 100644 src/mistralai/client/models/tooltypes.py delete mode 100644 src/mistralai/client/models/workerinfo.py delete mode 100644 src/mistralai/client/workers.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index cd97e129..b41efcba 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 42ee0bdf8fcf0fa3ee261db644fe8154 + docChecksum: 129b5c46915a7e2057badc215ab11c56 docVersion: 1.0.0 - speakeasyVersion: 1.754.0 - generationVersion: 2.862.0 - releaseVersion: 2.2.0 - configChecksum: ed5cc4cf5a87eaacbf1b77366abd2467 + speakeasyVersion: 1.761.1 + generationVersion: 2.879.6 + releaseVersion: 2.3.0 + configChecksum: 23f8bedccc0eae8d219fc0f204f0d860 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 6b0c3b1d-b7b3-4318-b2a1-5d44dd7fa3ac - pristine_commit_hash: 2e766581e0b9c6c42cbd61b500b0b6469a27a175 - pristine_tree_hash: ded10775e62be5fb057ebf7819d56da121f02829 + generation_id: 74f4d41f-0382-4c48-87ab-5df1ec902e1e + pristine_commit_hash: 56fdf394de12e7e76b15732007d7bf57395c39c8 + pristine_tree_hash: 20584b23b139630249ea450932c4b3ff9747b77e features: python: acceptHeaders: 3.0.0 @@ -21,7 +21,7 @@ features: additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.18 + core: 6.0.21 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 @@ -32,7 +32,7 @@ features: examples: 3.0.3 flatRequests: 1.0.1 flattening: 3.1.1 - globalSecurity: 3.0.5 + globalSecurity: 3.0.7 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.2.1 @@ -42,7 +42,8 @@ features: nameOverrides: 3.0.3 nullables: 1.0.2 openEnums: 1.0.4 - pagination: 3.0.7 + operationTimeout: 0.3.1 + pagination: 3.0.9 responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 @@ -219,8 +220,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:7932ecb14b0e32f46e5a4b97c83581ecdca53ddf - pristine_git_object: 99f47f5cedb79f44393f0cdb3c9a26660500cdee + last_write_checksum: sha1:d82104cf412985096b5de894972e16cc077df890 + pristine_git_object: 8627e359e0b7d0f619cc3ca060dd3d43799dd022 docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -229,14 +230,18 @@ trackedFiles: id: ad1e0e74b6b8 last_write_checksum: sha1:b2422d4dada80d54b2dd499a6659a3894318d2c9 pristine_git_object: 21ce6fb539238168e6d1dfc5a8206d55d33018d3 + docs/models/agentscompletionrequesttool.md: + id: 242b6dce104d + last_write_checksum: sha1:1ba227813be0c1047edfaf41b00bc14506374878 + pristine_git_object: c20358664c677d0e6c4179a7ac44c7e633125352 docs/models/agentscompletionrequesttoolchoice.md: id: bd8a6f9fbb47 last_write_checksum: sha1:f3d9ec3c82b6bbd2c3cbc320a71b927edcc292b1 pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:021b53d01c8f46c2a074defbb08736752e99ad9c - pristine_git_object: d5455230b1b5d640c19e1ee0f1c29361674077a7 + last_write_checksum: sha1:098b9d9c3a411d93d79cc98806933910d5cc66f4 + pristine_git_object: 3845f08c4525e95c6bb639628a1cd7a95f15d873 docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -245,6 +250,10 @@ trackedFiles: id: 4925b6b8fbca last_write_checksum: sha1:c9d0d73ca46643ffdf02e6c6cd35de5c39460c20 pristine_git_object: 981005f3ff2277eae57c56787edb5f1f62d1fe46 + docs/models/agentscompletionstreamrequesttool.md: + id: 03d75b677f51 + last_write_checksum: sha1:3e9ef8be5631387c05584ba64f66f5b6fe2d4386 + pristine_git_object: 6a11b0420d94f7c42ea1ffa6b7577552f1d3c0d1 docs/models/agentscompletionstreamrequesttoolchoice.md: id: b1f76f7a4e1c last_write_checksum: sha1:843c4946d5cab61df2cba458af40835c4e8bcafe @@ -427,8 +436,8 @@ trackedFiles: pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:9979175951fd1540db1660f0c3494217b80cde61 - pristine_git_object: d335f908276165dfc7d1b92f55ff246fcf6d2e8a + last_write_checksum: sha1:1664a70123e7e32aaba37672226e484770646607 + pristine_git_object: e04543a239686086db9ea00b278567d82d30e2df docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -437,6 +446,10 @@ trackedFiles: id: fcaf5bbea451 last_write_checksum: sha1:71a25f84f0d88c7acf72e801ced6159546201851 pristine_git_object: 749296d420c0671d2a1d6d22483b51f577a86485 + docs/models/chatcompletionrequesttool.md: + id: 01554a1b158a + last_write_checksum: sha1:e7259e65ba3c614e5e70d0d55c88db03e90097d0 + pristine_git_object: 572d12ca006caead244387a5e91000ac33b0aa0e docs/models/chatcompletionrequesttoolchoice.md: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 @@ -447,8 +460,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:213564d7a2848ad3d390419c7e12a6b11c79982a - pristine_git_object: 9d50902fe8205ab7fc646074509a1ebf5e480eab + last_write_checksum: sha1:3b794d280680af826347e708f87e9de749af202b + pristine_git_object: 9c8cdb168578ff94cb2e69989110be33aaaf9759 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -457,6 +470,10 @@ trackedFiles: id: d0e89a4dca78 last_write_checksum: sha1:a889e9580fa94bda7c848682d6ba501b7f5c0f41 pristine_git_object: a48460a92ac47fec1de2188ba46b238229736d32 + docs/models/chatcompletionstreamrequesttool.md: + id: cbfb16fb3b03 + last_write_checksum: sha1:163ad1e31d7ba4eaef7797b399d1323465e97110 + pristine_git_object: 48998fcbb16a8ce5f5a4fd8b2794125d97e935ac docs/models/chatcompletionstreamrequesttoolchoice.md: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 @@ -1147,8 +1164,8 @@ trackedFiles: pristine_git_object: 8b28cb0e5c60ac9676656624eb3c2c6fdc8a3e88 docs/models/filesapiroutesgetsignedurlrequest.md: id: 08f3772db370 - last_write_checksum: sha1:26aa0140444ccef7307ef6f236932032e4784e8f - pristine_git_object: dbe3c801003c7bb8616f0c5be2dac2ab1e7e9fb1 + last_write_checksum: sha1:7d1577169ca1d22b3088ab1157cb49192515e6f3 + pristine_git_object: 794f25f78338baae371ebd7c653ceba2d280fdfe docs/models/filesapirouteslistfilesrequest.md: id: 04bdf7c654bd last_write_checksum: sha1:0a99755150c2ded8e5d59a96527021d29326b980 @@ -1223,8 +1240,8 @@ trackedFiles: pristine_git_object: 36d3db18679569d21e6bacfe13bcd22715372297 docs/models/ftmodelcard.md: id: 15ed6f94deea - last_write_checksum: sha1:8e1383e26d86fd247fa1762dbb0508ceed932a49 - pristine_git_object: 0381dd81d0460af3aacdf81a495c304ed9b78451 + last_write_checksum: sha1:5873780bc2a828f1164818eb9c64c3f69c6618cc + pristine_git_object: f65ff6e888a460ac5f3ad3a4556ccdd8366960c0 docs/models/function.md: id: 416a80fba031 last_write_checksum: sha1:a9485076d430a7753558461ce87bf42d09e34511 @@ -1727,8 +1744,8 @@ trackedFiles: pristine_git_object: c5c142db7aaa49990135c21eabde43b8c0fdf756 docs/models/library.md: id: e8ec114dd107 - last_write_checksum: sha1:a4d6e9a777ce3d63aac24432281933ce6e13b4a9 - pristine_git_object: 4319f43df922b4924a11d494002826cb8d6dea0b + last_write_checksum: sha1:5434149d101255cb5135f8726acdcfb29c4381bd + pristine_git_object: a07d3afac18faccb504c51f1a54cf5addc3faab3 docs/models/listbatchjobsresponse.md: id: e03025d58630 last_write_checksum: sha1:de42c9396546fc8487d0bd6ed15b4076599fa83f @@ -1967,8 +1984,8 @@ trackedFiles: pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:406db6551a5ee4efba4b876239245c71f0d93822 - pristine_git_object: d121b2641c0f58c62c3b3cc73c5fdffe5e7c1d92 + last_write_checksum: sha1:e5b3959fbd1febe3c727d1e93c8df71f31b2ae9f + pristine_git_object: c2afc4d0a5b26d3b1fa83a1169e7625012340137 docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -2543,24 +2560,24 @@ trackedFiles: pristine_git_object: 4c84779c4d2e8bf2a2fe258c2b350b05d047f2e3 docs/models/tool.md: id: 8966139dbeed - last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a - pristine_git_object: fb661f72887271d5bb470e4edf025a32b00ade17 + last_write_checksum: sha1:2ab2016846da06ab38751176ba80fb6527c2818b + pristine_git_object: 85888d01cf439be601c8d1df4048c90161cf47df docs/models/toolannotations.md: id: ac541d142ff4 last_write_checksum: sha1:54d9bfd3cd764d11cd993f7ff87784bd6d11f14d pristine_git_object: f3c8fc3cf7d9b4587b47afaf67eb14608eb58b48 docs/models/toolcall.md: id: 80892ea1a051 - last_write_checksum: sha1:cb27b9d36cfe6227978c7a7a01b1349b6bac99d9 - pristine_git_object: 3819236b9f3eee2f6878818cfbbe2817e97f7de2 + last_write_checksum: sha1:621dc83981e13cbcbc21f2e16a34178c322c4566 + pristine_git_object: 9d236e8b289977d2aa7bded0d633b224c5ec9e57 docs/models/toolcallconfirmation.md: id: 944eebb142ff last_write_checksum: sha1:864ccb39a00094d965b764235e74709945abca3d pristine_git_object: 1812f7d687d83f5692d9e79709e56813ab2c79b1 docs/models/toolchoice.md: id: "097076343426" - last_write_checksum: sha1:25b33b34da02c3b46349dc8b6223f9ae18370d16 - pristine_git_object: 373046bbbc834169293b4f4ae8b2e238f952ddde + last_write_checksum: sha1:65a2794a1102fdcba6fa5a3f497630fbaf98f94b + pristine_git_object: a457f96f6e295d590a5ef75f83a5a6c4fdd41c47 docs/models/toolchoiceenum.md: id: 15410de51ffc last_write_checksum: sha1:cdff87c62661fcb902824fda8e305c5b1b98b3d8 @@ -2633,10 +2650,6 @@ trackedFiles: id: 5e2ddf7b3863 last_write_checksum: sha1:3aa9c92e9872fe75032e53e311bf050dbab51e98 pristine_git_object: 2a64e130e526f8d99e623e7cbc0c7add82d8fab0 - docs/models/tooltypes.md: - id: adb50fe63ea2 - last_write_checksum: sha1:d0d67b717773cbc99add6716e0287e64f04d24df - pristine_git_object: 345ee7dc07187e1ee06726ec63ffb75e1a34e736 docs/models/trainingfile.md: id: 4039958e8930 last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648 @@ -2845,10 +2858,6 @@ trackedFiles: id: fc4df52fb9b5 last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 - docs/models/workerinfo.md: - id: f8e56340a1d8 - last_write_checksum: sha1:29c6d1ac23a55a0a8ecb108833c516332d358b11 - pristine_git_object: 997f62ab0242d0017871a434ffbfbc2c58c69294 docs/models/workflow.md: id: a782201b7327 last_write_checksum: sha1:0a6dbea734dc94626fb53ab37c619fef48b9db63 @@ -2911,8 +2920,8 @@ trackedFiles: pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e docs/models/workflowexecutionrequest.md: id: 44a6d9ef046a - last_write_checksum: sha1:78e3aeb9a9b13ab01906e9c2d423ac4925332dc4 - pristine_git_object: 553119b16dbc695eff102eae11e80c4426612e01 + last_write_checksum: sha1:fafbe0ccef730faa8a1689ff7525fb439e77dc48 + pristine_git_object: 54f61ea35422b37fa529e0602a338e0248c05f39 docs/models/workflowexecutionresponse.md: id: 73595cfc443f last_write_checksum: sha1:3861cb1972cca17c595d1eb23518bfa54c382e89 @@ -2983,8 +2992,8 @@ trackedFiles: pristine_git_object: 4936382b48d568309c80ba1c4c25703ef3b69659 docs/models/workflowregistration.md: id: 1d0720b1355b - last_write_checksum: sha1:2d4585a731a6c2b3ac693c21da4582c1a70d2984 - pristine_git_object: aad6831aa880c56f7001a7dfbe2a41bf5e137068 + last_write_checksum: sha1:4704d8dc8f5b961ac128ccbc4ff0e95874b8a020 + pristine_git_object: 52658c64464a744ff8f64205036a7abb6e92586d docs/models/workflowregistrationgetresponse.md: id: f2658cb29bf4 last_write_checksum: sha1:ef021920be1f1cf2016887fb1e3fb7f583c3596f @@ -2995,8 +3004,8 @@ trackedFiles: pristine_git_object: e37b36713c38a44b35d0aea4fb96cc8a44658156 docs/models/workflowregistrationwithworkerstatus.md: id: a558e858a7a9 - last_write_checksum: sha1:9eb21c738b1d1ef8421cea8145691943f2d90355 - pristine_git_object: 625871c171c9a7c6d37e03daf00274155af85218 + last_write_checksum: sha1:26d77bcd8fcfb7f2940513cc0aa2af2ca1734aca + pristine_git_object: f85563cedae6cb209614fc97ecf6dd94ef810172 docs/models/workflowschedulelistresponse.md: id: 4c425808aa60 last_write_checksum: sha1:d8e8aad7a91d7f8e398f7716109d436df6c4fc86 @@ -3051,8 +3060,8 @@ trackedFiles: pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:95844e1e50f850f71580e08ed9cd1ffdefa899bc - pristine_git_object: 46fb60ef4f92d61b2959f1b67e5f07e5bae55ba7 + last_write_checksum: sha1:6ba47b049bdd791f3129c3c2443f2f5b5a18edaa + pristine_git_object: 35c3d410b8552fb536981e824e39fe04e06cd57c docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:ecf3800c83f9455471766e0f20a07192e76a736e @@ -3067,8 +3076,8 @@ trackedFiles: pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:8527d41d1095e052f0b71a9e5f7075f0a722447f - pristine_git_object: 61c8813f3f168bf958edadd985875498e5205497 + last_write_checksum: sha1:d76b41db35332bb25cfa9efec945a3488604aeb0 + pristine_git_object: 03c1b7799a271a63f209894b421004beb453d29d docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -3115,8 +3124,8 @@ trackedFiles: pristine_git_object: 3c8424419bae5c7e6e47b4cb23e35064531a8345 docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:7022f6e63afea7c7988b251351d18361fd1b5e4a - pristine_git_object: 7db76611c5788e2a0440f7c95d07928851e37d6a + last_write_checksum: sha1:45265e774720742cde1c76c8be294983bf4fc77a + pristine_git_object: 246707073e9dee115d30b20a01bf728dcb43efd7 docs/sdks/fim/README.md: id: 499b227bf6ca last_write_checksum: sha1:5b2ce811df8d867d14fe0126f2c9619cca779f56 @@ -3169,14 +3178,10 @@ trackedFiles: id: 4f1a657c8f68 last_write_checksum: sha1:8ddfebe91ff50ea863d4c0bd85c75458a482667e pristine_git_object: 3b4d135f39bdfc3237c36c03367952eae54bdd48 - docs/sdks/workers/README.md: - id: aaba95bc3191 - last_write_checksum: sha1:d940b7a4fc0866c94714f1e2a994cf08f1f83b58 - pristine_git_object: 5e2380d1d15afd204e20d0a16adc84f30e91e041 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:572ef0ec9cadcd850e3966dad909a3d2e901280a - pristine_git_object: e65383ca453849b3bab58f921f80f5b8e7df7839 + last_write_checksum: sha1:af6d1ec6698a8d58a743d67e897910038bed299a + pristine_git_object: 324c46b14e6d1bebbfe9dda2458201cb799d67d1 docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3207,80 +3212,80 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:e0d4cdfdf25c401429c0e9beb40be8846cb2a235 - pristine_git_object: 0473419e2e46dbf2e975a7fdcc5355d056752cdf + last_write_checksum: sha1:421e56bc3992cac6dd6e90992f219ac2a798fea0 + pristine_git_object: 0a44f4d847ea627a02c57dd61fb3f5c691327131 src/mistralai/client/accesses.py: id: 76fc53bfcf59 - last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 - pristine_git_object: 2cfdc7da91be41177f62b8ac7b2fe48aba42e496 + last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d + pristine_git_object: 002f0103547db5107f4646d645b11682e220b955 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:bd526b7613c13f07adee931996ec7fed54e72f26 - pristine_git_object: 2e91dd04aa66e340db8fe61ee8f04abf67798eaf + last_write_checksum: sha1:169d1fa06d2adac6017c8716d377853afd278025 + pristine_git_object: f16078e86091a52de5d3e6cb5cac7262d22bd647 src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd pristine_git_object: 597954e4facba105cee62d92ea6b8c68555f63dd src/mistralai/client/basesdk.py: id: 7518c67b81ea - last_write_checksum: sha1:2cea76931db51175b2c787d0c707f08e9944c22f - pristine_git_object: a976121bd224d64497e5006cb58dd728f6a67144 + last_write_checksum: sha1:321a95c38231ed5126753702e6368a85a1af1667 + pristine_git_object: 4a27eb2ff362dd6189abfde2c8f739b70deab192 src/mistralai/client/batch.py: id: cffe114c7ac7 last_write_checksum: sha1:b452983f67b33f26e1faa60fdbbb171cb1877224 pristine_git_object: 7e36fd0d73ebeb873f74f4109896a6cf3bb7d2ba src/mistralai/client/batch_jobs.py: id: 3423fec25840 - last_write_checksum: sha1:cd6fa64476a43c23709383118c39c307acdcd64f - pristine_git_object: dc378cde31e59b39f2569e71496b9e8abf8a5056 + last_write_checksum: sha1:ae829e85bfc6194483f8fa2185e8634806a9cb58 + pristine_git_object: 9c6fd9c268e0d242c63277812bd0b0224ac61475 src/mistralai/client/beta.py: id: 981417f45147 last_write_checksum: sha1:0971bda6a9024dcbdf8b4aaad1086417b01ee40f pristine_git_object: 83b8fc8792469efbd03f0bab240d4a6dc8135db5 src/mistralai/client/beta_agents.py: id: b64ad29b7174 - last_write_checksum: sha1:4ef1760cf665e0349b830e811dd15e8ac84ca31c - pristine_git_object: 00a0a1975533553fd9d5313afc533a67bf5c4643 + last_write_checksum: sha1:7b5b7ca9dd622067ee3da020687579d7974754c9 + pristine_git_object: 5d60170e267f453aa4c2db7c6b2d48f7b4c69366 src/mistralai/client/campaigns.py: id: 9e64fcf4e60e - last_write_checksum: sha1:0139096765ca8b44ef209ee0fc62e72040f3a6ff - pristine_git_object: a1ffcebc7c98a3c889ccace55c9a6c9cf3ff28df + last_write_checksum: sha1:5fb00fbd6551d63a545e3a28a4e8d55ea5d49daf + pristine_git_object: 427bef5e086a425aaa14381aba53085681029f3e src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:dced89ea82a30a61e0c62db2f2a0c3be8a7ba099 - pristine_git_object: c11a53d1237c284ff74b5aba791bd405bac2d0ff + last_write_checksum: sha1:5e8b0d17268471e3b914358c1477bd1ca43357e5 + pristine_git_object: cfc615eb0e529539f74cb69049ef7ff3fcc9d8d5 src/mistralai/client/chat_completion_events.py: id: 1813f339625b - last_write_checksum: sha1:cde21c8338e4fd60143fdc6ca361c0c42ec54775 - pristine_git_object: c060235c2c673b41c5fe0d1c8ac3a5c2a3d44e62 + last_write_checksum: sha1:1e7ed51f7ad879b3cd903d66e52716717142e4a8 + pristine_git_object: 9d00fe4f80b3cb63828aa028b74033b2e47600df src/mistralai/client/classifiers.py: id: 26e773725732 - last_write_checksum: sha1:ee94a4e50cda893f9c19c2304adda8b23fc2de9e - pristine_git_object: 67199b601e38dff6fc6a4317eb845fbde6c25de0 + last_write_checksum: sha1:733bff8a462ff4190ff4c2aeb963ff153ba1ea79 + pristine_git_object: 9fd3b3a1b28b155ee397a6edb6da106408c3bade src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:61a434ec297f20aea468fe6c34cca60ad5f36bec - pristine_git_object: 238f927703af44c9449a1d0ae90eefedbfc43c12 + last_write_checksum: sha1:78489e58ca183c5db5e7c0efaf3351cf104aa452 + pristine_git_object: fc9d6319b4d321e21a7b7d73515f9d13b9ac8a2a src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:f5f2e6d1d78b75177d6b831b69b212956926eede - pristine_git_object: 9aeb5b559a02f43004b8f93701c9adfbeab3d608 + last_write_checksum: sha1:b975766d73e0c407ae43bd79c52fa604233fbb73 + pristine_git_object: 49810eb612208745b2a2cf26fc8419245f86520b src/mistralai/client/datasets.py: id: e5a6ae2a2d85 - last_write_checksum: sha1:2483bd56b90599039573c2c152dcbffa8ba8b3b8 - pristine_git_object: 48ecbdd8c1b2f42fa77a033aa0e4b4f49d20f088 + last_write_checksum: sha1:52f8dc6df7430622882b02e8d01d8da02e4e998f + pristine_git_object: f9a8dec3fe679e1f1bde07dd6a93a3af8b5c3732 src/mistralai/client/deployments.py: id: a874b267fcb9 - last_write_checksum: sha1:0ef6db65bcea6d41d204d925281ad0ba6763263f - pristine_git_object: a428c61cff07e1d789ec9dfca2a795b2ab4c544a + last_write_checksum: sha1:ed90412267891097432b4a988cd6113d35530c9b + pristine_git_object: 6613b91c79b3aaa7e3a43fe815b2e018167e47e3 src/mistralai/client/documents.py: id: bcc17286c31c - last_write_checksum: sha1:29e7edd6f45d8a1a7ec8e9c9734bebe56ff97e7e - pristine_git_object: 95ea432390fcf4c8c07b3e99c7c1f5776007ce10 + last_write_checksum: sha1:88e164a0a1fc0608c42ad77864b43b788a25cd2c + pristine_git_object: 701e53108423fdf17db03fbf52c76a880af37d7e src/mistralai/client/embeddings.py: id: f9c17258207e - last_write_checksum: sha1:d1610bf12dba8b2f8cb27d2f0aa592594dfe6b3a - pristine_git_object: 5d55ffc43c0c98d46e04b238ab23a08d1b9e6a6a + last_write_checksum: sha1:3766f5877ce2bb2069e0881b4f4c22b4beb7b8d6 + pristine_git_object: a8a15363d4daeeae90186a74685ed76d440b481f src/mistralai/client/errors/__init__.py: id: 0b2db51246df last_write_checksum: sha1:0032f4eb3501c71fafb8f68113a8c80e677311a4 @@ -3311,52 +3316,52 @@ trackedFiles: pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d src/mistralai/client/events.py: id: ac9b961cc70d - last_write_checksum: sha1:8ec0c8993e2d8839f9b83b0674ad83866308593f - pristine_git_object: c57ad094c6e521448ae299fcb2184acc466d99a4 + last_write_checksum: sha1:6a2146acbeee59ba5f3b20dc87cde247b25ec04a + pristine_git_object: db3ebcf5f9830ebbdf7c055104aadc7677a73710 src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:fe54e0d46152727ceec431d06c2d635f8ce6ff9b - pristine_git_object: 66ec396bfc42e67aff34e2b6d986452168339a01 + last_write_checksum: sha1:af39569f54368dfd89eb74e6ff6d00e75155c06a + pristine_git_object: 4e6291f40a44f69f8d49a775cc4918770c8fe744 src/mistralai/client/fields.py: id: 862335210b20 - last_write_checksum: sha1:789ac221e3aec61d0d31abd1761e368e383fba88 - pristine_git_object: a5b8003ca5fc766a7db89d6c95b9d0e42952af86 + last_write_checksum: sha1:af527d7976d092d01437a584fc692c07fd1e5f6d + pristine_git_object: 1ac05dc5281541da93cabcc8bbb4caac9090dad2 src/mistralai/client/files.py: id: f12df4b2ce43 - last_write_checksum: sha1:e60cfc2841ef8888a6a52479adf76ec32ecae6ac - pristine_git_object: a843cb7b2b1b55ba20093c4d43faddb972d8f645 + last_write_checksum: sha1:a09a667a20e56ab900500a00f7f8fc329219b49c + pristine_git_object: 0728e9a29b1703ec98c2e7c9d2984b30c51757fc src/mistralai/client/fim.py: id: 217bea5d701d - last_write_checksum: sha1:dc427c9e954dfb9a7fe2df8b5c544877a28cdc73 - pristine_git_object: 8ffb7730a03398322dfdd6c83724096d4924c5c5 + last_write_checksum: sha1:e891b3dd75c481e6692b0223390cc8b914bfcf28 + pristine_git_object: b4253ad61578202a83ccbf90f33249370d9432fb src/mistralai/client/fine_tuning.py: id: 5d5079bbd54e last_write_checksum: sha1:fe1f774df4436cc9c2e54ed01a48db573eb813cd pristine_git_object: df6bc5643a13294ddfbeecc6ae84d00cd7199bed src/mistralai/client/fine_tuning_jobs.py: id: fa1ea246e0b2 - last_write_checksum: sha1:8cbf3827f5c2e43170192de39be498af0bf24cf0 - pristine_git_object: c2ee871bb1ccf7e3e24081121a7e54f1483eee5c + last_write_checksum: sha1:be61b90560da5c1b4ff57b922e0e65484fe9c00b + pristine_git_object: f13c8f2ddc0c5476923027db309324213a447a28 src/mistralai/client/httpclient.py: id: 3e46bde74327 last_write_checksum: sha1:0f4ecc805be1dc3d6e0ca090f0feb7d988f6eb9d pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 src/mistralai/client/judges.py: id: b6024a41ecb4 - last_write_checksum: sha1:4179fabb26ef8b8a9af00a95672f39d6ea87073e - pristine_git_object: b0eb1ea0965f63efb681d8364ac456b96f1e3983 + last_write_checksum: sha1:f79c7d8e28e343cd699cf36a6d53165cc54d8da2 + pristine_git_object: 210a147a86956d2da0d2e80d51d37bf4fa3bafd4 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:d4bde8bbd8ec4200c119e2c27a2e1f5eb32741ef - pristine_git_object: 84624c4dae3b51b1a58537f54bb05902e1edea8c + last_write_checksum: sha1:2c86ed3940b6e4841807d6b36e67fecd1bb44525 + pristine_git_object: 053cb65df029ea9899e0b565dec6e34e3525b3e0 src/mistralai/client/metrics.py: id: 937cb03f8130 - last_write_checksum: sha1:f218d4230e66e0aebe25291bba5d76df2ce78d5d - pristine_git_object: 3df1ca56638d59e5a8bd36fd762e49fd1c5df7b9 + last_write_checksum: sha1:0f650d881a321f34f03cf53d841bdb422516d699 + pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:6fb0669e1dbb4fcd2b249b20a6ef5f88761c2dc6 - pristine_git_object: 6c15ed3a5ea208cb974b0c5757487282a38e9cf0 + last_write_checksum: sha1:f892a946a4a176a79389c6a269c81c20fbc67dc3 + pristine_git_object: 5e03fddf3dc1714611a237497881d5803b7e32e9 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -3491,12 +3496,12 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:87237462a5289c5aac2d1ce59b8b766342dd5ccd - pristine_git_object: f4ce34cb614a992f5276a1664d05426b2b16766a + last_write_checksum: sha1:864a66223d00005d44a00a171a7156f21affe113 + pristine_git_object: a919dbc37f94920eafa1cb81414afc00323fcecb src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:a449cb9287617ba7337a73777b7ab50479e7cd87 - pristine_git_object: 0feb38038f5aec52bb393c633a0913b99b1579a7 + last_write_checksum: sha1:452d2699fce04c94c58e596c19693d9dcb2fee9b + pristine_git_object: 05df8ae7ad8e7715a66e10c8e06daf267ff44acd src/mistralai/client/models/annotations.py: id: 3ae9e07de11d last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 @@ -3627,16 +3632,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:bcc680ee202ce920823502f59f8549453cf4a999 - pristine_git_object: f1b0b2d61beae2827b9f66331d74850e7c56be91 + last_write_checksum: sha1:323abe229ce9962309c98a4abe079057957e3831 + pristine_git_object: 1d0cf90d133dc843603b5d398b81c692993ddf80 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:dd9dc2cd5d154e7a8e6cff928fe47582e0d4bd81 - pristine_git_object: d9f413c673b030a4ebd1cd363b0376a009b45540 + last_write_checksum: sha1:2f609b08fb18ef6cebd484d89f35de59c96ffac5 + pristine_git_object: 5cdccafb4330960b8a54475682d0939d42341903 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -4159,8 +4164,8 @@ trackedFiles: pristine_git_object: 83de8e73a3d50917e4a41bb92a828a10e646a632 src/mistralai/client/models/files_api_routes_get_signed_urlop.py: id: 0a1a18c6431e - last_write_checksum: sha1:4cf67e8cafa1f448caf9b251dd9db3e9c87d062e - pristine_git_object: 326dd1d305261acc1407e6f70100b3b59dfcee5c + last_write_checksum: sha1:46c5a0babdc6df693c03355f22131ff8d847389c + pristine_git_object: c381244b5d819e48ca7d1ad5064726fd6627cfd1 src/mistralai/client/models/files_api_routes_list_filesop.py: id: b2e92f2a29b4 last_write_checksum: sha1:18f318488f01a9a919c8650ee1f5eb825c39c91d @@ -4219,8 +4224,8 @@ trackedFiles: pristine_git_object: ccb0f21b5a69f91119bec9db6e9f3d876e4c35af src/mistralai/client/models/ftmodelcard.py: id: c4f15eed2ca2 - last_write_checksum: sha1:4382bdc5744ed2199c0aefcf32d8d9e0d02c42f4 - pristine_git_object: 922667b0f7726824d0de4b18eac2ff86b271bccb + last_write_checksum: sha1:1c3ab1bda3fa9e2df33b47a49d5e9b9e2d82a701 + pristine_git_object: bb7c52c881ceadccdeb3590104e774f3d2ad94d7 src/mistralai/client/models/function.py: id: 32275a9d8fee last_write_checksum: sha1:c01c1ed54b3086859cde0dd3c3c466c78d8323ae @@ -4663,8 +4668,8 @@ trackedFiles: pristine_git_object: 54b0ab708c665ccb841b1c8d0f2748c390850506 src/mistralai/client/models/library.py: id: 028a34b08f9c - last_write_checksum: sha1:3ac8546f2ada4f9a24d8296e03b9ad61d5f2e372 - pristine_git_object: c26710ff4818c9719e08b67d147ee9bded3dc46d + last_write_checksum: sha1:82eb895302f95f3f1a1adf85070027e22ab22350 + pristine_git_object: 0e09cfaa14040397a37ac72810521fb14fe6562f src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py: id: 0c6586ffcab0 last_write_checksum: sha1:c7d7be66560be5bb813316f958a3fecdf7813156 @@ -4855,8 +4860,8 @@ trackedFiles: pristine_git_object: 76ebfd0de6c7457bcecb1aee026ea16ffa8a7cbd src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 - last_write_checksum: sha1:f52abcb9e8f504fd9993679611912d3b64270452 - pristine_git_object: 99360d410f7128756a7a7f6be6772238fa15c12f + last_write_checksum: sha1:fb2ec69dac101416f58bc9fc3e3828b3ab39e10f + pristine_git_object: f7ff71f8285e62f2bad5fd678865c96e40c38253 src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 @@ -5295,24 +5300,24 @@ trackedFiles: pristine_git_object: 8d3773752444db865c0e2629ad9eed66eb7f2bc6 src/mistralai/client/models/tool.py: id: 48b4f6f50fe9 - last_write_checksum: sha1:ed3725d5da10e6a201f73724a2bbf618bdbb2a33 - pristine_git_object: 1d1c5ce557321c33b036949fa4c625fb25e38f95 + last_write_checksum: sha1:507bcbe7af5e919614c27c0704f1c26def7da2bd + pristine_git_object: a83a6d1c4f66ae2876179e4cf3967f84b013f020 src/mistralai/client/models/toolannotations.py: id: 2ae257a35b01 last_write_checksum: sha1:6f7c174966fc9a9fee5de7c8dfa4dbf2064c10e4 pristine_git_object: b2e9b94808b96b859d29c42aa0d5ca994761a395 src/mistralai/client/models/toolcall.py: id: fb34a1a3f3c2 - last_write_checksum: sha1:a0e14e69a107d88239e1ee43d2e8fd498eb034a4 - pristine_git_object: 29f1149cd07dfc2744a1088d271af65e4ad70012 + last_write_checksum: sha1:f07d54b25fddde055361c448764a428238c57a4a + pristine_git_object: 1424d87929b8c7f19205eb1a348c8278b436e817 src/mistralai/client/models/toolcallconfirmation.py: id: f2e953cfb4fe last_write_checksum: sha1:554a2e073917ffb479efe5887c0b59a2f4967c6e pristine_git_object: fd6eca50a7ec2f4cca2ae20958717881660e0ac5 src/mistralai/client/models/toolchoice.py: id: 14f7e4cc35b6 - last_write_checksum: sha1:531f7ac1d7cd7d99b79756b9c673463dd33f2011 - pristine_git_object: ce84573ae34624b1e07f7001d3a00bf36d620e5f + last_write_checksum: sha1:bf3eaf4ce3feeff3dd44e6ac69783f2833333c3e + pristine_git_object: e7a17d5cdebe8206f6df70e3be29afff68fbfe79 src/mistralai/client/models/toolchoiceenum.py: id: c7798801f860 last_write_checksum: sha1:5388b2a6fad842f8e4ae79e6257b4d14c122a6ff @@ -5357,10 +5362,6 @@ trackedFiles: id: cbe8c44aee50 last_write_checksum: sha1:53949106f192944a13a8fcbeb37b3d08478b7bbc pristine_git_object: 1a7781fc2c1001002785d512ed7909ce91a9129f - src/mistralai/client/models/tooltypes.py: - id: 86c3b54272fd - last_write_checksum: sha1:e90c15c1e645a5f207af0c7ac728cb0a521c6706 - pristine_git_object: e601c1967c42ef8d0c2eea98bc5c0ca722cde066 src/mistralai/client/models/trainingfile.py: id: 2edf9bce227d last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0 @@ -5541,10 +5542,6 @@ trackedFiles: id: 26b0903423e5 last_write_checksum: sha1:e486f50095cc7540ce828fff7571c6aa6748bf2f pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae - src/mistralai/client/models/workerinfo.py: - id: 0c231087534e - last_write_checksum: sha1:0d9e4e56c7a4c570ccf49bcdc835b33f7500629b - pristine_git_object: 65edcec61125e3276bddabf424ec289667b3b671 src/mistralai/client/models/workflow.py: id: 1548cd73984e last_write_checksum: sha1:14e1db57af8784d77633d7dc1d22198f2377909b @@ -5607,8 +5604,8 @@ trackedFiles: pristine_git_object: ffebdb82a1a80d1d086b919da9b33e2f090388c4 src/mistralai/client/models/workflowexecutionrequest.py: id: 806340497ed4 - last_write_checksum: sha1:43851e98d4c14ebdda88c5ab4412ae3a7a1d0002 - pristine_git_object: bf6a5fa0cddf979efb8ad32df77affac7f7156e8 + last_write_checksum: sha1:5270ee18d5eef0a52762ade3d207a8bbaa154f72 + pristine_git_object: 615276d30bf6131df5415a9d1d0476a0a3e16521 src/mistralai/client/models/workflowexecutionresponse.py: id: 758786637be5 last_write_checksum: sha1:2544bf94e8d64a9bd33f37ff4737f320fcd84733 @@ -5675,8 +5672,8 @@ trackedFiles: pristine_git_object: d80bb3db6cbc69404e22007a78bbef209c03c658 src/mistralai/client/models/workflowregistration.py: id: 2b937728c88b - last_write_checksum: sha1:1695e971dc6aeb546f3a35a8e47252aaa492fb1b - pristine_git_object: e23f9fb2987490d8ec3df97ec94f1190141c90c3 + last_write_checksum: sha1:aa049285311701b56fa1b3f331b395174cc9ece3 + pristine_git_object: 7c65801d28753f738dc9f0b8f06aabd4b8a50ffc src/mistralai/client/models/workflowregistrationgetresponse.py: id: f063656f22ae last_write_checksum: sha1:cc7b4d3b71ea8bb8ae452c6fd3e4acc710a18321 @@ -5687,8 +5684,8 @@ trackedFiles: pristine_git_object: e66f219b28849d7a49af7c764389e0d1d1ee7f37 src/mistralai/client/models/workflowregistrationwithworkerstatus.py: id: 23b661b9496f - last_write_checksum: sha1:a6b74946adb241437f4c2f40056a4b030ded1fc8 - pristine_git_object: c0d9a69e33992cd94755efa06df8a74406d9076f + last_write_checksum: sha1:b09da5640b53502f1d2935729b17655c176de27e + pristine_git_object: 62c379d91f6f8e0b2842b11208513635160a0c02 src/mistralai/client/models/workflowschedulelistresponse.py: id: e5247c5183bb last_write_checksum: sha1:37cea2f0f3220331105f9454169f1ea49ed1b51a @@ -5739,32 +5736,32 @@ trackedFiles: pristine_git_object: 7f469007b8ceb86f2d4faa09d3335ac874a6fe24 src/mistralai/client/models_.py: id: 1d277958a843 - last_write_checksum: sha1:f68fc105aca375b135a00026dbbec818cd55cd73 - pristine_git_object: 7bb6dc1de1309509b5b49e743d5b5ac80cf976f3 + last_write_checksum: sha1:4247baa39847450e7d4d42678b6199dc83e9f057 + pristine_git_object: 1e96448537301468be159bd870d6d01d4928dfd8 src/mistralai/client/observability.py: id: 453a1d06d130 last_write_checksum: sha1:62d4d03a08807271b404a8684b1153a739d70b05 pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 src/mistralai/client/ocr.py: id: 2f804a12fc62 - last_write_checksum: sha1:707d91582149e76a3109df8b1a58bfd44111a93d - pristine_git_object: a46119d1577036be57896a7ea3737ab508497e4f + last_write_checksum: sha1:363a9a3de3358200ac1d8d8eb35cdff633c34da8 + pristine_git_object: be0cdfad42069f535bca52e4568ea0ea26c5af93 src/mistralai/client/py.typed: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/client/records.py: id: 10f90c990bd8 - last_write_checksum: sha1:47018c027eb2c9d9235f399b939073e396bd52ad - pristine_git_object: ceb8de4fe3edfbd818f6002381c365ea8437ac2c + last_write_checksum: sha1:e4d0a85b402c59788843296276dd516b07311d3b + pristine_git_object: a47d12c36d50f3b8cd0e56d840e1394647f887ba src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:a93e99bb1a5e8ba9afbe9a5dd6869c1a5f45c7b8 - pristine_git_object: 3e875ba8927d9b2e1829bbaa2ebeeb006696509e + last_write_checksum: sha1:4dfcc99df0f9951dbebedb7d124096d04f05fed2 + pristine_git_object: 08394802d34bba34d8fcd25285a8a77b5a1b285f src/mistralai/client/schedules.py: id: d3b4fe452390 - last_write_checksum: sha1:74a1455c5ba17253d2e878f638b7314edca66e21 - pristine_git_object: d6f2e5ff1a4c985acc48e1ea540537fbcf4bf92d + last_write_checksum: sha1:029d95bc3440ffd3b03a89fd045283d7ddab19a8 + pristine_git_object: d036900982e6db67d9d3f79f4e906541a1af0179 src/mistralai/client/sdk.py: id: 48edbcb38d7e last_write_checksum: sha1:a606046063cd946633918efa1662846c987c9b7e @@ -5775,12 +5772,12 @@ trackedFiles: pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 src/mistralai/client/speech.py: id: 5c1f1109aa5e - last_write_checksum: sha1:22b38977bf8e1f53219a2146b15f471ad1ebf4f7 - pristine_git_object: fe57e2fa80ced90774b9ea60199e138ce781c9a3 + last_write_checksum: sha1:5c4164ac1ab12f0808440110abe268921576833f + pristine_git_object: 4c3aafd507c086a0b6388834276c9510d3ed0f49 src/mistralai/client/transcriptions.py: id: 75b45780c978 - last_write_checksum: sha1:27a5b7dd6ed47b0f79b95fbb8599d439512ef344 - pristine_git_object: 7f01917d6e462cff9af75e70d32afbcc5958c7de + last_write_checksum: sha1:e333611029fccbd1fb66f7a1e96025c9311bc5b5 + pristine_git_object: d6489bf302d1d0edbc02466418444a9a4d5fec63 src/mistralai/client/types/__init__.py: id: 000b943f821c last_write_checksum: sha1:12a4ace69cbc63f1125eeddf901afed7cdf378b0 @@ -5827,8 +5824,8 @@ trackedFiles: pristine_git_object: 3edad8307ea0ef38e857596a3ec11023a4af287f src/mistralai/client/utils/metadata.py: id: d49d535ae52c - last_write_checksum: sha1:54d300a665d3d5eafcc778a795d79347479b8337 - pristine_git_object: d46ffa59952926b7b1a842b0db2475527eda87df + last_write_checksum: sha1:aa5a42fb2fc9dd6469532a633648e8f1a8dad9bf + pristine_git_object: 3850a6ffb6c990a784b1692cefc81de3d67f611a src/mistralai/client/utils/queryparams.py: id: bb77d4664844 last_write_checksum: sha1:d02ce5b2dcc26edb7c937d75b98b70c22a5af189 @@ -5843,12 +5840,12 @@ trackedFiles: pristine_git_object: bea1304150e77ca06185efb7db7798aaacd5e623 src/mistralai/client/utils/security.py: id: 1acb7c006265 - last_write_checksum: sha1:3981f6571daf28b3b553beb09a4ebeeeb6ceff14 - pristine_git_object: d8b9d8fe746babd0a87846812b1f4117d1a46de2 + last_write_checksum: sha1:9f176b3d22a80f5be7f22e1879ec33a3773cf765 + pristine_git_object: 77a4449d0b54ac5c43fa150ef38ed0406c5dff66 src/mistralai/client/utils/serializers.py: id: 53c57c7f29a8 - last_write_checksum: sha1:8a3a15cf273034261111f2559cacbb579e17cb1b - pristine_git_object: fbc2772dc4284775be92de6a086c1eade9376417 + last_write_checksum: sha1:cd2d92c815492970aa7bba28346ea0e434a4169b + pristine_git_object: 691957f486c9adf667b8fbedcf04abc043f7a724 src/mistralai/client/utils/unions.py: id: d23713342634 last_write_checksum: sha1:f814d757474f039199f501aa53cdfba97a8c6645 @@ -5867,20 +5864,16 @@ trackedFiles: pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c src/mistralai/client/voices.py: id: ab76b1377d79 - last_write_checksum: sha1:a71af619fe7d44cb4e537b739cf3ae71d1f8da68 - pristine_git_object: 2d57185746c0b2deee7c614c69a528c4a6565ee7 - src/mistralai/client/workers.py: - id: 54a46aba8359 - last_write_checksum: sha1:009ae7cbfc6ff8eb8bf29a6ccca93192ef643416 - pristine_git_object: e2d41c70ecaeec1439ff9398b79de2af7eca54f1 + last_write_checksum: sha1:c46a418a865955ab8b72d7d2584ba9b758f75165 + pristine_git_object: c4f1a71e1da1cb4ebda3ef4fb69cbbe98370d2ae src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:df0555b350409d103ca9715c69fab2e061d7ea41 - pristine_git_object: aae12f774608d18baf1bf5ccedd1a39363c0c29d + last_write_checksum: sha1:548758b46035b2624fd8d596e34465866701ce4d + pristine_git_object: d73da8d95d7ec6644253994641616d1121f7f023 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef - last_write_checksum: sha1:ee029cad739604429d7cff743f2a469cd3cd4076 - pristine_git_object: db39e37006754e212084cab34f47480e07c36bbf + last_write_checksum: sha1:79816d0388e471a4bbb3d09df84794e9405cf3b2 + pristine_git_object: 57b6f1cbff925f194f8ec6275222271c0fc5f02d examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -7994,7 +7987,7 @@ examples: include_shared: true responses: "200": - application/json: {"workflow_registration": {"id": "db19a749-c9a8-4fc8-a04b-540b6b648c8f", "task_queue": "", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "78b8c35a-8488-497f-80f4-8fef6fbbd4ad", "compatible_with_chat_assistant": false, "active": false}, "workflow_version": {"id": "e35a35c7-8a69-4bf2-a597-e2b0916c4c5e", "task_queue": "", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "2238d5fa-45be-48d4-9705-a1852ab34b83", "compatible_with_chat_assistant": false, "active": false}} + application/json: {"workflow_registration": {"id": "db19a749-c9a8-4fc8-a04b-540b6b648c8f", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "78b8c35a-8488-497f-80f4-8fef6fbbd4ad", "compatible_with_chat_assistant": false, "active": false}, "workflow_version": {"id": "e35a35c7-8a69-4bf2-a597-e2b0916c4c5e", "definition": {"input_schema": {"key": ""}, "enforce_determinism": false}, "workflow_id": "2238d5fa-45be-48d4-9705-a1852ab34b83", "compatible_with_chat_assistant": false, "active": false}} "422": application/json: {} archive_workflow_v1_workflows__workflow_identifier__archive_put: @@ -8295,6 +8288,7 @@ examples: application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes:\n* `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow_registration()`: `request.input` **Changed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow()`: `request.input` **Changed** (Breaking ⚠️)\n* `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_explorer()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.fetch_status()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.list_events()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_campaign()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.judge()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.search_ids()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.search()`: `error.detail.error_code` **Changed**\n* `mistral.workflows.workers.whoami()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0c50d415..55eaf3cf 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.2.0 + version: 2.3.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index fff0c8c6..54a3a99c 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.754.0 +speakeasyVersion: 1.761.1 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf - sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 + sourceRevisionDigest: sha256:81c5da3669badf36ebd872b50b44e946d9d55546c163e7973ecf7e75d0ed46b3 + sourceBlobDigest: sha256:ffca608665624fae7a884937d899788f639e36ac5b9c94d09e3acc5d6512f78a tags: - latest targets: @@ -38,13 +38,13 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf - sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 + sourceRevisionDigest: sha256:81c5da3669badf36ebd872b50b44e946d9d55546c163e7973ecf7e75d0ed46b3 + sourceBlobDigest: sha256:ffca608665624fae7a884937d899788f639e36ac5b9c94d09e3acc5d6512f78a codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:87ec31b36ce736c3f60cce2c11b8192bb5617b5ce9d881aadc0cf4a86563173c + codeSamplesRevisionDigest: sha256:11e9928b89f856d16bd543b0eaa760ce88344fce7366df646847b9f3533bc4c7 workflow: workflowVersion: 1.0.0 - speakeasyVersion: 1.754.0 + speakeasyVersion: 1.761.1 sources: mistral-azure-source: inputs: diff --git a/README-PYPI.md b/README-PYPI.md index 8c97f93c..703095e4 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -730,10 +730,6 @@ print(res.choices[0].message.content) * [schedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow -#### [Workflows.Workers](https://github.com/mistralai/client-python/blob/main/docs/sdks/workers/README.md) - -* [whoami](https://github.com/mistralai/client-python/blob/main/docs/sdks/workers/README.md#whoami) - Get Worker Info - @@ -944,8 +940,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 169 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 169 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 168 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index 156f344f..941ac903 100644 --- a/README.md +++ b/README.md @@ -730,10 +730,6 @@ print(res.choices[0].message.content) * [schedule_workflow](docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow -#### [Workflows.Workers](docs/sdks/workers/README.md) - -* [whoami](docs/sdks/workers/README.md#whoami) - Get Worker Info - @@ -944,8 +940,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 169 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 169 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 168 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 852ddced..bd0050f9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -528,4 +528,14 @@ Based on: ### Generated - [python v2.2.0] . ### Releases -- [PyPI v2.2.0] https://pypi.org/project/mistralai/2.2.0 - . \ No newline at end of file +- [PyPI v2.2.0] https://pypi.org/project/mistralai/2.2.0 - . + +## 2026-04-03 12:19:06 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.3.0] . +### Releases +- [PyPI v2.3.0] https://pypi.org/project/mistralai/2.3.0 - . \ No newline at end of file diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 99f47f5c..8627e359 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionRequestMessage](../models/agentscompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionRequestTool](../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/agentscompletionrequesttool.md b/docs/models/agentscompletionrequesttool.md new file mode 100644 index 00000000..c2035866 --- /dev/null +++ b/docs/models/agentscompletionrequesttool.md @@ -0,0 +1,47 @@ +# AgentsCompletionRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index d5455230..3845f08c 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -12,7 +12,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionStreamRequestMessage](../models/agentscompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionStreamRequestTool](../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/agentscompletionstreamrequesttool.md b/docs/models/agentscompletionstreamrequesttool.md new file mode 100644 index 00000000..6a11b042 --- /dev/null +++ b/docs/models/agentscompletionstreamrequesttool.md @@ -0,0 +1,47 @@ +# AgentsCompletionStreamRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 4e29ad05..042988e6 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionRequestMessage](../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionRequestTool](../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/chatcompletionrequesttool.md b/docs/models/chatcompletionrequesttool.md new file mode 100644 index 00000000..572d12ca --- /dev/null +++ b/docs/models/chatcompletionrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index 7ece3742..9783d010 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -15,7 +15,7 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionStreamRequestTool](../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/models/chatcompletionstreamrequesttool.md b/docs/models/chatcompletionstreamrequesttool.md new file mode 100644 index 00000000..48998fcb --- /dev/null +++ b/docs/models/chatcompletionstreamrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionStreamRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/docs/models/filesapiroutesgetsignedurlrequest.md b/docs/models/filesapiroutesgetsignedurlrequest.md index dbe3c801..794f25f7 100644 --- a/docs/models/filesapiroutesgetsignedurlrequest.md +++ b/docs/models/filesapiroutesgetsignedurlrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `file_id` | *str* | :heavy_check_mark: | N/A | -| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the url becomes invalid. Defaults to 24h | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. | \ No newline at end of file diff --git a/docs/models/ftmodelcard.md b/docs/models/ftmodelcard.md index 0381dd81..f65ff6e8 100644 --- a/docs/models/ftmodelcard.md +++ b/docs/models/ftmodelcard.md @@ -20,6 +20,6 @@ Extra fields for fine-tuned models. | `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `type` | *Literal["fine-tuned"]* | :heavy_check_mark: | N/A | -| `job` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `job` | *str* | :heavy_check_mark: | N/A | | `root` | *str* | :heavy_check_mark: | N/A | | `archived` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/library.md b/docs/models/library.md index 4319f43d..a07d3afa 100644 --- a/docs/models/library.md +++ b/docs/models/library.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `owner_type` | *str* | :heavy_check_mark: | N/A | -| `total_size` | *int* | :heavy_check_mark: | N/A | -| `nb_documents` | *int* | :heavy_check_mark: | N/A | -| `chunk_size` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `emoji` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `generated_description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `explicit_user_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `explicit_workspace_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `org_sharing_role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `generated_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Generated Name | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `owner_type` | *str* | :heavy_check_mark: | N/A | +| `total_size` | *int* | :heavy_check_mark: | N/A | +| `nb_documents` | *int* | :heavy_check_mark: | N/A | +| `chunk_size` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `emoji` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `generated_description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `explicit_user_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `explicit_workspace_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| ~~`org_sharing_role`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `generated_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Generated Name | \ No newline at end of file diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index d121b264..c2afc4d0 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -56,4 +56,7 @@ This is an open enum. Unrecognized values will not fail type checks. - `"EVALUATION_RUN_TRANSITION_IS_INVALID"` - `"EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY"` - `"EVALUATION_RUN_TRANSITION_ERROR"` +- `"TEMPLATE_ERROR"` - `"TEMPLATE_SYNTAX_ERROR"` +- `"PROJECT_NAME_ALREADY_EXISTS"` +- `"EVALUATION_NAME_ALREADY_EXISTS"` diff --git a/docs/models/tool.md b/docs/models/tool.md index fb661f72..85888d01 100644 --- a/docs/models/tool.md +++ b/docs/models/tool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `type` | *Union[Literal["function"], UnrecognizedStr]* | :heavy_check_mark: | N/A | +| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/toolcall.md b/docs/models/toolcall.md index 3819236b..9d236e8b 100644 --- a/docs/models/toolcall.md +++ b/docs/models/toolcall.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | -| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | +| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/toolchoice.md b/docs/models/toolchoice.md index 373046bb..a457f96f 100644 --- a/docs/models/toolchoice.md +++ b/docs/models/toolchoice.md @@ -7,5 +7,5 @@ ToolChoice is either a ToolChoiceEnum or a ToolChoice | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | | `function` | [models.FunctionName](../models/functionname.md) | :heavy_check_mark: | this restriction of `Function` is used to select a specific function to call | \ No newline at end of file diff --git a/docs/models/tooltypes.md b/docs/models/tooltypes.md deleted file mode 100644 index 345ee7dc..00000000 --- a/docs/models/tooltypes.md +++ /dev/null @@ -1,17 +0,0 @@ -# ToolTypes - -## Example Usage - -```python -from mistralai.client.models import ToolTypes - -# Open enum: unrecognized values are captured as UnrecognizedStr -value: ToolTypes = "function" -``` - - -## Values - -This is an open enum. Unrecognized values will not fail type checks. - -- `"function"` diff --git a/docs/models/workerinfo.md b/docs/models/workerinfo.md deleted file mode 100644 index 997f62ab..00000000 --- a/docs/models/workerinfo.md +++ /dev/null @@ -1,10 +0,0 @@ -# WorkerInfo - - -## Fields - -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `scheduler_url` | *str* | :heavy_check_mark: | N/A | -| `namespace` | *str* | :heavy_check_mark: | N/A | -| `tls` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md index 553119b1..54f61ea3 100644 --- a/docs/models/workflowexecutionrequest.md +++ b/docs/models/workflowexecutionrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | diff --git a/docs/models/workflowregistration.md b/docs/models/workflowregistration.md index aad6831a..52658c64 100644 --- a/docs/models/workflowregistration.md +++ b/docs/models/workflowregistration.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | -| `task_queue` | *str* | :heavy_check_mark: | Project name of the workflow | -| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | -| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | -| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | -| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | +| `deployment_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Deployment ID this registration belongs to | +| ~~`task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_id instead. Will be removed in a future release. | +| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | +| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | \ No newline at end of file diff --git a/docs/models/workflowregistrationwithworkerstatus.md b/docs/models/workflowregistrationwithworkerstatus.md index 625871c1..f85563ce 100644 --- a/docs/models/workflowregistrationwithworkerstatus.md +++ b/docs/models/workflowregistrationwithworkerstatus.md @@ -3,12 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | -| `task_queue` | *str* | :heavy_check_mark: | Project name of the workflow | -| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | -| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | -| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | -| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | -| `active` | *bool* | :heavy_check_mark: | Whether the workflow registration is active | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the workflow registration | +| `deployment_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Deployment ID this registration belongs to | +| ~~`task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_id instead. Will be removed in a future release. | +| `definition` | [models.WorkflowCodeDefinition](../models/workflowcodedefinition.md) | :heavy_check_mark: | N/A | +| `workflow_id` | *str* | :heavy_check_mark: | Workflow ID of the workflow | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | Workflow of the workflow registration | +| `compatible_with_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is compatible with chat assistant | +| `active` | *bool* | :heavy_check_mark: | Whether the workflow registration is active | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index b1b80bdf..db15db81 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -51,7 +51,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionRequestTool](../../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -118,7 +118,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | N/A | | +| `tools` | List[[models.AgentsCompletionStreamRequestTool](../../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index afbbeae4..2e5aaaf7 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -53,7 +53,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionRequestTool](../../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | @@ -123,7 +123,7 @@ with Mistral( | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionStreamRequestTool](../../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | | `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | | `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index bceebdf8..d0e88f2e 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -255,11 +255,11 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `file_id` | *str* | :heavy_check_mark: | N/A | -| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the url becomes invalid. Defaults to 24h | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/workers/README.md b/docs/sdks/workers/README.md deleted file mode 100644 index 5e2380d1..00000000 --- a/docs/sdks/workers/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Workflows.Workers - -## Overview - -### Available Operations - -* [whoami](#whoami) - Get Worker Info - -## whoami - -Get Worker Info - -### Example Usage - - -```python -from mistralai.client import Mistral -import os - - -with Mistral( - api_key=os.getenv("MISTRAL_API_KEY", ""), -) as mistral: - - res = mistral.workflows.workers.whoami() - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.WorkerInfo](../../models/workerinfo.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index e65383ca..324c46b1 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -141,7 +141,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `workflow_identifier` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | @@ -192,7 +192,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | diff --git a/examples/mistral/chat/function_calling.py b/examples/mistral/chat/function_calling.py index 68e9d91c..318e4e24 100644 --- a/examples/mistral/chat/function_calling.py +++ b/examples/mistral/chat/function_calling.py @@ -12,6 +12,7 @@ ToolMessage, UserMessage, ) +from mistralai.client.models.chatcompletionrequest import ChatCompletionRequestTool # Assuming we have the following data data: dict[str, list[Any]] = { @@ -48,7 +49,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st "retrieve_payment_date": functools.partial(retrieve_payment_date, data=data), } -tools: list[Tool] = [ +tools: list[ChatCompletionRequestTool] = [ Tool( function=Function( name="retrieve_payment_status", diff --git a/pyproject.toml b/pyproject.toml index 54d2b372..358a1336 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.2.0" +version = "2.3.0" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 0473419e..0a44f4d8 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.2.0" +__version__: str = "2.3.0" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.2.0 2.862.0 1.0.0 mistralai" +__gen_version__: str = "2.879.6" +__user_agent__: str = "speakeasy-sdk/python 2.3.0 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/accesses.py b/src/mistralai/client/accesses.py index 2cfdc7da..002f0103 100644 --- a/src/mistralai/client/accesses.py +++ b/src/mistralai/client/accesses.py @@ -37,6 +37,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -127,6 +130,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -225,6 +231,9 @@ def update_or_create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -332,6 +341,9 @@ async def update_or_create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -437,6 +449,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -541,6 +556,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 2e91dd04..f16078e8 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -35,7 +35,10 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionRequestTool], + List[models.AgentsCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -90,6 +93,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -107,7 +113,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -208,7 +216,10 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionRequestTool], + List[models.AgentsCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -263,6 +274,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -280,7 +294,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionRequestToolChoice] ), @@ -381,7 +397,10 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionStreamRequestTool], + List[models.AgentsCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -438,6 +457,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -455,7 +477,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), @@ -564,7 +588,10 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.AgentsCompletionStreamRequestTool], + List[models.AgentsCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -621,6 +648,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -638,7 +668,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.AgentsCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.AgentsCompletionStreamRequestToolChoice] ), diff --git a/src/mistralai/client/basesdk.py b/src/mistralai/client/basesdk.py index a976121b..4a27eb2f 100644 --- a/src/mistralai/client/basesdk.py +++ b/src/mistralai/client/basesdk.py @@ -67,6 +67,7 @@ def _build_request_async( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.async_client return self._build_request_with_client( @@ -88,6 +89,7 @@ def _build_request_async( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request( @@ -111,6 +113,7 @@ def _build_request( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.client return self._build_request_with_client( @@ -132,6 +135,7 @@ def _build_request( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request_with_client( @@ -156,6 +160,7 @@ def _build_request_with_client( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: query_params = {} @@ -189,7 +194,9 @@ def _build_request_with_client( security = security() security = utils.get_security_from_env(security, models.Security) if security is not None: - security_headers, security_query_params = utils.get_security(security) + security_headers, security_query_params = utils.get_security( + security, allowed_fields + ) headers = {**headers, **security_headers} query_params = {**query_params, **security_query_params} @@ -226,7 +233,7 @@ def _build_request_with_client( data=serialized_request_body.data, files=serialized_request_body.files, headers=headers, - timeout=timeout, + timeout=timeout if timeout is not None else httpx.USE_CLIENT_DEFAULT, ) def do_request( @@ -246,6 +253,8 @@ def do(): http_res = None try: req = hooks.before_request(BeforeRequestContext(hook_ctx), request) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -321,6 +330,8 @@ async def do(): hooks.before_request, BeforeRequestContext(hook_ctx), request ) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, diff --git a/src/mistralai/client/batch_jobs.py b/src/mistralai/client/batch_jobs.py index dc378cde..9c6fd9c2 100644 --- a/src/mistralai/client/batch_jobs.py +++ b/src/mistralai/client/batch_jobs.py @@ -52,6 +52,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -160,6 +163,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -266,6 +272,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -375,6 +384,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -475,6 +487,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -565,6 +580,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -650,6 +668,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -734,6 +755,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -818,6 +842,9 @@ def cancel( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -902,6 +929,9 @@ async def cancel_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/beta_agents.py b/src/mistralai/client/beta_agents.py index 00a0a197..5d60170e 100644 --- a/src/mistralai/client/beta_agents.py +++ b/src/mistralai/client/beta_agents.py @@ -66,6 +66,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -205,6 +208,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -329,6 +335,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -440,6 +449,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -544,6 +556,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -642,6 +657,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -766,6 +784,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -917,6 +938,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1033,6 +1057,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1121,6 +1148,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1213,6 +1243,9 @@ def update_version( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1306,6 +1339,9 @@ async def update_version_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1401,6 +1437,9 @@ def list_versions( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1497,6 +1536,9 @@ async def list_versions_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1591,6 +1633,9 @@ def get_version( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1684,6 +1729,9 @@ async def get_version_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1779,6 +1827,9 @@ def create_version_alias( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1875,6 +1926,9 @@ async def create_version_alias_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1967,6 +2021,9 @@ def list_version_aliases( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2057,6 +2114,9 @@ async def list_version_aliases_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2149,6 +2209,9 @@ def delete_version_alias( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2242,6 +2305,9 @@ async def delete_version_alias_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/campaigns.py b/src/mistralai/client/campaigns.py index a1ffcebc..427bef5e 100644 --- a/src/mistralai/client/campaigns.py +++ b/src/mistralai/client/campaigns.py @@ -41,6 +41,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -146,6 +149,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -247,6 +253,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -343,6 +352,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -435,6 +447,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -525,6 +540,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -615,6 +633,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -705,6 +726,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -795,6 +819,9 @@ def fetch_status( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -885,6 +912,9 @@ async def fetch_status_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -979,6 +1009,9 @@ def list_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1077,6 +1110,9 @@ async def list_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index c11a53d1..cfc615eb 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -122,7 +122,10 @@ def complete( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -181,6 +184,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -201,7 +207,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -304,7 +312,10 @@ async def complete_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -363,6 +374,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -383,7 +397,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -486,7 +502,10 @@ def stream( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -547,6 +566,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -567,7 +589,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -678,7 +702,10 @@ async def stream_async( Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -739,6 +766,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -759,7 +789,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), diff --git a/src/mistralai/client/chat_completion_events.py b/src/mistralai/client/chat_completion_events.py index c060235c..9d00fe4f 100644 --- a/src/mistralai/client/chat_completion_events.py +++ b/src/mistralai/client/chat_completion_events.py @@ -53,6 +53,9 @@ def search( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -165,6 +168,9 @@ async def search_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -273,6 +279,9 @@ def search_ids( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -375,6 +384,9 @@ async def search_ids_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -475,6 +487,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -565,6 +580,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -655,6 +673,9 @@ def fetch_similar_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -747,6 +768,9 @@ async def fetch_similar_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -843,6 +867,9 @@ def judge( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -949,6 +976,9 @@ async def judge_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/classifiers.py b/src/mistralai/client/classifiers.py index 67199b60..9fd3b3a1 100644 --- a/src/mistralai/client/classifiers.py +++ b/src/mistralai/client/classifiers.py @@ -42,6 +42,9 @@ def moderate( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -142,6 +145,9 @@ async def moderate_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -240,6 +246,9 @@ def moderate_chat( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -339,6 +348,9 @@ async def moderate_chat_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -440,6 +452,9 @@ def classify( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -540,6 +555,9 @@ async def classify_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -635,6 +653,9 @@ def classify_chat( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -729,6 +750,9 @@ async def classify_chat_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 238f9277..fc9d6319 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -53,6 +53,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -171,6 +174,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -279,6 +285,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -379,6 +388,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -475,6 +487,9 @@ def get_auth_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -568,6 +583,9 @@ async def get_auth_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -665,6 +683,9 @@ def call_tool( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -773,6 +794,9 @@ async def call_tool_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -883,6 +907,9 @@ def list_tools( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -987,6 +1014,9 @@ async def list_tools_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1087,6 +1117,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1183,6 +1216,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1295,6 +1331,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1425,6 +1464,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1535,6 +1577,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1625,6 +1670,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 9aeb5b55..49810eb6 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -291,6 +291,9 @@ def start( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -446,6 +449,9 @@ async def start_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -563,6 +569,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -661,6 +670,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -755,6 +767,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -845,6 +860,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -935,6 +953,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1025,6 +1046,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1136,6 +1160,9 @@ def append( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1268,6 +1295,9 @@ async def append_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1379,6 +1409,9 @@ def get_history( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1469,6 +1502,9 @@ async def get_history_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1559,6 +1595,9 @@ def get_messages( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1649,6 +1688,9 @@ async def get_messages_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1770,6 +1812,9 @@ def restart( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1916,6 +1961,9 @@ async def restart_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2073,6 +2121,9 @@ def start_stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2235,6 +2286,9 @@ async def start_stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2376,6 +2430,9 @@ def append_stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2515,6 +2572,9 @@ async def append_stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2664,6 +2724,9 @@ def restart_stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2817,6 +2880,9 @@ async def restart_stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/datasets.py b/src/mistralai/client/datasets.py index 48ecbdd8..f9a8dec3 100644 --- a/src/mistralai/client/datasets.py +++ b/src/mistralai/client/datasets.py @@ -49,6 +49,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -145,6 +148,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -243,6 +249,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -339,6 +348,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -431,6 +443,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -521,6 +536,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -611,6 +629,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -701,6 +722,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -795,6 +819,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -900,6 +927,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1005,6 +1035,9 @@ def list_records( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1103,6 +1136,9 @@ async def list_records_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1201,6 +1237,9 @@ def create_record( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1306,6 +1345,9 @@ async def create_record_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1409,6 +1451,9 @@ def import_from_campaign( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1511,6 +1556,9 @@ async def import_from_campaign_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1613,6 +1661,9 @@ def import_from_explorer( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1715,6 +1766,9 @@ async def import_from_explorer_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1817,6 +1871,9 @@ def import_from_file( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1919,6 +1976,9 @@ async def import_from_file_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2021,6 +2081,9 @@ def import_from_playground( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2123,6 +2186,9 @@ async def import_from_playground_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2225,6 +2291,9 @@ def import_from_dataset_records( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2327,6 +2396,9 @@ async def import_from_dataset_records_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2427,6 +2499,9 @@ def export_to_jsonl( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2517,6 +2592,9 @@ async def export_to_jsonl_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2609,6 +2687,9 @@ def fetch_task( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2702,6 +2783,9 @@ async def fetch_task_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2797,6 +2881,9 @@ def list_tasks( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2897,6 +2984,9 @@ async def list_tasks_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py index a428c61c..6613b91c 100644 --- a/src/mistralai/client/deployments.py +++ b/src/mistralai/client/deployments.py @@ -35,6 +35,9 @@ def list_deployments( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -126,6 +129,9 @@ async def list_deployments_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -215,6 +221,9 @@ def get_deployment( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -303,6 +312,9 @@ async def get_deployment_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/documents.py b/src/mistralai/client/documents.py index 95ea4323..701e5310 100644 --- a/src/mistralai/client/documents.py +++ b/src/mistralai/client/documents.py @@ -49,6 +49,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -157,6 +160,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -263,6 +269,9 @@ def upload( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -369,6 +378,9 @@ async def upload_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -467,6 +479,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -560,6 +575,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -659,6 +677,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -769,6 +790,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -873,6 +897,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -966,6 +993,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1059,6 +1089,9 @@ def text_content( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1152,6 +1185,9 @@ async def text_content_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1245,6 +1281,9 @@ def status( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1338,6 +1377,9 @@ async def status_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1431,6 +1473,9 @@ def get_signed_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1524,6 +1569,9 @@ async def get_signed_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1617,6 +1665,9 @@ def extracted_text_signed_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1710,6 +1761,9 @@ async def extracted_text_signed_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1803,6 +1857,9 @@ def reprocess( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1896,6 +1953,9 @@ async def reprocess_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/embeddings.py b/src/mistralai/client/embeddings.py index 5d55ffc4..a8a15363 100644 --- a/src/mistralai/client/embeddings.py +++ b/src/mistralai/client/embeddings.py @@ -49,6 +49,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -159,6 +162,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/events.py b/src/mistralai/client/events.py index c57ad094..db3ebcf5 100644 --- a/src/mistralai/client/events.py +++ b/src/mistralai/client/events.py @@ -57,6 +57,9 @@ def get_stream_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -190,6 +193,9 @@ async def get_stream_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -307,6 +313,9 @@ def get_workflow_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -407,6 +416,9 @@ async def get_workflow_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index 66ec396b..4e6291f4 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -33,6 +33,9 @@ def get_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -121,6 +124,9 @@ async def get_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -211,6 +217,9 @@ def get_workflow_execution_history( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -302,6 +311,9 @@ async def get_workflow_execution_history_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -400,6 +412,9 @@ def signal_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -510,6 +525,9 @@ async def signal_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -620,6 +638,9 @@ def query_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -730,6 +751,9 @@ async def query_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -831,6 +855,9 @@ def terminate_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -919,6 +946,9 @@ async def terminate_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1007,6 +1037,9 @@ def batch_terminate_workflow_executions( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1098,6 +1131,9 @@ async def batch_terminate_workflow_executions_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1189,6 +1225,9 @@ def cancel_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1277,6 +1316,9 @@ async def cancel_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1365,6 +1407,9 @@ def batch_cancel_workflow_executions( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1456,6 +1501,9 @@ async def batch_cancel_workflow_executions_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1555,6 +1603,9 @@ def reset_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1664,6 +1715,9 @@ async def reset_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1774,6 +1828,9 @@ def update_workflow_execution( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1884,6 +1941,9 @@ async def update_workflow_execution_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1985,6 +2045,9 @@ def get_workflow_execution_trace_otel( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2075,6 +2138,9 @@ async def get_workflow_execution_trace_otel_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2165,6 +2231,9 @@ def get_workflow_execution_trace_summary( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2255,6 +2324,9 @@ async def get_workflow_execution_trace_summary_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2349,6 +2421,9 @@ def get_workflow_execution_trace_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2445,6 +2520,9 @@ async def get_workflow_execution_trace_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2543,6 +2621,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2650,6 +2731,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/fields.py b/src/mistralai/client/fields.py index a5b8003c..1ac05dc5 100644 --- a/src/mistralai/client/fields.py +++ b/src/mistralai/client/fields.py @@ -31,6 +31,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -116,6 +119,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -205,6 +211,9 @@ def fetch_options( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -300,6 +309,9 @@ async def fetch_options_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -397,6 +409,9 @@ def fetch_option_counts( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -505,6 +520,9 @@ async def fetch_option_counts_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/files.py b/src/mistralai/client/files.py index a843cb7b..0728e9a2 100644 --- a/src/mistralai/client/files.py +++ b/src/mistralai/client/files.py @@ -58,6 +58,9 @@ def upload( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -168,6 +171,9 @@ async def upload_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -272,6 +278,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -377,6 +386,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -468,6 +480,9 @@ def retrieve( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -552,6 +567,9 @@ async def retrieve_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -636,6 +654,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -720,6 +741,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -804,6 +828,9 @@ def download( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -890,6 +917,9 @@ async def download_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -965,7 +995,7 @@ def get_signed_url( r"""Get Signed Url :param file_id: - :param expiry: Number of hours before the url becomes invalid. Defaults to 24h + :param expiry: Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -976,6 +1006,9 @@ def get_signed_url( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1050,7 +1083,7 @@ async def get_signed_url_async( r"""Get Signed Url :param file_id: - :param expiry: Number of hours before the url becomes invalid. Defaults to 24h + :param expiry: Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1061,6 +1094,9 @@ async def get_signed_url_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/fim.py b/src/mistralai/client/fim.py index 8ffb7730..b4253ad6 100644 --- a/src/mistralai/client/fim.py +++ b/src/mistralai/client/fim.py @@ -62,6 +62,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -190,6 +193,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -318,6 +324,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -454,6 +463,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/fine_tuning_jobs.py b/src/mistralai/client/fine_tuning_jobs.py index c2ee871b..f13c8f2d 100644 --- a/src/mistralai/client/fine_tuning_jobs.py +++ b/src/mistralai/client/fine_tuning_jobs.py @@ -56,6 +56,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -169,6 +172,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -296,6 +302,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -441,6 +450,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -552,6 +564,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -638,6 +653,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -724,6 +742,9 @@ def cancel( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -810,6 +831,9 @@ async def cancel_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -896,6 +920,9 @@ def start( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -982,6 +1009,9 @@ async def start_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/judges.py b/src/mistralai/client/judges.py index b0eb1ea0..210a147a 100644 --- a/src/mistralai/client/judges.py +++ b/src/mistralai/client/judges.py @@ -45,6 +45,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -155,6 +158,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -261,6 +267,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -363,6 +372,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -457,6 +469,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -547,6 +562,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -637,6 +655,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -727,6 +748,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -831,6 +855,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -952,6 +979,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1063,6 +1093,9 @@ def judge_conversation( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1170,6 +1203,9 @@ async def judge_conversation_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index 84624c4d..053cb65d 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -58,6 +58,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -151,6 +154,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -246,6 +252,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -345,6 +354,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -440,6 +452,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -530,6 +545,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -620,6 +638,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -710,6 +731,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -804,6 +828,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -909,6 +936,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/metrics.py b/src/mistralai/client/metrics.py index 3df1ca56..8c132926 100644 --- a/src/mistralai/client/metrics.py +++ b/src/mistralai/client/metrics.py @@ -59,6 +59,9 @@ def get_workflow_metrics( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -174,6 +177,9 @@ async def get_workflow_metrics_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 6c15ed3a..5e03fddf 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -157,8 +157,10 @@ AgentsCompletionRequestMessageTypedDict, AgentsCompletionRequestStop, AgentsCompletionRequestStopTypedDict, + AgentsCompletionRequestTool, AgentsCompletionRequestToolChoice, AgentsCompletionRequestToolChoiceTypedDict, + AgentsCompletionRequestToolTypedDict, AgentsCompletionRequestTypedDict, ) from .agentscompletionstreamrequest import ( @@ -167,8 +169,10 @@ AgentsCompletionStreamRequestMessageTypedDict, AgentsCompletionStreamRequestStop, AgentsCompletionStreamRequestStopTypedDict, + AgentsCompletionStreamRequestTool, AgentsCompletionStreamRequestToolChoice, AgentsCompletionStreamRequestToolChoiceTypedDict, + AgentsCompletionStreamRequestToolTypedDict, AgentsCompletionStreamRequestTypedDict, ) from .annotations import Annotations, AnnotationsTypedDict, Audience @@ -260,8 +264,10 @@ ChatCompletionRequestMessageTypedDict, ChatCompletionRequestStop, ChatCompletionRequestStopTypedDict, + ChatCompletionRequestTool, ChatCompletionRequestToolChoice, ChatCompletionRequestToolChoiceTypedDict, + ChatCompletionRequestToolTypedDict, ChatCompletionRequestTypedDict, ) from .chatcompletionresponse import ( @@ -274,8 +280,10 @@ ChatCompletionStreamRequestMessageTypedDict, ChatCompletionStreamRequestStop, ChatCompletionStreamRequestStopTypedDict, + ChatCompletionStreamRequestTool, ChatCompletionStreamRequestToolChoice, ChatCompletionStreamRequestToolChoiceTypedDict, + ChatCompletionStreamRequestToolTypedDict, ChatCompletionStreamRequestTypedDict, ) from .chatmoderationrequest import ( @@ -1738,7 +1746,6 @@ ToolReferenceChunkTypedDict, ) from .tooltype import ToolType - from .tooltypes import ToolTypes from .trainingfile import TrainingFile, TrainingFileTypedDict from .transcriptionresponse import ( TranscriptionResponse, @@ -1894,7 +1901,6 @@ WebSearchPremiumToolTypedDict, ) from .websearchtool import WebSearchTool, WebSearchToolTypedDict - from .workerinfo import WorkerInfo, WorkerInfoTypedDict from .workflow import Workflow, WorkflowTypedDict from .workflowarchiveresponse import ( WorkflowArchiveResponse, @@ -2154,16 +2160,20 @@ "AgentsCompletionRequestMessageTypedDict", "AgentsCompletionRequestStop", "AgentsCompletionRequestStopTypedDict", + "AgentsCompletionRequestTool", "AgentsCompletionRequestToolChoice", "AgentsCompletionRequestToolChoiceTypedDict", + "AgentsCompletionRequestToolTypedDict", "AgentsCompletionRequestTypedDict", "AgentsCompletionStreamRequest", "AgentsCompletionStreamRequestMessage", "AgentsCompletionStreamRequestMessageTypedDict", "AgentsCompletionStreamRequestStop", "AgentsCompletionStreamRequestStopTypedDict", + "AgentsCompletionStreamRequestTool", "AgentsCompletionStreamRequestToolChoice", "AgentsCompletionStreamRequestToolChoiceTypedDict", + "AgentsCompletionStreamRequestToolTypedDict", "AgentsCompletionStreamRequestTypedDict", "And", "AndTypedDict", @@ -2245,8 +2255,10 @@ "ChatCompletionRequestMessageTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", + "ChatCompletionRequestTool", "ChatCompletionRequestToolChoice", "ChatCompletionRequestToolChoiceTypedDict", + "ChatCompletionRequestToolTypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", @@ -2255,8 +2267,10 @@ "ChatCompletionStreamRequestMessageTypedDict", "ChatCompletionStreamRequestStop", "ChatCompletionStreamRequestStopTypedDict", + "ChatCompletionStreamRequestTool", "ChatCompletionStreamRequestToolChoice", "ChatCompletionStreamRequestToolChoiceTypedDict", + "ChatCompletionStreamRequestToolTypedDict", "ChatCompletionStreamRequestTypedDict", "ChatModerationRequest", "ChatModerationRequestInputs1", @@ -3284,7 +3298,6 @@ "ToolReferenceChunkTypedDict", "ToolType", "ToolTypedDict", - "ToolTypes", "TrainingFile", "TrainingFileTypedDict", "TranscriptionResponse", @@ -3410,8 +3423,6 @@ "WebSearchPremiumToolTypedDict", "WebSearchTool", "WebSearchToolTypedDict", - "WorkerInfo", - "WorkerInfoTypedDict", "Workflow", "WorkflowArchiveResponse", "WorkflowArchiveResponseTypedDict", @@ -3592,16 +3603,20 @@ "AgentsCompletionRequestMessageTypedDict": ".agentscompletionrequest", "AgentsCompletionRequestStop": ".agentscompletionrequest", "AgentsCompletionRequestStopTypedDict": ".agentscompletionrequest", + "AgentsCompletionRequestTool": ".agentscompletionrequest", "AgentsCompletionRequestToolChoice": ".agentscompletionrequest", "AgentsCompletionRequestToolChoiceTypedDict": ".agentscompletionrequest", + "AgentsCompletionRequestToolTypedDict": ".agentscompletionrequest", "AgentsCompletionRequestTypedDict": ".agentscompletionrequest", "AgentsCompletionStreamRequest": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestMessage": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestMessageTypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestStop": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestStopTypedDict": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestTool": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoice": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestToolChoiceTypedDict": ".agentscompletionstreamrequest", + "AgentsCompletionStreamRequestToolTypedDict": ".agentscompletionstreamrequest", "AgentsCompletionStreamRequestTypedDict": ".agentscompletionstreamrequest", "Annotations": ".annotations", "AnnotationsTypedDict": ".annotations", @@ -3677,8 +3692,10 @@ "ChatCompletionRequestMessageTypedDict": ".chatcompletionrequest", "ChatCompletionRequestStop": ".chatcompletionrequest", "ChatCompletionRequestStopTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestTool": ".chatcompletionrequest", "ChatCompletionRequestToolChoice": ".chatcompletionrequest", "ChatCompletionRequestToolChoiceTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestToolTypedDict": ".chatcompletionrequest", "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", @@ -3687,8 +3704,10 @@ "ChatCompletionStreamRequestMessageTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStop": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStopTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTool": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoice": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestToolTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", "ChatModerationRequest": ".chatmoderationrequest", "ChatModerationRequestInputs1": ".chatmoderationrequest", @@ -4735,7 +4754,6 @@ "ToolReferenceChunkToolTypedDict": ".toolreferencechunk", "ToolReferenceChunkTypedDict": ".toolreferencechunk", "ToolType": ".tooltype", - "ToolTypes": ".tooltypes", "TrainingFile": ".trainingfile", "TrainingFileTypedDict": ".trainingfile", "TranscriptionResponse": ".transcriptionresponse", @@ -4842,8 +4860,6 @@ "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", "WebSearchTool": ".websearchtool", "WebSearchToolTypedDict": ".websearchtool", - "WorkerInfo": ".workerinfo", - "WorkerInfoTypedDict": ".workerinfo", "Workflow": ".workflow", "WorkflowTypedDict": ".workflow", "WorkflowArchiveResponse": ".workflowarchiveresponse", diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index f4ce34cb..a919dbc3 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +AgentsCompletionRequestToolTypedDict = TypeAliasType( + "AgentsCompletionRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +AgentsCompletionRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + AgentsCompletionRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -88,7 +119,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[AgentsCompletionRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -129,7 +160,7 @@ class AgentsCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[AgentsCompletionRequestTool]] = UNSET tool_choice: Optional[AgentsCompletionRequestToolChoice] = None diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index 0feb3803..05df8ae7 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +AgentsCompletionStreamRequestToolTypedDict = TypeAliasType( + "AgentsCompletionStreamRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +AgentsCompletionStreamRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + AgentsCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "AgentsCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -87,7 +118,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[AgentsCompletionStreamRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionStreamRequestToolChoiceTypedDict] presence_penalty: NotRequired[float] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" @@ -127,7 +158,7 @@ class AgentsCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[AgentsCompletionStreamRequestTool]] = UNSET tool_choice: Optional[AgentsCompletionStreamRequestToolChoice] = None diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index f1b0b2d6..1d0cf90d 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +ChatCompletionRequestToolTypedDict = TypeAliasType( + "ChatCompletionRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -94,7 +125,7 @@ class ChatCompletionRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -146,7 +177,7 @@ class ChatCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionRequestToolChoice] = None diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index d9f413c6..5cdccafb 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -3,7 +3,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict from .reasoningeffort import ReasoningEffort @@ -14,6 +18,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -61,6 +67,31 @@ ] +ChatCompletionStreamRequestToolTypedDict = TypeAliasType( + "ChatCompletionStreamRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionStreamRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -93,7 +124,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionStreamRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionStreamRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" @@ -144,7 +175,7 @@ class ChatCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionStreamRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None diff --git a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py index 326dd1d3..c381244b 100644 --- a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py +++ b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py @@ -12,7 +12,7 @@ class FilesAPIRoutesGetSignedURLRequestTypedDict(TypedDict): file_id: str expiry: NotRequired[int] - r"""Number of hours before the url becomes invalid. Defaults to 24h""" + r"""Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h.""" class FilesAPIRoutesGetSignedURLRequest(BaseModel): @@ -24,7 +24,7 @@ class FilesAPIRoutesGetSignedURLRequest(BaseModel): Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 24 - r"""Number of hours before the url becomes invalid. Defaults to 24h""" + r"""Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/ftmodelcard.py b/src/mistralai/client/models/ftmodelcard.py index 922667b0..bb7c52c8 100644 --- a/src/mistralai/client/models/ftmodelcard.py +++ b/src/mistralai/client/models/ftmodelcard.py @@ -27,6 +27,7 @@ class FTModelCardTypedDict(TypedDict): r"""This is populated by Harmattan, but some fields have a name that we don't want to expose in the API. """ + job: str root: str object: NotRequired[str] created: NotRequired[int] @@ -39,7 +40,6 @@ class FTModelCardTypedDict(TypedDict): deprecation_replacement_model: NotRequired[Nullable[str]] default_model_temperature: NotRequired[Nullable[float]] type: Literal["fine-tuned"] - job: NotRequired[Nullable[str]] archived: NotRequired[bool] @@ -53,6 +53,8 @@ class FTModelCard(BaseModel): that we don't want to expose in the API. """ + job: str + root: str object: Optional[str] = "model" @@ -80,8 +82,6 @@ class FTModelCard(BaseModel): pydantic.Field(alias="type"), ] = "fine-tuned" - job: OptionalNullable[str] = UNSET - archived: Optional[bool] = False @model_serializer(mode="wrap") @@ -98,7 +98,6 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", - "job", "archived", ] ) @@ -109,7 +108,6 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", - "job", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/library.py b/src/mistralai/client/models/library.py index c26710ff..0e09cfaa 100644 --- a/src/mistralai/client/models/library.py +++ b/src/mistralai/client/models/library.py @@ -10,8 +10,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class LibraryTypedDict(TypedDict): @@ -63,7 +64,12 @@ class Library(BaseModel): explicit_workspace_members_count: OptionalNullable[int] = UNSET - org_sharing_role: OptionalNullable[str] = UNSET + org_sharing_role: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET generated_name: OptionalNullable[str] = UNSET r"""Generated Name""" diff --git a/src/mistralai/client/models/observabilityerrorcode.py b/src/mistralai/client/models/observabilityerrorcode.py index 99360d41..f7ff71f8 100644 --- a/src/mistralai/client/models/observabilityerrorcode.py +++ b/src/mistralai/client/models/observabilityerrorcode.py @@ -50,7 +50,10 @@ "EVALUATION_RUN_TRANSITION_IS_INVALID", "EVALUATION_RUN_TRANSITION_IS_RUNNING_ALREADY", "EVALUATION_RUN_TRANSITION_ERROR", + "TEMPLATE_ERROR", "TEMPLATE_SYNTAX_ERROR", + "PROJECT_NAME_ALREADY_EXISTS", + "EVALUATION_NAME_ALREADY_EXISTS", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/tool.py b/src/mistralai/client/models/tool.py index 1d1c5ce5..a83a6d1c 100644 --- a/src/mistralai/client/models/tool.py +++ b/src/mistralai/client/models/tool.py @@ -3,35 +3,32 @@ from __future__ import annotations from .function import Function, FunctionTypedDict -from .tooltypes import ToolTypes -from mistralai.client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict +from mistralai.client.types import BaseModel, UnrecognizedStr +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypedDict class ToolTypedDict(TypedDict): function: FunctionTypedDict - type: NotRequired[ToolTypes] + type: Union[Literal["function"], UnrecognizedStr] class Tool(BaseModel): function: Function - type: Optional[ToolTypes] = None + type: Annotated[ + Annotated[ + Union[Literal["function"], UnrecognizedStr], + AfterValidator(validate_const("function")), + ], + pydantic.Field(alias="type"), + ] = "function" - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["type"]) - serialized = handler(self) - m = {} - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m +try: + Tool.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/toolcall.py b/src/mistralai/client/models/toolcall.py index 29f1149c..1424d879 100644 --- a/src/mistralai/client/models/toolcall.py +++ b/src/mistralai/client/models/toolcall.py @@ -3,7 +3,6 @@ from __future__ import annotations from .functioncall import FunctionCall, FunctionCallTypedDict -from .tooltypes import ToolTypes from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -13,7 +12,7 @@ class ToolCallTypedDict(TypedDict): function: FunctionCallTypedDict id: NotRequired[str] - type: NotRequired[ToolTypes] + type: NotRequired[str] index: NotRequired[int] @@ -22,7 +21,7 @@ class ToolCall(BaseModel): id: Optional[str] = "null" - type: Optional[ToolTypes] = None + type: Optional[str] = None index: Optional[int] = 0 diff --git a/src/mistralai/client/models/toolchoice.py b/src/mistralai/client/models/toolchoice.py index ce84573a..e7a17d5c 100644 --- a/src/mistralai/client/models/toolchoice.py +++ b/src/mistralai/client/models/toolchoice.py @@ -3,7 +3,6 @@ from __future__ import annotations from .functionname import FunctionName, FunctionNameTypedDict -from .tooltypes import ToolTypes from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -15,7 +14,7 @@ class ToolChoiceTypedDict(TypedDict): function: FunctionNameTypedDict r"""this restriction of `Function` is used to select a specific function to call""" - type: NotRequired[ToolTypes] + type: NotRequired[str] class ToolChoice(BaseModel): @@ -24,7 +23,7 @@ class ToolChoice(BaseModel): function: FunctionName r"""this restriction of `Function` is used to select a specific function to call""" - type: Optional[ToolTypes] = None + type: Optional[str] = None @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/tooltypes.py b/src/mistralai/client/models/tooltypes.py deleted file mode 100644 index e601c196..00000000 --- a/src/mistralai/client/models/tooltypes.py +++ /dev/null @@ -1,9 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 86c3b54272fd - -from __future__ import annotations -from mistralai.client.types import UnrecognizedStr -from typing import Literal, Union - - -ToolTypes = Union[Literal["function",], UnrecognizedStr] diff --git a/src/mistralai/client/models/workerinfo.py b/src/mistralai/client/models/workerinfo.py deleted file mode 100644 index 65edcec6..00000000 --- a/src/mistralai/client/models/workerinfo.py +++ /dev/null @@ -1,38 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 0c231087534e - -from __future__ import annotations -from mistralai.client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict - - -class WorkerInfoTypedDict(TypedDict): - scheduler_url: str - namespace: str - tls: NotRequired[bool] - - -class WorkerInfo(BaseModel): - scheduler_url: str - - namespace: str - - tls: Optional[bool] = False - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["tls"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py index bf6a5fa0..615276d3 100644 --- a/src/mistralai/client/models/workflowexecutionrequest.py +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -19,8 +19,8 @@ class WorkflowExecutionRequestTypedDict(TypedDict): execution_id: NotRequired[Nullable[str]] r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" - input: NotRequired[Nullable[Dict[str, Any]]] - r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + input: NotRequired[Nullable[Any]] + r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" encoded_input: NotRequired[Nullable[NetworkEncodedInputTypedDict]] r"""Encoded input to the workflow, used when payload encoding is enabled.""" wait_for_result: NotRequired[bool] @@ -38,8 +38,8 @@ class WorkflowExecutionRequest(BaseModel): execution_id: OptionalNullable[str] = UNSET r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" - input: OptionalNullable[Dict[str, Any]] = UNSET - r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + input: OptionalNullable[Any] = UNSET + r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" encoded_input: OptionalNullable[NetworkEncodedInput] = UNSET r"""Encoded input to the workflow, used when payload encoding is enabled.""" diff --git a/src/mistralai/client/models/workflowregistration.py b/src/mistralai/client/models/workflowregistration.py index e23f9fb2..7c65801d 100644 --- a/src/mistralai/client/models/workflowregistration.py +++ b/src/mistralai/client/models/workflowregistration.py @@ -14,19 +14,22 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class WorkflowRegistrationTypedDict(TypedDict): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" definition: WorkflowCodeDefinitionTypedDict workflow_id: str r"""Workflow ID of the workflow""" + deployment_id: NotRequired[Nullable[str]] + r"""Deployment ID this registration belongs to""" + task_queue: NotRequired[Nullable[str]] + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" workflow: NotRequired[Nullable[WorkflowTypedDict]] r"""Workflow of the workflow registration""" compatible_with_chat_assistant: NotRequired[bool] @@ -37,14 +40,22 @@ class WorkflowRegistration(BaseModel): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" - definition: WorkflowCodeDefinition workflow_id: str r"""Workflow ID of the workflow""" + deployment_id: OptionalNullable[str] = UNSET + r"""Deployment ID this registration belongs to""" + + task_queue: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" + workflow: OptionalNullable[Workflow] = UNSET r"""Workflow of the workflow registration""" @@ -53,8 +64,15 @@ class WorkflowRegistration(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["workflow", "compatible_with_chat_assistant"]) - nullable_fields = set(["workflow"]) + optional_fields = set( + [ + "deployment_id", + "task_queue", + "workflow", + "compatible_with_chat_assistant", + ] + ) + nullable_fields = set(["deployment_id", "task_queue", "workflow"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowregistrationwithworkerstatus.py b/src/mistralai/client/models/workflowregistrationwithworkerstatus.py index c0d9a69e..62c379d9 100644 --- a/src/mistralai/client/models/workflowregistrationwithworkerstatus.py +++ b/src/mistralai/client/models/workflowregistrationwithworkerstatus.py @@ -14,21 +14,24 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class WorkflowRegistrationWithWorkerStatusTypedDict(TypedDict): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" definition: WorkflowCodeDefinitionTypedDict workflow_id: str r"""Workflow ID of the workflow""" active: bool r"""Whether the workflow registration is active""" + deployment_id: NotRequired[Nullable[str]] + r"""Deployment ID this registration belongs to""" + task_queue: NotRequired[Nullable[str]] + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" workflow: NotRequired[Nullable[WorkflowTypedDict]] r"""Workflow of the workflow registration""" compatible_with_chat_assistant: NotRequired[bool] @@ -39,9 +42,6 @@ class WorkflowRegistrationWithWorkerStatus(BaseModel): id: str r"""Unique identifier of the workflow registration""" - task_queue: str - r"""Project name of the workflow""" - definition: WorkflowCodeDefinition workflow_id: str @@ -50,6 +50,17 @@ class WorkflowRegistrationWithWorkerStatus(BaseModel): active: bool r"""Whether the workflow registration is active""" + deployment_id: OptionalNullable[str] = UNSET + r"""Deployment ID this registration belongs to""" + + task_queue: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET + r"""Deprecated. Use deployment_id instead. Will be removed in a future release.""" + workflow: OptionalNullable[Workflow] = UNSET r"""Workflow of the workflow registration""" @@ -58,8 +69,15 @@ class WorkflowRegistrationWithWorkerStatus(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["workflow", "compatible_with_chat_assistant"]) - nullable_fields = set(["workflow"]) + optional_fields = set( + [ + "deployment_id", + "task_queue", + "workflow", + "compatible_with_chat_assistant", + ] + ) + nullable_fields = set(["deployment_id", "task_queue", "workflow"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models_.py b/src/mistralai/client/models_.py index 7bb6dc1d..1e964485 100644 --- a/src/mistralai/client/models_.py +++ b/src/mistralai/client/models_.py @@ -39,6 +39,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -132,6 +135,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -223,6 +229,9 @@ def retrieve( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -315,6 +324,9 @@ async def retrieve_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -407,6 +419,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -497,6 +512,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -591,6 +609,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -692,6 +713,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -789,6 +813,9 @@ def archive( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -873,6 +900,9 @@ async def archive_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -957,6 +987,9 @@ def unarchive( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1041,6 +1074,9 @@ async def unarchive_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/ocr.py b/src/mistralai/client/ocr.py index a46119d1..be0cdfad 100644 --- a/src/mistralai/client/ocr.py +++ b/src/mistralai/client/ocr.py @@ -63,6 +63,9 @@ def process( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -198,6 +201,9 @@ async def process_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/records.py b/src/mistralai/client/records.py index ceb8de4f..a47d12c3 100644 --- a/src/mistralai/client/records.py +++ b/src/mistralai/client/records.py @@ -33,6 +33,9 @@ def fetch( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -123,6 +126,9 @@ async def fetch_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -213,6 +219,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -303,6 +312,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -393,6 +405,9 @@ def bulk_delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -486,6 +501,9 @@ async def bulk_delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -583,6 +601,9 @@ def judge( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -689,6 +710,9 @@ async def judge_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -793,6 +817,9 @@ def update_payload( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -895,6 +922,9 @@ async def update_payload_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -997,6 +1027,9 @@ def update_properties( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1099,6 +1132,9 @@ async def update_properties_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 3e875ba8..08394802 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -47,6 +47,9 @@ def list_runs( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -114,7 +117,7 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: results = JSONPath("$.executions").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.page_size if not request.page_size is None else 50 + limit = request.page_size if isinstance(request.page_size, int) else 50 if len(results[0]) < limit: return None @@ -125,6 +128,9 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: page_size=page_size, next_page_token=next_cursor, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None @@ -184,6 +190,9 @@ async def list_runs_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -256,7 +265,7 @@ async def empty_result(): results = JSONPath("$.executions").parse(body) if len(results) == 0 or len(results[0]) == 0: return empty_result() - limit = request.page_size if not request.page_size is None else 50 + limit = request.page_size if isinstance(request.page_size, int) else 50 if len(results[0]) < limit: return empty_result() @@ -267,6 +276,9 @@ async def empty_result(): page_size=page_size, next_page_token=next_cursor, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None @@ -313,6 +325,9 @@ def get_run( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -401,6 +416,9 @@ async def get_run_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -491,6 +509,9 @@ def get_run_history( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -582,6 +603,9 @@ async def get_run_history_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/schedules.py b/src/mistralai/client/schedules.py index d6f2e5ff..d0369009 100644 --- a/src/mistralai/client/schedules.py +++ b/src/mistralai/client/schedules.py @@ -31,6 +31,9 @@ def get_schedules( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -108,6 +111,9 @@ async def get_schedules_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -204,6 +210,9 @@ def schedule_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -318,6 +327,9 @@ async def schedule_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -415,6 +427,9 @@ def unschedule_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -503,6 +518,9 @@ async def unschedule_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py index fe57e2fa..4c3aafd5 100644 --- a/src/mistralai/client/speech.py +++ b/src/mistralai/client/speech.py @@ -128,6 +128,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -329,6 +332,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/transcriptions.py b/src/mistralai/client/transcriptions.py index 7f01917d..d6489bf3 100644 --- a/src/mistralai/client/transcriptions.py +++ b/src/mistralai/client/transcriptions.py @@ -51,6 +51,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -160,6 +163,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -269,6 +275,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -388,6 +397,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/utils/metadata.py b/src/mistralai/client/utils/metadata.py index d46ffa59..3850a6ff 100644 --- a/src/mistralai/client/utils/metadata.py +++ b/src/mistralai/client/utils/metadata.py @@ -16,6 +16,7 @@ class SecurityMetadata: scheme_type: Optional[str] = None sub_type: Optional[str] = None field_name: Optional[str] = None + composite: bool = False def get_field_name(self, default: str) -> str: return self.field_name or default diff --git a/src/mistralai/client/utils/security.py b/src/mistralai/client/utils/security.py index d8b9d8fe..77a4449d 100644 --- a/src/mistralai/client/utils/security.py +++ b/src/mistralai/client/utils/security.py @@ -20,7 +20,9 @@ import os -def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: +def get_security( + security: Any, allowed_fields: Optional[List[str]] = None +) -> Tuple[Dict[str, str], Dict[str, List[str]]]: headers: Dict[str, str] = {} query_params: Dict[str, List[str]] = {} @@ -31,7 +33,14 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: raise TypeError("security must be a pydantic model") sec_fields: Dict[str, FieldInfo] = security.__class__.model_fields - for name in sec_fields: + sec_field_names = ( + list(sec_fields.keys()) if allowed_fields is None else allowed_fields + ) + + for name in sec_field_names: + if name not in sec_fields: + continue + sec_field = sec_fields[name] value = getattr(security, name) @@ -53,6 +62,9 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: else: _parse_security_scheme(headers, query_params, metadata, name, value) + if not metadata.composite: + return headers, query_params + return headers, query_params @@ -78,15 +90,24 @@ def _parse_security_option( raise TypeError("security option must be a pydantic model") opt_fields: Dict[str, FieldInfo] = option.__class__.model_fields + for name in opt_fields: opt_field = opt_fields[name] metadata = find_field_metadata(opt_field, SecurityMetadata) if metadata is None or not metadata.scheme: continue - _parse_security_scheme( - headers, query_params, metadata, name, getattr(option, name) - ) + + value = getattr(option, name) + if ( + metadata.scheme_type == "http" + and metadata.sub_type == "basic" + and not isinstance(value, BaseModel) + ): + _parse_basic_auth_scheme(headers, option) + return + + _parse_security_scheme(headers, query_params, metadata, name, value) def _parse_security_scheme( diff --git a/src/mistralai/client/utils/serializers.py b/src/mistralai/client/utils/serializers.py index fbc2772d..691957f4 100644 --- a/src/mistralai/client/utils/serializers.py +++ b/src/mistralai/client/utils/serializers.py @@ -18,8 +18,7 @@ def serialize_decimal(as_str: bool): def serialize(d): - # Optional[T] is a Union[T, None] - if is_union(type(d)) and type(None) in get_args(type(d)) and d is None: + if d is None: return None if isinstance(d, Unset): return d @@ -47,8 +46,7 @@ def validate_decimal(d): def serialize_float(as_str: bool): def serialize(f): - # Optional[T] is a Union[T, None] - if is_union(type(f)) and type(None) in get_args(type(f)) and f is None: + if f is None: return None if isinstance(f, Unset): return f @@ -76,8 +74,7 @@ def validate_float(f): def serialize_int(as_str: bool): def serialize(i): - # Optional[T] is a Union[T, None] - if is_union(type(i)) and type(None) in get_args(type(i)) and i is None: + if i is None: return None if isinstance(i, Unset): return i @@ -105,8 +102,7 @@ def validate_int(b): def validate_const(v): def validate(c): - # Optional[T] is a Union[T, None] - if is_union(type(c)) and type(None) in get_args(type(c)) and c is None: + if c is None: return None if v != c: diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py index 2d571857..c4f1a71e 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -39,6 +39,9 @@ def list( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -135,6 +138,9 @@ async def list_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -245,6 +251,9 @@ def create( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -365,6 +374,9 @@ async def create_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -467,6 +479,9 @@ def delete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -557,6 +572,9 @@ async def delete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -657,6 +675,9 @@ def update( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -771,6 +792,9 @@ async def update_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -875,6 +899,9 @@ def get( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -965,6 +992,9 @@ async def get_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1055,6 +1085,9 @@ def get_sample_audio( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1145,6 +1178,9 @@ async def get_sample_audio_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/workers.py b/src/mistralai/client/workers.py deleted file mode 100644 index e2d41c70..00000000 --- a/src/mistralai/client/workers.py +++ /dev/null @@ -1,162 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 54a46aba8359 - -from .basesdk import BaseSDK -from mistralai.client import errors, models, utils -from mistralai.client._hooks import HookContext -from mistralai.client.types import OptionalNullable, UNSET -from mistralai.client.utils import get_security_from_env -from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Mapping, Optional - - -class Workers(BaseSDK): - def whoami( - self, - *, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkerInfo: - r"""Get Worker Info - - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - req = self._build_request( - method="GET", - path="/v1/workflows/workers/whoami", - base_url=base_url, - url_variables=url_variables, - request=None, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="get_worker_info_v1_workflows_workers_whoami_get", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkerInfo, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) - - async def whoami_async( - self, - *, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkerInfo: - r"""Get Worker Info - - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - req = self._build_request_async( - method="GET", - path="/v1/workflows/workers/whoami", - base_url=base_url, - url_variables=url_variables, - request=None, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - allow_empty_value=None, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["429", "500", "502", "503", "504"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="get_worker_info_v1_workflows_workers_whoami_get", - oauth2_scopes=None, - security_source=get_security_from_env( - self.sdk_configuration.security, models.Security - ), - ), - request=req, - error_status_codes=["4XX", "5XX"], - retry_config=retry_config, - ) - - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(models.WorkerInfo, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise errors.SDKError("API error occurred", http_res, http_res_text) - - raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index aae12f77..cd34603a 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -14,13 +14,13 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from mistralai.client.workers import Workers from mistralai.client.workflows_events import WorkflowsEvents from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union from typing_extensions import deprecated # region imports import asyncio +from pydantic import BaseModel import time # endregion imports @@ -30,7 +30,6 @@ class Workflows(BaseSDK): metrics: Metrics runs: Runs schedules: Schedules - workers: Workers events: WorkflowsEvents deployments: Deployments @@ -46,7 +45,6 @@ def _init_sdks(self): self.metrics = Metrics(self.sdk_configuration, parent_ref=self.parent_ref) self.runs = Runs(self.sdk_configuration, parent_ref=self.parent_ref) self.schedules = Schedules(self.sdk_configuration, parent_ref=self.parent_ref) - self.workers = Workers(self.sdk_configuration, parent_ref=self.parent_ref) self.events = WorkflowsEvents( self.sdk_configuration, parent_ref=self.parent_ref ) @@ -58,7 +56,7 @@ def _init_sdks(self): def execute_workflow_and_wait( self, workflow_identifier: str, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -71,7 +69,7 @@ def execute_workflow_and_wait( Args: workflow_identifier: The workflow name or ID. - input: Input parameters for the workflow + input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes @@ -155,7 +153,7 @@ def wait_for_workflow_completion( async def execute_workflow_and_wait_async( self, workflow_identifier: str, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -168,7 +166,7 @@ async def execute_workflow_and_wait_async( Args: workflow_identifier: The workflow name or ID. - input: Input parameters for the workflow + input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes @@ -286,6 +284,9 @@ def get_workflows( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -354,7 +355,7 @@ def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: results = JSONPath("$.workflows").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 50 + limit = request.limit if isinstance(request.limit, int) else 50 if len(results[0]) < limit: return None @@ -366,6 +367,9 @@ def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: cursor=next_cursor, limit=limit, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None @@ -420,6 +424,9 @@ async def get_workflows_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -493,7 +500,7 @@ async def empty_result(): results = JSONPath("$.workflows").parse(body) if len(results) == 0 or len(results[0]) == 0: return empty_result() - limit = request.limit if not request.limit is None else 50 + limit = request.limit if isinstance(request.limit, int) else 50 if len(results[0]) < limit: return empty_result() @@ -505,6 +512,9 @@ async def empty_result(): cursor=next_cursor, limit=limit, retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) response_data: Any = None @@ -567,6 +577,9 @@ def get_workflow_registrations( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -684,6 +697,9 @@ async def get_workflow_registrations_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -766,7 +782,7 @@ def execute_workflow( *, workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -784,7 +800,7 @@ def execute_workflow( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -801,6 +817,9 @@ def execute_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -894,7 +913,7 @@ async def execute_workflow_async( *, workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -912,7 +931,7 @@ async def execute_workflow_async( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -929,6 +948,9 @@ async def execute_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1025,7 +1047,7 @@ def execute_workflow_registration( *, workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -1043,7 +1065,7 @@ def execute_workflow_registration( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -1060,6 +1082,9 @@ def execute_workflow_registration( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1156,7 +1181,7 @@ async def execute_workflow_registration_async( *, workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -1174,7 +1199,7 @@ async def execute_workflow_registration_async( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -1191,6 +1216,9 @@ async def execute_workflow_registration_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1301,6 +1329,9 @@ def get_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1389,6 +1420,9 @@ async def get_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1483,6 +1517,9 @@ def update_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1589,6 +1626,9 @@ async def update_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1693,6 +1733,9 @@ def get_workflow_registration( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1789,6 +1832,9 @@ async def get_workflow_registration_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1881,6 +1927,9 @@ def archive_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -1969,6 +2018,9 @@ async def archive_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2057,6 +2109,9 @@ def unarchive_workflow( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -2147,6 +2202,9 @@ async def unarchive_workflow_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/src/mistralai/client/workflows_events.py b/src/mistralai/client/workflows_events.py index db39e370..57b6f1cb 100644 --- a/src/mistralai/client/workflows_events.py +++ b/src/mistralai/client/workflows_events.py @@ -57,6 +57,9 @@ def get_stream_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -190,6 +193,9 @@ async def get_stream_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -307,6 +313,9 @@ def get_workflow_events( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: @@ -407,6 +416,9 @@ async def get_workflow_events_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 30000 + if server_url is not None: base_url = server_url else: diff --git a/uv.lock b/uv.lock index ae8cabb5..3175b2ac 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.2.0" +version = "2.3.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From c9c1b318704124acc5d44b20f056508b79d23129 Mon Sep 17 00:00:00 2001 From: Juan Ovalle <70274018+jjovalle99@users.noreply.github.com> Date: Sat, 4 Apr 2026 19:37:35 +0200 Subject: [PATCH 38/82] fix: propagate parameter descriptions in create_tool_call (#472) _get_function_parameters mutates field_info.description after FieldInfo construction. Pydantic v2 ignores this because _attributes_set is not updated. All docstring-derived parameter descriptions are silently dropped from the generated tool schema. For fresh FieldInfos, pass description to Field() at construction. For existing FieldInfos, override via Annotated stacking (public API). --- src/mistralai/extra/run/tools.py | 27 ++- src/mistralai/extra/tests/test_tools.py | 288 ++++++++++++++++++++++++ 2 files changed, 307 insertions(+), 8 deletions(-) create mode 100644 src/mistralai/extra/tests/test_tools.py diff --git a/src/mistralai/extra/run/tools.py b/src/mistralai/extra/run/tools.py index 95dc21a9..7ba7ff70 100644 --- a/src/mistralai/extra/run/tools.py +++ b/src/mistralai/extra/run/tools.py @@ -3,7 +3,7 @@ import json import logging from dataclasses import dataclass -from typing import Any, Callable, ForwardRef, Sequence, cast, get_type_hints +from typing import Annotated, Any, Callable, ForwardRef, Sequence, cast, get_type_hints import opentelemetry.semconv._incubating.attributes.gen_ai_attributes as gen_ai_attributes from griffe import ( @@ -17,6 +17,7 @@ from opentelemetry.trace import Status, StatusCode from pydantic import Field, create_model from pydantic.fields import FieldInfo +from pydantic_core import PydanticUndefined as _PYDANTIC_UNDEFINED from mistralai.client.models import ( Function, @@ -95,7 +96,7 @@ def _get_function_parameters( param_annotations[param.name] = type_hints.get(param.name) # resolve all params into Field and create the parameters schema - fields: dict[str, tuple[type, FieldInfo]] = {} + fields: dict[str, Any] = {} for p in params_from_sig: default = p.default if p.default is not inspect.Parameter.empty else ... annotation = ( @@ -127,15 +128,25 @@ def _get_function_parameters( if isinstance(annotation, ForwardRef): annotation = param_annotations[p.name] - # no Field + description = param_descriptions[p.name] or None + if field_info is None: if default is ...: - field_info = Field() + field_info = Field(description=description) else: - field_info = Field(default=default) - - field_info.description = param_descriptions[p.name] - fields[p.name] = (cast(type, annotation), field_info) + field_info = Field(default=default, description=description) + fields[p.name] = (cast(type, annotation), field_info) + elif description: + typed = Annotated[ # type: ignore[valid-type] + cast(type, annotation), field_info, Field(description=description) + ] + raw_default = field_info.default + if raw_default is not _PYDANTIC_UNDEFINED: + fields[p.name] = (typed, raw_default) + else: + fields[p.name] = (typed, ...) + else: + fields[p.name] = (cast(type, annotation), field_info) schema = create_model("_", **fields).model_json_schema() # type: ignore[call-overload] schema.pop("title", None) diff --git a/src/mistralai/extra/tests/test_tools.py b/src/mistralai/extra/tests/test_tools.py new file mode 100644 index 00000000..46d81ea0 --- /dev/null +++ b/src/mistralai/extra/tests/test_tools.py @@ -0,0 +1,288 @@ +"""Unit tests for create_tool_call parameter description propagation. + +Validates that parameter descriptions from docstrings and Annotated[T, Field(...)] +annotations correctly appear in the JSON schema produced by create_tool_call(). + +This is a regression test for a Pydantic v2 bug where post-construction mutation +of FieldInfo.description is silently ignored by model_json_schema(). + +Fixtures are defined inline so each test is self-contained. +""" + +import unittest +from typing import Annotated, Optional + +from pydantic import Field + +from ..run.tools import create_tool_call + + +def _props(func): + """Shorthand: create a tool call and return its parameter properties.""" + return create_tool_call(func).function.parameters["properties"] + + +class TestCreateToolCallDescriptions(unittest.TestCase): + """Descriptions from docstrings must appear in the generated JSON schema.""" + + # -- Docstring descriptions (Path 3: no existing FieldInfo) ---------------- + + def test_required_param_gets_docstring_description(self): + def search(query: str) -> str: + """Search the web. + + Args: + query: The search query to execute. + """ + return "" + + props = _props(search) + self.assertEqual(props["query"]["description"], "The search query to execute.") + + def test_optional_param_with_default_gets_docstring_description(self): + def search(query: str, limit: int = 10) -> str: + """Search the web. + + Args: + query: The search query. + limit: Maximum number of results. + """ + return "" + + props = _props(search) + self.assertEqual(props["limit"]["description"], "Maximum number of results.") + self.assertEqual(props["limit"]["default"], 10) + + def test_multiple_params_all_get_descriptions(self): + def fetch(url: str, timeout: int = 30, verbose: bool = False) -> str: + """Fetch a URL. + + Args: + url: The URL to fetch. + timeout: Request timeout in seconds. + verbose: Enable verbose logging. + """ + return "" + + props = _props(fetch) + self.assertEqual(props["url"]["description"], "The URL to fetch.") + self.assertEqual(props["timeout"]["description"], "Request timeout in seconds.") + self.assertEqual(props["verbose"]["description"], "Enable verbose logging.") + + # -- Annotated + docstring (Path 2: existing FieldInfo) -------------------- + + def test_annotated_field_description_overridden_by_docstring(self): + def search(query: Annotated[str, Field(description="original")]) -> str: + """Search. + + Args: + query: From docstring. + """ + return "" + + props = _props(search) + self.assertEqual(props["query"]["description"], "From docstring.") + + def test_annotated_field_description_preserved_when_no_docstring_entry(self): + """When the docstring has no Args entry for a param, the Field(description=...) + from Annotated must be preserved, not clobbered with empty string.""" + + def search(query: Annotated[str, Field(description="keep me")]) -> str: + """Search the web.""" + return "" + + props = _props(search) + self.assertEqual(props["query"]["description"], "keep me") + + def test_annotated_field_constraints_preserved_with_docstring(self): + def count(n: Annotated[int, Field(ge=0, le=100)]) -> str: + """Count items. + + Args: + n: Number of items. + """ + return "" + + props = _props(count) + self.assertEqual(props["n"]["description"], "Number of items.") + self.assertEqual(props["n"]["minimum"], 0) + self.assertEqual(props["n"]["maximum"], 100) + + def test_annotated_field_constraints_preserved_without_docstring_entry(self): + def count( + n: Annotated[int, Field(ge=0, le=100, description="original")], + ) -> str: + """Count items.""" + return "" + + props = _props(count) + self.assertEqual(props["n"]["description"], "original") + self.assertEqual(props["n"]["minimum"], 0) + self.assertEqual(props["n"]["maximum"], 100) + + # -- Field as default value (Path 1: isinstance(default, FieldInfo)) ------- + + def test_field_default_value_with_docstring(self): + def search(query: str, limit: int = Field(default=10, ge=1)) -> str: + """Search. + + Args: + query: The query. + limit: Max results. + """ + return "" + + props = _props(search) + self.assertEqual(props["limit"]["description"], "Max results.") + self.assertEqual(props["limit"]["default"], 10) + self.assertEqual(props["limit"]["minimum"], 1) + + def test_field_default_value_without_docstring_entry(self): + """Field(default=..., ge=...) without a docstring entry should preserve + constraints and not inject a spurious empty description.""" + + def search(query: str, limit: int = Field(default=10, ge=1)) -> str: + """Search. + + Args: + query: The query. + """ + return "" + + props = _props(search) + self.assertEqual(props["limit"]["default"], 10) + self.assertEqual(props["limit"]["minimum"], 1) + + # -- Edge cases ------------------------------------------------------------ + + def test_undocumented_param_has_no_description_key(self): + """Params without any docstring entry or Field description should not + have a description key in the schema (not even an empty string).""" + + def search(query: str) -> str: + """Search the web.""" + return "" + + props = _props(search) + self.assertIn("query", props) + self.assertNotIn("description", props["query"]) + + def test_required_params_in_required_list(self): + def search(query: str, limit: int = 10) -> str: + """Search. + + Args: + query: The query. + limit: Max results. + """ + return "" + + tool = create_tool_call(search) + required = tool.function.parameters.get("required", []) + self.assertIn("query", required) + self.assertNotIn("limit", required) + + def test_optional_type_annotation(self): + def search(query: str, tag: Optional[str] = None) -> str: + """Search. + + Args: + query: The query. + tag: Optional tag filter. + """ + return "" + + props = _props(search) + self.assertEqual(props["tag"]["description"], "Optional tag filter.") + + def test_list_type_annotation(self): + def search(queries: list[str]) -> str: + """Batch search. + + Args: + queries: List of search queries. + """ + return "" + + props = _props(search) + self.assertEqual(props["queries"]["description"], "List of search queries.") + + def test_function_level_description(self): + def search(query: str) -> str: + """Search the web for information. + + Args: + query: The search query. + """ + return "" + + tool = create_tool_call(search) + self.assertEqual(tool.function.description, "Search the web for information.") + + def test_no_docstring_at_all(self): + def search(query: str) -> str: + return "" + + tool = create_tool_call(search) + self.assertIsNotNone(tool.function.parameters) + self.assertIn("query", tool.function.parameters["properties"]) + + def test_shared_field_info_no_cross_contamination(self): + """Two functions sharing the same FieldInfo instance via Annotated must + not cross-contaminate descriptions.""" + + shared_field = Field(ge=0) + + def func_a(n: Annotated[int, shared_field]) -> str: + """A. + + Args: + n: Description A. + """ + return "" + + def func_b(n: Annotated[int, shared_field]) -> str: + """B. + + Args: + n: Description B. + """ + return "" + + props_a = _props(func_a) + props_b = _props(func_b) + self.assertEqual(props_a["n"]["description"], "Description A.") + self.assertEqual(props_b["n"]["description"], "Description B.") + # Calling func_a again after func_b must still produce "Description A." + props_a_again = _props(func_a) + self.assertEqual(props_a_again["n"]["description"], "Description A.") + # Original shared instance must be unmodified + self.assertIsNone(shared_field.description) + + +class TestCreateToolCallRegressionPydanticV2(unittest.TestCase): + """Regression: post-construction FieldInfo.description mutation is broken in Pydantic v2.""" + + def test_description_appears_in_schema_not_silently_dropped(self): + """The original bug: docstring descriptions were silently dropped from the + JSON schema because FieldInfo.description was mutated after construction, + which Pydantic v2 ignores in model_json_schema().""" + + def get_weather(city: str, units: str = "celsius") -> str: + """Get weather for a city. + + Args: + city: The city name. + units: Temperature units. + """ + return "" + + tool = create_tool_call(get_weather) + props = tool.function.parameters["properties"] + self.assertEqual(props["city"]["description"], "The city name.") + self.assertEqual(props["units"]["description"], "Temperature units.") + self.assertEqual(props["units"]["default"], "celsius") + + +if __name__ == "__main__": + unittest.main() From f0969ad8cd4cd467d7805c99e955e928ed52c287 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:46:59 +0200 Subject: [PATCH 39/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.3.1=20(#477)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.ocr.process()`: * `request` **Changed** (Breaking ⚠️) * `response.pages[]` **Changed** * `mistral.chat.complete()`: `response.choices[]` **Changed** * `mistral.fim.complete()`: `response.choices[]` **Changed** * `mistral.agents.complete()`: `response.choices[]` **Changed** * `mistral.workflows.executions.stream()`: `request.event_source` **Changed** * chore: align pyproject.toml and uv.lock to version 2.3.1 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 98 ++++++++++++------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 ++- docs/models/chatcompletionchoice.md | 3 +- docs/models/confidencescoresgranularity.md | 14 +++ docs/models/eventsource.md | 1 + docs/models/ocrconfidencescore.md | 12 +++ docs/models/ocrpageconfidencescores.md | 18 ++++ docs/models/ocrpageobject.md | 21 ++-- docs/models/ocrrequest.md | 5 +- docs/models/ocrtableobject.md | 11 ++- docs/models/pages.md | 19 ++++ docs/sdks/ocr/README.md | 3 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/models/__init__.py | 22 +++++ .../client/models/chatcompletionchoice.py | 32 ++++-- src/mistralai/client/models/eventsource.py | 1 + .../client/models/ocrconfidencescore.py | 30 ++++++ .../client/models/ocrpageconfidencescores.py | 63 ++++++++++++ src/mistralai/client/models/ocrpageobject.py | 15 ++- src/mistralai/client/models/ocrrequest.py | 29 +++++- src/mistralai/client/models/ocrtableobject.py | 45 ++++++++- src/mistralai/client/ocr.py | 20 +++- uv.lock | 2 +- 26 files changed, 407 insertions(+), 87 deletions(-) create mode 100644 docs/models/confidencescoresgranularity.md create mode 100644 docs/models/ocrconfidencescore.md create mode 100644 docs/models/ocrpageconfidencescores.md create mode 100644 docs/models/pages.md create mode 100644 src/mistralai/client/models/ocrconfidencescore.py create mode 100644 src/mistralai/client/models/ocrpageconfidencescores.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b41efcba..dc44fd3b 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 129b5c46915a7e2057badc215ab11c56 + docChecksum: 880db51e79b2d35e6c3cfb35deebc5f2 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.3.0 - configChecksum: 23f8bedccc0eae8d219fc0f204f0d860 + releaseVersion: 2.3.1 + configChecksum: cfc814ae7d34226a7aa57f42b133b76e repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 74f4d41f-0382-4c48-87ab-5df1ec902e1e - pristine_commit_hash: 56fdf394de12e7e76b15732007d7bf57395c39c8 - pristine_tree_hash: 20584b23b139630249ea450932c4b3ff9747b77e + generation_id: da4d1522-be42-4fed-8e47-6a1a86083dd9 + pristine_commit_hash: 0af2a650df50ba629dd4358d9ecd97a7a865b28a + pristine_tree_hash: 21954a44b6b1fcad3bcbbb7ec53a7846e7141605 features: python: acceptHeaders: 3.0.0 @@ -412,8 +412,8 @@ trackedFiles: pristine_git_object: ba9c95eab2c1e4f080e39e8804a5de222e052ee6 docs/models/chatcompletionchoice.md: id: 0d15c59ab501 - last_write_checksum: sha1:a6274a39a4239e054816d08517bf8507cb5c4564 - pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 + last_write_checksum: sha1:2b449f1c0c7d2f7e7fade4ba2b66892e042ec52e + pristine_git_object: 61a2bec17657ed2ce75e5b2ac731c2c339e03987 docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 last_write_checksum: sha1:160ff1297bfbaa9158e575b8bd7ab573533c8f9f @@ -626,6 +626,10 @@ trackedFiles: id: b716b0195d39 last_write_checksum: sha1:1d8d7c469f933ea741ec15c8b9ef8b986e0ca95e pristine_git_object: 4746a95df18c78331f572425a16b2b3dcbc2df4c + docs/models/confidencescoresgranularity.md: + id: 76a175c65878 + last_write_checksum: sha1:5287635d80d2f4e285cacfd0f571d3f06c01e962 + pristine_git_object: 29646c918aa6090b4b08c349c6de04c06d57387b docs/models/confirmation.md: id: 19b9e48a3c2e last_write_checksum: sha1:6e199c756ce35e2bff3b67df5d97b4520518b271 @@ -1084,8 +1088,8 @@ trackedFiles: pristine_git_object: 02033178750aea0683ffac8323b94d8caa7d07a1 docs/models/eventsource.md: id: 0a07100b20e9 - last_write_checksum: sha1:687dd7c7a4e01c08c13aacc0709e876179f18da3 - pristine_git_object: ac53ccf7936c807910c335a52a7cde6549982d0f + last_write_checksum: sha1:2bf03c62a99d16df8523e35110be9f4ec679689f + pristine_git_object: 6c2143d039b36b064db05b61e2ebdd77f573e2d6 docs/models/eventtype.md: id: bfe6f1477d8b last_write_checksum: sha1:7932d1d96baca16e3858c2be7c35d406fafe9ebf @@ -1990,30 +1994,38 @@ trackedFiles: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd pristine_git_object: a95e25c91c54edc4948ef82c1626773975190110 + docs/models/ocrconfidencescore.md: + id: 44a3cb211acc + last_write_checksum: sha1:d88c21a3aa36f24e00c2b24c31bc54944d1fc73f + pristine_git_object: 73fdcb28b1044bb7122ba6609708979c17a46e5e docs/models/ocrimageobject.md: id: b72f3c5853b2 last_write_checksum: sha1:90c5158dec6a7b31c858677b6a8efa1e3cabd504 pristine_git_object: 3c0d5544a80499b011467f29ef83d49f53801af6 + docs/models/ocrpageconfidencescores.md: + id: 4bc78fe53e38 + last_write_checksum: sha1:26733f345c69b188d372290784688a972fe39dbf + pristine_git_object: bffb214868dd74e617c87ff19e3909419d9acc97 docs/models/ocrpagedimensions.md: id: b3429f9883f5 last_write_checksum: sha1:6435aa56e6153b0c90a546818ed780105ae1042a pristine_git_object: c93ca64d5e20319ec6ec1bcb82b28c6ce0940f29 docs/models/ocrpageobject.md: id: 88a9e101b11e - last_write_checksum: sha1:091077fedf1b699d5160a21fe352056c247ef988 - pristine_git_object: 02473d44f73485fd7b7f0031d51bfac835d4036e + last_write_checksum: sha1:84b903d90dadcac943000b90e8a8e8a81c8b92fa + pristine_git_object: 0fc55052cdf2360131c0adcec93a732e2b0f78c5 docs/models/ocrrequest.md: id: 6862a3fc2d0f - last_write_checksum: sha1:2faa819df648d330074c177d8f5d4a9c9a27bc90 - pristine_git_object: dd3fc2ea28cc2bc147473ba9f73aa32a9528632a + last_write_checksum: sha1:d1e42525dabe16676e8579f463001a6a0023ab37 + pristine_git_object: f5a9cd596b56ed03d75e29a4db2042642fb48e9f docs/models/ocrresponse.md: id: 30042328fb78 last_write_checksum: sha1:8e4a4ae404ea752f3e9f1108c2a5f89ed6cfb143 pristine_git_object: 0a309317644eedc643009b6cec3a7dbb142b1a15 docs/models/ocrtableobject.md: id: c967796380e6 - last_write_checksum: sha1:3b78858cc130fc8792ec3d149c8f657fd3f7a4c3 - pristine_git_object: 4e27697c15983f86274648b2d7bacac557081630 + last_write_checksum: sha1:deb1715d618330b4f791b7237955e697d26c6bc2 + pristine_git_object: 2da8f6105dd83d7f4d067c74298316ab512c9c3f docs/models/ocrusageinfo.md: id: 419abbb8353a last_write_checksum: sha1:6e717a3f3de3c464e8b3237f06867cdfecec339e @@ -2042,6 +2054,10 @@ trackedFiles: id: f7e175c8e002 last_write_checksum: sha1:5094466110028801726cc825e8809f524fe1ee24 pristine_git_object: c76bc31d4d8791b7bef4dc6cbff6671b38a7927d + docs/models/pages.md: + id: 9045c659bb29 + last_write_checksum: sha1:b4b9daaa3e2bd6efeb6f5efe07e8da58385b3ee3 + pristine_git_object: a3631692d4d8c230e71c7c9c6ccb12b96fd93279 docs/models/paginatedconnectors.md: id: 108e699a33a1 last_write_checksum: sha1:bbec5d2256b55b26ea1429439ff5d7abe744ab04 @@ -3152,8 +3168,8 @@ trackedFiles: pristine_git_object: f585dcbeadeb87d5634a505450f3599af21df155 docs/sdks/ocr/README.md: id: 545e35d2613e - last_write_checksum: sha1:da377d75b6b7480c335d7f721bb06fe11492be38 - pristine_git_object: fde2a82339e10c74aca6d1b4168b62501d7bbf83 + last_write_checksum: sha1:e3b41d5e998bf5246aaf8715509204b37bd892e8 + pristine_git_object: ca3b795d627bc820dcaa90afb744b8b3e90dd454 docs/sdks/records/README.md: id: db86bab024d3 last_write_checksum: sha1:2ef5b164016e9b40c27d8a4915aeb8d3d2ed42c7 @@ -3212,8 +3228,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:421e56bc3992cac6dd6e90992f219ac2a798fea0 - pristine_git_object: 0a44f4d847ea627a02c57dd61fb3f5c691327131 + last_write_checksum: sha1:9a1feeb59a26a1eef191112013191e9f32399ef6 + pristine_git_object: aa94ac8d12a7009a1cd3a1c33379fe4b341e71c2 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d @@ -3360,8 +3376,8 @@ trackedFiles: pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:f892a946a4a176a79389c6a269c81c20fbc67dc3 - pristine_git_object: 5e03fddf3dc1714611a237497881d5803b7e32e9 + last_write_checksum: sha1:f804d34792cb000093bdaf97dc89fc4330b91f94 + pristine_git_object: 34e6bdc1475b321f471f2a42236e33c7409cbf86 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -3620,8 +3636,8 @@ trackedFiles: pristine_git_object: cf2aa78af3ffc747d557422b83551075b83e601d src/mistralai/client/models/chatcompletionchoice.py: id: 7e6a512f6a04 - last_write_checksum: sha1:de0281a258140f081012b303e3c14e0b42acdf63 - pristine_git_object: 2c515f6e9a290ebab43bae41e07493e4b99afe8f + last_write_checksum: sha1:07b02d246efbe5d61666488d23a5913b13cfdcb2 + pristine_git_object: ccaedb9b431030b74d4a5779c9164b0466dbfb4f src/mistralai/client/models/chatcompletionevent.py: id: d85484d0205e last_write_checksum: sha1:b709e6f710b62fee646eb7d12b24d69125522088 @@ -4084,8 +4100,8 @@ trackedFiles: pristine_git_object: 6fde1c3913c670a60d3eead5ba0d27f77a281799 src/mistralai/client/models/eventsource.py: id: 8b926028b7b2 - last_write_checksum: sha1:688d7fe14b17595e121bab41319c3630860b0a60 - pristine_git_object: d0f4d5e3f55ca89569ae90dc96eb036d01bbc8e0 + last_write_checksum: sha1:435ed061780a6e971cd120b2dc40467c0ecc90b3 + pristine_git_object: 1959cdec5d3970a27f7ad2d0d5844ebdd02fefd6 src/mistralai/client/models/eventtype.py: id: f70686df1fa5 last_write_checksum: sha1:a9f66d0772a83a6f83968d7a6a4877ddcf5e4728 @@ -4866,30 +4882,38 @@ trackedFiles: id: cb6e8a484a38 last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 pristine_git_object: f1535352af02c0d32c573f431b0440da4dab2fd6 + src/mistralai/client/models/ocrconfidencescore.py: + id: 15b75862a7bd + last_write_checksum: sha1:daafce451f4ee4a0440db6f6444f10187a64fe67 + pristine_git_object: 7fab8c9b542b1419bc4844d9d91d62c4f76f19ad src/mistralai/client/models/ocrimageobject.py: id: 685faeb41a80 last_write_checksum: sha1:a848d782d09e7b899e4a801d8ea43505783c853f pristine_git_object: 583cc38bf6046ff783ac2b5b2306fa42fa3c6fb5 + src/mistralai/client/models/ocrpageconfidencescores.py: + id: 7e4a07e4bdfd + last_write_checksum: sha1:5b1a3f6f27f8c45141bc9c445bbbd17636aae7f7 + pristine_git_object: 622171d06eca8212d9ec9435e777903c0b9fd8da src/mistralai/client/models/ocrpagedimensions.py: id: 02f763afbc9f last_write_checksum: sha1:f572ed8992ba1ba4d53b705c4e8c94c85ae1290e pristine_git_object: 847205c6c74a621dd2ee6d9eb18d1acba8395c50 src/mistralai/client/models/ocrpageobject.py: id: 07a099f89487 - last_write_checksum: sha1:8fd95a2a0b6a7a8090d7c0a6a480a4d091a2a9f2 - pristine_git_object: 40b70d8143410bebd0913ab9896584e6b252780d + last_write_checksum: sha1:d97dc5b6ff4f91302cfcf1ea120c8e99545716c5 + pristine_git_object: d77661aad5832248ab66bfb3c7bf48bfd2910303 src/mistralai/client/models/ocrrequest.py: id: 36f204c64074 - last_write_checksum: sha1:c3dd9da8c018858f849344c2d5d4da74d1a337ce - pristine_git_object: 6e405ee401e61f0aeb17ad0a49dea31499ec99da + last_write_checksum: sha1:95a8b65a08962c207c9c5458a294451abfbc2255 + pristine_git_object: 7f1adc40222d0d8ebb70a9108b3b973965c0d732 src/mistralai/client/models/ocrresponse.py: id: 2fdfc881ca56 last_write_checksum: sha1:8e496f6122ea0798df0d23f50ea3046a29f0f8db pristine_git_object: ff4b96c30573a18c2e5665a6f3f10724f7a23f9a src/mistralai/client/models/ocrtableobject.py: id: d74dd0d2ddac - last_write_checksum: sha1:492f8e4c30b61330592768b13cffcf9a9eb2c0fa - pristine_git_object: 66bb050f30790c3fc51cdca1b73e847388fe50c5 + last_write_checksum: sha1:fd0c1d3034011209de01a573952d1fd7f663504d + pristine_git_object: 1cb59527b9c1892c789b099f04b99cb1e7169c6c src/mistralai/client/models/ocrusageinfo.py: id: 272b7e1785d5 last_write_checksum: sha1:eb223a88b7e5175056197f64bb4bce2c88ccea19 @@ -5744,8 +5768,8 @@ trackedFiles: pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 src/mistralai/client/ocr.py: id: 2f804a12fc62 - last_write_checksum: sha1:363a9a3de3358200ac1d8d8eb35cdff633c34da8 - pristine_git_object: be0cdfad42069f535bca52e4568ea0ea26c5af93 + last_write_checksum: sha1:1466dcd0033799227a2b5be7d2e4741a061e08a4 + pristine_git_object: 8a13ca43083a9588fe05cde7e4a29978aaeab003 src/mistralai/client/py.typed: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -5868,8 +5892,8 @@ trackedFiles: pristine_git_object: c4f1a71e1da1cb4ebda3ef4fb69cbbe98370d2ae src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:548758b46035b2624fd8d596e34465866701ce4d - pristine_git_object: d73da8d95d7ec6644253994641616d1121f7f023 + last_write_checksum: sha1:643f6debca318789195f27e7ccf9ff959d558f46 + pristine_git_object: cd34603af303f2fc50754a3850aba08678b22277 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:79816d0388e471a4bbb3d09df84794e9405cf3b2 @@ -8288,7 +8312,7 @@ examples: application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️)\n* `mistral.chat.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.chat.stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.fim.complete()`: `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.fim.stream()`: `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow_registration()`: `request.input` **Changed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow()`: `request.input` **Changed** (Breaking ⚠️)\n* `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(assistant).tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.agents.stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.choices[].delta.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.agents.complete()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.choices[].message.tool_calls[].type` **Changed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_explorer()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.fetch_status()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.campaigns.list_events()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_campaign()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.judges.create()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.judge()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.fetch()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.search_ids()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.chat_completion_events.search()`: `error.detail.error_code` **Changed**\n* `mistral.workflows.workers.whoami()`: **Removed** (Breaking ⚠️)\n* `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed**\n* `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed**\n" +releaseNotes: "## Python SDK Changes:\n* `mistral.ocr.process()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.pages[]` **Changed**\n* `mistral.chat.complete()`: `response.choices[]` **Changed**\n* `mistral.fim.complete()`: `response.choices[]` **Changed**\n* `mistral.agents.complete()`: `response.choices[]` **Changed**\n* `mistral.workflows.executions.stream()`: `request.event_source` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 55eaf3cf..bb768021 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.3.0 + version: 2.3.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 54a3a99c..c77ab8e9 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:81c5da3669badf36ebd872b50b44e946d9d55546c163e7973ecf7e75d0ed46b3 - sourceBlobDigest: sha256:ffca608665624fae7a884937d899788f639e36ac5b9c94d09e3acc5d6512f78a + sourceRevisionDigest: sha256:4d69c08534e6e63c9fadb6f11344bf178f9dbf962fe0e319013c96096a0b5244 + sourceBlobDigest: sha256:3cbfbae3d8be0884f2d588d3f9eec1b70c811931631a7ac240b7e7444cc081da tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:81c5da3669badf36ebd872b50b44e946d9d55546c163e7973ecf7e75d0ed46b3 - sourceBlobDigest: sha256:ffca608665624fae7a884937d899788f639e36ac5b9c94d09e3acc5d6512f78a + sourceRevisionDigest: sha256:4d69c08534e6e63c9fadb6f11344bf178f9dbf962fe0e319013c96096a0b5244 + sourceBlobDigest: sha256:3cbfbae3d8be0884f2d588d3f9eec1b70c811931631a7ac240b7e7444cc081da codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:11e9928b89f856d16bd543b0eaa760ce88344fce7366df646847b9f3533bc4c7 + codeSamplesRevisionDigest: sha256:6afb787e5bd692753cade5670341d5cfd2307608034185cd6641ac02990b7104 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/RELEASES.md b/RELEASES.md index bd0050f9..a0f354c9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -538,4 +538,14 @@ Based on: ### Generated - [python v2.3.0] . ### Releases -- [PyPI v2.3.0] https://pypi.org/project/mistralai/2.3.0 - . \ No newline at end of file +- [PyPI v2.3.0] https://pypi.org/project/mistralai/2.3.0 - . + +## 2026-04-07 13:52:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.3.1] . +### Releases +- [PyPI v2.3.1] https://pypi.org/project/mistralai/2.3.1 - . \ No newline at end of file diff --git a/docs/models/chatcompletionchoice.md b/docs/models/chatcompletionchoice.md index deaa0ea0..61a2bec1 100644 --- a/docs/models/chatcompletionchoice.md +++ b/docs/models/chatcompletionchoice.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [models.AssistantMessage](../models/assistantmessage.md) | :heavy_check_mark: | N/A | | +| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | +| `messages` | List[[models.AssistantMessage](../models/assistantmessage.md)] | :heavy_minus_sign: | N/A | | | `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file diff --git a/docs/models/confidencescoresgranularity.md b/docs/models/confidencescoresgranularity.md new file mode 100644 index 00000000..29646c91 --- /dev/null +++ b/docs/models/confidencescoresgranularity.md @@ -0,0 +1,14 @@ +# ConfidenceScoresGranularity + +## Example Usage + +```python +from mistralai.client.models import ConfidenceScoresGranularity +value: ConfidenceScoresGranularity = "word" +``` + + +## Values + +- `"word"` +- `"page"` diff --git a/docs/models/eventsource.md b/docs/models/eventsource.md index ac53ccf7..6c2143d0 100644 --- a/docs/models/eventsource.md +++ b/docs/models/eventsource.md @@ -12,3 +12,4 @@ value: EventSource = "DATABASE" - `"DATABASE"` - `"LIVE"` +- `"HYBRID"` diff --git a/docs/models/ocrconfidencescore.md b/docs/models/ocrconfidencescore.md new file mode 100644 index 00000000..73fdcb28 --- /dev/null +++ b/docs/models/ocrconfidencescore.md @@ -0,0 +1,12 @@ +# OCRConfidenceScore + +Confidence score for a token or word in OCR output. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `text` | *str* | :heavy_check_mark: | The word or text segment | +| `confidence` | *float* | :heavy_check_mark: | Confidence score (0-1) | +| `start_index` | *int* | :heavy_check_mark: | Start index of the text in the page markdown string | \ No newline at end of file diff --git a/docs/models/ocrpageconfidencescores.md b/docs/models/ocrpageconfidencescores.md new file mode 100644 index 00000000..bffb2148 --- /dev/null +++ b/docs/models/ocrpageconfidencescores.md @@ -0,0 +1,18 @@ +# OCRPageConfidenceScores + +Confidence scores for an OCR page at various granularities. + +Note on page-level stats: +- For 'page' granularity: average/minimum are computed from per-token exp(logprob). +- For 'word' granularity: average/minimum are computed from per-word confidence, + where each word's confidence is exp(mean(token_logprobs)) — a geometric mean + over the word's subword tokens. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `word_confidence_scores` | List[[models.OCRConfidenceScore](../models/ocrconfidencescore.md)] | :heavy_minus_sign: | Word-level confidence scores (populated only for 'word' granularity) | +| `average_page_confidence_score` | *float* | :heavy_check_mark: | Average confidence score for the page | +| `minimum_page_confidence_score` | *float* | :heavy_check_mark: | Minimum confidence score for the page | \ No newline at end of file diff --git a/docs/models/ocrpageobject.md b/docs/models/ocrpageobject.md index 02473d44..0fc55052 100644 --- a/docs/models/ocrpageobject.md +++ b/docs/models/ocrpageobject.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `index` | *int* | :heavy_check_mark: | The page index in a pdf document starting from 0 | -| `markdown` | *str* | :heavy_check_mark: | The markdown string response of the page | -| `images` | List[[models.OCRImageObject](../models/ocrimageobject.md)] | :heavy_check_mark: | List of all extracted images in the page | -| `tables` | List[[models.OCRTableObject](../models/ocrtableobject.md)] | :heavy_minus_sign: | List of all extracted tables in the page | -| `hyperlinks` | List[*str*] | :heavy_minus_sign: | List of all hyperlinks in the page | -| `header` | *OptionalNullable[str]* | :heavy_minus_sign: | Header of the page | -| `footer` | *OptionalNullable[str]* | :heavy_minus_sign: | Footer of the page | -| `dimensions` | [Nullable[models.OCRPageDimensions]](../models/ocrpagedimensions.md) | :heavy_check_mark: | The dimensions of the PDF Page's screenshot image | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `index` | *int* | :heavy_check_mark: | The page index in a pdf document starting from 0 | +| `markdown` | *str* | :heavy_check_mark: | The markdown string response of the page | +| `images` | List[[models.OCRImageObject](../models/ocrimageobject.md)] | :heavy_check_mark: | List of all extracted images in the page | +| `tables` | List[[models.OCRTableObject](../models/ocrtableobject.md)] | :heavy_minus_sign: | List of all extracted tables in the page | +| `hyperlinks` | List[*str*] | :heavy_minus_sign: | List of all hyperlinks in the page | +| `header` | *OptionalNullable[str]* | :heavy_minus_sign: | Header of the page | +| `footer` | *OptionalNullable[str]* | :heavy_minus_sign: | Footer of the page | +| `dimensions` | [Nullable[models.OCRPageDimensions]](../models/ocrpagedimensions.md) | :heavy_check_mark: | The dimensions of the PDF Page's screenshot image | +| `confidence_scores` | [OptionalNullable[models.OCRPageConfidenceScores]](../models/ocrpageconfidencescores.md) | :heavy_minus_sign: | Confidence scores for the OCR page (populated when confidence_scores_granularity is set) | \ No newline at end of file diff --git a/docs/models/ocrrequest.md b/docs/models/ocrrequest.md index dd3fc2ea..f5a9cd59 100644 --- a/docs/models/ocrrequest.md +++ b/docs/models/ocrrequest.md @@ -8,7 +8,7 @@ | `model` | *Nullable[str]* | :heavy_check_mark: | N/A | | | `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `document` | [models.DocumentUnion](../models/documentunion.md) | :heavy_check_mark: | Document to run OCR on | | -| `pages` | List[*int*] | :heavy_minus_sign: | Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 | | +| `pages` | [OptionalNullable[models.Pages]](../models/pages.md) | :heavy_minus_sign: | Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. | | | `include_image_base64` | *OptionalNullable[bool]* | :heavy_minus_sign: | Include image URLs in response | | | `image_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | Max images to extract | | | `image_min_size` | *OptionalNullable[int]* | :heavy_minus_sign: | Minimum height and width of image to extract | | @@ -17,4 +17,5 @@ | `document_annotation_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided. | | | `table_format` | [OptionalNullable[models.TableFormat]](../models/tableformat.md) | :heavy_minus_sign: | N/A | | | `extract_header` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `extract_footer` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `extract_footer` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `confidence_scores_granularity` | [OptionalNullable[models.ConfidenceScoresGranularity]](../models/confidencescoresgranularity.md) | :heavy_minus_sign: | Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. | | \ No newline at end of file diff --git a/docs/models/ocrtableobject.md b/docs/models/ocrtableobject.md index 4e27697c..2da8f610 100644 --- a/docs/models/ocrtableobject.md +++ b/docs/models/ocrtableobject.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Table ID for extracted table in a page | -| `content` | *str* | :heavy_check_mark: | Content of the table in the given format | -| `format_` | [models.Format](../models/format_.md) | :heavy_check_mark: | Format of the table | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Table ID for extracted table in a page | +| `content` | *str* | :heavy_check_mark: | Content of the table in the given format | +| `format_` | [models.Format](../models/format_.md) | :heavy_check_mark: | Format of the table | +| `word_confidence_scores` | List[[models.OCRConfidenceScore](../models/ocrconfidencescore.md)] | :heavy_minus_sign: | Per-word confidence scores for the table content. Returned when confidence_scores_granularity is set to 'word'. | \ No newline at end of file diff --git a/docs/models/pages.md b/docs/models/pages.md new file mode 100644 index 00000000..a3631692 --- /dev/null +++ b/docs/models/pages.md @@ -0,0 +1,19 @@ +# Pages + +Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[int]` + +```python +value: List[int] = /* values here */ +``` + diff --git a/docs/sdks/ocr/README.md b/docs/sdks/ocr/README.md index fde2a823..ca3b795d 100644 --- a/docs/sdks/ocr/README.md +++ b/docs/sdks/ocr/README.md @@ -45,7 +45,7 @@ with Mistral( | `model` | *Nullable[str]* | :heavy_check_mark: | N/A | | | `document` | [models.DocumentUnion](../../models/documentunion.md) | :heavy_check_mark: | Document to run OCR on | | | `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | -| `pages` | List[*int*] | :heavy_minus_sign: | Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 | | +| `pages` | [OptionalNullable[models.Pages]](../../models/pages.md) | :heavy_minus_sign: | Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. | | | `include_image_base64` | *OptionalNullable[bool]* | :heavy_minus_sign: | Include image URLs in response | | | `image_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | Max images to extract | | | `image_min_size` | *OptionalNullable[int]* | :heavy_minus_sign: | Minimum height and width of image to extract | | @@ -55,6 +55,7 @@ with Mistral( | `table_format` | [OptionalNullable[models.TableFormat]](../../models/tableformat.md) | :heavy_minus_sign: | N/A | | | `extract_header` | *Optional[bool]* | :heavy_minus_sign: | N/A | | | `extract_footer` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `confidence_scores_granularity` | [OptionalNullable[models.ConfidenceScoresGranularity]](../../models/confidencescoresgranularity.md) | :heavy_minus_sign: | Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/pyproject.toml b/pyproject.toml index 358a1336..2aaac4d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.3.0" +version = "2.3.1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 0a44f4d8..aa94ac8d 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.3.0" +__version__: str = "2.3.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.3.0 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.3.1 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 5e03fddf..34e6bdc1 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -1387,14 +1387,22 @@ ObservabilityErrorDetail, ObservabilityErrorDetailTypedDict, ) + from .ocrconfidencescore import OCRConfidenceScore, OCRConfidenceScoreTypedDict from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict + from .ocrpageconfidencescores import ( + OCRPageConfidenceScores, + OCRPageConfidenceScoresTypedDict, + ) from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict from .ocrpageobject import OCRPageObject, OCRPageObjectTypedDict from .ocrrequest import ( + ConfidenceScoresGranularity, DocumentUnion, DocumentUnionTypedDict, OCRRequest, OCRRequestTypedDict, + Pages, + PagesTypedDict, TableFormat, ) from .ocrresponse import OCRResponse, OCRResponseTypedDict @@ -2341,6 +2349,7 @@ "CompletionResponseStreamChoiceTypedDict", "CompletionTrainingParameters", "CompletionTrainingParametersTypedDict", + "ConfidenceScoresGranularity", "Confirmation", "Connector", "ConnectorCallToolRequest", @@ -2990,8 +2999,12 @@ "NetworkEncodedInputTypedDict", "OAuth2TokenAuth", "OAuth2TokenAuthTypedDict", + "OCRConfidenceScore", + "OCRConfidenceScoreTypedDict", "OCRImageObject", "OCRImageObjectTypedDict", + "OCRPageConfidenceScores", + "OCRPageConfidenceScoresTypedDict", "OCRPageDimensions", "OCRPageDimensionsTypedDict", "OCRPageObject", @@ -3016,6 +3029,8 @@ "OrderBy", "OutputContentChunks", "OutputContentChunksTypedDict", + "Pages", + "PagesTypedDict", "PaginatedConnectors", "PaginatedConnectorsTypedDict", "PaginatedResultCampaignPreview", @@ -4467,16 +4482,23 @@ "ObservabilityErrorCode": ".observabilityerrorcode", "ObservabilityErrorDetail": ".observabilityerrordetail", "ObservabilityErrorDetailTypedDict": ".observabilityerrordetail", + "OCRConfidenceScore": ".ocrconfidencescore", + "OCRConfidenceScoreTypedDict": ".ocrconfidencescore", "OCRImageObject": ".ocrimageobject", "OCRImageObjectTypedDict": ".ocrimageobject", + "OCRPageConfidenceScores": ".ocrpageconfidencescores", + "OCRPageConfidenceScoresTypedDict": ".ocrpageconfidencescores", "OCRPageDimensions": ".ocrpagedimensions", "OCRPageDimensionsTypedDict": ".ocrpagedimensions", "OCRPageObject": ".ocrpageobject", "OCRPageObjectTypedDict": ".ocrpageobject", + "ConfidenceScoresGranularity": ".ocrrequest", "DocumentUnion": ".ocrrequest", "DocumentUnionTypedDict": ".ocrrequest", "OCRRequest": ".ocrrequest", "OCRRequestTypedDict": ".ocrrequest", + "Pages": ".ocrrequest", + "PagesTypedDict": ".ocrrequest", "TableFormat": ".ocrrequest", "OCRResponse": ".ocrresponse", "OCRResponseTypedDict": ".ocrresponse", diff --git a/src/mistralai/client/models/chatcompletionchoice.py b/src/mistralai/client/models/chatcompletionchoice.py index 2c515f6e..ccaedb9b 100644 --- a/src/mistralai/client/models/chatcompletionchoice.py +++ b/src/mistralai/client/models/chatcompletionchoice.py @@ -3,9 +3,10 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from mistralai.client.types import BaseModel, UnrecognizedStr -from typing import Literal, Union -from typing_extensions import TypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr +from pydantic import model_serializer +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypedDict ChatCompletionChoiceFinishReason = Union[ @@ -22,13 +23,32 @@ class ChatCompletionChoiceTypedDict(TypedDict): index: int - message: AssistantMessageTypedDict finish_reason: ChatCompletionChoiceFinishReason + message: NotRequired[AssistantMessageTypedDict] + messages: NotRequired[List[AssistantMessageTypedDict]] class ChatCompletionChoice(BaseModel): index: int - message: AssistantMessage - finish_reason: ChatCompletionChoiceFinishReason + + message: Optional[AssistantMessage] = None + + messages: Optional[List[AssistantMessage]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message", "messages"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/eventsource.py b/src/mistralai/client/models/eventsource.py index d0f4d5e3..1959cdec 100644 --- a/src/mistralai/client/models/eventsource.py +++ b/src/mistralai/client/models/eventsource.py @@ -8,4 +8,5 @@ EventSource = Literal[ "DATABASE", "LIVE", + "HYBRID", ] diff --git a/src/mistralai/client/models/ocrconfidencescore.py b/src/mistralai/client/models/ocrconfidencescore.py new file mode 100644 index 00000000..7fab8c9b --- /dev/null +++ b/src/mistralai/client/models/ocrconfidencescore.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 15b75862a7bd + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class OCRConfidenceScoreTypedDict(TypedDict): + r"""Confidence score for a token or word in OCR output.""" + + text: str + r"""The word or text segment""" + confidence: float + r"""Confidence score (0-1)""" + start_index: int + r"""Start index of the text in the page markdown string""" + + +class OCRConfidenceScore(BaseModel): + r"""Confidence score for a token or word in OCR output.""" + + text: str + r"""The word or text segment""" + + confidence: float + r"""Confidence score (0-1)""" + + start_index: int + r"""Start index of the text in the page markdown string""" diff --git a/src/mistralai/client/models/ocrpageconfidencescores.py b/src/mistralai/client/models/ocrpageconfidencescores.py new file mode 100644 index 00000000..622171d0 --- /dev/null +++ b/src/mistralai/client/models/ocrpageconfidencescores.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7e4a07e4bdfd + +from __future__ import annotations +from .ocrconfidencescore import OCRConfidenceScore, OCRConfidenceScoreTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class OCRPageConfidenceScoresTypedDict(TypedDict): + r"""Confidence scores for an OCR page at various granularities. + + Note on page-level stats: + - For 'page' granularity: average/minimum are computed from per-token exp(logprob). + - For 'word' granularity: average/minimum are computed from per-word confidence, + where each word's confidence is exp(mean(token_logprobs)) — a geometric mean + over the word's subword tokens. + """ + + average_page_confidence_score: float + r"""Average confidence score for the page""" + minimum_page_confidence_score: float + r"""Minimum confidence score for the page""" + word_confidence_scores: NotRequired[List[OCRConfidenceScoreTypedDict]] + r"""Word-level confidence scores (populated only for 'word' granularity)""" + + +class OCRPageConfidenceScores(BaseModel): + r"""Confidence scores for an OCR page at various granularities. + + Note on page-level stats: + - For 'page' granularity: average/minimum are computed from per-token exp(logprob). + - For 'word' granularity: average/minimum are computed from per-word confidence, + where each word's confidence is exp(mean(token_logprobs)) — a geometric mean + over the word's subword tokens. + """ + + average_page_confidence_score: float + r"""Average confidence score for the page""" + + minimum_page_confidence_score: float + r"""Minimum confidence score for the page""" + + word_confidence_scores: Optional[List[OCRConfidenceScore]] = None + r"""Word-level confidence scores (populated only for 'word' granularity)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["word_confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/ocrpageobject.py b/src/mistralai/client/models/ocrpageobject.py index 40b70d81..d77661aa 100644 --- a/src/mistralai/client/models/ocrpageobject.py +++ b/src/mistralai/client/models/ocrpageobject.py @@ -3,6 +3,10 @@ from __future__ import annotations from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict +from .ocrpageconfidencescores import ( + OCRPageConfidenceScores, + OCRPageConfidenceScoresTypedDict, +) from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict from .ocrtableobject import OCRTableObject, OCRTableObjectTypedDict from mistralai.client.types import ( @@ -34,6 +38,8 @@ class OCRPageObjectTypedDict(TypedDict): r"""Header of the page""" footer: NotRequired[Nullable[str]] r"""Footer of the page""" + confidence_scores: NotRequired[Nullable[OCRPageConfidenceScoresTypedDict]] + r"""Confidence scores for the OCR page (populated when confidence_scores_granularity is set)""" class OCRPageObject(BaseModel): @@ -61,10 +67,15 @@ class OCRPageObject(BaseModel): footer: OptionalNullable[str] = UNSET r"""Footer of the page""" + confidence_scores: OptionalNullable[OCRPageConfidenceScores] = UNSET + r"""Confidence scores for the OCR page (populated when confidence_scores_granularity is set)""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tables", "hyperlinks", "header", "footer"]) - nullable_fields = set(["header", "footer", "dimensions"]) + optional_fields = set( + ["tables", "hyperlinks", "header", "footer", "confidence_scores"] + ) + nullable_fields = set(["header", "footer", "dimensions", "confidence_scores"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/ocrrequest.py b/src/mistralai/client/models/ocrrequest.py index 6e405ee4..7f1adc40 100644 --- a/src/mistralai/client/models/ocrrequest.py +++ b/src/mistralai/client/models/ocrrequest.py @@ -31,19 +31,33 @@ r"""Document to run OCR on""" +PagesTypedDict = TypeAliasType("PagesTypedDict", Union[str, List[int]]) +r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" + + +Pages = TypeAliasType("Pages", Union[str, List[int]]) +r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" + + TableFormat = Literal[ "markdown", "html", ] +ConfidenceScoresGranularity = Literal[ + "word", + "page", +] + + class OCRRequestTypedDict(TypedDict): model: Nullable[str] document: DocumentUnionTypedDict r"""Document to run OCR on""" id: NotRequired[str] - pages: NotRequired[Nullable[List[int]]] - r"""Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0""" + pages: NotRequired[Nullable[PagesTypedDict]] + r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" include_image_base64: NotRequired[Nullable[bool]] r"""Include image URLs in response""" image_limit: NotRequired[Nullable[int]] @@ -59,6 +73,8 @@ class OCRRequestTypedDict(TypedDict): table_format: NotRequired[Nullable[TableFormat]] extract_header: NotRequired[bool] extract_footer: NotRequired[bool] + confidence_scores_granularity: NotRequired[Nullable[ConfidenceScoresGranularity]] + r"""Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small.""" class OCRRequest(BaseModel): @@ -69,8 +85,8 @@ class OCRRequest(BaseModel): id: Optional[str] = None - pages: OptionalNullable[List[int]] = UNSET - r"""Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0""" + pages: OptionalNullable[Pages] = UNSET + r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" include_image_base64: OptionalNullable[bool] = UNSET r"""Include image URLs in response""" @@ -96,6 +112,9 @@ class OCRRequest(BaseModel): extract_footer: Optional[bool] = None + confidence_scores_granularity: OptionalNullable[ConfidenceScoresGranularity] = UNSET + r"""Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -111,6 +130,7 @@ def serialize_model(self, handler): "table_format", "extract_header", "extract_footer", + "confidence_scores_granularity", ] ) nullable_fields = set( @@ -124,6 +144,7 @@ def serialize_model(self, handler): "document_annotation_format", "document_annotation_prompt", "table_format", + "confidence_scores_granularity", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/ocrtableobject.py b/src/mistralai/client/models/ocrtableobject.py index 66bb050f..1cb59527 100644 --- a/src/mistralai/client/models/ocrtableobject.py +++ b/src/mistralai/client/models/ocrtableobject.py @@ -2,10 +2,19 @@ # @generated-id: d74dd0d2ddac from __future__ import annotations -from mistralai.client.types import BaseModel, UnrecognizedStr +from .ocrconfidencescore import OCRConfidenceScore, OCRConfidenceScoreTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) import pydantic -from typing import Literal, Union -from typing_extensions import Annotated, TypedDict +from pydantic import model_serializer +from typing import List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict Format = Union[ @@ -25,6 +34,8 @@ class OCRTableObjectTypedDict(TypedDict): r"""Content of the table in the given format""" format_: Format r"""Format of the table""" + word_confidence_scores: NotRequired[Nullable[List[OCRConfidenceScoreTypedDict]]] + r"""Per-word confidence scores for the table content. Returned when confidence_scores_granularity is set to 'word'.""" class OCRTableObject(BaseModel): @@ -37,6 +48,34 @@ class OCRTableObject(BaseModel): format_: Annotated[Format, pydantic.Field(alias="format")] r"""Format of the table""" + word_confidence_scores: OptionalNullable[List[OCRConfidenceScore]] = UNSET + r"""Per-word confidence scores for the table content. Returned when confidence_scores_granularity is set to 'word'.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["word_confidence_scores"]) + nullable_fields = set(["word_confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + try: OCRTableObject.model_rebuild() diff --git a/src/mistralai/client/ocr.py b/src/mistralai/client/ocr.py index be0cdfad..8a13ca43 100644 --- a/src/mistralai/client/ocr.py +++ b/src/mistralai/client/ocr.py @@ -7,7 +7,7 @@ from mistralai.client.types import Nullable, OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional, Union +from typing import Any, Mapping, Optional, Union class Ocr(BaseSDK): @@ -19,7 +19,7 @@ def process( model: Nullable[str], document: Union[models.DocumentUnion, models.DocumentUnionTypedDict], id: Optional[str] = None, - pages: OptionalNullable[List[int]] = UNSET, + pages: OptionalNullable[Union[models.Pages, models.PagesTypedDict]] = UNSET, include_image_base64: OptionalNullable[bool] = UNSET, image_limit: OptionalNullable[int] = UNSET, image_min_size: OptionalNullable[int] = UNSET, @@ -33,6 +33,9 @@ def process( table_format: OptionalNullable[models.TableFormat] = UNSET, extract_header: Optional[bool] = None, extract_footer: Optional[bool] = None, + confidence_scores_granularity: OptionalNullable[ + models.ConfidenceScoresGranularity + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -43,7 +46,7 @@ def process( :param model: :param document: Document to run OCR on :param id: - :param pages: Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 + :param pages: Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. :param include_image_base64: Include image URLs in response :param image_limit: Max images to extract :param image_min_size: Minimum height and width of image to extract @@ -53,6 +56,7 @@ def process( :param table_format: :param extract_header: :param extract_footer: + :param confidence_scores_granularity: Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -89,6 +93,7 @@ def process( table_format=table_format, extract_header=extract_header, extract_footer=extract_footer, + confidence_scores_granularity=confidence_scores_granularity, ) req = self._build_request( @@ -157,7 +162,7 @@ async def process_async( model: Nullable[str], document: Union[models.DocumentUnion, models.DocumentUnionTypedDict], id: Optional[str] = None, - pages: OptionalNullable[List[int]] = UNSET, + pages: OptionalNullable[Union[models.Pages, models.PagesTypedDict]] = UNSET, include_image_base64: OptionalNullable[bool] = UNSET, image_limit: OptionalNullable[int] = UNSET, image_min_size: OptionalNullable[int] = UNSET, @@ -171,6 +176,9 @@ async def process_async( table_format: OptionalNullable[models.TableFormat] = UNSET, extract_header: Optional[bool] = None, extract_footer: Optional[bool] = None, + confidence_scores_granularity: OptionalNullable[ + models.ConfidenceScoresGranularity + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -181,7 +189,7 @@ async def process_async( :param model: :param document: Document to run OCR on :param id: - :param pages: Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 + :param pages: Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. :param include_image_base64: Include image URLs in response :param image_limit: Max images to extract :param image_min_size: Minimum height and width of image to extract @@ -191,6 +199,7 @@ async def process_async( :param table_format: :param extract_header: :param extract_footer: + :param confidence_scores_granularity: Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -227,6 +236,7 @@ async def process_async( table_format=table_format, extract_header=extract_header, extract_footer=extract_footer, + confidence_scores_granularity=confidence_scores_granularity, ) req = self._build_request_async( diff --git a/uv.lock b/uv.lock index 3175b2ac..9393cb17 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.3.0" +version = "2.3.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 6eae7a0519ab51a4c125b566b4af9768a3bd533a Mon Sep 17 00:00:00 2001 From: Thomas Chardonnens <61554870+tchardonnens@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:55:05 +0200 Subject: [PATCH 40/82] feat: add Human in the loop confirmations (#482) remove example file --- src/mistralai/client/conversations.py | 193 +++++++++++++++++++--- src/mistralai/extra/exceptions.py | 227 +++++++++++++++++++++++++- src/mistralai/extra/run/context.py | 91 +++++++++-- src/mistralai/extra/run/deferred.py | 121 ++++++++++++++ 4 files changed, 593 insertions(+), 39 deletions(-) create mode 100644 src/mistralai/extra/run/deferred.py diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 49810eb6..f33c557b 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -28,6 +28,17 @@ ) from mistralai.extra.run.utils import run_requirements from mistralai.extra.observability.otel import GenAISpanEnum, get_or_create_otel_tracer +from mistralai.extra.exceptions import ( + DeferralReason, + DeferredToolCallsException, + DeferredToolCallEntry, + DeferredToolCallResponse, +) +from mistralai.extra.run.deferred import ( + _is_deferred_response, + _is_server_deferred, + _process_deferred_responses, +) logger = logging.getLogger(__name__) tracing_enabled, tracer = get_or_create_otel_tracer() @@ -48,7 +59,11 @@ class Conversations(BaseSDK): async def run_async( self, run_ctx: "RunContext", - inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], + inputs: Union[ + models.ConversationInputs, + models.ConversationInputsTypedDict, + List[DeferredToolCallResponse], + ], instructions: OptionalNullable[str] = UNSET, tools: OptionalNullable[ Union[ @@ -68,16 +83,44 @@ async def run_async( ) -> RunResult: """Run a conversation with the given inputs and context. - The execution of a run will only stop when no required local execution can be done.""" + The execution of a run will only stop when no required local execution can be done. + + Inputs can be: + - Regular conversation inputs (messages, function results, etc.) + - DeferredToolResponse objects (from deferred.confirm(), reject()) + + When passing DeferredToolResponse objects, the SDK will: + - Execute confirmed tools automatically + - Convert rejections to function results with the rejection message + """ from mistralai.client.beta import Beta # pylint: disable=import-outside-toplevel from mistralai.extra.run.context import _validate_run # pylint: disable=import-outside-toplevel from mistralai.extra.run.tools import get_function_calls # pylint: disable=import-outside-toplevel + # Check if inputs contain deferred responses - process them + pending_tool_confirmations: Optional[List[models.ToolCallConfirmation]] = None + if inputs and isinstance(inputs, list): + deferred_inputs = typing.cast( + List[DeferredToolCallResponse], + [i for i in inputs if _is_deferred_response(i)], + ) + other_inputs = typing.cast( + List[InputEntries], [i for i in inputs if not _is_deferred_response(i)] + ) + if deferred_inputs: + ( + processed, + pending_tool_confirmations, + ) = await _process_deferred_responses(run_ctx, deferred_inputs) + inputs = other_inputs + processed + if not pending_tool_confirmations: + pending_tool_confirmations = None + with tracer.start_as_current_span(GenAISpanEnum.VALIDATE_RUN.value): req, run_result, input_entries = await _validate_run( beta_client=Beta(self.sdk_configuration), run_ctx=run_ctx, - inputs=inputs, + inputs=typing.cast(List[InputEntries], inputs), instructions=instructions, tools=tools, completion_args=completion_args, @@ -105,26 +148,68 @@ async def run_async( res = await self.append_async( conversation_id=run_ctx.conversation_id, inputs=input_entries, + tool_confirmations=pending_tool_confirmations, retries=retries, server_url=server_url, timeout_ms=timeout_ms, + http_headers=http_headers, ) + # Clear after first use + pending_tool_confirmations = None run_ctx.request_count += 1 run_result.output_entries.extend(res.outputs) fcalls = get_function_calls(res.outputs) if not fcalls: logger.debug("No more function calls to execute") break - fresults = await run_ctx.execute_function_calls(fcalls) - run_result.output_entries.extend(fresults) - input_entries = typing.cast(list[InputEntries], fresults) + + # Partition by permission: include server-side deferred calls + to_defer = [ + fc + for fc in fcalls + if run_ctx.requires_confirmation(fc.name) or _is_server_deferred(fc) + ] + to_execute = [fc for fc in fcalls if fc not in to_defer] + + # Execute approved + fresults = [] + if to_execute: + fresults = await run_ctx.execute_function_calls(to_execute) + run_result.output_entries.extend(fresults) + input_entries = typing.cast(list[InputEntries], fresults) + + # Defer the rest - include executed_results so user can pass them back + if to_defer: + deferred_objects = [ + DeferredToolCallEntry( + fc, + reason=DeferralReason.SERVER_SIDE_CONFIRMATION_REQUIRED + if _is_server_deferred(fc) + else DeferralReason.CONFIRMATION_REQUIRED, + ) + for fc in to_defer + ] + raise DeferredToolCallsException( + run_ctx.conversation_id, + deferred_objects, + run_result.output_entries, + executed_results=fresults, + ) + + # If we only executed tools (none deferred), continue the loop + if not to_execute: + break return run_result @run_requirements async def run_stream_async( self, run_ctx: "RunContext", - inputs: Union[models.ConversationInputs, models.ConversationInputsTypedDict], + inputs: Union[ + models.ConversationInputs, + models.ConversationInputsTypedDict, + List[DeferredToolCallResponse], + ], instructions: OptionalNullable[str] = UNSET, tools: OptionalNullable[ Union[ @@ -144,23 +229,48 @@ async def run_stream_async( ) -> AsyncGenerator[Union[RunResultEvents, RunResult], None]: """Similar to `run_async` but returns a generator which streams events. - The last streamed object is the RunResult object which summarises what happened in the run.""" + The last streamed object is the RunResult object which summarises what happened in the run. + + Inputs can be: + - Regular conversation inputs (messages, function results, etc.) + - DeferredToolResponse objects (from deferred.confirm(), reject()) + """ from mistralai.client.beta import Beta # pylint: disable=import-outside-toplevel from mistralai.extra.run.context import _validate_run # pylint: disable=import-outside-toplevel from mistralai.extra.run.tools import get_function_calls # pylint: disable=import-outside-toplevel + # Check if inputs contain deferred responses - process them + pending_tool_confirmations: Optional[List[models.ToolCallConfirmation]] = None + if inputs and isinstance(inputs, list): + deferred_inputs = typing.cast( + List[DeferredToolCallResponse], + [i for i in inputs if _is_deferred_response(i)], + ) + other_inputs = typing.cast( + List[InputEntries], [i for i in inputs if not _is_deferred_response(i)] + ) + if deferred_inputs: + ( + processed, + pending_tool_confirmations, + ) = await _process_deferred_responses(run_ctx, deferred_inputs) + inputs = other_inputs + processed + if not pending_tool_confirmations: + pending_tool_confirmations = None + req, run_result, input_entries = await _validate_run( beta_client=Beta(self.sdk_configuration), run_ctx=run_ctx, - inputs=inputs, + inputs=typing.cast(List[InputEntries], inputs), instructions=instructions, tools=tools, completion_args=completion_args, ) - async def run_generator() -> ( - AsyncGenerator[Union[RunResultEvents, RunResult], None] - ): + async def run_generator() -> AsyncGenerator[ + Union[RunResultEvents, RunResult], None + ]: + nonlocal pending_tool_confirmations current_entries = input_entries while True: received_event_tracker: defaultdict[ @@ -181,10 +291,13 @@ async def run_generator() -> ( res = await self.append_stream_async( conversation_id=run_ctx.conversation_id, inputs=current_entries, + tool_confirmations=pending_tool_confirmations, retries=retries, server_url=server_url, timeout_ms=timeout_ms, ) + # Clear after first use + pending_tool_confirmations = None async for event in res: if ( isinstance(event.data, ResponseStartedEvent) @@ -207,18 +320,52 @@ async def run_generator() -> ( if not fcalls: logger.debug("No more function calls to execute") break - fresults = await run_ctx.execute_function_calls(fcalls) - run_result.output_entries.extend(fresults) - for fresult in fresults: - yield RunResultEvents( - event="function.result", - data=FunctionResultEvent( - type="function.result", - result=fresult.result, - tool_call_id=fresult.tool_call_id, - ), + + # Partition by permission: include server-side deferred calls + to_defer = [ + fc + for fc in fcalls + if run_ctx.requires_confirmation(fc.name) or _is_server_deferred(fc) + ] + to_execute = [fc for fc in fcalls if fc not in to_defer] + + # Execute approved + fresults = [] + if to_execute: + fresults = await run_ctx.execute_function_calls(to_execute) + run_result.output_entries.extend(fresults) + for fresult in fresults: + yield RunResultEvents( + event="function.result", + data=FunctionResultEvent( + type="function.result", + result=fresult.result, + tool_call_id=fresult.tool_call_id, + ), + ) + current_entries = typing.cast(list[InputEntries], fresults) + + # Defer the rest - include executed_results so user can pass them back + if to_defer: + deferred_objects = [ + DeferredToolCallEntry( + fc, + reason=DeferralReason.SERVER_SIDE_CONFIRMATION_REQUIRED + if _is_server_deferred(fc) + else DeferralReason.CONFIRMATION_REQUIRED, + ) + for fc in to_defer + ] + raise DeferredToolCallsException( + run_ctx.conversation_id, + deferred_objects, + run_result.output_entries, + executed_results=fresults, ) - current_entries = typing.cast(list[InputEntries], fresults) + + # If we only executed tools (none deferred), continue the loop + if not to_execute: + break yield run_result return run_generator() diff --git a/src/mistralai/extra/exceptions.py b/src/mistralai/extra/exceptions.py index d2cd3e79..86a39917 100644 --- a/src/mistralai/extra/exceptions.py +++ b/src/mistralai/extra/exceptions.py @@ -1,7 +1,19 @@ -from typing import Optional, TYPE_CHECKING +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Any, Optional, Union, TYPE_CHECKING +import typing + +from mistralai.client.models import ( + FunctionCallEntryArguments, + FunctionResultEntry, + FunctionCallEntry, +) if TYPE_CHECKING: from mistralai.client.models import RealtimeTranscriptionError + from mistralai.extra.run.result import RunOutputEntries class MistralClientException(Exception): @@ -20,6 +32,219 @@ class MCPAuthException(MCPException): """MCP authentication errors.""" +class DeferralReason(str, Enum): + """Reason why a tool call was deferred.""" + + CONFIRMATION_REQUIRED = "confirmation_required" + SERVER_SIDE_CONFIRMATION_REQUIRED = "server_side_confirmation_required" + + +@dataclass +class DeferredToolCallConfirmation: + """Response indicating the tool call is approved for execution.""" + + tool_call_id: str + tool_name: str + function_call: FunctionCallEntry + override_args: Optional[dict[str, Any]] = None + deferral_reason: Optional[DeferralReason] = None + + +@dataclass +class DeferredToolCallRejection: + """Response indicating tool should not be executed.""" + + tool_call_id: str + message: str = "Rejected by user" + deferral_reason: Optional[DeferralReason] = None + + +DeferredToolCallResponse = Union[ + DeferredToolCallConfirmation, DeferredToolCallRejection +] + + +class FunctionCallSchema(typing.TypedDict): + id: str | None + tool_call_id: str + name: str + arguments: FunctionCallEntryArguments + + +class DeferredToolCallEntrySchema(typing.TypedDict): + tool_call_id: str + tool_name: str + arguments: FunctionCallEntryArguments + reason: str + metadata: dict[str, Any] + function_call: FunctionCallSchema + + +class DeferredToolCallEntry: + """Represents a tool call that requires confirmation.""" + + def __init__( + self, + function_call: FunctionCallEntry, + reason: DeferralReason = DeferralReason.CONFIRMATION_REQUIRED, + metadata: Optional[dict[str, Any]] = None, + ): + self.function_call = function_call + self.tool_call_id = function_call.tool_call_id + self.tool_name = function_call.name + self.arguments = function_call.arguments + self.reason = reason + self.metadata = metadata or {} + + def to_function_result(self, result: str) -> dict[str, str]: + """Convert to function result dict for use as input.""" + return { + "tool_call_id": self.tool_call_id, + "result": result, + } + + def confirm( + self, override_args: Optional[dict[str, str]] = None + ) -> DeferredToolCallConfirmation: + """Create a confirmation response for this tool call.""" + return DeferredToolCallConfirmation( + tool_call_id=self.tool_call_id, + tool_name=self.tool_name, + function_call=self.function_call, + override_args=override_args, + deferral_reason=self.reason, + ) + + def reject(self, message: str = "Rejected by user") -> DeferredToolCallRejection: + """Create a rejection response for this tool call.""" + return DeferredToolCallRejection( + tool_call_id=self.tool_call_id, + message=message, + deferral_reason=self.reason, + ) + + def to_dict(self) -> DeferredToolCallEntrySchema: + """Serialize to a JSON-serializable dictionary for stateless scenarios.""" + return { + "tool_call_id": self.tool_call_id, + "tool_name": self.tool_name, + "arguments": self.arguments, + "reason": self.reason.value, + "metadata": self.metadata, + "function_call": { + "id": self.function_call.id, + "tool_call_id": self.function_call.tool_call_id, + "name": self.function_call.name, + "arguments": self.function_call.arguments, + }, + } + + @classmethod + def from_dict(cls, data: DeferredToolCallEntrySchema) -> DeferredToolCallEntry: + """Deserialize from a dictionary.""" + function_call = FunctionCallEntry( + id=data["function_call"].get("id"), + tool_call_id=data["function_call"]["tool_call_id"], + name=data["function_call"]["name"], + arguments=data["function_call"]["arguments"], + ) + return cls( + function_call=function_call, + reason=DeferralReason( + data.get("reason", DeferralReason.CONFIRMATION_REQUIRED.value) + ), + metadata=data.get("metadata", {}), + ) + + +class DeferredToolCallsExceptionSchema(typing.TypedDict): + conversation_id: str | None + deferred_calls: list[DeferredToolCallEntrySchema] + outputs: list[dict[str, Any]] + executed_results: list[dict[str, Any]] + + +class DeferredToolCallsException(RunException): + """Exception raised when tool calls require human confirmation.""" + + def __init__( + self, + conversation_id: str | None, + deferred_calls: list[DeferredToolCallEntry], + outputs: list[RunOutputEntries] | None = None, + executed_results: list[FunctionResultEntry] | None = None, + ): + self.conversation_id = conversation_id + self.deferred_calls = deferred_calls + self.outputs = outputs or [] + self.executed_results = executed_results or [] + super().__init__( + f"Deferred tool calls requiring confirmation: {[dc.tool_name for dc in deferred_calls]}" + ) + + def to_dict(self) -> DeferredToolCallsExceptionSchema: + """Serialize to a JSON-serializable dictionary for stateless scenarios.""" + return { + "conversation_id": self.conversation_id, + "deferred_calls": [dc.to_dict() for dc in self.deferred_calls], + "outputs": [entry.model_dump(mode="json") for entry in self.outputs], + "executed_results": [ + entry.model_dump(mode="json") for entry in self.executed_results + ], + } + + @classmethod + def from_dict( + cls, data: DeferredToolCallsExceptionSchema + ) -> DeferredToolCallsException: + """Deserialize from a dictionary.""" + from pydantic import BaseModel + from mistralai.client.models import ( + MessageOutputEntry, + FunctionCallEntry, + FunctionResultEntry, + AgentHandoffEntry, + ToolExecutionEntry, + ) + + output_entry_types: dict[str, type[BaseModel]] = { + "message.output": MessageOutputEntry, + "function.call": FunctionCallEntry, + "function.result": FunctionResultEntry, + "agent.handoff": AgentHandoffEntry, + "tool.execution": ToolExecutionEntry, + } + + deferred_calls = [ + DeferredToolCallEntry.from_dict(dc_data) + for dc_data in data["deferred_calls"] + ] + + outputs: list[RunOutputEntries] = [] + for entry_data in data.get("outputs", []): + entry_type = entry_data.get("type") + if isinstance(entry_type, str): + model_cls = output_entry_types.get(entry_type) + if model_cls is not None: + outputs.append( + typing.cast( + "RunOutputEntries", model_cls.model_validate(entry_data) + ) + ) + + executed_results = [ + FunctionResultEntry.model_validate(r) + for r in data.get("executed_results", []) + ] + + return cls( + conversation_id=data["conversation_id"], + deferred_calls=deferred_calls, + outputs=outputs, + executed_results=executed_results, + ) + + class RealtimeTranscriptionException(MistralClientException): """Base realtime transcription exception.""" diff --git a/src/mistralai/extra/run/context.py b/src/mistralai/extra/run/context.py index d253edd5..f33b393d 100644 --- a/src/mistralai/extra/run/context.py +++ b/src/mistralai/extra/run/context.py @@ -52,7 +52,9 @@ class AgentRequestKwargs(typing.TypedDict): class ModelRequestKwargs(typing.TypedDict): model: str instructions: OptionalNullable[str] - tools: OptionalNullable[list[ConversationRequestTool] | list[ConversationRequestToolTypedDict]] + tools: OptionalNullable[ + list[ConversationRequestTool] | list[ConversationRequestToolTypedDict] + ] completion_args: OptionalNullable[CompletionArgs | CompletionArgsTypedDict] @@ -78,6 +80,9 @@ class RunContext: _exit_stack: AsyncExitStack = field(init=False) _callable_tools: dict[str, RunTool] = field(init=False, default_factory=dict) _mcp_clients: list[MCPClientProtocol] = field(init=False, default_factory=list) + _tool_configurations: dict[str, dict[str, bool]] = field( + init=False, default_factory=dict + ) conversation_id: str | None = field(default=None) model: str | None = field(default=None) @@ -99,7 +104,14 @@ async def __aexit__(self, exc_type, exc_val, exc_tb): for mcp_client in self._mcp_clients: await mcp_client.aclose() - def register_func(self, func: Callable): + def requires_confirmation(self, tool_name: str) -> bool: + """Check if tool requires confirmation. Default: False.""" + config = self._tool_configurations.get(tool_name) + if config is None: + return False + return config.get("requires_confirmation", False) + + def register_func(self, func: Callable, requires_confirmation: bool = False): """Add a function to the context.""" if not inspect.isfunction(func): raise RunException( @@ -119,6 +131,10 @@ def register_func(self, func: Callable): tool=create_tool_call(func), ) + self._tool_configurations[func.__name__] = { + "requires_confirmation": requires_confirmation, + } + @wraps(func) def wrapper(*args, **kwargs): logger.info(f"Executing {func.__name__}") @@ -126,24 +142,63 @@ def wrapper(*args, **kwargs): return wrapper - async def register_mcp_clients(self, mcp_clients: list[MCPClientProtocol]) -> None: + async def register_mcp_clients( + self, + mcp_clients: list[MCPClientProtocol], + tool_configurations: list[dict[str, list[str]] | None] | None = None, + ) -> None: """Registering multiple MCP clients at the same time in the same asyncio.Task.""" - for mcp_client in mcp_clients: - await self.register_mcp_client(mcp_client) + for i, mcp_client in enumerate(mcp_clients): + tool_configuration = tool_configurations[i] if tool_configurations else None + await self.register_mcp_client( + mcp_client, tool_configuration=tool_configuration + ) - async def register_mcp_client(self, mcp_client: MCPClientProtocol) -> None: + async def register_mcp_client( + self, + mcp_client: MCPClientProtocol, + tool_configuration: dict[str, list[str]] | None = None, + ) -> None: """Add a MCP client to the context.""" await mcp_client.initialize(exit_stack=self._exit_stack) tools = await mcp_client.get_tools() + + include = ( + set(tool_configuration.get("include", [])) if tool_configuration else set() + ) + exclude = ( + set(tool_configuration.get("exclude", [])) if tool_configuration else set() + ) + requires_confirmation_list = ( + set(tool_configuration.get("requires_confirmation", [])) + if tool_configuration + else set() + ) + for tool in tools: + tool_name = tool.function.name + + if include: + if tool_name not in include: + continue + elif exclude: + if tool_name in exclude: + continue + logger.info( - f"Adding tool {tool.function.name} from {mcp_client._name or 'mcp client'}" + f"Adding tool {tool_name} from {mcp_client._name or 'mcp client'}" ) - self._callable_tools[tool.function.name] = RunMCPTool( - name=tool.function.name, + self._callable_tools[tool_name] = RunMCPTool( + name=tool_name, tool=tool, mcp_client=mcp_client, ) + + if tool_configuration is not None: + self._tool_configurations[tool_name] = { + "requires_confirmation": tool_name in requires_confirmation_list, + } + self._mcp_clients.append(mcp_client) async def execute_function_calls( @@ -213,8 +268,12 @@ async def prepare_agent_request(self, beta_client: "Beta") -> AgentRequestKwargs async def prepare_model_request( self, - tools: OptionalNullable[list[ConversationRequestTool] | list[ConversationRequestToolTypedDict]] = UNSET, - completion_args: OptionalNullable[CompletionArgs | CompletionArgsTypedDict] = UNSET, + tools: OptionalNullable[ + list[ConversationRequestTool] | list[ConversationRequestToolTypedDict] + ] = UNSET, + completion_args: OptionalNullable[ + CompletionArgs | CompletionArgsTypedDict + ] = UNSET, instructions: OptionalNullable[str] = None, ) -> ModelRequestKwargs: if self.model is None: @@ -254,11 +313,11 @@ async def _validate_run( run_ctx: RunContext, inputs: ConversationInputs | ConversationInputsTypedDict, instructions: OptionalNullable[str] = UNSET, - tools: OptionalNullable[list[ConversationRequestTool] | list[ConversationRequestToolTypedDict]] = UNSET, + tools: OptionalNullable[ + list[ConversationRequestTool] | list[ConversationRequestToolTypedDict] + ] = UNSET, completion_args: OptionalNullable[CompletionArgs | CompletionArgsTypedDict] = UNSET, -) -> tuple[ - AgentRequestKwargs | ModelRequestKwargs, RunResult, list[InputEntries] -]: +) -> tuple[AgentRequestKwargs | ModelRequestKwargs, RunResult, list[InputEntries]]: input_entries: list[InputEntries] = [] if isinstance(inputs, str): input_entries.append(MessageInputEntry(role="user", content=inputs)) @@ -268,6 +327,8 @@ async def _validate_run( input_entries.append( pydantic.TypeAdapter(InputEntries).validate_python(input) ) + elif isinstance(input, FunctionResultEntry): + input_entries.append(input) run_result = RunResult( input_entries=input_entries, output_model=run_ctx.output_format, diff --git a/src/mistralai/extra/run/deferred.py b/src/mistralai/extra/run/deferred.py new file mode 100644 index 00000000..5aa463b2 --- /dev/null +++ b/src/mistralai/extra/run/deferred.py @@ -0,0 +1,121 @@ +"""Helper functions for processing deferred tool call responses. + +Moved out of conversations.py to avoid conflicts with speakeasy code generation, +which overwrites everything outside custom regions. +""" + +from __future__ import annotations + +import asyncio +import json +from typing import TYPE_CHECKING + +from mistralai.client import models +from mistralai.extra.exceptions import ( + DeferralReason, + DeferredToolCallConfirmation, + DeferredToolCallRejection, + DeferredToolCallResponse, + RunException, +) + +if TYPE_CHECKING: + from mistralai.extra.run.context import RunContext + + +def _is_deferred_response(obj) -> bool: + """Check if object is a DeferredToolResponse.""" + return isinstance(obj, (DeferredToolCallConfirmation, DeferredToolCallRejection)) + + +def _is_server_deferred(fc: models.FunctionCallEntry) -> bool: + """Check if a function call was deferred server-side (pending confirmation).""" + return getattr(fc, "confirmation_status", None) == "pending" + + +async def _process_deferred_responses( + run_ctx: "RunContext", + responses: list[DeferredToolCallResponse], +) -> tuple[list[models.InputEntries], list[models.ToolCallConfirmation]]: + """Process deferred tool responses and return function results and server-side confirmations. + + For client-side deferrals (CONFIRMATION_REQUIRED): + - Confirmations: executes the tool using run_ctx -> FunctionResultEntry + - Rejections: creates a result with the rejection message -> FunctionResultEntry + For server-side deferrals (SERVER_SIDE_CONFIRMATION_REQUIRED): + - Confirmations: returns ToolCallConfirmation(confirmation="allow") + - Rejections: returns ToolCallConfirmation(confirmation="deny") + """ + results: list[models.InputEntries] = [] + tool_confirmations: list[models.ToolCallConfirmation] = [] + confirmation_tasks: list[tuple[str, str, asyncio.Task]] = [] + + for response in responses: + if isinstance(response, DeferredToolCallConfirmation): + reason = getattr( + response, "deferral_reason", DeferralReason.CONFIRMATION_REQUIRED + ) + + if reason == DeferralReason.SERVER_SIDE_CONFIRMATION_REQUIRED: + tool_confirmations.append( + models.ToolCallConfirmation( + tool_call_id=response.tool_call_id, + confirmation="allow", + ) + ) + else: + if response.override_args is not None: + original_args = ( + json.loads(response.function_call.arguments) + if isinstance(response.function_call.arguments, str) + else response.function_call.arguments + ) + merged_args = {**original_args, **response.override_args} + function_call = models.FunctionCallEntry( + id=response.function_call.id, + tool_call_id=response.tool_call_id, + name=response.tool_name, + arguments=json.dumps(merged_args), + ) + else: + function_call = response.function_call + + task = asyncio.create_task( + run_ctx.execute_function_calls([function_call]) + ) + confirmation_tasks.append( + (response.tool_call_id, response.tool_name, task) + ) + + elif isinstance(response, DeferredToolCallRejection): + reason = getattr( + response, "deferral_reason", DeferralReason.CONFIRMATION_REQUIRED + ) + + if reason == DeferralReason.SERVER_SIDE_CONFIRMATION_REQUIRED: + tool_confirmations.append( + models.ToolCallConfirmation( + tool_call_id=response.tool_call_id, + confirmation="deny", + ) + ) + else: + results.append( + models.FunctionResultEntry( + tool_call_id=response.tool_call_id, + result=response.message, + ) + ) + + if confirmation_tasks: + await asyncio.gather(*[task for _, _, task in confirmation_tasks]) + for tool_call_id, tool_name, task in confirmation_tasks: + task_results = task.result() + if task_results: + results.append(task_results[0]) + else: + raise RunException( + f"Tool '{tool_name}' is not registered in the RunContext" + ) + + return results, tool_confirmations From 5c4d2ca5f7735ee3fa7661e4799aca6e8253168c Mon Sep 17 00:00:00 2001 From: Maxime Dolores Date: Fri, 10 Apr 2026 15:40:45 +0200 Subject: [PATCH 41/82] fix: remove typehint causing ci error (#483) * fix: remove typehint causing ci error mypy treats the tuple unpacking of _process_deferred_responses as a redefinition when the variable is explicitly annotated above and caused ci to fail. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe * fix: add null checks for message in function_calling example --------- Co-authored-by: Mistral Vibe Co-authored-by: andreaonofrei01 --- examples/mistral/chat/function_calling.py | 3 +++ src/mistralai/client/conversations.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/mistral/chat/function_calling.py b/examples/mistral/chat/function_calling.py index 318e4e24..94d8899a 100644 --- a/examples/mistral/chat/function_calling.py +++ b/examples/mistral/chat/function_calling.py @@ -95,6 +95,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st response = client.chat.complete(model=model, messages=messages, tools=tools, temperature=0) +assert response.choices[0].message is not None print(response.choices[0].message.content) messages.append(AssistantMessage(content=response.choices[0].message.content)) @@ -102,6 +103,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st response = client.chat.complete(model=model, messages=messages, tools=tools, temperature=0) +assert response.choices[0].message is not None tool_calls = response.choices[0].message.tool_calls if not tool_calls: raise RuntimeError("Expected tool calls") @@ -130,4 +132,5 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st response = client.chat.complete(model=model, messages=messages, tools=tools, temperature=0) +assert response.choices[0].message is not None print(f"{response.choices[0].message.content}") diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index f33c557b..ed2e0fce 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -98,7 +98,7 @@ async def run_async( from mistralai.extra.run.tools import get_function_calls # pylint: disable=import-outside-toplevel # Check if inputs contain deferred responses - process them - pending_tool_confirmations: Optional[List[models.ToolCallConfirmation]] = None + pending_tool_confirmations = None if inputs and isinstance(inputs, list): deferred_inputs = typing.cast( List[DeferredToolCallResponse], @@ -240,7 +240,7 @@ async def run_stream_async( from mistralai.extra.run.tools import get_function_calls # pylint: disable=import-outside-toplevel # Check if inputs contain deferred responses - process them - pending_tool_confirmations: Optional[List[models.ToolCallConfirmation]] = None + pending_tool_confirmations = None if inputs and isinstance(inputs, list): deferred_inputs = typing.cast( List[DeferredToolCallResponse], From fe8a50340395fc2e427975e5bb01a79505973f05 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:03:35 +0200 Subject: [PATCH 42/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.3.2=20(#484)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.chat.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) * `mistral.agents.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) * `mistral.fim.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) * `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.judge()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fields.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.create()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.update()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.create()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.fetch_status()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.campaigns.list_events()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.libraries.list()`: `request` **Changed** * `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_campaign()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_explorer()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed** * `mistral.beta.observability.chat_completion_events.fetch()`: `error.detail.error_code` **Changed** * `mistral.chat.stream()`: `response.[].data.choices[].delta` **Changed** * `mistral.beta.observability.chat_completion_events.search_ids()`: `error.detail.error_code` **Changed** * `mistral.fim.stream()`: `response.[].data.choices[].delta` **Changed** * `mistral.beta.observability.chat_completion_events.search()`: `error.detail.error_code` **Changed** * `mistral.agents.stream()`: `response.[].data.choices[].delta` **Changed** * `mistral.workflows.deployments.get_deployment()`: `response.workers[].is_active` **Added** * chore: align pyproject.toml and uv.lock to version 2.3.2 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 120 +++++++++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- docs/models/chatcompletionchoice.md | 2 +- docs/models/deltamessage.md | 13 +- docs/models/deploymentworkerresponse.md | 3 +- docs/models/librarieslistv1request.md | 10 +- docs/models/observabilityerrorcode.md | 3 + docs/sdks/libraries/README.md | 12 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/conversations.py | 20 +++ src/mistralai/client/libraries.py | 12 ++ .../client/models/chatcompletionchoice.py | 5 +- src/mistralai/client/models/deltamessage.py | 21 ++- .../client/models/deploymentworkerresponse.py | 5 + .../client/models/libraries_list_v1op.py | 37 +++++- .../client/models/observabilityerrorcode.py | 3 + uv.lock | 2 +- 20 files changed, 228 insertions(+), 70 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index dc44fd3b..e7b3ebfb 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 880db51e79b2d35e6c3cfb35deebc5f2 + docChecksum: eed1e14031b7c6a8e5aab140c8de4fc7 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.3.1 - configChecksum: cfc814ae7d34226a7aa57f42b133b76e + releaseVersion: 2.3.2 + configChecksum: c93d1019e9a3a1a37a0c7d7bf48aa381 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: da4d1522-be42-4fed-8e47-6a1a86083dd9 - pristine_commit_hash: 0af2a650df50ba629dd4358d9ecd97a7a865b28a - pristine_tree_hash: 21954a44b6b1fcad3bcbbb7ec53a7846e7141605 + generation_id: 87bc3ff0-98ad-4b9d-9b68-f8eb30116ac5 + pristine_commit_hash: 8b68490f4bb48a091c4b0e16a738af9e7ff83490 + pristine_tree_hash: b87817d13d249439af787f92e305f67aeaa2ef27 features: python: acceptHeaders: 3.0.0 @@ -412,8 +412,8 @@ trackedFiles: pristine_git_object: ba9c95eab2c1e4f080e39e8804a5de222e052ee6 docs/models/chatcompletionchoice.md: id: 0d15c59ab501 - last_write_checksum: sha1:2b449f1c0c7d2f7e7fade4ba2b66892e042ec52e - pristine_git_object: 61a2bec17657ed2ce75e5b2ac731c2c339e03987 + last_write_checksum: sha1:f3c9fa3cc092674a36bf28552b6900d62871b789 + pristine_git_object: 79d24a335c7ca1acb1469213d60ced2ec4987461 docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 last_write_checksum: sha1:160ff1297bfbaa9158e575b8bd7ab573533c8f9f @@ -992,8 +992,8 @@ trackedFiles: pristine_git_object: 0afc04f2ce115a8f48aa5f2e99b0fe02facce90e docs/models/deltamessage.md: id: 6c5ed6b60968 - last_write_checksum: sha1:00052476b9b2474dbc149f18dd18c71c86d0fc74 - pristine_git_object: e0ee575f3fce7c312114ce8c5390efc5c4854952 + last_write_checksum: sha1:c49575abe1bb581db1ae497b7a3b1ff2820abfbc + pristine_git_object: c2395e1bb06f983a2f56ab5900f126ed99ae9c11 docs/models/deltamessagecontent.md: id: 7307bedc8733 last_write_checksum: sha1:a1211b8cb576ad1358e68983680ee326c3920a5e @@ -1012,8 +1012,8 @@ trackedFiles: pristine_git_object: f6f12836457eb150c477d37d7325238dac25ded5 docs/models/deploymentworkerresponse.md: id: 07cd9c89237a - last_write_checksum: sha1:7da6e9f5df0b2d81ae899b28a3c5cdb9fbd2b0d3 - pristine_git_object: 9b76278e391626a3a8ab3607def03730f169215b + last_write_checksum: sha1:1f8b60ad6e17714100626106c2de16f6aca273e4 + pristine_git_object: afdcca834da74cc33711b1aa229f5ccf66eceefd docs/models/document.md: id: cd1d2a444370 last_write_checksum: sha1:c10641b02547bedcc982b8997097083dfc562598 @@ -1728,8 +1728,8 @@ trackedFiles: pristine_git_object: 6e1e04c39c15a85d96710f8d3a8ed11a22412816 docs/models/librarieslistv1request.md: id: eb6047c126d3 - last_write_checksum: sha1:9079cd35336bd61bcf0a46c1b350671a5e7df9df - pristine_git_object: b9f99a17907fad6427542181936fb962ca873ed3 + last_write_checksum: sha1:7bd4a00dfe54162bd3c315ca0ab2990133969390 + pristine_git_object: 37352ee1277aa9576da968ce44b0ffda772715f7 docs/models/librariessharecreatev1request.md: id: 99e7bb8f7fed last_write_checksum: sha1:f37578c7882eab83cca3cb2aaf1ac17b9a21934c @@ -1988,8 +1988,8 @@ trackedFiles: pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/observabilityerrorcode.md: id: 61d16ff95b87 - last_write_checksum: sha1:e5b3959fbd1febe3c727d1e93c8df71f31b2ae9f - pristine_git_object: c2afc4d0a5b26d3b1fa83a1169e7625012340137 + last_write_checksum: sha1:db506572c8c6e989127c270dd65d4ea98e281c58 + pristine_git_object: d8532e86b041e814f56b11ebae900dcdc88efc60 docs/models/observabilityerrordetail.md: id: 38061447dfbb last_write_checksum: sha1:1da7bf6e72c2f972b0e22f0201a1cb9b76f53ccd @@ -3156,8 +3156,8 @@ trackedFiles: pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 - last_write_checksum: sha1:4d37c4de9e0d6e8693ed2f19e6512412eae06932 - pristine_git_object: 1ae444f1ffa634c276c4695d9d978a6db7c59dc1 + last_write_checksum: sha1:627694b529bd8eb7fea6b8cfcfafa0c07282bf00 + pristine_git_object: 7d244f79322f6e7d5e01c9279b8abce634d6f1f7 docs/sdks/metrics/README.md: id: a8545d964e21 last_write_checksum: sha1:0c559bd570e162c994c6125058f3712e24bc576b @@ -3228,8 +3228,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:9a1feeb59a26a1eef191112013191e9f32399ef6 - pristine_git_object: aa94ac8d12a7009a1cd3a1c33379fe4b341e71c2 + last_write_checksum: sha1:dca0e0738b2373b2584935344961ec24f471cfc3 + pristine_git_object: aa5d0670adfd0d8f55285e170ea83e032364276f src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d @@ -3284,8 +3284,8 @@ trackedFiles: pristine_git_object: fc9d6319b4d321e21a7b7d73515f9d13b9ac8a2a src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:b975766d73e0c407ae43bd79c52fa604233fbb73 - pristine_git_object: 49810eb612208745b2a2cf26fc8419245f86520b + last_write_checksum: sha1:3e52c3d1441c9f276ff03bd6ed6fd74b6752ab1a + pristine_git_object: 1e48d6c421cc6428c247d0643df3324f866be4e0 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:52f8dc6df7430622882b02e8d01d8da02e4e998f @@ -3368,8 +3368,8 @@ trackedFiles: pristine_git_object: 210a147a86956d2da0d2e80d51d37bf4fa3bafd4 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:2c86ed3940b6e4841807d6b36e67fecd1bb44525 - pristine_git_object: 053cb65df029ea9899e0b565dec6e34e3525b3e0 + last_write_checksum: sha1:51838e6fd61bf7f0aabe4df449f53e9b1e8f9401 + pristine_git_object: fd9dbc5fbc7f853a638c6377bf7e4cc41c090da4 src/mistralai/client/metrics.py: id: 937cb03f8130 last_write_checksum: sha1:0f650d881a321f34f03cf53d841bdb422516d699 @@ -3636,8 +3636,8 @@ trackedFiles: pristine_git_object: cf2aa78af3ffc747d557422b83551075b83e601d src/mistralai/client/models/chatcompletionchoice.py: id: 7e6a512f6a04 - last_write_checksum: sha1:07b02d246efbe5d61666488d23a5913b13cfdcb2 - pristine_git_object: ccaedb9b431030b74d4a5779c9164b0466dbfb4f + last_write_checksum: sha1:1ca89c543a5a01368910a35bb2381c4340fdd2e7 + pristine_git_object: ab8f331f35e80425590a13948bdab8cadcb4d394 src/mistralai/client/models/chatcompletionevent.py: id: d85484d0205e last_write_checksum: sha1:b709e6f710b62fee646eb7d12b24d69125522088 @@ -4024,8 +4024,8 @@ trackedFiles: pristine_git_object: 4bc6c5e678b66ac04f9a08b27cf392a2903a96a6 src/mistralai/client/models/deltamessage.py: id: 68f53d67a140 - last_write_checksum: sha1:f1b774b3febc9388ea8175d266f585aa2954af55 - pristine_git_object: 3823651b3030944520aad12c7e6f6b4e8bbf2a8c + last_write_checksum: sha1:5653c52c448643feab36e03ba2c73b602438149f + pristine_git_object: f0ca3282d3d26bbdcf9382063b14c185c3758faa src/mistralai/client/models/deploymentdetailresponse.py: id: 7f4a17a1c7ca last_write_checksum: sha1:c0d41bf5e5fbe06811aa3a6ddeb3b1cfab2ab8b6 @@ -4040,8 +4040,8 @@ trackedFiles: pristine_git_object: 7f8ed3a346fa92bf7c7ddfc72984a51442e58d0c src/mistralai/client/models/deploymentworkerresponse.py: id: b11a9947bd19 - last_write_checksum: sha1:e57ad0af89e80ac9b2b40f9dbe1f6e6708efde3e - pristine_git_object: 0adcb4d6ee081b1bb699c1ebb2b8a4cec7bcb771 + last_write_checksum: sha1:cf27528873306d9137f08c82c87fa99b44ed5fc5 + pristine_git_object: 2955dc485bbf1017a728cb0562baf948083e1b13 src/mistralai/client/models/document.py: id: fbbf7428328c last_write_checksum: sha1:bc290f10562aaf9c24bd14ab3d2a31e62f535042 @@ -4664,8 +4664,8 @@ trackedFiles: pristine_git_object: 7a51d6053aa2cf2e6524a80487fe9549eec3dfa1 src/mistralai/client/models/libraries_list_v1op.py: id: 2d9b1b4deeb0 - last_write_checksum: sha1:7f853d8cd4a4c26ddb2ff2b6e7c0f35d2a2e540e - pristine_git_object: 088a41b2cf773965583fa980f9067381ca40cca8 + last_write_checksum: sha1:1c99dd9165c57ca19d94daf81f31c378125d280b + pristine_git_object: cac06dadbb33c7bf28b276b4c51f569a885ac44e src/mistralai/client/models/libraries_share_create_v1op.py: id: feaacfd46dd3 last_write_checksum: sha1:cdb7e60f1aceb2c7aa54fe2b9ba5dafc2bb70995 @@ -4876,8 +4876,8 @@ trackedFiles: pristine_git_object: 76ebfd0de6c7457bcecb1aee026ea16ffa8a7cbd src/mistralai/client/models/observabilityerrorcode.py: id: ae572b470a30 - last_write_checksum: sha1:fb2ec69dac101416f58bc9fc3e3828b3ab39e10f - pristine_git_object: f7ff71f8285e62f2bad5fd678865c96e40c38253 + last_write_checksum: sha1:48e211ca35c9df84914a119d118e2645862dc557 + pristine_git_object: 6c1826ed797ecb1a4b1e1e8abd2477bae3cdce60 src/mistralai/client/models/observabilityerrordetail.py: id: cb6e8a484a38 last_write_checksum: sha1:3a7991f57573edee24780bc4b3907c8426aa3fa6 @@ -8312,7 +8312,57 @@ examples: application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.ocr.process()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.pages[]` **Changed**\n* `mistral.chat.complete()`: `response.choices[]` **Changed**\n* `mistral.fim.complete()`: `response.choices[]` **Changed**\n* `mistral.agents.complete()`: `response.choices[]` **Changed**\n* `mistral.workflows.executions.stream()`: `request.event_source` **Changed**\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.chat.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) + * `mistral.agents.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) + * `mistral.fim.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) + * `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.campaigns.delete()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.chat_completion_events.judge()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.chat_completion_events.fields.list()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.judges.create()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.judges.list()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.judges.fetch()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.judges.delete()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.judges.update()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.campaigns.create()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.campaigns.list()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.campaigns.fetch()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.campaigns.fetch_status()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.campaigns.list_events()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed** + * `mistral.beta.libraries.list()`: `request` **Changed** + * `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.import_from_campaign()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.import_from_explorer()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed** + * `mistral.beta.observability.chat_completion_events.fetch()`: `error.detail.error_code` **Changed** + * `mistral.chat.stream()`: `response.[].data.choices[].delta` **Changed** + * `mistral.beta.observability.chat_completion_events.search_ids()`: `error.detail.error_code` **Changed** + * `mistral.fim.stream()`: `response.[].data.choices[].delta` **Changed** + * `mistral.beta.observability.chat_completion_events.search()`: `error.detail.error_code` **Changed** + * `mistral.agents.stream()`: `response.[].data.choices[].delta` **Changed** + * `mistral.workflows.deployments.get_deployment()`: `response.workers[].is_active` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index bb768021..dd7683bd 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.3.1 + version: 2.3.2 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c77ab8e9..0d0b491d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:4d69c08534e6e63c9fadb6f11344bf178f9dbf962fe0e319013c96096a0b5244 - sourceBlobDigest: sha256:3cbfbae3d8be0884f2d588d3f9eec1b70c811931631a7ac240b7e7444cc081da + sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d + sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:4d69c08534e6e63c9fadb6f11344bf178f9dbf962fe0e319013c96096a0b5244 - sourceBlobDigest: sha256:3cbfbae3d8be0884f2d588d3f9eec1b70c811931631a7ac240b7e7444cc081da + sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d + sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:6afb787e5bd692753cade5670341d5cfd2307608034185cd6641ac02990b7104 + codeSamplesRevisionDigest: sha256:eca5f8b43169d558d70aa5eda99c74bd6853a4e08ee024de57b42ef1f07dce50 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/RELEASES.md b/RELEASES.md index a0f354c9..c7adc373 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -548,4 +548,14 @@ Based on: ### Generated - [python v2.3.1] . ### Releases -- [PyPI v2.3.1] https://pypi.org/project/mistralai/2.3.1 - . \ No newline at end of file +- [PyPI v2.3.1] https://pypi.org/project/mistralai/2.3.1 - . + +## 2026-04-10 13:42:26 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.3.2] . +### Releases +- [PyPI v2.3.2] https://pypi.org/project/mistralai/2.3.2 - . \ No newline at end of file diff --git a/docs/models/chatcompletionchoice.md b/docs/models/chatcompletionchoice.md index 61a2bec1..79d24a33 100644 --- a/docs/models/chatcompletionchoice.md +++ b/docs/models/chatcompletionchoice.md @@ -7,5 +7,5 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `index` | *int* | :heavy_check_mark: | N/A | 0 | | `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | -| `messages` | List[[models.AssistantMessage](../models/assistantmessage.md)] | :heavy_minus_sign: | N/A | | +| `messages` | List[[models.DeltaMessage](../models/deltamessage.md)] | :heavy_minus_sign: | N/A | | | `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file diff --git a/docs/models/deltamessage.md b/docs/models/deltamessage.md index e0ee575f..c2395e1b 100644 --- a/docs/models/deltamessage.md +++ b/docs/models/deltamessage.md @@ -3,8 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `content` | [OptionalNullable[models.DeltaMessageContent]](../models/deltamessagecontent.md) | :heavy_minus_sign: | N/A | -| `tool_calls` | List[[models.ToolCall](../models/toolcall.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `content` | [OptionalNullable[models.DeltaMessageContent]](../models/deltamessagecontent.md) | :heavy_minus_sign: | N/A | +| `tool_calls` | List[[models.ToolCall](../models/toolcall.md)] | :heavy_minus_sign: | N/A | +| `tool_call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `index` | *OptionalNullable[int]* | :heavy_minus_sign: | If the completion returns multiple messages, this is to specify which message this delta is for. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/deploymentworkerresponse.md b/docs/models/deploymentworkerresponse.md index 9b76278e..afdcca83 100644 --- a/docs/models/deploymentworkerresponse.md +++ b/docs/models/deploymentworkerresponse.md @@ -7,4 +7,5 @@ | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | Worker name | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the worker first registered | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the worker last registered | \ No newline at end of file +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the worker last registered | +| `is_active` | *bool* | :heavy_check_mark: | Whether this worker's liveness key is currently alive | \ No newline at end of file diff --git a/docs/models/librarieslistv1request.md b/docs/models/librarieslistv1request.md index b9f99a17..37352ee1 100644 --- a/docs/models/librarieslistv1request.md +++ b/docs/models/librarieslistv1request.md @@ -3,7 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | +| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. | \ No newline at end of file diff --git a/docs/models/observabilityerrorcode.md b/docs/models/observabilityerrorcode.md index c2afc4d0..d8532e86 100644 --- a/docs/models/observabilityerrorcode.md +++ b/docs/models/observabilityerrorcode.md @@ -60,3 +60,6 @@ This is an open enum. Unrecognized values will not fail type checks. - `"TEMPLATE_SYNTAX_ERROR"` - `"PROJECT_NAME_ALREADY_EXISTS"` - `"EVALUATION_NAME_ALREADY_EXISTS"` +- `"TRACES_FILTER_QUERY_PARSE_ERROR"` +- `"TRACE_NOT_FOUND"` +- `"SPAN_NOT_FOUND"` diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index 25cd04b2..1f3d927c 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -37,11 +37,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | +| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/pyproject.toml b/pyproject.toml index 2aaac4d4..75f188b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.3.1" +version = "2.3.2" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index aa94ac8d..aa5d0670 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.3.1" +__version__: str = "2.3.2" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.3.1 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.3.2 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index ed2e0fce..3144b919 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -97,6 +97,25 @@ async def run_async( from mistralai.extra.run.context import _validate_run # pylint: disable=import-outside-toplevel from mistralai.extra.run.tools import get_function_calls # pylint: disable=import-outside-toplevel + # Check if inputs contain deferred responses - process them + pending_tool_confirmations = None + if inputs and isinstance(inputs, list): + deferred_inputs = typing.cast( + List[DeferredToolCallResponse], + [i for i in inputs if _is_deferred_response(i)], + ) + other_inputs = typing.cast( + List[InputEntries], [i for i in inputs if not _is_deferred_response(i)] + ) + if deferred_inputs: + ( + processed, + pending_tool_confirmations, + ) = await _process_deferred_responses(run_ctx, deferred_inputs) + inputs = other_inputs + processed + if not pending_tool_confirmations: + pending_tool_confirmations = None + # Check if inputs contain deferred responses - process them pending_tool_confirmations = None if inputs and isinstance(inputs, list): @@ -270,6 +289,7 @@ async def run_stream_async( async def run_generator() -> AsyncGenerator[ Union[RunResultEvents, RunResult], None ]: + nonlocal pending_tool_confirmations nonlocal pending_tool_confirmations current_entries = input_entries while True: diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index 053cb65d..fd9dbc5f 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -37,6 +37,8 @@ def list( *, page_size: Optional[int] = 100, page: Optional[int] = 0, + search: OptionalNullable[str] = UNSET, + filter_owned_by_me: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -48,6 +50,8 @@ def list( :param page_size: :param page: + :param search: Case-insensitive search on the library name. + :param filter_owned_by_me: Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -69,6 +73,8 @@ def list( request = models.LibrariesListV1Request( page_size=page_size, page=page, + search=search, + filter_owned_by_me=filter_owned_by_me, ) req = self._build_request( @@ -133,6 +139,8 @@ async def list_async( *, page_size: Optional[int] = 100, page: Optional[int] = 0, + search: OptionalNullable[str] = UNSET, + filter_owned_by_me: OptionalNullable[bool] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -144,6 +152,8 @@ async def list_async( :param page_size: :param page: + :param search: Case-insensitive search on the library name. + :param filter_owned_by_me: Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -165,6 +175,8 @@ async def list_async( request = models.LibrariesListV1Request( page_size=page_size, page=page, + search=search, + filter_owned_by_me=filter_owned_by_me, ) req = self._build_request_async( diff --git a/src/mistralai/client/models/chatcompletionchoice.py b/src/mistralai/client/models/chatcompletionchoice.py index ccaedb9b..ab8f331f 100644 --- a/src/mistralai/client/models/chatcompletionchoice.py +++ b/src/mistralai/client/models/chatcompletionchoice.py @@ -3,6 +3,7 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .deltamessage import DeltaMessage, DeltaMessageTypedDict from mistralai.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr from pydantic import model_serializer from typing import List, Literal, Optional, Union @@ -25,7 +26,7 @@ class ChatCompletionChoiceTypedDict(TypedDict): index: int finish_reason: ChatCompletionChoiceFinishReason message: NotRequired[AssistantMessageTypedDict] - messages: NotRequired[List[AssistantMessageTypedDict]] + messages: NotRequired[List[DeltaMessageTypedDict]] class ChatCompletionChoice(BaseModel): @@ -35,7 +36,7 @@ class ChatCompletionChoice(BaseModel): message: Optional[AssistantMessage] = None - messages: Optional[List[AssistantMessage]] = None + messages: Optional[List[DeltaMessage]] = None @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/deltamessage.py b/src/mistralai/client/models/deltamessage.py index 3823651b..f0ca3282 100644 --- a/src/mistralai/client/models/deltamessage.py +++ b/src/mistralai/client/models/deltamessage.py @@ -12,7 +12,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List, Union +from typing import Any, Dict, List, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -30,6 +30,10 @@ class DeltaMessageTypedDict(TypedDict): role: NotRequired[Nullable[str]] content: NotRequired[Nullable[DeltaMessageContentTypedDict]] tool_calls: NotRequired[Nullable[List[ToolCallTypedDict]]] + tool_call_id: NotRequired[Nullable[str]] + index: NotRequired[Nullable[int]] + r"""If the completion returns multiple messages, this is to specify which message this delta is for.""" + metadata: NotRequired[Nullable[Dict[str, Any]]] class DeltaMessage(BaseModel): @@ -39,10 +43,21 @@ class DeltaMessage(BaseModel): tool_calls: OptionalNullable[List[ToolCall]] = UNSET + tool_call_id: OptionalNullable[str] = UNSET + + index: OptionalNullable[int] = UNSET + r"""If the completion returns multiple messages, this is to specify which message this delta is for.""" + + metadata: OptionalNullable[Dict[str, Any]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["role", "content", "tool_calls"]) - nullable_fields = set(["role", "content", "tool_calls"]) + optional_fields = set( + ["role", "content", "tool_calls", "tool_call_id", "index", "metadata"] + ) + nullable_fields = set( + ["role", "content", "tool_calls", "tool_call_id", "index", "metadata"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/deploymentworkerresponse.py b/src/mistralai/client/models/deploymentworkerresponse.py index 0adcb4d6..2955dc48 100644 --- a/src/mistralai/client/models/deploymentworkerresponse.py +++ b/src/mistralai/client/models/deploymentworkerresponse.py @@ -14,6 +14,8 @@ class DeploymentWorkerResponseTypedDict(TypedDict): r"""When the worker first registered""" updated_at: datetime r"""When the worker last registered""" + is_active: bool + r"""Whether this worker's liveness key is currently alive""" class DeploymentWorkerResponse(BaseModel): @@ -25,3 +27,6 @@ class DeploymentWorkerResponse(BaseModel): updated_at: datetime r"""When the worker last registered""" + + is_active: bool + r"""Whether this worker's liveness key is currently alive""" diff --git a/src/mistralai/client/models/libraries_list_v1op.py b/src/mistralai/client/models/libraries_list_v1op.py index 088a41b2..cac06dad 100644 --- a/src/mistralai/client/models/libraries_list_v1op.py +++ b/src/mistralai/client/models/libraries_list_v1op.py @@ -2,7 +2,13 @@ # @generated-id: 2d9b1b4deeb0 from __future__ import annotations -from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.client.utils import FieldMetadata, QueryParamMetadata from pydantic import model_serializer from typing import Optional @@ -12,6 +18,10 @@ class LibrariesListV1RequestTypedDict(TypedDict): page_size: NotRequired[int] page: NotRequired[int] + search: NotRequired[Nullable[str]] + r"""Case-insensitive search on the library name.""" + filter_owned_by_me: NotRequired[Nullable[bool]] + r"""Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter.""" class LibrariesListV1Request(BaseModel): @@ -25,18 +35,39 @@ class LibrariesListV1Request(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 0 + search: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Case-insensitive search on the library name.""" + + filter_owned_by_me: Annotated[ + OptionalNullable[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["page_size", "page"]) + optional_fields = set(["page_size", "page", "search", "filter_owned_by_me"]) + nullable_fields = set(["search", "filter_owned_by_me"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/mistralai/client/models/observabilityerrorcode.py b/src/mistralai/client/models/observabilityerrorcode.py index f7ff71f8..6c1826ed 100644 --- a/src/mistralai/client/models/observabilityerrorcode.py +++ b/src/mistralai/client/models/observabilityerrorcode.py @@ -54,6 +54,9 @@ "TEMPLATE_SYNTAX_ERROR", "PROJECT_NAME_ALREADY_EXISTS", "EVALUATION_NAME_ALREADY_EXISTS", + "TRACES_FILTER_QUERY_PARSE_ERROR", + "TRACE_NOT_FOUND", + "SPAN_NOT_FOUND", ], UnrecognizedStr, ] diff --git a/uv.lock b/uv.lock index 9393cb17..2b942101 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.3.1" +version = "2.3.2" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 045a89fd351cf9052ccfb34579dc971342ec47d5 Mon Sep 17 00:00:00 2001 From: Nicolas Faurie Date: Tue, 14 Apr 2026 13:33:04 +0200 Subject: [PATCH 43/82] Workflow encoding feature (offloading / encryption) (#478) --- .speakeasy/gen.lock | 70 +- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- examples/fixtures/ft_training_file.jsonl | 2 +- examples/mistral/chat/function_calling.py | 3 + pyproject.toml | 20 + src/mistralai/client/_hooks/registration.py | 4 + .../client/_hooks/workflow_encoding_hook.py | 280 +++++ src/mistralai/client/_version.py | 4 +- src/mistralai/client/conversations.py | 1 - src/mistralai/extra/exceptions.py | 8 + src/mistralai/extra/workflows/__init__.py | 23 + .../extra/workflows/encoding/__init__.py | 24 + .../extra/workflows/encoding/config.py | 52 + .../extra/workflows/encoding/helpers.py | 47 + .../extra/workflows/encoding/models.py | 90 ++ .../workflows/encoding/payload_encoder.py | 335 ++++++ .../encoding/storage/blob_storage.py | 148 +++ src/mistralai/extra/workflows/helpers.py | 8 +- uv.lock | 954 +++++++++++++++++- 20 files changed, 2006 insertions(+), 71 deletions(-) create mode 100644 src/mistralai/client/_hooks/workflow_encoding_hook.py create mode 100644 src/mistralai/extra/workflows/encoding/__init__.py create mode 100644 src/mistralai/extra/workflows/encoding/config.py create mode 100644 src/mistralai/extra/workflows/encoding/helpers.py create mode 100644 src/mistralai/extra/workflows/encoding/models.py create mode 100644 src/mistralai/extra/workflows/encoding/payload_encoder.py create mode 100644 src/mistralai/extra/workflows/encoding/storage/blob_storage.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e7b3ebfb..f13a0849 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,15 +5,15 @@ management: docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.3.2 - configChecksum: c93d1019e9a3a1a37a0c7d7bf48aa381 + releaseVersion: 2.3.6 + configChecksum: 95068806fbe0942ab6561ca540458fc9 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 87bc3ff0-98ad-4b9d-9b68-f8eb30116ac5 - pristine_commit_hash: 8b68490f4bb48a091c4b0e16a738af9e7ff83490 - pristine_tree_hash: b87817d13d249439af787f92e305f67aeaa2ef27 + generation_id: 6d0c183b-fffd-4345-bc10-c73b69c91605 + pristine_commit_hash: 731e3f6f8d8451435e03d69da2dbe80bb13412f6 + pristine_tree_hash: df3f3821a4a083ea62b654833f022a2df2c149ac features: python: acceptHeaders: 3.0.0 @@ -61,7 +61,6 @@ trackedFiles: id: 89aa447020cd last_write_checksum: sha1:f84632c81029fcdda8c3b0c768d02b836fc80526 pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae - deleted: true USAGE.md: id: 3aed33ce6e6f last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f @@ -3228,8 +3227,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:dca0e0738b2373b2584935344961ec24f471cfc3 - pristine_git_object: aa5d0670adfd0d8f55285e170ea83e032364276f + last_write_checksum: sha1:2d58e5f157ee7ec7ba8a5bfc2726bcb56555d3b6 + pristine_git_object: 0e124f2202191d3a222b9a2abe6a91ee036adc01 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d @@ -3284,8 +3283,8 @@ trackedFiles: pristine_git_object: fc9d6319b4d321e21a7b7d73515f9d13b9ac8a2a src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:3e52c3d1441c9f276ff03bd6ed6fd74b6752ab1a - pristine_git_object: 1e48d6c421cc6428c247d0643df3324f866be4e0 + last_write_checksum: sha1:44b01585b9cbca3c9696c40b817529e76d6e7c32 + pristine_git_object: a9887a9a95308cad10cbaa2593b8552159cb0dca src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:52f8dc6df7430622882b02e8d01d8da02e4e998f @@ -8312,57 +8311,6 @@ examples: application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.chat.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) - * `mistral.agents.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) - * `mistral.fim.complete()`: `response.choices[].messages[]` **Changed** (Breaking ⚠️) - * `mistral.beta.observability.datasets.delete()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.campaigns.delete()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.chat_completion_events.judge()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.chat_completion_events.fields.list()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.chat_completion_events.fields.fetch_options()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.chat_completion_events.fields.fetch_option_counts()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.judges.create()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.judges.list()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.judges.fetch()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.judges.delete()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.judges.update()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.judges.judge_conversation()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.campaigns.create()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.campaigns.list()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.campaigns.fetch()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.list_records()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.campaigns.fetch_status()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.campaigns.list_events()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.create()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.list()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.fetch()`: `error.detail.error_code` **Changed** - * `mistral.beta.libraries.list()`: `request` **Changed** - * `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.update()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.records.update_properties()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.import_from_campaign()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.import_from_explorer()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.import_from_file()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.import_from_playground()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.import_from_dataset_records()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.export_to_jsonl()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.fetch_task()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.list_tasks()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.records.fetch()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.records.delete()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.records.bulk_delete()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.records.judge()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.records.update_payload()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.datasets.create_record()`: `error.detail.error_code` **Changed** - * `mistral.beta.observability.chat_completion_events.fetch()`: `error.detail.error_code` **Changed** - * `mistral.chat.stream()`: `response.[].data.choices[].delta` **Changed** - * `mistral.beta.observability.chat_completion_events.search_ids()`: `error.detail.error_code` **Changed** - * `mistral.fim.stream()`: `response.[].data.choices[].delta` **Changed** - * `mistral.beta.observability.chat_completion_events.search()`: `error.detail.error_code` **Changed** - * `mistral.agents.stream()`: `response.[].data.choices[].delta` **Changed** - * `mistral.workflows.deployments.get_deployment()`: `response.workers[].is_active` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index dd7683bd..39e96f6b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.3.2 + version: 2.3.6 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0d0b491d..539c318e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -41,7 +41,7 @@ targets: sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:eca5f8b43169d558d70aa5eda99c74bd6853a4e08ee024de57b42ef1f07dce50 + codeSamplesRevisionDigest: sha256:3cdb686b793df49b7b8b8ad1f8ea3bfda1ff762c3b130004d9d959024a40ae7b workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/examples/fixtures/ft_training_file.jsonl b/examples/fixtures/ft_training_file.jsonl index eecd016c..a889941a 100644 --- a/examples/fixtures/ft_training_file.jsonl +++ b/examples/fixtures/ft_training_file.jsonl @@ -18,4 +18,4 @@ {"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What is the smallest country in the world?"}, {"role": "assistant", "content": "Vatican City. Smaller than your average theme park."}]} {"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What language has the most native speakers?"}, {"role": "assistant", "content": "Mandarin Chinese. Because it's not all about English, you know."}]} {"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What is the hardest natural substance on Earth?"}, {"role": "assistant", "content": "Diamond. Not your average rock."}]} -{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What element does 'O' represent on the periodic table?"}, {"role": "assistant", "content": "Oxygen. The stuff you breathe. Hopefully, this isn't news."}]} +{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What element does 'O' represent on the periodic table?"}, {"role": "assistant", "content": "Oxygen. The stuff you breathe. Hopefully this isn't news."}]} diff --git a/examples/mistral/chat/function_calling.py b/examples/mistral/chat/function_calling.py index 94d8899a..bd694d8c 100644 --- a/examples/mistral/chat/function_calling.py +++ b/examples/mistral/chat/function_calling.py @@ -94,6 +94,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st ] response = client.chat.complete(model=model, messages=messages, tools=tools, temperature=0) +assert response.choices[0].message is not None assert response.choices[0].message is not None print(response.choices[0].message.content) @@ -102,6 +103,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st messages.append(UserMessage(content="My transaction ID is T1001.")) response = client.chat.complete(model=model, messages=messages, tools=tools, temperature=0) +assert response.choices[0].message is not None assert response.choices[0].message is not None tool_calls = response.choices[0].message.tool_calls @@ -131,6 +133,7 @@ def retrieve_payment_date(data: dict[str, list[Any]], transaction_id: str) -> st print(messages) response = client.chat.complete(model=model, messages=messages, tools=tools, temperature=0) +assert response.choices[0].message is not None assert response.choices[0].message is not None print(f"{response.choices[0].message.content}") diff --git a/pyproject.toml b/pyproject.toml index 75f188b1..d2621cf6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,6 +30,26 @@ realtime = [ "websockets >=13.0", ] +workflow_payload_offloading_azure = [ + "azure-storage-blob[aio]>=12.28.0,<13.0.0", +] +workflow_payload_offloading_gcs = [ + "gcloud-aio-storage>=9.3.0,<10.0.0", +] +workflow_payload_offloading_s3 = [ + "aioboto3>=12.4.0,<13.0.0", +] + +workflow_payload_offloading = [ + "mistralai[workflow_payload_offloading_azure]", + "mistralai[workflow_payload_offloading_gcs]", + "mistralai[workflow_payload_offloading_s3]", +] +workflow_payload_encryption = [ + "cryptography>=41.0.0,<47.0.0", +] + + [project.urls] Repository = "https://github.com/mistralai/client-python.git" diff --git a/src/mistralai/client/_hooks/registration.py b/src/mistralai/client/_hooks/registration.py index de781de7..4da6eb7c 100644 --- a/src/mistralai/client/_hooks/registration.py +++ b/src/mistralai/client/_hooks/registration.py @@ -3,6 +3,7 @@ from .traceparent import TraceparentInjectionHook from .tracing import TracingHook from .types import Hooks +from .workflow_encoding_hook import WorkflowEncodingHook # This file is only ever generated once on the first generation and then is free to be modified. # Any hooks you wish to add should be registered in the init_hooks function. Feel free to define them @@ -16,9 +17,12 @@ def init_hooks(hooks: Hooks): Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance """ tracing_hook = TracingHook() + workflow_encoding_hook = WorkflowEncodingHook() hooks.register_before_request_hook(CustomUserAgentHook()) hooks.register_before_request_hook(TraceparentInjectionHook()) hooks.register_after_success_hook(DeprecationWarningHook()) hooks.register_after_success_hook(tracing_hook) hooks.register_before_request_hook(tracing_hook) hooks.register_after_error_hook(tracing_hook) + hooks.register_before_request_hook(workflow_encoding_hook) + hooks.register_after_success_hook(workflow_encoding_hook) diff --git a/src/mistralai/client/_hooks/workflow_encoding_hook.py b/src/mistralai/client/_hooks/workflow_encoding_hook.py new file mode 100644 index 00000000..f383842d --- /dev/null +++ b/src/mistralai/client/_hooks/workflow_encoding_hook.py @@ -0,0 +1,280 @@ +import asyncio +import concurrent.futures +import json +import logging +import re +import uuid +import weakref +from typing import Any, Coroutine, Dict, Optional, TypeVar, Union + +import httpx + +from .types import ( + AfterSuccessContext, + AfterSuccessHook, + BeforeRequestContext, + BeforeRequestHook, +) +from mistralai.client.sdkconfiguration import SDKConfiguration +from mistralai.extra.workflows.encoding.config import WorkflowEncodingConfig +from mistralai.extra.workflows.encoding.helpers import generate_two_part_id +from mistralai.extra.workflows.encoding.models import WorkflowContext +from mistralai.extra.workflows.encoding.payload_encoder import PayloadEncoder + +logger = logging.getLogger(__name__) + +# Attribute name for storing config ID on SDKConfiguration +_ENCODING_CONFIG_ID_ATTR = "_workflow_encoding_config_id" + + +class _WorkflowEncodingConfig: + def __init__( + self, payload_encoder: PayloadEncoder, namespace: str + ) -> None: + self.payload_encoder = payload_encoder + self.namespace = namespace + + +# Per-client configs keyed by UUID +_workflow_configs: Dict[str, _WorkflowEncodingConfig] = {} + + +def _cleanup_config(config_id: str) -> None: + """Remove config when client is garbage collected.""" + _workflow_configs.pop(config_id, None) + + +def configure_workflow_encoding( + config: WorkflowEncodingConfig, + namespace: str, + sdk_config: SDKConfiguration, +) -> None: + """Configure workflow payload encoding for a specific client.""" + # Get or create config ID for this client + config_id = getattr(sdk_config, _ENCODING_CONFIG_ID_ATTR, None) + if config_id is None: + config_id = str(uuid.uuid4()) + setattr(sdk_config, _ENCODING_CONFIG_ID_ATTR, config_id) + # Register cleanup when SDKConfiguration is garbage collected + weakref.finalize(sdk_config, _cleanup_config, config_id) + + _workflow_configs[config_id] = _WorkflowEncodingConfig( + payload_encoder=PayloadEncoder(encoding_config=config), + namespace=namespace, + ) + + +def _get_encoding_config(sdk_config: SDKConfiguration) -> Optional[_WorkflowEncodingConfig]: + """Get workflow encoding config for a client.""" + config_id = getattr(sdk_config, _ENCODING_CONFIG_ID_ATTR, None) + if config_id is None: + return None + return _workflow_configs.get(config_id) + + +EXECUTE_WORKFLOW_OPERATION_ID = ( + "execute_workflow_v1_workflows__workflow_identifier__execute_post" +) +EXECUTE_WORKFLOW_REGISTRATION_OPERATION_ID = "execute_workflow_registration_v1_workflows_registrations__workflow_registration_id__execute_post" +SCHEDULE_WORKFLOW_OPERATION_ID = "schedule_workflow_v1_workflows_schedules_post" + +EXECUTE_OPERATIONS = { + EXECUTE_WORKFLOW_OPERATION_ID, + EXECUTE_WORKFLOW_REGISTRATION_OPERATION_ID, +} + +OPERATIONS_ENCODE_INPUT = { + EXECUTE_WORKFLOW_OPERATION_ID, + EXECUTE_WORKFLOW_REGISTRATION_OPERATION_ID, + "signal_workflow_execution_v1_workflows_executions__execution_id__signals_post", + "query_workflow_execution_v1_workflows_executions__execution_id__queries_post", + "update_workflow_execution_v1_workflows_executions__execution_id__updates_post", + SCHEDULE_WORKFLOW_OPERATION_ID, +} + +OPERATIONS_DECODE_RESULT = { + EXECUTE_WORKFLOW_OPERATION_ID, + EXECUTE_WORKFLOW_REGISTRATION_OPERATION_ID, + "get_workflow_execution_v1_workflows_executions__execution_id__get", + "query_workflow_execution_v1_workflows_executions__execution_id__queries_post", + "update_workflow_execution_v1_workflows_executions__execution_id__updates_post", +} + +SCHEDULE_CORRELATION_ID_PLACEHOLDER = "__scheduled_workflow__" + + +_T = TypeVar("_T") + + +def _run_async(coro: Coroutine[Any, Any, _T]) -> _T: + """Run an async coroutine in a sync context.""" + try: + asyncio.get_running_loop() + # Already in async context - run in a separate thread with new loop + with concurrent.futures.ThreadPoolExecutor() as pool: + future: concurrent.futures.Future[_T] = pool.submit(asyncio.run, coro) + return future.result() + except RuntimeError: + # No running loop - safe to use asyncio.run + return asyncio.run(coro) + + +def _extract_execution_id_from_url(url: str) -> Optional[str]: + """Extract execution_id from URL path like /v1/workflows/executions/{execution_id}/...""" + match = re.search(r"/executions/([^/]+)", str(url)) + if match: + return match.group(1) + return None + + +def _extract_workflow_identifier_from_execute_url(url: str) -> Optional[str]: + """Extract workflow identifier from execute URLs. + + Handles: + - /v1/workflows/{workflow_identifier}/execute + - /v1/workflows/registrations/{workflow_registration_id}/execute + """ + match = re.search(r"/(?:workflows|registrations)/([^/]+)/execute", str(url)) + return match.group(1) if match else None + + +def _extract_execution_id_from_body(body: Dict[str, Any]) -> Optional[str]: + """Extract execution_id from request body.""" + return body.get("execution_id") + + + + +class WorkflowEncodingHook(BeforeRequestHook, AfterSuccessHook): + """Hook for encoding/decoding workflow event payloads. + + This hook intercepts workflow requests to encode input payloads (encryption, + blob storage offloading) and decodes result fields in responses. + + Configuration is set via Mistral.configure_workflow_encoding() which initializes + the PayloadEncoder and stores it at module level. + """ + + def before_request( + self, + hook_ctx: BeforeRequestContext, + request: httpx.Request, + ) -> Union[httpx.Request, Exception]: + """Intercept requests to encode workflow input payloads.""" + encoding_config = _get_encoding_config(hook_ctx.config) + if not encoding_config: + return request + + if hook_ctx.operation_id not in OPERATIONS_ENCODE_INPUT: + return request + + content_type = request.headers.get("content-type", "") + if "application/json" not in content_type: + return request + + try: + body = json.loads(request.content) + input_data = body.get("input") + if input_data is None: + return request + + execution_id = _extract_execution_id_from_body( + body + ) or _extract_execution_id_from_url(str(request.url)) + + if not execution_id and hook_ctx.operation_id in EXECUTE_OPERATIONS: + seed = _extract_workflow_identifier_from_execute_url(str(request.url)) + execution_id = generate_two_part_id(seed) + body["execution_id"] = execution_id + + if ( + not execution_id + and hook_ctx.operation_id == SCHEDULE_WORKFLOW_OPERATION_ID + ): + execution_id = SCHEDULE_CORRELATION_ID_PLACEHOLDER + + if not execution_id: + raise ValueError( + f"WorkflowEncoding: Could not extract execution_id for {hook_ctx.operation_id}" + ) + + context = WorkflowContext( + namespace=encoding_config.namespace, + execution_id=execution_id, + ) + + logger.debug( + "WorkflowEncodingHook: Encoding input for %s", hook_ctx.operation_id + ) + + encoded_input = _run_async( + encoding_config.payload_encoder.encode_network_input(input_data, context) + ) + + # Update body based on operation type: + # - Execute operations: use separate `encoded_input` field and set `input` to None + # - Signal/Query/Update: put encoded input directly in `input` field + if hook_ctx.operation_id in EXECUTE_OPERATIONS: + body["encoded_input"] = encoded_input.model_dump(mode="json") + body["input"] = None + else: + body["input"] = encoded_input.model_dump(mode="json") + + new_content = json.dumps(body).encode("utf-8") + new_headers = httpx.Headers(request.headers) + new_headers["content-length"] = str(len(new_content)) + + return httpx.Request( + method=request.method, + url=request.url, + headers=new_headers, + content=new_content, + extensions=request.extensions, + ) + + except Exception as e: + logger.error("WorkflowEncodingHook: Failed to encode input: %s", e) + raise + + def after_success( + self, + hook_ctx: AfterSuccessContext, + response: httpx.Response, + ) -> Union[httpx.Response, Exception]: + """Intercept responses to decode workflow result payloads.""" + encoding_config = _get_encoding_config(hook_ctx.config) + if not encoding_config: + return response + + if hook_ctx.operation_id not in OPERATIONS_DECODE_RESULT: + return response + + content_type = response.headers.get("content-type", "") + if "application/json" not in content_type: + return response + + try: + body = json.loads(response.content) + result = body.get("result") + if result is None or not encoding_config.payload_encoder.check_is_payload_encoded(result): + return response + + logger.debug( + "WorkflowEncodingHook: Decoding result for %s", hook_ctx.operation_id + ) + + decoded_result = _run_async(encoding_config.payload_encoder.decode_network_result(result)) + + body["result"] = decoded_result + new_content = json.dumps(body).encode("utf-8") + + return httpx.Response( + status_code=response.status_code, + headers=response.headers, + content=new_content, + request=response.request, + extensions=response.extensions, + ) + except Exception as e: + logger.error("WorkflowEncodingHook: Failed to decode result: %s", e) + raise diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index aa5d0670..0e124f22 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.3.2" +__version__: str = "2.3.6" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.3.2 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.3.6 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 3144b919..f770ae92 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -289,7 +289,6 @@ async def run_stream_async( async def run_generator() -> AsyncGenerator[ Union[RunResultEvents, RunResult], None ]: - nonlocal pending_tool_confirmations nonlocal pending_tool_confirmations current_entries = input_entries while True: diff --git a/src/mistralai/extra/exceptions.py b/src/mistralai/extra/exceptions.py index 86a39917..a6b9ff11 100644 --- a/src/mistralai/extra/exceptions.py +++ b/src/mistralai/extra/exceptions.py @@ -20,6 +20,14 @@ class MistralClientException(Exception): """Base exception for client errors.""" +class WorkflowPayloadOffloadingException(MistralClientException): + """Workflow payload offloading exception""" + + +class WorkflowPayloadEncryptionException(MistralClientException): + """Workflow payload encryption exception""" + + class RunException(MistralClientException): """Conversation run errors.""" diff --git a/src/mistralai/extra/workflows/__init__.py b/src/mistralai/extra/workflows/__init__.py index e69de29b..08b4b4fa 100644 --- a/src/mistralai/extra/workflows/__init__.py +++ b/src/mistralai/extra/workflows/__init__.py @@ -0,0 +1,23 @@ +from .encoding import ( + WorkflowEncodingConfig, + PayloadOffloadingConfig, + PayloadEncryptionConfig, + PayloadEncryptionMode, + BlobStorageConfig, + StorageProvider, + EncryptedStrField, + configure_workflow_encoding, + generate_two_part_id, +) + +__all__ = [ + "WorkflowEncodingConfig", + "PayloadOffloadingConfig", + "PayloadEncryptionConfig", + "PayloadEncryptionMode", + "BlobStorageConfig", + "StorageProvider", + "EncryptedStrField", + "configure_workflow_encoding", + "generate_two_part_id", +] diff --git a/src/mistralai/extra/workflows/encoding/__init__.py b/src/mistralai/extra/workflows/encoding/__init__.py new file mode 100644 index 00000000..c1881636 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/__init__.py @@ -0,0 +1,24 @@ +from .config import ( + WorkflowEncodingConfig, + PayloadOffloadingConfig, + PayloadEncryptionConfig, + PayloadEncryptionMode, + BlobStorageConfig, + StorageProvider, +) +from .models import EncryptedStrField +from .payload_encoder import PayloadEncoder +from .helpers import configure_workflow_encoding, generate_two_part_id + +__all__ = [ + "WorkflowEncodingConfig", + "PayloadOffloadingConfig", + "PayloadEncryptionConfig", + "PayloadEncryptionMode", + "BlobStorageConfig", + "StorageProvider", + "EncryptedStrField", + "PayloadEncoder", + "configure_workflow_encoding", + "generate_two_part_id", +] diff --git a/src/mistralai/extra/workflows/encoding/config.py b/src/mistralai/extra/workflows/encoding/config.py new file mode 100644 index 00000000..ff849fd7 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/config.py @@ -0,0 +1,52 @@ +from enum import Enum +from pydantic import SecretStr, BaseModel +from typing import Optional + + +class StorageProvider(str, Enum): + AZURE = "azure" + GCS = "gcs" + S3 = "s3" + + +class BlobStorageConfig(BaseModel): + storage_provider: StorageProvider = StorageProvider.S3 + prefix: Optional[str] = None + + # Azure settings + container_name: Optional[str] = None + azure_connection_string: Optional[SecretStr] = None + + # GCS settings + bucket_id: Optional[str] = None + + # S3 settings + bucket_name: Optional[str] = None + region_name: Optional[str] = None + endpoint_url: Optional[str] = None + aws_access_key_id: Optional[SecretStr] = None + aws_secret_access_key: Optional[SecretStr] = None + + +class PayloadOffloadingConfig(BaseModel): + storage_config: Optional[BlobStorageConfig] = None + min_size_bytes: int = 1024 * 1024 # 1MB + + +class PayloadEncryptionMode(str, Enum): + FULL = "full" + PARTIAL = "partial" + + +class PayloadEncryptionConfig(BaseModel): + mode: PayloadEncryptionMode + + # If both keys are provided, the main key will be used for encryption and both keys will be used for decryption + # to support key rotation. + main_key: Optional[SecretStr] = None + secondary_key: Optional[SecretStr] = None + + +class WorkflowEncodingConfig(BaseModel): + payload_offloading: PayloadOffloadingConfig | None = None + payload_encryption: PayloadEncryptionConfig | None = None diff --git a/src/mistralai/extra/workflows/encoding/helpers.py b/src/mistralai/extra/workflows/encoding/helpers.py new file mode 100644 index 00000000..73afb214 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/helpers.py @@ -0,0 +1,47 @@ +import uuid +from typing import TYPE_CHECKING + +from .config import WorkflowEncodingConfig + +if TYPE_CHECKING: + from mistralai.client.sdk import Mistral + + +def generate_two_part_id( + primary_seed: str | None = None, secondary_seed: str | None = None +) -> str: + """Generates a unique ID composed of two parts derived from seeds.""" + if not primary_seed: + primary_seed = uuid.uuid4().hex + if not secondary_seed: + secondary_seed = uuid.uuid4().hex + first_part = uuid.uuid5(uuid.NAMESPACE_DNS, primary_seed).hex + second_part = uuid.uuid5(uuid.NAMESPACE_DNS, secondary_seed).hex + return f"{first_part}{second_part}".replace("-", "") + + +async def configure_workflow_encoding( + config: WorkflowEncodingConfig, + *, + client: "Mistral", + namespace: str | None = None, +) -> None: + """Configure workflow payload encoding for the SDK. + + This enables encryption and/or blob storage offloading for workflow payloads. + + Args: + config: The workflow encoding configuration. + client: The Mistral client instance. + namespace: The workflow namespace. If not provided, it will be fetched + from the scheduler using the client. + """ + from mistralai.client._hooks.workflow_encoding_hook import ( + configure_workflow_encoding as _configure_workflow_encoding, + ) + + if not namespace: + from mistralai.extra.workflows.helpers import get_scheduler_namespace + + namespace = await get_scheduler_namespace(client) + _configure_workflow_encoding(config, namespace, client.sdk_configuration) diff --git a/src/mistralai/extra/workflows/encoding/models.py b/src/mistralai/extra/workflows/encoding/models.py new file mode 100644 index 00000000..496be8b1 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/models.py @@ -0,0 +1,90 @@ +from enum import Enum +from typing import Literal, Optional + +import base64 +from pydantic import BaseModel, Field + + +class EncodedPayloadOptions(str, Enum): + OFFLOADED = "offloaded" + ENCRYPTED = "encrypted" + PARTIALLY_ENCRYPTED = "encrypted-partial" + + +class EncryptableFieldTypes(str, Enum): + STRING = "__encrypted_str__" + + +class EncryptedStrField(BaseModel): + """Mark a string field for partial encryption in workflow payloads.""" + + field_type: Literal[EncryptableFieldTypes.STRING] = EncryptableFieldTypes.STRING + data: str + + +class WorkflowContext(BaseModel): + namespace: str + execution_id: str + parent_workflow_exec_id: Optional[str] = None + root_workflow_exec_id: Optional[str] = None + execution_token: Optional[str] = None + + +class EncodedPayload(BaseModel): + context: WorkflowContext + encoding_options: list[EncodedPayloadOptions] = Field( + description="The encoding of the payload", default=[] + ) + payload: bytes = Field(description="The encoded payload") + + +class NetworkEncodedBase(BaseModel): + b64payload: str = Field(description="The encoded payload") + encoding_options: list[EncodedPayloadOptions] = Field( + description="The encoding of the payload", default=[] + ) + + def get_payload(self) -> bytes: + return base64.b64decode(self.b64payload) + + +class NetworkEncodedInput(NetworkEncodedBase): + empty: bool = Field(description="Whether the payload is empty", default=False) + + def to_encoded_payload( + self, namespace: str, execution_id: str, execution_token: str | None = None + ) -> EncodedPayload: + return EncodedPayload( + payload=base64.b64decode(self.b64payload), + encoding_options=self.encoding_options, + context=WorkflowContext( + namespace=namespace, + execution_id=execution_id, + execution_token=execution_token, + ), + ) + + @staticmethod + def from_encoded_payload(encoded_payload: EncodedPayload) -> "NetworkEncodedInput": + return NetworkEncodedInput( + b64payload=base64.b64encode(encoded_payload.payload).decode("utf-8"), + encoding_options=encoded_payload.encoding_options, + ) + + @staticmethod + def from_data( + data: bytes, encoding_options: list[EncodedPayloadOptions] + ) -> "NetworkEncodedInput": + return NetworkEncodedInput( + b64payload=base64.b64encode(data).decode("utf-8"), + encoding_options=encoding_options, + ) + + +class NetworkEncodedResult(NetworkEncodedBase): + @staticmethod + def from_encoded_payload(encoded_payload: EncodedPayload) -> "NetworkEncodedResult": + return NetworkEncodedResult( + b64payload=base64.b64encode(encoded_payload.payload).decode("utf-8"), + encoding_options=encoded_payload.encoding_options, + ) diff --git a/src/mistralai/extra/workflows/encoding/payload_encoder.py b/src/mistralai/extra/workflows/encoding/payload_encoder.py new file mode 100644 index 00000000..802ae41b --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/payload_encoder.py @@ -0,0 +1,335 @@ +from __future__ import annotations + +import base64 +import functools +import hashlib +import json +import logging +import os +import urllib.parse +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union + +from pydantic import BaseModel + +if TYPE_CHECKING: + from cryptography.exceptions import InvalidTag + from cryptography.hazmat.primitives.ciphers.aead import AESGCM + +try: + from cryptography.exceptions import InvalidTag + from cryptography.hazmat.primitives.ciphers.aead import AESGCM + + _HAS_CRYPTO = True +except ImportError: + _HAS_CRYPTO = False +from pydantic_core import from_json, to_json + +from mistralai.extra.workflows.encoding.config import ( + PayloadEncryptionConfig, + PayloadEncryptionMode, + PayloadOffloadingConfig, + WorkflowEncodingConfig, +) +from .storage.blob_storage import get_blob_storage, BlobNotFoundError +from mistralai.extra.workflows.encoding.models import ( + EncodedPayloadOptions, + EncryptableFieldTypes, + NetworkEncodedInput, + NetworkEncodedResult, + WorkflowContext, +) +from mistralai.extra.exceptions import ( + WorkflowPayloadEncryptionException, + WorkflowPayloadOffloadingException, +) + +logger = logging.getLogger(__name__) + + +class OffloadedPayloadData(BaseModel): + key: str + + +class PayloadEncoder: + """This class is in charge of payload encoding/decoding operations such as: + - Blob storage offloading + - Encryption + """ + + BLOB_STORAGE_KEY_PREFIX = "temporal-payload" + _NONCE_SIZE = 12 + + offloading_config: Optional[PayloadOffloadingConfig] + encryption_config: Optional[PayloadEncryptionConfig] + + encryptor_main: Optional[AESGCM] = None + encryptor_secondary: Optional[AESGCM] = None + + def __init__( + self, + encoding_config: WorkflowEncodingConfig, + ) -> None: + self.offloading_config = encoding_config.payload_offloading + if ( + self.offloading_config is not None + and not self.offloading_config.storage_config + ): + raise WorkflowPayloadOffloadingException( + "Blob storage config is not set for workflow payload encoding" + ) + + self.encryption_config = encoding_config.payload_encryption + if self.encryption_config is not None: + if not _HAS_CRYPTO: + raise ImportError( + "Encryption support requires cryptography. " + "Install it with: pip install 'mistralai[workflow_payload_encryption]'" + ) + main_key = ( + self.encryption_config.main_key.get_secret_value() + if self.encryption_config.main_key + else None + ) + if not main_key: + raise WorkflowPayloadEncryptionException( + "You must configure payload encryption key" + ) + self.encryptor_main = AESGCM(bytes.fromhex(main_key)) + secondary_key_secret = self.encryption_config.secondary_key + secondary_key = ( + secondary_key_secret.get_secret_value() + if secondary_key_secret + else None + ) + if secondary_key: + self.encryptor_secondary = AESGCM(bytes.fromhex(secondary_key)) + + @staticmethod + def blob_storage_key_prefix(context: WorkflowContext) -> str: + quote = functools.partial(urllib.parse.quote, safe="") + return "/".join( + [ + PayloadEncoder.BLOB_STORAGE_KEY_PREFIX, + quote(context.namespace), + quote(context.execution_id), + ] + ) + + def _encrypt(self, data: bytes) -> bytes: + if self.encryptor_main is None: + raise WorkflowPayloadEncryptionException( + "You must configure payload encryption" + ) + nonce = os.urandom(self._NONCE_SIZE) + return nonce + self.encryptor_main.encrypt(nonce, data, None) + + def _decrypt(self, data: bytes) -> bytes: + if self.encryptor_main is None: + raise WorkflowPayloadEncryptionException( + "You must configure payload encryption" + ) + try: + return self.encryptor_main.decrypt( + data[: self._NONCE_SIZE], data[self._NONCE_SIZE :], None + ) + except InvalidTag as main_exc: + if self.encryptor_secondary: + logger.warning( + "Failed to decrypt payload with main key, trying secondary key" + ) + try: + return self.encryptor_secondary.decrypt( + data[: self._NONCE_SIZE], data[self._NONCE_SIZE :], None + ) + except InvalidTag: + pass + logger.error("Could not decrypt payload", exc_info=main_exc) + raise WorkflowPayloadEncryptionException( + "Failed to decrypt payload" + ) from main_exc + + async def _handle_offloading( + self, data: bytes, context: Optional[WorkflowContext] + ) -> tuple[bytes, bool]: + if self.offloading_config is None or self.offloading_config.storage_config is None: + raise WorkflowPayloadOffloadingException( + "You must configure payload offloading storage" + ) + + if len(data) < self.offloading_config.min_size_bytes: + return data, False + + if not context: + logger.error( + "Payload offloading required but no context was provided. Cannot proceed with offloading..." + ) + return data, False + + # Hash the content to have a uniq idempotent key for this payload + blob_key = f"sha256:{hashlib.sha256(data).hexdigest()}" + payload_key = f"{self.blob_storage_key_prefix(context)}/{blob_key}" + async with get_blob_storage( + self.offloading_config.storage_config + ) as blob_storage: + blob = None + try: + blob = await blob_storage.get_blob_properties(payload_key) + except BlobNotFoundError: + pass + + if not blob: + logger.debug("Offloading payload") + await blob_storage.upload_blob(key=payload_key, content=data) + else: + logger.debug("Offloaded payload exists already") + + data = OffloadedPayloadData(key=payload_key).model_dump_json().encode() + return data, True + + @staticmethod + def _extract_encrypted_fields(data: Any = None) -> list[dict[str, Any]]: + encrypted_fields = [] + if isinstance(data, dict): + if data.get("field_type") == EncryptableFieldTypes.STRING: + return [data] + for _, field_data in data.items(): + if isinstance(field_data, (dict, list)): + encrypted_fields.extend( + PayloadEncoder._extract_encrypted_fields(field_data) + ) + elif isinstance(data, list): + for item in data: + encrypted_fields.extend(PayloadEncoder._extract_encrypted_fields(item)) + return encrypted_fields + + async def _partially_encrypt_fields(self, data: bytes) -> tuple[bytes, bool]: + try: + obj = json.loads(data) + except json.decoder.JSONDecodeError: + return data, False + + encrypted_fields = self._extract_encrypted_fields(obj) + for encrypted_field in encrypted_fields: + encrypted_data = self._encrypt(encrypted_field["data"].encode()) + encrypted_field["data"] = base64.b64encode(encrypted_data).decode() + + return json.dumps(obj).encode(), len(encrypted_fields) > 0 + + async def _partially_decrypt_fields(self, data: bytes) -> tuple[bytes, bool]: + try: + obj = json.loads(data) + except json.decoder.JSONDecodeError: + return data, False + + encrypted_fields = self._extract_encrypted_fields(obj) + for encrypted_field in encrypted_fields: + encrypted_data = base64.b64decode(encrypted_field["data"]) + encrypted_field["data"] = self._decrypt(encrypted_data).decode() + + return json.dumps(obj).encode(), len(encrypted_fields) > 0 + + async def encode_payload_content( + self, data: Union[bytes, str], context: Optional[WorkflowContext] + ) -> tuple[bytes, list[EncodedPayloadOptions]]: + """Handle payload encoding: + - Payload offloading (if context provided) + - Encryption + """ + if isinstance(data, str): + data = data.encode() + + encoding_options = [] + + if self.offloading_config is not None: + data, offloaded = await self._handle_offloading(data, context) + if offloaded: + encoding_options.append(EncodedPayloadOptions.OFFLOADED) + + if ( + self.encryption_config is not None + and self.encryption_config.mode == PayloadEncryptionMode.FULL + ): + data = self._encrypt(data) + encoding_options.append(EncodedPayloadOptions.ENCRYPTED) + elif ( + self.encryption_config is not None + and self.encryption_config.mode == PayloadEncryptionMode.PARTIAL + and EncodedPayloadOptions.OFFLOADED not in encoding_options + ): + # Do not partially encrypt offloaded payload (fields not in the payload anymore) + data, partially_encrypted = await self._partially_encrypt_fields(data) + if partially_encrypted: + encoding_options.append(EncodedPayloadOptions.PARTIALLY_ENCRYPTED) + + return data, encoding_options + + async def decode_payload_content( + self, data: bytes, encoding_options: List[EncodedPayloadOptions] + ) -> bytes: + # Decode in the reverse order of encoding + for option in reversed(encoding_options): + if option == EncodedPayloadOptions.ENCRYPTED: + data = self._decrypt(data) + elif option == EncodedPayloadOptions.PARTIALLY_ENCRYPTED: + data, _ = await self._partially_decrypt_fields(data) + elif option == EncodedPayloadOptions.OFFLOADED: + if ( + self.offloading_config is None + or not self.offloading_config.storage_config + ): + raise WorkflowPayloadOffloadingException( + "Payload offloading is not enabled but an offloaded payload was received" + ) + async with get_blob_storage( + self.offloading_config.storage_config + ) as blob_storage: + offloaded_payload_data = OffloadedPayloadData.model_validate_json( + data + ) + data = await blob_storage.get_blob(offloaded_payload_data.key) + else: + raise WorkflowPayloadOffloadingException( + f"Unknown decoding option: {option}" + ) + + return data + + async def encode_network_input( + self, data: Optional[Dict[str, Any]], context: WorkflowContext + ) -> NetworkEncodedInput: + """This method MUST be called to format every payload send to Mistral Workflows control plane + to ensure a proper encoding of the payload. + """ + encoded_data, encoding_options = await self.encode_payload_content( + to_json(data), context + ) + network_input = NetworkEncodedInput.from_data(encoded_data, encoding_options) + return network_input + + async def decode_network_result(self, data: Any) -> Any: + """This method MUST be called to format every response payload from the Mistral Workflows control plane + otherwise the payload will not be decoded, hence not usable. + """ + try: + network_encoded_payload = NetworkEncodedResult.model_validate(data) + except ValueError: + logger.warning("Network result is not a NetworkEncodedResult") + return data + + byte_results = await self.decode_payload_content( + network_encoded_payload.get_payload(), + network_encoded_payload.encoding_options, + ) + try: + return from_json(byte_results) + except ValueError: + logger.warning("Payload is not a valid json.") + return byte_results # Return as-is if JSON conversion fails + + def check_is_payload_encoded(self, data: Any) -> bool: + """Check if the payload is encoded (offloaded or encrypted)""" + try: + NetworkEncodedResult.model_validate(data) + return True + except ValueError: + return False diff --git a/src/mistralai/extra/workflows/encoding/storage/blob_storage.py b/src/mistralai/extra/workflows/encoding/storage/blob_storage.py new file mode 100644 index 00000000..ce488421 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/storage/blob_storage.py @@ -0,0 +1,148 @@ +from __future__ import annotations + +from abc import ABC, abstractmethod +from contextlib import asynccontextmanager +from typing import Any, AsyncGenerator + +from mistralai.extra.workflows.encoding.config import BlobStorageConfig, StorageProvider +from mistralai.extra.exceptions import WorkflowPayloadOffloadingException + + +class BlobNotFoundError(Exception): + """Raised when a blob is not found in storage.""" + + pass + + +class BlobStorage(ABC): + """Abstract base class for blob storage implementations.""" + + @abstractmethod + async def upload_blob(self, key: str, content: bytes) -> str: + """Upload a blob to storage and return its URL.""" + pass + + @abstractmethod + async def get_blob(self, key: str) -> bytes: + """Download a blob from storage.""" + pass + + @abstractmethod + async def get_blob_properties(self, key: str) -> dict[str, Any] | None: + """Get blob properties. Returns None if blob doesn't exist.""" + pass + + @abstractmethod + async def delete_blob(self, key: str) -> None: + """Delete a blob from storage.""" + pass + + @abstractmethod + async def blob_exists(self, key: str) -> bool: + """Check if a blob exists.""" + pass + + async def __aenter__(self) -> "BlobStorage": + """Async context manager entry.""" + return self + + async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: + """Async context manager exit.""" + pass + + +@asynccontextmanager +async def get_blob_storage( + blob_storage_config: BlobStorageConfig, +) -> AsyncGenerator[BlobStorage, None]: + """ Create a blob storage instance based on the configuration. + """ + storage: BlobStorage + prefix = blob_storage_config.prefix + + if blob_storage_config.storage_provider == StorageProvider.AZURE: + try: + from ._azure import AzureBlobStorage # type: ignore[import-untyped] + except ImportError as e: + raise ImportError( + "Azure Blob Storage support requires azure-storage-blob. " + "Install it with: pip install 'mistralai[workflow_payload_offloading_azure]'" + ) from e + + if not blob_storage_config.container_name: + raise WorkflowPayloadOffloadingException( + "container_name is required for Azure blob storage" + ) + azure_conn_str = ( + blob_storage_config.azure_connection_string.get_secret_value() + if blob_storage_config.azure_connection_string + else None + ) + if not azure_conn_str: + raise WorkflowPayloadOffloadingException( + "azure_connection_string is required for Azure blob storage" + ) + storage = AzureBlobStorage( + container_name=blob_storage_config.container_name, + azure_connection_string=azure_conn_str, + prefix=prefix, + ) + + elif blob_storage_config.storage_provider == StorageProvider.GCS: + try: + from ._gcs import GCSBlobStorage # type: ignore[import-untyped] + except ImportError as e: + raise ImportError( + "Google Cloud Storage support requires gcloud-aio-storage. " + "Install it with: pip install 'mistralai[workflow_payload_offloading_gcs]'" + ) from e + + if not blob_storage_config.bucket_id: + raise WorkflowPayloadOffloadingException( + "bucket_id is required for GCS blob storage" + ) + storage = GCSBlobStorage( + bucket_id=blob_storage_config.bucket_id, + prefix=prefix, + ) + + elif blob_storage_config.storage_provider == StorageProvider.S3: + try: + from ._s3 import S3BlobStorage # type: ignore[import-untyped] + except ImportError as e: + raise ImportError( + "AWS S3 support requires aioboto3. " + "Install it with: pip install 'mistralai[workflow_payload_offloading_s3]'" + ) from e + + if not blob_storage_config.bucket_name: + raise WorkflowPayloadOffloadingException( + "bucket_name is required for S3 blob storage" + ) + storage = S3BlobStorage( + bucket_name=blob_storage_config.bucket_name, + prefix=prefix, + region_name=blob_storage_config.region_name, + endpoint_url=blob_storage_config.endpoint_url, + aws_access_key_id=( + blob_storage_config.aws_access_key_id.get_secret_value() + if blob_storage_config.aws_access_key_id + else None + ), + aws_secret_access_key=( + blob_storage_config.aws_secret_access_key.get_secret_value() + if blob_storage_config.aws_secret_access_key + else None + ), + ) + + else: + raise ValueError( + f"Unsupported storage provider: {blob_storage_config.storage_provider}" + ) + + async with storage as blob_storage_instance: + yield blob_storage_instance + + +__all__ = ["BlobStorage", "BlobNotFoundError", "get_blob_storage"] diff --git a/src/mistralai/extra/workflows/helpers.py b/src/mistralai/extra/workflows/helpers.py index c2f9caff..508c4b97 100644 --- a/src/mistralai/extra/workflows/helpers.py +++ b/src/mistralai/extra/workflows/helpers.py @@ -1,14 +1,16 @@ -from typing import Mapping, Optional +from typing import TYPE_CHECKING, Mapping, Optional from pydantic import BaseModel from mistralai.client import errors, models, utils from mistralai.client._hooks.types import HookContext -from mistralai.client.sdk import Mistral from mistralai.client.types.basemodel import UNSET, OptionalNullable from mistralai.client.utils.security import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +if TYPE_CHECKING: + from mistralai.client.sdk import Mistral + class WorkerInfo(BaseModel): scheduler_url: str @@ -16,7 +18,7 @@ class WorkerInfo(BaseModel): async def get_scheduler_namespace( - client: Mistral, + client: "Mistral", *, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, diff --git a/uv.lock b/uv.lock index 2b942101..ab6bd55d 100644 --- a/uv.lock +++ b/uv.lock @@ -7,6 +7,198 @@ resolution-markers = [ "python_full_version < '3.11'", ] +[[package]] +name = "aioboto3" +version = "12.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiobotocore", extra = ["boto3"] }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ac/36/b3fc229a5655e9d7875ea811c0006dcbd6aae5b196c6c4f12e8d5ee0c5cd/aioboto3-12.4.0.tar.gz", hash = "sha256:0fa03ac7a8c2c187358dd27cdf84da05e91bc1a3bd85519cad13521343a3d767", size = 30129, upload-time = "2024-04-15T21:22:57.353Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/3e/0640f85fd8c5cc8ded7cfd00ec0cd88cf3f861ed20ac31c585654b17e922/aioboto3-12.4.0-py3-none-any.whl", hash = "sha256:a8d5a60852482cc7a472f3544e5ad7d2f5a911054ffa066357140dc6690da94b", size = 32271, upload-time = "2024-04-15T21:22:54.973Z" }, +] + +[[package]] +name = "aiobotocore" +version = "2.12.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "aioitertools" }, + { name = "botocore" }, + { name = "wrapt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0d/3b/9f3d0f385fcb9ec848d9928acbd96382c403b253741f9b8777cda51df40e/aiobotocore-2.12.3.tar.gz", hash = "sha256:e2a2929207bc5d62eb556106c2224c1fd106d5c65be2eb69f15cc8c34c44c236", size = 103754, upload-time = "2024-04-11T16:38:42.397Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/86/bbe79b24d4603c65a67e405661092c2fe0fa9b14e78dc8270bc83777412e/aiobotocore-2.12.3-py3-none-any.whl", hash = "sha256:86737685f4625e8f05c4e7a608a07cc97607263279f66cf6b02b640c4eafd324", size = 76527, upload-time = "2024-04-11T16:38:39.675Z" }, +] + +[package.optional-dependencies] +boto3 = [ + { name = "boto3" }, +] + +[[package]] +name = "aiofiles" +version = "25.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/41/c3/534eac40372d8ee36ef40df62ec129bee4fdb5ad9706e58a29be53b2c970/aiofiles-25.1.0.tar.gz", hash = "sha256:a8d728f0a29de45dc521f18f07297428d56992a742f0cd2701ba86e44d23d5b2", size = 46354, upload-time = "2025-10-09T20:51:04.358Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/8a/340a1555ae33d7354dbca4faa54948d76d89a27ceef032c8c3bc661d003e/aiofiles-25.1.0-py3-none-any.whl", hash = "sha256:abe311e527c862958650f9438e859c1fa7568a141b22abcd015e120e86a85695", size = 14668, upload-time = "2025-10-09T20:51:03.174Z" }, +] + +[[package]] +name = "aiohappyeyeballs" +version = "2.6.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/26/30/f84a107a9c4331c14b2b586036f40965c128aa4fee4dda5d3d51cb14ad54/aiohappyeyeballs-2.6.1.tar.gz", hash = "sha256:c3f9d0113123803ccadfdf3f0faa505bc78e6a72d1cc4806cbd719826e943558", size = 22760, upload-time = "2025-03-12T01:42:48.764Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/15/5bf3b99495fb160b63f95972b81750f18f7f4e02ad051373b669d17d44f2/aiohappyeyeballs-2.6.1-py3-none-any.whl", hash = "sha256:f349ba8f4b75cb25c99c5c2d84e997e485204d2902a9597802b0371f09331fb8", size = 15265, upload-time = "2025-03-12T01:42:47.083Z" }, +] + +[[package]] +name = "aiohttp" +version = "3.13.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohappyeyeballs" }, + { name = "aiosignal" }, + { name = "async-timeout", marker = "python_full_version < '3.11'" }, + { name = "attrs" }, + { name = "frozenlist" }, + { name = "multidict" }, + { name = "propcache" }, + { name = "yarl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/77/9a/152096d4808df8e4268befa55fba462f440f14beab85e8ad9bf990516918/aiohttp-3.13.5.tar.gz", hash = "sha256:9d98cc980ecc96be6eb4c1994ce35d28d8b1f5e5208a23b421187d1209dbb7d1", size = 7858271, upload-time = "2026-03-31T22:01:03.343Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bd/85/cebc47ee74d8b408749073a1a46c6fcba13d170dc8af7e61996c6c9394ac/aiohttp-3.13.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:02222e7e233295f40e011c1b00e3b0bd451f22cf853a0304c3595633ee47da4b", size = 750547, upload-time = "2026-03-31T21:56:30.024Z" }, + { url = "https://files.pythonhosted.org/packages/05/98/afd308e35b9d3d8c9ec54c0918f1d722c86dc17ddfec272fcdbcce5a3124/aiohttp-3.13.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bace460460ed20614fa6bc8cb09966c0b8517b8c58ad8046828c6078d25333b5", size = 503535, upload-time = "2026-03-31T21:56:31.935Z" }, + { url = "https://files.pythonhosted.org/packages/6f/4d/926c183e06b09d5270a309eb50fbde7b09782bfd305dec1e800f329834fb/aiohttp-3.13.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f546a4dc1e6a5edbb9fd1fd6ad18134550e096a5a43f4ad74acfbd834fc6670", size = 497830, upload-time = "2026-03-31T21:56:33.654Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d6/f47d1c690f115a5c2a5e8938cce4a232a5be9aac5c5fb2647efcbbbda333/aiohttp-3.13.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c86969d012e51b8e415a8c6ce96f7857d6a87d6207303ab02d5d11ef0cad2274", size = 1682474, upload-time = "2026-03-31T21:56:35.513Z" }, + { url = "https://files.pythonhosted.org/packages/01/44/056fd37b1bb52eac760303e5196acc74d9d546631b035704ae5927f7b4ac/aiohttp-3.13.5-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b6f6cd1560c5fa427e3b6074bb24d2c64e225afbb7165008903bd42e4e33e28a", size = 1655259, upload-time = "2026-03-31T21:56:37.843Z" }, + { url = "https://files.pythonhosted.org/packages/91/9f/78eb1a20c1c28ae02f6a3c0f4d7b0dcc66abce5290cadd53d78ce3084175/aiohttp-3.13.5-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:636bc362f0c5bbc7372bc3ae49737f9e3030dbce469f0f422c8f38079780363d", size = 1736204, upload-time = "2026-03-31T21:56:39.822Z" }, + { url = "https://files.pythonhosted.org/packages/de/6c/d20d7de23f0b52b8c1d9e2033b2db1ac4dacbb470bb74c56de0f5f86bb4f/aiohttp-3.13.5-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6a7cbeb06d1070f1d14895eeeed4dac5913b22d7b456f2eb969f11f4b3993796", size = 1826198, upload-time = "2026-03-31T21:56:41.378Z" }, + { url = "https://files.pythonhosted.org/packages/2f/86/a6f3ff1fd795f49545a7c74b2c92f62729135d73e7e4055bf74da5a26c82/aiohttp-3.13.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bca9ef7517fd7874a1a08970ae88f497bf5c984610caa0bf40bd7e8450852b95", size = 1681329, upload-time = "2026-03-31T21:56:43.374Z" }, + { url = "https://files.pythonhosted.org/packages/fb/68/84cd3dab6b7b4f3e6fe9459a961acb142aaab846417f6e8905110d7027e5/aiohttp-3.13.5-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:019a67772e034a0e6b9b17c13d0a8fe56ad9fb150fc724b7f3ffd3724288d9e5", size = 1560023, upload-time = "2026-03-31T21:56:45.031Z" }, + { url = "https://files.pythonhosted.org/packages/41/2c/db61b64b0249e30f954a65ab4cb4970ced57544b1de2e3c98ee5dc24165f/aiohttp-3.13.5-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f34ecee82858e41dd217734f0c41a532bd066bcaab636ad830f03a30b2a96f2a", size = 1652372, upload-time = "2026-03-31T21:56:47.075Z" }, + { url = "https://files.pythonhosted.org/packages/25/6f/e96988a6c982d047810c772e28c43c64c300c943b0ed5c1c0c4ce1e1027c/aiohttp-3.13.5-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:4eac02d9af4813ee289cd63a361576da36dba57f5a1ab36377bc2600db0cbb73", size = 1662031, upload-time = "2026-03-31T21:56:48.835Z" }, + { url = "https://files.pythonhosted.org/packages/b7/26/a56feace81f3d347b4052403a9d03754a0ab23f7940780dada0849a38c92/aiohttp-3.13.5-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:4beac52e9fe46d6abf98b0176a88154b742e878fdf209d2248e99fcdf73cd297", size = 1708118, upload-time = "2026-03-31T21:56:50.833Z" }, + { url = "https://files.pythonhosted.org/packages/78/6e/b6173a8ff03d01d5e1a694bc06764b5dad1df2d4ed8f0ceec12bb3277936/aiohttp-3.13.5-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:c180f480207a9b2475f2b8d8bd7204e47aec952d084b2a2be58a782ffcf96074", size = 1548667, upload-time = "2026-03-31T21:56:52.81Z" }, + { url = "https://files.pythonhosted.org/packages/16/13/13296ffe2c132d888b3fe2c195c8b9c0c24c89c3fa5cc2c44464dc23b22e/aiohttp-3.13.5-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:2837fb92951564d6339cedae4a7231692aa9f73cbc4fb2e04263b96844e03b4e", size = 1724490, upload-time = "2026-03-31T21:56:54.541Z" }, + { url = "https://files.pythonhosted.org/packages/7a/b4/1f1c287f4a79782ef36e5a6e62954c85343bc30470d862d30bd5f26c9fa2/aiohttp-3.13.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:d9010032a0b9710f58012a1e9c222528763d860ba2ee1422c03473eab47703e7", size = 1667109, upload-time = "2026-03-31T21:56:56.21Z" }, + { url = "https://files.pythonhosted.org/packages/ef/42/8461a2aaf60a8f4ea4549a4056be36b904b0eb03d97ca9a8a2604681a500/aiohttp-3.13.5-cp310-cp310-win32.whl", hash = "sha256:7c4b6668b2b2b9027f209ddf647f2a4407784b5d88b8be4efcc72036f365baf9", size = 439478, upload-time = "2026-03-31T21:56:58.292Z" }, + { url = "https://files.pythonhosted.org/packages/e5/71/06956304cb5ee439dfe8d86e1b2e70088bd88ed1ced1f42fb29e5d855f0e/aiohttp-3.13.5-cp310-cp310-win_amd64.whl", hash = "sha256:cd3db5927bf9167d5a6157ddb2f036f6b6b0ad001ac82355d43e97a4bde76d76", size = 462047, upload-time = "2026-03-31T21:57:00.257Z" }, + { url = "https://files.pythonhosted.org/packages/d6/f5/a20c4ac64aeaef1679e25c9983573618ff765d7aa829fa2b84ae7573169e/aiohttp-3.13.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ab7229b6f9b5c1ba4910d6c41a9eb11f543eadb3f384df1b4c293f4e73d44d6", size = 757513, upload-time = "2026-03-31T21:57:02.146Z" }, + { url = "https://files.pythonhosted.org/packages/75/0a/39fa6c6b179b53fcb3e4b3d2b6d6cad0180854eda17060c7218540102bef/aiohttp-3.13.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:8f14c50708bb156b3a3ca7230b3d820199d56a48e3af76fa21c2d6087190fe3d", size = 506748, upload-time = "2026-03-31T21:57:04.275Z" }, + { url = "https://files.pythonhosted.org/packages/87/ec/e38ce072e724fd7add6243613f8d1810da084f54175353d25ccf9f9c7e5a/aiohttp-3.13.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e7d2f8616f0ff60bd332022279011776c3ac0faa0f1b463f7bb12326fbc97a1c", size = 501673, upload-time = "2026-03-31T21:57:06.208Z" }, + { url = "https://files.pythonhosted.org/packages/ba/ba/3bc7525d7e2beaa11b309a70d48b0d3cfc3c2089ec6a7d0820d59c657053/aiohttp-3.13.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a2567b72e1ffc3ab25510db43f355b29eeada56c0a622e58dcdb19530eb0a3cb", size = 1763757, upload-time = "2026-03-31T21:57:07.882Z" }, + { url = "https://files.pythonhosted.org/packages/5e/ab/e87744cf18f1bd78263aba24924d4953b41086bd3a31d22452378e9028a0/aiohttp-3.13.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fb0540c854ac9c0c5ad495908fdfd3e332d553ec731698c0e29b1877ba0d2ec6", size = 1720152, upload-time = "2026-03-31T21:57:09.946Z" }, + { url = "https://files.pythonhosted.org/packages/6b/f3/ed17a6f2d742af17b50bae2d152315ed1b164b07a5fd5cc1754d99e4dfa5/aiohttp-3.13.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c9883051c6972f58bfc4ebb2116345ee2aa151178e99c3f2b2bbe2af712abd13", size = 1818010, upload-time = "2026-03-31T21:57:12.157Z" }, + { url = "https://files.pythonhosted.org/packages/53/06/ecbc63dc937192e2a5cb46df4d3edb21deb8225535818802f210a6ea5816/aiohttp-3.13.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2294172ce08a82fb7c7273485895de1fa1186cc8294cfeb6aef4af42ad261174", size = 1907251, upload-time = "2026-03-31T21:57:14.023Z" }, + { url = "https://files.pythonhosted.org/packages/7e/a5/0521aa32c1ddf3aa1e71dcc466be0b7db2771907a13f18cddaa45967d97b/aiohttp-3.13.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3a807cabd5115fb55af198b98178997a5e0e57dead43eb74a93d9c07d6d4a7dc", size = 1759969, upload-time = "2026-03-31T21:57:16.146Z" }, + { url = "https://files.pythonhosted.org/packages/f6/78/a38f8c9105199dd3b9706745865a8a59d0041b6be0ca0cc4b2ccf1bab374/aiohttp-3.13.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:aa6d0d932e0f39c02b80744273cd5c388a2d9bc07760a03164f229c8e02662f6", size = 1616871, upload-time = "2026-03-31T21:57:17.856Z" }, + { url = "https://files.pythonhosted.org/packages/6f/41/27392a61ead8ab38072105c71aa44ff891e71653fe53d576a7067da2b4e8/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:60869c7ac4aaabe7110f26499f3e6e5696eae98144735b12a9c3d9eae2b51a49", size = 1739844, upload-time = "2026-03-31T21:57:19.679Z" }, + { url = "https://files.pythonhosted.org/packages/6e/55/5564e7ae26d94f3214250009a0b1c65a0c6af4bf88924ccb6fdab901de28/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:26d2f8546f1dfa75efa50c3488215a903c0168d253b75fba4210f57ab77a0fb8", size = 1731969, upload-time = "2026-03-31T21:57:22.006Z" }, + { url = "https://files.pythonhosted.org/packages/6d/c5/705a3929149865fc941bcbdd1047b238e4a72bcb215a9b16b9d7a2e8d992/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1162a1492032c82f14271e831c8f4b49f2b6078f4f5fc74de2c912fa225d51d", size = 1795193, upload-time = "2026-03-31T21:57:24.256Z" }, + { url = "https://files.pythonhosted.org/packages/a6/19/edabed62f718d02cff7231ca0db4ef1c72504235bc467f7b67adb1679f48/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:8b14eb3262fad0dc2f89c1a43b13727e709504972186ff6a99a3ecaa77102b6c", size = 1606477, upload-time = "2026-03-31T21:57:26.364Z" }, + { url = "https://files.pythonhosted.org/packages/de/fc/76f80ef008675637d88d0b21584596dc27410a990b0918cb1e5776545b5b/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ca9ac61ac6db4eb6c2a0cd1d0f7e1357647b638ccc92f7e9d8d133e71ed3c6ac", size = 1813198, upload-time = "2026-03-31T21:57:28.316Z" }, + { url = "https://files.pythonhosted.org/packages/e5/67/5b3ac26b80adb20ea541c487f73730dc8fa107d632c998f25bbbab98fcda/aiohttp-3.13.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:7996023b2ed59489ae4762256c8516df9820f751cf2c5da8ed2fb20ee50abab3", size = 1752321, upload-time = "2026-03-31T21:57:30.549Z" }, + { url = "https://files.pythonhosted.org/packages/88/06/e4a2e49255ea23fa4feeb5ab092d90240d927c15e47b5b5c48dff5a9ce29/aiohttp-3.13.5-cp311-cp311-win32.whl", hash = "sha256:77dfa48c9f8013271011e51c00f8ada19851f013cde2c48fca1ba5e0caf5bb06", size = 439069, upload-time = "2026-03-31T21:57:32.388Z" }, + { url = "https://files.pythonhosted.org/packages/c0/43/8c7163a596dab4f8be12c190cf467a1e07e4734cf90eebb39f7f5d53fc6a/aiohttp-3.13.5-cp311-cp311-win_amd64.whl", hash = "sha256:d3a4834f221061624b8887090637db9ad4f61752001eae37d56c52fddade2dc8", size = 462859, upload-time = "2026-03-31T21:57:34.455Z" }, + { url = "https://files.pythonhosted.org/packages/be/6f/353954c29e7dcce7cf00280a02c75f30e133c00793c7a2ed3776d7b2f426/aiohttp-3.13.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:023ecba036ddd840b0b19bf195bfae970083fd7024ce1ac22e9bba90464620e9", size = 748876, upload-time = "2026-03-31T21:57:36.319Z" }, + { url = "https://files.pythonhosted.org/packages/f5/1b/428a7c64687b3b2e9cd293186695affc0e1e54a445d0361743b231f11066/aiohttp-3.13.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:15c933ad7920b7d9a20de151efcd05a6e38302cbf0e10c9b2acb9a42210a2416", size = 499557, upload-time = "2026-03-31T21:57:38.236Z" }, + { url = "https://files.pythonhosted.org/packages/29/47/7be41556bfbb6917069d6a6634bb7dd5e163ba445b783a90d40f5ac7e3a7/aiohttp-3.13.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ab2899f9fa2f9f741896ebb6fa07c4c883bfa5c7f2ddd8cf2aafa86fa981b2d2", size = 500258, upload-time = "2026-03-31T21:57:39.923Z" }, + { url = "https://files.pythonhosted.org/packages/67/84/c9ecc5828cb0b3695856c07c0a6817a99d51e2473400f705275a2b3d9239/aiohttp-3.13.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a60eaa2d440cd4707696b52e40ed3e2b0f73f65be07fd0ef23b6b539c9c0b0b4", size = 1749199, upload-time = "2026-03-31T21:57:41.938Z" }, + { url = "https://files.pythonhosted.org/packages/f0/d3/3c6d610e66b495657622edb6ae7c7fd31b2e9086b4ec50b47897ad6042a9/aiohttp-3.13.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:55b3bdd3292283295774ab585160c4004f4f2f203946997f49aac032c84649e9", size = 1721013, upload-time = "2026-03-31T21:57:43.904Z" }, + { url = "https://files.pythonhosted.org/packages/49/a0/24409c12217456df0bae7babe3b014e460b0b38a8e60753d6cb339f6556d/aiohttp-3.13.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c2b2355dc094e5f7d45a7bb262fe7207aa0460b37a0d87027dcf21b5d890e7d5", size = 1781501, upload-time = "2026-03-31T21:57:46.285Z" }, + { url = "https://files.pythonhosted.org/packages/98/9d/b65ec649adc5bccc008b0957a9a9c691070aeac4e41cea18559fef49958b/aiohttp-3.13.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b38765950832f7d728297689ad78f5f2cf79ff82487131c4d26fe6ceecdc5f8e", size = 1878981, upload-time = "2026-03-31T21:57:48.734Z" }, + { url = "https://files.pythonhosted.org/packages/57/d8/8d44036d7eb7b6a8ec4c5494ea0c8c8b94fbc0ed3991c1a7adf230df03bf/aiohttp-3.13.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b18f31b80d5a33661e08c89e202edabf1986e9b49c42b4504371daeaa11b47c1", size = 1767934, upload-time = "2026-03-31T21:57:51.171Z" }, + { url = "https://files.pythonhosted.org/packages/31/04/d3f8211f273356f158e3464e9e45484d3fb8c4ce5eb2f6fe9405c3273983/aiohttp-3.13.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:33add2463dde55c4f2d9635c6ab33ce154e5ecf322bd26d09af95c5f81cfa286", size = 1566671, upload-time = "2026-03-31T21:57:53.326Z" }, + { url = "https://files.pythonhosted.org/packages/41/db/073e4ebe00b78e2dfcacff734291651729a62953b48933d765dc513bf798/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:327cc432fdf1356fb4fbc6fe833ad4e9f6aacb71a8acaa5f1855e4b25910e4a9", size = 1705219, upload-time = "2026-03-31T21:57:55.385Z" }, + { url = "https://files.pythonhosted.org/packages/48/45/7dfba71a2f9fd97b15c95c06819de7eb38113d2cdb6319669195a7d64270/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:7c35b0bf0b48a70b4cb4fc5d7bed9b932532728e124874355de1a0af8ec4bc88", size = 1743049, upload-time = "2026-03-31T21:57:57.341Z" }, + { url = "https://files.pythonhosted.org/packages/18/71/901db0061e0f717d226386a7f471bb59b19566f2cae5f0d93874b017271f/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:df23d57718f24badef8656c49743e11a89fd6f5358fa8a7b96e728fda2abf7d3", size = 1749557, upload-time = "2026-03-31T21:57:59.626Z" }, + { url = "https://files.pythonhosted.org/packages/08/d5/41eebd16066e59cd43728fe74bce953d7402f2b4ddfdfef2c0e9f17ca274/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:02e048037a6501a5ec1f6fc9736135aec6eb8a004ce48838cb951c515f32c80b", size = 1558931, upload-time = "2026-03-31T21:58:01.972Z" }, + { url = "https://files.pythonhosted.org/packages/30/e6/4a799798bf05740e66c3a1161079bda7a3dd8e22ca392481d7a7f9af82a6/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:31cebae8b26f8a615d2b546fee45d5ffb76852ae6450e2a03f42c9102260d6fe", size = 1774125, upload-time = "2026-03-31T21:58:04.007Z" }, + { url = "https://files.pythonhosted.org/packages/84/63/7749337c90f92bc2cb18f9560d67aa6258c7060d1397d21529b8004fcf6f/aiohttp-3.13.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:888e78eb5ca55a615d285c3c09a7a91b42e9dd6fc699b166ebd5dee87c9ccf14", size = 1732427, upload-time = "2026-03-31T21:58:06.337Z" }, + { url = "https://files.pythonhosted.org/packages/98/de/cf2f44ff98d307e72fb97d5f5bbae3bfcb442f0ea9790c0bf5c5c2331404/aiohttp-3.13.5-cp312-cp312-win32.whl", hash = "sha256:8bd3ec6376e68a41f9f95f5ed170e2fcf22d4eb27a1f8cb361d0508f6e0557f3", size = 433534, upload-time = "2026-03-31T21:58:08.712Z" }, + { url = "https://files.pythonhosted.org/packages/aa/ca/eadf6f9c8fa5e31d40993e3db153fb5ed0b11008ad5d9de98a95045bed84/aiohttp-3.13.5-cp312-cp312-win_amd64.whl", hash = "sha256:110e448e02c729bcebb18c60b9214a87ba33bac4a9fa5e9a5f139938b56c6cb1", size = 460446, upload-time = "2026-03-31T21:58:10.945Z" }, + { url = "https://files.pythonhosted.org/packages/78/e9/d76bf503005709e390122d34e15256b88f7008e246c4bdbe915cd4f1adce/aiohttp-3.13.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a5029cc80718bbd545123cd8fe5d15025eccaaaace5d0eeec6bd556ad6163d61", size = 742930, upload-time = "2026-03-31T21:58:13.155Z" }, + { url = "https://files.pythonhosted.org/packages/57/00/4b7b70223deaebd9bb85984d01a764b0d7bd6526fcdc73cca83bcbe7243e/aiohttp-3.13.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4bb6bf5811620003614076bdc807ef3b5e38244f9d25ca5fe888eaccea2a9832", size = 496927, upload-time = "2026-03-31T21:58:15.073Z" }, + { url = "https://files.pythonhosted.org/packages/9c/f5/0fb20fb49f8efdcdce6cd8127604ad2c503e754a8f139f5e02b01626523f/aiohttp-3.13.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a84792f8631bf5a94e52d9cc881c0b824ab42717165a5579c760b830d9392ac9", size = 497141, upload-time = "2026-03-31T21:58:17.009Z" }, + { url = "https://files.pythonhosted.org/packages/3b/86/b7c870053e36a94e8951b803cb5b909bfbc9b90ca941527f5fcafbf6b0fa/aiohttp-3.13.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:57653eac22c6a4c13eb22ecf4d673d64a12f266e72785ab1c8b8e5940d0e8090", size = 1732476, upload-time = "2026-03-31T21:58:18.925Z" }, + { url = "https://files.pythonhosted.org/packages/b5/e5/4e161f84f98d80c03a238671b4136e6530453d65262867d989bbe78244d0/aiohttp-3.13.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5e5f7debc7a57af53fdf5c5009f9391d9f4c12867049d509bf7bb164a6e295b", size = 1706507, upload-time = "2026-03-31T21:58:21.094Z" }, + { url = "https://files.pythonhosted.org/packages/d4/56/ea11a9f01518bd5a2a2fcee869d248c4b8a0cfa0bb13401574fa31adf4d4/aiohttp-3.13.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c719f65bebcdf6716f10e9eff80d27567f7892d8988c06de12bbbd39307c6e3a", size = 1773465, upload-time = "2026-03-31T21:58:23.159Z" }, + { url = "https://files.pythonhosted.org/packages/eb/40/333ca27fb74b0383f17c90570c748f7582501507307350a79d9f9f3c6eb1/aiohttp-3.13.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d97f93fdae594d886c5a866636397e2bcab146fd7a132fd6bb9ce182224452f8", size = 1873523, upload-time = "2026-03-31T21:58:25.59Z" }, + { url = "https://files.pythonhosted.org/packages/f0/d2/e2f77eef1acb7111405433c707dc735e63f67a56e176e72e9e7a2cd3f493/aiohttp-3.13.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df334e39d4c2f899a914f1dba283c1aadc311790733f705182998c6f7cae665", size = 1754113, upload-time = "2026-03-31T21:58:27.624Z" }, + { url = "https://files.pythonhosted.org/packages/fb/56/3f653d7f53c89669301ec9e42c95233e2a0c0a6dd051269e6e678db4fdb0/aiohttp-3.13.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:fe6970addfea9e5e081401bcbadf865d2b6da045472f58af08427e108d618540", size = 1562351, upload-time = "2026-03-31T21:58:29.918Z" }, + { url = "https://files.pythonhosted.org/packages/ec/a6/9b3e91eb8ae791cce4ee736da02211c85c6f835f1bdfac0594a8a3b7018c/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7becdf835feff2f4f335d7477f121af787e3504b48b449ff737afb35869ba7bb", size = 1693205, upload-time = "2026-03-31T21:58:32.214Z" }, + { url = "https://files.pythonhosted.org/packages/98/fc/bfb437a99a2fcebd6b6eaec609571954de2ed424f01c352f4b5504371dd3/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:676e5651705ad5d8a70aeb8eb6936c436d8ebbd56e63436cb7dd9bb36d2a9a46", size = 1730618, upload-time = "2026-03-31T21:58:34.728Z" }, + { url = "https://files.pythonhosted.org/packages/e4/b6/c8534862126191a034f68153194c389addc285a0f1347d85096d349bbc15/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:9b16c653d38eb1a611cc898c41e76859ca27f119d25b53c12875fd0474ae31a8", size = 1745185, upload-time = "2026-03-31T21:58:36.909Z" }, + { url = "https://files.pythonhosted.org/packages/0b/93/4ca8ee2ef5236e2707e0fd5fecb10ce214aee1ff4ab307af9c558bda3b37/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:999802d5fa0389f58decd24b537c54aa63c01c3219ce17d1214cbda3c2b22d2d", size = 1557311, upload-time = "2026-03-31T21:58:39.38Z" }, + { url = "https://files.pythonhosted.org/packages/57/ae/76177b15f18c5f5d094f19901d284025db28eccc5ae374d1d254181d33f4/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ec707059ee75732b1ba130ed5f9580fe10ff75180c812bc267ded039db5128c6", size = 1773147, upload-time = "2026-03-31T21:58:41.476Z" }, + { url = "https://files.pythonhosted.org/packages/01/a4/62f05a0a98d88af59d93b7fcac564e5f18f513cb7471696ac286db970d6a/aiohttp-3.13.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:2d6d44a5b48132053c2f6cd5c8cb14bc67e99a63594e336b0f2af81e94d5530c", size = 1730356, upload-time = "2026-03-31T21:58:44.049Z" }, + { url = "https://files.pythonhosted.org/packages/e4/85/fc8601f59dfa8c9523808281f2da571f8b4699685f9809a228adcc90838d/aiohttp-3.13.5-cp313-cp313-win32.whl", hash = "sha256:329f292ed14d38a6c4c435e465f48bebb47479fd676a0411936cc371643225cc", size = 432637, upload-time = "2026-03-31T21:58:46.167Z" }, + { url = "https://files.pythonhosted.org/packages/c0/1b/ac685a8882896acf0f6b31d689e3792199cfe7aba37969fa91da63a7fa27/aiohttp-3.13.5-cp313-cp313-win_amd64.whl", hash = "sha256:69f571de7500e0557801c0b51f4780482c0ec5fe2ac851af5a92cfce1af1cb83", size = 458896, upload-time = "2026-03-31T21:58:48.119Z" }, + { url = "https://files.pythonhosted.org/packages/5d/ce/46572759afc859e867a5bc8ec3487315869013f59281ce61764f76d879de/aiohttp-3.13.5-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:eb4639f32fd4a9904ab8fb45bf3383ba71137f3d9d4ba25b3b3f3109977c5b8c", size = 745721, upload-time = "2026-03-31T21:58:50.229Z" }, + { url = "https://files.pythonhosted.org/packages/13/fe/8a2efd7626dbe6049b2ef8ace18ffda8a4dfcbe1bcff3ac30c0c7575c20b/aiohttp-3.13.5-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:7e5dc4311bd5ac493886c63cbf76ab579dbe4641268e7c74e48e774c74b6f2be", size = 497663, upload-time = "2026-03-31T21:58:52.232Z" }, + { url = "https://files.pythonhosted.org/packages/9b/91/cc8cc78a111826c54743d88651e1687008133c37e5ee615fee9b57990fac/aiohttp-3.13.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:756c3c304d394977519824449600adaf2be0ccee76d206ee339c5e76b70ded25", size = 499094, upload-time = "2026-03-31T21:58:54.566Z" }, + { url = "https://files.pythonhosted.org/packages/0a/33/a8362cb15cf16a3af7e86ed11962d5cd7d59b449202dc576cdc731310bde/aiohttp-3.13.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecc26751323224cf8186efcf7fbcbc30f4e1d8c7970659daf25ad995e4032a56", size = 1726701, upload-time = "2026-03-31T21:58:56.864Z" }, + { url = "https://files.pythonhosted.org/packages/45/0c/c091ac5c3a17114bd76cbf85d674650969ddf93387876cf67f754204bd77/aiohttp-3.13.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:10a75acfcf794edf9d8db50e5a7ec5fc818b2a8d3f591ce93bc7b1210df016d2", size = 1683360, upload-time = "2026-03-31T21:58:59.072Z" }, + { url = "https://files.pythonhosted.org/packages/23/73/bcee1c2b79bc275e964d1446c55c54441a461938e70267c86afaae6fba27/aiohttp-3.13.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0f7a18f258d124cd678c5fe072fe4432a4d5232b0657fca7c1847f599233c83a", size = 1773023, upload-time = "2026-03-31T21:59:01.776Z" }, + { url = "https://files.pythonhosted.org/packages/c7/ef/720e639df03004fee2d869f771799d8c23046dec47d5b81e396c7cda583a/aiohttp-3.13.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:df6104c009713d3a89621096f3e3e88cc323fd269dbd7c20afe18535094320be", size = 1853795, upload-time = "2026-03-31T21:59:04.568Z" }, + { url = "https://files.pythonhosted.org/packages/bd/c9/989f4034fb46841208de7aeeac2c6d8300745ab4f28c42f629ba77c2d916/aiohttp-3.13.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:241a94f7de7c0c3b616627aaad530fe2cb620084a8b144d3be7b6ecfe95bae3b", size = 1730405, upload-time = "2026-03-31T21:59:07.221Z" }, + { url = "https://files.pythonhosted.org/packages/ce/75/ee1fd286ca7dc599d824b5651dad7b3be7ff8d9a7e7b3fe9820d9180f7db/aiohttp-3.13.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c974fb66180e58709b6fc402846f13791240d180b74de81d23913abe48e96d94", size = 1558082, upload-time = "2026-03-31T21:59:09.484Z" }, + { url = "https://files.pythonhosted.org/packages/c3/20/1e9e6650dfc436340116b7aa89ff8cb2bbdf0abc11dfaceaad8f74273a10/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:6e27ea05d184afac78aabbac667450c75e54e35f62238d44463131bd3f96753d", size = 1692346, upload-time = "2026-03-31T21:59:12.068Z" }, + { url = "https://files.pythonhosted.org/packages/d8/40/8ebc6658d48ea630ac7903912fe0dd4e262f0e16825aa4c833c56c9f1f56/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:a79a6d399cef33a11b6f004c67bb07741d91f2be01b8d712d52c75711b1e07c7", size = 1698891, upload-time = "2026-03-31T21:59:14.552Z" }, + { url = "https://files.pythonhosted.org/packages/d8/78/ea0ae5ec8ba7a5c10bdd6e318f1ba5e76fcde17db8275188772afc7917a4/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:c632ce9c0b534fbe25b52c974515ed674937c5b99f549a92127c85f771a78772", size = 1742113, upload-time = "2026-03-31T21:59:17.068Z" }, + { url = "https://files.pythonhosted.org/packages/8a/66/9d308ed71e3f2491be1acb8769d96c6f0c47d92099f3bc9119cada27b357/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:fceedde51fbd67ee2bcc8c0b33d0126cc8b51ef3bbde2f86662bd6d5a6f10ec5", size = 1553088, upload-time = "2026-03-31T21:59:19.541Z" }, + { url = "https://files.pythonhosted.org/packages/da/a6/6cc25ed8dfc6e00c90f5c6d126a98e2cf28957ad06fa1036bd34b6f24a2c/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f92995dfec9420bb69ae629abf422e516923ba79ba4403bc750d94fb4a6c68c1", size = 1757976, upload-time = "2026-03-31T21:59:22.311Z" }, + { url = "https://files.pythonhosted.org/packages/c1/2b/cce5b0ffe0de99c83e5e36d8f828e4161e415660a9f3e58339d07cce3006/aiohttp-3.13.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:20ae0ff08b1f2c8788d6fb85afcb798654ae6ba0b747575f8562de738078457b", size = 1712444, upload-time = "2026-03-31T21:59:24.635Z" }, + { url = "https://files.pythonhosted.org/packages/6c/cf/9e1795b4160c58d29421eafd1a69c6ce351e2f7c8d3c6b7e4ca44aea1a5b/aiohttp-3.13.5-cp314-cp314-win32.whl", hash = "sha256:b20df693de16f42b2472a9c485e1c948ee55524786a0a34345511afdd22246f3", size = 438128, upload-time = "2026-03-31T21:59:27.291Z" }, + { url = "https://files.pythonhosted.org/packages/22/4d/eaedff67fc805aeba4ba746aec891b4b24cebb1a7d078084b6300f79d063/aiohttp-3.13.5-cp314-cp314-win_amd64.whl", hash = "sha256:f85c6f327bf0b8c29da7d93b1cabb6363fb5e4e160a32fa241ed2dce21b73162", size = 464029, upload-time = "2026-03-31T21:59:29.429Z" }, + { url = "https://files.pythonhosted.org/packages/79/11/c27d9332ee20d68dd164dc12a6ecdef2e2e35ecc97ed6cf0d2442844624b/aiohttp-3.13.5-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:1efb06900858bb618ff5cee184ae2de5828896c448403d51fb633f09e109be0a", size = 778758, upload-time = "2026-03-31T21:59:31.547Z" }, + { url = "https://files.pythonhosted.org/packages/04/fb/377aead2e0a3ba5f09b7624f702a964bdf4f08b5b6728a9799830c80041e/aiohttp-3.13.5-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:fee86b7c4bd29bdaf0d53d14739b08a106fdda809ca5fe032a15f52fae5fe254", size = 512883, upload-time = "2026-03-31T21:59:34.098Z" }, + { url = "https://files.pythonhosted.org/packages/bb/a6/aa109a33671f7a5d3bd78b46da9d852797c5e665bfda7d6b373f56bff2ec/aiohttp-3.13.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:20058e23909b9e65f9da62b396b77dfa95965cbe840f8def6e572538b1d32e36", size = 516668, upload-time = "2026-03-31T21:59:36.497Z" }, + { url = "https://files.pythonhosted.org/packages/79/b3/ca078f9f2fa9563c36fb8ef89053ea2bb146d6f792c5104574d49d8acb63/aiohttp-3.13.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cf20a8d6868cb15a73cab329ffc07291ba8c22b1b88176026106ae39aa6df0f", size = 1883461, upload-time = "2026-03-31T21:59:38.723Z" }, + { url = "https://files.pythonhosted.org/packages/b7/e3/a7ad633ca1ca497b852233a3cce6906a56c3225fb6d9217b5e5e60b7419d/aiohttp-3.13.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:330f5da04c987f1d5bdb8ae189137c77139f36bd1cb23779ca1a354a4b027800", size = 1747661, upload-time = "2026-03-31T21:59:41.187Z" }, + { url = "https://files.pythonhosted.org/packages/33/b9/cd6fe579bed34a906d3d783fe60f2fa297ef55b27bb4538438ee49d4dc41/aiohttp-3.13.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6f1cbf0c7926d315c3c26c2da41fd2b5d2fe01ac0e157b78caefc51a782196cf", size = 1863800, upload-time = "2026-03-31T21:59:43.84Z" }, + { url = "https://files.pythonhosted.org/packages/c0/3f/2c1e2f5144cefa889c8afd5cf431994c32f3b29da9961698ff4e3811b79a/aiohttp-3.13.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:53fc049ed6390d05423ba33103ded7281fe897cf97878f369a527070bd95795b", size = 1958382, upload-time = "2026-03-31T21:59:46.187Z" }, + { url = "https://files.pythonhosted.org/packages/66/1d/f31ec3f1013723b3babe3609e7f119c2c2fb6ef33da90061a705ef3e1bc8/aiohttp-3.13.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:898703aa2667e3c5ca4c54ca36cd73f58b7a38ef87a5606414799ebce4d3fd3a", size = 1803724, upload-time = "2026-03-31T21:59:48.656Z" }, + { url = "https://files.pythonhosted.org/packages/0e/b4/57712dfc6f1542f067daa81eb61da282fab3e6f1966fca25db06c4fc62d5/aiohttp-3.13.5-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0494a01ca9584eea1e5fbd6d748e61ecff218c51b576ee1999c23db7066417d8", size = 1640027, upload-time = "2026-03-31T21:59:51.284Z" }, + { url = "https://files.pythonhosted.org/packages/25/3c/734c878fb43ec083d8e31bf029daae1beafeae582d1b35da234739e82ee7/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:6cf81fe010b8c17b09495cbd15c1d35afbc8fb405c0c9cf4738e5ae3af1d65be", size = 1806644, upload-time = "2026-03-31T21:59:53.753Z" }, + { url = "https://files.pythonhosted.org/packages/20/a5/f671e5cbec1c21d044ff3078223f949748f3a7f86b14e34a365d74a5d21f/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:c564dd5f09ddc9d8f2c2d0a301cd30a79a2cc1b46dd1a73bef8f0038863d016b", size = 1791630, upload-time = "2026-03-31T21:59:56.239Z" }, + { url = "https://files.pythonhosted.org/packages/0b/63/fb8d0ad63a0b8a99be97deac8c04dacf0785721c158bdf23d679a87aa99e/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:2994be9f6e51046c4f864598fd9abeb4fba6e88f0b2152422c9666dcd4aea9c6", size = 1809403, upload-time = "2026-03-31T21:59:59.103Z" }, + { url = "https://files.pythonhosted.org/packages/59/0c/bfed7f30662fcf12206481c2aac57dedee43fe1c49275e85b3a1e1742294/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:157826e2fa245d2ef46c83ea8a5faf77ca19355d278d425c29fda0beb3318037", size = 1634924, upload-time = "2026-03-31T22:00:02.116Z" }, + { url = "https://files.pythonhosted.org/packages/17/d6/fd518d668a09fd5a3319ae5e984d4d80b9a4b3df4e21c52f02251ef5a32e/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:a8aca50daa9493e9e13c0f566201a9006f080e7c50e5e90d0b06f53146a54500", size = 1836119, upload-time = "2026-03-31T22:00:04.756Z" }, + { url = "https://files.pythonhosted.org/packages/78/b7/15fb7a9d52e112a25b621c67b69c167805cb1f2ab8f1708a5c490d1b52fe/aiohttp-3.13.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3b13560160d07e047a93f23aaa30718606493036253d5430887514715b67c9d9", size = 1772072, upload-time = "2026-03-31T22:00:07.494Z" }, + { url = "https://files.pythonhosted.org/packages/7e/df/57ba7f0c4a553fc2bd8b6321df236870ec6fd64a2a473a8a13d4f733214e/aiohttp-3.13.5-cp314-cp314t-win32.whl", hash = "sha256:9a0f4474b6ea6818b41f82172d799e4b3d29e22c2c520ce4357856fced9af2f8", size = 471819, upload-time = "2026-03-31T22:00:10.277Z" }, + { url = "https://files.pythonhosted.org/packages/62/29/2f8418269e46454a26171bfdd6a055d74febf32234e474930f2f60a17145/aiohttp-3.13.5-cp314-cp314t-win_amd64.whl", hash = "sha256:18a2f6c1182c51baa1d28d68fea51513cb2a76612f038853c0ad3c145423d3d9", size = 505441, upload-time = "2026-03-31T22:00:12.791Z" }, +] + +[[package]] +name = "aioitertools" +version = "0.13.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fd/3c/53c4a17a05fb9ea2313ee1777ff53f5e001aefd5cc85aa2f4c2d982e1e38/aioitertools-0.13.0.tar.gz", hash = "sha256:620bd241acc0bbb9ec819f1ab215866871b4bbd1f73836a55f799200ee86950c", size = 19322, upload-time = "2025-11-06T22:17:07.609Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/a1/510b0a7fadc6f43a6ce50152e69dbd86415240835868bb0bd9b5b88b1e06/aioitertools-0.13.0-py3-none-any.whl", hash = "sha256:0be0292b856f08dfac90e31f4739432f4cb6d7520ab9eb73e143f4f2fa5259be", size = 24182, upload-time = "2025-11-06T22:17:06.502Z" }, +] + +[[package]] +name = "aiosignal" +version = "1.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "frozenlist" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7", size = 25007, upload-time = "2025-07-03T22:54:43.528Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fb/76/641ae371508676492379f16e2fa48f4e2c11741bd63c48be4b12a6b09cba/aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e", size = 7490, upload-time = "2025-07-03T22:54:42.156Z" }, +] + [[package]] name = "annotated-types" version = "0.7.0" @@ -42,6 +234,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/80/96/b32bbbb46170a1c8b8b1f28c794202e25cfe743565e9d3469b8eb1e0cc05/astroid-3.2.4-py3-none-any.whl", hash = "sha256:413658a61eeca6202a59231abb473f932038fbcbf1666587f66d482083413a25", size = 276348, upload-time = "2024-07-20T12:57:40.886Z" }, ] +[[package]] +name = "async-timeout" +version = "5.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a5/ae/136395dfbfe00dfc94da3f3e136d0b13f394cba8f4841120e34226265780/async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3", size = 9274, upload-time = "2024-11-06T16:41:39.6Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/ba/e2081de779ca30d473f21f5b30e0e737c438205440784c7dfc81efc2b029/async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c", size = 6233, upload-time = "2024-11-06T16:41:37.9Z" }, +] + [[package]] name = "attrs" version = "25.4.0" @@ -63,6 +264,81 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/51/321e821856452f7386c4e9df866f196720b1ad0c5ea1623ea7399969ae3b/authlib-1.6.6-py2.py3-none-any.whl", hash = "sha256:7d9e9bc535c13974313a87f53e8430eb6ea3d1cf6ae4f6efcd793f2e949143fd", size = 244005, upload-time = "2025-12-12T08:01:40.209Z" }, ] +[[package]] +name = "azure-core" +version = "1.39.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "requests" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/34/83/bbde3faa84ddcb8eb0eca4b3ffb3221252281db4ce351300fe248c5c70b1/azure_core-1.39.0.tar.gz", hash = "sha256:8a90a562998dd44ce84597590fff6249701b98c0e8797c95fcdd695b54c35d74", size = 367531, upload-time = "2026-03-19T01:31:29.461Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/d6/8ebcd05b01a580f086ac9a97fb9fac65c09a4b012161cc97c21a336e880b/azure_core-1.39.0-py3-none-any.whl", hash = "sha256:4ac7b70fab5438c3f68770649a78daf97833caa83827f91df9c14e0e0ea7d34f", size = 218318, upload-time = "2026-03-19T01:31:31.25Z" }, +] + +[package.optional-dependencies] +aio = [ + { name = "aiohttp" }, +] + +[[package]] +name = "azure-storage-blob" +version = "12.28.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "azure-core" }, + { name = "cryptography" }, + { name = "isodate" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/71/24/072ba8e27b0e2d8fec401e9969b429d4f5fc4c8d4f0f05f4661e11f7234a/azure_storage_blob-12.28.0.tar.gz", hash = "sha256:e7d98ea108258d29aa0efbfd591b2e2075fa1722a2fae8699f0b3c9de11eff41", size = 604225, upload-time = "2026-01-06T23:48:57.282Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d8/3a/6ef2047a072e54e1142718d433d50e9514c999a58f51abfff7902f3a72f8/azure_storage_blob-12.28.0-py3-none-any.whl", hash = "sha256:00fb1db28bf6a7b7ecaa48e3b1d5c83bfadacc5a678b77826081304bd87d6461", size = 431499, upload-time = "2026-01-06T23:48:58.995Z" }, +] + +[package.optional-dependencies] +aio = [ + { name = "azure-core", extra = ["aio"] }, +] + +[[package]] +name = "backoff" +version = "2.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/47/d7/5bbeb12c44d7c4f2fb5b56abce497eb5ed9f34d85701de869acedd602619/backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba", size = 17001, upload-time = "2022-10-05T19:19:32.061Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/df/73/b6e24bd22e6720ca8ee9a85a0c4a2971af8497d8f3193fa05390cbd46e09/backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8", size = 15148, upload-time = "2022-10-05T19:19:30.546Z" }, +] + +[[package]] +name = "boto3" +version = "1.34.69" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore" }, + { name = "jmespath" }, + { name = "s3transfer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/76/27/fd0b2f0218413aaf346959384ad756350c114c95715e505984cf8b4d1c95/boto3-1.34.69.tar.gz", hash = "sha256:898a5fed26b1351352703421d1a8b886ef2a74be6c97d5ecc92432ae01fda203", size = 108279, upload-time = "2024-03-22T19:14:54.311Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a1/f3/a6626ed248468ab33b2f68cc98f9cb0f40beab0803af382e6c52c5545a45/boto3-1.34.69-py3-none-any.whl", hash = "sha256:2e25ef6bd325217c2da329829478be063155897d8d3b29f31f7f23ab548519b1", size = 139323, upload-time = "2024-03-22T19:14:08.926Z" }, +] + +[[package]] +name = "botocore" +version = "1.34.69" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jmespath" }, + { name = "python-dateutil" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f7/38/493fd3057469208f350f82423da8dcf0fd2698fa4563169dd209b6952567/botocore-1.34.69.tar.gz", hash = "sha256:d1ab2bff3c2fd51719c2021d9fa2f30fbb9ed0a308f69e9a774ac92c8091380a", size = 12246645, upload-time = "2024-03-22T19:15:00.409Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c6/78/919e50b633035216dfb68627b1a4eac1235148b89b34a28f07fd99e8ac17/botocore-1.34.69-py3-none-any.whl", hash = "sha256:d3802d076d4d507bf506f9845a6970ce43adc3d819dd57c2791f5c19ed6e5950", size = 12026668, upload-time = "2024-03-22T19:14:33.057Z" }, +] + [[package]] name = "cachetools" version = "6.2.4" @@ -163,6 +439,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, ] +[[package]] +name = "chardet" +version = "6.0.0.post1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7f/42/fb9436c103a881a377e34b9f58d77b5f503461c702ff654ebe86151bcfe9/chardet-6.0.0.post1.tar.gz", hash = "sha256:6b78048c3c97c7b2ed1fbad7a18f76f5a6547f7d34dbab536cc13887c9a92fa4", size = 12521798, upload-time = "2026-02-22T15:09:17.925Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/66/42/5de54f632c2de53cd3415b3703383d5fff43a94cbc0567ef362515261a21/chardet-6.0.0.post1-py3-none-any.whl", hash = "sha256:c894a36800549adf7bb5f2af47033281b75fdfcd2aa0f0243be0ad22a52e2dcb", size = 627245, upload-time = "2026-02-22T15:09:15.876Z" }, +] + [[package]] name = "charset-normalizer" version = "3.4.4" @@ -368,6 +653,158 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, ] +[[package]] +name = "frozenlist" +version = "1.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad", size = 45875, upload-time = "2025-10-06T05:38:17.865Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/4a/557715d5047da48d54e659203b9335be7bfaafda2c3f627b7c47e0b3aaf3/frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011", size = 86230, upload-time = "2025-10-06T05:35:23.699Z" }, + { url = "https://files.pythonhosted.org/packages/a2/fb/c85f9fed3ea8fe8740e5b46a59cc141c23b842eca617da8876cfce5f760e/frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565", size = 49621, upload-time = "2025-10-06T05:35:25.341Z" }, + { url = "https://files.pythonhosted.org/packages/63/70/26ca3f06aace16f2352796b08704338d74b6d1a24ca38f2771afbb7ed915/frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad", size = 49889, upload-time = "2025-10-06T05:35:26.797Z" }, + { url = "https://files.pythonhosted.org/packages/5d/ed/c7895fd2fde7f3ee70d248175f9b6cdf792fb741ab92dc59cd9ef3bd241b/frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2", size = 219464, upload-time = "2025-10-06T05:35:28.254Z" }, + { url = "https://files.pythonhosted.org/packages/6b/83/4d587dccbfca74cb8b810472392ad62bfa100bf8108c7223eb4c4fa2f7b3/frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186", size = 221649, upload-time = "2025-10-06T05:35:29.454Z" }, + { url = "https://files.pythonhosted.org/packages/6a/c6/fd3b9cd046ec5fff9dab66831083bc2077006a874a2d3d9247dea93ddf7e/frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e", size = 219188, upload-time = "2025-10-06T05:35:30.951Z" }, + { url = "https://files.pythonhosted.org/packages/ce/80/6693f55eb2e085fc8afb28cf611448fb5b90e98e068fa1d1b8d8e66e5c7d/frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450", size = 231748, upload-time = "2025-10-06T05:35:32.101Z" }, + { url = "https://files.pythonhosted.org/packages/97/d6/e9459f7c5183854abd989ba384fe0cc1a0fb795a83c033f0571ec5933ca4/frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef", size = 236351, upload-time = "2025-10-06T05:35:33.834Z" }, + { url = "https://files.pythonhosted.org/packages/97/92/24e97474b65c0262e9ecd076e826bfd1d3074adcc165a256e42e7b8a7249/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4", size = 218767, upload-time = "2025-10-06T05:35:35.205Z" }, + { url = "https://files.pythonhosted.org/packages/ee/bf/dc394a097508f15abff383c5108cb8ad880d1f64a725ed3b90d5c2fbf0bb/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff", size = 235887, upload-time = "2025-10-06T05:35:36.354Z" }, + { url = "https://files.pythonhosted.org/packages/40/90/25b201b9c015dbc999a5baf475a257010471a1fa8c200c843fd4abbee725/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c", size = 228785, upload-time = "2025-10-06T05:35:37.949Z" }, + { url = "https://files.pythonhosted.org/packages/84/f4/b5bc148df03082f05d2dd30c089e269acdbe251ac9a9cf4e727b2dbb8a3d/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f", size = 230312, upload-time = "2025-10-06T05:35:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/db/4b/87e95b5d15097c302430e647136b7d7ab2398a702390cf4c8601975709e7/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7", size = 217650, upload-time = "2025-10-06T05:35:40.377Z" }, + { url = "https://files.pythonhosted.org/packages/e5/70/78a0315d1fea97120591a83e0acd644da638c872f142fd72a6cebee825f3/frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a", size = 39659, upload-time = "2025-10-06T05:35:41.863Z" }, + { url = "https://files.pythonhosted.org/packages/66/aa/3f04523fb189a00e147e60c5b2205126118f216b0aa908035c45336e27e4/frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6", size = 43837, upload-time = "2025-10-06T05:35:43.205Z" }, + { url = "https://files.pythonhosted.org/packages/39/75/1135feecdd7c336938bd55b4dc3b0dfc46d85b9be12ef2628574b28de776/frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e", size = 39989, upload-time = "2025-10-06T05:35:44.596Z" }, + { url = "https://files.pythonhosted.org/packages/bc/03/077f869d540370db12165c0aa51640a873fb661d8b315d1d4d67b284d7ac/frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84", size = 86912, upload-time = "2025-10-06T05:35:45.98Z" }, + { url = "https://files.pythonhosted.org/packages/df/b5/7610b6bd13e4ae77b96ba85abea1c8cb249683217ef09ac9e0ae93f25a91/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9", size = 50046, upload-time = "2025-10-06T05:35:47.009Z" }, + { url = "https://files.pythonhosted.org/packages/6e/ef/0e8f1fe32f8a53dd26bdd1f9347efe0778b0fddf62789ea683f4cc7d787d/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93", size = 50119, upload-time = "2025-10-06T05:35:48.38Z" }, + { url = "https://files.pythonhosted.org/packages/11/b1/71a477adc7c36e5fb628245dfbdea2166feae310757dea848d02bd0689fd/frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f", size = 231067, upload-time = "2025-10-06T05:35:49.97Z" }, + { url = "https://files.pythonhosted.org/packages/45/7e/afe40eca3a2dc19b9904c0f5d7edfe82b5304cb831391edec0ac04af94c2/frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695", size = 233160, upload-time = "2025-10-06T05:35:51.729Z" }, + { url = "https://files.pythonhosted.org/packages/a6/aa/7416eac95603ce428679d273255ffc7c998d4132cfae200103f164b108aa/frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52", size = 228544, upload-time = "2025-10-06T05:35:53.246Z" }, + { url = "https://files.pythonhosted.org/packages/8b/3d/2a2d1f683d55ac7e3875e4263d28410063e738384d3adc294f5ff3d7105e/frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581", size = 243797, upload-time = "2025-10-06T05:35:54.497Z" }, + { url = "https://files.pythonhosted.org/packages/78/1e/2d5565b589e580c296d3bb54da08d206e797d941a83a6fdea42af23be79c/frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567", size = 247923, upload-time = "2025-10-06T05:35:55.861Z" }, + { url = "https://files.pythonhosted.org/packages/aa/c3/65872fcf1d326a7f101ad4d86285c403c87be7d832b7470b77f6d2ed5ddc/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b", size = 230886, upload-time = "2025-10-06T05:35:57.399Z" }, + { url = "https://files.pythonhosted.org/packages/a0/76/ac9ced601d62f6956f03cc794f9e04c81719509f85255abf96e2510f4265/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92", size = 245731, upload-time = "2025-10-06T05:35:58.563Z" }, + { url = "https://files.pythonhosted.org/packages/b9/49/ecccb5f2598daf0b4a1415497eba4c33c1e8ce07495eb07d2860c731b8d5/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d", size = 241544, upload-time = "2025-10-06T05:35:59.719Z" }, + { url = "https://files.pythonhosted.org/packages/53/4b/ddf24113323c0bbcc54cb38c8b8916f1da7165e07b8e24a717b4a12cbf10/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd", size = 241806, upload-time = "2025-10-06T05:36:00.959Z" }, + { url = "https://files.pythonhosted.org/packages/a7/fb/9b9a084d73c67175484ba2789a59f8eebebd0827d186a8102005ce41e1ba/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967", size = 229382, upload-time = "2025-10-06T05:36:02.22Z" }, + { url = "https://files.pythonhosted.org/packages/95/a3/c8fb25aac55bf5e12dae5c5aa6a98f85d436c1dc658f21c3ac73f9fa95e5/frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25", size = 39647, upload-time = "2025-10-06T05:36:03.409Z" }, + { url = "https://files.pythonhosted.org/packages/0a/f5/603d0d6a02cfd4c8f2a095a54672b3cf967ad688a60fb9faf04fc4887f65/frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b", size = 44064, upload-time = "2025-10-06T05:36:04.368Z" }, + { url = "https://files.pythonhosted.org/packages/5d/16/c2c9ab44e181f043a86f9a8f84d5124b62dbcb3a02c0977ec72b9ac1d3e0/frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a", size = 39937, upload-time = "2025-10-06T05:36:05.669Z" }, + { url = "https://files.pythonhosted.org/packages/69/29/948b9aa87e75820a38650af445d2ef2b6b8a6fab1a23b6bb9e4ef0be2d59/frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1", size = 87782, upload-time = "2025-10-06T05:36:06.649Z" }, + { url = "https://files.pythonhosted.org/packages/64/80/4f6e318ee2a7c0750ed724fa33a4bdf1eacdc5a39a7a24e818a773cd91af/frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b", size = 50594, upload-time = "2025-10-06T05:36:07.69Z" }, + { url = "https://files.pythonhosted.org/packages/2b/94/5c8a2b50a496b11dd519f4a24cb5496cf125681dd99e94c604ccdea9419a/frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4", size = 50448, upload-time = "2025-10-06T05:36:08.78Z" }, + { url = "https://files.pythonhosted.org/packages/6a/bd/d91c5e39f490a49df14320f4e8c80161cfcce09f1e2cde1edd16a551abb3/frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383", size = 242411, upload-time = "2025-10-06T05:36:09.801Z" }, + { url = "https://files.pythonhosted.org/packages/8f/83/f61505a05109ef3293dfb1ff594d13d64a2324ac3482be2cedc2be818256/frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4", size = 243014, upload-time = "2025-10-06T05:36:11.394Z" }, + { url = "https://files.pythonhosted.org/packages/d8/cb/cb6c7b0f7d4023ddda30cf56b8b17494eb3a79e3fda666bf735f63118b35/frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8", size = 234909, upload-time = "2025-10-06T05:36:12.598Z" }, + { url = "https://files.pythonhosted.org/packages/31/c5/cd7a1f3b8b34af009fb17d4123c5a778b44ae2804e3ad6b86204255f9ec5/frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b", size = 250049, upload-time = "2025-10-06T05:36:14.065Z" }, + { url = "https://files.pythonhosted.org/packages/c0/01/2f95d3b416c584a1e7f0e1d6d31998c4a795f7544069ee2e0962a4b60740/frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52", size = 256485, upload-time = "2025-10-06T05:36:15.39Z" }, + { url = "https://files.pythonhosted.org/packages/ce/03/024bf7720b3abaebcff6d0793d73c154237b85bdf67b7ed55e5e9596dc9a/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29", size = 237619, upload-time = "2025-10-06T05:36:16.558Z" }, + { url = "https://files.pythonhosted.org/packages/69/fa/f8abdfe7d76b731f5d8bd217827cf6764d4f1d9763407e42717b4bed50a0/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3", size = 250320, upload-time = "2025-10-06T05:36:17.821Z" }, + { url = "https://files.pythonhosted.org/packages/f5/3c/b051329f718b463b22613e269ad72138cc256c540f78a6de89452803a47d/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143", size = 246820, upload-time = "2025-10-06T05:36:19.046Z" }, + { url = "https://files.pythonhosted.org/packages/0f/ae/58282e8f98e444b3f4dd42448ff36fa38bef29e40d40f330b22e7108f565/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608", size = 250518, upload-time = "2025-10-06T05:36:20.763Z" }, + { url = "https://files.pythonhosted.org/packages/8f/96/007e5944694d66123183845a106547a15944fbbb7154788cbf7272789536/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa", size = 239096, upload-time = "2025-10-06T05:36:22.129Z" }, + { url = "https://files.pythonhosted.org/packages/66/bb/852b9d6db2fa40be96f29c0d1205c306288f0684df8fd26ca1951d461a56/frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf", size = 39985, upload-time = "2025-10-06T05:36:23.661Z" }, + { url = "https://files.pythonhosted.org/packages/b8/af/38e51a553dd66eb064cdf193841f16f077585d4d28394c2fa6235cb41765/frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746", size = 44591, upload-time = "2025-10-06T05:36:24.958Z" }, + { url = "https://files.pythonhosted.org/packages/a7/06/1dc65480ab147339fecc70797e9c2f69d9cea9cf38934ce08df070fdb9cb/frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd", size = 40102, upload-time = "2025-10-06T05:36:26.333Z" }, + { url = "https://files.pythonhosted.org/packages/2d/40/0832c31a37d60f60ed79e9dfb5a92e1e2af4f40a16a29abcc7992af9edff/frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a", size = 85717, upload-time = "2025-10-06T05:36:27.341Z" }, + { url = "https://files.pythonhosted.org/packages/30/ba/b0b3de23f40bc55a7057bd38434e25c34fa48e17f20ee273bbde5e0650f3/frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7", size = 49651, upload-time = "2025-10-06T05:36:28.855Z" }, + { url = "https://files.pythonhosted.org/packages/0c/ab/6e5080ee374f875296c4243c381bbdef97a9ac39c6e3ce1d5f7d42cb78d6/frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40", size = 49417, upload-time = "2025-10-06T05:36:29.877Z" }, + { url = "https://files.pythonhosted.org/packages/d5/4e/e4691508f9477ce67da2015d8c00acd751e6287739123113a9fca6f1604e/frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027", size = 234391, upload-time = "2025-10-06T05:36:31.301Z" }, + { url = "https://files.pythonhosted.org/packages/40/76/c202df58e3acdf12969a7895fd6f3bc016c642e6726aa63bd3025e0fc71c/frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822", size = 233048, upload-time = "2025-10-06T05:36:32.531Z" }, + { url = "https://files.pythonhosted.org/packages/f9/c0/8746afb90f17b73ca5979c7a3958116e105ff796e718575175319b5bb4ce/frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121", size = 226549, upload-time = "2025-10-06T05:36:33.706Z" }, + { url = "https://files.pythonhosted.org/packages/7e/eb/4c7eefc718ff72f9b6c4893291abaae5fbc0c82226a32dcd8ef4f7a5dbef/frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5", size = 239833, upload-time = "2025-10-06T05:36:34.947Z" }, + { url = "https://files.pythonhosted.org/packages/c2/4e/e5c02187cf704224f8b21bee886f3d713ca379535f16893233b9d672ea71/frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e", size = 245363, upload-time = "2025-10-06T05:36:36.534Z" }, + { url = "https://files.pythonhosted.org/packages/1f/96/cb85ec608464472e82ad37a17f844889c36100eed57bea094518bf270692/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11", size = 229314, upload-time = "2025-10-06T05:36:38.582Z" }, + { url = "https://files.pythonhosted.org/packages/5d/6f/4ae69c550e4cee66b57887daeebe006fe985917c01d0fff9caab9883f6d0/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1", size = 243365, upload-time = "2025-10-06T05:36:40.152Z" }, + { url = "https://files.pythonhosted.org/packages/7a/58/afd56de246cf11780a40a2c28dc7cbabbf06337cc8ddb1c780a2d97e88d8/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1", size = 237763, upload-time = "2025-10-06T05:36:41.355Z" }, + { url = "https://files.pythonhosted.org/packages/cb/36/cdfaf6ed42e2644740d4a10452d8e97fa1c062e2a8006e4b09f1b5fd7d63/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8", size = 240110, upload-time = "2025-10-06T05:36:42.716Z" }, + { url = "https://files.pythonhosted.org/packages/03/a8/9ea226fbefad669f11b52e864c55f0bd57d3c8d7eb07e9f2e9a0b39502e1/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed", size = 233717, upload-time = "2025-10-06T05:36:44.251Z" }, + { url = "https://files.pythonhosted.org/packages/1e/0b/1b5531611e83ba7d13ccc9988967ea1b51186af64c42b7a7af465dcc9568/frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496", size = 39628, upload-time = "2025-10-06T05:36:45.423Z" }, + { url = "https://files.pythonhosted.org/packages/d8/cf/174c91dbc9cc49bc7b7aab74d8b734e974d1faa8f191c74af9b7e80848e6/frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231", size = 43882, upload-time = "2025-10-06T05:36:46.796Z" }, + { url = "https://files.pythonhosted.org/packages/c1/17/502cd212cbfa96eb1388614fe39a3fc9ab87dbbe042b66f97acb57474834/frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62", size = 39676, upload-time = "2025-10-06T05:36:47.8Z" }, + { url = "https://files.pythonhosted.org/packages/d2/5c/3bbfaa920dfab09e76946a5d2833a7cbdf7b9b4a91c714666ac4855b88b4/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94", size = 89235, upload-time = "2025-10-06T05:36:48.78Z" }, + { url = "https://files.pythonhosted.org/packages/d2/d6/f03961ef72166cec1687e84e8925838442b615bd0b8854b54923ce5b7b8a/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c", size = 50742, upload-time = "2025-10-06T05:36:49.837Z" }, + { url = "https://files.pythonhosted.org/packages/1e/bb/a6d12b7ba4c3337667d0e421f7181c82dda448ce4e7ad7ecd249a16fa806/frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52", size = 51725, upload-time = "2025-10-06T05:36:50.851Z" }, + { url = "https://files.pythonhosted.org/packages/bc/71/d1fed0ffe2c2ccd70b43714c6cab0f4188f09f8a67a7914a6b46ee30f274/frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51", size = 284533, upload-time = "2025-10-06T05:36:51.898Z" }, + { url = "https://files.pythonhosted.org/packages/c9/1f/fb1685a7b009d89f9bf78a42d94461bc06581f6e718c39344754a5d9bada/frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65", size = 292506, upload-time = "2025-10-06T05:36:53.101Z" }, + { url = "https://files.pythonhosted.org/packages/e6/3b/b991fe1612703f7e0d05c0cf734c1b77aaf7c7d321df4572e8d36e7048c8/frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82", size = 274161, upload-time = "2025-10-06T05:36:54.309Z" }, + { url = "https://files.pythonhosted.org/packages/ca/ec/c5c618767bcdf66e88945ec0157d7f6c4a1322f1473392319b7a2501ded7/frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714", size = 294676, upload-time = "2025-10-06T05:36:55.566Z" }, + { url = "https://files.pythonhosted.org/packages/7c/ce/3934758637d8f8a88d11f0585d6495ef54b2044ed6ec84492a91fa3b27aa/frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d", size = 300638, upload-time = "2025-10-06T05:36:56.758Z" }, + { url = "https://files.pythonhosted.org/packages/fc/4f/a7e4d0d467298f42de4b41cbc7ddaf19d3cfeabaf9ff97c20c6c7ee409f9/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506", size = 283067, upload-time = "2025-10-06T05:36:57.965Z" }, + { url = "https://files.pythonhosted.org/packages/dc/48/c7b163063d55a83772b268e6d1affb960771b0e203b632cfe09522d67ea5/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51", size = 292101, upload-time = "2025-10-06T05:36:59.237Z" }, + { url = "https://files.pythonhosted.org/packages/9f/d0/2366d3c4ecdc2fd391e0afa6e11500bfba0ea772764d631bbf82f0136c9d/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e", size = 289901, upload-time = "2025-10-06T05:37:00.811Z" }, + { url = "https://files.pythonhosted.org/packages/b8/94/daff920e82c1b70e3618a2ac39fbc01ae3e2ff6124e80739ce5d71c9b920/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0", size = 289395, upload-time = "2025-10-06T05:37:02.115Z" }, + { url = "https://files.pythonhosted.org/packages/e3/20/bba307ab4235a09fdcd3cc5508dbabd17c4634a1af4b96e0f69bfe551ebd/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41", size = 283659, upload-time = "2025-10-06T05:37:03.711Z" }, + { url = "https://files.pythonhosted.org/packages/fd/00/04ca1c3a7a124b6de4f8a9a17cc2fcad138b4608e7a3fc5877804b8715d7/frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b", size = 43492, upload-time = "2025-10-06T05:37:04.915Z" }, + { url = "https://files.pythonhosted.org/packages/59/5e/c69f733a86a94ab10f68e496dc6b7e8bc078ebb415281d5698313e3af3a1/frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888", size = 48034, upload-time = "2025-10-06T05:37:06.343Z" }, + { url = "https://files.pythonhosted.org/packages/16/6c/be9d79775d8abe79b05fa6d23da99ad6e7763a1d080fbae7290b286093fd/frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042", size = 41749, upload-time = "2025-10-06T05:37:07.431Z" }, + { url = "https://files.pythonhosted.org/packages/f1/c8/85da824b7e7b9b6e7f7705b2ecaf9591ba6f79c1177f324c2735e41d36a2/frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0", size = 86127, upload-time = "2025-10-06T05:37:08.438Z" }, + { url = "https://files.pythonhosted.org/packages/8e/e8/a1185e236ec66c20afd72399522f142c3724c785789255202d27ae992818/frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f", size = 49698, upload-time = "2025-10-06T05:37:09.48Z" }, + { url = "https://files.pythonhosted.org/packages/a1/93/72b1736d68f03fda5fdf0f2180fb6caaae3894f1b854d006ac61ecc727ee/frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c", size = 49749, upload-time = "2025-10-06T05:37:10.569Z" }, + { url = "https://files.pythonhosted.org/packages/a7/b2/fabede9fafd976b991e9f1b9c8c873ed86f202889b864756f240ce6dd855/frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2", size = 231298, upload-time = "2025-10-06T05:37:11.993Z" }, + { url = "https://files.pythonhosted.org/packages/3a/3b/d9b1e0b0eed36e70477ffb8360c49c85c8ca8ef9700a4e6711f39a6e8b45/frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8", size = 232015, upload-time = "2025-10-06T05:37:13.194Z" }, + { url = "https://files.pythonhosted.org/packages/dc/94/be719d2766c1138148564a3960fc2c06eb688da592bdc25adcf856101be7/frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686", size = 225038, upload-time = "2025-10-06T05:37:14.577Z" }, + { url = "https://files.pythonhosted.org/packages/e4/09/6712b6c5465f083f52f50cf74167b92d4ea2f50e46a9eea0523d658454ae/frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e", size = 240130, upload-time = "2025-10-06T05:37:15.781Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d4/cd065cdcf21550b54f3ce6a22e143ac9e4836ca42a0de1022da8498eac89/frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a", size = 242845, upload-time = "2025-10-06T05:37:17.037Z" }, + { url = "https://files.pythonhosted.org/packages/62/c3/f57a5c8c70cd1ead3d5d5f776f89d33110b1addae0ab010ad774d9a44fb9/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128", size = 229131, upload-time = "2025-10-06T05:37:18.221Z" }, + { url = "https://files.pythonhosted.org/packages/6c/52/232476fe9cb64f0742f3fde2b7d26c1dac18b6d62071c74d4ded55e0ef94/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f", size = 240542, upload-time = "2025-10-06T05:37:19.771Z" }, + { url = "https://files.pythonhosted.org/packages/5f/85/07bf3f5d0fb5414aee5f47d33c6f5c77bfe49aac680bfece33d4fdf6a246/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7", size = 237308, upload-time = "2025-10-06T05:37:20.969Z" }, + { url = "https://files.pythonhosted.org/packages/11/99/ae3a33d5befd41ac0ca2cc7fd3aa707c9c324de2e89db0e0f45db9a64c26/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30", size = 238210, upload-time = "2025-10-06T05:37:22.252Z" }, + { url = "https://files.pythonhosted.org/packages/b2/60/b1d2da22f4970e7a155f0adde9b1435712ece01b3cd45ba63702aea33938/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7", size = 231972, upload-time = "2025-10-06T05:37:23.5Z" }, + { url = "https://files.pythonhosted.org/packages/3f/ab/945b2f32de889993b9c9133216c068b7fcf257d8595a0ac420ac8677cab0/frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806", size = 40536, upload-time = "2025-10-06T05:37:25.581Z" }, + { url = "https://files.pythonhosted.org/packages/59/ad/9caa9b9c836d9ad6f067157a531ac48b7d36499f5036d4141ce78c230b1b/frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0", size = 44330, upload-time = "2025-10-06T05:37:26.928Z" }, + { url = "https://files.pythonhosted.org/packages/82/13/e6950121764f2676f43534c555249f57030150260aee9dcf7d64efda11dd/frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b", size = 40627, upload-time = "2025-10-06T05:37:28.075Z" }, + { url = "https://files.pythonhosted.org/packages/c0/c7/43200656ecc4e02d3f8bc248df68256cd9572b3f0017f0a0c4e93440ae23/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d", size = 89238, upload-time = "2025-10-06T05:37:29.373Z" }, + { url = "https://files.pythonhosted.org/packages/d1/29/55c5f0689b9c0fb765055629f472c0de484dcaf0acee2f7707266ae3583c/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed", size = 50738, upload-time = "2025-10-06T05:37:30.792Z" }, + { url = "https://files.pythonhosted.org/packages/ba/7d/b7282a445956506fa11da8c2db7d276adcbf2b17d8bb8407a47685263f90/frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930", size = 51739, upload-time = "2025-10-06T05:37:32.127Z" }, + { url = "https://files.pythonhosted.org/packages/62/1c/3d8622e60d0b767a5510d1d3cf21065b9db874696a51ea6d7a43180a259c/frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c", size = 284186, upload-time = "2025-10-06T05:37:33.21Z" }, + { url = "https://files.pythonhosted.org/packages/2d/14/aa36d5f85a89679a85a1d44cd7a6657e0b1c75f61e7cad987b203d2daca8/frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24", size = 292196, upload-time = "2025-10-06T05:37:36.107Z" }, + { url = "https://files.pythonhosted.org/packages/05/23/6bde59eb55abd407d34f77d39a5126fb7b4f109a3f611d3929f14b700c66/frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37", size = 273830, upload-time = "2025-10-06T05:37:37.663Z" }, + { url = "https://files.pythonhosted.org/packages/d2/3f/22cff331bfad7a8afa616289000ba793347fcd7bc275f3b28ecea2a27909/frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a", size = 294289, upload-time = "2025-10-06T05:37:39.261Z" }, + { url = "https://files.pythonhosted.org/packages/a4/89/5b057c799de4838b6c69aa82b79705f2027615e01be996d2486a69ca99c4/frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2", size = 300318, upload-time = "2025-10-06T05:37:43.213Z" }, + { url = "https://files.pythonhosted.org/packages/30/de/2c22ab3eb2a8af6d69dc799e48455813bab3690c760de58e1bf43b36da3e/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef", size = 282814, upload-time = "2025-10-06T05:37:45.337Z" }, + { url = "https://files.pythonhosted.org/packages/59/f7/970141a6a8dbd7f556d94977858cfb36fa9b66e0892c6dd780d2219d8cd8/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe", size = 291762, upload-time = "2025-10-06T05:37:46.657Z" }, + { url = "https://files.pythonhosted.org/packages/c1/15/ca1adae83a719f82df9116d66f5bb28bb95557b3951903d39135620ef157/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8", size = 289470, upload-time = "2025-10-06T05:37:47.946Z" }, + { url = "https://files.pythonhosted.org/packages/ac/83/dca6dc53bf657d371fbc88ddeb21b79891e747189c5de990b9dfff2ccba1/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a", size = 289042, upload-time = "2025-10-06T05:37:49.499Z" }, + { url = "https://files.pythonhosted.org/packages/96/52/abddd34ca99be142f354398700536c5bd315880ed0a213812bc491cff5e4/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e", size = 283148, upload-time = "2025-10-06T05:37:50.745Z" }, + { url = "https://files.pythonhosted.org/packages/af/d3/76bd4ed4317e7119c2b7f57c3f6934aba26d277acc6309f873341640e21f/frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df", size = 44676, upload-time = "2025-10-06T05:37:52.222Z" }, + { url = "https://files.pythonhosted.org/packages/89/76/c615883b7b521ead2944bb3480398cbb07e12b7b4e4d073d3752eb721558/frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd", size = 49451, upload-time = "2025-10-06T05:37:53.425Z" }, + { url = "https://files.pythonhosted.org/packages/e0/a3/5982da14e113d07b325230f95060e2169f5311b1017ea8af2a29b374c289/frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79", size = 42507, upload-time = "2025-10-06T05:37:54.513Z" }, + { url = "https://files.pythonhosted.org/packages/9a/9a/e35b4a917281c0b8419d4207f4334c8e8c5dbf4f3f5f9ada73958d937dcc/frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d", size = 13409, upload-time = "2025-10-06T05:38:16.721Z" }, +] + +[[package]] +name = "gcloud-aio-auth" +version = "5.4.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "backoff" }, + { name = "chardet" }, + { name = "cryptography" }, + { name = "pyjwt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6e/15/a3acb1393934d4909efe75c69fe94536c592ff5953f03922d20186fe4fb1/gcloud_aio_auth-5.4.4.tar.gz", hash = "sha256:70b8c6edf8655003251905372e6815a24ab839bf201788a903964570e9b4091f", size = 13851, upload-time = "2026-02-26T16:38:55.11Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/43/62/e25afa9e88260230b654a44a8aed75e43cea0dd1e67e43fb7b9a9a7e49e9/gcloud_aio_auth-5.4.4-py3-none-any.whl", hash = "sha256:aa4795365a1f9fdeec9b30e5616f87a95b00d76db60da530d12487c846d2a419", size = 16353, upload-time = "2026-02-26T16:38:56.151Z" }, +] + +[[package]] +name = "gcloud-aio-storage" +version = "9.6.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiofiles" }, + { name = "gcloud-aio-auth" }, + { name = "pyasn1-modules" }, + { name = "rsa" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/cc/05/34fc05ccbdab83962d42227d260157f59255f88becb866433cef7727ce82/gcloud_aio_storage-9.6.4.tar.gz", hash = "sha256:4da741e9e45f0ab5f57aa9ba2d46032dde4b80f3eb0a03de31ac741add420485", size = 14613, upload-time = "2026-02-26T17:47:15.024Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fc/70/b40dd004721f450995b368453e673b6ee23743f9de56fe5570c514622433/gcloud_aio_storage-9.6.4-py3-none-any.whl", hash = "sha256:a3b8af75e98485325cee80443a6f3e74f8efa7ed6ed10697db163682390cc1e4", size = 17383, upload-time = "2026-02-26T17:47:16.006Z" }, +] + [[package]] name = "google-auth" version = "2.45.0" @@ -479,6 +916,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/32/4b/b99e37f88336009971405cbb7630610322ed6fbfa31e1d7ab3fbf3049a2d/invoke-2.2.1-py3-none-any.whl", hash = "sha256:2413bc441b376e5cd3f55bb5d364f973ad8bdd7bf87e53c79de3c11bf3feecc8", size = 160287, upload-time = "2025-10-11T00:36:33.703Z" }, ] +[[package]] +name = "isodate" +version = "0.7.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz", hash = "sha256:4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6", size = 29705, upload-time = "2024-10-08T23:04:11.5Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", hash = "sha256:28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", size = 22320, upload-time = "2024-10-08T23:04:09.501Z" }, +] + [[package]] name = "isort" version = "5.13.2" @@ -488,6 +934,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/b3/8def84f539e7d2289a02f0524b944b15d7c75dab7628bedf1c4f0992029c/isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6", size = 92310, upload-time = "2023-12-13T20:37:23.244Z" }, ] +[[package]] +name = "jmespath" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d3/59/322338183ecda247fb5d1763a6cbe46eff7222eaeebafd9fa65d4bf5cb11/jmespath-1.1.0.tar.gz", hash = "sha256:472c87d80f36026ae83c6ddd0f1d05d4e510134ed462851fd5f754c8c3cbb88d", size = 27377, upload-time = "2026-01-22T16:35:26.279Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/14/2f/967ba146e6d58cf6a652da73885f52fc68001525b4197effc174321d70b4/jmespath-1.1.0-py3-none-any.whl", hash = "sha256:a5663118de4908c91729bea0acadca56526eb2698e83de10cd116ae0f4e97c64", size = 20419, upload-time = "2026-01-22T16:35:24.919Z" }, +] + [[package]] name = "jsonpath-python" version = "1.1.5" @@ -586,6 +1041,23 @@ gcp = [ realtime = [ { name = "websockets" }, ] +workflow-payload-encryption = [ + { name = "cryptography" }, +] +workflow-payload-offloading = [ + { name = "aioboto3" }, + { name = "azure-storage-blob", extra = ["aio"] }, + { name = "gcloud-aio-storage" }, +] +workflow-payload-offloading-azure = [ + { name = "azure-storage-blob", extra = ["aio"] }, +] +workflow-payload-offloading-gcs = [ + { name = "gcloud-aio-storage" }, +] +workflow-payload-offloading-s3 = [ + { name = "aioboto3" }, +] [package.dev-dependencies] dev = [ @@ -612,13 +1084,20 @@ lint = [ [package.metadata] requires-dist = [ + { name = "aioboto3", marker = "extra == 'workflow-payload-offloading-s3'", specifier = ">=12.4.0,<13.0.0" }, { name = "authlib", marker = "extra == 'agents'", specifier = ">=1.5.2,<2.0" }, + { name = "azure-storage-blob", extras = ["aio"], marker = "extra == 'workflow-payload-offloading-azure'", specifier = ">=12.28.0,<13.0.0" }, + { name = "cryptography", marker = "extra == 'workflow-payload-encryption'", specifier = ">=41.0.0,<47.0.0" }, { name = "eval-type-backport", specifier = ">=0.2.0" }, + { name = "gcloud-aio-storage", marker = "extra == 'workflow-payload-offloading-gcs'", specifier = ">=9.3.0,<10.0.0" }, { name = "google-auth", marker = "extra == 'gcp'", specifier = ">=2.27.0" }, { name = "griffe", marker = "extra == 'agents'", specifier = ">=1.7.3,<2.0" }, { name = "httpx", specifier = ">=0.28.1" }, { name = "jsonpath-python", specifier = ">=1.0.6" }, { name = "mcp", marker = "extra == 'agents'", specifier = ">=1.0,<2.0" }, + { name = "mistralai", extras = ["workflow-payload-offloading-azure"], marker = "extra == 'workflow-payload-offloading'" }, + { name = "mistralai", extras = ["workflow-payload-offloading-gcs"], marker = "extra == 'workflow-payload-offloading'" }, + { name = "mistralai", extras = ["workflow-payload-offloading-s3"], marker = "extra == 'workflow-payload-offloading'" }, { name = "opentelemetry-api", specifier = ">=1.33.1,<2.0.0" }, { name = "opentelemetry-semantic-conventions", specifier = ">=0.60b1,<0.61" }, { name = "pydantic", specifier = ">=2.11.2" }, @@ -627,7 +1106,7 @@ requires-dist = [ { name = "typing-inspection", specifier = ">=0.4.0" }, { name = "websockets", marker = "extra == 'realtime'", specifier = ">=13.0" }, ] -provides-extras = ["gcp", "agents", "realtime"] +provides-extras = ["gcp", "agents", "realtime", "workflow-payload-offloading-azure", "workflow-payload-offloading-gcs", "workflow-payload-offloading-s3", "workflow-payload-offloading", "workflow-payload-encryption"] [package.metadata.requires-dev] dev = [ @@ -652,6 +1131,144 @@ lint = [ { name = "ruff", specifier = ">=0.11.10,<0.12" }, ] +[[package]] +name = "multidict" +version = "6.7.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1a/c2/c2d94cbe6ac1753f3fc980da97b3d930efe1da3af3c9f5125354436c073d/multidict-6.7.1.tar.gz", hash = "sha256:ec6652a1bee61c53a3e5776b6049172c53b6aaba34f18c9ad04f82712bac623d", size = 102010, upload-time = "2026-01-26T02:46:45.979Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/84/0b/19348d4c98980c4851d2f943f8ebafdece2ae7ef737adcfa5994ce8e5f10/multidict-6.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:c93c3db7ea657dd4637d57e74ab73de31bccefe144d3d4ce370052035bc85fb5", size = 77176, upload-time = "2026-01-26T02:42:59.784Z" }, + { url = "https://files.pythonhosted.org/packages/ef/04/9de3f8077852e3d438215c81e9b691244532d2e05b4270e89ce67b7d103c/multidict-6.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:974e72a2474600827abaeda71af0c53d9ebbc3c2eb7da37b37d7829ae31232d8", size = 44996, upload-time = "2026-01-26T02:43:01.674Z" }, + { url = "https://files.pythonhosted.org/packages/31/5c/08c7f7fe311f32e83f7621cd3f99d805f45519cd06fafb247628b861da7d/multidict-6.7.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdea2e7b2456cfb6694fb113066fd0ec7ea4d67e3a35e1f4cbeea0b448bf5872", size = 44631, upload-time = "2026-01-26T02:43:03.169Z" }, + { url = "https://files.pythonhosted.org/packages/b7/7f/0e3b1390ae772f27501199996b94b52ceeb64fe6f9120a32c6c3f6b781be/multidict-6.7.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17207077e29342fdc2c9a82e4b306f1127bf1ea91f8b71e02d4798a70bb99991", size = 242561, upload-time = "2026-01-26T02:43:04.733Z" }, + { url = "https://files.pythonhosted.org/packages/dd/f4/8719f4f167586af317b69dd3e90f913416c91ca610cac79a45c53f590312/multidict-6.7.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d4f49cb5661344764e4c7c7973e92a47a59b8fc19b6523649ec9dc4960e58a03", size = 242223, upload-time = "2026-01-26T02:43:06.695Z" }, + { url = "https://files.pythonhosted.org/packages/47/ab/7c36164cce64a6ad19c6d9a85377b7178ecf3b89f8fd589c73381a5eedfd/multidict-6.7.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a9fc4caa29e2e6ae408d1c450ac8bf19892c5fca83ee634ecd88a53332c59981", size = 222322, upload-time = "2026-01-26T02:43:08.472Z" }, + { url = "https://files.pythonhosted.org/packages/f5/79/a25add6fb38035b5337bc5734f296d9afc99163403bbcf56d4170f97eb62/multidict-6.7.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c5f0c21549ab432b57dcc82130f388d84ad8179824cc3f223d5e7cfbfd4143f6", size = 254005, upload-time = "2026-01-26T02:43:10.127Z" }, + { url = "https://files.pythonhosted.org/packages/4a/7b/64a87cf98e12f756fc8bd444b001232ffff2be37288f018ad0d3f0aae931/multidict-6.7.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7dfb78d966b2c906ae1d28ccf6e6712a3cd04407ee5088cd276fe8cb42186190", size = 251173, upload-time = "2026-01-26T02:43:11.731Z" }, + { url = "https://files.pythonhosted.org/packages/4b/ac/b605473de2bb404e742f2cc3583d12aedb2352a70e49ae8fce455b50c5aa/multidict-6.7.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9b0d9b91d1aa44db9c1f1ecd0d9d2ae610b2f4f856448664e01a3b35899f3f92", size = 243273, upload-time = "2026-01-26T02:43:13.063Z" }, + { url = "https://files.pythonhosted.org/packages/03/65/11492d6a0e259783720f3bc1d9ea55579a76f1407e31ed44045c99542004/multidict-6.7.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dd96c01a9dcd4889dcfcf9eb5544ca0c77603f239e3ffab0524ec17aea9a93ee", size = 238956, upload-time = "2026-01-26T02:43:14.843Z" }, + { url = "https://files.pythonhosted.org/packages/5f/a7/7ee591302af64e7c196fb63fe856c788993c1372df765102bd0448e7e165/multidict-6.7.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:067343c68cd6612d375710f895337b3a98a033c94f14b9a99eff902f205424e2", size = 233477, upload-time = "2026-01-26T02:43:16.025Z" }, + { url = "https://files.pythonhosted.org/packages/9c/99/c109962d58756c35fd9992fed7f2355303846ea2ff054bb5f5e9d6b888de/multidict-6.7.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:5884a04f4ff56c6120f6ccf703bdeb8b5079d808ba604d4d53aec0d55dc33568", size = 243615, upload-time = "2026-01-26T02:43:17.84Z" }, + { url = "https://files.pythonhosted.org/packages/d5/5f/1973e7c771c86e93dcfe1c9cc55a5481b610f6614acfc28c0d326fe6bfad/multidict-6.7.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8affcf1c98b82bc901702eb73b6947a1bfa170823c153fe8a47b5f5f02e48e40", size = 249930, upload-time = "2026-01-26T02:43:19.06Z" }, + { url = "https://files.pythonhosted.org/packages/5d/a5/f170fc2268c3243853580203378cd522446b2df632061e0a5409817854c7/multidict-6.7.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:0d17522c37d03e85c8098ec8431636309b2682cf12e58f4dbc76121fb50e4962", size = 243807, upload-time = "2026-01-26T02:43:20.286Z" }, + { url = "https://files.pythonhosted.org/packages/de/01/73856fab6d125e5bc652c3986b90e8699a95e84b48d72f39ade6c0e74a8c/multidict-6.7.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:24c0cf81544ca5e17cfcb6e482e7a82cd475925242b308b890c9452a074d4505", size = 239103, upload-time = "2026-01-26T02:43:21.508Z" }, + { url = "https://files.pythonhosted.org/packages/e7/46/f1220bd9944d8aa40d8ccff100eeeee19b505b857b6f603d6078cb5315b0/multidict-6.7.1-cp310-cp310-win32.whl", hash = "sha256:d82dd730a95e6643802f4454b8fdecdf08667881a9c5670db85bc5a56693f122", size = 41416, upload-time = "2026-01-26T02:43:22.703Z" }, + { url = "https://files.pythonhosted.org/packages/68/00/9b38e272a770303692fc406c36e1a4c740f401522d5787691eb38a8925a8/multidict-6.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:cf37cbe5ced48d417ba045aca1b21bafca67489452debcde94778a576666a1df", size = 46022, upload-time = "2026-01-26T02:43:23.77Z" }, + { url = "https://files.pythonhosted.org/packages/64/65/d8d42490c02ee07b6bbe00f7190d70bb4738b3cce7629aaf9f213ef730dd/multidict-6.7.1-cp310-cp310-win_arm64.whl", hash = "sha256:59bc83d3f66b41dac1e7460aac1d196edc70c9ba3094965c467715a70ecb46db", size = 43238, upload-time = "2026-01-26T02:43:24.882Z" }, + { url = "https://files.pythonhosted.org/packages/ce/f1/a90635c4f88fb913fbf4ce660b83b7445b7a02615bda034b2f8eb38fd597/multidict-6.7.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7ff981b266af91d7b4b3793ca3382e53229088d193a85dfad6f5f4c27fc73e5d", size = 76626, upload-time = "2026-01-26T02:43:26.485Z" }, + { url = "https://files.pythonhosted.org/packages/a6/9b/267e64eaf6fc637a15b35f5de31a566634a2740f97d8d094a69d34f524a4/multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:844c5bca0b5444adb44a623fb0a1310c2f4cd41f402126bb269cd44c9b3f3e1e", size = 44706, upload-time = "2026-01-26T02:43:27.607Z" }, + { url = "https://files.pythonhosted.org/packages/dd/a4/d45caf2b97b035c57267791ecfaafbd59c68212004b3842830954bb4b02e/multidict-6.7.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f2a0a924d4c2e9afcd7ec64f9de35fcd96915149b2216e1cb2c10a56df483855", size = 44356, upload-time = "2026-01-26T02:43:28.661Z" }, + { url = "https://files.pythonhosted.org/packages/fd/d2/0a36c8473f0cbaeadd5db6c8b72d15bbceeec275807772bfcd059bef487d/multidict-6.7.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8be1802715a8e892c784c0197c2ace276ea52702a0ede98b6310c8f255a5afb3", size = 244355, upload-time = "2026-01-26T02:43:31.165Z" }, + { url = "https://files.pythonhosted.org/packages/5d/16/8c65be997fd7dd311b7d39c7b6e71a0cb449bad093761481eccbbe4b42a2/multidict-6.7.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2e2d2ed645ea29f31c4c7ea1552fcfd7cb7ba656e1eafd4134a6620c9f5fdd9e", size = 246433, upload-time = "2026-01-26T02:43:32.581Z" }, + { url = "https://files.pythonhosted.org/packages/01/fb/4dbd7e848d2799c6a026ec88ad39cf2b8416aa167fcc903baa55ecaa045c/multidict-6.7.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:95922cee9a778659e91db6497596435777bd25ed116701a4c034f8e46544955a", size = 225376, upload-time = "2026-01-26T02:43:34.417Z" }, + { url = "https://files.pythonhosted.org/packages/b6/8a/4a3a6341eac3830f6053062f8fbc9a9e54407c80755b3f05bc427295c2d0/multidict-6.7.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6b83cabdc375ffaaa15edd97eb7c0c672ad788e2687004990074d7d6c9b140c8", size = 257365, upload-time = "2026-01-26T02:43:35.741Z" }, + { url = "https://files.pythonhosted.org/packages/f7/a2/dd575a69c1aa206e12d27d0770cdf9b92434b48a9ef0cd0d1afdecaa93c4/multidict-6.7.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:38fb49540705369bab8484db0689d86c0a33a0a9f2c1b197f506b71b4b6c19b0", size = 254747, upload-time = "2026-01-26T02:43:36.976Z" }, + { url = "https://files.pythonhosted.org/packages/5a/56/21b27c560c13822ed93133f08aa6372c53a8e067f11fbed37b4adcdac922/multidict-6.7.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:439cbebd499f92e9aa6793016a8acaa161dfa749ae86d20960189f5398a19144", size = 246293, upload-time = "2026-01-26T02:43:38.258Z" }, + { url = "https://files.pythonhosted.org/packages/5a/a4/23466059dc3854763423d0ad6c0f3683a379d97673b1b89ec33826e46728/multidict-6.7.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6d3bc717b6fe763b8be3f2bee2701d3c8eb1b2a8ae9f60910f1b2860c82b6c49", size = 242962, upload-time = "2026-01-26T02:43:40.034Z" }, + { url = "https://files.pythonhosted.org/packages/1f/67/51dd754a3524d685958001e8fa20a0f5f90a6a856e0a9dcabff69be3dbb7/multidict-6.7.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:619e5a1ac57986dbfec9f0b301d865dddf763696435e2962f6d9cf2fdff2bb71", size = 237360, upload-time = "2026-01-26T02:43:41.752Z" }, + { url = "https://files.pythonhosted.org/packages/64/3f/036dfc8c174934d4b55d86ff4f978e558b0e585cef70cfc1ad01adc6bf18/multidict-6.7.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:0b38ebffd9be37c1170d33bc0f36f4f262e0a09bc1aac1c34c7aa51a7293f0b3", size = 245940, upload-time = "2026-01-26T02:43:43.042Z" }, + { url = "https://files.pythonhosted.org/packages/3d/20/6214d3c105928ebc353a1c644a6ef1408bc5794fcb4f170bb524a3c16311/multidict-6.7.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:10ae39c9cfe6adedcdb764f5e8411d4a92b055e35573a2eaa88d3323289ef93c", size = 253502, upload-time = "2026-01-26T02:43:44.371Z" }, + { url = "https://files.pythonhosted.org/packages/b1/e2/c653bc4ae1be70a0f836b82172d643fcf1dade042ba2676ab08ec08bff0f/multidict-6.7.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:25167cc263257660290fba06b9318d2026e3c910be240a146e1f66dd114af2b0", size = 247065, upload-time = "2026-01-26T02:43:45.745Z" }, + { url = "https://files.pythonhosted.org/packages/c8/11/a854b4154cd3bd8b1fd375e8a8ca9d73be37610c361543d56f764109509b/multidict-6.7.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:128441d052254f42989ef98b7b6a6ecb1e6f708aa962c7984235316db59f50fa", size = 241870, upload-time = "2026-01-26T02:43:47.054Z" }, + { url = "https://files.pythonhosted.org/packages/13/bf/9676c0392309b5fdae322333d22a829715b570edb9baa8016a517b55b558/multidict-6.7.1-cp311-cp311-win32.whl", hash = "sha256:d62b7f64ffde3b99d06b707a280db04fb3855b55f5a06df387236051d0668f4a", size = 41302, upload-time = "2026-01-26T02:43:48.753Z" }, + { url = "https://files.pythonhosted.org/packages/c9/68/f16a3a8ba6f7b6dc92a1f19669c0810bd2c43fc5a02da13b1cbf8e253845/multidict-6.7.1-cp311-cp311-win_amd64.whl", hash = "sha256:bdbf9f3b332abd0cdb306e7c2113818ab1e922dc84b8f8fd06ec89ed2a19ab8b", size = 45981, upload-time = "2026-01-26T02:43:49.921Z" }, + { url = "https://files.pythonhosted.org/packages/ac/ad/9dd5305253fa00cd3c7555dbef69d5bf4133debc53b87ab8d6a44d411665/multidict-6.7.1-cp311-cp311-win_arm64.whl", hash = "sha256:b8c990b037d2fff2f4e33d3f21b9b531c5745b33a49a7d6dbe7a177266af44f6", size = 43159, upload-time = "2026-01-26T02:43:51.635Z" }, + { url = "https://files.pythonhosted.org/packages/8d/9c/f20e0e2cf80e4b2e4b1c365bf5fe104ee633c751a724246262db8f1a0b13/multidict-6.7.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a90f75c956e32891a4eda3639ce6dd86e87105271f43d43442a3aedf3cddf172", size = 76893, upload-time = "2026-01-26T02:43:52.754Z" }, + { url = "https://files.pythonhosted.org/packages/fe/cf/18ef143a81610136d3da8193da9d80bfe1cb548a1e2d1c775f26b23d024a/multidict-6.7.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3fccb473e87eaa1382689053e4a4618e7ba7b9b9b8d6adf2027ee474597128cd", size = 45456, upload-time = "2026-01-26T02:43:53.893Z" }, + { url = "https://files.pythonhosted.org/packages/a9/65/1caac9d4cd32e8433908683446eebc953e82d22b03d10d41a5f0fefe991b/multidict-6.7.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b0fa96985700739c4c7853a43c0b3e169360d6855780021bfc6d0f1ce7c123e7", size = 43872, upload-time = "2026-01-26T02:43:55.041Z" }, + { url = "https://files.pythonhosted.org/packages/cf/3b/d6bd75dc4f3ff7c73766e04e705b00ed6dbbaccf670d9e05a12b006f5a21/multidict-6.7.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cb2a55f408c3043e42b40cc8eecd575afa27b7e0b956dfb190de0f8499a57a53", size = 251018, upload-time = "2026-01-26T02:43:56.198Z" }, + { url = "https://files.pythonhosted.org/packages/fd/80/c959c5933adedb9ac15152e4067c702a808ea183a8b64cf8f31af8ad3155/multidict-6.7.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb0ce7b2a32d09892b3dd6cc44877a0d02a33241fafca5f25c8b6b62374f8b75", size = 258883, upload-time = "2026-01-26T02:43:57.499Z" }, + { url = "https://files.pythonhosted.org/packages/86/85/7ed40adafea3d4f1c8b916e3b5cc3a8e07dfcdcb9cd72800f4ed3ca1b387/multidict-6.7.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c3a32d23520ee37bf327d1e1a656fec76a2edd5c038bf43eddfa0572ec49c60b", size = 242413, upload-time = "2026-01-26T02:43:58.755Z" }, + { url = "https://files.pythonhosted.org/packages/d2/57/b8565ff533e48595503c785f8361ff9a4fde4d67de25c207cd0ba3befd03/multidict-6.7.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9c90fed18bffc0189ba814749fdcc102b536e83a9f738a9003e569acd540a733", size = 268404, upload-time = "2026-01-26T02:44:00.216Z" }, + { url = "https://files.pythonhosted.org/packages/e0/50/9810c5c29350f7258180dfdcb2e52783a0632862eb334c4896ac717cebcb/multidict-6.7.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:da62917e6076f512daccfbbde27f46fed1c98fee202f0559adec8ee0de67f71a", size = 269456, upload-time = "2026-01-26T02:44:02.202Z" }, + { url = "https://files.pythonhosted.org/packages/f3/8d/5e5be3ced1d12966fefb5c4ea3b2a5b480afcea36406559442c6e31d4a48/multidict-6.7.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bfde23ef6ed9db7eaee6c37dcec08524cb43903c60b285b172b6c094711b3961", size = 256322, upload-time = "2026-01-26T02:44:03.56Z" }, + { url = "https://files.pythonhosted.org/packages/31/6e/d8a26d81ac166a5592782d208dd90dfdc0a7a218adaa52b45a672b46c122/multidict-6.7.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3758692429e4e32f1ba0df23219cd0b4fc0a52f476726fff9337d1a57676a582", size = 253955, upload-time = "2026-01-26T02:44:04.845Z" }, + { url = "https://files.pythonhosted.org/packages/59/4c/7c672c8aad41534ba619bcd4ade7a0dc87ed6b8b5c06149b85d3dd03f0cd/multidict-6.7.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:398c1478926eca669f2fd6a5856b6de9c0acf23a2cb59a14c0ba5844fa38077e", size = 251254, upload-time = "2026-01-26T02:44:06.133Z" }, + { url = "https://files.pythonhosted.org/packages/7b/bd/84c24de512cbafbdbc39439f74e967f19570ce7924e3007174a29c348916/multidict-6.7.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:c102791b1c4f3ab36ce4101154549105a53dc828f016356b3e3bcae2e3a039d3", size = 252059, upload-time = "2026-01-26T02:44:07.518Z" }, + { url = "https://files.pythonhosted.org/packages/fa/ba/f5449385510825b73d01c2d4087bf6d2fccc20a2d42ac34df93191d3dd03/multidict-6.7.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:a088b62bd733e2ad12c50dad01b7d0166c30287c166e137433d3b410add807a6", size = 263588, upload-time = "2026-01-26T02:44:09.382Z" }, + { url = "https://files.pythonhosted.org/packages/d7/11/afc7c677f68f75c84a69fe37184f0f82fce13ce4b92f49f3db280b7e92b3/multidict-6.7.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3d51ff4785d58d3f6c91bdbffcb5e1f7ddfda557727043aa20d20ec4f65e324a", size = 259642, upload-time = "2026-01-26T02:44:10.73Z" }, + { url = "https://files.pythonhosted.org/packages/2b/17/ebb9644da78c4ab36403739e0e6e0e30ebb135b9caf3440825001a0bddcb/multidict-6.7.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fc5907494fccf3e7d3f94f95c91d6336b092b5fc83811720fae5e2765890dfba", size = 251377, upload-time = "2026-01-26T02:44:12.042Z" }, + { url = "https://files.pythonhosted.org/packages/ca/a4/840f5b97339e27846c46307f2530a2805d9d537d8b8bd416af031cad7fa0/multidict-6.7.1-cp312-cp312-win32.whl", hash = "sha256:28ca5ce2fd9716631133d0e9a9b9a745ad7f60bac2bccafb56aa380fc0b6c511", size = 41887, upload-time = "2026-01-26T02:44:14.245Z" }, + { url = "https://files.pythonhosted.org/packages/80/31/0b2517913687895f5904325c2069d6a3b78f66cc641a86a2baf75a05dcbb/multidict-6.7.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcee94dfbd638784645b066074b338bc9cc155d4b4bffa4adce1615c5a426c19", size = 46053, upload-time = "2026-01-26T02:44:15.371Z" }, + { url = "https://files.pythonhosted.org/packages/0c/5b/aba28e4ee4006ae4c7df8d327d31025d760ffa992ea23812a601d226e682/multidict-6.7.1-cp312-cp312-win_arm64.whl", hash = "sha256:ba0a9fb644d0c1a2194cf7ffb043bd852cea63a57f66fbd33959f7dae18517bf", size = 43307, upload-time = "2026-01-26T02:44:16.852Z" }, + { url = "https://files.pythonhosted.org/packages/f2/22/929c141d6c0dba87d3e1d38fbdf1ba8baba86b7776469f2bc2d3227a1e67/multidict-6.7.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:2b41f5fed0ed563624f1c17630cb9941cf2309d4df00e494b551b5f3e3d67a23", size = 76174, upload-time = "2026-01-26T02:44:18.509Z" }, + { url = "https://files.pythonhosted.org/packages/c7/75/bc704ae15fee974f8fccd871305e254754167dce5f9e42d88a2def741a1d/multidict-6.7.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84e61e3af5463c19b67ced91f6c634effb89ef8bfc5ca0267f954451ed4bb6a2", size = 45116, upload-time = "2026-01-26T02:44:19.745Z" }, + { url = "https://files.pythonhosted.org/packages/79/76/55cd7186f498ed080a18440c9013011eb548f77ae1b297206d030eb1180a/multidict-6.7.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:935434b9853c7c112eee7ac891bc4cb86455aa631269ae35442cb316790c1445", size = 43524, upload-time = "2026-01-26T02:44:21.571Z" }, + { url = "https://files.pythonhosted.org/packages/e9/3c/414842ef8d5a1628d68edee29ba0e5bcf235dbfb3ccd3ea303a7fe8c72ff/multidict-6.7.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:432feb25a1cb67fe82a9680b4d65fb542e4635cb3166cd9c01560651ad60f177", size = 249368, upload-time = "2026-01-26T02:44:22.803Z" }, + { url = "https://files.pythonhosted.org/packages/f6/32/befed7f74c458b4a525e60519fe8d87eef72bb1e99924fa2b0f9d97a221e/multidict-6.7.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e82d14e3c948952a1a85503817e038cba5905a3352de76b9a465075d072fba23", size = 256952, upload-time = "2026-01-26T02:44:24.306Z" }, + { url = "https://files.pythonhosted.org/packages/03/d6/c878a44ba877f366630c860fdf74bfb203c33778f12b6ac274936853c451/multidict-6.7.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4cfb48c6ea66c83bcaaf7e4dfa7ec1b6bbcf751b7db85a328902796dfde4c060", size = 240317, upload-time = "2026-01-26T02:44:25.772Z" }, + { url = "https://files.pythonhosted.org/packages/68/49/57421b4d7ad2e9e60e25922b08ceb37e077b90444bde6ead629095327a6f/multidict-6.7.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1d540e51b7e8e170174555edecddbd5538105443754539193e3e1061864d444d", size = 267132, upload-time = "2026-01-26T02:44:27.648Z" }, + { url = "https://files.pythonhosted.org/packages/b7/fe/ec0edd52ddbcea2a2e89e174f0206444a61440b40f39704e64dc807a70bd/multidict-6.7.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:273d23f4b40f3dce4d6c8a821c741a86dec62cded82e1175ba3d99be128147ed", size = 268140, upload-time = "2026-01-26T02:44:29.588Z" }, + { url = "https://files.pythonhosted.org/packages/b0/73/6e1b01cbeb458807aa0831742232dbdd1fa92bfa33f52a3f176b4ff3dc11/multidict-6.7.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d624335fd4fa1c08a53f8b4be7676ebde19cd092b3895c421045ca87895b429", size = 254277, upload-time = "2026-01-26T02:44:30.902Z" }, + { url = "https://files.pythonhosted.org/packages/6a/b2/5fb8c124d7561a4974c342bc8c778b471ebbeb3cc17df696f034a7e9afe7/multidict-6.7.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:12fad252f8b267cc75b66e8fc51b3079604e8d43a75428ffe193cd9e2195dfd6", size = 252291, upload-time = "2026-01-26T02:44:32.31Z" }, + { url = "https://files.pythonhosted.org/packages/5a/96/51d4e4e06bcce92577fcd488e22600bd38e4fd59c20cb49434d054903bd2/multidict-6.7.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:03ede2a6ffbe8ef936b92cb4529f27f42be7f56afcdab5ab739cd5f27fb1cbf9", size = 250156, upload-time = "2026-01-26T02:44:33.734Z" }, + { url = "https://files.pythonhosted.org/packages/db/6b/420e173eec5fba721a50e2a9f89eda89d9c98fded1124f8d5c675f7a0c0f/multidict-6.7.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:90efbcf47dbe33dcf643a1e400d67d59abeac5db07dc3f27d6bdeae497a2198c", size = 249742, upload-time = "2026-01-26T02:44:35.222Z" }, + { url = "https://files.pythonhosted.org/packages/44/a3/ec5b5bd98f306bc2aa297b8c6f11a46714a56b1e6ef5ebda50a4f5d7c5fb/multidict-6.7.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5c4b9bfc148f5a91be9244d6264c53035c8a0dcd2f51f1c3c6e30e30ebaa1c84", size = 262221, upload-time = "2026-01-26T02:44:36.604Z" }, + { url = "https://files.pythonhosted.org/packages/cd/f7/e8c0d0da0cd1e28d10e624604e1a36bcc3353aaebdfdc3a43c72bc683a12/multidict-6.7.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:401c5a650f3add2472d1d288c26deebc540f99e2fb83e9525007a74cd2116f1d", size = 258664, upload-time = "2026-01-26T02:44:38.008Z" }, + { url = "https://files.pythonhosted.org/packages/52/da/151a44e8016dd33feed44f730bd856a66257c1ee7aed4f44b649fb7edeb3/multidict-6.7.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:97891f3b1b3ffbded884e2916cacf3c6fc87b66bb0dde46f7357404750559f33", size = 249490, upload-time = "2026-01-26T02:44:39.386Z" }, + { url = "https://files.pythonhosted.org/packages/87/af/a3b86bf9630b732897f6fc3f4c4714b90aa4361983ccbdcd6c0339b21b0c/multidict-6.7.1-cp313-cp313-win32.whl", hash = "sha256:e1c5988359516095535c4301af38d8a8838534158f649c05dd1050222321bcb3", size = 41695, upload-time = "2026-01-26T02:44:41.318Z" }, + { url = "https://files.pythonhosted.org/packages/b2/35/e994121b0e90e46134673422dd564623f93304614f5d11886b1b3e06f503/multidict-6.7.1-cp313-cp313-win_amd64.whl", hash = "sha256:960c83bf01a95b12b08fd54324a4eb1d5b52c88932b5cba5d6e712bb3ed12eb5", size = 45884, upload-time = "2026-01-26T02:44:42.488Z" }, + { url = "https://files.pythonhosted.org/packages/ca/61/42d3e5dbf661242a69c97ea363f2d7b46c567da8eadef8890022be6e2ab0/multidict-6.7.1-cp313-cp313-win_arm64.whl", hash = "sha256:563fe25c678aaba333d5399408f5ec3c383ca5b663e7f774dd179a520b8144df", size = 43122, upload-time = "2026-01-26T02:44:43.664Z" }, + { url = "https://files.pythonhosted.org/packages/6d/b3/e6b21c6c4f314bb956016b0b3ef2162590a529b84cb831c257519e7fde44/multidict-6.7.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:c76c4bec1538375dad9d452d246ca5368ad6e1c9039dadcf007ae59c70619ea1", size = 83175, upload-time = "2026-01-26T02:44:44.894Z" }, + { url = "https://files.pythonhosted.org/packages/fb/76/23ecd2abfe0957b234f6c960f4ade497f55f2c16aeb684d4ecdbf1c95791/multidict-6.7.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:57b46b24b5d5ebcc978da4ec23a819a9402b4228b8a90d9c656422b4bdd8a963", size = 48460, upload-time = "2026-01-26T02:44:46.106Z" }, + { url = "https://files.pythonhosted.org/packages/c4/57/a0ed92b23f3a042c36bc4227b72b97eca803f5f1801c1ab77c8a212d455e/multidict-6.7.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e954b24433c768ce78ab7929e84ccf3422e46deb45a4dc9f93438f8217fa2d34", size = 46930, upload-time = "2026-01-26T02:44:47.278Z" }, + { url = "https://files.pythonhosted.org/packages/b5/66/02ec7ace29162e447f6382c495dc95826bf931d3818799bbef11e8f7df1a/multidict-6.7.1-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3bd231490fa7217cc832528e1cd8752a96f0125ddd2b5749390f7c3ec8721b65", size = 242582, upload-time = "2026-01-26T02:44:48.604Z" }, + { url = "https://files.pythonhosted.org/packages/58/18/64f5a795e7677670e872673aca234162514696274597b3708b2c0d276cce/multidict-6.7.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:253282d70d67885a15c8a7716f3a73edf2d635793ceda8173b9ecc21f2fb8292", size = 250031, upload-time = "2026-01-26T02:44:50.544Z" }, + { url = "https://files.pythonhosted.org/packages/c8/ed/e192291dbbe51a8290c5686f482084d31bcd9d09af24f63358c3d42fd284/multidict-6.7.1-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0b4c48648d7649c9335cf1927a8b87fa692de3dcb15faa676c6a6f1f1aabda43", size = 228596, upload-time = "2026-01-26T02:44:51.951Z" }, + { url = "https://files.pythonhosted.org/packages/1e/7e/3562a15a60cf747397e7f2180b0a11dc0c38d9175a650e75fa1b4d325e15/multidict-6.7.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:98bc624954ec4d2c7cb074b8eefc2b5d0ce7d482e410df446414355d158fe4ca", size = 257492, upload-time = "2026-01-26T02:44:53.902Z" }, + { url = "https://files.pythonhosted.org/packages/24/02/7d0f9eae92b5249bb50ac1595b295f10e263dd0078ebb55115c31e0eaccd/multidict-6.7.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1b99af4d9eec0b49927b4402bcbb58dea89d3e0db8806a4086117019939ad3dd", size = 255899, upload-time = "2026-01-26T02:44:55.316Z" }, + { url = "https://files.pythonhosted.org/packages/00/e3/9b60ed9e23e64c73a5cde95269ef1330678e9c6e34dd4eb6b431b85b5a10/multidict-6.7.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6aac4f16b472d5b7dc6f66a0d49dd57b0e0902090be16594dc9ebfd3d17c47e7", size = 247970, upload-time = "2026-01-26T02:44:56.783Z" }, + { url = "https://files.pythonhosted.org/packages/3e/06/538e58a63ed5cfb0bd4517e346b91da32fde409d839720f664e9a4ae4f9d/multidict-6.7.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:21f830fe223215dffd51f538e78c172ed7c7f60c9b96a2bf05c4848ad49921c3", size = 245060, upload-time = "2026-01-26T02:44:58.195Z" }, + { url = "https://files.pythonhosted.org/packages/b2/2f/d743a3045a97c895d401e9bd29aaa09b94f5cbdf1bd561609e5a6c431c70/multidict-6.7.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:f5dd81c45b05518b9aa4da4aa74e1c93d715efa234fd3e8a179df611cc85e5f4", size = 235888, upload-time = "2026-01-26T02:44:59.57Z" }, + { url = "https://files.pythonhosted.org/packages/38/83/5a325cac191ab28b63c52f14f1131f3b0a55ba3b9aa65a6d0bf2a9b921a0/multidict-6.7.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:eb304767bca2bb92fb9c5bd33cedc95baee5bb5f6c88e63706533a1c06ad08c8", size = 243554, upload-time = "2026-01-26T02:45:01.054Z" }, + { url = "https://files.pythonhosted.org/packages/20/1f/9d2327086bd15da2725ef6aae624208e2ef828ed99892b17f60c344e57ed/multidict-6.7.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:c9035dde0f916702850ef66460bc4239d89d08df4d02023a5926e7446724212c", size = 252341, upload-time = "2026-01-26T02:45:02.484Z" }, + { url = "https://files.pythonhosted.org/packages/e8/2c/2a1aa0280cf579d0f6eed8ee5211c4f1730bd7e06c636ba2ee6aafda302e/multidict-6.7.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:af959b9beeb66c822380f222f0e0a1889331597e81f1ded7f374f3ecb0fd6c52", size = 246391, upload-time = "2026-01-26T02:45:03.862Z" }, + { url = "https://files.pythonhosted.org/packages/e5/03/7ca022ffc36c5a3f6e03b179a5ceb829be9da5783e6fe395f347c0794680/multidict-6.7.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:41f2952231456154ee479651491e94118229844dd7226541788be783be2b5108", size = 243422, upload-time = "2026-01-26T02:45:05.296Z" }, + { url = "https://files.pythonhosted.org/packages/dc/1d/b31650eab6c5778aceed46ba735bd97f7c7d2f54b319fa916c0f96e7805b/multidict-6.7.1-cp313-cp313t-win32.whl", hash = "sha256:df9f19c28adcb40b6aae30bbaa1478c389efd50c28d541d76760199fc1037c32", size = 47770, upload-time = "2026-01-26T02:45:06.754Z" }, + { url = "https://files.pythonhosted.org/packages/ac/5b/2d2d1d522e51285bd61b1e20df8f47ae1a9d80839db0b24ea783b3832832/multidict-6.7.1-cp313-cp313t-win_amd64.whl", hash = "sha256:d54ecf9f301853f2c5e802da559604b3e95bb7a3b01a9c295c6ee591b9882de8", size = 53109, upload-time = "2026-01-26T02:45:08.044Z" }, + { url = "https://files.pythonhosted.org/packages/3d/a3/cc409ba012c83ca024a308516703cf339bdc4b696195644a7215a5164a24/multidict-6.7.1-cp313-cp313t-win_arm64.whl", hash = "sha256:5a37ca18e360377cfda1d62f5f382ff41f2b8c4ccb329ed974cc2e1643440118", size = 45573, upload-time = "2026-01-26T02:45:09.349Z" }, + { url = "https://files.pythonhosted.org/packages/91/cc/db74228a8be41884a567e88a62fd589a913708fcf180d029898c17a9a371/multidict-6.7.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8f333ec9c5eb1b7105e3b84b53141e66ca05a19a605368c55450b6ba208cb9ee", size = 75190, upload-time = "2026-01-26T02:45:10.651Z" }, + { url = "https://files.pythonhosted.org/packages/d5/22/492f2246bb5b534abd44804292e81eeaf835388901f0c574bac4eeec73c5/multidict-6.7.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a407f13c188f804c759fc6a9f88286a565c242a76b27626594c133b82883b5c2", size = 44486, upload-time = "2026-01-26T02:45:11.938Z" }, + { url = "https://files.pythonhosted.org/packages/f1/4f/733c48f270565d78b4544f2baddc2fb2a245e5a8640254b12c36ac7ac68e/multidict-6.7.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0e161ddf326db5577c3a4cc2d8648f81456e8a20d40415541587a71620d7a7d1", size = 43219, upload-time = "2026-01-26T02:45:14.346Z" }, + { url = "https://files.pythonhosted.org/packages/24/bb/2c0c2287963f4259c85e8bcbba9182ced8d7fca65c780c38e99e61629d11/multidict-6.7.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1e3a8bb24342a8201d178c3b4984c26ba81a577c80d4d525727427460a50c22d", size = 245132, upload-time = "2026-01-26T02:45:15.712Z" }, + { url = "https://files.pythonhosted.org/packages/a7/f9/44d4b3064c65079d2467888794dea218d1601898ac50222ab8a9a8094460/multidict-6.7.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97231140a50f5d447d3164f994b86a0bed7cd016e2682f8650d6a9158e14fd31", size = 252420, upload-time = "2026-01-26T02:45:17.293Z" }, + { url = "https://files.pythonhosted.org/packages/8b/13/78f7275e73fa17b24c9a51b0bd9d73ba64bb32d0ed51b02a746eb876abe7/multidict-6.7.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b10359683bd8806a200fd2909e7c8ca3a7b24ec1d8132e483d58e791d881048", size = 233510, upload-time = "2026-01-26T02:45:19.356Z" }, + { url = "https://files.pythonhosted.org/packages/4b/25/8167187f62ae3cbd52da7893f58cb036b47ea3fb67138787c76800158982/multidict-6.7.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:283ddac99f7ac25a4acadbf004cb5ae34480bbeb063520f70ce397b281859362", size = 264094, upload-time = "2026-01-26T02:45:20.834Z" }, + { url = "https://files.pythonhosted.org/packages/a1/e7/69a3a83b7b030cf283fb06ce074a05a02322359783424d7edf0f15fe5022/multidict-6.7.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:538cec1e18c067d0e6103aa9a74f9e832904c957adc260e61cd9d8cf0c3b3d37", size = 260786, upload-time = "2026-01-26T02:45:22.818Z" }, + { url = "https://files.pythonhosted.org/packages/fe/3b/8ec5074bcfc450fe84273713b4b0a0dd47c0249358f5d82eb8104ffe2520/multidict-6.7.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7eee46ccb30ff48a1e35bb818cc90846c6be2b68240e42a78599166722cea709", size = 248483, upload-time = "2026-01-26T02:45:24.368Z" }, + { url = "https://files.pythonhosted.org/packages/48/5a/d5a99e3acbca0e29c5d9cba8f92ceb15dce78bab963b308ae692981e3a5d/multidict-6.7.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fa263a02f4f2dd2d11a7b1bb4362aa7cb1049f84a9235d31adf63f30143469a0", size = 248403, upload-time = "2026-01-26T02:45:25.982Z" }, + { url = "https://files.pythonhosted.org/packages/35/48/e58cd31f6c7d5102f2a4bf89f96b9cf7e00b6c6f3d04ecc44417c00a5a3c/multidict-6.7.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:2e1425e2f99ec5bd36c15a01b690a1a2456209c5deed58f95469ffb46039ccbb", size = 240315, upload-time = "2026-01-26T02:45:27.487Z" }, + { url = "https://files.pythonhosted.org/packages/94/33/1cd210229559cb90b6786c30676bb0c58249ff42f942765f88793b41fdce/multidict-6.7.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:497394b3239fc6f0e13a78a3e1b61296e72bf1c5f94b4c4eb80b265c37a131cd", size = 245528, upload-time = "2026-01-26T02:45:28.991Z" }, + { url = "https://files.pythonhosted.org/packages/64/f2/6e1107d226278c876c783056b7db43d800bb64c6131cec9c8dfb6903698e/multidict-6.7.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:233b398c29d3f1b9676b4b6f75c518a06fcb2ea0b925119fb2c1bc35c05e1601", size = 258784, upload-time = "2026-01-26T02:45:30.503Z" }, + { url = "https://files.pythonhosted.org/packages/4d/c1/11f664f14d525e4a1b5327a82d4de61a1db604ab34c6603bb3c2cc63ad34/multidict-6.7.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:93b1818e4a6e0930454f0f2af7dfce69307ca03cdcfb3739bf4d91241967b6c1", size = 251980, upload-time = "2026-01-26T02:45:32.603Z" }, + { url = "https://files.pythonhosted.org/packages/e1/9f/75a9ac888121d0c5bbd4ecf4eead45668b1766f6baabfb3b7f66a410e231/multidict-6.7.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f33dc2a3abe9249ea5d8360f969ec7f4142e7ac45ee7014d8f8d5acddf178b7b", size = 243602, upload-time = "2026-01-26T02:45:34.043Z" }, + { url = "https://files.pythonhosted.org/packages/9a/e7/50bf7b004cc8525d80dbbbedfdc7aed3e4c323810890be4413e589074032/multidict-6.7.1-cp314-cp314-win32.whl", hash = "sha256:3ab8b9d8b75aef9df299595d5388b14530839f6422333357af1339443cff777d", size = 40930, upload-time = "2026-01-26T02:45:36.278Z" }, + { url = "https://files.pythonhosted.org/packages/e0/bf/52f25716bbe93745595800f36fb17b73711f14da59ed0bb2eba141bc9f0f/multidict-6.7.1-cp314-cp314-win_amd64.whl", hash = "sha256:5e01429a929600e7dab7b166062d9bb54a5eed752384c7384c968c2afab8f50f", size = 45074, upload-time = "2026-01-26T02:45:37.546Z" }, + { url = "https://files.pythonhosted.org/packages/97/ab/22803b03285fa3a525f48217963da3a65ae40f6a1b6f6cf2768879e208f9/multidict-6.7.1-cp314-cp314-win_arm64.whl", hash = "sha256:4885cb0e817aef5d00a2e8451d4665c1808378dc27c2705f1bf4ef8505c0d2e5", size = 42471, upload-time = "2026-01-26T02:45:38.889Z" }, + { url = "https://files.pythonhosted.org/packages/e0/6d/f9293baa6146ba9507e360ea0292b6422b016907c393e2f63fc40ab7b7b5/multidict-6.7.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:0458c978acd8e6ea53c81eefaddbbee9c6c5e591f41b3f5e8e194780fe026581", size = 82401, upload-time = "2026-01-26T02:45:40.254Z" }, + { url = "https://files.pythonhosted.org/packages/7a/68/53b5494738d83558d87c3c71a486504d8373421c3e0dbb6d0db48ad42ee0/multidict-6.7.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c0abd12629b0af3cf590982c0b413b1e7395cd4ec026f30986818ab95bfaa94a", size = 48143, upload-time = "2026-01-26T02:45:41.635Z" }, + { url = "https://files.pythonhosted.org/packages/37/e8/5284c53310dcdc99ce5d66563f6e5773531a9b9fe9ec7a615e9bc306b05f/multidict-6.7.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:14525a5f61d7d0c94b368a42cff4c9a4e7ba2d52e2672a7b23d84dc86fb02b0c", size = 46507, upload-time = "2026-01-26T02:45:42.99Z" }, + { url = "https://files.pythonhosted.org/packages/e4/fc/6800d0e5b3875568b4083ecf5f310dcf91d86d52573160834fb4bfcf5e4f/multidict-6.7.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:17307b22c217b4cf05033dabefe68255a534d637c6c9b0cc8382718f87be4262", size = 239358, upload-time = "2026-01-26T02:45:44.376Z" }, + { url = "https://files.pythonhosted.org/packages/41/75/4ad0973179361cdf3a113905e6e088173198349131be2b390f9fa4da5fc6/multidict-6.7.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7a7e590ff876a3eaf1c02a4dfe0724b6e69a9e9de6d8f556816f29c496046e59", size = 246884, upload-time = "2026-01-26T02:45:47.167Z" }, + { url = "https://files.pythonhosted.org/packages/c3/9c/095bb28b5da139bd41fb9a5d5caff412584f377914bd8787c2aa98717130/multidict-6.7.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5fa6a95dfee63893d80a34758cd0e0c118a30b8dcb46372bf75106c591b77889", size = 225878, upload-time = "2026-01-26T02:45:48.698Z" }, + { url = "https://files.pythonhosted.org/packages/07/d0/c0a72000243756e8f5a277b6b514fa005f2c73d481b7d9e47cd4568aa2e4/multidict-6.7.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a0543217a6a017692aa6ae5cc39adb75e587af0f3a82288b1492eb73dd6cc2a4", size = 253542, upload-time = "2026-01-26T02:45:50.164Z" }, + { url = "https://files.pythonhosted.org/packages/c0/6b/f69da15289e384ecf2a68837ec8b5ad8c33e973aa18b266f50fe55f24b8c/multidict-6.7.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f99fe611c312b3c1c0ace793f92464d8cd263cc3b26b5721950d977b006b6c4d", size = 252403, upload-time = "2026-01-26T02:45:51.779Z" }, + { url = "https://files.pythonhosted.org/packages/a2/76/b9669547afa5a1a25cd93eaca91c0da1c095b06b6d2d8ec25b713588d3a1/multidict-6.7.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9004d8386d133b7e6135679424c91b0b854d2d164af6ea3f289f8f2761064609", size = 244889, upload-time = "2026-01-26T02:45:53.27Z" }, + { url = "https://files.pythonhosted.org/packages/7e/a9/a50d2669e506dad33cfc45b5d574a205587b7b8a5f426f2fbb2e90882588/multidict-6.7.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e628ef0e6859ffd8273c69412a2465c4be4a9517d07261b33334b5ec6f3c7489", size = 241982, upload-time = "2026-01-26T02:45:54.919Z" }, + { url = "https://files.pythonhosted.org/packages/c5/bb/1609558ad8b456b4827d3c5a5b775c93b87878fd3117ed3db3423dfbce1b/multidict-6.7.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:841189848ba629c3552035a6a7f5bf3b02eb304e9fea7492ca220a8eda6b0e5c", size = 232415, upload-time = "2026-01-26T02:45:56.981Z" }, + { url = "https://files.pythonhosted.org/packages/d8/59/6f61039d2aa9261871e03ab9dc058a550d240f25859b05b67fd70f80d4b3/multidict-6.7.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:ce1bbd7d780bb5a0da032e095c951f7014d6b0a205f8318308140f1a6aba159e", size = 240337, upload-time = "2026-01-26T02:45:58.698Z" }, + { url = "https://files.pythonhosted.org/packages/a1/29/fdc6a43c203890dc2ae9249971ecd0c41deaedfe00d25cb6564b2edd99eb/multidict-6.7.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b26684587228afed0d50cf804cc71062cc9c1cdf55051c4c6345d372947b268c", size = 248788, upload-time = "2026-01-26T02:46:00.862Z" }, + { url = "https://files.pythonhosted.org/packages/a9/14/a153a06101323e4cf086ecee3faadba52ff71633d471f9685c42e3736163/multidict-6.7.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:9f9af11306994335398293f9958071019e3ab95e9a707dc1383a35613f6abcb9", size = 242842, upload-time = "2026-01-26T02:46:02.824Z" }, + { url = "https://files.pythonhosted.org/packages/41/5f/604ae839e64a4a6efc80db94465348d3b328ee955e37acb24badbcd24d83/multidict-6.7.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:b4938326284c4f1224178a560987b6cf8b4d38458b113d9b8c1db1a836e640a2", size = 240237, upload-time = "2026-01-26T02:46:05.898Z" }, + { url = "https://files.pythonhosted.org/packages/5f/60/c3a5187bf66f6fb546ff4ab8fb5a077cbdd832d7b1908d4365c7f74a1917/multidict-6.7.1-cp314-cp314t-win32.whl", hash = "sha256:98655c737850c064a65e006a3df7c997cd3b220be4ec8fe26215760b9697d4d7", size = 48008, upload-time = "2026-01-26T02:46:07.468Z" }, + { url = "https://files.pythonhosted.org/packages/0c/f7/addf1087b860ac60e6f382240f64fb99f8bfb532bb06f7c542b83c29ca61/multidict-6.7.1-cp314-cp314t-win_amd64.whl", hash = "sha256:497bde6223c212ba11d462853cfa4f0ae6ef97465033e7dc9940cdb3ab5b48e5", size = 53542, upload-time = "2026-01-26T02:46:08.809Z" }, + { url = "https://files.pythonhosted.org/packages/4c/81/4629d0aa32302ef7b2ec65c75a728cc5ff4fa410c50096174c1632e70b3e/multidict-6.7.1-cp314-cp314t-win_arm64.whl", hash = "sha256:2bbd113e0d4af5db41d5ebfe9ccaff89de2120578164f86a5d17d5a576d1e5b2", size = 44719, upload-time = "2026-01-26T02:46:11.146Z" }, + { url = "https://files.pythonhosted.org/packages/81/08/7036c080d7117f28a4af526d794aab6a84463126db031b007717c1a6676e/multidict-6.7.1-py3-none-any.whl", hash = "sha256:55d97cc6dae627efa6a6e548885712d4864b81110ac76fa4e534c03819fa4a56", size = 12319, upload-time = "2026-01-26T02:46:44.004Z" }, +] + [[package]] name = "mypy" version = "1.15.0" @@ -775,6 +1392,120 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] +[[package]] +name = "propcache" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9e/da/e9fc233cf63743258bff22b3dfa7ea5baef7b5bc324af47a0ad89b8ffc6f/propcache-0.4.1.tar.gz", hash = "sha256:f48107a8c637e80362555f37ecf49abe20370e557cc4ab374f04ec4423c97c3d", size = 46442, upload-time = "2025-10-08T19:49:02.291Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/0e/934b541323035566a9af292dba85a195f7b78179114f2c6ebb24551118a9/propcache-0.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c2d1fa3201efaf55d730400d945b5b3ab6e672e100ba0f9a409d950ab25d7db", size = 79534, upload-time = "2025-10-08T19:46:02.083Z" }, + { url = "https://files.pythonhosted.org/packages/a1/6b/db0d03d96726d995dc7171286c6ba9d8d14251f37433890f88368951a44e/propcache-0.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1eb2994229cc8ce7fe9b3db88f5465f5fd8651672840b2e426b88cdb1a30aac8", size = 45526, upload-time = "2025-10-08T19:46:03.884Z" }, + { url = "https://files.pythonhosted.org/packages/e4/c3/82728404aea669e1600f304f2609cde9e665c18df5a11cdd57ed73c1dceb/propcache-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:66c1f011f45a3b33d7bcb22daed4b29c0c9e2224758b6be00686731e1b46f925", size = 47263, upload-time = "2025-10-08T19:46:05.405Z" }, + { url = "https://files.pythonhosted.org/packages/df/1b/39313ddad2bf9187a1432654c38249bab4562ef535ef07f5eb6eb04d0b1b/propcache-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9a52009f2adffe195d0b605c25ec929d26b36ef986ba85244891dee3b294df21", size = 201012, upload-time = "2025-10-08T19:46:07.165Z" }, + { url = "https://files.pythonhosted.org/packages/5b/01/f1d0b57d136f294a142acf97f4ed58c8e5b974c21e543000968357115011/propcache-0.4.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5d4e2366a9c7b837555cf02fb9be2e3167d333aff716332ef1b7c3a142ec40c5", size = 209491, upload-time = "2025-10-08T19:46:08.909Z" }, + { url = "https://files.pythonhosted.org/packages/a1/c8/038d909c61c5bb039070b3fb02ad5cccdb1dde0d714792e251cdb17c9c05/propcache-0.4.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:9d2b6caef873b4f09e26ea7e33d65f42b944837563a47a94719cc3544319a0db", size = 215319, upload-time = "2025-10-08T19:46:10.7Z" }, + { url = "https://files.pythonhosted.org/packages/08/57/8c87e93142b2c1fa2408e45695205a7ba05fb5db458c0bf5c06ba0e09ea6/propcache-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2b16ec437a8c8a965ecf95739448dd938b5c7f56e67ea009f4300d8df05f32b7", size = 196856, upload-time = "2025-10-08T19:46:12.003Z" }, + { url = "https://files.pythonhosted.org/packages/42/df/5615fec76aa561987a534759b3686008a288e73107faa49a8ae5795a9f7a/propcache-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:296f4c8ed03ca7476813fe666c9ea97869a8d7aec972618671b33a38a5182ef4", size = 193241, upload-time = "2025-10-08T19:46:13.495Z" }, + { url = "https://files.pythonhosted.org/packages/d5/21/62949eb3a7a54afe8327011c90aca7e03547787a88fb8bd9726806482fea/propcache-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:1f0978529a418ebd1f49dad413a2b68af33f85d5c5ca5c6ca2a3bed375a7ac60", size = 190552, upload-time = "2025-10-08T19:46:14.938Z" }, + { url = "https://files.pythonhosted.org/packages/30/ee/ab4d727dd70806e5b4de96a798ae7ac6e4d42516f030ee60522474b6b332/propcache-0.4.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:fd138803047fb4c062b1c1dd95462f5209456bfab55c734458f15d11da288f8f", size = 200113, upload-time = "2025-10-08T19:46:16.695Z" }, + { url = "https://files.pythonhosted.org/packages/8a/0b/38b46208e6711b016aa8966a3ac793eee0d05c7159d8342aa27fc0bc365e/propcache-0.4.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8c9b3cbe4584636d72ff556d9036e0c9317fa27b3ac1f0f558e7e84d1c9c5900", size = 200778, upload-time = "2025-10-08T19:46:18.023Z" }, + { url = "https://files.pythonhosted.org/packages/cf/81/5abec54355ed344476bee711e9f04815d4b00a311ab0535599204eecc257/propcache-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f93243fdc5657247533273ac4f86ae106cc6445a0efacb9a1bfe982fcfefd90c", size = 193047, upload-time = "2025-10-08T19:46:19.449Z" }, + { url = "https://files.pythonhosted.org/packages/ec/b6/1f237c04e32063cb034acd5f6ef34ef3a394f75502e72703545631ab1ef6/propcache-0.4.1-cp310-cp310-win32.whl", hash = "sha256:a0ee98db9c5f80785b266eb805016e36058ac72c51a064040f2bc43b61101cdb", size = 38093, upload-time = "2025-10-08T19:46:20.643Z" }, + { url = "https://files.pythonhosted.org/packages/a6/67/354aac4e0603a15f76439caf0427781bcd6797f370377f75a642133bc954/propcache-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:1cdb7988c4e5ac7f6d175a28a9aa0c94cb6f2ebe52756a3c0cda98d2809a9e37", size = 41638, upload-time = "2025-10-08T19:46:21.935Z" }, + { url = "https://files.pythonhosted.org/packages/e0/e1/74e55b9fd1a4c209ff1a9a824bf6c8b3d1fc5a1ac3eabe23462637466785/propcache-0.4.1-cp310-cp310-win_arm64.whl", hash = "sha256:d82ad62b19645419fe79dd63b3f9253e15b30e955c0170e5cebc350c1844e581", size = 38229, upload-time = "2025-10-08T19:46:23.368Z" }, + { url = "https://files.pythonhosted.org/packages/8c/d4/4e2c9aaf7ac2242b9358f98dccd8f90f2605402f5afeff6c578682c2c491/propcache-0.4.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:60a8fda9644b7dfd5dece8c61d8a85e271cb958075bfc4e01083c148b61a7caf", size = 80208, upload-time = "2025-10-08T19:46:24.597Z" }, + { url = "https://files.pythonhosted.org/packages/c2/21/d7b68e911f9c8e18e4ae43bdbc1e1e9bbd971f8866eb81608947b6f585ff/propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c30b53e7e6bda1d547cabb47c825f3843a0a1a42b0496087bb58d8fedf9f41b5", size = 45777, upload-time = "2025-10-08T19:46:25.733Z" }, + { url = "https://files.pythonhosted.org/packages/d3/1d/11605e99ac8ea9435651ee71ab4cb4bf03f0949586246476a25aadfec54a/propcache-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6918ecbd897443087a3b7cd978d56546a812517dcaaca51b49526720571fa93e", size = 47647, upload-time = "2025-10-08T19:46:27.304Z" }, + { url = "https://files.pythonhosted.org/packages/58/1a/3c62c127a8466c9c843bccb503d40a273e5cc69838805f322e2826509e0d/propcache-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3d902a36df4e5989763425a8ab9e98cd8ad5c52c823b34ee7ef307fd50582566", size = 214929, upload-time = "2025-10-08T19:46:28.62Z" }, + { url = "https://files.pythonhosted.org/packages/56/b9/8fa98f850960b367c4b8fe0592e7fc341daa7a9462e925228f10a60cf74f/propcache-0.4.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a9695397f85973bb40427dedddf70d8dc4a44b22f1650dd4af9eedf443d45165", size = 221778, upload-time = "2025-10-08T19:46:30.358Z" }, + { url = "https://files.pythonhosted.org/packages/46/a6/0ab4f660eb59649d14b3d3d65c439421cf2f87fe5dd68591cbe3c1e78a89/propcache-0.4.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2bb07ffd7eaad486576430c89f9b215f9e4be68c4866a96e97db9e97fead85dc", size = 228144, upload-time = "2025-10-08T19:46:32.607Z" }, + { url = "https://files.pythonhosted.org/packages/52/6a/57f43e054fb3d3a56ac9fc532bc684fc6169a26c75c353e65425b3e56eef/propcache-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd6f30fdcf9ae2a70abd34da54f18da086160e4d7d9251f81f3da0ff84fc5a48", size = 210030, upload-time = "2025-10-08T19:46:33.969Z" }, + { url = "https://files.pythonhosted.org/packages/40/e2/27e6feebb5f6b8408fa29f5efbb765cd54c153ac77314d27e457a3e993b7/propcache-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:fc38cba02d1acba4e2869eef1a57a43dfbd3d49a59bf90dda7444ec2be6a5570", size = 208252, upload-time = "2025-10-08T19:46:35.309Z" }, + { url = "https://files.pythonhosted.org/packages/9e/f8/91c27b22ccda1dbc7967f921c42825564fa5336a01ecd72eb78a9f4f53c2/propcache-0.4.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:67fad6162281e80e882fb3ec355398cf72864a54069d060321f6cd0ade95fe85", size = 202064, upload-time = "2025-10-08T19:46:36.993Z" }, + { url = "https://files.pythonhosted.org/packages/f2/26/7f00bd6bd1adba5aafe5f4a66390f243acab58eab24ff1a08bebb2ef9d40/propcache-0.4.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f10207adf04d08bec185bae14d9606a1444715bc99180f9331c9c02093e1959e", size = 212429, upload-time = "2025-10-08T19:46:38.398Z" }, + { url = "https://files.pythonhosted.org/packages/84/89/fd108ba7815c1117ddca79c228f3f8a15fc82a73bca8b142eb5de13b2785/propcache-0.4.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:e9b0d8d0845bbc4cfcdcbcdbf5086886bc8157aa963c31c777ceff7846c77757", size = 216727, upload-time = "2025-10-08T19:46:39.732Z" }, + { url = "https://files.pythonhosted.org/packages/79/37/3ec3f7e3173e73f1d600495d8b545b53802cbf35506e5732dd8578db3724/propcache-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:981333cb2f4c1896a12f4ab92a9cc8f09ea664e9b7dbdc4eff74627af3a11c0f", size = 205097, upload-time = "2025-10-08T19:46:41.025Z" }, + { url = "https://files.pythonhosted.org/packages/61/b0/b2631c19793f869d35f47d5a3a56fb19e9160d3c119f15ac7344fc3ccae7/propcache-0.4.1-cp311-cp311-win32.whl", hash = "sha256:f1d2f90aeec838a52f1c1a32fe9a619fefd5e411721a9117fbf82aea638fe8a1", size = 38084, upload-time = "2025-10-08T19:46:42.693Z" }, + { url = "https://files.pythonhosted.org/packages/f4/78/6cce448e2098e9f3bfc91bb877f06aa24b6ccace872e39c53b2f707c4648/propcache-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:364426a62660f3f699949ac8c621aad6977be7126c5807ce48c0aeb8e7333ea6", size = 41637, upload-time = "2025-10-08T19:46:43.778Z" }, + { url = "https://files.pythonhosted.org/packages/9c/e9/754f180cccd7f51a39913782c74717c581b9cc8177ad0e949f4d51812383/propcache-0.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:e53f3a38d3510c11953f3e6a33f205c6d1b001129f972805ca9b42fc308bc239", size = 38064, upload-time = "2025-10-08T19:46:44.872Z" }, + { url = "https://files.pythonhosted.org/packages/a2/0f/f17b1b2b221d5ca28b4b876e8bb046ac40466513960646bda8e1853cdfa2/propcache-0.4.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e153e9cd40cc8945138822807139367f256f89c6810c2634a4f6902b52d3b4e2", size = 80061, upload-time = "2025-10-08T19:46:46.075Z" }, + { url = "https://files.pythonhosted.org/packages/76/47/8ccf75935f51448ba9a16a71b783eb7ef6b9ee60f5d14c7f8a8a79fbeed7/propcache-0.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cd547953428f7abb73c5ad82cbb32109566204260d98e41e5dfdc682eb7f8403", size = 46037, upload-time = "2025-10-08T19:46:47.23Z" }, + { url = "https://files.pythonhosted.org/packages/0a/b6/5c9a0e42df4d00bfb4a3cbbe5cf9f54260300c88a0e9af1f47ca5ce17ac0/propcache-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f048da1b4f243fc44f205dfd320933a951b8d89e0afd4c7cacc762a8b9165207", size = 47324, upload-time = "2025-10-08T19:46:48.384Z" }, + { url = "https://files.pythonhosted.org/packages/9e/d3/6c7ee328b39a81ee877c962469f1e795f9db87f925251efeb0545e0020d0/propcache-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ec17c65562a827bba85e3872ead335f95405ea1674860d96483a02f5c698fa72", size = 225505, upload-time = "2025-10-08T19:46:50.055Z" }, + { url = "https://files.pythonhosted.org/packages/01/5d/1c53f4563490b1d06a684742cc6076ef944bc6457df6051b7d1a877c057b/propcache-0.4.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:405aac25c6394ef275dee4c709be43745d36674b223ba4eb7144bf4d691b7367", size = 230242, upload-time = "2025-10-08T19:46:51.815Z" }, + { url = "https://files.pythonhosted.org/packages/20/e1/ce4620633b0e2422207c3cb774a0ee61cac13abc6217763a7b9e2e3f4a12/propcache-0.4.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0013cb6f8dde4b2a2f66903b8ba740bdfe378c943c4377a200551ceb27f379e4", size = 238474, upload-time = "2025-10-08T19:46:53.208Z" }, + { url = "https://files.pythonhosted.org/packages/46/4b/3aae6835b8e5f44ea6a68348ad90f78134047b503765087be2f9912140ea/propcache-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15932ab57837c3368b024473a525e25d316d8353016e7cc0e5ba9eb343fbb1cf", size = 221575, upload-time = "2025-10-08T19:46:54.511Z" }, + { url = "https://files.pythonhosted.org/packages/6e/a5/8a5e8678bcc9d3a1a15b9a29165640d64762d424a16af543f00629c87338/propcache-0.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:031dce78b9dc099f4c29785d9cf5577a3faf9ebf74ecbd3c856a7b92768c3df3", size = 216736, upload-time = "2025-10-08T19:46:56.212Z" }, + { url = "https://files.pythonhosted.org/packages/f1/63/b7b215eddeac83ca1c6b934f89d09a625aa9ee4ba158338854c87210cc36/propcache-0.4.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:ab08df6c9a035bee56e31af99be621526bd237bea9f32def431c656b29e41778", size = 213019, upload-time = "2025-10-08T19:46:57.595Z" }, + { url = "https://files.pythonhosted.org/packages/57/74/f580099a58c8af587cac7ba19ee7cb418506342fbbe2d4a4401661cca886/propcache-0.4.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4d7af63f9f93fe593afbf104c21b3b15868efb2c21d07d8732c0c4287e66b6a6", size = 220376, upload-time = "2025-10-08T19:46:59.067Z" }, + { url = "https://files.pythonhosted.org/packages/c4/ee/542f1313aff7eaf19c2bb758c5d0560d2683dac001a1c96d0774af799843/propcache-0.4.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cfc27c945f422e8b5071b6e93169679e4eb5bf73bbcbf1ba3ae3a83d2f78ebd9", size = 226988, upload-time = "2025-10-08T19:47:00.544Z" }, + { url = "https://files.pythonhosted.org/packages/8f/18/9c6b015dd9c6930f6ce2229e1f02fb35298b847f2087ea2b436a5bfa7287/propcache-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:35c3277624a080cc6ec6f847cbbbb5b49affa3598c4535a0a4682a697aaa5c75", size = 215615, upload-time = "2025-10-08T19:47:01.968Z" }, + { url = "https://files.pythonhosted.org/packages/80/9e/e7b85720b98c45a45e1fca6a177024934dc9bc5f4d5dd04207f216fc33ed/propcache-0.4.1-cp312-cp312-win32.whl", hash = "sha256:671538c2262dadb5ba6395e26c1731e1d52534bfe9ae56d0b5573ce539266aa8", size = 38066, upload-time = "2025-10-08T19:47:03.503Z" }, + { url = "https://files.pythonhosted.org/packages/54/09/d19cff2a5aaac632ec8fc03737b223597b1e347416934c1b3a7df079784c/propcache-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:cb2d222e72399fcf5890d1d5cc1060857b9b236adff2792ff48ca2dfd46c81db", size = 41655, upload-time = "2025-10-08T19:47:04.973Z" }, + { url = "https://files.pythonhosted.org/packages/68/ab/6b5c191bb5de08036a8c697b265d4ca76148efb10fa162f14af14fb5f076/propcache-0.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:204483131fb222bdaaeeea9f9e6c6ed0cac32731f75dfc1d4a567fc1926477c1", size = 37789, upload-time = "2025-10-08T19:47:06.077Z" }, + { url = "https://files.pythonhosted.org/packages/bf/df/6d9c1b6ac12b003837dde8a10231a7344512186e87b36e855bef32241942/propcache-0.4.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:43eedf29202c08550aac1d14e0ee619b0430aaef78f85864c1a892294fbc28cf", size = 77750, upload-time = "2025-10-08T19:47:07.648Z" }, + { url = "https://files.pythonhosted.org/packages/8b/e8/677a0025e8a2acf07d3418a2e7ba529c9c33caf09d3c1f25513023c1db56/propcache-0.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d62cdfcfd89ccb8de04e0eda998535c406bf5e060ffd56be6c586cbcc05b3311", size = 44780, upload-time = "2025-10-08T19:47:08.851Z" }, + { url = "https://files.pythonhosted.org/packages/89/a4/92380f7ca60f99ebae761936bc48a72a639e8a47b29050615eef757cb2a7/propcache-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:cae65ad55793da34db5f54e4029b89d3b9b9490d8abe1b4c7ab5d4b8ec7ebf74", size = 46308, upload-time = "2025-10-08T19:47:09.982Z" }, + { url = "https://files.pythonhosted.org/packages/2d/48/c5ac64dee5262044348d1d78a5f85dd1a57464a60d30daee946699963eb3/propcache-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:333ddb9031d2704a301ee3e506dc46b1fe5f294ec198ed6435ad5b6a085facfe", size = 208182, upload-time = "2025-10-08T19:47:11.319Z" }, + { url = "https://files.pythonhosted.org/packages/c6/0c/cd762dd011a9287389a6a3eb43aa30207bde253610cca06824aeabfe9653/propcache-0.4.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd0858c20f078a32cf55f7e81473d96dcf3b93fd2ccdb3d40fdf54b8573df3af", size = 211215, upload-time = "2025-10-08T19:47:13.146Z" }, + { url = "https://files.pythonhosted.org/packages/30/3e/49861e90233ba36890ae0ca4c660e95df565b2cd15d4a68556ab5865974e/propcache-0.4.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:678ae89ebc632c5c204c794f8dab2837c5f159aeb59e6ed0539500400577298c", size = 218112, upload-time = "2025-10-08T19:47:14.913Z" }, + { url = "https://files.pythonhosted.org/packages/f1/8b/544bc867e24e1bd48f3118cecd3b05c694e160a168478fa28770f22fd094/propcache-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d472aeb4fbf9865e0c6d622d7f4d54a4e101a89715d8904282bb5f9a2f476c3f", size = 204442, upload-time = "2025-10-08T19:47:16.277Z" }, + { url = "https://files.pythonhosted.org/packages/50/a6/4282772fd016a76d3e5c0df58380a5ea64900afd836cec2c2f662d1b9bb3/propcache-0.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4d3df5fa7e36b3225954fba85589da77a0fe6a53e3976de39caf04a0db4c36f1", size = 199398, upload-time = "2025-10-08T19:47:17.962Z" }, + { url = "https://files.pythonhosted.org/packages/3e/ec/d8a7cd406ee1ddb705db2139f8a10a8a427100347bd698e7014351c7af09/propcache-0.4.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:ee17f18d2498f2673e432faaa71698032b0127ebf23ae5974eeaf806c279df24", size = 196920, upload-time = "2025-10-08T19:47:19.355Z" }, + { url = "https://files.pythonhosted.org/packages/f6/6c/f38ab64af3764f431e359f8baf9e0a21013e24329e8b85d2da32e8ed07ca/propcache-0.4.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:580e97762b950f993ae618e167e7be9256b8353c2dcd8b99ec100eb50f5286aa", size = 203748, upload-time = "2025-10-08T19:47:21.338Z" }, + { url = "https://files.pythonhosted.org/packages/d6/e3/fa846bd70f6534d647886621388f0a265254d30e3ce47e5c8e6e27dbf153/propcache-0.4.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:501d20b891688eb8e7aa903021f0b72d5a55db40ffaab27edefd1027caaafa61", size = 205877, upload-time = "2025-10-08T19:47:23.059Z" }, + { url = "https://files.pythonhosted.org/packages/e2/39/8163fc6f3133fea7b5f2827e8eba2029a0277ab2c5beee6c1db7b10fc23d/propcache-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a0bd56e5b100aef69bd8562b74b46254e7c8812918d3baa700c8a8009b0af66", size = 199437, upload-time = "2025-10-08T19:47:24.445Z" }, + { url = "https://files.pythonhosted.org/packages/93/89/caa9089970ca49c7c01662bd0eeedfe85494e863e8043565aeb6472ce8fe/propcache-0.4.1-cp313-cp313-win32.whl", hash = "sha256:bcc9aaa5d80322bc2fb24bb7accb4a30f81e90ab8d6ba187aec0744bc302ad81", size = 37586, upload-time = "2025-10-08T19:47:25.736Z" }, + { url = "https://files.pythonhosted.org/packages/f5/ab/f76ec3c3627c883215b5c8080debb4394ef5a7a29be811f786415fc1e6fd/propcache-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:381914df18634f5494334d201e98245c0596067504b9372d8cf93f4bb23e025e", size = 40790, upload-time = "2025-10-08T19:47:26.847Z" }, + { url = "https://files.pythonhosted.org/packages/59/1b/e71ae98235f8e2ba5004d8cb19765a74877abf189bc53fc0c80d799e56c3/propcache-0.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:8873eb4460fd55333ea49b7d189749ecf6e55bf85080f11b1c4530ed3034cba1", size = 37158, upload-time = "2025-10-08T19:47:27.961Z" }, + { url = "https://files.pythonhosted.org/packages/83/ce/a31bbdfc24ee0dcbba458c8175ed26089cf109a55bbe7b7640ed2470cfe9/propcache-0.4.1-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:92d1935ee1f8d7442da9c0c4fa7ac20d07e94064184811b685f5c4fada64553b", size = 81451, upload-time = "2025-10-08T19:47:29.445Z" }, + { url = "https://files.pythonhosted.org/packages/25/9c/442a45a470a68456e710d96cacd3573ef26a1d0a60067e6a7d5e655621ed/propcache-0.4.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:473c61b39e1460d386479b9b2f337da492042447c9b685f28be4f74d3529e566", size = 46374, upload-time = "2025-10-08T19:47:30.579Z" }, + { url = "https://files.pythonhosted.org/packages/f4/bf/b1d5e21dbc3b2e889ea4327044fb16312a736d97640fb8b6aa3f9c7b3b65/propcache-0.4.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:c0ef0aaafc66fbd87842a3fe3902fd889825646bc21149eafe47be6072725835", size = 48396, upload-time = "2025-10-08T19:47:31.79Z" }, + { url = "https://files.pythonhosted.org/packages/f4/04/5b4c54a103d480e978d3c8a76073502b18db0c4bc17ab91b3cb5092ad949/propcache-0.4.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95393b4d66bfae908c3ca8d169d5f79cd65636ae15b5e7a4f6e67af675adb0e", size = 275950, upload-time = "2025-10-08T19:47:33.481Z" }, + { url = "https://files.pythonhosted.org/packages/b4/c1/86f846827fb969c4b78b0af79bba1d1ea2156492e1b83dea8b8a6ae27395/propcache-0.4.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c07fda85708bc48578467e85099645167a955ba093be0a2dcba962195676e859", size = 273856, upload-time = "2025-10-08T19:47:34.906Z" }, + { url = "https://files.pythonhosted.org/packages/36/1d/fc272a63c8d3bbad6878c336c7a7dea15e8f2d23a544bda43205dfa83ada/propcache-0.4.1-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:af223b406d6d000830c6f65f1e6431783fc3f713ba3e6cc8c024d5ee96170a4b", size = 280420, upload-time = "2025-10-08T19:47:36.338Z" }, + { url = "https://files.pythonhosted.org/packages/07/0c/01f2219d39f7e53d52e5173bcb09c976609ba30209912a0680adfb8c593a/propcache-0.4.1-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a78372c932c90ee474559c5ddfffd718238e8673c340dc21fe45c5b8b54559a0", size = 263254, upload-time = "2025-10-08T19:47:37.692Z" }, + { url = "https://files.pythonhosted.org/packages/2d/18/cd28081658ce597898f0c4d174d4d0f3c5b6d4dc27ffafeef835c95eb359/propcache-0.4.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:564d9f0d4d9509e1a870c920a89b2fec951b44bf5ba7d537a9e7c1ccec2c18af", size = 261205, upload-time = "2025-10-08T19:47:39.659Z" }, + { url = "https://files.pythonhosted.org/packages/7a/71/1f9e22eb8b8316701c2a19fa1f388c8a3185082607da8e406a803c9b954e/propcache-0.4.1-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:17612831fda0138059cc5546f4d12a2aacfb9e47068c06af35c400ba58ba7393", size = 247873, upload-time = "2025-10-08T19:47:41.084Z" }, + { url = "https://files.pythonhosted.org/packages/4a/65/3d4b61f36af2b4eddba9def857959f1016a51066b4f1ce348e0cf7881f58/propcache-0.4.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:41a89040cb10bd345b3c1a873b2bf36413d48da1def52f268a055f7398514874", size = 262739, upload-time = "2025-10-08T19:47:42.51Z" }, + { url = "https://files.pythonhosted.org/packages/2a/42/26746ab087faa77c1c68079b228810436ccd9a5ce9ac85e2b7307195fd06/propcache-0.4.1-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:e35b88984e7fa64aacecea39236cee32dd9bd8c55f57ba8a75cf2399553f9bd7", size = 263514, upload-time = "2025-10-08T19:47:43.927Z" }, + { url = "https://files.pythonhosted.org/packages/94/13/630690fe201f5502d2403dd3cfd451ed8858fe3c738ee88d095ad2ff407b/propcache-0.4.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f8b465489f927b0df505cbe26ffbeed4d6d8a2bbc61ce90eb074ff129ef0ab1", size = 257781, upload-time = "2025-10-08T19:47:45.448Z" }, + { url = "https://files.pythonhosted.org/packages/92/f7/1d4ec5841505f423469efbfc381d64b7b467438cd5a4bbcbb063f3b73d27/propcache-0.4.1-cp313-cp313t-win32.whl", hash = "sha256:2ad890caa1d928c7c2965b48f3a3815c853180831d0e5503d35cf00c472f4717", size = 41396, upload-time = "2025-10-08T19:47:47.202Z" }, + { url = "https://files.pythonhosted.org/packages/48/f0/615c30622316496d2cbbc29f5985f7777d3ada70f23370608c1d3e081c1f/propcache-0.4.1-cp313-cp313t-win_amd64.whl", hash = "sha256:f7ee0e597f495cf415bcbd3da3caa3bd7e816b74d0d52b8145954c5e6fd3ff37", size = 44897, upload-time = "2025-10-08T19:47:48.336Z" }, + { url = "https://files.pythonhosted.org/packages/fd/ca/6002e46eccbe0e33dcd4069ef32f7f1c9e243736e07adca37ae8c4830ec3/propcache-0.4.1-cp313-cp313t-win_arm64.whl", hash = "sha256:929d7cbe1f01bb7baffb33dc14eb5691c95831450a26354cd210a8155170c93a", size = 39789, upload-time = "2025-10-08T19:47:49.876Z" }, + { url = "https://files.pythonhosted.org/packages/8e/5c/bca52d654a896f831b8256683457ceddd490ec18d9ec50e97dfd8fc726a8/propcache-0.4.1-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3f7124c9d820ba5548d431afb4632301acf965db49e666aa21c305cbe8c6de12", size = 78152, upload-time = "2025-10-08T19:47:51.051Z" }, + { url = "https://files.pythonhosted.org/packages/65/9b/03b04e7d82a5f54fb16113d839f5ea1ede58a61e90edf515f6577c66fa8f/propcache-0.4.1-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:c0d4b719b7da33599dfe3b22d3db1ef789210a0597bc650b7cee9c77c2be8c5c", size = 44869, upload-time = "2025-10-08T19:47:52.594Z" }, + { url = "https://files.pythonhosted.org/packages/b2/fa/89a8ef0468d5833a23fff277b143d0573897cf75bd56670a6d28126c7d68/propcache-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:9f302f4783709a78240ebc311b793f123328716a60911d667e0c036bc5dcbded", size = 46596, upload-time = "2025-10-08T19:47:54.073Z" }, + { url = "https://files.pythonhosted.org/packages/86/bd/47816020d337f4a746edc42fe8d53669965138f39ee117414c7d7a340cfe/propcache-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c80ee5802e3fb9ea37938e7eecc307fb984837091d5fd262bb37238b1ae97641", size = 206981, upload-time = "2025-10-08T19:47:55.715Z" }, + { url = "https://files.pythonhosted.org/packages/df/f6/c5fa1357cc9748510ee55f37173eb31bfde6d94e98ccd9e6f033f2fc06e1/propcache-0.4.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ed5a841e8bb29a55fb8159ed526b26adc5bdd7e8bd7bf793ce647cb08656cdf4", size = 211490, upload-time = "2025-10-08T19:47:57.499Z" }, + { url = "https://files.pythonhosted.org/packages/80/1e/e5889652a7c4a3846683401a48f0f2e5083ce0ec1a8a5221d8058fbd1adf/propcache-0.4.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:55c72fd6ea2da4c318e74ffdf93c4fe4e926051133657459131a95c846d16d44", size = 215371, upload-time = "2025-10-08T19:47:59.317Z" }, + { url = "https://files.pythonhosted.org/packages/b2/f2/889ad4b2408f72fe1a4f6a19491177b30ea7bf1a0fd5f17050ca08cfc882/propcache-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8326e144341460402713f91df60ade3c999d601e7eb5ff8f6f7862d54de0610d", size = 201424, upload-time = "2025-10-08T19:48:00.67Z" }, + { url = "https://files.pythonhosted.org/packages/27/73/033d63069b57b0812c8bd19f311faebeceb6ba31b8f32b73432d12a0b826/propcache-0.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:060b16ae65bc098da7f6d25bf359f1f31f688384858204fe5d652979e0015e5b", size = 197566, upload-time = "2025-10-08T19:48:02.604Z" }, + { url = "https://files.pythonhosted.org/packages/dc/89/ce24f3dc182630b4e07aa6d15f0ff4b14ed4b9955fae95a0b54c58d66c05/propcache-0.4.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:89eb3fa9524f7bec9de6e83cf3faed9d79bffa560672c118a96a171a6f55831e", size = 193130, upload-time = "2025-10-08T19:48:04.499Z" }, + { url = "https://files.pythonhosted.org/packages/a9/24/ef0d5fd1a811fb5c609278d0209c9f10c35f20581fcc16f818da959fc5b4/propcache-0.4.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:dee69d7015dc235f526fe80a9c90d65eb0039103fe565776250881731f06349f", size = 202625, upload-time = "2025-10-08T19:48:06.213Z" }, + { url = "https://files.pythonhosted.org/packages/f5/02/98ec20ff5546f68d673df2f7a69e8c0d076b5abd05ca882dc7ee3a83653d/propcache-0.4.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5558992a00dfd54ccbc64a32726a3357ec93825a418a401f5cc67df0ac5d9e49", size = 204209, upload-time = "2025-10-08T19:48:08.432Z" }, + { url = "https://files.pythonhosted.org/packages/a0/87/492694f76759b15f0467a2a93ab68d32859672b646aa8a04ce4864e7932d/propcache-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c9b822a577f560fbd9554812526831712c1436d2c046cedee4c3796d3543b144", size = 197797, upload-time = "2025-10-08T19:48:09.968Z" }, + { url = "https://files.pythonhosted.org/packages/ee/36/66367de3575db1d2d3f3d177432bd14ee577a39d3f5d1b3d5df8afe3b6e2/propcache-0.4.1-cp314-cp314-win32.whl", hash = "sha256:ab4c29b49d560fe48b696cdcb127dd36e0bc2472548f3bf56cc5cb3da2b2984f", size = 38140, upload-time = "2025-10-08T19:48:11.232Z" }, + { url = "https://files.pythonhosted.org/packages/0c/2a/a758b47de253636e1b8aef181c0b4f4f204bf0dd964914fb2af90a95b49b/propcache-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:5a103c3eb905fcea0ab98be99c3a9a5ab2de60228aa5aceedc614c0281cf6153", size = 41257, upload-time = "2025-10-08T19:48:12.707Z" }, + { url = "https://files.pythonhosted.org/packages/34/5e/63bd5896c3fec12edcbd6f12508d4890d23c265df28c74b175e1ef9f4f3b/propcache-0.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:74c1fb26515153e482e00177a1ad654721bf9207da8a494a0c05e797ad27b992", size = 38097, upload-time = "2025-10-08T19:48:13.923Z" }, + { url = "https://files.pythonhosted.org/packages/99/85/9ff785d787ccf9bbb3f3106f79884a130951436f58392000231b4c737c80/propcache-0.4.1-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:824e908bce90fb2743bd6b59db36eb4f45cd350a39637c9f73b1c1ea66f5b75f", size = 81455, upload-time = "2025-10-08T19:48:15.16Z" }, + { url = "https://files.pythonhosted.org/packages/90/85/2431c10c8e7ddb1445c1f7c4b54d886e8ad20e3c6307e7218f05922cad67/propcache-0.4.1-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:c2b5e7db5328427c57c8e8831abda175421b709672f6cfc3d630c3b7e2146393", size = 46372, upload-time = "2025-10-08T19:48:16.424Z" }, + { url = "https://files.pythonhosted.org/packages/01/20/b0972d902472da9bcb683fa595099911f4d2e86e5683bcc45de60dd05dc3/propcache-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:6f6ff873ed40292cd4969ef5310179afd5db59fdf055897e282485043fc80ad0", size = 48411, upload-time = "2025-10-08T19:48:17.577Z" }, + { url = "https://files.pythonhosted.org/packages/e2/e3/7dc89f4f21e8f99bad3d5ddb3a3389afcf9da4ac69e3deb2dcdc96e74169/propcache-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49a2dc67c154db2c1463013594c458881a069fcf98940e61a0569016a583020a", size = 275712, upload-time = "2025-10-08T19:48:18.901Z" }, + { url = "https://files.pythonhosted.org/packages/20/67/89800c8352489b21a8047c773067644e3897f02ecbbd610f4d46b7f08612/propcache-0.4.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:005f08e6a0529984491e37d8dbc3dd86f84bd78a8ceb5fa9a021f4c48d4984be", size = 273557, upload-time = "2025-10-08T19:48:20.762Z" }, + { url = "https://files.pythonhosted.org/packages/e2/a1/b52b055c766a54ce6d9c16d9aca0cad8059acd9637cdf8aa0222f4a026ef/propcache-0.4.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5c3310452e0d31390da9035c348633b43d7e7feb2e37be252be6da45abd1abcc", size = 280015, upload-time = "2025-10-08T19:48:22.592Z" }, + { url = "https://files.pythonhosted.org/packages/48/c8/33cee30bd890672c63743049f3c9e4be087e6780906bfc3ec58528be59c1/propcache-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4c3c70630930447f9ef1caac7728c8ad1c56bc5015338b20fed0d08ea2480b3a", size = 262880, upload-time = "2025-10-08T19:48:23.947Z" }, + { url = "https://files.pythonhosted.org/packages/0c/b1/8f08a143b204b418285c88b83d00edbd61afbc2c6415ffafc8905da7038b/propcache-0.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8e57061305815dfc910a3634dcf584f08168a8836e6999983569f51a8544cd89", size = 260938, upload-time = "2025-10-08T19:48:25.656Z" }, + { url = "https://files.pythonhosted.org/packages/cf/12/96e4664c82ca2f31e1c8dff86afb867348979eb78d3cb8546a680287a1e9/propcache-0.4.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:521a463429ef54143092c11a77e04056dd00636f72e8c45b70aaa3140d639726", size = 247641, upload-time = "2025-10-08T19:48:27.207Z" }, + { url = "https://files.pythonhosted.org/packages/18/ed/e7a9cfca28133386ba52278136d42209d3125db08d0a6395f0cba0c0285c/propcache-0.4.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:120c964da3fdc75e3731aa392527136d4ad35868cc556fd09bb6d09172d9a367", size = 262510, upload-time = "2025-10-08T19:48:28.65Z" }, + { url = "https://files.pythonhosted.org/packages/f5/76/16d8bf65e8845dd62b4e2b57444ab81f07f40caa5652b8969b87ddcf2ef6/propcache-0.4.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:d8f353eb14ee3441ee844ade4277d560cdd68288838673273b978e3d6d2c8f36", size = 263161, upload-time = "2025-10-08T19:48:30.133Z" }, + { url = "https://files.pythonhosted.org/packages/e7/70/c99e9edb5d91d5ad8a49fa3c1e8285ba64f1476782fed10ab251ff413ba1/propcache-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ab2943be7c652f09638800905ee1bab2c544e537edb57d527997a24c13dc1455", size = 257393, upload-time = "2025-10-08T19:48:31.567Z" }, + { url = "https://files.pythonhosted.org/packages/08/02/87b25304249a35c0915d236575bc3574a323f60b47939a2262b77632a3ee/propcache-0.4.1-cp314-cp314t-win32.whl", hash = "sha256:05674a162469f31358c30bcaa8883cb7829fa3110bf9c0991fe27d7896c42d85", size = 42546, upload-time = "2025-10-08T19:48:32.872Z" }, + { url = "https://files.pythonhosted.org/packages/cb/ef/3c6ecf8b317aa982f309835e8f96987466123c6e596646d4e6a1dfcd080f/propcache-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:990f6b3e2a27d683cb7602ed6c86f15ee6b43b1194736f9baaeb93d0016633b1", size = 46259, upload-time = "2025-10-08T19:48:34.226Z" }, + { url = "https://files.pythonhosted.org/packages/c4/2d/346e946d4951f37eca1e4f55be0f0174c52cd70720f84029b02f296f4a38/propcache-0.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ecef2343af4cc68e05131e45024ba34f6095821988a9d0a02aa7c73fcc448aa9", size = 40428, upload-time = "2025-10-08T19:48:35.441Z" }, + { url = "https://files.pythonhosted.org/packages/5b/5a/bc7b4a4ef808fa59a816c17b20c4bef6884daebbdf627ff2a161da67da19/propcache-0.4.1-py3-none-any.whl", hash = "sha256:af2a6052aeb6cf17d3e46ee169099044fd8224cbaf75c76a2ef596e8163e2237", size = 13305, upload-time = "2025-10-08T19:49:00.792Z" }, +] + [[package]] name = "pyasn1" version = "0.6.1" @@ -1341,6 +2072,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/bf/b273dd11673fed8a6bd46032c0ea2a04b2ac9bfa9c628756a5856ba113b0/ruff-0.11.13-py3-none-win_arm64.whl", hash = "sha256:b4385285e9179d608ff1d2fb9922062663c658605819a6876d8beef0c30b7f3b", size = 10683928, upload-time = "2025-06-05T21:00:13.758Z" }, ] +[[package]] +name = "s3transfer" +version = "0.10.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c0/0a/1cdbabf9edd0ea7747efdf6c9ab4e7061b085aa7f9bfc36bb1601563b069/s3transfer-0.10.4.tar.gz", hash = "sha256:29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7", size = 145287, upload-time = "2024-11-20T21:06:05.981Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/66/05/7957af15543b8c9799209506df4660cba7afc4cf94bfb60513827e96bed6/s3transfer-0.10.4-py3-none-any.whl", hash = "sha256:244a76a24355363a68164241438de1b72f8781664920260c48465896b712a41e", size = 83175, upload-time = "2024-11-20T21:06:03.961Z" }, +] + [[package]] name = "six" version = "1.17.0" @@ -1576,6 +2319,215 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/6f/28/258ebab549c2bf3e64d2b0217b973467394a9cea8c42f70418ca2c5d0d2e/websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec", size = 171598, upload-time = "2026-01-10T09:23:45.395Z" }, ] +[[package]] +name = "wrapt" +version = "1.17.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/95/8f/aeb76c5b46e273670962298c23e7ddde79916cb74db802131d49a85e4b7d/wrapt-1.17.3.tar.gz", hash = "sha256:f66eb08feaa410fe4eebd17f2a2c8e2e46d3476e9f8c783daa8e09e0faa666d0", size = 55547, upload-time = "2025-08-12T05:53:21.714Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3f/23/bb82321b86411eb51e5a5db3fb8f8032fd30bd7c2d74bfe936136b2fa1d6/wrapt-1.17.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88bbae4d40d5a46142e70d58bf664a89b6b4befaea7b2ecc14e03cedb8e06c04", size = 53482, upload-time = "2025-08-12T05:51:44.467Z" }, + { url = "https://files.pythonhosted.org/packages/45/69/f3c47642b79485a30a59c63f6d739ed779fb4cc8323205d047d741d55220/wrapt-1.17.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6b13af258d6a9ad602d57d889f83b9d5543acd471eee12eb51f5b01f8eb1bc2", size = 38676, upload-time = "2025-08-12T05:51:32.636Z" }, + { url = "https://files.pythonhosted.org/packages/d1/71/e7e7f5670c1eafd9e990438e69d8fb46fa91a50785332e06b560c869454f/wrapt-1.17.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd341868a4b6714a5962c1af0bd44f7c404ef78720c7de4892901e540417111c", size = 38957, upload-time = "2025-08-12T05:51:54.655Z" }, + { url = "https://files.pythonhosted.org/packages/de/17/9f8f86755c191d6779d7ddead1a53c7a8aa18bccb7cea8e7e72dfa6a8a09/wrapt-1.17.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f9b2601381be482f70e5d1051a5965c25fb3625455a2bf520b5a077b22afb775", size = 81975, upload-time = "2025-08-12T05:52:30.109Z" }, + { url = "https://files.pythonhosted.org/packages/f2/15/dd576273491f9f43dd09fce517f6c2ce6eb4fe21681726068db0d0467096/wrapt-1.17.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:343e44b2a8e60e06a7e0d29c1671a0d9951f59174f3709962b5143f60a2a98bd", size = 83149, upload-time = "2025-08-12T05:52:09.316Z" }, + { url = "https://files.pythonhosted.org/packages/0c/c4/5eb4ce0d4814521fee7aa806264bf7a114e748ad05110441cd5b8a5c744b/wrapt-1.17.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:33486899acd2d7d3066156b03465b949da3fd41a5da6e394ec49d271baefcf05", size = 82209, upload-time = "2025-08-12T05:52:10.331Z" }, + { url = "https://files.pythonhosted.org/packages/31/4b/819e9e0eb5c8dc86f60dfc42aa4e2c0d6c3db8732bce93cc752e604bb5f5/wrapt-1.17.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e6f40a8aa5a92f150bdb3e1c44b7e98fb7113955b2e5394122fa5532fec4b418", size = 81551, upload-time = "2025-08-12T05:52:31.137Z" }, + { url = "https://files.pythonhosted.org/packages/f8/83/ed6baf89ba3a56694700139698cf703aac9f0f9eb03dab92f57551bd5385/wrapt-1.17.3-cp310-cp310-win32.whl", hash = "sha256:a36692b8491d30a8c75f1dfee65bef119d6f39ea84ee04d9f9311f83c5ad9390", size = 36464, upload-time = "2025-08-12T05:53:01.204Z" }, + { url = "https://files.pythonhosted.org/packages/2f/90/ee61d36862340ad7e9d15a02529df6b948676b9a5829fd5e16640156627d/wrapt-1.17.3-cp310-cp310-win_amd64.whl", hash = "sha256:afd964fd43b10c12213574db492cb8f73b2f0826c8df07a68288f8f19af2ebe6", size = 38748, upload-time = "2025-08-12T05:53:00.209Z" }, + { url = "https://files.pythonhosted.org/packages/bd/c3/cefe0bd330d389c9983ced15d326f45373f4073c9f4a8c2f99b50bfea329/wrapt-1.17.3-cp310-cp310-win_arm64.whl", hash = "sha256:af338aa93554be859173c39c85243970dc6a289fa907402289eeae7543e1ae18", size = 36810, upload-time = "2025-08-12T05:52:51.906Z" }, + { url = "https://files.pythonhosted.org/packages/52/db/00e2a219213856074a213503fdac0511203dceefff26e1daa15250cc01a0/wrapt-1.17.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:273a736c4645e63ac582c60a56b0acb529ef07f78e08dc6bfadf6a46b19c0da7", size = 53482, upload-time = "2025-08-12T05:51:45.79Z" }, + { url = "https://files.pythonhosted.org/packages/5e/30/ca3c4a5eba478408572096fe9ce36e6e915994dd26a4e9e98b4f729c06d9/wrapt-1.17.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5531d911795e3f935a9c23eb1c8c03c211661a5060aab167065896bbf62a5f85", size = 38674, upload-time = "2025-08-12T05:51:34.629Z" }, + { url = "https://files.pythonhosted.org/packages/31/25/3e8cc2c46b5329c5957cec959cb76a10718e1a513309c31399a4dad07eb3/wrapt-1.17.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0610b46293c59a3adbae3dee552b648b984176f8562ee0dba099a56cfbe4df1f", size = 38959, upload-time = "2025-08-12T05:51:56.074Z" }, + { url = "https://files.pythonhosted.org/packages/5d/8f/a32a99fc03e4b37e31b57cb9cefc65050ea08147a8ce12f288616b05ef54/wrapt-1.17.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b32888aad8b6e68f83a8fdccbf3165f5469702a7544472bdf41f582970ed3311", size = 82376, upload-time = "2025-08-12T05:52:32.134Z" }, + { url = "https://files.pythonhosted.org/packages/31/57/4930cb8d9d70d59c27ee1332a318c20291749b4fba31f113c2f8ac49a72e/wrapt-1.17.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8cccf4f81371f257440c88faed6b74f1053eef90807b77e31ca057b2db74edb1", size = 83604, upload-time = "2025-08-12T05:52:11.663Z" }, + { url = "https://files.pythonhosted.org/packages/a8/f3/1afd48de81d63dd66e01b263a6fbb86e1b5053b419b9b33d13e1f6d0f7d0/wrapt-1.17.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8a210b158a34164de8bb68b0e7780041a903d7b00c87e906fb69928bf7890d5", size = 82782, upload-time = "2025-08-12T05:52:12.626Z" }, + { url = "https://files.pythonhosted.org/packages/1e/d7/4ad5327612173b144998232f98a85bb24b60c352afb73bc48e3e0d2bdc4e/wrapt-1.17.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:79573c24a46ce11aab457b472efd8d125e5a51da2d1d24387666cd85f54c05b2", size = 82076, upload-time = "2025-08-12T05:52:33.168Z" }, + { url = "https://files.pythonhosted.org/packages/bb/59/e0adfc831674a65694f18ea6dc821f9fcb9ec82c2ce7e3d73a88ba2e8718/wrapt-1.17.3-cp311-cp311-win32.whl", hash = "sha256:c31eebe420a9a5d2887b13000b043ff6ca27c452a9a22fa71f35f118e8d4bf89", size = 36457, upload-time = "2025-08-12T05:53:03.936Z" }, + { url = "https://files.pythonhosted.org/packages/83/88/16b7231ba49861b6f75fc309b11012ede4d6b0a9c90969d9e0db8d991aeb/wrapt-1.17.3-cp311-cp311-win_amd64.whl", hash = "sha256:0b1831115c97f0663cb77aa27d381237e73ad4f721391a9bfb2fe8bc25fa6e77", size = 38745, upload-time = "2025-08-12T05:53:02.885Z" }, + { url = "https://files.pythonhosted.org/packages/9a/1e/c4d4f3398ec073012c51d1c8d87f715f56765444e1a4b11e5180577b7e6e/wrapt-1.17.3-cp311-cp311-win_arm64.whl", hash = "sha256:5a7b3c1ee8265eb4c8f1b7d29943f195c00673f5ab60c192eba2d4a7eae5f46a", size = 36806, upload-time = "2025-08-12T05:52:53.368Z" }, + { url = "https://files.pythonhosted.org/packages/9f/41/cad1aba93e752f1f9268c77270da3c469883d56e2798e7df6240dcb2287b/wrapt-1.17.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ab232e7fdb44cdfbf55fc3afa31bcdb0d8980b9b95c38b6405df2acb672af0e0", size = 53998, upload-time = "2025-08-12T05:51:47.138Z" }, + { url = "https://files.pythonhosted.org/packages/60/f8/096a7cc13097a1869fe44efe68dace40d2a16ecb853141394047f0780b96/wrapt-1.17.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:9baa544e6acc91130e926e8c802a17f3b16fbea0fd441b5a60f5cf2cc5c3deba", size = 39020, upload-time = "2025-08-12T05:51:35.906Z" }, + { url = "https://files.pythonhosted.org/packages/33/df/bdf864b8997aab4febb96a9ae5c124f700a5abd9b5e13d2a3214ec4be705/wrapt-1.17.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6b538e31eca1a7ea4605e44f81a48aa24c4632a277431a6ed3f328835901f4fd", size = 39098, upload-time = "2025-08-12T05:51:57.474Z" }, + { url = "https://files.pythonhosted.org/packages/9f/81/5d931d78d0eb732b95dc3ddaeeb71c8bb572fb01356e9133916cd729ecdd/wrapt-1.17.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:042ec3bb8f319c147b1301f2393bc19dba6e176b7da446853406d041c36c7828", size = 88036, upload-time = "2025-08-12T05:52:34.784Z" }, + { url = "https://files.pythonhosted.org/packages/ca/38/2e1785df03b3d72d34fc6252d91d9d12dc27a5c89caef3335a1bbb8908ca/wrapt-1.17.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3af60380ba0b7b5aeb329bc4e402acd25bd877e98b3727b0135cb5c2efdaefe9", size = 88156, upload-time = "2025-08-12T05:52:13.599Z" }, + { url = "https://files.pythonhosted.org/packages/b3/8b/48cdb60fe0603e34e05cffda0b2a4adab81fd43718e11111a4b0100fd7c1/wrapt-1.17.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0b02e424deef65c9f7326d8c19220a2c9040c51dc165cddb732f16198c168396", size = 87102, upload-time = "2025-08-12T05:52:14.56Z" }, + { url = "https://files.pythonhosted.org/packages/3c/51/d81abca783b58f40a154f1b2c56db1d2d9e0d04fa2d4224e357529f57a57/wrapt-1.17.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:74afa28374a3c3a11b3b5e5fca0ae03bef8450d6aa3ab3a1e2c30e3a75d023dc", size = 87732, upload-time = "2025-08-12T05:52:36.165Z" }, + { url = "https://files.pythonhosted.org/packages/9e/b1/43b286ca1392a006d5336412d41663eeef1ad57485f3e52c767376ba7e5a/wrapt-1.17.3-cp312-cp312-win32.whl", hash = "sha256:4da9f45279fff3543c371d5ababc57a0384f70be244de7759c85a7f989cb4ebe", size = 36705, upload-time = "2025-08-12T05:53:07.123Z" }, + { url = "https://files.pythonhosted.org/packages/28/de/49493f962bd3c586ab4b88066e967aa2e0703d6ef2c43aa28cb83bf7b507/wrapt-1.17.3-cp312-cp312-win_amd64.whl", hash = "sha256:e71d5c6ebac14875668a1e90baf2ea0ef5b7ac7918355850c0908ae82bcb297c", size = 38877, upload-time = "2025-08-12T05:53:05.436Z" }, + { url = "https://files.pythonhosted.org/packages/f1/48/0f7102fe9cb1e8a5a77f80d4f0956d62d97034bbe88d33e94699f99d181d/wrapt-1.17.3-cp312-cp312-win_arm64.whl", hash = "sha256:604d076c55e2fdd4c1c03d06dc1a31b95130010517b5019db15365ec4a405fc6", size = 36885, upload-time = "2025-08-12T05:52:54.367Z" }, + { url = "https://files.pythonhosted.org/packages/fc/f6/759ece88472157acb55fc195e5b116e06730f1b651b5b314c66291729193/wrapt-1.17.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a47681378a0439215912ef542c45a783484d4dd82bac412b71e59cf9c0e1cea0", size = 54003, upload-time = "2025-08-12T05:51:48.627Z" }, + { url = "https://files.pythonhosted.org/packages/4f/a9/49940b9dc6d47027dc850c116d79b4155f15c08547d04db0f07121499347/wrapt-1.17.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:54a30837587c6ee3cd1a4d1c2ec5d24e77984d44e2f34547e2323ddb4e22eb77", size = 39025, upload-time = "2025-08-12T05:51:37.156Z" }, + { url = "https://files.pythonhosted.org/packages/45/35/6a08de0f2c96dcdd7fe464d7420ddb9a7655a6561150e5fc4da9356aeaab/wrapt-1.17.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:16ecf15d6af39246fe33e507105d67e4b81d8f8d2c6598ff7e3ca1b8a37213f7", size = 39108, upload-time = "2025-08-12T05:51:58.425Z" }, + { url = "https://files.pythonhosted.org/packages/0c/37/6faf15cfa41bf1f3dba80cd3f5ccc6622dfccb660ab26ed79f0178c7497f/wrapt-1.17.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6fd1ad24dc235e4ab88cda009e19bf347aabb975e44fd5c2fb22a3f6e4141277", size = 88072, upload-time = "2025-08-12T05:52:37.53Z" }, + { url = "https://files.pythonhosted.org/packages/78/f2/efe19ada4a38e4e15b6dff39c3e3f3f73f5decf901f66e6f72fe79623a06/wrapt-1.17.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ed61b7c2d49cee3c027372df5809a59d60cf1b6c2f81ee980a091f3afed6a2d", size = 88214, upload-time = "2025-08-12T05:52:15.886Z" }, + { url = "https://files.pythonhosted.org/packages/40/90/ca86701e9de1622b16e09689fc24b76f69b06bb0150990f6f4e8b0eeb576/wrapt-1.17.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:423ed5420ad5f5529db9ce89eac09c8a2f97da18eb1c870237e84c5a5c2d60aa", size = 87105, upload-time = "2025-08-12T05:52:17.914Z" }, + { url = "https://files.pythonhosted.org/packages/fd/e0/d10bd257c9a3e15cbf5523025252cc14d77468e8ed644aafb2d6f54cb95d/wrapt-1.17.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e01375f275f010fcbf7f643b4279896d04e571889b8a5b3f848423d91bf07050", size = 87766, upload-time = "2025-08-12T05:52:39.243Z" }, + { url = "https://files.pythonhosted.org/packages/e8/cf/7d848740203c7b4b27eb55dbfede11aca974a51c3d894f6cc4b865f42f58/wrapt-1.17.3-cp313-cp313-win32.whl", hash = "sha256:53e5e39ff71b3fc484df8a522c933ea2b7cdd0d5d15ae82e5b23fde87d44cbd8", size = 36711, upload-time = "2025-08-12T05:53:10.074Z" }, + { url = "https://files.pythonhosted.org/packages/57/54/35a84d0a4d23ea675994104e667ceff49227ce473ba6a59ba2c84f250b74/wrapt-1.17.3-cp313-cp313-win_amd64.whl", hash = "sha256:1f0b2f40cf341ee8cc1a97d51ff50dddb9fcc73241b9143ec74b30fc4f44f6cb", size = 38885, upload-time = "2025-08-12T05:53:08.695Z" }, + { url = "https://files.pythonhosted.org/packages/01/77/66e54407c59d7b02a3c4e0af3783168fff8e5d61def52cda8728439d86bc/wrapt-1.17.3-cp313-cp313-win_arm64.whl", hash = "sha256:7425ac3c54430f5fc5e7b6f41d41e704db073309acfc09305816bc6a0b26bb16", size = 36896, upload-time = "2025-08-12T05:52:55.34Z" }, + { url = "https://files.pythonhosted.org/packages/02/a2/cd864b2a14f20d14f4c496fab97802001560f9f41554eef6df201cd7f76c/wrapt-1.17.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cf30f6e3c077c8e6a9a7809c94551203c8843e74ba0c960f4a98cd80d4665d39", size = 54132, upload-time = "2025-08-12T05:51:49.864Z" }, + { url = "https://files.pythonhosted.org/packages/d5/46/d011725b0c89e853dc44cceb738a307cde5d240d023d6d40a82d1b4e1182/wrapt-1.17.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:e228514a06843cae89621384cfe3a80418f3c04aadf8a3b14e46a7be704e4235", size = 39091, upload-time = "2025-08-12T05:51:38.935Z" }, + { url = "https://files.pythonhosted.org/packages/2e/9e/3ad852d77c35aae7ddebdbc3b6d35ec8013af7d7dddad0ad911f3d891dae/wrapt-1.17.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:5ea5eb3c0c071862997d6f3e02af1d055f381b1d25b286b9d6644b79db77657c", size = 39172, upload-time = "2025-08-12T05:51:59.365Z" }, + { url = "https://files.pythonhosted.org/packages/c3/f7/c983d2762bcce2326c317c26a6a1e7016f7eb039c27cdf5c4e30f4160f31/wrapt-1.17.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:281262213373b6d5e4bb4353bc36d1ba4084e6d6b5d242863721ef2bf2c2930b", size = 87163, upload-time = "2025-08-12T05:52:40.965Z" }, + { url = "https://files.pythonhosted.org/packages/e4/0f/f673f75d489c7f22d17fe0193e84b41540d962f75fce579cf6873167c29b/wrapt-1.17.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dc4a8d2b25efb6681ecacad42fca8859f88092d8732b170de6a5dddd80a1c8fa", size = 87963, upload-time = "2025-08-12T05:52:20.326Z" }, + { url = "https://files.pythonhosted.org/packages/df/61/515ad6caca68995da2fac7a6af97faab8f78ebe3bf4f761e1b77efbc47b5/wrapt-1.17.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:373342dd05b1d07d752cecbec0c41817231f29f3a89aa8b8843f7b95992ed0c7", size = 86945, upload-time = "2025-08-12T05:52:21.581Z" }, + { url = "https://files.pythonhosted.org/packages/d3/bd/4e70162ce398462a467bc09e768bee112f1412e563620adc353de9055d33/wrapt-1.17.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d40770d7c0fd5cbed9d84b2c3f2e156431a12c9a37dc6284060fb4bec0b7ffd4", size = 86857, upload-time = "2025-08-12T05:52:43.043Z" }, + { url = "https://files.pythonhosted.org/packages/2b/b8/da8560695e9284810b8d3df8a19396a6e40e7518059584a1a394a2b35e0a/wrapt-1.17.3-cp314-cp314-win32.whl", hash = "sha256:fbd3c8319de8e1dc79d346929cd71d523622da527cca14e0c1d257e31c2b8b10", size = 37178, upload-time = "2025-08-12T05:53:12.605Z" }, + { url = "https://files.pythonhosted.org/packages/db/c8/b71eeb192c440d67a5a0449aaee2310a1a1e8eca41676046f99ed2487e9f/wrapt-1.17.3-cp314-cp314-win_amd64.whl", hash = "sha256:e1a4120ae5705f673727d3253de3ed0e016f7cd78dc463db1b31e2463e1f3cf6", size = 39310, upload-time = "2025-08-12T05:53:11.106Z" }, + { url = "https://files.pythonhosted.org/packages/45/20/2cda20fd4865fa40f86f6c46ed37a2a8356a7a2fde0773269311f2af56c7/wrapt-1.17.3-cp314-cp314-win_arm64.whl", hash = "sha256:507553480670cab08a800b9463bdb881b2edeed77dc677b0a5915e6106e91a58", size = 37266, upload-time = "2025-08-12T05:52:56.531Z" }, + { url = "https://files.pythonhosted.org/packages/77/ed/dd5cf21aec36c80443c6f900449260b80e2a65cf963668eaef3b9accce36/wrapt-1.17.3-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:ed7c635ae45cfbc1a7371f708727bf74690daedc49b4dba310590ca0bd28aa8a", size = 56544, upload-time = "2025-08-12T05:51:51.109Z" }, + { url = "https://files.pythonhosted.org/packages/8d/96/450c651cc753877ad100c7949ab4d2e2ecc4d97157e00fa8f45df682456a/wrapt-1.17.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:249f88ed15503f6492a71f01442abddd73856a0032ae860de6d75ca62eed8067", size = 40283, upload-time = "2025-08-12T05:51:39.912Z" }, + { url = "https://files.pythonhosted.org/packages/d1/86/2fcad95994d9b572db57632acb6f900695a648c3e063f2cd344b3f5c5a37/wrapt-1.17.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a03a38adec8066d5a37bea22f2ba6bbf39fcdefbe2d91419ab864c3fb515454", size = 40366, upload-time = "2025-08-12T05:52:00.693Z" }, + { url = "https://files.pythonhosted.org/packages/64/0e/f4472f2fdde2d4617975144311f8800ef73677a159be7fe61fa50997d6c0/wrapt-1.17.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:5d4478d72eb61c36e5b446e375bbc49ed002430d17cdec3cecb36993398e1a9e", size = 108571, upload-time = "2025-08-12T05:52:44.521Z" }, + { url = "https://files.pythonhosted.org/packages/cc/01/9b85a99996b0a97c8a17484684f206cbb6ba73c1ce6890ac668bcf3838fb/wrapt-1.17.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:223db574bb38637e8230eb14b185565023ab624474df94d2af18f1cdb625216f", size = 113094, upload-time = "2025-08-12T05:52:22.618Z" }, + { url = "https://files.pythonhosted.org/packages/25/02/78926c1efddcc7b3aa0bc3d6b33a822f7d898059f7cd9ace8c8318e559ef/wrapt-1.17.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e405adefb53a435f01efa7ccdec012c016b5a1d3f35459990afc39b6be4d5056", size = 110659, upload-time = "2025-08-12T05:52:24.057Z" }, + { url = "https://files.pythonhosted.org/packages/dc/ee/c414501ad518ac3e6fe184753632fe5e5ecacdcf0effc23f31c1e4f7bfcf/wrapt-1.17.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:88547535b787a6c9ce4086917b6e1d291aa8ed914fdd3a838b3539dc95c12804", size = 106946, upload-time = "2025-08-12T05:52:45.976Z" }, + { url = "https://files.pythonhosted.org/packages/be/44/a1bd64b723d13bb151d6cc91b986146a1952385e0392a78567e12149c7b4/wrapt-1.17.3-cp314-cp314t-win32.whl", hash = "sha256:41b1d2bc74c2cac6f9074df52b2efbef2b30bdfe5f40cb78f8ca22963bc62977", size = 38717, upload-time = "2025-08-12T05:53:15.214Z" }, + { url = "https://files.pythonhosted.org/packages/79/d9/7cfd5a312760ac4dd8bf0184a6ee9e43c33e47f3dadc303032ce012b8fa3/wrapt-1.17.3-cp314-cp314t-win_amd64.whl", hash = "sha256:73d496de46cd2cdbdbcce4ae4bcdb4afb6a11234a1df9c085249d55166b95116", size = 41334, upload-time = "2025-08-12T05:53:14.178Z" }, + { url = "https://files.pythonhosted.org/packages/46/78/10ad9781128ed2f99dbc474f43283b13fea8ba58723e98844367531c18e9/wrapt-1.17.3-cp314-cp314t-win_arm64.whl", hash = "sha256:f38e60678850c42461d4202739f9bf1e3a737c7ad283638251e79cc49effb6b6", size = 38471, upload-time = "2025-08-12T05:52:57.784Z" }, + { url = "https://files.pythonhosted.org/packages/1f/f6/a933bd70f98e9cf3e08167fc5cd7aaaca49147e48411c0bd5ae701bb2194/wrapt-1.17.3-py3-none-any.whl", hash = "sha256:7171ae35d2c33d326ac19dd8facb1e82e5fd04ef8c6c0e394d7af55a55051c22", size = 23591, upload-time = "2025-08-12T05:53:20.674Z" }, +] + +[[package]] +name = "yarl" +version = "1.23.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "multidict" }, + { name = "propcache" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/23/6e/beb1beec874a72f23815c1434518bfc4ed2175065173fb138c3705f658d4/yarl-1.23.0.tar.gz", hash = "sha256:53b1ea6ca88ebd4420379c330aea57e258408dd0df9af0992e5de2078dc9f5d5", size = 194676, upload-time = "2026-03-01T22:07:53.373Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8b/0d/9cc638702f6fc3c7a3685bcc8cf2a9ed7d6206e932a49f5242658047ef51/yarl-1.23.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cff6d44cb13d39db2663a22b22305d10855efa0fa8015ddeacc40bc59b9d8107", size = 123764, upload-time = "2026-03-01T22:04:09.7Z" }, + { url = "https://files.pythonhosted.org/packages/7a/35/5a553687c5793df5429cd1db45909d4f3af7eee90014888c208d086a44f0/yarl-1.23.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e4c53f8347cd4200f0d70a48ad059cabaf24f5adc6ba08622a23423bc7efa10d", size = 86282, upload-time = "2026-03-01T22:04:11.892Z" }, + { url = "https://files.pythonhosted.org/packages/68/2e/c5a2234238f8ce37a8312b52801ee74117f576b1539eec8404a480434acc/yarl-1.23.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a6940a074fb3c48356ed0158a3ca5699c955ee4185b4d7d619be3c327143e05", size = 86053, upload-time = "2026-03-01T22:04:13.292Z" }, + { url = "https://files.pythonhosted.org/packages/74/3f/bbd8ff36fb038622797ffbaf7db314918bb4d76f1cc8a4f9ca7a55fe5195/yarl-1.23.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ed5f69ce7be7902e5c70ea19eb72d20abf7d725ab5d49777d696e32d4fc1811d", size = 99395, upload-time = "2026-03-01T22:04:15.133Z" }, + { url = "https://files.pythonhosted.org/packages/77/04/9516bc4e269d2a3ec9c6779fcdeac51ce5b3a9b0156f06ac7152e5bba864/yarl-1.23.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:389871e65468400d6283c0308e791a640b5ab5c83bcee02a2f51295f95e09748", size = 92143, upload-time = "2026-03-01T22:04:16.829Z" }, + { url = "https://files.pythonhosted.org/packages/c7/63/88802d1f6b1cb1fc67d67a58cd0cf8a1790de4ce7946e434240f1d60ab4a/yarl-1.23.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dda608c88cf709b1d406bdfcd84d8d63cff7c9e577a403c6108ce8ce9dcc8764", size = 107643, upload-time = "2026-03-01T22:04:18.519Z" }, + { url = "https://files.pythonhosted.org/packages/8e/db/4f9b838f4d8bdd6f0f385aed8bbf21c71ed11a0b9983305c302cbd557815/yarl-1.23.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8c4fe09e0780c6c3bf2b7d4af02ee2394439d11a523bbcf095cf4747c2932007", size = 108700, upload-time = "2026-03-01T22:04:20.373Z" }, + { url = "https://files.pythonhosted.org/packages/50/12/95a1d33f04a79c402664070d43b8b9f72dc18914e135b345b611b0b1f8cc/yarl-1.23.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:31c9921eb8bd12633b41ad27686bbb0b1a2a9b8452bfdf221e34f311e9942ed4", size = 102769, upload-time = "2026-03-01T22:04:23.055Z" }, + { url = "https://files.pythonhosted.org/packages/86/65/91a0285f51321369fd1a8308aa19207520c5f0587772cfc2e03fc2467e90/yarl-1.23.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5f10fd85e4b75967468af655228fbfd212bdf66db1c0d135065ce288982eda26", size = 101114, upload-time = "2026-03-01T22:04:25.031Z" }, + { url = "https://files.pythonhosted.org/packages/58/80/c7c8244fc3e5bc483dc71a09560f43b619fab29301a0f0a8f936e42865c7/yarl-1.23.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:dbf507e9ef5688bada447a24d68b4b58dd389ba93b7afc065a2ba892bea54769", size = 98883, upload-time = "2026-03-01T22:04:27.281Z" }, + { url = "https://files.pythonhosted.org/packages/86/e7/71ca9cc9ca79c0b7d491216177d1aed559d632947b8ffb0ee60f7d8b23e3/yarl-1.23.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:85e9beda1f591bc73e77ea1c51965c68e98dafd0fec72cdd745f77d727466716", size = 94172, upload-time = "2026-03-01T22:04:28.554Z" }, + { url = "https://files.pythonhosted.org/packages/6a/3f/6c6c8a0fe29c26fb2db2e8d32195bb84ec1bfb8f1d32e7f73b787fcf349b/yarl-1.23.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:0e1fdaa14ef51366d7757b45bde294e95f6c8c049194e793eedb8387c86d5993", size = 107010, upload-time = "2026-03-01T22:04:30.385Z" }, + { url = "https://files.pythonhosted.org/packages/56/38/12730c05e5ad40a76374d440ed8b0899729a96c250516d91c620a6e38fc2/yarl-1.23.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:75e3026ab649bf48f9a10c0134512638725b521340293f202a69b567518d94e0", size = 100285, upload-time = "2026-03-01T22:04:31.752Z" }, + { url = "https://files.pythonhosted.org/packages/34/92/6a7be9239f2347234e027284e7a5f74b1140cc86575e7b469d13fba1ebfe/yarl-1.23.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:80e6d33a3d42a7549b409f199857b4fb54e2103fc44fb87605b6663b7a7ff750", size = 108230, upload-time = "2026-03-01T22:04:33.844Z" }, + { url = "https://files.pythonhosted.org/packages/5e/81/4aebccfa9376bd98b9d8bfad20621a57d3e8cfc5b8631c1fa5f62cdd03f4/yarl-1.23.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5ec2f42d41ccbd5df0270d7df31618a8ee267bfa50997f5d720ddba86c4a83a6", size = 103008, upload-time = "2026-03-01T22:04:35.856Z" }, + { url = "https://files.pythonhosted.org/packages/38/0f/0b4e3edcec794a86b853b0c6396c0a888d72dfce19b2d88c02ac289fb6c1/yarl-1.23.0-cp310-cp310-win32.whl", hash = "sha256:debe9c4f41c32990771be5c22b56f810659f9ddf3d63f67abfdcaa2c6c9c5c1d", size = 83073, upload-time = "2026-03-01T22:04:38.268Z" }, + { url = "https://files.pythonhosted.org/packages/a0/71/ad95c33da18897e4c636528bbc24a1dd23fe16797de8bc4ec667b8db0ba4/yarl-1.23.0-cp310-cp310-win_amd64.whl", hash = "sha256:ab5f043cb8a2d71c981c09c510da013bc79fd661f5c60139f00dd3c3cc4f2ffb", size = 87328, upload-time = "2026-03-01T22:04:39.558Z" }, + { url = "https://files.pythonhosted.org/packages/e2/14/dfa369523c79bccf9c9c746b0a63eb31f65db9418ac01275f7950962e504/yarl-1.23.0-cp310-cp310-win_arm64.whl", hash = "sha256:263cd4f47159c09b8b685890af949195b51d1aa82ba451c5847ca9bc6413c220", size = 82463, upload-time = "2026-03-01T22:04:41.454Z" }, + { url = "https://files.pythonhosted.org/packages/a2/aa/60da938b8f0997ba3a911263c40d82b6f645a67902a490b46f3355e10fae/yarl-1.23.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b35d13d549077713e4414f927cdc388d62e543987c572baee613bf82f11a4b99", size = 123641, upload-time = "2026-03-01T22:04:42.841Z" }, + { url = "https://files.pythonhosted.org/packages/24/84/e237607faf4e099dbb8a4f511cfd5efcb5f75918baad200ff7380635631b/yarl-1.23.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cbb0fef01f0c6b38cb0f39b1f78fc90b807e0e3c86a7ff3ce74ad77ce5c7880c", size = 86248, upload-time = "2026-03-01T22:04:44.757Z" }, + { url = "https://files.pythonhosted.org/packages/b2/0d/71ceabc14c146ba8ee3804ca7b3d42b1664c8440439de5214d366fec7d3a/yarl-1.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc52310451fc7c629e13c4e061cbe2dd01684d91f2f8ee2821b083c58bd72432", size = 85988, upload-time = "2026-03-01T22:04:46.365Z" }, + { url = "https://files.pythonhosted.org/packages/8c/6c/4a90d59c572e46b270ca132aca66954f1175abd691f74c1ef4c6711828e2/yarl-1.23.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b2c6b50c7b0464165472b56b42d4c76a7b864597007d9c085e8b63e185cf4a7a", size = 100566, upload-time = "2026-03-01T22:04:47.639Z" }, + { url = "https://files.pythonhosted.org/packages/49/fb/c438fb5108047e629f6282a371e6e91cf3f97ee087c4fb748a1f32ceef55/yarl-1.23.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:aafe5dcfda86c8af00386d7781d4c2181b5011b7be3f2add5e99899ea925df05", size = 92079, upload-time = "2026-03-01T22:04:48.925Z" }, + { url = "https://files.pythonhosted.org/packages/d9/13/d269aa1aed3e4f50a5a103f96327210cc5fa5dd2d50882778f13c7a14606/yarl-1.23.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9ee33b875f0b390564c1fb7bc528abf18c8ee6073b201c6ae8524aca778e2d83", size = 108741, upload-time = "2026-03-01T22:04:50.838Z" }, + { url = "https://files.pythonhosted.org/packages/85/fb/115b16f22c37ea4437d323e472945bea97301c8ec6089868fa560abab590/yarl-1.23.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4c41e021bc6d7affb3364dc1e1e5fa9582b470f283748784bd6ea0558f87f42c", size = 108099, upload-time = "2026-03-01T22:04:52.499Z" }, + { url = "https://files.pythonhosted.org/packages/9a/64/c53487d9f4968045b8afa51aed7ca44f58b2589e772f32745f3744476c82/yarl-1.23.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:99c8a9ed30f4164bc4c14b37a90208836cbf50d4ce2a57c71d0f52c7fb4f7598", size = 102678, upload-time = "2026-03-01T22:04:55.176Z" }, + { url = "https://files.pythonhosted.org/packages/85/59/cd98e556fbb2bf8fab29c1a722f67ad45c5f3447cac798ab85620d1e70af/yarl-1.23.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f2af5c81a1f124609d5f33507082fc3f739959d4719b56877ab1ee7e7b3d602b", size = 100803, upload-time = "2026-03-01T22:04:56.588Z" }, + { url = "https://files.pythonhosted.org/packages/9e/c0/b39770b56d4a9f0bb5f77e2f1763cd2d75cc2f6c0131e3b4c360348fcd65/yarl-1.23.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6b41389c19b07c760c7e427a3462e8ab83c4bb087d127f0e854c706ce1b9215c", size = 100163, upload-time = "2026-03-01T22:04:58.492Z" }, + { url = "https://files.pythonhosted.org/packages/e7/64/6980f99ab00e1f0ff67cb84766c93d595b067eed07439cfccfc8fb28c1a6/yarl-1.23.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:1dc702e42d0684f42d6519c8d581e49c96cefaaab16691f03566d30658ee8788", size = 93859, upload-time = "2026-03-01T22:05:00.268Z" }, + { url = "https://files.pythonhosted.org/packages/38/69/912e6c5e146793e5d4b5fe39ff5b00f4d22463dfd5a162bec565ac757673/yarl-1.23.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:0e40111274f340d32ebcc0a5668d54d2b552a6cca84c9475859d364b380e3222", size = 108202, upload-time = "2026-03-01T22:05:02.273Z" }, + { url = "https://files.pythonhosted.org/packages/59/97/35ca6767524687ad64e5f5c31ad54bc76d585585a9fcb40f649e7e82ffed/yarl-1.23.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:4764a6a7588561a9aef92f65bda2c4fb58fe7c675c0883862e6df97559de0bfb", size = 99866, upload-time = "2026-03-01T22:05:03.597Z" }, + { url = "https://files.pythonhosted.org/packages/d3/1c/1a3387ee6d73589f6f2a220ae06f2984f6c20b40c734989b0a44f5987308/yarl-1.23.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:03214408cfa590df47728b84c679ae4ef00be2428e11630277be0727eba2d7cc", size = 107852, upload-time = "2026-03-01T22:05:04.986Z" }, + { url = "https://files.pythonhosted.org/packages/a4/b8/35c0750fcd5a3f781058bfd954515dd4b1eab45e218cbb85cf11132215f1/yarl-1.23.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:170e26584b060879e29fac213e4228ef063f39128723807a312e5c7fec28eff2", size = 102919, upload-time = "2026-03-01T22:05:06.397Z" }, + { url = "https://files.pythonhosted.org/packages/e5/1c/9a1979aec4a81896d597bcb2177827f2dbee3f5b7cc48b2d0dadb644b41d/yarl-1.23.0-cp311-cp311-win32.whl", hash = "sha256:51430653db848d258336cfa0244427b17d12db63d42603a55f0d4546f50f25b5", size = 82602, upload-time = "2026-03-01T22:05:08.444Z" }, + { url = "https://files.pythonhosted.org/packages/93/22/b85eca6fa2ad9491af48c973e4c8cf6b103a73dbb271fe3346949449fca0/yarl-1.23.0-cp311-cp311-win_amd64.whl", hash = "sha256:bf49a3ae946a87083ef3a34c8f677ae4243f5b824bfc4c69672e72b3d6719d46", size = 87461, upload-time = "2026-03-01T22:05:10.145Z" }, + { url = "https://files.pythonhosted.org/packages/93/95/07e3553fe6f113e6864a20bdc53a78113cda3b9ced8784ee52a52c9f80d8/yarl-1.23.0-cp311-cp311-win_arm64.whl", hash = "sha256:b39cb32a6582750b6cc77bfb3c49c0f8760dc18dc96ec9fb55fbb0f04e08b928", size = 82336, upload-time = "2026-03-01T22:05:11.554Z" }, + { url = "https://files.pythonhosted.org/packages/88/8a/94615bc31022f711add374097ad4144d569e95ff3c38d39215d07ac153a0/yarl-1.23.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1932b6b8bba8d0160a9d1078aae5838a66039e8832d41d2992daa9a3a08f7860", size = 124737, upload-time = "2026-03-01T22:05:12.897Z" }, + { url = "https://files.pythonhosted.org/packages/e3/6f/c6554045d59d64052698add01226bc867b52fe4a12373415d7991fdca95d/yarl-1.23.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:411225bae281f114067578891bc75534cfb3d92a3b4dfef7a6ca78ba354e6069", size = 87029, upload-time = "2026-03-01T22:05:14.376Z" }, + { url = "https://files.pythonhosted.org/packages/19/2a/725ecc166d53438bc88f76822ed4b1e3b10756e790bafd7b523fe97c322d/yarl-1.23.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:13a563739ae600a631c36ce096615fe307f131344588b0bc0daec108cdb47b25", size = 86310, upload-time = "2026-03-01T22:05:15.71Z" }, + { url = "https://files.pythonhosted.org/packages/99/30/58260ed98e6ff7f90ba84442c1ddd758c9170d70327394a6227b310cd60f/yarl-1.23.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9cbf44c5cb4a7633d078788e1b56387e3d3cf2b8139a3be38040b22d6c3221c8", size = 97587, upload-time = "2026-03-01T22:05:17.384Z" }, + { url = "https://files.pythonhosted.org/packages/76/0a/8b08aac08b50682e65759f7f8dde98ae8168f72487e7357a5d684c581ef9/yarl-1.23.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:53ad387048f6f09a8969631e4de3f1bf70c50e93545d64af4f751b2498755072", size = 92528, upload-time = "2026-03-01T22:05:18.804Z" }, + { url = "https://files.pythonhosted.org/packages/52/07/0b7179101fe5f8385ec6c6bb5d0cb9f76bd9fb4a769591ab6fb5cdbfc69a/yarl-1.23.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4a59ba56f340334766f3a4442e0efd0af895fae9e2b204741ef885c446b3a1a8", size = 105339, upload-time = "2026-03-01T22:05:20.235Z" }, + { url = "https://files.pythonhosted.org/packages/d3/8a/36d82869ab5ec829ca8574dfcb92b51286fcfb1e9c7a73659616362dc880/yarl-1.23.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:803a3c3ce4acc62eaf01eaca1208dcf0783025ef27572c3336502b9c232005e7", size = 105061, upload-time = "2026-03-01T22:05:22.268Z" }, + { url = "https://files.pythonhosted.org/packages/66/3e/868e5c3364b6cee19ff3e1a122194fa4ce51def02c61023970442162859e/yarl-1.23.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a3d2bff8f37f8d0f96c7ec554d16945050d54462d6e95414babaa18bfafc7f51", size = 100132, upload-time = "2026-03-01T22:05:23.638Z" }, + { url = "https://files.pythonhosted.org/packages/cf/26/9c89acf82f08a52cb52d6d39454f8d18af15f9d386a23795389d1d423823/yarl-1.23.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c75eb09e8d55bceb4367e83496ff8ef2bc7ea6960efb38e978e8073ea59ecb67", size = 99289, upload-time = "2026-03-01T22:05:25.749Z" }, + { url = "https://files.pythonhosted.org/packages/6f/54/5b0db00d2cb056922356104468019c0a132e89c8d3ab67d8ede9f4483d2a/yarl-1.23.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:877b0738624280e34c55680d6054a307aa94f7d52fa0e3034a9cc6e790871da7", size = 96950, upload-time = "2026-03-01T22:05:27.318Z" }, + { url = "https://files.pythonhosted.org/packages/f6/40/10fa93811fd439341fad7e0718a86aca0de9548023bbb403668d6555acab/yarl-1.23.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:b5405bb8f0e783a988172993cfc627e4d9d00432d6bbac65a923041edacf997d", size = 93960, upload-time = "2026-03-01T22:05:28.738Z" }, + { url = "https://files.pythonhosted.org/packages/bc/d2/8ae2e6cd77d0805f4526e30ec43b6f9a3dfc542d401ac4990d178e4bf0cf/yarl-1.23.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1c3a3598a832590c5a3ce56ab5576361b5688c12cb1d39429cf5dba30b510760", size = 104703, upload-time = "2026-03-01T22:05:30.438Z" }, + { url = "https://files.pythonhosted.org/packages/2f/0c/b3ceacf82c3fe21183ce35fa2acf5320af003d52bc1fcf5915077681142e/yarl-1.23.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:8419ebd326430d1cbb7efb5292330a2cf39114e82df5cc3d83c9a0d5ebeaf2f2", size = 98325, upload-time = "2026-03-01T22:05:31.835Z" }, + { url = "https://files.pythonhosted.org/packages/9d/e0/12900edd28bdab91a69bd2554b85ad7b151f64e8b521fe16f9ad2f56477a/yarl-1.23.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:be61f6fff406ca40e3b1d84716fde398fc08bc63dd96d15f3a14230a0973ed86", size = 105067, upload-time = "2026-03-01T22:05:33.358Z" }, + { url = "https://files.pythonhosted.org/packages/15/61/74bb1182cf79c9bbe4eb6b1f14a57a22d7a0be5e9cedf8e2d5c2086474c3/yarl-1.23.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3ceb13c5c858d01321b5d9bb65e4cf37a92169ea470b70fec6f236b2c9dd7e34", size = 100285, upload-time = "2026-03-01T22:05:35.4Z" }, + { url = "https://files.pythonhosted.org/packages/69/7f/cd5ef733f2550de6241bd8bd8c3febc78158b9d75f197d9c7baa113436af/yarl-1.23.0-cp312-cp312-win32.whl", hash = "sha256:fffc45637bcd6538de8b85f51e3df3223e4ad89bccbfca0481c08c7fc8b7ed7d", size = 82359, upload-time = "2026-03-01T22:05:36.811Z" }, + { url = "https://files.pythonhosted.org/packages/f5/be/25216a49daeeb7af2bec0db22d5e7df08ed1d7c9f65d78b14f3b74fd72fc/yarl-1.23.0-cp312-cp312-win_amd64.whl", hash = "sha256:f69f57305656a4852f2a7203efc661d8c042e6cc67f7acd97d8667fb448a426e", size = 87674, upload-time = "2026-03-01T22:05:38.171Z" }, + { url = "https://files.pythonhosted.org/packages/d2/35/aeab955d6c425b227d5b7247eafb24f2653fedc32f95373a001af5dfeb9e/yarl-1.23.0-cp312-cp312-win_arm64.whl", hash = "sha256:6e87a6e8735b44816e7db0b2fbc9686932df473c826b0d9743148432e10bb9b9", size = 81879, upload-time = "2026-03-01T22:05:40.006Z" }, + { url = "https://files.pythonhosted.org/packages/9a/4b/a0a6e5d0ee8a2f3a373ddef8a4097d74ac901ac363eea1440464ccbe0898/yarl-1.23.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:16c6994ac35c3e74fb0ae93323bf8b9c2a9088d55946109489667c510a7d010e", size = 123796, upload-time = "2026-03-01T22:05:41.412Z" }, + { url = "https://files.pythonhosted.org/packages/67/b6/8925d68af039b835ae876db5838e82e76ec87b9782ecc97e192b809c4831/yarl-1.23.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4a42e651629dafb64fd5b0286a3580613702b5809ad3f24934ea87595804f2c5", size = 86547, upload-time = "2026-03-01T22:05:42.841Z" }, + { url = "https://files.pythonhosted.org/packages/ae/50/06d511cc4b8e0360d3c94af051a768e84b755c5eb031b12adaaab6dec6e5/yarl-1.23.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:7c6b9461a2a8b47c65eef63bb1c76a4f1c119618ffa99ea79bc5bb1e46c5821b", size = 85854, upload-time = "2026-03-01T22:05:44.85Z" }, + { url = "https://files.pythonhosted.org/packages/c4/f4/4e30b250927ffdab4db70da08b9b8d2194d7c7b400167b8fbeca1e4701ca/yarl-1.23.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2569b67d616eab450d262ca7cb9f9e19d2f718c70a8b88712859359d0ab17035", size = 98351, upload-time = "2026-03-01T22:05:46.836Z" }, + { url = "https://files.pythonhosted.org/packages/86/fc/4118c5671ea948208bdb1492d8b76bdf1453d3e73df051f939f563e7dcc5/yarl-1.23.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e9d9a4d06d3481eab79803beb4d9bd6f6a8e781ec078ac70d7ef2dcc29d1bea5", size = 92711, upload-time = "2026-03-01T22:05:48.316Z" }, + { url = "https://files.pythonhosted.org/packages/56/11/1ed91d42bd9e73c13dc9e7eb0dd92298d75e7ac4dd7f046ad0c472e231cd/yarl-1.23.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f514f6474e04179d3d33175ed3f3e31434d3130d42ec153540d5b157deefd735", size = 106014, upload-time = "2026-03-01T22:05:50.028Z" }, + { url = "https://files.pythonhosted.org/packages/ce/c9/74e44e056a23fbc33aca71779ef450ca648a5bc472bdad7a82339918f818/yarl-1.23.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fda207c815b253e34f7e1909840fd14299567b1c0eb4908f8c2ce01a41265401", size = 105557, upload-time = "2026-03-01T22:05:51.416Z" }, + { url = "https://files.pythonhosted.org/packages/66/fe/b1e10b08d287f518994f1e2ff9b6d26f0adeecd8dd7d533b01bab29a3eda/yarl-1.23.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34b6cf500e61c90f305094911f9acc9c86da1a05a7a3f5be9f68817043f486e4", size = 101559, upload-time = "2026-03-01T22:05:52.872Z" }, + { url = "https://files.pythonhosted.org/packages/72/59/c5b8d94b14e3d3c2a9c20cb100119fd534ab5a14b93673ab4cc4a4141ea5/yarl-1.23.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d7504f2b476d21653e4d143f44a175f7f751cd41233525312696c76aa3dbb23f", size = 100502, upload-time = "2026-03-01T22:05:54.954Z" }, + { url = "https://files.pythonhosted.org/packages/77/4f/96976cb54cbfc5c9fd73ed4c51804f92f209481d1fb190981c0f8a07a1d7/yarl-1.23.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:578110dd426f0d209d1509244e6d4a3f1a3e9077655d98c5f22583d63252a08a", size = 98027, upload-time = "2026-03-01T22:05:56.409Z" }, + { url = "https://files.pythonhosted.org/packages/63/6e/904c4f476471afdbad6b7e5b70362fb5810e35cd7466529a97322b6f5556/yarl-1.23.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:609d3614d78d74ebe35f54953c5bbd2ac647a7ddb9c30a5d877580f5e86b22f2", size = 95369, upload-time = "2026-03-01T22:05:58.141Z" }, + { url = "https://files.pythonhosted.org/packages/9d/40/acfcdb3b5f9d68ef499e39e04d25e141fe90661f9d54114556cf83be8353/yarl-1.23.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4966242ec68afc74c122f8459abd597afd7d8a60dc93d695c1334c5fd25f762f", size = 105565, upload-time = "2026-03-01T22:06:00.286Z" }, + { url = "https://files.pythonhosted.org/packages/5e/c6/31e28f3a6ba2869c43d124f37ea5260cac9c9281df803c354b31f4dd1f3c/yarl-1.23.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:e0fd068364a6759bc794459f0a735ab151d11304346332489c7972bacbe9e72b", size = 99813, upload-time = "2026-03-01T22:06:01.712Z" }, + { url = "https://files.pythonhosted.org/packages/08/1f/6f65f59e72d54aa467119b63fc0b0b1762eff0232db1f4720cd89e2f4a17/yarl-1.23.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:39004f0ad156da43e86aa71f44e033de68a44e5a31fc53507b36dd253970054a", size = 105632, upload-time = "2026-03-01T22:06:03.188Z" }, + { url = "https://files.pythonhosted.org/packages/a3/c4/18b178a69935f9e7a338127d5b77d868fdc0f0e49becd286d51b3a18c61d/yarl-1.23.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e5723c01a56c5028c807c701aa66722916d2747ad737a046853f6c46f4875543", size = 101895, upload-time = "2026-03-01T22:06:04.651Z" }, + { url = "https://files.pythonhosted.org/packages/8f/54/f5b870b5505663911dba950a8e4776a0dbd51c9c54c0ae88e823e4b874a0/yarl-1.23.0-cp313-cp313-win32.whl", hash = "sha256:1b6b572edd95b4fa8df75de10b04bc81acc87c1c7d16bcdd2035b09d30acc957", size = 82356, upload-time = "2026-03-01T22:06:06.04Z" }, + { url = "https://files.pythonhosted.org/packages/7a/84/266e8da36879c6edcd37b02b547e2d9ecdfea776be49598e75696e3316e1/yarl-1.23.0-cp313-cp313-win_amd64.whl", hash = "sha256:baaf55442359053c7d62f6f8413a62adba3205119bcb6f49594894d8be47e5e3", size = 87515, upload-time = "2026-03-01T22:06:08.107Z" }, + { url = "https://files.pythonhosted.org/packages/00/fd/7e1c66efad35e1649114fa13f17485f62881ad58edeeb7f49f8c5e748bf9/yarl-1.23.0-cp313-cp313-win_arm64.whl", hash = "sha256:fb4948814a2a98e3912505f09c9e7493b1506226afb1f881825368d6fb776ee3", size = 81785, upload-time = "2026-03-01T22:06:10.181Z" }, + { url = "https://files.pythonhosted.org/packages/9c/fc/119dd07004f17ea43bb91e3ece6587759edd7519d6b086d16bfbd3319982/yarl-1.23.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:aecfed0b41aa72b7881712c65cf764e39ce2ec352324f5e0837c7048d9e6daaa", size = 130719, upload-time = "2026-03-01T22:06:11.708Z" }, + { url = "https://files.pythonhosted.org/packages/e6/0d/9f2348502fbb3af409e8f47730282cd6bc80dec6630c1e06374d882d6eb2/yarl-1.23.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:a41bcf68efd19073376eb8cf948b8d9be0af26256403e512bb18f3966f1f9120", size = 89690, upload-time = "2026-03-01T22:06:13.429Z" }, + { url = "https://files.pythonhosted.org/packages/50/93/e88f3c80971b42cfc83f50a51b9d165a1dbf154b97005f2994a79f212a07/yarl-1.23.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:cde9a2ecd91668bcb7f077c4966d8ceddb60af01b52e6e3e2680e4cf00ad1a59", size = 89851, upload-time = "2026-03-01T22:06:15.53Z" }, + { url = "https://files.pythonhosted.org/packages/1c/07/61c9dd8ba8f86473263b4036f70fb594c09e99c0d9737a799dfd8bc85651/yarl-1.23.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5023346c4ee7992febc0068e7593de5fa2bf611848c08404b35ebbb76b1b0512", size = 95874, upload-time = "2026-03-01T22:06:17.553Z" }, + { url = "https://files.pythonhosted.org/packages/9e/e9/f9ff8ceefba599eac6abddcfb0b3bee9b9e636e96dbf54342a8577252379/yarl-1.23.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d1009abedb49ae95b136a8904a3f71b342f849ffeced2d3747bf29caeda218c4", size = 88710, upload-time = "2026-03-01T22:06:19.004Z" }, + { url = "https://files.pythonhosted.org/packages/eb/78/0231bfcc5d4c8eec220bc2f9ef82cb4566192ea867a7c5b4148f44f6cbcd/yarl-1.23.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a8d00f29b42f534cc8aa3931cfe773b13b23e561e10d2b26f27a8d309b0e82a1", size = 101033, upload-time = "2026-03-01T22:06:21.203Z" }, + { url = "https://files.pythonhosted.org/packages/cd/9b/30ea5239a61786f18fd25797151a17fbb3be176977187a48d541b5447dd4/yarl-1.23.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:95451e6ce06c3e104556d73b559f5da6c34a069b6b62946d3ad66afcd51642ea", size = 100817, upload-time = "2026-03-01T22:06:22.738Z" }, + { url = "https://files.pythonhosted.org/packages/62/e2/a4980481071791bc83bce2b7a1a1f7adcabfa366007518b4b845e92eeee3/yarl-1.23.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:531ef597132086b6cf96faa7c6c1dcd0361dd5f1694e5cc30375907b9b7d3ea9", size = 97482, upload-time = "2026-03-01T22:06:24.21Z" }, + { url = "https://files.pythonhosted.org/packages/e5/1e/304a00cf5f6100414c4b5a01fc7ff9ee724b62158a08df2f8170dfc72a2d/yarl-1.23.0-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:88f9fb0116fbfcefcab70f85cf4b74a2b6ce5d199c41345296f49d974ddb4123", size = 95949, upload-time = "2026-03-01T22:06:25.697Z" }, + { url = "https://files.pythonhosted.org/packages/68/03/093f4055ed4cae649ac53bca3d180bd37102e9e11d048588e9ab0c0108d0/yarl-1.23.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e7b0460976dc75cb87ad9cc1f9899a4b97751e7d4e77ab840fc9b6d377b8fd24", size = 95839, upload-time = "2026-03-01T22:06:27.309Z" }, + { url = "https://files.pythonhosted.org/packages/b9/28/4c75ebb108f322aa8f917ae10a8ffa4f07cae10a8a627b64e578617df6a0/yarl-1.23.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:115136c4a426f9da976187d238e84139ff6b51a20839aa6e3720cd1026d768de", size = 90696, upload-time = "2026-03-01T22:06:29.048Z" }, + { url = "https://files.pythonhosted.org/packages/23/9c/42c2e2dd91c1a570402f51bdf066bfdb1241c2240ba001967bad778e77b7/yarl-1.23.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:ead11956716a940c1abc816b7df3fa2b84d06eaed8832ca32f5c5e058c65506b", size = 100865, upload-time = "2026-03-01T22:06:30.525Z" }, + { url = "https://files.pythonhosted.org/packages/74/05/1bcd60a8a0a914d462c305137246b6f9d167628d73568505fce3f1cb2e65/yarl-1.23.0-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:fe8f8f5e70e6dbdfca9882cd9deaac058729bcf323cf7a58660901e55c9c94f6", size = 96234, upload-time = "2026-03-01T22:06:32.692Z" }, + { url = "https://files.pythonhosted.org/packages/90/b2/f52381aac396d6778ce516b7bc149c79e65bfc068b5de2857ab69eeea3b7/yarl-1.23.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:a0e317df055958a0c1e79e5d2aa5a5eaa4a6d05a20d4b0c9c3f48918139c9fc6", size = 100295, upload-time = "2026-03-01T22:06:34.268Z" }, + { url = "https://files.pythonhosted.org/packages/e5/e8/638bae5bbf1113a659b2435d8895474598afe38b4a837103764f603aba56/yarl-1.23.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f0fd84de0c957b2d280143522c4f91a73aada1923caee763e24a2b3fda9f8a5", size = 97784, upload-time = "2026-03-01T22:06:35.864Z" }, + { url = "https://files.pythonhosted.org/packages/80/25/a3892b46182c586c202629fc2159aa13975d3741d52ebd7347fd501d48d5/yarl-1.23.0-cp313-cp313t-win32.whl", hash = "sha256:93a784271881035ab4406a172edb0faecb6e7d00f4b53dc2f55919d6c9688595", size = 88313, upload-time = "2026-03-01T22:06:37.39Z" }, + { url = "https://files.pythonhosted.org/packages/43/68/8c5b36aa5178900b37387937bc2c2fe0e9505537f713495472dcf6f6fccc/yarl-1.23.0-cp313-cp313t-win_amd64.whl", hash = "sha256:dd00607bffbf30250fe108065f07453ec124dbf223420f57f5e749b04295e090", size = 94932, upload-time = "2026-03-01T22:06:39.579Z" }, + { url = "https://files.pythonhosted.org/packages/c6/cc/d79ba8292f51f81f4dc533a8ccfb9fc6992cabf0998ed3245de7589dc07c/yarl-1.23.0-cp313-cp313t-win_arm64.whl", hash = "sha256:ac09d42f48f80c9ee1635b2fcaa819496a44502737660d3c0f2ade7526d29144", size = 84786, upload-time = "2026-03-01T22:06:41.988Z" }, + { url = "https://files.pythonhosted.org/packages/90/98/b85a038d65d1b92c3903ab89444f48d3cee490a883477b716d7a24b1a78c/yarl-1.23.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:21d1b7305a71a15b4794b5ff22e8eef96ff4a6d7f9657155e5aa419444b28912", size = 124455, upload-time = "2026-03-01T22:06:43.615Z" }, + { url = "https://files.pythonhosted.org/packages/39/54/bc2b45559f86543d163b6e294417a107bb87557609007c007ad889afec18/yarl-1.23.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:85610b4f27f69984932a7abbe52703688de3724d9f72bceb1cca667deff27474", size = 86752, upload-time = "2026-03-01T22:06:45.425Z" }, + { url = "https://files.pythonhosted.org/packages/24/f9/e8242b68362bffe6fb536c8db5076861466fc780f0f1b479fc4ffbebb128/yarl-1.23.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:23f371bd662cf44a7630d4d113101eafc0cfa7518a2760d20760b26021454719", size = 86291, upload-time = "2026-03-01T22:06:46.974Z" }, + { url = "https://files.pythonhosted.org/packages/ea/d8/d1cb2378c81dd729e98c716582b1ccb08357e8488e4c24714658cc6630e8/yarl-1.23.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4a80f77dc1acaaa61f0934176fccca7096d9b1ff08c8ba9cddf5ae034a24319", size = 99026, upload-time = "2026-03-01T22:06:48.459Z" }, + { url = "https://files.pythonhosted.org/packages/0a/ff/7196790538f31debe3341283b5b0707e7feb947620fc5e8236ef28d44f72/yarl-1.23.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:bd654fad46d8d9e823afbb4f87c79160b5a374ed1ff5bde24e542e6ba8f41434", size = 92355, upload-time = "2026-03-01T22:06:50.306Z" }, + { url = "https://files.pythonhosted.org/packages/c1/56/25d58c3eddde825890a5fe6aa1866228377354a3c39262235234ab5f616b/yarl-1.23.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:682bae25f0a0dd23a056739f23a134db9f52a63e2afd6bfb37ddc76292bbd723", size = 106417, upload-time = "2026-03-01T22:06:52.1Z" }, + { url = "https://files.pythonhosted.org/packages/51/8a/882c0e7bc8277eb895b31bce0138f51a1ba551fc2e1ec6753ffc1e7c1377/yarl-1.23.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a82836cab5f197a0514235aaf7ffccdc886ccdaa2324bc0aafdd4ae898103039", size = 106422, upload-time = "2026-03-01T22:06:54.424Z" }, + { url = "https://files.pythonhosted.org/packages/42/2b/fef67d616931055bf3d6764885990a3ac647d68734a2d6a9e1d13de437a2/yarl-1.23.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c57676bdedc94cd3bc37724cf6f8cd2779f02f6aba48de45feca073e714fe52", size = 101915, upload-time = "2026-03-01T22:06:55.895Z" }, + { url = "https://files.pythonhosted.org/packages/18/6a/530e16aebce27c5937920f3431c628a29a4b6b430fab3fd1c117b26ff3f6/yarl-1.23.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c7f8dc16c498ff06497c015642333219871effba93e4a2e8604a06264aca5c5c", size = 100690, upload-time = "2026-03-01T22:06:58.21Z" }, + { url = "https://files.pythonhosted.org/packages/88/08/93749219179a45e27b036e03260fda05190b911de8e18225c294ac95bbc9/yarl-1.23.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:5ee586fb17ff8f90c91cf73c6108a434b02d69925f44f5f8e0d7f2f260607eae", size = 98750, upload-time = "2026-03-01T22:06:59.794Z" }, + { url = "https://files.pythonhosted.org/packages/d9/cf/ea424a004969f5d81a362110a6ac1496d79efdc6d50c2c4b2e3ea0fc2519/yarl-1.23.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:17235362f580149742739cc3828b80e24029d08cbb9c4bda0242c7b5bc610a8e", size = 94685, upload-time = "2026-03-01T22:07:01.375Z" }, + { url = "https://files.pythonhosted.org/packages/e2/b7/14341481fe568e2b0408bcf1484c652accafe06a0ade9387b5d3fd9df446/yarl-1.23.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:0793e2bd0cf14234983bbb371591e6bea9e876ddf6896cdcc93450996b0b5c85", size = 106009, upload-time = "2026-03-01T22:07:03.151Z" }, + { url = "https://files.pythonhosted.org/packages/0a/e6/5c744a9b54f4e8007ad35bce96fbc9218338e84812d36f3390cea616881a/yarl-1.23.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:3650dc2480f94f7116c364096bc84b1d602f44224ef7d5c7208425915c0475dd", size = 100033, upload-time = "2026-03-01T22:07:04.701Z" }, + { url = "https://files.pythonhosted.org/packages/0c/23/e3bfc188d0b400f025bc49d99793d02c9abe15752138dcc27e4eaf0c4a9e/yarl-1.23.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:f40e782d49630ad384db66d4d8b73ff4f1b8955dc12e26b09a3e3af064b3b9d6", size = 106483, upload-time = "2026-03-01T22:07:06.231Z" }, + { url = "https://files.pythonhosted.org/packages/72/42/f0505f949a90b3f8b7a363d6cbdf398f6e6c58946d85c6d3a3bc70595b26/yarl-1.23.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:94f8575fbdf81749008d980c17796097e645574a3b8c28ee313931068dad14fe", size = 102175, upload-time = "2026-03-01T22:07:08.4Z" }, + { url = "https://files.pythonhosted.org/packages/aa/65/b39290f1d892a9dd671d1c722014ca062a9c35d60885d57e5375db0404b5/yarl-1.23.0-cp314-cp314-win32.whl", hash = "sha256:c8aa34a5c864db1087d911a0b902d60d203ea3607d91f615acd3f3108ac32169", size = 83871, upload-time = "2026-03-01T22:07:09.968Z" }, + { url = "https://files.pythonhosted.org/packages/a9/5b/9b92f54c784c26e2a422e55a8d2607ab15b7ea3349e28359282f84f01d43/yarl-1.23.0-cp314-cp314-win_amd64.whl", hash = "sha256:63e92247f383c85ab00dd0091e8c3fa331a96e865459f5ee80353c70a4a42d70", size = 89093, upload-time = "2026-03-01T22:07:11.501Z" }, + { url = "https://files.pythonhosted.org/packages/e0/7d/8a84dc9381fd4412d5e7ff04926f9865f6372b4c2fd91e10092e65d29eb8/yarl-1.23.0-cp314-cp314-win_arm64.whl", hash = "sha256:70efd20be968c76ece7baa8dafe04c5be06abc57f754d6f36f3741f7aa7a208e", size = 83384, upload-time = "2026-03-01T22:07:13.069Z" }, + { url = "https://files.pythonhosted.org/packages/dd/8d/d2fad34b1c08aa161b74394183daa7d800141aaaee207317e82c790b418d/yarl-1.23.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9a18d6f9359e45722c064c97464ec883eb0e0366d33eda61cb19a244bf222679", size = 131019, upload-time = "2026-03-01T22:07:14.903Z" }, + { url = "https://files.pythonhosted.org/packages/19/ff/33009a39d3ccf4b94d7d7880dfe17fb5816c5a4fe0096d9b56abceea9ac7/yarl-1.23.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:2803ed8b21ca47a43da80a6fd1ed3019d30061f7061daa35ac54f63933409412", size = 89894, upload-time = "2026-03-01T22:07:17.372Z" }, + { url = "https://files.pythonhosted.org/packages/0c/f1/dab7ac5e7306fb79c0190766a3c00b4cb8d09a1f390ded68c85a5934faf5/yarl-1.23.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:394906945aa8b19fc14a61cf69743a868bb8c465efe85eee687109cc540b98f4", size = 89979, upload-time = "2026-03-01T22:07:19.361Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b1/08e95f3caee1fad6e65017b9f26c1d79877b502622d60e517de01e72f95d/yarl-1.23.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:71d006bee8397a4a89f469b8deb22469fe7508132d3c17fa6ed871e79832691c", size = 95943, upload-time = "2026-03-01T22:07:21.266Z" }, + { url = "https://files.pythonhosted.org/packages/c0/cc/6409f9018864a6aa186c61175b977131f373f1988e198e031236916e87e4/yarl-1.23.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:62694e275c93d54f7ccedcfef57d42761b2aad5234b6be1f3e3026cae4001cd4", size = 88786, upload-time = "2026-03-01T22:07:23.129Z" }, + { url = "https://files.pythonhosted.org/packages/76/40/cc22d1d7714b717fde2006fad2ced5efe5580606cb059ae42117542122f3/yarl-1.23.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a31de1613658308efdb21ada98cbc86a97c181aa050ba22a808120bb5be3ab94", size = 101307, upload-time = "2026-03-01T22:07:24.689Z" }, + { url = "https://files.pythonhosted.org/packages/8f/0d/476c38e85ddb4c6ec6b20b815bdd779aa386a013f3d8b85516feee55c8dc/yarl-1.23.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fb1e8b8d66c278b21d13b0a7ca22c41dd757a7c209c6b12c313e445c31dd3b28", size = 100904, upload-time = "2026-03-01T22:07:26.287Z" }, + { url = "https://files.pythonhosted.org/packages/72/32/0abe4a76d59adf2081dcb0397168553ece4616ada1c54d1c49d8936c74f8/yarl-1.23.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50f9d8d531dfb767c565f348f33dd5139a6c43f5cbdf3f67da40d54241df93f6", size = 97728, upload-time = "2026-03-01T22:07:27.906Z" }, + { url = "https://files.pythonhosted.org/packages/b7/35/7b30f4810fba112f60f5a43237545867504e15b1c7647a785fbaf588fac2/yarl-1.23.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:575aa4405a656e61a540f4a80eaa5260f2a38fff7bfdc4b5f611840d76e9e277", size = 95964, upload-time = "2026-03-01T22:07:30.198Z" }, + { url = "https://files.pythonhosted.org/packages/2d/86/ed7a73ab85ef00e8bb70b0cb5421d8a2a625b81a333941a469a6f4022828/yarl-1.23.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:041b1a4cefacf65840b4e295c6985f334ba83c30607441ae3cf206a0eed1a2e4", size = 95882, upload-time = "2026-03-01T22:07:32.132Z" }, + { url = "https://files.pythonhosted.org/packages/19/90/d56967f61a29d8498efb7afb651e0b2b422a1e9b47b0ab5f4e40a19b699b/yarl-1.23.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d38c1e8231722c4ce40d7593f28d92b5fc72f3e9774fe73d7e800ec32299f63a", size = 90797, upload-time = "2026-03-01T22:07:34.404Z" }, + { url = "https://files.pythonhosted.org/packages/72/00/8b8f76909259f56647adb1011d7ed8b321bcf97e464515c65016a47ecdf0/yarl-1.23.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d53834e23c015ee83a99377db6e5e37d8484f333edb03bd15b4bc312cc7254fb", size = 101023, upload-time = "2026-03-01T22:07:35.953Z" }, + { url = "https://files.pythonhosted.org/packages/ac/e2/cab11b126fb7d440281b7df8e9ddbe4851e70a4dde47a202b6642586b8d9/yarl-1.23.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:2e27c8841126e017dd2a054a95771569e6070b9ee1b133366d8b31beb5018a41", size = 96227, upload-time = "2026-03-01T22:07:37.594Z" }, + { url = "https://files.pythonhosted.org/packages/c2/9b/2c893e16bfc50e6b2edf76c1a9eb6cb0c744346197e74c65e99ad8d634d0/yarl-1.23.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:76855800ac56f878847a09ce6dba727c93ca2d89c9e9d63002d26b916810b0a2", size = 100302, upload-time = "2026-03-01T22:07:39.334Z" }, + { url = "https://files.pythonhosted.org/packages/28/ec/5498c4e3a6d5f1003beb23405671c2eb9cdbf3067d1c80f15eeafe301010/yarl-1.23.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:e09fd068c2e169a7070d83d3bde728a4d48de0549f975290be3c108c02e499b4", size = 98202, upload-time = "2026-03-01T22:07:41.717Z" }, + { url = "https://files.pythonhosted.org/packages/fe/c3/cd737e2d45e70717907f83e146f6949f20cc23cd4bf7b2688727763aa458/yarl-1.23.0-cp314-cp314t-win32.whl", hash = "sha256:73309162a6a571d4cbd3b6a1dcc703c7311843ae0d1578df6f09be4e98df38d4", size = 90558, upload-time = "2026-03-01T22:07:43.433Z" }, + { url = "https://files.pythonhosted.org/packages/e1/19/3774d162f6732d1cfb0b47b4140a942a35ca82bb19b6db1f80e9e7bdc8f8/yarl-1.23.0-cp314-cp314t-win_amd64.whl", hash = "sha256:4503053d296bc6e4cbd1fad61cf3b6e33b939886c4f249ba7c78b602214fabe2", size = 97610, upload-time = "2026-03-01T22:07:45.773Z" }, + { url = "https://files.pythonhosted.org/packages/51/47/3fa2286c3cb162c71cdb34c4224d5745a1ceceb391b2bd9b19b668a8d724/yarl-1.23.0-cp314-cp314t-win_arm64.whl", hash = "sha256:44bb7bef4ea409384e3f8bc36c063d77ea1b8d4a5b2706956c0d6695f07dcc25", size = 86041, upload-time = "2026-03-01T22:07:49.026Z" }, + { url = "https://files.pythonhosted.org/packages/69/68/c8739671f5699c7dc470580a4f821ef37c32c4cb0b047ce223a7f115757f/yarl-1.23.0-py3-none-any.whl", hash = "sha256:a2df6afe50dea8ae15fa34c9f824a3ee958d785fd5d089063d960bae1daa0a3f", size = 48288, upload-time = "2026-03-01T22:07:51.388Z" }, +] + [[package]] name = "zipp" version = "3.23.0" From 64c23a184452a2453a7aff808d7901d0e1718483 Mon Sep 17 00:00:00 2001 From: Nicolas Faurie Date: Tue, 14 Apr 2026 14:14:36 +0200 Subject: [PATCH 44/82] Fix generation conflict (#486) * Fix generation conflict * Fix --- .speakeasy/gen.lock | 18 +++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- src/mistralai/client/_version.py | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f13a0849..67f39955 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,15 +5,15 @@ management: docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.3.6 - configChecksum: 95068806fbe0942ab6561ca540458fc9 + releaseVersion: 2.3.8 + configChecksum: 601a907de4437b981061110787b408ca repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 6d0c183b-fffd-4345-bc10-c73b69c91605 - pristine_commit_hash: 731e3f6f8d8451435e03d69da2dbe80bb13412f6 - pristine_tree_hash: df3f3821a4a083ea62b654833f022a2df2c149ac + generation_id: 86f6cf88-f9de-4064-844b-4b570ddc54ea + pristine_commit_hash: fd469ca531c74164057fd6c5a7639514a1f171ec + pristine_tree_hash: 0a8e0a5a864cfa8571bd95bb26af5c7b3a5e3d2b features: python: acceptHeaders: 3.0.0 @@ -3227,8 +3227,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:2d58e5f157ee7ec7ba8a5bfc2726bcb56555d3b6 - pristine_git_object: 0e124f2202191d3a222b9a2abe6a91ee036adc01 + last_write_checksum: sha1:72f18d049dc2e14a6e226eb0caf0dd808b9f56d0 + pristine_git_object: 8446f42c5d58377a883e8fe44d9328239aaeb693 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d @@ -3283,8 +3283,8 @@ trackedFiles: pristine_git_object: fc9d6319b4d321e21a7b7d73515f9d13b9ac8a2a src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:44b01585b9cbca3c9696c40b817529e76d6e7c32 - pristine_git_object: a9887a9a95308cad10cbaa2593b8552159cb0dca + last_write_checksum: sha1:9ca47ba2c537b019402fb38be51ebaefc8812457 + pristine_git_object: 8c6ed8b2426896672864b75cbb739202b733543d src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:52f8dc6df7430622882b02e8d01d8da02e4e998f diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 39e96f6b..4baac419 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.3.6 + version: 2.3.8 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 539c318e..793883c1 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -41,7 +41,7 @@ targets: sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:3cdb686b793df49b7b8b8ad1f8ea3bfda1ff762c3b130004d9d959024a40ae7b + codeSamplesRevisionDigest: sha256:94536530850d56d39c06a48a1f9f08e6d6ad28227d32a7d81dce0240d189b418 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 0e124f22..8446f42c 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.3.6" +__version__: str = "2.3.8" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.3.6 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.3.8 2.879.6 1.0.0 mistralai" try: if __package__ is not None: From 2d01b47039b9320ad0975e4d3cf43b0df4465a73 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 14:21:59 +0200 Subject: [PATCH 45/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.4.0rc1=20(#487)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.761.1 * chore: align pyproject.toml and uv.lock to version 2.4.0rc1 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 15 ++++++++------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- RELEASES.md | 12 +++++++++++- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 ++-- uv.lock | 2 +- 7 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 67f39955..7878fbb0 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,15 +5,15 @@ management: docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.3.8 - configChecksum: 601a907de4437b981061110787b408ca + releaseVersion: 2.4.0rc1 + configChecksum: 37cfe845ddc874d5bfaff2f5469c77a6 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 86f6cf88-f9de-4064-844b-4b570ddc54ea - pristine_commit_hash: fd469ca531c74164057fd6c5a7639514a1f171ec - pristine_tree_hash: 0a8e0a5a864cfa8571bd95bb26af5c7b3a5e3d2b + generation_id: 684c54ad-6be6-46e4-a6a4-98d0c0c6d73c + pristine_commit_hash: b38e7dd6ebfc7808f274179d769c143251e7738c + pristine_tree_hash: b35e20fb7be2ad57d130469d2a27a65c1a48d2c3 features: python: acceptHeaders: 3.0.0 @@ -61,6 +61,7 @@ trackedFiles: id: 89aa447020cd last_write_checksum: sha1:f84632c81029fcdda8c3b0c768d02b836fc80526 pristine_git_object: 8d79f0abb72526f1fb34a4c03e5bba612c6ba2ae + deleted: true USAGE.md: id: 3aed33ce6e6f last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f @@ -3227,8 +3228,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:72f18d049dc2e14a6e226eb0caf0dd808b9f56d0 - pristine_git_object: 8446f42c5d58377a883e8fe44d9328239aaeb693 + last_write_checksum: sha1:36479cb4f65388455e0b8e579112be34ddb804ef + pristine_git_object: 00489c97733f199667a8a0eb4c0a3d2b18e31793 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4baac419..04123b35 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.3.8 + version: 2.4.0rc1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 793883c1..6ffafcce 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -41,7 +41,7 @@ targets: sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:94536530850d56d39c06a48a1f9f08e6d6ad28227d32a7d81dce0240d189b418 + codeSamplesRevisionDigest: sha256:5d5b9fd99aad8f9c2e4901dd0dbfe9041b5d6ffb973efcce61d819c093483697 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/RELEASES.md b/RELEASES.md index c7adc373..bb939880 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -558,4 +558,14 @@ Based on: ### Generated - [python v2.3.2] . ### Releases -- [PyPI v2.3.2] https://pypi.org/project/mistralai/2.3.2 - . \ No newline at end of file +- [PyPI v2.3.2] https://pypi.org/project/mistralai/2.3.2 - . + +## 2026-04-14 12:16:24 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.0rc1] . +### Releases +- [PyPI v2.4.0rc1] https://pypi.org/project/mistralai/2.4.0rc1 - . \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d2621cf6..185bf588 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.3.2" +version = "2.4.0rc1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 8446f42c..00489c97 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.3.8" +__version__: str = "2.4.0rc1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.3.8 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.0rc1 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/uv.lock b/uv.lock index ab6bd55d..de83af8f 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.3.2" +version = "2.4.0rc1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 27be1e2539ff171aac707d4d29202cfd96f8e0d0 Mon Sep 17 00:00:00 2001 From: Nicolas Faurie Date: Tue, 14 Apr 2026 17:42:53 +0200 Subject: [PATCH 46/82] Workflow Payload Encoding: Add missing storage providers (#488) * Workflow Payload Encoding: Add missing storage providers * Install extra dependencies for custom code lint --- scripts/lint_custom_code.sh | 4 +- src/mistralai/extra/py.typed | 1 + .../extra/tests/test_workflow_encoding.py | 134 ++++++++++++++++++ .../workflows/encoding/storage/_azure.py | 76 ++++++++++ .../extra/workflows/encoding/storage/_gcs.py | 81 +++++++++++ .../extra/workflows/encoding/storage/_s3.py | 111 +++++++++++++++ 6 files changed, 405 insertions(+), 2 deletions(-) create mode 100644 src/mistralai/extra/py.typed create mode 100644 src/mistralai/extra/tests/test_workflow_encoding.py create mode 100644 src/mistralai/extra/workflows/encoding/storage/_azure.py create mode 100644 src/mistralai/extra/workflows/encoding/storage/_gcs.py create mode 100644 src/mistralai/extra/workflows/encoding/storage/_s3.py diff --git a/scripts/lint_custom_code.sh b/scripts/lint_custom_code.sh index 4baa3d88..872e2551 100755 --- a/scripts/lint_custom_code.sh +++ b/scripts/lint_custom_code.sh @@ -27,7 +27,7 @@ echo "-> running on examples" uv run mypy examples/ \ --exclude 'audio/' || ERRORS=1 echo "-> running on extra" -uv run mypy src/mistralai/extra/ || ERRORS=1 +uv run --all-extras mypy src/mistralai/extra/ || ERRORS=1 echo "-> running on hooks" uv run mypy src/mistralai/client/_hooks/ \ --exclude __init__.py --exclude sdkhooks.py --exclude types.py || ERRORS=1 @@ -48,7 +48,7 @@ echo "Running pyright..." # TODO: Uncomment once the examples are fixed # uv run pyright examples/ || ERRORS=1 echo "-> running on extra" -uv run pyright src/mistralai/extra/ || ERRORS=1 +uv run --all-extras pyright src/mistralai/extra/ || ERRORS=1 echo "-> running on hooks" uv run pyright src/mistralai/client/_hooks/ || ERRORS=1 echo "-> running on azure hooks" diff --git a/src/mistralai/extra/py.typed b/src/mistralai/extra/py.typed new file mode 100644 index 00000000..9df62a6e --- /dev/null +++ b/src/mistralai/extra/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. The package enables type hints. \ No newline at end of file diff --git a/src/mistralai/extra/tests/test_workflow_encoding.py b/src/mistralai/extra/tests/test_workflow_encoding.py new file mode 100644 index 00000000..3703012b --- /dev/null +++ b/src/mistralai/extra/tests/test_workflow_encoding.py @@ -0,0 +1,134 @@ +"""Tests for workflow encoding configuration lifecycle.""" + +import gc + +import pytest +from pydantic import SecretStr + +from mistralai.client import Mistral +from mistralai.client._hooks.workflow_encoding_hook import ( + _workflow_configs, + _ENCODING_CONFIG_ID_ATTR, + configure_workflow_encoding, +) +from mistralai.extra.workflows import ( + WorkflowEncodingConfig, + PayloadEncryptionConfig, + PayloadEncryptionMode, +) + + +@pytest.fixture +def encryption_config() -> WorkflowEncodingConfig: + """Create a test encryption config.""" + return WorkflowEncodingConfig( + payload_encryption=PayloadEncryptionConfig( + mode=PayloadEncryptionMode.FULL, + main_key=SecretStr("0" * 64), # 256-bit key in hex + ) + ) + + +def test_payload_encoder_cleanup_on_client_gc(encryption_config: WorkflowEncodingConfig): + """Test that PayloadEncoder is cleaned up when client is garbage collected.""" + initial_config_count = len(_workflow_configs) + + # Create client and configure encoding + client = Mistral(api_key="test-key") + configure_workflow_encoding( + encryption_config, + namespace="test-namespace", + sdk_config=client.sdk_configuration, + ) + + # Verify config was added + config_id = getattr(client.sdk_configuration, _ENCODING_CONFIG_ID_ATTR) + assert config_id is not None + assert config_id in _workflow_configs + assert len(_workflow_configs) == initial_config_count + 1 + + # Delete client and force garbage collection + del client + gc.collect() + + # Verify config was cleaned up + assert config_id not in _workflow_configs + assert len(_workflow_configs) == initial_config_count + + +def test_multiple_clients_independent_configs(encryption_config: WorkflowEncodingConfig): + """Test that multiple clients have independent configs.""" + initial_config_count = len(_workflow_configs) + + # Create two clients with different namespaces + client1 = Mistral(api_key="test-key-1") + client2 = Mistral(api_key="test-key-2") + + configure_workflow_encoding( + encryption_config, + namespace="namespace-1", + sdk_config=client1.sdk_configuration, + ) + configure_workflow_encoding( + encryption_config, + namespace="namespace-2", + sdk_config=client2.sdk_configuration, + ) + + # Verify both configs exist + config_id1 = getattr(client1.sdk_configuration, _ENCODING_CONFIG_ID_ATTR) + config_id2 = getattr(client2.sdk_configuration, _ENCODING_CONFIG_ID_ATTR) + assert config_id1 != config_id2 + assert len(_workflow_configs) == initial_config_count + 2 + + # Verify namespaces are independent + assert _workflow_configs[config_id1].namespace == "namespace-1" + assert _workflow_configs[config_id2].namespace == "namespace-2" + + # Delete first client + del client1 + gc.collect() + + # First config should be cleaned up, second should remain + assert config_id1 not in _workflow_configs + assert config_id2 in _workflow_configs + assert len(_workflow_configs) == initial_config_count + 1 + + # Delete second client + del client2 + gc.collect() + + # Both configs should be cleaned up + assert config_id2 not in _workflow_configs + assert len(_workflow_configs) == initial_config_count + + +def test_reconfigure_same_client(encryption_config: WorkflowEncodingConfig): + """Test that reconfiguring the same client updates the config.""" + client = Mistral(api_key="test-key") + + # Initial configuration + configure_workflow_encoding( + encryption_config, + namespace="namespace-v1", + sdk_config=client.sdk_configuration, + ) + + config_id = getattr(client.sdk_configuration, _ENCODING_CONFIG_ID_ATTR) + assert _workflow_configs[config_id].namespace == "namespace-v1" + + # Reconfigure with different namespace + configure_workflow_encoding( + encryption_config, + namespace="namespace-v2", + sdk_config=client.sdk_configuration, + ) + + # Should use same config_id but updated namespace + assert getattr(client.sdk_configuration, _ENCODING_CONFIG_ID_ATTR) == config_id + assert _workflow_configs[config_id].namespace == "namespace-v2" + + # Cleanup + del client + gc.collect() + assert config_id not in _workflow_configs diff --git a/src/mistralai/extra/workflows/encoding/storage/_azure.py b/src/mistralai/extra/workflows/encoding/storage/_azure.py new file mode 100644 index 00000000..e62d9926 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/storage/_azure.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from typing import Any, cast + +from azure.core.exceptions import ResourceNotFoundError +from azure.storage.blob.aio import BlobServiceClient +from .blob_storage import BlobNotFoundError, BlobStorage + + +class AzureBlobStorage(BlobStorage): + def __init__( + self, + container_name: str, + azure_connection_string: str, + prefix: str | None = None, + ): + self.container_name = container_name + self.connection_string = azure_connection_string + self.prefix = prefix or "" + self._service_client: BlobServiceClient | None = None + self._container_client: Any = None + + def _get_full_key(self, key: str) -> str: + if not self.prefix: + return key + if key.startswith(self.prefix): + return key + return f"{self.prefix}/{key}" + + async def __aenter__(self) -> "AzureBlobStorage": + self._service_client = BlobServiceClient.from_connection_string( + self.connection_string + ) + assert self._service_client is not None + self._container_client = self._service_client.get_container_client( + self.container_name + ) + return self + + async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: + if self._service_client: + await self._service_client.close() + + async def upload_blob(self, key: str, content: bytes) -> str: + full_key = self._get_full_key(key) + blob_client = self._container_client.get_blob_client(full_key) + await blob_client.upload_blob(content, overwrite=True) + return cast(str, blob_client.url) + + async def get_blob(self, key: str) -> bytes: + full_key = self._get_full_key(key) + blob_client = self._container_client.get_blob_client(full_key) + try: + stream = await blob_client.download_blob() + return cast(bytes, await stream.readall()) + except ResourceNotFoundError as e: + raise BlobNotFoundError(f"Blob not found: {key}") from e + + async def get_blob_properties(self, key: str) -> dict[str, Any] | None: + full_key = self._get_full_key(key) + blob_client = self._container_client.get_blob_client(full_key) + try: + props = await blob_client.get_blob_properties() + return {"size": props.size, "last_modified": props.last_modified} + except ResourceNotFoundError: + return None + + async def delete_blob(self, key: str) -> None: + full_key = self._get_full_key(key) + blob_client = self._container_client.get_blob_client(full_key) + await blob_client.delete_blob() + + async def blob_exists(self, key: str) -> bool: + full_key = self._get_full_key(key) + blob_client = self._container_client.get_blob_client(full_key) + return cast(bool, await blob_client.exists()) diff --git a/src/mistralai/extra/workflows/encoding/storage/_gcs.py b/src/mistralai/extra/workflows/encoding/storage/_gcs.py new file mode 100644 index 00000000..c5e37d60 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/storage/_gcs.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from typing import Any, cast + +import aiohttp +from gcloud.aio.storage import Storage + +from .blob_storage import BlobNotFoundError, BlobStorage + + +class GCSBlobStorage(BlobStorage): + def __init__(self, bucket_id: str, prefix: str | None = None): + self.bucket_id = bucket_id + self.prefix = prefix or "" + self._storage: Storage | None = None + self._session: aiohttp.ClientSession | None = None + + def _get_full_key(self, key: str) -> str: + if not self.prefix: + return key + if key.startswith(self.prefix): + return key + return f"{self.prefix}/{key}" + + async def __aenter__(self) -> "GCSBlobStorage": + self._session = aiohttp.ClientSession() + self._storage = Storage(session=self._session) + return self + + async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: + if self._storage: + await self._storage.close() + if self._session: + await self._session.close() + + async def upload_blob(self, key: str, content: bytes) -> str: + full_key = self._get_full_key(key) + assert self._storage is not None + response = await self._storage.upload(self.bucket_id, full_key, content) + return str(response.get("selfLink")) + + async def get_blob(self, key: str) -> bytes: + full_key = self._get_full_key(key) + assert self._storage is not None + try: + content = await self._storage.download(self.bucket_id, full_key) + return cast(bytes, content) + except Exception as e: + if "404" in str(e) or "Not Found" in str(e): + raise BlobNotFoundError(f"Blob not found: {key}") from e + raise + + async def get_blob_properties(self, key: str) -> dict[str, Any] | None: + full_key = self._get_full_key(key) + assert self._storage is not None + try: + metadata = await self._storage.download_metadata(self.bucket_id, full_key) + return { + "size": int(metadata.get("size", 0)), + "last_modified": metadata.get("updated"), + } + except Exception as e: + if "404" in str(e) or "Not Found" in str(e): + return None + raise + + async def delete_blob(self, key: str) -> None: + full_key = self._get_full_key(key) + assert self._storage is not None + await self._storage.delete(self.bucket_id, full_key) + + async def blob_exists(self, key: str) -> bool: + full_key = self._get_full_key(key) + assert self._storage is not None + try: + await self._storage.download_metadata(self.bucket_id, full_key) + return True + except Exception as e: + if "404" in str(e) or "Not Found" in str(e): + return False + raise diff --git a/src/mistralai/extra/workflows/encoding/storage/_s3.py b/src/mistralai/extra/workflows/encoding/storage/_s3.py new file mode 100644 index 00000000..4a0ce063 --- /dev/null +++ b/src/mistralai/extra/workflows/encoding/storage/_s3.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from typing import Any, cast + +import aioboto3 # type: ignore[import-untyped] +from botocore.exceptions import ClientError # type: ignore[import-untyped] + +from .blob_storage import BlobNotFoundError, BlobStorage + + +class S3BlobStorage(BlobStorage): + def __init__( + self, + bucket_name: str, + prefix: str | None = None, + region_name: str | None = None, + endpoint_url: str | None = None, + aws_access_key_id: str | None = None, + aws_secret_access_key: str | None = None, + ): + self.bucket_name = bucket_name + self.prefix = prefix or "" + self.region_name = region_name + self.endpoint_url = endpoint_url + self.aws_access_key_id = aws_access_key_id + self.aws_secret_access_key = aws_secret_access_key + self._session: aioboto3.Session | None = None + self._client: Any = None + + def _get_full_key(self, key: str) -> str: + if not self.prefix: + return key + if key.startswith(self.prefix): + return key + return f"{self.prefix}/{key}" + + async def __aenter__(self) -> "S3BlobStorage": + self._session = aioboto3.Session() + assert self._session is not None + kwargs: dict[str, Any] = {} + if self.region_name: + kwargs["region_name"] = self.region_name + if self.endpoint_url: + kwargs["endpoint_url"] = self.endpoint_url + if self.aws_access_key_id: + kwargs["aws_access_key_id"] = self.aws_access_key_id + if self.aws_secret_access_key: + kwargs["aws_secret_access_key"] = self.aws_secret_access_key + + self._client = self._session.client("s3", **kwargs) + self._client = await self._client.__aenter__() + return self + + async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: + if self._client: + await self._client.__aexit__(exc_type, exc_val, exc_tb) + self._session = None + self._client = None + + async def upload_blob(self, key: str, content: bytes) -> str: + full_key = self._get_full_key(key) + await self._client.put_object( + Bucket=self.bucket_name, Key=full_key, Body=content + ) + endpoint = ( + self.endpoint_url + or f"https://s3.{self.region_name or 'us-east-1'}.amazonaws.com" + ) + return f"{endpoint}/{self.bucket_name}/{full_key}" + + async def get_blob(self, key: str) -> bytes: + full_key = self._get_full_key(key) + try: + response = await self._client.get_object( + Bucket=self.bucket_name, Key=full_key + ) + async with response["Body"] as stream: + return cast(bytes, await stream.read()) + except ClientError as e: + if e.response.get("Error", {}).get("Code") == "NoSuchKey": + raise BlobNotFoundError(f"Blob not found: {key}") from e + raise + + async def get_blob_properties(self, key: str) -> dict[str, Any] | None: + full_key = self._get_full_key(key) + try: + response = await self._client.head_object( + Bucket=self.bucket_name, Key=full_key + ) + return { + "size": response["ContentLength"], + "last_modified": response["LastModified"], + } + except ClientError as e: + if e.response.get("Error", {}).get("Code") in ("NoSuchKey", "404"): + return None + raise + + async def delete_blob(self, key: str) -> None: + full_key = self._get_full_key(key) + await self._client.delete_object(Bucket=self.bucket_name, Key=full_key) + + async def blob_exists(self, key: str) -> bool: + full_key = self._get_full_key(key) + try: + await self._client.head_object(Bucket=self.bucket_name, Key=full_key) + return True + except ClientError as e: + if e.response.get("Error", {}).get("Code") in ("NoSuchKey", "404"): + return False + raise From 044162527d5f8731855f20cfa41c6d758db36fa5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 17:55:26 +0200 Subject: [PATCH 47/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.4.0rc2=20(#489)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.761.1 * chore: align pyproject.toml and uv.lock to version 2.4.0rc2 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 14 +++++++------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- RELEASES.md | 12 +++++++++++- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 ++-- uv.lock | 2 +- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7878fbb0..8212e9ee 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,15 +5,15 @@ management: docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.0rc1 - configChecksum: 37cfe845ddc874d5bfaff2f5469c77a6 + releaseVersion: 2.4.0rc2 + configChecksum: 822435916f81748b2fc9580eb43029ee repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 684c54ad-6be6-46e4-a6a4-98d0c0c6d73c - pristine_commit_hash: b38e7dd6ebfc7808f274179d769c143251e7738c - pristine_tree_hash: b35e20fb7be2ad57d130469d2a27a65c1a48d2c3 + generation_id: 28d59996-4b5a-4d01-9a4c-2f017c2f02d2 + pristine_commit_hash: 71f89c2b6ffddde030e27860f3138de5956489a5 + pristine_tree_hash: 9a2ffa6a1c37abcafb0dd112c54454601e8befd4 features: python: acceptHeaders: 3.0.0 @@ -3228,8 +3228,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:36479cb4f65388455e0b8e579112be34ddb804ef - pristine_git_object: 00489c97733f199667a8a0eb4c0a3d2b18e31793 + last_write_checksum: sha1:212442f71ec672052f966583b23b124b225607eb + pristine_git_object: 6796d39df27a7d7f8be41dd3c613e9c95aa2e717 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 04123b35..1c22cde5 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.0rc1 + version: 2.4.0rc2 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 6ffafcce..68a5107f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -41,7 +41,7 @@ targets: sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:5d5b9fd99aad8f9c2e4901dd0dbfe9041b5d6ffb973efcce61d819c093483697 + codeSamplesRevisionDigest: sha256:309b6cab1514d574c9483bcb4899173a42564be692fb8f7b1aff382699616def workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/RELEASES.md b/RELEASES.md index bb939880..7f425484 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -568,4 +568,14 @@ Based on: ### Generated - [python v2.4.0rc1] . ### Releases -- [PyPI v2.4.0rc1] https://pypi.org/project/mistralai/2.4.0rc1 - . \ No newline at end of file +- [PyPI v2.4.0rc1] https://pypi.org/project/mistralai/2.4.0rc1 - . + +## 2026-04-14 15:44:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.0rc2] . +### Releases +- [PyPI v2.4.0rc2] https://pypi.org/project/mistralai/2.4.0rc2 - . \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 185bf588..34750e2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.0rc1" +version = "2.4.0rc2" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 00489c97..6796d39d 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.0rc1" +__version__: str = "2.4.0rc2" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.0rc1 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.0rc2 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/uv.lock b/uv.lock index de83af8f..6ea881f9 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.0rc1" +version = "2.4.0rc2" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From c821946a1bd0e439c77dcf651c04170ef96097da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 14:01:00 +0200 Subject: [PATCH 48/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.4.0=20(#491)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.761.1 * chore: align pyproject.toml and uv.lock to version 2.4.0 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 14 +++++++------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 2 +- RELEASES.md | 12 +++++++++++- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 ++-- uv.lock | 2 +- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8212e9ee..1064161a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -5,15 +5,15 @@ management: docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.0rc2 - configChecksum: 822435916f81748b2fc9580eb43029ee + releaseVersion: 2.4.0 + configChecksum: 106560b01230037a615e45a3ba82c612 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 28d59996-4b5a-4d01-9a4c-2f017c2f02d2 - pristine_commit_hash: 71f89c2b6ffddde030e27860f3138de5956489a5 - pristine_tree_hash: 9a2ffa6a1c37abcafb0dd112c54454601e8befd4 + generation_id: 02d6816b-7e5c-4764-b044-5ce0c3d87ede + pristine_commit_hash: bcb4cb005b45b822f3b3d8b50ccd4e507683f167 + pristine_tree_hash: 47ff262921294673a501861304400d77fabb4d3d features: python: acceptHeaders: 3.0.0 @@ -3228,8 +3228,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:212442f71ec672052f966583b23b124b225607eb - pristine_git_object: 6796d39df27a7d7f8be41dd3c613e9c95aa2e717 + last_write_checksum: sha1:62503452c03fc40a489df46113bd64d8fb407c56 + pristine_git_object: aa3edd4f8d0b89c2c9890781320b44a52340e511 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1c22cde5..6a7a51ce 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.0rc2 + version: 2.4.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 68a5107f..9f48eedd 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -41,7 +41,7 @@ targets: sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:309b6cab1514d574c9483bcb4899173a42564be692fb8f7b1aff382699616def + codeSamplesRevisionDigest: sha256:4f85e638c528b022fb052ca92bb487df74eaa9fff37bc54a8bbe79474891e3d2 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/RELEASES.md b/RELEASES.md index 7f425484..1217ae7b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -578,4 +578,14 @@ Based on: ### Generated - [python v2.4.0rc2] . ### Releases -- [PyPI v2.4.0rc2] https://pypi.org/project/mistralai/2.4.0rc2 - . \ No newline at end of file +- [PyPI v2.4.0rc2] https://pypi.org/project/mistralai/2.4.0rc2 - . + +## 2026-04-16 10:13:01 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.0] . +### Releases +- [PyPI v2.4.0] https://pypi.org/project/mistralai/2.4.0 - . \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 34750e2c..e2fffb41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.0rc2" +version = "2.4.0" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 6796d39d..aa3edd4f 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.0rc2" +__version__: str = "2.4.0" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.0rc2 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.0 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/uv.lock b/uv.lock index 6ea881f9..636bfa04 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.0rc2" +version = "2.4.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 1351073b35cb6bc7bfc167f29fabf7741daeb7f9 Mon Sep 17 00:00:00 2001 From: Simon Van de Kerckhove Date: Mon, 20 Apr 2026 09:38:07 +0200 Subject: [PATCH 49/82] fix(otel): serialization of some attributes (#493) --- .../{serialization.py => formatting.py} | 41 +++++---- src/mistralai/extra/observability/otel.py | 39 ++++---- ...st_serialization.py => test_formatting.py} | 88 +++++++++---------- .../extra/tests/test_otel_tracing.py | 4 +- 4 files changed, 83 insertions(+), 89 deletions(-) rename src/mistralai/extra/observability/{serialization.py => formatting.py} (84%) rename src/mistralai/extra/tests/{test_serialization.py => test_formatting.py} (83%) diff --git a/src/mistralai/extra/observability/serialization.py b/src/mistralai/extra/observability/formatting.py similarity index 84% rename from src/mistralai/extra/observability/serialization.py rename to src/mistralai/extra/observability/formatting.py index de3bfce2..34dc9aed 100644 --- a/src/mistralai/extra/observability/serialization.py +++ b/src/mistralai/extra/observability/formatting.py @@ -1,7 +1,9 @@ -"""Serialization helpers for converting Mistral API payloads to OTEL GenAI convention formats. +"""Formatting helpers for converting Mistral API payloads to OTEL GenAI convention formats. -These are pure functions with no OTEL dependencies — they transform dicts to JSON strings +These are pure functions with no OTEL dependencies — they transform dicts to dicts matching the GenAI semantic convention schemas for input/output messages and tool definitions. +The caller is responsible for the final JSON serialization (single json.dumps on the whole +collection) before setting span attributes. Schemas: - Input messages: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-input-messages.json @@ -9,7 +11,6 @@ - Tool definitions: https://github.com/Cirilla-zmh/semantic-conventions/blob/cc4d07e7e56b80e9aa5904a3d524c134699da37f/docs/gen-ai/gen-ai-tool-definitions.json """ -import json from typing import Any @@ -72,8 +73,8 @@ def _tool_calls_to_parts(tool_calls: list[dict] | None) -> list[dict]: return parts -def serialize_input_message(message: dict[str, Any]) -> str: - """Serialize a single input message per the OTEL GenAI convention. +def format_input_message(message: dict[str, Any]) -> dict[str, Any]: + """Format a single input message per the OTEL GenAI convention. Schema: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-input-messages.json ChatMessage: {role (required), parts (required), name?} @@ -89,7 +90,7 @@ def serialize_input_message(message: dict[str, Any]) -> str: part: dict = {"type": "tool_call_response", "response": message.get("result")} if (tool_call_id := message.get("tool_call_id")) is not None: part["id"] = tool_call_id - return json.dumps({"role": "tool", "parts": [part]}) + return {"role": "tool", "parts": [part]} # TODO: may need to handle other types for conversations (e.g. agent handoff) @@ -109,11 +110,11 @@ def serialize_input_message(message: dict[str, Any]) -> str: parts.extend(_content_to_parts(message.get("content"))) parts.extend(_tool_calls_to_parts(message.get("tool_calls"))) - return json.dumps({"role": role, "parts": parts}) + return {"role": role, "parts": parts} -def serialize_output_message(choice: dict[str, Any]) -> str: - """Serialize a single output choice/message per the OTEL GenAI convention. +def format_output_message(choice: dict[str, Any]) -> dict[str, Any]: + """Format a single output choice/message per the OTEL GenAI convention. Schema: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/gen-ai-output-messages.json OutputMessage: {role (required), parts (required), finish_reason (required), name?} @@ -123,16 +124,14 @@ def serialize_output_message(choice: dict[str, Any]) -> str: parts.extend(_content_to_parts(message.get("content"))) parts.extend(_tool_calls_to_parts(message.get("tool_calls"))) - return json.dumps( - { - "role": message.get("role", "assistant"), - "parts": parts, - "finish_reason": choice.get("finish_reason", ""), - } - ) + return { + "role": message.get("role", "assistant"), + "parts": parts, + "finish_reason": choice.get("finish_reason", ""), + } -def serialize_tool_definition(tool: dict[str, Any]) -> str | None: +def format_tool_definition(tool: dict[str, Any]) -> dict[str, Any] | None: """Flatten a Mistral tool definition to the OTEL GenAI convention schema. Mistral format: {"type": "function", "function": {"name": ..., "description": ..., "parameters": ...}} @@ -148,9 +147,9 @@ def serialize_tool_definition(tool: dict[str, Any]) -> str | None: name = func.get("name") if not name: return None - serialized: dict = {"type": type, "name": name} + formatted: dict = {"type": type, "name": name} if (description := func.get("description")) is not None: - serialized["description"] = description + formatted["description"] = description if (parameters := func.get("parameters")) is not None: - serialized["parameters"] = parameters - return json.dumps(serialized) + formatted["parameters"] = parameters + return formatted diff --git a/src/mistralai/extra/observability/otel.py b/src/mistralai/extra/observability/otel.py index 6ea37389..7c75271e 100644 --- a/src/mistralai/extra/observability/otel.py +++ b/src/mistralai/extra/observability/otel.py @@ -23,10 +23,10 @@ from opentelemetry.baggage import get_baggage from opentelemetry.trace import Span, Status, StatusCode, Tracer, set_span_in_context -from .serialization import ( - serialize_input_message, - serialize_output_message, - serialize_tool_definition, +from .formatting import ( + format_input_message, + format_output_message, + format_tool_definition, ) from .streaming import accumulate_chunks_to_response_dict, parse_sse_chunks @@ -185,18 +185,20 @@ def _enrich_request_genai_attrs( # Chat/agent completion API uses messages in request body; conversation API uses inputs input_messages = request_body.get("messages") or request_body.get("inputs") if isinstance(input_messages, str): - attributes[gen_ai_attributes.GEN_AI_INPUT_MESSAGES] = [ - serialize_input_message({"role": "user", "content": input_messages}) - ] + attributes[gen_ai_attributes.GEN_AI_INPUT_MESSAGES] = json.dumps( + [format_input_message({"role": "user", "content": input_messages})] + ) elif isinstance(input_messages, list): - attributes[gen_ai_attributes.GEN_AI_INPUT_MESSAGES] = list( - map(serialize_input_message, input_messages) + attributes[gen_ai_attributes.GEN_AI_INPUT_MESSAGES] = json.dumps( + list(map(format_input_message, input_messages)) ) # Tool definitions if tools := request_body.get("tools"): - attributes[gen_ai_attributes.GEN_AI_TOOL_DEFINITIONS] = list( - filter(None, map(serialize_tool_definition, tools)) - ) + formatted_tools = list(filter(None, map(format_tool_definition, tools))) + if formatted_tools: + attributes[gen_ai_attributes.GEN_AI_TOOL_DEFINITIONS] = json.dumps( + formatted_tools + ) # TODO: For agent start conversation, add agent id and version attributes here ? set_available_attributes(span, attributes) @@ -244,8 +246,8 @@ def _enrich_response_genai_attrs( if finish_reasons: attributes[gen_ai_attributes.GEN_AI_RESPONSE_FINISH_REASONS] = finish_reasons if choices: - attributes[gen_ai_attributes.GEN_AI_OUTPUT_MESSAGES] = list( - map(serialize_output_message, choices) + attributes[gen_ai_attributes.GEN_AI_OUTPUT_MESSAGES] = json.dumps( + list(map(format_output_message, choices)) ) # Usage @@ -305,7 +307,8 @@ def _create_tool_execution_child_span( if isinstance(tool_arguments, str) else (json.dumps(tool_arguments) if tool_arguments else None), gen_ai_attributes.GEN_AI_TOOL_CALL_RESULT: tool_result - and json.dumps(tool_result), + if isinstance(tool_result, str) + else (json.dumps(tool_result) if tool_result else None), gen_ai_attributes.GEN_AI_TOOL_NAME: output.get("name"), gen_ai_attributes.GEN_AI_TOOL_TYPE: "extension", } @@ -338,9 +341,9 @@ def _create_message_output_child_span( gen_ai_attributes.GEN_AI_RESPONSE_ID: output.get("id"), gen_ai_attributes.GEN_AI_AGENT_ID: output.get("agent_id"), gen_ai_attributes.GEN_AI_RESPONSE_MODEL: output.get("model"), - gen_ai_attributes.GEN_AI_OUTPUT_MESSAGES: [ - serialize_output_message(choice_wrapper) - ], + gen_ai_attributes.GEN_AI_OUTPUT_MESSAGES: json.dumps( + [format_output_message(choice_wrapper)] + ), } set_available_attributes(child_span, message_attributes) child_span.end(end_time=end_ns) diff --git a/src/mistralai/extra/tests/test_serialization.py b/src/mistralai/extra/tests/test_formatting.py similarity index 83% rename from src/mistralai/extra/tests/test_serialization.py rename to src/mistralai/extra/tests/test_formatting.py index 3c88aa71..3dd1dee4 100644 --- a/src/mistralai/extra/tests/test_serialization.py +++ b/src/mistralai/extra/tests/test_formatting.py @@ -1,26 +1,20 @@ -"""Unit tests for the OTEL serialization helpers. +"""Unit tests for the OTEL formatting helpers. Each test covers a single function with both happy-path and edge-case inputs. -The functions are pure (dict → str/list), so no OTEL setup is needed. +The functions are pure (dict -> dict/list), so no OTEL setup is needed. """ -import json import unittest -from mistralai.extra.observability.serialization import ( +from mistralai.extra.observability.formatting import ( _content_to_parts, _tool_calls_to_parts, - serialize_input_message, - serialize_output_message, - serialize_tool_definition, + format_input_message, + format_output_message, + format_tool_definition, ) -def _parse(json_str: str): - """Shorthand: parse a JSON string returned by a serialize_* function.""" - return json.loads(json_str) - - class TestContentToParts(unittest.TestCase): def test_none(self): self.assertEqual(_content_to_parts(None), []) @@ -98,7 +92,7 @@ def test_thinking_chunk_fallback_plain_string(self): ) def test_thinking_chunk_missing_thinking_field(self): - """Empty string default → str("") fallback.""" + """Empty string default -> str("") fallback.""" chunk = {"type": "thinking"} self.assertEqual( _content_to_parts([chunk]), @@ -195,7 +189,7 @@ def test_missing_arguments(self): ) def test_missing_function(self): - """No function key → empty name.""" + """No function key -> empty name.""" tc = {"id": "1"} self.assertListEqual( _tool_calls_to_parts([tc]), @@ -210,11 +204,11 @@ def test_function_is_none(self): ) -class TestSerializeInputMessage(unittest.TestCase): +class TestFormatInputMessage(unittest.TestCase): # -- Happy paths (role-based messages) ------------------------------------ def test_user_message(self): - result = _parse(serialize_input_message({"role": "user", "content": "hi"})) + result = format_input_message({"role": "user", "content": "hi"}) self.assertDictEqual( result, { @@ -224,9 +218,7 @@ def test_user_message(self): ) def test_system_message(self): - result = _parse( - serialize_input_message({"role": "system", "content": "be helpful"}) - ) + result = format_input_message({"role": "system", "content": "be helpful"}) self.assertDictEqual( result, { @@ -241,7 +233,7 @@ def test_assistant_message_with_tool_calls(self): "content": "", "tool_calls": [{"id": "tc1", "function": {"name": "f", "arguments": "{}"}}], } - result = _parse(serialize_input_message(msg)) + result = format_input_message(msg) self.assertEqual(result["role"], "assistant") # text part from content + tool_call part self.assertListEqual( @@ -251,7 +243,7 @@ def test_assistant_message_with_tool_calls(self): def test_tool_message(self): msg = {"role": "tool", "content": "22C sunny", "tool_call_id": "tc1"} - result = _parse(serialize_input_message(msg)) + result = format_input_message(msg) self.assertDictEqual( result, { @@ -264,7 +256,7 @@ def test_tool_message(self): def test_tool_message_without_tool_call_id(self): msg = {"role": "tool", "content": "result"} - result = _parse(serialize_input_message(msg)) + result = format_input_message(msg) self.assertNotIn("id", result["parts"][0]) # -- Conversation entry: function.result ---------------------------------- @@ -275,7 +267,7 @@ def test_function_result_entry(self): "result": '{"status": "ok"}', "tool_call_id": "tc1", } - result = _parse(serialize_input_message(msg)) + result = format_input_message(msg) self.assertDictEqual( result, { @@ -292,13 +284,13 @@ def test_function_result_entry(self): def test_function_result_entry_without_tool_call_id(self): msg = {"type": "function.result", "result": "data"} - result = _parse(serialize_input_message(msg)) + result = format_input_message(msg) self.assertNotIn("id", result["parts"][0]) # -- Edge cases ----------------------------------------------------------- def test_missing_role_defaults_to_unknown(self): - result = _parse(serialize_input_message({"content": "orphan"})) + result = format_input_message({"content": "orphan"}) self.assertDictEqual( result, { @@ -308,17 +300,17 @@ def test_missing_role_defaults_to_unknown(self): ) def test_no_content_no_tool_calls(self): - result = _parse(serialize_input_message({"role": "user"})) + result = format_input_message({"role": "user"}) self.assertDictEqual(result, {"role": "user", "parts": []}) -class TestSerializeOutputMessage(unittest.TestCase): +class TestFormatOutputMessage(unittest.TestCase): def test_simple_assistant_response(self): choice = { "message": {"role": "assistant", "content": "hello"}, "finish_reason": "stop", } - result = _parse(serialize_output_message(choice)) + result = format_output_message(choice) self.assertDictEqual( result, { @@ -339,7 +331,7 @@ def test_tool_calls_response(self): }, "finish_reason": "tool_calls", } - result = _parse(serialize_output_message(choice)) + result = format_output_message(choice) self.assertEqual(result["finish_reason"], "tool_calls") self.assertListEqual( [p["type"] for p in result["parts"]], @@ -347,7 +339,7 @@ def test_tool_calls_response(self): ) def test_missing_message(self): - result = _parse(serialize_output_message({})) + result = format_output_message({}) self.assertDictEqual( result, { @@ -358,7 +350,7 @@ def test_missing_message(self): ) def test_message_is_none(self): - result = _parse(serialize_output_message({"message": None})) + result = format_output_message({"message": None}) self.assertDictEqual( result, { @@ -370,7 +362,7 @@ def test_message_is_none(self): def test_defaults_role_to_assistant(self): choice = {"message": {"content": "hi"}, "finish_reason": "stop"} - result = _parse(serialize_output_message(choice)) + result = format_output_message(choice) self.assertDictEqual( result, { @@ -381,7 +373,7 @@ def test_defaults_role_to_assistant(self): ) -class TestSerializeToolDefinition(unittest.TestCase): +class TestFormatToolDefinition(unittest.TestCase): def test_full_definition(self): tool = { "type": "function", @@ -391,11 +383,11 @@ def test_full_definition(self): "parameters": {"type": "object", "properties": {}}, }, } - serialized = serialize_tool_definition(tool) - self.assertIsNotNone(serialized) - assert serialized is not None + result = format_tool_definition(tool) + self.assertIsNotNone(result) + assert result is not None self.assertDictEqual( - _parse(serialized), + result, { "type": "function", "name": "get_weather", @@ -407,11 +399,11 @@ def test_full_definition(self): def test_minimal_definition(self): """Only name, no description or parameters.""" tool = {"function": {"name": "f"}} - serialized = serialize_tool_definition(tool) - self.assertIsNotNone(serialized) - assert serialized is not None + result = format_tool_definition(tool) + self.assertIsNotNone(result) + assert result is not None self.assertDictEqual( - _parse(serialized), + result, { "type": "function", "name": "f", @@ -419,23 +411,23 @@ def test_minimal_definition(self): ) def test_missing_function_returns_none(self): - self.assertIsNone(serialize_tool_definition({"type": "function"})) + self.assertIsNone(format_tool_definition({"type": "function"})) def test_empty_function_returns_none(self): - self.assertIsNone(serialize_tool_definition({"function": {}})) + self.assertIsNone(format_tool_definition({"function": {}})) def test_missing_name_returns_none(self): self.assertIsNone( - serialize_tool_definition({"function": {"description": "no name"}}) + format_tool_definition({"function": {"description": "no name"}}) ) def test_custom_type_preserved(self): tool = {"type": "custom_tool", "function": {"name": "f"}} - serialized = serialize_tool_definition(tool) - self.assertIsNotNone(serialized) - assert serialized is not None + result = format_tool_definition(tool) + self.assertIsNotNone(result) + assert result is not None self.assertDictEqual( - _parse(serialized), + result, { "type": "custom_tool", "name": "f", diff --git a/src/mistralai/extra/tests/test_otel_tracing.py b/src/mistralai/extra/tests/test_otel_tracing.py index ff30ba0c..f4673c3f 100644 --- a/src/mistralai/extra/tests/test_otel_tracing.py +++ b/src/mistralai/extra/tests/test_otel_tracing.py @@ -142,8 +142,8 @@ def _make_streaming_httpx_response(sse_body: bytes) -> httpx.Response: def _parse_json_list(span_attr): - """Parse a span attribute containing a list of JSON-encoded strings.""" - return [json.loads(m) for m in span_attr] + """Parse a span attribute containing a JSON-encoded array string.""" + return json.loads(span_attr) # -- Tests --------------------------------------------------------------------- From fed4b5be52b47cdf3272e0a97999fcef34542ec4 Mon Sep 17 00:00:00 2001 From: Simon Van de Kerckhove Date: Tue, 21 Apr 2026 13:35:28 +0200 Subject: [PATCH 50/82] fix(otel): fix concurrency bug in TracingHook span tracking (#492) * test(otel): expose concurrency bug * fix(otel): concurrency issue on spans --- src/mistralai/client/_hooks/tracing.py | 25 ++-- .../extra/tests/test_otel_tracing.py | 115 +++++++++++++++++- 2 files changed, 131 insertions(+), 9 deletions(-) diff --git a/src/mistralai/client/_hooks/tracing.py b/src/mistralai/client/_hooks/tracing.py index b353d9bd..632320ce 100644 --- a/src/mistralai/client/_hooks/tracing.py +++ b/src/mistralai/client/_hooks/tracing.py @@ -22,10 +22,12 @@ logger = logging.getLogger(__name__) +_SPAN_EXT_KEY = "_tracing_span" + + class TracingHook(BeforeRequestHook, AfterSuccessHook, AfterErrorHook): def __init__(self) -> None: self.tracing_enabled, self.tracer = get_or_create_otel_tracer() - self.request_span: Optional[Span] = None def before_request( self, hook_ctx: BeforeRequestContext, request: httpx.Request @@ -33,27 +35,34 @@ def before_request( # Refresh tracer/provider per request so tracing can be enabled if the # application configures OpenTelemetry after the client is instantiated. self.tracing_enabled, self.tracer = get_or_create_otel_tracer() - self.request_span = None - request, self.request_span = get_traced_request_and_span( + request, span = get_traced_request_and_span( tracing_enabled=self.tracing_enabled, tracer=self.tracer, - span=self.request_span, + span=None, operation_id=hook_ctx.operation_id, request=request, ) + request.extensions[_SPAN_EXT_KEY] = span return request + @staticmethod + def _get_span(response: Optional[httpx.Response]) -> Optional[Span]: + try: + return response.request.extensions.get(_SPAN_EXT_KEY) if response is not None else None + except RuntimeError: + return None + def after_success( self, hook_ctx: AfterSuccessContext, response: httpx.Response ) -> Union[httpx.Response, Exception]: + span = self._get_span(response) response = get_traced_response( tracing_enabled=self.tracing_enabled, tracer=self.tracer, - span=self.request_span, + span=span, operation_id=hook_ctx.operation_id, response=response, ) - self.request_span = None return response def after_error( @@ -63,13 +72,13 @@ def after_error( error: Optional[Exception], ) -> Union[Tuple[Optional[httpx.Response], Optional[Exception]], Exception]: if response: + span = self._get_span(response) response, error = get_response_and_error( tracing_enabled=self.tracing_enabled, tracer=self.tracer, - span=self.request_span, + span=span, operation_id=hook_ctx.operation_id, response=response, error=error, ) - self.request_span = None return response, error diff --git a/src/mistralai/extra/tests/test_otel_tracing.py b/src/mistralai/extra/tests/test_otel_tracing.py index f4673c3f..5228c9e5 100644 --- a/src/mistralai/extra/tests/test_otel_tracing.py +++ b/src/mistralai/extra/tests/test_otel_tracing.py @@ -70,6 +70,7 @@ UsageInfo, UserMessage, ) +from mistralai.client.sdk import Mistral from mistralai.extra.observability.otel import TracedResponse from mistralai.extra.run.tools import ( RunFunction, @@ -196,6 +197,9 @@ def _run_hook_lifecycle( self.assertNotIsInstance(hooked_request, Exception) assert isinstance(hooked_request, httpx.Request) + # Link response to request, as httpx.Client.send() does in real usage. + response.request = hooked_request + result = hook.after_success(AfterSuccessContext(hook_ctx), response) self.assertNotIsInstance(result, Exception) @@ -228,6 +232,9 @@ def _run_hook_error_lifecycle( self.assertNotIsInstance(hooked_request, Exception) assert isinstance(hooked_request, httpx.Request) + # Link response to request, as httpx.Client.send() does in real usage. + response.request = hooked_request + result = hook.after_error(AfterErrorContext(hook_ctx), response, error) self.assertNotIsInstance(result, Exception) @@ -1526,7 +1533,6 @@ def failing_tool(x: int) -> str: "Expected an exception event on the span", ) - # -- Baggage propagation: gen_ai.conversation.id --------------------------- def test_conversation_id_from_baggage(self): @@ -1597,6 +1603,113 @@ def test_no_conversation_id_without_baggage(self): span = self._get_single_span() self.assertNotIn("gen_ai.conversation.id", span.attributes) + # -- Concurrency: interleaved requests on shared hook ---------------------- + + def test_concurrent_async_requests_get_correct_spans(self): + """Two concurrent async chat completions through a real Mistral client. + + Uses asyncio.gather to fire two requests simultaneously through the + SDK. A mock transport with an asyncio.Event gate guarantees both + before_request hooks run before either after_success, reproducing + the interleaving that corrupts self.request_span. + + Expected: each span carries its own request model AND response id. + """ + + # Gate ensures both requests have entered the transport (i.e. both + # before_request hooks have already run) before either returns. + gate = asyncio.Event() + arrived = 0 + + async def _mock_handler(request: httpx.Request) -> httpx.Response: + nonlocal arrived + arrived += 1 + if arrived < 2: + # First request: wait for the second to arrive. + await gate.wait() + else: + # Second request: both hooks have fired, unblock the first. + gate.set() + + body = json.loads(request.content) + model = body["model"] + resp = _dump( + ChatCompletionResponse( + id=f"cmpl-{model}", + object="chat.completion", + model=model, + created=1700000000, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage(content=f"Reply from {model}"), + finish_reason="stop", + ) + ], + usage=UsageInfo( + prompt_tokens=10, + completion_tokens=5, + total_tokens=15, + ), + ) + ) + return httpx.Response(200, json=resp) + + transport = httpx.MockTransport(_mock_handler) + async_client = httpx.AsyncClient(transport=transport) + + client = Mistral( + api_key="test-key", + async_client=async_client, + ) + + async def _run(): + return await asyncio.gather( + client.chat.complete_async( + model="mistral-large-latest", + messages=[{"role": "user", "content": "A"}], + ), + client.chat.complete_async( + model="mistral-small-latest", + messages=[{"role": "user", "content": "B"}], + ), + ) + + results = asyncio.get_event_loop().run_until_complete(_run()) + + # Both calls must succeed + self.assertEqual(len(results), 2) + + # --- Verify spans --- + spans = self._get_finished_spans() + spans_by_resp = {s.attributes.get("gen_ai.response.id"): s for s in spans} + + # Both spans must have a response.id + self.assertIn( + "cmpl-mistral-large-latest", + spans_by_resp, + "Span for large model must exist", + ) + self.assertIn( + "cmpl-mistral-small-latest", + spans_by_resp, + "Span for small model must exist", + ) + + # Each span's request model must match its response + self.assertEqual( + spans_by_resp["cmpl-mistral-large-latest"].attributes.get( + "gen_ai.request.model" + ), + "mistral-large-latest", + ) + self.assertEqual( + spans_by_resp["cmpl-mistral-small-latest"].attributes.get( + "gen_ai.request.model" + ), + "mistral-small-latest", + ) + if __name__ == "__main__": unittest.main() From 6b21473ca9ef3b277ce28c33eb707e489574f464 Mon Sep 17 00:00:00 2001 From: andreaonofrei01 Date: Tue, 21 Apr 2026 14:35:53 +0200 Subject: [PATCH 51/82] fix(conversations): dedupe deferred-responses block in run_async (#496) The Speakeasy regen in #484 re-emitted the deferred-response handling block on top of the existing one inside the sdk-class-body custom region, leaving two identical copies in run_async. The second copy unconditionally reset pending_tool_confirmations to None, silently dropping the server-side HITL confirmations computed by the first. Removes the duplicate block so HITL confirmations are preserved. --- src/mistralai/client/conversations.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index f770ae92..ed2e0fce 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -97,25 +97,6 @@ async def run_async( from mistralai.extra.run.context import _validate_run # pylint: disable=import-outside-toplevel from mistralai.extra.run.tools import get_function_calls # pylint: disable=import-outside-toplevel - # Check if inputs contain deferred responses - process them - pending_tool_confirmations = None - if inputs and isinstance(inputs, list): - deferred_inputs = typing.cast( - List[DeferredToolCallResponse], - [i for i in inputs if _is_deferred_response(i)], - ) - other_inputs = typing.cast( - List[InputEntries], [i for i in inputs if not _is_deferred_response(i)] - ) - if deferred_inputs: - ( - processed, - pending_tool_confirmations, - ) = await _process_deferred_responses(run_ctx, deferred_inputs) - inputs = other_inputs + processed - if not pending_tool_confirmations: - pending_tool_confirmations = None - # Check if inputs contain deferred responses - process them pending_tool_confirmations = None if inputs and isinstance(inputs, list): From 320ddb8399c0ef028d19e9097584a2bb8507f7bf Mon Sep 17 00:00:00 2001 From: Antoine <33425718+anth2o@users.noreply.github.com> Date: Tue, 21 Apr 2026 14:39:11 +0200 Subject: [PATCH 52/82] clean: add same args in custom code execute_workflow_and_wait than in generated execute_workflow (#495) --- src/mistralai/client/workflows.py | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index cd34603a..e05cf77e 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -57,26 +57,40 @@ def execute_workflow_and_wait( self, workflow_identifier: str, input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, + encoded_input: OptionalNullable[ + Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] + ] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + task_queue: OptionalNullable[str] = UNSET, polling_interval: int = 5, max_attempts: Optional[int] = None, use_api_sync: bool = False, timeout_seconds: OptionalNullable[float] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> Any: """Execute a workflow and wait for its completion. Args: workflow_identifier: The workflow name or ID. input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. + encoded_input: Encoded input to the workflow, used when payload encoding is enabled. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes + task_queue: Deprecated. Use deployment_name instead. polling_interval: Seconds between status checks when polling max_attempts: Maximum number of polling attempts when polling (None for unlimited) use_api_sync: Whether to use the API's built-in sync execution capability timeout_seconds: Maximum time to wait in seconds when using API sync + retries: Override the default retry configuration for this method + server_url: Override the default server URL for this method + timeout_ms: Override the default request timeout configuration for this method in milliseconds + http_headers: Additional headers to set or replace on requests. Returns: The workflow result directly @@ -90,20 +104,32 @@ def execute_workflow_and_wait( response = self.execute_workflow( workflow_identifier=workflow_identifier, input=input, + encoded_input=encoded_input, execution_id=execution_id, wait_for_result=True, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, deployment_name=deployment_name, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) return response.result # Use polling method execution = self.execute_workflow( workflow_identifier=workflow_identifier, input=input, + encoded_input=encoded_input, execution_id=execution_id, custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, deployment_name=deployment_name, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) # Wait for completion @@ -154,26 +180,40 @@ async def execute_workflow_and_wait_async( self, workflow_identifier: str, input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, + encoded_input: OptionalNullable[ + Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] + ] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + task_queue: OptionalNullable[str] = UNSET, polling_interval: int = 5, max_attempts: Optional[int] = None, use_api_sync: bool = False, timeout_seconds: OptionalNullable[float] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> Any: """Execute a workflow and wait for its completion (async version). Args: workflow_identifier: The workflow name or ID. input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. + encoded_input: Encoded input to the workflow, used when payload encoding is enabled. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes + task_queue: Deprecated. Use deployment_name instead. polling_interval: Seconds between status checks when polling max_attempts: Maximum number of polling attempts when polling (None for unlimited) use_api_sync: Whether to use the API's built-in sync execution capability timeout_seconds: Maximum time to wait in seconds when using API sync + retries: Override the default retry configuration for this method + server_url: Override the default server URL for this method + timeout_ms: Override the default request timeout configuration for this method in milliseconds + http_headers: Additional headers to set or replace on requests. Returns: The workflow result directly @@ -187,11 +227,17 @@ async def execute_workflow_and_wait_async( response = await self.execute_workflow_async( workflow_identifier=workflow_identifier, input=input, + encoded_input=encoded_input, execution_id=execution_id, wait_for_result=True, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, deployment_name=deployment_name, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) return response.result @@ -199,9 +245,15 @@ async def execute_workflow_and_wait_async( execution = await self.execute_workflow_async( workflow_identifier=workflow_identifier, input=input, + encoded_input=encoded_input, execution_id=execution_id, custom_tracing_attributes=custom_tracing_attributes, + task_queue=task_queue, deployment_name=deployment_name, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, ) # Wait for completion From fab91b50dd3d5a346186951e949bb1a0e3c0814f Mon Sep 17 00:00:00 2001 From: Antoine <33425718+anth2o@users.noreply.github.com> Date: Tue, 21 Apr 2026 15:08:16 +0200 Subject: [PATCH 53/82] clean: remove encoded_input for execute_workflow_and_wait_async (#497) --- src/mistralai/client/workflows.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index e05cf77e..fa53cc17 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -57,9 +57,6 @@ def execute_workflow_and_wait( self, workflow_identifier: str, input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, - encoded_input: OptionalNullable[ - Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] - ] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -78,7 +75,6 @@ def execute_workflow_and_wait( Args: workflow_identifier: The workflow name or ID. input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. - encoded_input: Encoded input to the workflow, used when payload encoding is enabled. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes @@ -104,7 +100,6 @@ def execute_workflow_and_wait( response = self.execute_workflow( workflow_identifier=workflow_identifier, input=input, - encoded_input=encoded_input, execution_id=execution_id, wait_for_result=True, timeout_seconds=timeout_seconds, @@ -121,7 +116,6 @@ def execute_workflow_and_wait( execution = self.execute_workflow( workflow_identifier=workflow_identifier, input=input, - encoded_input=encoded_input, execution_id=execution_id, custom_tracing_attributes=custom_tracing_attributes, task_queue=task_queue, @@ -180,9 +174,6 @@ async def execute_workflow_and_wait_async( self, workflow_identifier: str, input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, - encoded_input: OptionalNullable[ - Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] - ] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -201,7 +192,6 @@ async def execute_workflow_and_wait_async( Args: workflow_identifier: The workflow name or ID. input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. - encoded_input: Encoded input to the workflow, used when payload encoding is enabled. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes @@ -227,7 +217,6 @@ async def execute_workflow_and_wait_async( response = await self.execute_workflow_async( workflow_identifier=workflow_identifier, input=input, - encoded_input=encoded_input, execution_id=execution_id, wait_for_result=True, timeout_seconds=timeout_seconds, @@ -245,7 +234,6 @@ async def execute_workflow_and_wait_async( execution = await self.execute_workflow_async( workflow_identifier=workflow_identifier, input=input, - encoded_input=encoded_input, execution_id=execution_id, custom_tracing_attributes=custom_tracing_attributes, task_queue=task_queue, From ed26a8accc8fc1a0e9a444b811a05e21662704db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 15:42:24 +0200 Subject: [PATCH 54/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.4.1=20(#498)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.conversations.restart_stream()`: * `request` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added** * `mistral.workflows.executions.get_workflow_execution_trace_events()`: `response` **Changed** (Breaking ⚠️) * `mistral.workflows.executions.get_workflow_execution_trace_summary()`: `response` **Changed** (Breaking ⚠️) * `mistral.workflows.executions.get_workflow_execution_trace_otel()`: `response` **Changed** (Breaking ⚠️) * `mistral.beta.connectors.update()`: `response.tools` **Removed** (Breaking ⚠️) * `mistral.beta.connectors.get()`: `response.tools` **Removed** (Breaking ⚠️) * `mistral.beta.connectors.list()`: `response.items[].tools` **Removed** (Breaking ⚠️) * `mistral.beta.connectors.create()`: `response.tools` **Removed** (Breaking ⚠️) * `mistral.beta.agents.get_version()`: `response.metadata` **Changed** (Breaking ⚠️) * `mistral.beta.agents.list_versions()`: `response.[].metadata` **Changed** (Breaking ⚠️) * `mistral.beta.agents.update_version()`: `response.metadata` **Changed** (Breaking ⚠️) * `mistral.audio.speech.complete()`: `request.metadata` **Changed** (Breaking ⚠️) * `mistral.audio.voices.get_sample_audio()`: `response.status[200]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.start()`: * `request` **Changed** (Breaking ⚠️) * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added** * `mistral.beta.conversations.list()`: `response.[]` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.get()`: `response` **Changed** (Breaking ⚠️) * `mistral.beta.agents.update()`: * `request.metadata` **Changed** (Breaking ⚠️) * `response.metadata` **Changed** (Breaking ⚠️) * `mistral.beta.agents.get()`: `response.metadata` **Changed** (Breaking ⚠️) * `mistral.beta.agents.list()`: `response.[].metadata` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.restart()`: * `request` **Changed** (Breaking ⚠️) * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added** * `mistral.beta.conversations.start_stream()`: * `request` **Changed** (Breaking ⚠️) * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added** * `mistral.beta.agents.create()`: * `request.metadata` **Changed** (Breaking ⚠️) * `response.metadata` **Changed** (Breaking ⚠️) * `mistral.beta.conversations.get_history()`: `response.entries[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added** * `mistral.classifiers.moderate_chat()`: * `request.inputs.union(Array<>)[].union(system).content.union(Array)[].union(thinking).signature` **Added** * `mistral.beta.conversations.get_messages()`: `response.messages[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added** * `mistral.beta.connectors.get_authentication_methods()`: **Added** * `mistral.beta.conversations.append()`: * `request.inputs.union(Array)[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added** * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added** * `mistral.beta.rag.ingestion_pipeline_configurations.list()`: **Added** * `mistral.beta.connectors.delete_user_credentials()`: **Added** * `mistral.beta.connectors.delete_workspace_credentials()`: **Added** * `mistral.beta.libraries.create()`: `request.owner_type` **Added** * `mistral.beta.libraries.documents.text_content()`: `request` **Changed** * `mistral.beta.observability.chat_completion_events.fields.list()`: `response.field_definitions[].type.enum(map)` **Added** * `mistral.beta.connectors.delete_organization_credentials()`: **Added** * `mistral.beta.connectors.create_or_update_user_credentials()`: **Added** * `mistral.beta.connectors.get_auth_url()`: `request.credentials_name` **Added** * `mistral.beta.connectors.list_tools()`: `request.credentials_name` **Added** * `mistral.beta.connectors.list_user_credentials()`: **Added** * `mistral.beta.connectors.create_or_update_workspace_credentials()`: **Added** * `mistral.chat.complete()`: * `request` **Changed** * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added** * `mistral.chat.stream()`: * `request` **Changed** * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added** * `mistral.fim.complete()`: * `request` **Changed** * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added** * `mistral.fim.stream()`: * `request` **Changed** * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added** * `mistral.agents.complete()`: * `request` **Changed** * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added** * `mistral.agents.stream()`: * `request` **Changed** * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added** * `mistral.beta.conversations.append_stream()`: * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added** * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added** * `mistral.classifiers.classify_chat()`: * `request.input.union(InstructRequest).messages[].union(tool).content.union(Array)[].union(thinking).signature` **Added** * `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed** * `mistral.workflows.execute_workflow()`: * `request.extensions` **Added** * `response.union(WorkflowExecutionResponse).run_id` **Added** * `mistral.workflows.execute_workflow_registration()`: * `request.extensions` **Added** * `response.union(WorkflowExecutionResponse).run_id` **Added** * `mistral.workflows.get_workflow()`: `response.workflow.on_behalf_of` **Added** * `mistral.workflows.update_workflow()`: `response.workflow.on_behalf_of` **Added** * `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed** * `mistral.workflows.archive_workflow()`: `response.workflow.on_behalf_of` **Added** * `mistral.workflows.unarchive_workflow()`: `response.workflow.on_behalf_of` **Added** * `mistral.workflows.executions.get_workflow_execution()`: `response.run_id` **Added** * `mistral.beta.connectors.list_workspace_credentials()`: **Added** * `mistral.beta.connectors.create_or_update_organization_credentials()`: **Added** * `mistral.beta.connectors.list_organization_credentials()`: **Added** * `mistral.workflows.executions.stream()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added** * `mistral.workflows.runs.list_runs()`: * `request.user_id` **Added** * `response.executions[].run_id` **Added** * `mistral.workflows.runs.get_run()`: `response.run_id` **Added** * `mistral.workflows.events.get_stream_events()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added** * `mistral.workflows.events.get_workflow_events()`: `response.events[].union(WorkflowExecutionStartedResponse).attributes.display_name` **Added** * `mistral.workflows.deployments.list_deployments()`: `response.deployments[].location` **Added** * `mistral.workflows.deployments.get_deployment()`: `response.location` **Added** * `mistral.events.get_stream_events()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added** * `mistral.events.get_workflow_events()`: `response.events[].union(WorkflowExecutionStartedResponse).attributes.display_name` **Added** * chore: align pyproject.toml and uv.lock to version 2.4.1 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 832 ++++--- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 18 +- README.md | 18 +- RELEASES.md | 12 +- docs/models/agent.md | 2 +- docs/models/agentconversation.md | 2 +- docs/models/agentscompletionrequest.md | 6 +- docs/models/agentscompletionstreamrequest.md | 6 +- docs/models/authenticationconfiguration.md | 10 + docs/models/authenticationtype.md | 19 + docs/models/basefielddefinitiontype.md | 1 + docs/models/chatcompletionrequest.md | 8 +- docs/models/chatcompletionstreamrequest.md | 8 +- docs/models/connectioncredentials.md | 10 + docs/models/connector.md | 3 +- docs/models/connectorauthenticationheader.md | 10 + ...updateorganizationcredentialsv1request.md} | 8 +- ...rcreateorupdateusercredentialsv1request.md | 9 + ...teorupdateworkspacecredentialsv1request.md | 9 + ...rdeleteorganizationcredentialsv1request.md | 9 + ...connectordeleteusercredentialsv1request.md | 9 + ...ctordeleteworkspacecredentialsv1request.md | 9 + ...nectorgetauthenticationmethodsv1request.md | 8 + docs/models/connectorgetauthurlv1request.md | 1 + ...torlistorganizationcredentialsv1request.md | 10 + docs/models/connectorlisttoolsv1request.md | 1 + .../connectorlistusercredentialsv1request.md | 10 + ...nectorlistworkspacecredentialsv1request.md | 10 + docs/models/conversationrequest.md | 2 +- docs/models/conversationrestartrequest.md | 2 +- .../conversationrestartstreamrequest.md | 2 +- docs/models/conversationstreamrequest.md | 2 +- docs/models/createagentrequest.md | 2 +- docs/models/createlibraryrequest.md | 11 +- docs/models/credentialscreateorupdate.md | 12 + docs/models/credentialsresponse.md | 9 + docs/models/deploymentdetailresponse.md | 1 + docs/models/deploymentlocation.md | 10 + docs/models/deploymentresponse.md | 15 +- docs/models/fimcompletionrequest.md | 4 +- docs/models/fimcompletionstreamrequest.md | 4 +- ...tionsv1workflowsregistrationsgetrequest.md | 2 +- .../getworkflowsv1workflowsgetrequest.md | 2 +- docs/models/ingestionpipelineconfiguration.md | 11 + docs/models/instructrequest.md | 2 - docs/models/internalmetadata.md | 14 - docs/models/internalmetadataagentversion.md | 17 - ...brariesdocumentsgettextcontentv1request.md | 10 +- .../listrunsv1workflowsrunsgetrequest.md | 1 + docs/models/locationtype.md | 18 + docs/models/mirrorconfig.md | 10 - docs/models/mirrorsource.md | 14 - docs/models/modelconversation.md | 2 +- docs/models/oauth2token.md | 13 + docs/models/ownertype.md | 14 + docs/models/publicauthenticationmethod.md | 11 + docs/models/speechrequest.md | 2 +- .../tempotraceattributearraycontainer.md | 8 + .../models/tempotraceattributearrayelement.md | 10 + docs/models/tempotraceattributearrayvalue.md | 8 + docs/models/tempotraceattributevalue.md | 6 + docs/models/thinkchunk.md | 1 + docs/models/updateagentrequest.md | 2 +- docs/models/workflow.md | 1 + docs/models/workflowcodedefinition.md | 3 +- docs/models/workflowexecutionlistresponse.md | 2 + docs/models/workflowexecutionrequest.md | 1 + docs/models/workflowexecutionresponse.md | 1 + ...kflowexecutionstartedattributesresponse.md | 1 + .../workflowexecutiontraceeventsresponse.md | 1 + .../workflowexecutiontraceotelresponse.md | 1 + ...owexecutiontracesummaryattributesvalues.md | 6 + .../workflowexecutiontracesummaryresponse.md | 1 + .../workflowexecutionwithoutresultresponse.md | 1 + docs/models/workflowwithworkerstatus.md | 1 + docs/sdks/agents/README.md | 12 +- docs/sdks/betaagents/README.md | 4 +- docs/sdks/chat/README.md | 16 +- docs/sdks/connectors/README.md | 439 ++++ docs/sdks/conversations/README.md | 8 +- docs/sdks/documents/README.md | 2 + docs/sdks/fim/README.md | 12 +- .../ingestionpipelineconfigurations/README.md | 46 + docs/sdks/libraries/README.md | 13 +- docs/sdks/runs/README.md | 1 + docs/sdks/speech/README.md | 2 +- docs/sdks/voices/README.md | 2 +- docs/sdks/workflows/README.md | 6 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/agents.py | 32 +- src/mistralai/client/beta.py | 3 + src/mistralai/client/beta_agents.py | 32 +- src/mistralai/client/chat.py | 40 +- src/mistralai/client/connectors.py | 2052 ++++++++++++++++- src/mistralai/client/conversations.py | 64 +- src/mistralai/client/documents.py | 12 + src/mistralai/client/fim.py | 24 +- .../ingestion_pipeline_configurations.py | 176 ++ src/mistralai/client/libraries.py | 6 + src/mistralai/client/models/__init__.py | 205 +- src/mistralai/client/models/agent.py | 7 +- .../client/models/agentconversation.py | 7 +- .../client/models/agentscompletionrequest.py | 15 +- .../models/agentscompletionstreamrequest.py | 15 +- .../models/authenticationconfiguration.py | 39 + .../client/models/authenticationtype.py | 16 + .../client/models/basefielddefinition.py | 1 + .../client/models/chatcompletionrequest.py | 20 +- .../models/chatcompletionstreamrequest.py | 20 +- ...rrorsource.py => connectioncredentials.py} | 34 +- src/mistralai/client/models/connector.py | 9 +- ...or_update_organization_credentials_v1op.py | 27 + ..._create_or_update_user_credentials_v1op.py | 27 + ...te_or_update_workspace_credentials_v1op.py | 27 + ...or_delete_organization_credentials_v1op.py | 22 + .../connector_delete_user_credentials_v1op.py | 22 + ...ector_delete_workspace_credentials_v1op.py | 22 + .../models/connector_get_auth_url_v1op.py | 10 +- ...nnector_get_authentication_methods_v1op.py | 17 + ...ctor_list_organization_credentials_v1op.py | 63 + .../models/connector_list_tools_v1op.py | 29 +- .../connector_list_user_credentials_v1op.py | 63 + ...nnector_list_workspace_credentials_v1op.py | 63 + .../models/connectorauthenticationheader.py | 38 + .../client/models/conversationrequest.py | 7 +- .../models/conversationrestartrequest.py | 7 +- .../conversationrestartstreamrequest.py | 7 +- .../models/conversationstreamrequest.py | 7 +- .../client/models/createagentrequest.py | 7 +- .../client/models/createlibraryrequest.py | 16 +- .../models/credentialscreateorupdate.py | 63 + .../client/models/credentialsresponse.py | 40 + .../client/models/deploymentdetailresponse.py | 42 +- .../client/models/deploymentlocation.py | 57 + .../client/models/deploymentresponse.py | 42 +- .../client/models/fimcompletionrequest.py | 10 +- .../models/fimcompletionstreamrequest.py | 10 +- ...ations_v1_workflows_registrations_getop.py | 4 +- .../get_workflows_v1_workflows_getop.py | 4 +- .../models/ingestionpipelineconfiguration.py | 24 + .../client/models/instructrequest.py | 4 - .../client/models/internalmetadata.py | 92 - ...braries_documents_get_text_content_v1op.py | 50 +- .../list_runs_v1_workflows_runs_getop.py | 19 +- src/mistralai/client/models/locationtype.py | 15 + src/mistralai/client/models/metadatadict.py | 69 - src/mistralai/client/models/mirrorconfig.py | 21 - .../client/models/modelconversation.py | 7 +- src/mistralai/client/models/oauth2token.py | 79 + .../models/publicauthenticationmethod.py | 59 + src/mistralai/client/models/speechrequest.py | 5 +- .../client/models/tempotraceattribute.py | 6 + .../tempotraceattributearraycontainer.py | 38 + .../models/tempotraceattributearrayelement.py | 71 + .../models/tempotraceattributearrayvalue.py | 27 + src/mistralai/client/models/thinkchunk.py | 26 +- .../client/models/updateagentrequest.py | 7 +- src/mistralai/client/models/workflow.py | 6 + .../client/models/workflowcodedefinition.py | 8 +- .../models/workflowexecutionlistresponse.py | 4 + .../client/models/workflowexecutionrequest.py | 7 + .../models/workflowexecutionresponse.py | 16 +- ...kflowexecutionstartedattributesresponse.py | 41 +- .../workflowexecutiontraceeventsresponse.py | 18 +- .../workflowexecutiontraceotelresponse.py | 7 + ...owexecutiontracesummaryattributesvalues.py | 7 +- .../workflowexecutiontracesummaryresponse.py | 10 +- .../workflowexecutionwithoutresultresponse.py | 9 +- .../client/models/workflowwithworkerstatus.py | 6 + src/mistralai/client/rag.py | 25 + src/mistralai/client/runs.py | 8 + src/mistralai/client/speech.py | 32 +- src/mistralai/client/voices.py | 35 +- src/mistralai/client/workflows.py | 20 +- uv.lock | 2 +- 178 files changed, 5426 insertions(+), 949 deletions(-) create mode 100644 docs/models/authenticationconfiguration.md create mode 100644 docs/models/authenticationtype.md create mode 100644 docs/models/connectioncredentials.md create mode 100644 docs/models/connectorauthenticationheader.md rename docs/models/{metadatadict.md => connectorcreateorupdateorganizationcredentialsv1request.md} (65%) create mode 100644 docs/models/connectorcreateorupdateusercredentialsv1request.md create mode 100644 docs/models/connectorcreateorupdateworkspacecredentialsv1request.md create mode 100644 docs/models/connectordeleteorganizationcredentialsv1request.md create mode 100644 docs/models/connectordeleteusercredentialsv1request.md create mode 100644 docs/models/connectordeleteworkspacecredentialsv1request.md create mode 100644 docs/models/connectorgetauthenticationmethodsv1request.md create mode 100644 docs/models/connectorlistorganizationcredentialsv1request.md create mode 100644 docs/models/connectorlistusercredentialsv1request.md create mode 100644 docs/models/connectorlistworkspacecredentialsv1request.md create mode 100644 docs/models/credentialscreateorupdate.md create mode 100644 docs/models/credentialsresponse.md create mode 100644 docs/models/deploymentlocation.md create mode 100644 docs/models/ingestionpipelineconfiguration.md delete mode 100644 docs/models/internalmetadata.md delete mode 100644 docs/models/internalmetadataagentversion.md create mode 100644 docs/models/locationtype.md delete mode 100644 docs/models/mirrorconfig.md delete mode 100644 docs/models/mirrorsource.md create mode 100644 docs/models/oauth2token.md create mode 100644 docs/models/ownertype.md create mode 100644 docs/models/publicauthenticationmethod.md create mode 100644 docs/models/tempotraceattributearraycontainer.md create mode 100644 docs/models/tempotraceattributearrayelement.md create mode 100644 docs/models/tempotraceattributearrayvalue.md create mode 100644 docs/sdks/ingestionpipelineconfigurations/README.md create mode 100644 src/mistralai/client/ingestion_pipeline_configurations.py create mode 100644 src/mistralai/client/models/authenticationconfiguration.py create mode 100644 src/mistralai/client/models/authenticationtype.py rename src/mistralai/client/models/{mirrorsource.py => connectioncredentials.py} (62%) create mode 100644 src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_delete_organization_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_delete_user_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_get_authentication_methods_v1op.py create mode 100644 src/mistralai/client/models/connector_list_organization_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_list_user_credentials_v1op.py create mode 100644 src/mistralai/client/models/connector_list_workspace_credentials_v1op.py create mode 100644 src/mistralai/client/models/connectorauthenticationheader.py create mode 100644 src/mistralai/client/models/credentialscreateorupdate.py create mode 100644 src/mistralai/client/models/credentialsresponse.py create mode 100644 src/mistralai/client/models/deploymentlocation.py create mode 100644 src/mistralai/client/models/ingestionpipelineconfiguration.py delete mode 100644 src/mistralai/client/models/internalmetadata.py create mode 100644 src/mistralai/client/models/locationtype.py delete mode 100644 src/mistralai/client/models/metadatadict.py delete mode 100644 src/mistralai/client/models/mirrorconfig.py create mode 100644 src/mistralai/client/models/oauth2token.py create mode 100644 src/mistralai/client/models/publicauthenticationmethod.py create mode 100644 src/mistralai/client/models/tempotraceattributearraycontainer.py create mode 100644 src/mistralai/client/models/tempotraceattributearrayelement.py create mode 100644 src/mistralai/client/models/tempotraceattributearrayvalue.py create mode 100644 src/mistralai/client/rag.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 1064161a..80ccb08d 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: eed1e14031b7c6a8e5aab140c8de4fc7 + docChecksum: fc508a5073d9d5561c97eb925d18d390 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.0 - configChecksum: 106560b01230037a615e45a3ba82c612 + releaseVersion: 2.4.1 + configChecksum: 4a73cb94d9298b52588a00f50ab463b8 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 02d6816b-7e5c-4764-b044-5ce0c3d87ede - pristine_commit_hash: bcb4cb005b45b822f3b3d8b50ccd4e507683f167 - pristine_tree_hash: 47ff262921294673a501861304400d77fabb4d3d + generation_id: 05db87ae-2691-45ee-bf0d-0f614e1c2c90 + pristine_commit_hash: af16606e009057f7fac9b1a43361f448562372b8 + pristine_tree_hash: fa4e1ee8a8c7340bf200d5a2f5465e0b80674b8c features: python: acceptHeaders: 3.0.0 @@ -108,16 +108,16 @@ trackedFiles: pristine_git_object: 1aee1533fc92116e79a13b338dd6e6e74fcab800 docs/models/agent.md: id: ffdbb4c53c87 - last_write_checksum: sha1:17c0a4bcfb18b9db99bb3a783d275a046b66bb78 - pristine_git_object: c9c8b7486fbc68bde5647b49aeb83f4522b5e954 + last_write_checksum: sha1:a4438b1b0db1d00df3aacfc432acc523a3ca57da + pristine_git_object: 94e8b035a5a9f61d3a0e345daf977a83e352ba07 docs/models/agentaliasresponse.md: id: 5ac4721d8947 last_write_checksum: sha1:15dcc6820e89d2c6bb799e331463419ce29ec167 pristine_git_object: aa531ec5d1464f95e3938f148c1e88efc30fa6a6 docs/models/agentconversation.md: id: 3590c1a566fa - last_write_checksum: sha1:e86c4e75fd08f961f6c914460e753f097a4fb879 - pristine_git_object: dc62a7f56b811b31aafd35d9356cd0019a03c349 + last_write_checksum: sha1:43e7c1ed2b43aca2794d89f2e6d6aa5f1478cc3e + pristine_git_object: 451f6fb8f700dddd54c69593c316bf562b5cbc93 docs/models/agentconversationagentversion.md: id: 468e0d1614bb last_write_checksum: sha1:6e60bf4a18d791d694e90c89bdb8cc38e43c324b @@ -220,8 +220,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:d82104cf412985096b5de894972e16cc077df890 - pristine_git_object: 8627e359e0b7d0f619cc3ca060dd3d43799dd022 + last_write_checksum: sha1:6255ed17fdd14df3aec90e3a85b8310394455f16 + pristine_git_object: 0c3fe986f4c89a4e39fdc313fb9e130eef45dbf8 docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -240,8 +240,8 @@ trackedFiles: pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:098b9d9c3a411d93d79cc98806933910d5cc66f4 - pristine_git_object: 3845f08c4525e95c6bb639628a1cd7a95f15d873 + last_write_checksum: sha1:4d15beaae8938de66d28e0ce3f4e370d78bbac94 + pristine_git_object: 4111877d33cb383697dcd8fe9b7a2362175b4ec1 docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -338,6 +338,14 @@ trackedFiles: id: e510ac107a56 last_write_checksum: sha1:1cfbc35a6112a6eca7b4199c37959a0fef390ca8 pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 + docs/models/authenticationconfiguration.md: + id: b470496ac0ad + last_write_checksum: sha1:5895ae27addf9e917660902384d24f48fccfaf79 + pristine_git_object: 081649ea299f852f14b57da69473ab4920a02e4a + docs/models/authenticationtype.md: + id: fc252db73e2a + last_write_checksum: sha1:2f600847a29462d970d753fce461e9e62bc47902 + pristine_git_object: 498bfeaae0b154d448712b8e27cce56750dcec2d docs/models/authorization.md: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e @@ -352,8 +360,8 @@ trackedFiles: pristine_git_object: 3d721d91572e4cdb8d5de5a2cdd294693f552d73 docs/models/basefielddefinitiontype.md: id: e0678603f859 - last_write_checksum: sha1:4c79afbbc22081d7ac18c3de963b92dd2dca0069 - pristine_git_object: efdff2a4bf26336c8f1880683fb2d798ee2d630d + last_write_checksum: sha1:057a88127fff9b9cbee409cf28c865bc22c46d69 + pristine_git_object: 355242b9982ce817900b3f51418ee629775efcf1 docs/models/basemodelcard.md: id: 2f62bfbd650e last_write_checksum: sha1:d42dfe36b103ee95f55e91ac306e3179060dfb3f @@ -436,8 +444,8 @@ trackedFiles: pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:1664a70123e7e32aaba37672226e484770646607 - pristine_git_object: e04543a239686086db9ea00b278567d82d30e2df + last_write_checksum: sha1:220052fe029ddec558a0dd826aef80bfe9a2d047 + pristine_git_object: 6d1fab76894ea1e9964fcc3b5e736f64b8377115 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -460,8 +468,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:3b794d280680af826347e708f87e9de749af202b - pristine_git_object: 9c8cdb168578ff94cb2e69989110be33aaaf9759 + last_write_checksum: sha1:889cabc5347782584b1744eb6579e6aac66f8619 + pristine_git_object: a2796df2ee429c51f80c54e5cbc74fcf2c994e28 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -634,10 +642,18 @@ trackedFiles: id: 19b9e48a3c2e last_write_checksum: sha1:6e199c756ce35e2bff3b67df5d97b4520518b271 pristine_git_object: c87093846ca27940a08318fb090c60ce56a00651 + docs/models/connectioncredentials.md: + id: 1aa13b29ae25 + last_write_checksum: sha1:1fbc7ca6daa21f093853cda8385fd63b031bb653 + pristine_git_object: 7e89239996c86952aa3ddf7520c0a73858b31725 docs/models/connector.md: id: cbf7c2c53983 - last_write_checksum: sha1:477e81b9e908f8c40e22cffcf4e7cd6ae38fe34e - pristine_git_object: a5d6073ea8da1284bea490d74fec8e6224fc3910 + last_write_checksum: sha1:f176fd1e55ba030a3b5bc0881a0c6c5023f3c46d + pristine_git_object: a0107820b8fdd26474f6e0d48280e5b6d713f7e3 + docs/models/connectorauthenticationheader.md: + id: bb5e842caa63 + last_write_checksum: sha1:7c721f916ed1ce2d4155734bb8190e11de6bf4ac + pristine_git_object: c545b571f921874f7d4a9ffda9331a73eacb6c3f docs/models/connectorcalltoolrequest.md: id: d0f10cee6826 last_write_checksum: sha1:81fa16df68355ba258c66189a2c9b6d0cdb2dfb8 @@ -646,26 +662,66 @@ trackedFiles: id: a7a294c4280c last_write_checksum: sha1:0d8983932c2f4eb6f19e7a81c1e76eeb7ee9bb2f pristine_git_object: dea7083dabf1fe9f5470a5b13d6e65ae234d8aa8 + docs/models/connectorcreateorupdateorganizationcredentialsv1request.md: + id: 215e752e803b + last_write_checksum: sha1:cc72d358588bae1001e4076c77d5e0065977b441 + pristine_git_object: 2797bebf5d8b711bcd7a69f193d40f33ad66d640 + docs/models/connectorcreateorupdateusercredentialsv1request.md: + id: 53bf0f40ddbc + last_write_checksum: sha1:a20627b02d5057def7e491f3af04fcf6770389a9 + pristine_git_object: 3e763722a0ad765af38fffbf938a0b228015c3ae + docs/models/connectorcreateorupdateworkspacecredentialsv1request.md: + id: 10c159720bae + last_write_checksum: sha1:e86b1952360e4f41550603b9dc16fddeff6127e7 + pristine_git_object: 310cdcde0039e9fdb4faa53644265a6a614d9b20 + docs/models/connectordeleteorganizationcredentialsv1request.md: + id: 922f5267f2c0 + last_write_checksum: sha1:23af2d809a20c093ece79bcd1e6ebc551be4b368 + pristine_git_object: eaf4d00cc70f2d15e29634ff99f1cfedcdeea189 + docs/models/connectordeleteusercredentialsv1request.md: + id: 294334281c1c + last_write_checksum: sha1:2dfb1be1e57d3c48c0a5df7c642212e572731b34 + pristine_git_object: fd52cf921a5db428757407e216c918853f5e67cb docs/models/connectordeletev1request.md: id: 8d5621ba6395 last_write_checksum: sha1:881b88b2e0788f7c16938115a6cada5f0ebe144b pristine_git_object: e50c7296f28bbf48daf724af3c848a50e8424ad7 + docs/models/connectordeleteworkspacecredentialsv1request.md: + id: 058a4c7be62f + last_write_checksum: sha1:c5185ed84e0f26596bcc1c573009d694a064f21f + pristine_git_object: 3bc3d7c9e7f25bb3ee716e0fc9011dfa40b844c5 + docs/models/connectorgetauthenticationmethodsv1request.md: + id: 50edde04fff0 + last_write_checksum: sha1:78305fe0052b6b90036ca72302a42dcf9093e3d3 + pristine_git_object: 3a62c0106481edc9d8137689c4d7d7649f812397 docs/models/connectorgetauthurlv1request.md: id: 8a02a6af19ab - last_write_checksum: sha1:ab5433de19756f65450c4fa140a97198f35863dd - pristine_git_object: d041e0c23890973aea61f03901c73caf87d21e5a + last_write_checksum: sha1:517c82f877bbcb4b5a34404cfa9cc51897fc14ed + pristine_git_object: 7d6b94ff09be0d4bf2f062fa039551ab0735fc13 docs/models/connectorgetv1request.md: id: 844c1f489684 last_write_checksum: sha1:e36ac8ff28ee258340868f8aa4f3172ed3b82ef3 pristine_git_object: c45148b97aad128744e0e6ccebb00bf22d400eff + docs/models/connectorlistorganizationcredentialsv1request.md: + id: cc1870566c72 + last_write_checksum: sha1:9f5c605b6bd07b3e9ffac5ae5e61e97e00ea4464 + pristine_git_object: bb1f1c3a5c0fe7d307951c9179c13192f19afb8b docs/models/connectorlisttoolsv1request.md: id: 43698382d3c4 - last_write_checksum: sha1:3c6e01a8fa0283300f3801bf7022599d75d12162 - pristine_git_object: e080455b986aa3aded7613a5654636c1188085d1 + last_write_checksum: sha1:e2ec4a2b6b595941890d400817ca38f996a441e8 + pristine_git_object: e9c2137429509ea9edf43a5f9329208103c2bd11 + docs/models/connectorlistusercredentialsv1request.md: + id: 721da447813a + last_write_checksum: sha1:ef52fd446896bc737782e5c17e2051dbeda4f0f1 + pristine_git_object: 63ec93d546bbfe15823c161af79dcde0b1552b25 docs/models/connectorlistv1request.md: id: 68b7a11faff6 last_write_checksum: sha1:e08effc0f17a95383c3ba96b06b1dba80f4dc767 pristine_git_object: 6b9a287ead2996c402ade5c18368eaff92c76b2a + docs/models/connectorlistworkspacecredentialsv1request.md: + id: c7f5827917c6 + last_write_checksum: sha1:63d4585f79ff1144e691b48ceada5d76d74b01cb + pristine_git_object: 45e90077d22f6d9caf4a8f9ab1889c5c39c82e53 docs/models/connectorsqueryfilters.md: id: d6fb981cad1e last_write_checksum: sha1:3a33088e1e9332318aff437fba7d01239d417d84 @@ -748,8 +804,8 @@ trackedFiles: pristine_git_object: 481f18e67f70226c928522726c73b3e07b2a7c4c docs/models/conversationrequest.md: id: dd7f4d6807f2 - last_write_checksum: sha1:c6751b61dcda75b9b021283b2dbca068fd902dde - pristine_git_object: 4638049eb9d7ccc1c796a85ddad55f77faaab437 + last_write_checksum: sha1:fff53e06f2409c4de6fa8f6a56efad5c165b7685 + pristine_git_object: 6a5dc206ecd4bb115647270adfebcc955b59dcb8 docs/models/conversationrequestagentversion.md: id: 68aad87b1459 last_write_checksum: sha1:fd2e9cd7ed2499b5843c592505ec5e0596a50b33 @@ -772,8 +828,8 @@ trackedFiles: pristine_git_object: fe8ad1b5f8f3a48b48b9e2d09814af7df0ed3788 docs/models/conversationrestartrequest.md: id: 558e9daa00bd - last_write_checksum: sha1:bb60d17dcb85e7f65e914f29778dbb7025bd022e - pristine_git_object: 03dec2ecb937a7128b07f61508247bc5ce0acd24 + last_write_checksum: sha1:0f7b4fdb5c945bbe8e49857965756c6bdc6f5ce4 + pristine_git_object: be0f2289b02395c888391b6f7e8e657c49343d47 docs/models/conversationrestartrequestagentversion.md: id: e6ea289c6b23 last_write_checksum: sha1:a5abf95a81b7e080bd3cadf65c2db38ca458573f @@ -784,8 +840,8 @@ trackedFiles: pristine_git_object: 4e202d69ae83fa11798c8b88a34a0246a3d764fe docs/models/conversationrestartstreamrequest.md: id: 01b92ab1b56d - last_write_checksum: sha1:436a108559dac72955480774abe4b1669383cd73 - pristine_git_object: daa955845a960acc9bb53147821e6ae3e7148b88 + last_write_checksum: sha1:768a1d573b5fa034fefcf74e0ae9bc16f6558025 + pristine_git_object: f99a6e3404aea78062d2fd86652649ffd0f03d98 docs/models/conversationrestartstreamrequestagentversion.md: id: 395265f34ff6 last_write_checksum: sha1:ebf4e89a478ab40e1f8cd3f9a000e179426bda47 @@ -800,8 +856,8 @@ trackedFiles: pristine_git_object: ee88d9d4631c62e2845294950cc7e787316bf461 docs/models/conversationstreamrequest.md: id: 833f266c4f96 - last_write_checksum: sha1:f0d3611a198ac1a504cd9ec278486583cb2d76e8 - pristine_git_object: 3c8b650f8cb9d877edad4ab85d4a95e26ef82200 + last_write_checksum: sha1:5e9f0e779acc11017dbce26e1a4d2be179cdca99 + pristine_git_object: af50989c156f08ea1781d2767be422662945e9c2 docs/models/conversationstreamrequestagentversion.md: id: e99ccc842929 last_write_checksum: sha1:0ba5fca217681cdc5e08e0d82db67884bed076a6 @@ -820,8 +876,8 @@ trackedFiles: pristine_git_object: 57e260335959c605a0b9b4eaa8bf1f8272f73ae0 docs/models/createagentrequest.md: id: 9484bab389c1 - last_write_checksum: sha1:c54b5d8ffd8b566b2607742df5ae1851e28cef83 - pristine_git_object: 2559a7c7a2ccc9f2ea6d7740996aa548df29098e + last_write_checksum: sha1:5c24b11438c77dbbdb3a6e5275952889e4da7cb9 + pristine_git_object: e9665545ae14415bb0c61dc0312136dd2930ee13 docs/models/createagentrequesttool.md: id: 72e5f99878c5 last_write_checksum: sha1:4b4ab1566b3c82a14ace1c141538d7ad6b7192f7 @@ -880,8 +936,16 @@ trackedFiles: pristine_git_object: a72676719b90a7b840a2b21d043c61bdf83ce294 docs/models/createlibraryrequest.md: id: 8935b2ed9d13 - last_write_checksum: sha1:c00abfe1abb0f0323e434b084dafa0d451eb3e51 - pristine_git_object: 71562806dbec6444dcdd0a19852a31ca00b6229a + last_write_checksum: sha1:cfcf0edd715f9c731b0a267d1335545faaee2209 + pristine_git_object: ea70d4d8a757e8be2da3806ab125330edee4cadf + docs/models/credentialscreateorupdate.md: + id: b2a0e87b0a91 + last_write_checksum: sha1:6b778120a84c08601b4f2fbba368d3454204d939 + pristine_git_object: c544d7c60332c29fe2c91e8af17282ca689537e2 + docs/models/credentialsresponse.md: + id: 20dd6478c581 + last_write_checksum: sha1:3150b304dcef82b0f1d18b6a33b48e22899a406e + pristine_git_object: 0cd5b336ca1cb55d54a123c283fdbd957ebb1588 docs/models/customconnector.md: id: 7bcc77607afa last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a @@ -1000,16 +1064,20 @@ trackedFiles: pristine_git_object: 8142772d7ea33ad8a75cf9cf822564ba3f630de2 docs/models/deploymentdetailresponse.md: id: 712f7bbc8cc0 - last_write_checksum: sha1:b346373ba31e99b0238582297011c8f2f10d2f13 - pristine_git_object: e1d84e11532acb21ff4d083e704bbca68385ebf3 + last_write_checksum: sha1:29649c52cfba597bc6597671a8d1c8aa758ccdd0 + pristine_git_object: 1f09589953513dd3ac340678628c30b9023e1f51 docs/models/deploymentlistresponse.md: id: 45a11caf1008 last_write_checksum: sha1:aa393b5a879506970c6d27342168d8f5f50d700c pristine_git_object: 22868512ffd2c564c8a8ab02fbb9f324d2ecf013 + docs/models/deploymentlocation.md: + id: 7fdeb81116eb + last_write_checksum: sha1:04a70c678d2db359baf203947539672d039b08b2 + pristine_git_object: a0cbe6bc1cbbdf5ee4a3a6f97c5cc594a464a20d docs/models/deploymentresponse.md: id: a9da842850c4 - last_write_checksum: sha1:073ef3db8e9709464950891a311243f9bf96c28d - pristine_git_object: f6f12836457eb150c477d37d7325238dac25ded5 + last_write_checksum: sha1:f53b4b5dd01ddf7f73b2e2918aca0a56521f9684 + pristine_git_object: 853ebbce11026209d75e6744fd33396550d81637 docs/models/deploymentworkerresponse.md: id: 07cd9c89237a last_write_checksum: sha1:1f8b60ad6e17714100626106c2de16f6aca273e4 @@ -1208,8 +1276,8 @@ trackedFiles: pristine_git_object: 4595b82b40fe37dc093bee73a4ffa9c8ac61d77d docs/models/fimcompletionrequest.md: id: b44677ecc293 - last_write_checksum: sha1:24bcb54d39b3fabd487549a27b4c0a65dd5ffe50 - pristine_git_object: fde0b625c29340e8dce1eb3026ce644b1885e53a + last_write_checksum: sha1:87a83a59fb3772ca6c7e60bcef27ca15f349ce46 + pristine_git_object: c0c52b6634c0a12b7e52686875805164d99b4c64 docs/models/fimcompletionrequeststop.md: id: ea5475297a83 last_write_checksum: sha1:a6cdb4bda01ac58016a71f35da48a5d10df11623 @@ -1220,8 +1288,8 @@ trackedFiles: pristine_git_object: cd62d0349503fd8b13582d0ba47ab9cff40f6b28 docs/models/fimcompletionstreamrequest.md: id: c881d7e27637 - last_write_checksum: sha1:f8755bc554dd44568c42eb5b6dde04db464647ab - pristine_git_object: ba62d854f030390418597cbd8febae0e1ce27ea8 + last_write_checksum: sha1:3574398ad561e06a8c2c95ffcb1456fe62cf7320 + pristine_git_object: c02b622c7e4113d7ca99ede3d735f17dc2ab26e7 docs/models/fimcompletionstreamrequeststop.md: id: c97a11b764e9 last_write_checksum: sha1:958d5087050fdeb128745884ebcf565b4fdc3886 @@ -1420,16 +1488,16 @@ trackedFiles: pristine_git_object: a6e623dd847551f7d96b4b90ef8e9d504529112a docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md: id: 4b699772bee5 - last_write_checksum: sha1:db3928c8dd78fd1d16dbd0a7d667a92036785f2e - pristine_git_object: ee72444555a1303163849f32eeee568c7118698e + last_write_checksum: sha1:48bda785e6bfbd91350db70db13b523e3eaf0f09 + pristine_git_object: ee53e5a252a2869330da4b9e2d68358587f4c54b docs/models/getworkflowregistrationv1workflowsregistrationsworkflowregistrationidgetrequest.md: id: 597766b7d51b last_write_checksum: sha1:5c58fbed3af8d08dd94eaba0ae8ed41d61fb6c52 pristine_git_object: ec43ad56a6698eaec7a89e015f42154a7a97dea8 docs/models/getworkflowsv1workflowsgetrequest.md: id: e61c93d9ecc7 - last_write_checksum: sha1:3285ea1da5f7e05bc3d15885267d25d2968cf930 - pristine_git_object: c83ed6d1d0028fcb008b46234767e4a62fbd7c20 + last_write_checksum: sha1:60f1aae6819e058272ce854a0ca6aa2a1c202ecd + pristine_git_object: c361f02781c8663685d513acd6f13f46793e7b46 docs/models/getworkflowsv1workflowsgetresponse.md: id: a6375877d4dd last_write_checksum: sha1:26401f0edf76e787a8ca780eb97724a4c6ca37a7 @@ -1494,6 +1562,10 @@ trackedFiles: id: 74bd521abc26 last_write_checksum: sha1:a4efe4ff8c52137af47d6ab750d1d2f7cba77e7c pristine_git_object: 72a586bc65f6219abed50105d9df9cb8b6ec8d02 + docs/models/ingestionpipelineconfiguration.md: + id: 95a1d6bf413b + last_write_checksum: sha1:d13948eacf546bd07a8cec91381536c28277144a + pristine_git_object: 5d25ab15ea52894ac28e39e8870bc8fb8043b6ed docs/models/inputentries.md: id: a5c647d5ad90 last_write_checksum: sha1:4231bb97837bdcff4515ae1b00ff5e7712256e53 @@ -1504,20 +1576,12 @@ trackedFiles: pristine_git_object: d5771207d9725f04ca2ab1be692fc089360a58f4 docs/models/instructrequest.md: id: a0034d7349a2 - last_write_checksum: sha1:45632a9226f6539dc978eb46cdda7bffce624838 - pristine_git_object: 1bd5eb649ba747cced7bb4ec89ce5d48c303ef0b + last_write_checksum: sha1:34a81411110cbb7a099c45e482f5d1702ae48fd3 + pristine_git_object: 5f0cdfff135fb72d3b1a81999a30b720c044e3d4 docs/models/instructrequestmessage.md: id: 380503708a09 last_write_checksum: sha1:551b5d6dd3ba0b39cad32478213a9eb7549f0023 pristine_git_object: 57ed27ab3b1430514797dd0073bc87b31e5e3815 - docs/models/internalmetadata.md: - id: d2f0239d8b15 - last_write_checksum: sha1:6267f4b134862a5e09e97a73f5967bc9999871d8 - pristine_git_object: 24ca04d9802dd4d65b3e69722e1e49abbc9a8ec6 - docs/models/internalmetadataagentversion.md: - id: b3c5d0837986 - last_write_checksum: sha1:92422845c1c932f4c8bbc2b056e589685db12bff - pristine_git_object: 8dd7955d3e3d5b63c0a7899fca9fdf069f8c6673 docs/models/jobmetadata.md: id: 1f8e4c2f49e5 last_write_checksum: sha1:a29ec10cd129b955672f60aaf526905780afe6b6 @@ -1700,8 +1764,8 @@ trackedFiles: pristine_git_object: e6d41875966348fd9e770d06c8099e48f0e64b5d docs/models/librariesdocumentsgettextcontentv1request.md: id: 850dfa465952 - last_write_checksum: sha1:4a1212e111525f4265d2924ce52f9c13d2787d4d - pristine_git_object: 2f58a4460ccdad531391318c62191e76c1ec22ac + last_write_checksum: sha1:a87002fc46509fd10c5cf73cd4336298ca969011 + pristine_git_object: 6413e51c0d706dc11c4fe204d0f0e788927a8c9c docs/models/librariesdocumentsgetv1request.md: id: cdd0df2f7e9d last_write_checksum: sha1:36e5ef39552159044ecd28d20ee0792ea5bcadef @@ -1812,8 +1876,8 @@ trackedFiles: pristine_git_object: 537269f7e774b31c45ac75c82c096530c0bd2b4e docs/models/listrunsv1workflowsrunsgetrequest.md: id: 132927390b33 - last_write_checksum: sha1:5ec52640c83f0d560dc8efb39afc50317fa2e31c - pristine_git_object: 259876c68b0c9b5684b3c565b3df4bb3430a76b6 + last_write_checksum: sha1:ac1d4705c77aaf9f96cb97305a3c45da43b7bbdc + pristine_git_object: 319d9ed5923c9e84221f31fb74d82f557b902c9c docs/models/listrunsv1workflowsrunsgetresponse.md: id: da55980ef20d last_write_checksum: sha1:e176049e48a9f78b47be166b6dc8f47bca3e7da7 @@ -1846,6 +1910,10 @@ trackedFiles: id: b071d5a509cc last_write_checksum: sha1:09a04749333ab50ae806c3ac6adcaa90d54df0f1 pristine_git_object: d6094ac2c6e0326c039dad2f6b89158694ef6aa7 + docs/models/locationtype.md: + id: e25e2392c4c9 + last_write_checksum: sha1:647413204680efd677ce7746101b74e2ad7d59d5 + pristine_git_object: 6daecdd1eb31ad2d80400b4eb9032f635f0bc889 docs/models/mcpservericon.md: id: 0b20f03adab8 last_write_checksum: sha1:d66113a4b0486f144b1f73f423559360ec751631 @@ -1906,22 +1974,10 @@ trackedFiles: id: c348c2448aaa last_write_checksum: sha1:5f99a25a3f689030756a63e925113030121c5d7e pristine_git_object: 427e09b524964c521a6b63962e5f71ae0ca1b485 - docs/models/metadatadict.md: - id: dec61e84f14e - last_write_checksum: sha1:a93e381544e2313862490a1e373b06327b0ba9dc - pristine_git_object: c53c4aed0522c50ecc9e575b4829538382ec9c25 docs/models/metric.md: id: a812a3e37338 last_write_checksum: sha1:14016848dcfaba90014b482634ed6d5715caa860 pristine_git_object: 7f86303651650177ece51b82d867cab858e830ae - docs/models/mirrorconfig.md: - id: ecf31b1715e0 - last_write_checksum: sha1:51edfd8b440185056827bdb4c950fa11375862b3 - pristine_git_object: a722c88df57038b592beda40423d2cf220ca5c60 - docs/models/mirrorsource.md: - id: b069f5686f81 - last_write_checksum: sha1:80a61ad0bb44d40756b9980a252b477f36755129 - pristine_git_object: 77c946da2e5f4a8db1a15b17bdc6f13b8bcdd23b docs/models/mistralpromptmode.md: id: d17d5db4d3b6 last_write_checksum: sha1:d7804c45f10f2e929276d4a00bf6c2b966a78fb5 @@ -1932,8 +1988,8 @@ trackedFiles: pristine_git_object: 7c125e6490b40b53b090f55ff9b5634bc2c2572c docs/models/modelconversation.md: id: 497521ee9bd6 - last_write_checksum: sha1:a201580e604ee0a14c636a5f80601d76dfbc0b47 - pristine_git_object: e30d93d1cf1aa778edc63f935d5912f78be0e501 + last_write_checksum: sha1:aea6f51b6276c5e36447c828e78a30367f15a978 + pristine_git_object: 190a6f6eb48191b2507a4861525707f041961538 docs/models/modelconversationtool.md: id: 2dd28167bc36 last_write_checksum: sha1:029cca1fe47df23ef858a01fd2627f0bc2ffdfd3 @@ -1982,6 +2038,10 @@ trackedFiles: id: 44842604e405 last_write_checksum: sha1:50e09dfa5ed838df4a760358c6bf81c04da4910b pristine_git_object: 71e38615fada1e4f3b10e669eb3d8a6b768aa268 + docs/models/oauth2token.md: + id: 409bc5ff306f + last_write_checksum: sha1:cfa4eca0c2a099adf3d365d2bda4fe026d6dc36d + pristine_git_object: 59716ed683a8749e86c05b9c6b161900dafefb63 docs/models/oauth2tokenauth.md: id: f23959dcc4b0 last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 @@ -2054,6 +2114,10 @@ trackedFiles: id: f7e175c8e002 last_write_checksum: sha1:5094466110028801726cc825e8809f524fe1ee24 pristine_git_object: c76bc31d4d8791b7bef4dc6cbff6671b38a7927d + docs/models/ownertype.md: + id: 96bf508ddec4 + last_write_checksum: sha1:8021d596504b99d8ff2c3db36a494b192fe35e45 + pristine_git_object: 288d58339ece9c69572e86f17f364dfc4213be50 docs/models/pages.md: id: 9045c659bb29 last_write_checksum: sha1:b4b9daaa3e2bd6efeb6f5efe07e8da58385b3ee3 @@ -2134,6 +2198,10 @@ trackedFiles: id: 1391892fce0a last_write_checksum: sha1:4a82fc483f090e4fc09d19a3f2c0f2a2e022cf3f pristine_git_object: 36b58e9aa80a53dad530cad93fb1d565fdd03b59 + docs/models/publicauthenticationmethod.md: + id: abfb51fdf794 + last_write_checksum: sha1:58c5f7fa4f5ea2eddad8702b87b9af1dd8fa89ac + pristine_git_object: c98413b62ac80443aff52ce344dae41e46012745 docs/models/querydefinition.md: id: 4831b7e558f9 last_write_checksum: sha1:f4983c0963906b3eda13c69e2852b08d662dd744 @@ -2404,8 +2472,8 @@ trackedFiles: pristine_git_object: 9b06e46475dd6160588ce4fe9d275c2f2454a6c0 docs/models/speechrequest.md: id: 1403855cf560 - last_write_checksum: sha1:a494d5f4f3e92722552365561b03c05749e3d8d3 - pristine_git_object: 2e1e4cde3f38d271904ad11227b5edb6d1f66af9 + last_write_checksum: sha1:ae21118684de7d75eb6b176234a06d891baf562d + pristine_git_object: 3a22e80af5aba7084f98ef38805b6f941bda043e docs/models/speechresponse.md: id: be437798d476 last_write_checksum: sha1:c1c23ed7f45484831d04ca5bc12a28b4e91cd0d0 @@ -2490,6 +2558,18 @@ trackedFiles: id: 6ce2d6cbea6b last_write_checksum: sha1:d296899e9a5fb160925a36382dee30dbe959a106 pristine_git_object: 6061df8649c32a4c4daea648223525a9f870bb2a + docs/models/tempotraceattributearraycontainer.md: + id: d47f0c8b6956 + last_write_checksum: sha1:9e7bb43dbf6f4176284ef5985f8fbbea8efccd5f + pristine_git_object: 049dce7d7b8b7da965af6629e45be77e81aa4302 + docs/models/tempotraceattributearrayelement.md: + id: be9d9005df77 + last_write_checksum: sha1:e970ae3b60c1adaf0bb79e109ec675338f2095de + pristine_git_object: a4b8208099ff361160ad3c403f427eeb5fc143e5 + docs/models/tempotraceattributearrayvalue.md: + id: 619f60780ece + last_write_checksum: sha1:889052cfcc2f44c882bbfe32cfbaeb104b9927f4 + pristine_git_object: b763756f99de3f53af5916c92585ea3b8a09ddba docs/models/tempotraceattributeboolvalue.md: id: 0e2767bf14da last_write_checksum: sha1:6e09bcab345a7cbe376c41fd20955017f54243bc @@ -2504,8 +2584,8 @@ trackedFiles: pristine_git_object: 61e7eb8ac7f91e718e85fd46b7298095300821f5 docs/models/tempotraceattributevalue.md: id: b5a74866dcac - last_write_checksum: sha1:30a7d69df2775d18e110e20dcd6956359a065b54 - pristine_git_object: eb448c3b039475cc18de097e2d90f5700aa136eb + last_write_checksum: sha1:2acdf3c2c1c7e163ded5d12c51eb649f2a11b95d + pristine_git_object: 3b0a18692fce0a107217c3f274626ece86f22aa2 docs/models/tempotracebatch.md: id: 1a73bb7f3ee0 last_write_checksum: sha1:778e8837929ee817567c02653ae9daca8d564ea7 @@ -2552,8 +2632,8 @@ trackedFiles: pristine_git_object: daa531e1bf60f55962069ef586b4f1ae56c32662 docs/models/thinkchunk.md: id: bca24d7153f6 - last_write_checksum: sha1:7fa91717a3c5678d33bac70c758635c50f72be47 - pristine_git_object: 98603d8f97b3e432014be8e30b0418d1d462c016 + last_write_checksum: sha1:baa8dd2840678133f585ba3d94cc279cb284be22 + pristine_git_object: b7494beed66469ecdb570b7e084b3824ab171052 docs/models/thinking.md: id: 07234f8dd364 last_write_checksum: sha1:90c0b34284137712678b0671e9f4bfb319548cbf @@ -2728,8 +2808,8 @@ trackedFiles: pristine_git_object: c2bc33738e8e34d66da61ae08a496384b6c623f0 docs/models/updateagentrequest.md: id: 371bfedd9f89 - last_write_checksum: sha1:ffa273db325e85b14ba2554b223a2a2de7ad9b8f - pristine_git_object: 7852472bd09bb405b926b3f38b2d5a0b79704ee6 + last_write_checksum: sha1:73936f78ae35e5f84ebe32aabb150d6792ce40d1 + pristine_git_object: b8aa01f66b13d050839bd0aacf1550f669bc8d13 docs/models/updateagentrequesttool.md: id: bdf961d2c886 last_write_checksum: sha1:104218314ae55ccf111d90bdbad987a13988f7f5 @@ -2876,8 +2956,8 @@ trackedFiles: pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 docs/models/workflow.md: id: a782201b7327 - last_write_checksum: sha1:0a6dbea734dc94626fb53ab37c619fef48b9db63 - pristine_git_object: 4b245e07d66418614e4eadf09bf6203254f0d91e + last_write_checksum: sha1:b633fce77c3d985b73268fadf161e6ab790e4970 + pristine_git_object: b1765cc45eb62883640c9e7d7e47345fcdeaf819 docs/models/workflowarchiveresponse.md: id: e952228d4f02 last_write_checksum: sha1:49dbb8dd7c8b3a2442de072bd45244540c79954f @@ -2888,8 +2968,8 @@ trackedFiles: pristine_git_object: a534ad34da32c4d8eb93f055e1bbf128c5df7e8a docs/models/workflowcodedefinition.md: id: 16ce7d540f36 - last_write_checksum: sha1:35fce15dd70e7c8eb85b9f54919cca1b0a0e1dcb - pristine_git_object: 2034f81fff68465c568b5d189086094c5635bff8 + last_write_checksum: sha1:96703471ed4249c118cd0d2563182f9300e3bfc9 + pristine_git_object: f8cf3bbd5a9d0aad13daf38d140ffbe9c3df825f docs/models/workfloweventtype.md: id: 0ea616e53d9b last_write_checksum: sha1:97e9654b44b627a610b3a30f14b3dc56dab1d725 @@ -2928,24 +3008,24 @@ trackedFiles: pristine_git_object: 222fbfd75c79bf9868b04affab9d2708f5942f64 docs/models/workflowexecutionlistresponse.md: id: a66878b279ba - last_write_checksum: sha1:fcdc0fa6d385ee938df2127c7026a93634bccacb - pristine_git_object: 3fe61f60d02bb479666a3e589c27c358eb2d4e03 + last_write_checksum: sha1:9fafefc730d10ae17baf0c77462f658f9f15fdcb + pristine_git_object: 0434e94872c5989925f698380b725bfa1c48a00c docs/models/workflowexecutionprogresstraceevent.md: id: 143ceb0718a6 last_write_checksum: sha1:9878b118897957dd4b92163966ea4199c29bc5ff pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e docs/models/workflowexecutionrequest.md: id: 44a6d9ef046a - last_write_checksum: sha1:fafbe0ccef730faa8a1689ff7525fb439e77dc48 - pristine_git_object: 54f61ea35422b37fa529e0602a338e0248c05f39 + last_write_checksum: sha1:7b89fdc9aad5d00d0bdef187cc59dc89377b780f + pristine_git_object: 08b584f940a741d661be0b4c8df114d018c9ccb8 docs/models/workflowexecutionresponse.md: id: 73595cfc443f - last_write_checksum: sha1:3861cb1972cca17c595d1eb23518bfa54c382e89 - pristine_git_object: e414c47eb7a01e677cef6cc3ebda77fd28566450 + last_write_checksum: sha1:b2aacb271ca655f622ba0c724971620814e0272b + pristine_git_object: 03f1010030defa48eb7d3f98189baab9ff7b1bfe docs/models/workflowexecutionstartedattributesresponse.md: id: 384d48b3e104 - last_write_checksum: sha1:be35194c22fa533235fe930bf9aa83acd5b8ca40 - pristine_git_object: c28de680eb4e49295610414f052164833e28265a + last_write_checksum: sha1:c5fb16f4017b9332fb97b54172320bbd9cdb91d4 + pristine_git_object: e222a142f4042032e2f4fc8c3a714a0b00e35835 docs/models/workflowexecutionstartedresponse.md: id: 64174669ff20 last_write_checksum: sha1:8eee734d26442d9c6e6693386c78eb204a932847 @@ -2964,32 +3044,32 @@ trackedFiles: pristine_git_object: b6bb388ca18523ca9b682e5bc4d4cf1c95100fa5 docs/models/workflowexecutiontraceeventsresponse.md: id: 4242880e71fc - last_write_checksum: sha1:52585c82f6588ee57520355320c156348f694695 - pristine_git_object: a0e6e4867f9d3e98b1f34a4f7c9462bd90ae7ced + last_write_checksum: sha1:e240be5e6d57636189c0648f749ea7c2bb1b18bd + pristine_git_object: d24dfcaf0cb9f0c1519b5057263dcb839b61f275 docs/models/workflowexecutiontraceeventsresponseevent.md: id: 40012f3fc374 last_write_checksum: sha1:b7b2a4544e04bda359d226efc6ae4247678bda9a pristine_git_object: 81c4f573a5af75f2ea8356f8bf23da676700ab8d docs/models/workflowexecutiontraceotelresponse.md: id: 358cf8c2556f - last_write_checksum: sha1:b0a9f0bf2236d86d1a6863c2bff41bf58058fa47 - pristine_git_object: 6218877661371cfe62fb4d24fd3a56fb21c77591 + last_write_checksum: sha1:8a518835d45e407d39893fe1493e24bb5931dd86 + pristine_git_object: cc4ff9cab9673bdce6ab31e930224490ad78f6c1 docs/models/workflowexecutiontracesummaryattributesvalues.md: id: 50e4fbfd4cf6 - last_write_checksum: sha1:0486340bda63ec19ddc32dfc49520a4946847321 - pristine_git_object: c01a122f81fd7bcd6c00a746bc5705c66261bdc6 + last_write_checksum: sha1:ee33a4345041c2d8529049f0d04efb410ead4f64 + pristine_git_object: 04bd34abb60485a9fe252a3c3cb125570f6fcc27 docs/models/workflowexecutiontracesummaryresponse.md: id: 5ac68ea4a1a4 - last_write_checksum: sha1:3db91df0b8a7404d5fd0ca7e43554cc7e330ac8b - pristine_git_object: 3c1ab0e51584fae9398d6d9fb64dbc03149f2f5b + last_write_checksum: sha1:57899967680f72b2093c5a1add7fd4e598bc38f5 + pristine_git_object: c0380e7893e43ce2f5e4bef048efb1061ad93fa5 docs/models/workflowexecutiontracesummaryspan.md: id: 3851de52d638 last_write_checksum: sha1:528371799a9c90c9ddaf5315c2d33b89320688b8 pristine_git_object: 8ee487a2091161e674db28a7919d0d3d4cb57e32 docs/models/workflowexecutionwithoutresultresponse.md: id: 612e2645e3a3 - last_write_checksum: sha1:42a987056a79fccc0bf262e46214f5c2f875736a - pristine_git_object: f74414a66874be98f9a7c3ddaf938a0d9c0a598c + last_write_checksum: sha1:a62d8b840c5c769f61ec6e6af3b06dec3aecb044 + pristine_git_object: 47d795898cda1c2ce875b5f46f740d2f6c708c59 docs/models/workflowgetresponse.md: id: aa8fca163259 last_write_checksum: sha1:eba9585e94ebc141c43d39689c31997083dcb615 @@ -3068,32 +3148,32 @@ trackedFiles: pristine_git_object: 68faf7c0932990ae52eb0ff627544bd76bcb1545 docs/models/workflowwithworkerstatus.md: id: 81265aadaf0d - last_write_checksum: sha1:f426a9a3a9ba4ded4ab8f330509b12c7a13e0408 - pristine_git_object: ac6efb9c006c95ffcd50a72710c86140ace4d2c4 + last_write_checksum: sha1:907f0ec1a157e36e002ee5088a2ee1519688e230 + pristine_git_object: daa637fafd39b03b9d6c0b627047be1142f060cc docs/sdks/accesses/README.md: id: 2ea167c2eff2 last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:6ba47b049bdd791f3129c3c2443f2f5b5a18edaa - pristine_git_object: 35c3d410b8552fb536981e824e39fe04e06cd57c + last_write_checksum: sha1:b3208129bbad753f3608a5072ebf5b13a20d8656 + pristine_git_object: 02542a7502f85fd033dffdc5ee106269def51a36 docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:ecf3800c83f9455471766e0f20a07192e76a736e pristine_git_object: 3e082340c7c8740bd6acd6143dc35a940145ccb6 docs/sdks/betaagents/README.md: id: 5df79b1612d8 - last_write_checksum: sha1:b01e307ad49bb22962062b1c1d3dd58563dea71b - pristine_git_object: 2c3e9c2fca43f97ced64cf7c97636201377d51e2 + last_write_checksum: sha1:6d14ffeace9a068f45ed9c62ee6663dc3768239f + pristine_git_object: b936538c54d38e52a67ffdb8c65ec35999197a3a docs/sdks/campaigns/README.md: id: 18dcc3c717ca last_write_checksum: sha1:758413376668e53883ded94d41b1167cbc00fa04 pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:d76b41db35332bb25cfa9efec945a3488604aeb0 - pristine_git_object: 03c1b7799a271a63f209894b421004beb453d29d + last_write_checksum: sha1:6b952de949ea5187cbfd94ce40d4e11ede230082 + pristine_git_object: 484191c3f9a89a819615a452031f893b58651fe6 docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -3104,12 +3184,12 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:fca5196bf515725bb1a75bbc1db99dfc414f62d6 - pristine_git_object: f4a0a09713bf1f1e4d3e7fb7c4479415f79a9dc0 + last_write_checksum: sha1:621a1e3c33c06d38cef7f0c446c8fff3b220f3eb + pristine_git_object: 67005b8f11e68e236e57a5558d4d7a206f9a4fa6 docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:e0b78791f14b76d486688c5aa829877d58ae36da - pristine_git_object: 56b9b75a1f61a22c63bfcd7953e294f2337bfa3b + last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 + pristine_git_object: 63cd80a4a655a5c139be79239b0787c3f90cdea9 docs/sdks/datasets/README.md: id: deb5d90f4faf last_write_checksum: sha1:cf41aa56b5fe1296961ddb769b96cb0f451ed2f2 @@ -3120,8 +3200,8 @@ trackedFiles: pristine_git_object: 941b5538a57b3b693914d6b0d2acad2e8bb47611 docs/sdks/documents/README.md: id: 9758e88a0a9d - last_write_checksum: sha1:a77fb7acf2be6e18a3017855b30f5ad58576698f - pristine_git_object: 2c9440f93d68a220c2cb2cf03c5cd656eece3be8 + last_write_checksum: sha1:0c5f5c460384857c687b50505076459cd0ebf4f1 + pristine_git_object: 81195b66f8e1c7ded4f37e20c74a8667013ed7d2 docs/sdks/embeddings/README.md: id: 15b5b04486c1 last_write_checksum: sha1:4a279bf9bcd84a9878ef979c78b8b75af3d52f02 @@ -3144,20 +3224,24 @@ trackedFiles: pristine_git_object: 246707073e9dee115d30b20a01bf728dcb43efd7 docs/sdks/fim/README.md: id: 499b227bf6ca - last_write_checksum: sha1:5b2ce811df8d867d14fe0126f2c9619cca779f56 - pristine_git_object: 49151bf5be49ce6554679bc5c30906894a290ecb + last_write_checksum: sha1:8f6120eef6e5978eca9d219ff62a9c23d61fd55b + pristine_git_object: 134f5388fc4240aaff22667bf6a8a182a92b7c2a docs/sdks/finetuningjobs/README.md: id: 03d609f6ebdd last_write_checksum: sha1:2d7ff255c1462d5f1dff617a1993e730ec3911ea pristine_git_object: 4262b3a9833180ce86da43a26ee7ab27403f2cd0 + docs/sdks/ingestionpipelineconfigurations/README.md: + id: ead2af7afd1c + last_write_checksum: sha1:27a44e0a0e7ef48fa3053c975d15e5012bf8e13e + pristine_git_object: 30457be25c61740bfccdcb06e91aaaa7eb0076d9 docs/sdks/judges/README.md: id: 330e067ff8b7 last_write_checksum: sha1:e21c7f2201ab3e2ed14c5be687e5291f7c6ee9cb pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 - last_write_checksum: sha1:627694b529bd8eb7fea6b8cfcfafa0c07282bf00 - pristine_git_object: 7d244f79322f6e7d5e01c9279b8abce634d6f1f7 + last_write_checksum: sha1:1fc0de7c3bf00ddb7f9bc74701ee788d6fd3c9ce + pristine_git_object: 711e3b765238b940efbee69ce34e38c03d7d86dc docs/sdks/metrics/README.md: id: a8545d964e21 last_write_checksum: sha1:0c559bd570e162c994c6125058f3712e24bc576b @@ -3176,28 +3260,28 @@ trackedFiles: pristine_git_object: ce8f1f689512a9eac118c05ec1e9acf17e931556 docs/sdks/runs/README.md: id: 4598fd39b715 - last_write_checksum: sha1:1b27c50c01a0754ae978b5e59252193a2bdc03d4 - pristine_git_object: 33a551c5d4d455675e22d5391072cda56252683d + last_write_checksum: sha1:20e849d15916f477bfc94f62d69c50385c0370b1 + pristine_git_object: 7ed914205115222f7ade5a656541af0dba64ff28 docs/sdks/schedules/README.md: id: 2f28c809a225 last_write_checksum: sha1:70cf78f4dd201a70da97aa86a1f5d936dfabbe13 pristine_git_object: dd1565e04c21206cb8498f6cf5cea719ee0856ec docs/sdks/speech/README.md: id: d5924688d48c - last_write_checksum: sha1:39e91f6d26c0d04212b24de47dbe5b5d5487a208 - pristine_git_object: 309ab6e005f01232410e5c44a61944e6f5355696 + last_write_checksum: sha1:7128863f5b445f343d4fde121c78de3a8ee4cc11 + pristine_git_object: 7cd76ff4dc2354a55ae8b7bf08fbe46cf20ab081 docs/sdks/transcriptions/README.md: id: 089cf94ecf47 last_write_checksum: sha1:15d118796f147bc5b0bf4146ba39bfa9edfbc996 pristine_git_object: 97703c9b4dc942385ee04ae96cbd100c3f632a17 docs/sdks/voices/README.md: id: 4f1a657c8f68 - last_write_checksum: sha1:8ddfebe91ff50ea863d4c0bd85c75458a482667e - pristine_git_object: 3b4d135f39bdfc3237c36c03367952eae54bdd48 + last_write_checksum: sha1:88be1b4df915b0c4f50f2a54f2c7e93ffd5a5263 + pristine_git_object: 49b8533f85e2c6bf70ff1ea296136f4d18cb8348 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:af6d1ec6698a8d58a743d67e897910038bed299a - pristine_git_object: 324c46b14e6d1bebbfe9dda2458201cb799d67d1 + last_write_checksum: sha1:12d8e73a88f35cef55d739bd243fd1d591a6d8d5 + pristine_git_object: 93ff8660eca16554191d6af5d26eac34ed90a5ed docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3228,16 +3312,16 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:62503452c03fc40a489df46113bd64d8fb407c56 - pristine_git_object: aa3edd4f8d0b89c2c9890781320b44a52340e511 + last_write_checksum: sha1:5052a82368babc34c9e2ea2cb8195df7532cd1a9 + pristine_git_object: e6e50dc030653f0670c788c55cc394e05b47dd7b src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d pristine_git_object: 002f0103547db5107f4646d645b11682e220b955 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:169d1fa06d2adac6017c8716d377853afd278025 - pristine_git_object: f16078e86091a52de5d3e6cb5cac7262d22bd647 + last_write_checksum: sha1:5f52254eae3323849773938e7e773692e7675f3a + pristine_git_object: a3472b62812218f21e79359fe4e85c7ab578a117 src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd @@ -3256,20 +3340,20 @@ trackedFiles: pristine_git_object: 9c6fd9c268e0d242c63277812bd0b0224ac61475 src/mistralai/client/beta.py: id: 981417f45147 - last_write_checksum: sha1:0971bda6a9024dcbdf8b4aaad1086417b01ee40f - pristine_git_object: 83b8fc8792469efbd03f0bab240d4a6dc8135db5 + last_write_checksum: sha1:1f6972862310651111b52027dd8b4c5519adadfd + pristine_git_object: f9bbb5aed59e7f9505e4bba2ee9c0190d51cf626 src/mistralai/client/beta_agents.py: id: b64ad29b7174 - last_write_checksum: sha1:7b5b7ca9dd622067ee3da020687579d7974754c9 - pristine_git_object: 5d60170e267f453aa4c2db7c6b2d48f7b4c69366 + last_write_checksum: sha1:72a9be3966526edb69ec86d2841f45cb5fe4739e + pristine_git_object: 67d17a052718e6aec0582167f2e0c1b4b3722d7a src/mistralai/client/campaigns.py: id: 9e64fcf4e60e last_write_checksum: sha1:5fb00fbd6551d63a545e3a28a4e8d55ea5d49daf pristine_git_object: 427bef5e086a425aaa14381aba53085681029f3e src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:5e8b0d17268471e3b914358c1477bd1ca43357e5 - pristine_git_object: cfc615eb0e529539f74cb69049ef7ff3fcc9d8d5 + last_write_checksum: sha1:46d2954900c7819cc5790bf23393dd12bc7b515e + pristine_git_object: 113d145338c040f7d0070420e8ebb818a09f74bc src/mistralai/client/chat_completion_events.py: id: 1813f339625b last_write_checksum: sha1:1e7ed51f7ad879b3cd903d66e52716717142e4a8 @@ -3280,12 +3364,12 @@ trackedFiles: pristine_git_object: 9fd3b3a1b28b155ee397a6edb6da106408c3bade src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:78489e58ca183c5db5e7c0efaf3351cf104aa452 - pristine_git_object: fc9d6319b4d321e21a7b7d73515f9d13b9ac8a2a + last_write_checksum: sha1:42df853243a50c49ba13da10061dc22cc79e473f + pristine_git_object: 0d1dc703662b401fa56e0e5ee1649292864ada1a src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:9ca47ba2c537b019402fb38be51ebaefc8812457 - pristine_git_object: 8c6ed8b2426896672864b75cbb739202b733543d + last_write_checksum: sha1:12565953aff450ec47afb9cb2523c145ef822b1e + pristine_git_object: 9a2cff81739d305e2886b24071caa1f33b97fbf9 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 last_write_checksum: sha1:52f8dc6df7430622882b02e8d01d8da02e4e998f @@ -3296,8 +3380,8 @@ trackedFiles: pristine_git_object: 6613b91c79b3aaa7e3a43fe815b2e018167e47e3 src/mistralai/client/documents.py: id: bcc17286c31c - last_write_checksum: sha1:88e164a0a1fc0608c42ad77864b43b788a25cd2c - pristine_git_object: 701e53108423fdf17db03fbf52c76a880af37d7e + last_write_checksum: sha1:bdf4a3cfcb1a59b5d5af361ba75990d3b650b30e + pristine_git_object: aefcf749f4191bcc95ce77f81c20d0f36cd1b313 src/mistralai/client/embeddings.py: id: f9c17258207e last_write_checksum: sha1:3766f5877ce2bb2069e0881b4f4c22b4beb7b8d6 @@ -3348,8 +3432,8 @@ trackedFiles: pristine_git_object: 0728e9a29b1703ec98c2e7c9d2984b30c51757fc src/mistralai/client/fim.py: id: 217bea5d701d - last_write_checksum: sha1:e891b3dd75c481e6692b0223390cc8b914bfcf28 - pristine_git_object: b4253ad61578202a83ccbf90f33249370d9432fb + last_write_checksum: sha1:94a569cfa91532578c25cbe640ad83785228d548 + pristine_git_object: ba2bd5b5afff3d12d2d6e0c9ac5296eaccf95d56 src/mistralai/client/fine_tuning.py: id: 5d5079bbd54e last_write_checksum: sha1:fe1f774df4436cc9c2e54ed01a48db573eb813cd @@ -3362,22 +3446,26 @@ trackedFiles: id: 3e46bde74327 last_write_checksum: sha1:0f4ecc805be1dc3d6e0ca090f0feb7d988f6eb9d pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 + src/mistralai/client/ingestion_pipeline_configurations.py: + id: f5a994272058 + last_write_checksum: sha1:c1fcdadd2d2fc9391dee1eb8ede14fa5ef5c5baf + pristine_git_object: e795a8ab2f4acaee98203eab16a142521d47abbd src/mistralai/client/judges.py: id: b6024a41ecb4 last_write_checksum: sha1:f79c7d8e28e343cd699cf36a6d53165cc54d8da2 pristine_git_object: 210a147a86956d2da0d2e80d51d37bf4fa3bafd4 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:51838e6fd61bf7f0aabe4df449f53e9b1e8f9401 - pristine_git_object: fd9dbc5fbc7f853a638c6377bf7e4cc41c090da4 + last_write_checksum: sha1:ae60e80c9d987db4e58634ca9308048ebc06eaa0 + pristine_git_object: 151536438423cf5c02f2e7d5892ba8b646e74ffb src/mistralai/client/metrics.py: id: 937cb03f8130 last_write_checksum: sha1:0f650d881a321f34f03cf53d841bdb422516d699 pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:f804d34792cb000093bdaf97dc89fc4330b91f94 - pristine_git_object: 34e6bdc1475b321f471f2a42236e33c7409cbf86 + last_write_checksum: sha1:7335a6de194bcfcb61b1411bf37070adc2a9574f + pristine_git_object: efc6e811898d33174d3b81b121287b4df6449b1e src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -3412,16 +3500,16 @@ trackedFiles: pristine_git_object: 75186e027475280fefb1750beb1933bdac4d76cb src/mistralai/client/models/agent.py: id: 1336849c84fb - last_write_checksum: sha1:2574866d9855cb0b6314ac94ca288d59f3196c73 - pristine_git_object: 28d3751f63c1657abccbecc129a65f751742342d + last_write_checksum: sha1:c650f57616b5455de2a6ff33c51f91b174586aee + pristine_git_object: 36cb26bfc19f17866330d709f82e15555b1a99e5 src/mistralai/client/models/agentaliasresponse.py: id: 3899a98a55dd last_write_checksum: sha1:d7e12ea05431361ad0219f5c8dee11273cd60397 pristine_git_object: 6972af2a4ae846e63d2c70b733ecd6c8370ee0cd src/mistralai/client/models/agentconversation.py: id: 1b7d73eddf51 - last_write_checksum: sha1:84a013c3f7e0a1fb10e2f476360504dd449e529b - pristine_git_object: 061ff2ac9222704ef4af2ec7b76958e6b71e4be7 + last_write_checksum: sha1:2619ac07a5b0642d5ea02b843bf38a7e32ec8cb1 + pristine_git_object: b52f5e5a96c497c731c19f32c6142ee50ed29367 src/mistralai/client/models/agenthandoffdoneevent.py: id: 82628bb5fcea last_write_checksum: sha1:2c8fbb608143ee836e675a0d9610a64b7b8ac99a @@ -3512,12 +3600,12 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:864a66223d00005d44a00a171a7156f21affe113 - pristine_git_object: a919dbc37f94920eafa1cb81414afc00323fcecb + last_write_checksum: sha1:d476b63df42077af04072ffc8823a5d0df3e8417 + pristine_git_object: 6b36c59702332065f974b2316bb371b37f387e8c src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:452d2699fce04c94c58e596c19693d9dcb2fee9b - pristine_git_object: 05df8ae7ad8e7715a66e10c8e06daf267ff44acd + last_write_checksum: sha1:f350bac2b12bf761a1b13e1f258277e7f9064e07 + pristine_git_object: e23442aa525e5baf7931e0d0d3801d91bd313357 src/mistralai/client/models/annotations.py: id: 3ae9e07de11d last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 @@ -3570,14 +3658,22 @@ trackedFiles: id: b4d3fb07196e last_write_checksum: sha1:70f8bbaa8d72e5684eb5cda5d95c0f17ed61a8f7 pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe + src/mistralai/client/models/authenticationconfiguration.py: + id: 97b5056c29fb + last_write_checksum: sha1:731f7ee5fc0fce68a240341f0cf4d7aeb2313475 + pristine_git_object: c2ea5f94b966cb76ed2b20c67d624243d4bd8e71 + src/mistralai/client/models/authenticationtype.py: + id: b403278039c5 + last_write_checksum: sha1:dcd017f2e96b2d8f06a29f3d085e7f1fbc44af16 + pristine_git_object: f5827174101d03c0a2de45139f76c22af7a11b6f src/mistralai/client/models/authurlresponse.py: id: a2b468c87a8a last_write_checksum: sha1:8ffc0c770c51d7b0cb49770e6829486d0cb82741 pristine_git_object: 1f5a6639b3fae3a5c96cf35bc4417d5d5151a37f src/mistralai/client/models/basefielddefinition.py: id: ffa42818fea3 - last_write_checksum: sha1:a323bc4117cecf4ffcb228cf896e7ceae02f9b6d - pristine_git_object: acf9cf8d6fc3220f736b7c6cfe32d42425febd2a + last_write_checksum: sha1:daf1a595cf333e7ee53378849430e79aba1d253a + pristine_git_object: 2b45183d4d4727551377e12615d216dc8a64f62d src/mistralai/client/models/basemodelcard.py: id: 556ebdc33276 last_write_checksum: sha1:1a1d261bad5394f01bbad562e8eee941014b7d9e @@ -3648,16 +3744,16 @@ trackedFiles: pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:323abe229ce9962309c98a4abe079057957e3831 - pristine_git_object: 1d0cf90d133dc843603b5d398b81c692993ddf80 + last_write_checksum: sha1:a9252ff419763a8a41a576f3a6801ebe5dc308bd + pristine_git_object: 5bce222f013bd475507623a309e20e0ac0950698 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:2f609b08fb18ef6cebd484d89f35de59c96ffac5 - pristine_git_object: 5cdccafb4330960b8a54475682d0939d42341903 + last_write_checksum: sha1:908b2feb55dc9c0143584b467d96236e5b2099e3 + pristine_git_object: 7cc7a057132017b06fb8baf16f2531a536649f03 src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -3746,38 +3842,86 @@ trackedFiles: id: be202ea0d5a6 last_write_checksum: sha1:b0c6896368230fd499799cc42b25f9fd51a4d0a1 pristine_git_object: b91ec9dfd51b8e6fa208ef54dc2a22437df3a22d + src/mistralai/client/models/connectioncredentials.py: + id: 2f4a79b452fb + last_write_checksum: sha1:2183abeb08ce54a985d531baac5f67b84f42417d + pristine_git_object: de461057f967b4dbd746cc82321fbed4afbdf145 src/mistralai/client/models/connector.py: id: 1a4facac922d - last_write_checksum: sha1:2648e3e1647fa9ae857961ccda8b0f5f36a6cade - pristine_git_object: 55730274eaa98e7aa53d04ba4b9006a61e427740 + last_write_checksum: sha1:86f06a14b64400dc9994b198fd1dff2a2e8ada03 + pristine_git_object: e7b83ed4167acb3bef2d4c985f095ed92d075f91 src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:c4388ac1594641c36f97daaedcf42b0e94753be7 pristine_git_object: 9c77123e18a86efaa7c0055e0c2a1a7226e7ffd9 + src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py: + id: 57c711e81d89 + last_write_checksum: sha1:19d272c21834d9273aae754bd821fa5f252c24e5 + pristine_git_object: f66d73d3822fee42507625e5ba1b1ba75c4fda4e + src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py: + id: 6ededc839b03 + last_write_checksum: sha1:26b00ed504ad3dea28e1ef521bc6ca3d23763211 + pristine_git_object: 338d4f3923cb85adccf725f24235bd6b94d26075 + src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py: + id: 7795b085704b + last_write_checksum: sha1:70bffd65c359d4c295b0f4a419d5a783d50e03ea + pristine_git_object: 43b3c1dc6576d9d9260a220097f52b51029e205a + src/mistralai/client/models/connector_delete_organization_credentials_v1op.py: + id: aab3a70dbbc5 + last_write_checksum: sha1:a53123b18f8dd5a33e777741ab44aac0d5ed64ee + pristine_git_object: 6cdb0c31f9a3d13ee87336fafe85865da6cfcf7e + src/mistralai/client/models/connector_delete_user_credentials_v1op.py: + id: 8bf2075ebdbf + last_write_checksum: sha1:9fbbc77385a362f9a03f9fdd6110d7e77854d16f + pristine_git_object: 40d25aabfd4c0e2c980782afa6cc5c059441045e src/mistralai/client/models/connector_delete_v1op.py: id: a377930b1435 last_write_checksum: sha1:2c9a501ab2e2b05829f2e3fd838f88a610d56781 pristine_git_object: 74134361aeeaf83af57d7edc7d9ae26ab09d96fb + src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py: + id: 4f0993c25ece + last_write_checksum: sha1:d928043c07daf8e170649473bd6cb36b1c928805 + pristine_git_object: a746ff5e09af76bf2aa4135b5fc675c816a8941f src/mistralai/client/models/connector_get_auth_url_v1op.py: id: 2e6b9ab43d1d - last_write_checksum: sha1:97d50ce0011177c9033bb436929fda3ee6109d61 - pristine_git_object: f8f5fd783243a7b6d5b1f14bda2fd6e8c3c43f2e + last_write_checksum: sha1:ad08ab3776eb111a5feac74d06a98c6b7bd9d9d5 + pristine_git_object: 10f42827ca82eb227fc760e1edb806438b745a15 + src/mistralai/client/models/connector_get_authentication_methods_v1op.py: + id: 6861e4d57959 + last_write_checksum: sha1:8114ef46326cfcdadbbcc73fdcdc9ab52f3d8e0d + pristine_git_object: e0c4146d4621eec51f6961f85de95088e7480c08 src/mistralai/client/models/connector_get_v1op.py: id: 73ca3a446dcc last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 + src/mistralai/client/models/connector_list_organization_credentials_v1op.py: + id: a52ee058feab + last_write_checksum: sha1:57cb81c3a5744f83aba43cd35f358e9b0e132c2d + pristine_git_object: a20fa2a4fc5a5809428460a592a81db3b23a8ec5 src/mistralai/client/models/connector_list_tools_v1op.py: id: 4c6ad704479b - last_write_checksum: sha1:3d509db411bf04de04d21360fd2c98cd7adce855 - pristine_git_object: 030ffb2c8f8423d840147bbc7f45f623ccfe3731 + last_write_checksum: sha1:8af274c0304af97a649137075b4fea4acadeb434 + pristine_git_object: 3e9905c30d02fef3e73689b2e8968462dc4b36fa + src/mistralai/client/models/connector_list_user_credentials_v1op.py: + id: 106e8fba762d + last_write_checksum: sha1:7f706dda1feb8a433370bf28dbe6511825a9ae71 + pristine_git_object: 5b47ee83a1608f0dd5e953a69a0e08b0744bf596 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 pristine_git_object: 3cb31bf7fe0b814606b4bbdfbf7e5cbf733984bf + src/mistralai/client/models/connector_list_workspace_credentials_v1op.py: + id: de7c431e8a54 + last_write_checksum: sha1:f13cfb7cffc9ac054a65657c6cb61a284099e6a1 + pristine_git_object: ef0f096e6c05bc63511bde38317f95572b471b8e src/mistralai/client/models/connector_update_v1op.py: id: 6f884d18ac56 last_write_checksum: sha1:be8044958ac76ecfc486dc5cb5f0876e595dcc38 pristine_git_object: 6b00d0b0ca6d83b4ac1fce1ab204ac09ca5ceeb5 + src/mistralai/client/models/connectorauthenticationheader.py: + id: 7271f22f39b0 + last_write_checksum: sha1:0811c183ba11289f038860270ccf622ca51b0a6a + pristine_git_object: 5fc073f040c9fae143383077747e5fad8799a2e7 src/mistralai/client/models/connectorcalltoolrequest.py: id: 7dc7ec295301 last_write_checksum: sha1:8af4bd44caa8ad09180139e7e8a68052c16dce11 @@ -3840,28 +3984,28 @@ trackedFiles: pristine_git_object: 6bfc5894b329531c7845d0457209a0d5c35c0145 src/mistralai/client/models/conversationrequest.py: id: 58e3ae67f149 - last_write_checksum: sha1:66c8ac371f79d0ec93cae4ee2afe8cfe37edae4a - pristine_git_object: f7ed89b51f3a747f5058666a36700ced23e14c7d + last_write_checksum: sha1:5d64abb831437c60c7e88a7dce2e08d03174ee1e + pristine_git_object: 94fcb03bb392ff4a369e0dfaa524644d611d2c49 src/mistralai/client/models/conversationresponse.py: id: ad7a8472c7bf last_write_checksum: sha1:cd45eec534ccd27052d9809f8aafedeee243d9f9 pristine_git_object: 64437b23c7ff4cd50010e970832bed3567ae4bf0 src/mistralai/client/models/conversationrestartrequest.py: id: 681d90d50514 - last_write_checksum: sha1:7f689520e582ce79f37caec22921b61e86fdbf95 - pristine_git_object: 8e04cb4547a899a7a6c997e7f26e9cca55c0d44c + last_write_checksum: sha1:edc3713fa0be297da7c622f60775db3c617ab221 + pristine_git_object: b6b03f1faa89d72e4a4b3682f47692f301cfed9c src/mistralai/client/models/conversationrestartstreamrequest.py: id: 521c2b5bfb2b - last_write_checksum: sha1:52850d94f142690a6c04f8497b12a6cfc5fa7e0e - pristine_git_object: d1aeb98d9bb45f52ea915602854cfdf57314a9e1 + last_write_checksum: sha1:6fd47c92114693010c6014af6e2a347091985a87 + pristine_git_object: 41b7098f7086b41089432b183df664fb7539bfc1 src/mistralai/client/models/conversationsource.py: id: 24d6a0861d4b last_write_checksum: sha1:e28921788ab1b6d2b6daf08b714bf34b2047eb6c pristine_git_object: a3b93b61b842002fc9fbb05815b800fb1294cb52 src/mistralai/client/models/conversationstreamrequest.py: id: 58d633507527 - last_write_checksum: sha1:b5260447a552fd71a3c45aa0c2105b7db94026f7 - pristine_git_object: 4ec455b21b61d6f45bbf2a17fa5edc2edbc5fab9 + last_write_checksum: sha1:17f643578f395a5b4605710402f115eb25cae8b3 + pristine_git_object: a1afb2679b5c1e97995b78bbf2572cec489d28c5 src/mistralai/client/models/conversationusageinfo.py: id: 6685e3b50b50 last_write_checksum: sha1:ee993afc39cece27caf99ee60258f45980d86cbc @@ -3872,8 +4016,8 @@ trackedFiles: pristine_git_object: 03156fa31f51655dfd9bda21082710b1d1f42907 src/mistralai/client/models/createagentrequest.py: id: 442629bd914b - last_write_checksum: sha1:ebc559195377b1526a1aa5ad7344d934daf96b2f - pristine_git_object: b31fbc9178ad57fc290114061fd500f67657e89e + last_write_checksum: sha1:da0d93f32efd9db292a83ccb8c0d18c02dbbb7ee + pristine_git_object: b434619d8c161f74453e2546986e24ea802269e8 src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 last_write_checksum: sha1:9061e5f387d98c2c2f624efafd6ef178dfad6b43 @@ -3912,8 +4056,16 @@ trackedFiles: pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 - last_write_checksum: sha1:edc78f755094546142934c99ee3a97817e023520 - pristine_git_object: 28dda0cb8c5ba2462ed0f68f19747447c6ae401b + last_write_checksum: sha1:500d7eacc93b9af13d5400493793bc48e7ceea35 + pristine_git_object: 7d75578eb59dbdda5e088318c6f16aaedcd041b8 + src/mistralai/client/models/credentialscreateorupdate.py: + id: 9927546f2487 + last_write_checksum: sha1:e31d3c7fc19e2a7fb49d07cb6f85c5ea73aabb98 + pristine_git_object: 0766a4d3226231936feb478187cf0de3a7af7d47 + src/mistralai/client/models/credentialsresponse.py: + id: 80cc6fb316f9 + last_write_checksum: sha1:73099f8280c3e753d693edb24f773112fefa6538 + pristine_git_object: 4c6a41abca469df0d1dcd92858461b07375a06c9 src/mistralai/client/models/customconnector.py: id: 14f3643f7703 last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d @@ -4028,16 +4180,20 @@ trackedFiles: pristine_git_object: f0ca3282d3d26bbdcf9382063b14c185c3758faa src/mistralai/client/models/deploymentdetailresponse.py: id: 7f4a17a1c7ca - last_write_checksum: sha1:c0d41bf5e5fbe06811aa3a6ddeb3b1cfab2ab8b6 - pristine_git_object: 82f021f187b86ad79d826166d7fe6fd91b915b58 + last_write_checksum: sha1:bd85744b2412a60be5a1411f28c633e05d5fb2b1 + pristine_git_object: 6bf228123c95132e64239ea6a3aaecf8bdde4b68 src/mistralai/client/models/deploymentlistresponse.py: id: 1f0b404ba621 last_write_checksum: sha1:abf42a7e10930c6fa908aece4903f5464f88aef2 pristine_git_object: 7926cde725d80b9055401de46ab947c98e8c5a3e + src/mistralai/client/models/deploymentlocation.py: + id: c62839f1466c + last_write_checksum: sha1:a67cf8983cf1bf9c5790a22a5b9b8ed6d5c51fab + pristine_git_object: 52ce79939cd52cb071d7f532b2b4ea8ab4f4976f src/mistralai/client/models/deploymentresponse.py: id: ea15ddd64402 - last_write_checksum: sha1:a3dcc989ef05cade526d30b7fd23d3d0737e9f1b - pristine_git_object: 7f8ed3a346fa92bf7c7ddfc72984a51442e58d0c + last_write_checksum: sha1:fe377892fc9125736a2e35ea402654b9c0100e3b + pristine_git_object: 0e31684900b6e1cad1a7399cefc0d0a83eaae0f9 src/mistralai/client/models/deploymentworkerresponse.py: id: b11a9947bd19 last_write_checksum: sha1:cf27528873306d9137f08c82c87fa99b44ed5fc5 @@ -4216,16 +4372,16 @@ trackedFiles: pristine_git_object: ced355f16abe74ce87d1770cebe761d0b26c35bc src/mistralai/client/models/fimcompletionrequest.py: id: cf3558adc3ab - last_write_checksum: sha1:ebb1c97108ecd51ee163dcec36e3d88ece4695bf - pristine_git_object: 2ca34598854f3777430de33d2acf2fc45f27fbcc + last_write_checksum: sha1:4c5de51fc8ff8bf07cee739b884c422fea2d1e8c + pristine_git_object: 6b6b1f5259d7d5b7913bd9ccf29f9e037a70656b src/mistralai/client/models/fimcompletionresponse.py: id: b860d2ba771e last_write_checksum: sha1:dffd5a7005999340f57eaa94e17b2c82ddc7fd90 pristine_git_object: 1345a116b7855ab4b824cf0369c0a5281e44ea97 src/mistralai/client/models/fimcompletionstreamrequest.py: id: 1d1ee09f1913 - last_write_checksum: sha1:338c8d224fa5739296fe0e1ea1c00e65fba30b99 - pristine_git_object: 9c91083cc72cfa7ffa59d58e9255b16ac5983077 + last_write_checksum: sha1:961586040cc53ebbf68a8fccb1c578f697a72f68 + pristine_git_object: 6993807aef51ba425eec3053b3377488a7e952d7 src/mistralai/client/models/finetuneablemodeltype.py: id: 05e097395df3 last_write_checksum: sha1:daf4cd1869da582981023dea1074268da071e16a @@ -4400,16 +4556,16 @@ trackedFiles: pristine_git_object: fe7d639da434356114d8cd5829c0d3fffa776515 src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py: id: 822f256b2372 - last_write_checksum: sha1:364bd7662bed7045624c9a135ba145e55aa5c24c - pristine_git_object: 478ee3fb1d86e9421c3219668f8095637a3352ed + last_write_checksum: sha1:7d816703621bc0539d3e167b3e811175edf82bec + pristine_git_object: d8cc7f6e1ff24c85ad6a86bd87c6071d1741d461 src/mistralai/client/models/get_workflow_v1_workflows_workflow_identifier_getop.py: id: 097af37374fd last_write_checksum: sha1:962b823e10fb6cc838ecf2b02b0cc284252ee908 pristine_git_object: 20d0b6dd4e74c9c39a8b95cb9f9ec590d146574f src/mistralai/client/models/get_workflows_v1_workflows_getop.py: id: a128585aee76 - last_write_checksum: sha1:b2580366fd3a247b68b1037ed80d7158cd061e51 - pristine_git_object: 6cbad5e4fdbe4bd86426bec5edbb7a899d091f3c + last_write_checksum: sha1:bd3043f5808b7713f36ed1866a992c9a7ad567aa + pristine_git_object: 38ca4d72f95339ca39224c2b3d5e8a2e43dbc420 src/mistralai/client/models/getfileresponse.py: id: 81919086e371 last_write_checksum: sha1:a116c2fdef65748b5015804fc0eb9860fd2bc3b2 @@ -4466,6 +4622,10 @@ trackedFiles: id: 8d809b14b144 last_write_checksum: sha1:3c858d0475e826d072c96a84d868e97593a399a3 pristine_git_object: f5bd720db16c37504e1993cc6e651712551d2612 + src/mistralai/client/models/ingestionpipelineconfiguration.py: + id: b4746c0f2c1c + last_write_checksum: sha1:3f2f9354886721ec9d6f79dbd8cc8d991ccfc639 + pristine_git_object: 5aaa6a40e03f9ef95258fde6cb66b96687359f29 src/mistralai/client/models/inputentries.py: id: 44727997dacb last_write_checksum: sha1:9e2a776be59c5043ea4179a60ac082faf064cc3d @@ -4476,12 +4636,8 @@ trackedFiles: pristine_git_object: 9ecd7f484ea306b91a9ebf038a0addd80ccd57c4 src/mistralai/client/models/instructrequest.py: id: 6d3ad9f896c7 - last_write_checksum: sha1:d49d03f5a1d0e35668851aced62848ed3e20f001 - pristine_git_object: 2bda83781d24d3a999014d483ea92604c7509438 - src/mistralai/client/models/internalmetadata.py: - id: 50a25e4e336c - last_write_checksum: sha1:e38448a4e90734164d1b69a33e52f5e72e23fc84 - pristine_git_object: dca90b9a7b16b555734a248372235a254ca66860 + last_write_checksum: sha1:b56a77442b50b50151adedaa5ec356dc96c56428 + pristine_git_object: e5f9cccf174d8e73c42e8ee4aa294b43e1ad6cf5 src/mistralai/client/models/jobmetadata.py: id: cfbdde7fc0a2 last_write_checksum: sha1:efe10ba4aad0a0e0befd94525b73ab2194e43be8 @@ -4636,8 +4792,8 @@ trackedFiles: pristine_git_object: 1f4847874cdeff26caaf5fd16e0f8382834ecb2b src/mistralai/client/models/libraries_documents_get_text_content_v1op.py: id: 1ca4e0c41321 - last_write_checksum: sha1:26133a83bf0ef063c78069da1bbb96d58f44f30c - pristine_git_object: e0508d66fce682ed20a029604897137940689327 + last_write_checksum: sha1:b2fee3d9658ab1614f88ffcaf8bb19e6a7548ba6 + pristine_git_object: 3d2ad43d8cdc6336bb73c7911c7058115524fda4 src/mistralai/client/models/libraries_documents_get_v1op.py: id: 26ff35f0c69d last_write_checksum: sha1:e87e56e8fb9f7c11d61c805362db4755a81186b9 @@ -4696,8 +4852,8 @@ trackedFiles: pristine_git_object: 1a42d9b0828a2e826948641a7b8be3e5d80e94db src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py: id: 2f1b225158c3 - last_write_checksum: sha1:50ac1b78fd3397604cb8d90118c16bb17f6da798 - pristine_git_object: e61140cf55f1284db81359eabc9d9860e2477ea9 + last_write_checksum: sha1:2c2e900a0aa6336031ac08a73ae2dc6fa335e644 + pristine_git_object: 3237a29abcce0972fdc4613ffcfa38eea5e2a0e9 src/mistralai/client/models/list_voices_v1_audio_voices_getop.py: id: 6b3ce5be1294 last_write_checksum: sha1:f11a5135ce79d1913db87f9db7d05b4266630b20 @@ -4758,6 +4914,10 @@ trackedFiles: id: 20a423148117 last_write_checksum: sha1:bdf75230150022794f0268453c9f59952580c524 pristine_git_object: be99ccea41922c73c7209fbc78393c7ae47e1a3e + src/mistralai/client/models/locationtype.py: + id: 72a73946b20e + last_write_checksum: sha1:18a2d1aeb07ed9d84a1854bb7186e5d32783cb58 + pristine_git_object: 4e2ff2f6869517202f4f0c435ce4a6435c5cc571 src/mistralai/client/models/mcpservericon.py: id: a5b508a322d7 last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 @@ -4806,22 +4966,10 @@ trackedFiles: id: e2a5171d27c5 last_write_checksum: sha1:361fdea88fe10abec7f0e49ad918e8a02354a801 pristine_git_object: f3e292bd722e7a0a0b50a7c66a61b0f9808e7b4d - src/mistralai/client/models/metadatadict.py: - id: 5c62d851af9a - last_write_checksum: sha1:2a28a02251f7881f39902ef0a6e671af0ce7737f - pristine_git_object: 9d6b608663f8c605a95aa602cc4a5006a88d4ed2 src/mistralai/client/models/metric.py: id: c6a65acdd1a2 last_write_checksum: sha1:0d7e4ebbf55f8dcc52facb894589ce44abb0c2fa pristine_git_object: 8d05989420e1b8b68c90fef193bcaff4452c97fc - src/mistralai/client/models/mirrorconfig.py: - id: 0aebdaa43ceb - last_write_checksum: sha1:2d06feabdd69c8bd3e2450c1142a6ddc74ac303a - pristine_git_object: e77540647a9b054aa8e2767335f607b8330c6e53 - src/mistralai/client/models/mirrorsource.py: - id: 101888c5d045 - last_write_checksum: sha1:9351b6bdf47343ba82777f6e4e22032feee2f220 - pristine_git_object: 04603cb03570fe227a729829496b39cf6e6e1cb7 src/mistralai/client/models/mistralpromptmode.py: id: 95abc4ec799a last_write_checksum: sha1:a1417b987bb34daeb73ca4e015c085814e6c8ad2 @@ -4832,8 +4980,8 @@ trackedFiles: pristine_git_object: 2206f9a7e5a42e66bf00e550591c9b09eba56620 src/mistralai/client/models/modelconversation.py: id: fea0a651f888 - last_write_checksum: sha1:01f046df5bd4ca67b33d11a37da87ab81c3ae228 - pristine_git_object: ff3b85d3086dd80f3bc8cc04452affa0e1ab13dc + last_write_checksum: sha1:46ed83726fd34517bf05bf6fc1204a0134c38a06 + pristine_git_object: 72ca957f0eb33dfdfad8fb8074f93b066868f074 src/mistralai/client/models/modellist.py: id: 00693c7eec60 last_write_checksum: sha1:fedfe929f37d6d81248f8f2d6004454aaa35145f @@ -4870,6 +5018,10 @@ trackedFiles: id: 6dc5321dbe77 last_write_checksum: sha1:5a99ca47003b7bcfee48753dd4683a94eeee1fe1 pristine_git_object: 70d9241431ae75d58435965be03089ab8419d32f + src/mistralai/client/models/oauth2token.py: + id: 6153dd0f41bc + last_write_checksum: sha1:01476e43abf5a755d7d8a3f42a7b662cbb37a949 + pristine_git_object: 0887216bdc99f6cddecfcb48881440b35a48fca6 src/mistralai/client/models/oauth2tokenauth.py: id: 167c3b8a104e last_write_checksum: sha1:146c4ce3a29c0bedcb575cf7fa32cb97aa375c5b @@ -4994,6 +5146,10 @@ trackedFiles: id: e6be33f2cd2d last_write_checksum: sha1:aa71bf6de6316b8754fb18f897b30051a2d4c70e pristine_git_object: 2c5186c02f6b463c12fd7819637b52c8c7ee4cd7 + src/mistralai/client/models/publicauthenticationmethod.py: + id: 545ab7f24523 + last_write_checksum: sha1:34851f4831b0bd8fbe4f6f53cdb642d4d0df54b6 + pristine_git_object: 3351b432a777ca2f584040f9f2968ceefa050979 src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py: id: 73826dbd3f5b last_write_checksum: sha1:5105618697e031bae45cf9f6d7c5227d9c08f155 @@ -5208,8 +5364,8 @@ trackedFiles: pristine_git_object: f564d2affd4a0b031cf44caf5242c8bbec9235e9 src/mistralai/client/models/speechrequest.py: id: cf3bc148e629 - last_write_checksum: sha1:4ca18d5c7780aac92e054a6ad08b05597885c380 - pristine_git_object: 8aaabda9040fe9ffa804dd6a93a15e3f491bf0e3 + last_write_checksum: sha1:9a1a2a4c87877a40591b013b50bdd80230278b70 + pristine_git_object: c57df7a8f7ade2da3c4132de4a186dbc082f52f2 src/mistralai/client/models/speechstreamaudiodelta.py: id: ac66815396b1 last_write_checksum: sha1:eb3e66fbf2164686d20900761be40c7b90bfb82b @@ -5252,8 +5408,20 @@ trackedFiles: pristine_git_object: 8575b95430e10a9b8d7e1df0f0e131cda68bb685 src/mistralai/client/models/tempotraceattribute.py: id: 7d0ec3402dc0 - last_write_checksum: sha1:6d75f1b8a97ca30fbd0d4c56a0e9a42a15c0df5a - pristine_git_object: 71c1b1f2ebb6a8211693d7b58d83a7fee9854cc4 + last_write_checksum: sha1:663896264ac81d443679ca397fdad95a96683455 + pristine_git_object: dea530ea8fc2ee80d5218b3e1437b23fa94daf4b + src/mistralai/client/models/tempotraceattributearraycontainer.py: + id: afca3b2e0b21 + last_write_checksum: sha1:b4f8414e509c84ca90f2d859f222a313b9948b39 + pristine_git_object: 082060373b99b74bfe6c29a30048758f3023bdcb + src/mistralai/client/models/tempotraceattributearrayelement.py: + id: 4f3b1d9264a3 + last_write_checksum: sha1:d1922dd0b17d26b2aa0e4858a35a90662ebba626 + pristine_git_object: 6fa0ec60f028712573e8947ef2d34e526c64ef81 + src/mistralai/client/models/tempotraceattributearrayvalue.py: + id: d75dd416f9e3 + last_write_checksum: sha1:47995b569301c6d8b7a6ca1ad8c04717f16d0868 + pristine_git_object: 95fe337ec35bc6fe4161837b7efe5ff3a59e7cf3 src/mistralai/client/models/tempotraceattributeboolvalue.py: id: c7c383a6c05f last_write_checksum: sha1:a40945504a6845a3e43a80d5f901af9f5c5ee96b @@ -5312,8 +5480,8 @@ trackedFiles: pristine_git_object: c3f26a65734775d166a1f5d27cab50933e1a4597 src/mistralai/client/models/thinkchunk.py: id: 294bfce193a4 - last_write_checksum: sha1:4563b1759e8b64a9ed1de3843ea73ffb8f2e3285 - pristine_git_object: ae084a179c3227351d0ca8b10c926c6a61d21221 + last_write_checksum: sha1:d4cb78e98c29689beb2634a8c9d23fd360849ca5 + pristine_git_object: d2af3da69462a2ad410bf9108861e1122ecdb7a9 src/mistralai/client/models/timeseriesmetric.py: id: 7f91751795ac last_write_checksum: sha1:e7871d8fa64b59e8448f0ae3be46f02c4d02eac8 @@ -5472,8 +5640,8 @@ trackedFiles: pristine_git_object: 9ee9b6d2db84a56c401c91e9484cea378ecc38dd src/mistralai/client/models/updateagentrequest.py: id: 914b4b2be67a - last_write_checksum: sha1:0917571c77c739ae6c158b2adcd5df7ebc332f4f - pristine_git_object: df4664fa294ab8e900d0a0f060f35e6c82a0825d + last_write_checksum: sha1:db80a8f0b630acf98be5c27caa7bb448a4e58237 + pristine_git_object: 7bb9686b9b542c47ac25fb6780017b5739829b1e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 last_write_checksum: sha1:cdf3aa496722d84b0a76d52ce76133cfaafb0073 @@ -5568,8 +5736,8 @@ trackedFiles: pristine_git_object: f82b6ec1c89cae83ea21d9bae12a1984679262ae src/mistralai/client/models/workflow.py: id: 1548cd73984e - last_write_checksum: sha1:14e1db57af8784d77633d7dc1d22198f2377909b - pristine_git_object: 5edf326ce15c6496607fd15f6362ca7aa1936de7 + last_write_checksum: sha1:fa55b0742593b2b6a4c1bbd688f39b50449746df + pristine_git_object: 2eeac0dcb9d482774b6323b8c0750327b668bf89 src/mistralai/client/models/workflowarchiveresponse.py: id: 64c479b7f9da last_write_checksum: sha1:7e14d02314fcc8dab22a6a908f89122491449151 @@ -5580,8 +5748,8 @@ trackedFiles: pristine_git_object: d2f3db1fb851353d21ce5bbec5e8d2d4b9afabfa src/mistralai/client/models/workflowcodedefinition.py: id: 36fd5b898ddd - last_write_checksum: sha1:70e771dc21affc971eb01de18d3c439c1f3cc8c5 - pristine_git_object: f71b9ff1885114e764665d2620e5c3fc01862ff8 + last_write_checksum: sha1:bd77f4a5e5b32892f806278bcd6dc2d951f10629 + pristine_git_object: 84444ce61006301fb145cc2fefcc577d7a2dc1fe src/mistralai/client/models/workfloweventtype.py: id: b4aeeb03b57a last_write_checksum: sha1:451a78dadc17941f397d73ff83c14d552f7150d7 @@ -5620,24 +5788,24 @@ trackedFiles: pristine_git_object: 687d33a9199612bbb8b5db5f6d2be2421469aeb5 src/mistralai/client/models/workflowexecutionlistresponse.py: id: c2b2e1ab4821 - last_write_checksum: sha1:e264605252d0dc594cafea0e4713015cfa7ca925 - pristine_git_object: 442ed9728bcf2c09fb051b892a7a226b7921e993 + last_write_checksum: sha1:0993e22cc42af96754b46ce7e880b4beb28988dc + pristine_git_object: b992bc8e6656b14122bad4996fa2137363a3afca src/mistralai/client/models/workflowexecutionprogresstraceevent.py: id: 6ea7078aaca3 last_write_checksum: sha1:5af64f5a2d76bde2a1a51e3b543db894c2045a44 pristine_git_object: ffebdb82a1a80d1d086b919da9b33e2f090388c4 src/mistralai/client/models/workflowexecutionrequest.py: id: 806340497ed4 - last_write_checksum: sha1:5270ee18d5eef0a52762ade3d207a8bbaa154f72 - pristine_git_object: 615276d30bf6131df5415a9d1d0476a0a3e16521 + last_write_checksum: sha1:ca40b6f0bc818b277af8a1443b2b728c7a64708e + pristine_git_object: e878b2f4f0eb38d614787ac6d700e70075c3820f src/mistralai/client/models/workflowexecutionresponse.py: id: 758786637be5 - last_write_checksum: sha1:2544bf94e8d64a9bd33f37ff4737f320fcd84733 - pristine_git_object: 84398375dde630f5aa2dd6363bb3fff43c1766f3 + last_write_checksum: sha1:1a06785d691c7bdc9e5d1fe4e2a4e3d5e2d3b96b + pristine_git_object: 83179054bf4ca0e3da6be1644fcb32680a4c43c7 src/mistralai/client/models/workflowexecutionstartedattributesresponse.py: id: d2276919a895 - last_write_checksum: sha1:5861816b3b992c9a7e2dd044b56307d677f2fc10 - pristine_git_object: 74e55c2977c6357077d414f799c59c7854fa2d08 + last_write_checksum: sha1:67f7f7ce3ac895677b946e2e8e492192bd2709b8 + pristine_git_object: c6e118f4772209df61b90302566d7c6892b40827 src/mistralai/client/models/workflowexecutionstartedresponse.py: id: e1a597c911ea last_write_checksum: sha1:9c761698883844061bf5cae76e3bc6444941124e @@ -5656,28 +5824,28 @@ trackedFiles: pristine_git_object: f74cd5ab6aeadf662e90a46b394621a631602372 src/mistralai/client/models/workflowexecutiontraceeventsresponse.py: id: 94d92762ccb7 - last_write_checksum: sha1:2cf2e1cf393c7295af7b32194211b5ff41c6946e - pristine_git_object: 0c24a1eaeb338b14da62ed40a4a7e67e631e1589 + last_write_checksum: sha1:2d46b00c374d7590802c60abee6ea69d1d999ed1 + pristine_git_object: 22853e9b01dea9917dfb6291feb36b32f1e65850 src/mistralai/client/models/workflowexecutiontraceotelresponse.py: id: 7531bf461dc2 - last_write_checksum: sha1:eff6ffecd0fb5643747ef9f87c4c4a6a499c0035 - pristine_git_object: b4320b8324c712380acda8edbc1fedbe49954c73 + last_write_checksum: sha1:284b6d7b90576638656b3493e5ba7429a56fe9c5 + pristine_git_object: 46f5404e4da7d0e40199054cfb5b0dfc15ab1eed src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py: id: 5e3448a39a40 - last_write_checksum: sha1:b9c8999af86024aaa6533aed348315326658354e - pristine_git_object: e288146db9dcaf3a7216c7e780f9c98ce75e85a3 + last_write_checksum: sha1:a59ae1b987558f478518c86f93713e174e5e8d19 + pristine_git_object: 1957662cace4c7ca9b7b892b749922a436ca92f0 src/mistralai/client/models/workflowexecutiontracesummaryresponse.py: id: 2ea199810f5f - last_write_checksum: sha1:9746a523ac969574417442960b8d814e04403e25 - pristine_git_object: d2cc7c6bdc90ed15e9091cf038e98762430d33af + last_write_checksum: sha1:8642e0396abaedb1f758df0bc06d8386c024c8c5 + pristine_git_object: 92e9a2a7b0df8a7a6ff1fff5f1aee4cdc04c51c5 src/mistralai/client/models/workflowexecutiontracesummaryspan.py: id: 750353cbd052 last_write_checksum: sha1:ba4f7ecc22fdd36aa3c11af5c1e434bb974d5786 pristine_git_object: e80db90fe890726c75f711ea2b52b3008ef949ca src/mistralai/client/models/workflowexecutionwithoutresultresponse.py: id: dd70ba8def79 - last_write_checksum: sha1:38435a2f9f21037122a13e01d7f036fcfe266e5b - pristine_git_object: 082653c8e7fb5a6830e1457d629991cb9a9d4d56 + last_write_checksum: sha1:c6952b7163b972a0beb868b4407b3780f7ecbbd8 + pristine_git_object: 5e7fe8528de081b2366584af49ab954b93aeea0c src/mistralai/client/models/workflowgetresponse.py: id: 230f55a36ebf last_write_checksum: sha1:935cfce50db82d85ac0e246736c8939bfb015da0 @@ -5756,8 +5924,8 @@ trackedFiles: pristine_git_object: 3336e448baf9f21cf5bfd1369e6268ea3a7d5e24 src/mistralai/client/models/workflowwithworkerstatus.py: id: e1055203af7d - last_write_checksum: sha1:57d7ac9a4e19ddb50d8dad4c2d68695c1c2acbb7 - pristine_git_object: 7f469007b8ceb86f2d4faa09d3335ac874a6fe24 + last_write_checksum: sha1:26d8e9f584293e324a10953cd9aff57644277fb7 + pristine_git_object: 81030e21fe08c8ac1401ac6fb0a105f985985cf0 src/mistralai/client/models_.py: id: 1d277958a843 last_write_checksum: sha1:4247baa39847450e7d4d42678b6199dc83e9f057 @@ -5774,14 +5942,18 @@ trackedFiles: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 + src/mistralai/client/rag.py: + id: 2c2b641de1b6 + last_write_checksum: sha1:d27e705578c277540b90b6a84a4669580170c64e + pristine_git_object: 091b02705ce1bd11ea3dc3602a1ebf8e29815495 src/mistralai/client/records.py: id: 10f90c990bd8 last_write_checksum: sha1:e4d0a85b402c59788843296276dd516b07311d3b pristine_git_object: a47d12c36d50f3b8cd0e56d840e1394647f887ba src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:4dfcc99df0f9951dbebedb7d124096d04f05fed2 - pristine_git_object: 08394802d34bba34d8fcd25285a8a77b5a1b285f + last_write_checksum: sha1:c4df89a6693ea4242c5b3c4f8c1d8333e918a716 + pristine_git_object: 031564ad217349dc89f1b692c438078696c06fd3 src/mistralai/client/schedules.py: id: d3b4fe452390 last_write_checksum: sha1:029d95bc3440ffd3b03a89fd045283d7ddab19a8 @@ -5796,8 +5968,8 @@ trackedFiles: pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 src/mistralai/client/speech.py: id: 5c1f1109aa5e - last_write_checksum: sha1:5c4164ac1ab12f0808440110abe268921576833f - pristine_git_object: 4c3aafd507c086a0b6388834276c9510d3ed0f49 + last_write_checksum: sha1:92ec388be858318b47c428d1a1191052baf3a2ab + pristine_git_object: 9b4eacf0402b8bf477d83ae3f942b1cd554bb322 src/mistralai/client/transcriptions.py: id: 75b45780c978 last_write_checksum: sha1:e333611029fccbd1fb66f7a1e96025c9311bc5b5 @@ -5888,12 +6060,12 @@ trackedFiles: pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c src/mistralai/client/voices.py: id: ab76b1377d79 - last_write_checksum: sha1:c46a418a865955ab8b72d7d2584ba9b758f75165 - pristine_git_object: c4f1a71e1da1cb4ebda3ef4fb69cbbe98370d2ae + last_write_checksum: sha1:a1b8b30045116c3149e9d1e9e79a31c4016f0773 + pristine_git_object: b95fd11d5fce3ffaede8bf9adc15335d83ae0cb2 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:643f6debca318789195f27e7ccf9ff959d558f46 - pristine_git_object: cd34603af303f2fc50754a3850aba08678b22277 + last_write_checksum: sha1:f6d5aa9b9bd371545660765d40a68771df876edc + pristine_git_object: 163f203102ac43ddd25e31aef2213bcfce46bc94 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:79816d0388e471a4bbb3d09df84794e9405cf3b2 @@ -6315,14 +6487,14 @@ examples: application/json: {} userExample: requestBody: - application/json: {"model": "codestral-latest", "top_p": 1, "stream": false, "prompt": "def", "suffix": "return a+b"} + application/json: {"model": "codestral-latest", "stream": false, "prompt": "def", "suffix": "return a+b"} responses: "200": application/json: {"id": "447e3e0d457e42e98248b5d2ef52a2a3", "object": "chat.completion", "model": "codestral-2508", "usage": {"prompt_tokens": 8, "completion_tokens": 91, "total_tokens": 99}, "created": 1759496862, "choices": [{"index": 0, "message": {"role": "assistant", "content": "add_numbers(a: int, b: int) -> int:\n \"\"\"\n You are given two integers `a` and `b`. Your task is to write a function that\n returns the sum of these two integers. The function should be implemented in a\n way that it can handle very large integers (up to 10^18). As a reminder, your\n code has to be in python\n \"\"\"\n", "tool_calls": null, "prefix": false}, "finish_reason": "stop"}]} stream_fim: speakeasy-default-stream-fim: requestBody: - application/json: {"model": "codestral-latest", "top_p": 1, "stream": true, "prompt": "def", "suffix": "return a+b"} + application/json: {"model": "codestral-latest", "stream": true, "prompt": "def", "suffix": "return a+b"} responses: "422": application/json: {} @@ -7905,6 +8077,7 @@ examples: responses: "200": application/json: "" + audio/wav: "x-file: example.file" "422": application/json: {} connector_list_tools_v1: @@ -7986,7 +8159,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "7e6d5999-1f66-4311-8059-f056ead70099", "name": "", "display_name": "Clifton98", "type": "code", "customer_id": "7882a879-b763-4980-9480-235734fdf4f4", "workspace_id": "5be5bb5a-4e28-453d-b0f5-a506f3a5cd58", "available_in_chat_assistant": false, "is_technical": false, "archived": false, "active": true}} + application/json: {"workflow": {"id": "7e6d5999-1f66-4311-8059-f056ead70099", "name": "", "display_name": "Clifton98", "type": "code", "customer_id": "7882a879-b763-4980-9480-235734fdf4f4", "workspace_id": "5be5bb5a-4e28-453d-b0f5-a506f3a5cd58", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false, "active": true}} "422": application/json: {} update_workflow_v1_workflows__workflow_identifier__put: @@ -7998,7 +8171,7 @@ examples: application/json: {} responses: "200": - application/json: {"workflow": {"id": "db975768-c873-461d-b3e8-6f22f94c0b20", "name": "", "display_name": "Marilie.Keeling", "type": "code", "customer_id": "89b5718e-e6ee-4eb2-b9bd-53c5f9c1222a", "workspace_id": "2ddcd2cb-4f9d-4897-b286-e08bd0fbd54b", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + application/json: {"workflow": {"id": "db975768-c873-461d-b3e8-6f22f94c0b20", "name": "", "display_name": "Marilie.Keeling", "type": "code", "customer_id": "89b5718e-e6ee-4eb2-b9bd-53c5f9c1222a", "workspace_id": "2ddcd2cb-4f9d-4897-b286-e08bd0fbd54b", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} "422": application/json: {} get_workflow_registration_v1_workflows_registrations__workflow_registration_id__get: @@ -8021,7 +8194,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "5efd36dc-5de7-4708-a17b-492eb93650e0", "name": "", "display_name": "Torrey_Rippin32", "type": "code", "customer_id": "93950b7e-25cf-45e9-9e16-558ac052306e", "workspace_id": "61923af7-6896-4605-9c48-c7d3cacb4732", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + application/json: {"workflow": {"id": "5efd36dc-5de7-4708-a17b-492eb93650e0", "name": "", "display_name": "Torrey_Rippin32", "type": "code", "customer_id": "93950b7e-25cf-45e9-9e16-558ac052306e", "workspace_id": "61923af7-6896-4605-9c48-c7d3cacb4732", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} "422": application/json: {} unarchive_workflow_v1_workflows__workflow_identifier__unarchive_put: @@ -8031,7 +8204,7 @@ examples: workflow_identifier: "" responses: "200": - application/json: {"workflow": {"id": "779e3e34-c64a-493c-bcbe-6d70947147e9", "name": "", "display_name": "Hal56", "type": "code", "customer_id": "f4fbcccc-06b3-4d08-9101-3035a013990a", "workspace_id": "ded5993d-1646-4bdb-a4ba-6b4280e38716", "available_in_chat_assistant": false, "is_technical": false, "archived": false}} + application/json: {"workflow": {"id": "779e3e34-c64a-493c-bcbe-6d70947147e9", "name": "", "display_name": "Hal56", "type": "code", "customer_id": "f4fbcccc-06b3-4d08-9101-3035a013990a", "workspace_id": "ded5993d-1646-4bdb-a4ba-6b4280e38716", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}} "422": application/json: {} get_workflow_execution_v1_workflows_executions__execution_id__get: @@ -8310,8 +8483,127 @@ examples: responses: "200": application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} + connector_get_authentication_methods_v1: + speakeasy-default-connector-get-authentication-methods-v1: + parameters: + path: + connector_id_or_name: "" + responses: + "200": + application/json: [{"method_type": "none"}] + connector_list_organization_credentials_v1: + speakeasy-default-connector-list-organization-credentials-v1: + parameters: + path: + connector_id_or_name: "" + query: + fetch_default: false + responses: + "200": + application/json: {"credentials": [{"name": "", "authentication_type": "oauth2", "is_default": false}]} + "422": + application/json: {} + connector_create_or_update_organization_credentials_v1: + speakeasy-default-connector-create-or-update-organization-credentials-v1: + parameters: + path: + connector_id_or_name: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_list_workspace_credentials_v1: + speakeasy-default-connector-list-workspace-credentials-v1: + parameters: + path: + connector_id_or_name: "" + query: + fetch_default: false + responses: + "200": + application/json: {"credentials": []} + "422": + application/json: {} + connector_create_or_update_workspace_credentials_v1: + speakeasy-default-connector-create-or-update-workspace-credentials-v1: + parameters: + path: + connector_id_or_name: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_list_user_credentials_v1: + speakeasy-default-connector-list-user-credentials-v1: + parameters: + path: + connector_id_or_name: "" + query: + fetch_default: false + responses: + "200": + application/json: {"credentials": []} + "422": + application/json: {} + connector_create_or_update_user_credentials_v1: + speakeasy-default-connector-create-or-update-user-credentials-v1: + parameters: + path: + connector_id_or_name: "" + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_delete_organization_credentials_v1: + speakeasy-default-connector-delete-organization-credentials-v1: + parameters: + path: + credentials_name: "" + connector_id_or_name: "" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_delete_workspace_credentials_v1: + speakeasy-default-connector-delete-workspace-credentials-v1: + parameters: + path: + credentials_name: "" + connector_id_or_name: "" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_delete_user_credentials_v1: + speakeasy-default-connector-delete-user-credentials-v1: + parameters: + path: + credentials_name: "" + connector_id_or_name: "" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + get_configs_v1_rag_ingestion_pipeline_configurations_get: + speakeasy-default-get-configs-v1-rag-ingestion-pipeline-configurations-get: + responses: + "200": + application/json: [{"id": "bf1614ea-c74f-4b49-9415-f199d33c3281", "name": "", "created_at": "2026-06-16T10:34:55.929Z", "modified_at": "2026-04-16T03:39:05.055Z"}] examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.restart_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_events()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.workflows.executions.get_workflow_execution_trace_summary()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.workflows.executions.get_workflow_execution_trace_otel()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.connectors.update()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.get()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.list()`: `response.items[].tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.create()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.agents.get_version()`: `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list_versions()`: `response.[].metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update_version()`: `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.audio.speech.complete()`: `request.metadata` **Changed** (Breaking ⚠️)\n* `mistral.audio.voices.get_sample_audio()`: `response.status[200]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.conversations.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update()`: \n * `request.metadata` **Changed** (Breaking ⚠️)\n * `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get()`: `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list()`: `response.[].metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.conversations.start_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added**\n* `mistral.beta.agents.create()`: \n * `request.metadata` **Changed** (Breaking ⚠️)\n * `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get_history()`: `response.entries[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(system).content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.beta.conversations.get_messages()`: `response.messages[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.connectors.get_authentication_methods()`: **Added**\n* `mistral.beta.conversations.append()`: \n * `request.inputs.union(Array)[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.rag.ingestion_pipeline_configurations.list()`: **Added**\n* `mistral.beta.connectors.delete_user_credentials()`: **Added**\n* `mistral.beta.connectors.delete_workspace_credentials()`: **Added**\n* `mistral.beta.libraries.create()`: `request.owner_type` **Added**\n* `mistral.beta.libraries.documents.text_content()`: `request` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: `response.field_definitions[].type.enum(map)` **Added**\n* `mistral.beta.connectors.delete_organization_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_user_credentials()`: **Added**\n* `mistral.beta.connectors.get_auth_url()`: `request.credentials_name` **Added**\n* `mistral.beta.connectors.list_tools()`: `request.credentials_name` **Added**\n* `mistral.beta.connectors.list_user_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_workspace_credentials()`: **Added**\n* `mistral.chat.complete()`: \n * `request` **Changed**\n * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.chat.stream()`: \n * `request` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.fim.complete()`: \n * `request` **Changed**\n * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.fim.stream()`: \n * `request` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.agents.complete()`: \n * `request` **Changed**\n * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.agents.stream()`: \n * `request` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.beta.conversations.append_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added**\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(tool).content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed**\n* `mistral.workflows.execute_workflow()`: \n * `request.extensions` **Added**\n * `response.union(WorkflowExecutionResponse).run_id` **Added**\n* `mistral.workflows.execute_workflow_registration()`: \n * `request.extensions` **Added**\n * `response.union(WorkflowExecutionResponse).run_id` **Added**\n* `mistral.workflows.get_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.update_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed**\n* `mistral.workflows.archive_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.unarchive_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.executions.get_workflow_execution()`: `response.run_id` **Added**\n* `mistral.beta.connectors.list_workspace_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_organization_credentials()`: **Added**\n* `mistral.beta.connectors.list_organization_credentials()`: **Added**\n* `mistral.workflows.executions.stream()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.workflows.runs.list_runs()`: \n * `request.user_id` **Added**\n * `response.executions[].run_id` **Added**\n* `mistral.workflows.runs.get_run()`: `response.run_id` **Added**\n* `mistral.workflows.events.get_stream_events()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.workflows.events.get_workflow_events()`: `response.events[].union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.workflows.deployments.list_deployments()`: `response.deployments[].location` **Added**\n* `mistral.workflows.deployments.get_deployment()`: `response.location` **Added**\n* `mistral.events.get_stream_events()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.events.get_workflow_events()`: `response.events[].union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 6a7a51ce..e677629a 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.0 + version: 2.4.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 9f48eedd..5388026d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d - sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 + sourceRevisionDigest: sha256:81bd98c0c31f63e1c2ec66d8105defaf18aa59f48e84fa35fb205de7f3ebf48d + sourceBlobDigest: sha256:5062472fdb17553079df91cedaca25d72a8bb140d27fe6f294f85abce3692feb tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5a5b1104accc69fa8fca26e9abd7e089535bbffd20f667013984cbe9e9cf819d - sourceBlobDigest: sha256:3f88e405b674dc0f964605664fc15629b119a4481b08a5c8ac0e79dddcb19f91 + sourceRevisionDigest: sha256:81bd98c0c31f63e1c2ec66d8105defaf18aa59f48e84fa35fb205de7f3ebf48d + sourceBlobDigest: sha256:5062472fdb17553079df91cedaca25d72a8bb140d27fe6f294f85abce3692feb codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:4f85e638c528b022fb052ca92bb487df74eaa9fff37bc54a8bbe79474891e3d2 + codeSamplesRevisionDigest: sha256:815d79d20604e2b311b3553ba4f2f02400875cc37d29ed36a4b911e823f4fd8b workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/README-PYPI.md b/README-PYPI.md index 703095e4..b8985d3a 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -515,6 +515,16 @@ print(res.choices[0].message.content) * [get_auth_url](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [list_tools](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_tools) - List tools for a connector. +* [get_authentication_methods](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get_authentication_methods) - Get authentication methods for a connector. +* [list_organization_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_organization_credentials) - List organization credentials for a connector. +* [create_or_update_organization_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create_or_update_organization_credentials) - Create or update organization credentials for a connector. +* [list_workspace_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_workspace_credentials) - List workspace credentials for a connector. +* [create_or_update_workspace_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create_or_update_workspace_credentials) - Create or update workspace credentials for a connector. +* [list_user_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#list_user_credentials) - List user credentials for a connector. +* [create_or_update_user_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#create_or_update_user_credentials) - Create or update user credentials for a connector. +* [delete_organization_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete_organization_credentials) - Delete organization credentials for a connector. +* [delete_workspace_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete_workspace_credentials) - Delete workspace credentials for a connector. +* [delete_user_credentials](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete_user_credentials) - Delete user credentials for a connector. * [get](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#get) - Get a connector. * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#update) - Update a connector. * [delete](https://github.com/mistralai/client-python/blob/main/docs/sdks/connectors/README.md#delete) - Delete a connector. @@ -619,6 +629,10 @@ print(res.choices[0].message.content) * [update](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#update) - Update a judge * [judge_conversation](https://github.com/mistralai/client-python/blob/main/docs/sdks/judges/README.md#judge_conversation) - Run a saved judge on a conversation +### [Beta.Rag.IngestionPipelineConfigurations](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md) + +* [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations + ### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) * [complete](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md#complete) - Chat Completion @@ -940,8 +954,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 168 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 112 of 179 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 179 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index 941ac903..899efa9d 100644 --- a/README.md +++ b/README.md @@ -515,6 +515,16 @@ print(res.choices[0].message.content) * [get_auth_url](docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. * [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [list_tools](docs/sdks/connectors/README.md#list_tools) - List tools for a connector. +* [get_authentication_methods](docs/sdks/connectors/README.md#get_authentication_methods) - Get authentication methods for a connector. +* [list_organization_credentials](docs/sdks/connectors/README.md#list_organization_credentials) - List organization credentials for a connector. +* [create_or_update_organization_credentials](docs/sdks/connectors/README.md#create_or_update_organization_credentials) - Create or update organization credentials for a connector. +* [list_workspace_credentials](docs/sdks/connectors/README.md#list_workspace_credentials) - List workspace credentials for a connector. +* [create_or_update_workspace_credentials](docs/sdks/connectors/README.md#create_or_update_workspace_credentials) - Create or update workspace credentials for a connector. +* [list_user_credentials](docs/sdks/connectors/README.md#list_user_credentials) - List user credentials for a connector. +* [create_or_update_user_credentials](docs/sdks/connectors/README.md#create_or_update_user_credentials) - Create or update user credentials for a connector. +* [delete_organization_credentials](docs/sdks/connectors/README.md#delete_organization_credentials) - Delete organization credentials for a connector. +* [delete_workspace_credentials](docs/sdks/connectors/README.md#delete_workspace_credentials) - Delete workspace credentials for a connector. +* [delete_user_credentials](docs/sdks/connectors/README.md#delete_user_credentials) - Delete user credentials for a connector. * [get](docs/sdks/connectors/README.md#get) - Get a connector. * [update](docs/sdks/connectors/README.md#update) - Update a connector. * [delete](docs/sdks/connectors/README.md#delete) - Delete a connector. @@ -619,6 +629,10 @@ print(res.choices[0].message.content) * [update](docs/sdks/judges/README.md#update) - Update a judge * [judge_conversation](docs/sdks/judges/README.md#judge_conversation) - Run a saved judge on a conversation +### [Beta.Rag.IngestionPipelineConfigurations](docs/sdks/ingestionpipelineconfigurations/README.md) + +* [list](docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations + ### [Chat](docs/sdks/chat/README.md) * [complete](docs/sdks/chat/README.md#complete) - Chat Completion @@ -940,8 +954,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 103 of 168 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 168 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 112 of 179 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 179 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 1217ae7b..b23b8376 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -588,4 +588,14 @@ Based on: ### Generated - [python v2.4.0] . ### Releases -- [PyPI v2.4.0] https://pypi.org/project/mistralai/2.4.0 - . \ No newline at end of file +- [PyPI v2.4.0] https://pypi.org/project/mistralai/2.4.0 - . + +## 2026-04-21 13:15:47 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.1] . +### Releases +- [PyPI v2.4.1] https://pypi.org/project/mistralai/2.4.1 - . \ No newline at end of file diff --git a/docs/models/agent.md b/docs/models/agent.md index c9c8b748..94e8b035 100644 --- a/docs/models/agent.md +++ b/docs/models/agent.md @@ -13,7 +13,7 @@ | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `object` | *Optional[Literal["agent"]]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | | `version` | *int* | :heavy_check_mark: | N/A | diff --git a/docs/models/agentconversation.md b/docs/models/agentconversation.md index dc62a7f5..451f6fb8 100644 --- a/docs/models/agentconversation.md +++ b/docs/models/agentconversation.md @@ -7,7 +7,7 @@ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name given to the conversation. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the what the conversation is about. | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `object` | *Optional[Literal["conversation"]]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 8627e359..0c3fe986 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -7,15 +7,15 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.AgentsCompletionRequestStop]](../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.AgentsCompletionRequestStop]](../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionRequestMessage](../models/agentscompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.AgentsCompletionRequestTool](../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index 3845f08c..4111877d 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -7,15 +7,15 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.AgentsCompletionStreamRequestStop]](../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.AgentsCompletionStreamRequestStop]](../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.AgentsCompletionStreamRequestMessage](../models/agentscompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.AgentsCompletionStreamRequestTool](../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | diff --git a/docs/models/authenticationconfiguration.md b/docs/models/authenticationconfiguration.md new file mode 100644 index 00000000..081649ea --- /dev/null +++ b/docs/models/authenticationconfiguration.md @@ -0,0 +1,10 @@ +# AuthenticationConfiguration + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `authentication_type` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_check_mark: | N/A | +| `is_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/authenticationtype.md b/docs/models/authenticationtype.md new file mode 100644 index 00000000..498bfeaa --- /dev/null +++ b/docs/models/authenticationtype.md @@ -0,0 +1,19 @@ +# AuthenticationType + +## Example Usage + +```python +from mistralai.client.models import AuthenticationType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: AuthenticationType = "oauth2" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"oauth2"` +- `"bearer"` +- `"none"` diff --git a/docs/models/basefielddefinitiontype.md b/docs/models/basefielddefinitiontype.md index efdff2a4..355242b9 100644 --- a/docs/models/basefielddefinitiontype.md +++ b/docs/models/basefielddefinitiontype.md @@ -21,3 +21,4 @@ This is an open enum. Unrecognized values will not fail type checks. - `"BOOL"` - `"TIMESTAMP"` - `"ARRAY"` +- `"MAP"` diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 042988e6..4a134824 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -7,18 +7,18 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionRequestMessage](../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.ChatCompletionRequestTool](../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index 9783d010..a0f46c47 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -7,18 +7,18 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.ChatCompletionStreamRequestTool](../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | diff --git a/docs/models/connectioncredentials.md b/docs/models/connectioncredentials.md new file mode 100644 index 00000000..7e892399 --- /dev/null +++ b/docs/models/connectioncredentials.md @@ -0,0 +1,10 @@ +# ConnectionCredentials + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `oauth` | [OptionalNullable[models.OAuth2Token]](../models/oauth2token.md) | :heavy_minus_sign: | N/A | +| `headers` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `bearer_token` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connector.md b/docs/models/connector.md index a5d6073e..a0107820 100644 --- a/docs/models/connector.md +++ b/docs/models/connector.md @@ -11,5 +11,4 @@ | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `server` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `auth_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `tools` | List[[models.ConnectorTool](../models/connectortool.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `auth_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectorauthenticationheader.md b/docs/models/connectorauthenticationheader.md new file mode 100644 index 00000000..c545b571 --- /dev/null +++ b/docs/models/connectorauthenticationheader.md @@ -0,0 +1,10 @@ +# ConnectorAuthenticationHeader + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `is_required` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `is_secret` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/metadatadict.md b/docs/models/connectorcreateorupdateorganizationcredentialsv1request.md similarity index 65% rename from docs/models/metadatadict.md rename to docs/models/connectorcreateorupdateorganizationcredentialsv1request.md index c53c4aed..2797bebf 100644 --- a/docs/models/metadatadict.md +++ b/docs/models/connectorcreateorupdateorganizationcredentialsv1request.md @@ -1,11 +1,9 @@ -# MetadataDict - -Custom type for metadata with embedded validation. +# ConnectorCreateOrUpdateOrganizationCredentialsV1Request ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `internal` | [OptionalNullable[models.InternalMetadata]](../models/internalmetadata.md) | :heavy_minus_sign: | N/A | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_create_or_update` | [models.CredentialsCreateOrUpdate](../models/credentialscreateorupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcreateorupdateusercredentialsv1request.md b/docs/models/connectorcreateorupdateusercredentialsv1request.md new file mode 100644 index 00000000..3e763722 --- /dev/null +++ b/docs/models/connectorcreateorupdateusercredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorCreateOrUpdateUserCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_create_or_update` | [models.CredentialsCreateOrUpdate](../models/credentialscreateorupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorcreateorupdateworkspacecredentialsv1request.md b/docs/models/connectorcreateorupdateworkspacecredentialsv1request.md new file mode 100644 index 00000000..310cdcde --- /dev/null +++ b/docs/models/connectorcreateorupdateworkspacecredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorCreateOrUpdateWorkspaceCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `credentials_create_or_update` | [models.CredentialsCreateOrUpdate](../models/credentialscreateorupdate.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeleteorganizationcredentialsv1request.md b/docs/models/connectordeleteorganizationcredentialsv1request.md new file mode 100644 index 00000000..eaf4d00c --- /dev/null +++ b/docs/models/connectordeleteorganizationcredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorDeleteOrganizationCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeleteusercredentialsv1request.md b/docs/models/connectordeleteusercredentialsv1request.md new file mode 100644 index 00000000..fd52cf92 --- /dev/null +++ b/docs/models/connectordeleteusercredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorDeleteUserCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeleteworkspacecredentialsv1request.md b/docs/models/connectordeleteworkspacecredentialsv1request.md new file mode 100644 index 00000000..3bc3d7c9 --- /dev/null +++ b/docs/models/connectordeleteworkspacecredentialsv1request.md @@ -0,0 +1,9 @@ +# ConnectorDeleteWorkspaceCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorgetauthenticationmethodsv1request.md b/docs/models/connectorgetauthenticationmethodsv1request.md new file mode 100644 index 00000000..3a62c010 --- /dev/null +++ b/docs/models/connectorgetauthenticationmethodsv1request.md @@ -0,0 +1,8 @@ +# ConnectorGetAuthenticationMethodsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorgetauthurlv1request.md b/docs/models/connectorgetauthurlv1request.md index d041e0c2..7d6b94ff 100644 --- a/docs/models/connectorgetauthurlv1request.md +++ b/docs/models/connectorgetauthurlv1request.md @@ -6,4 +6,5 @@ | Field | Type | Required | Description | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | | `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistorganizationcredentialsv1request.md b/docs/models/connectorlistorganizationcredentialsv1request.md new file mode 100644 index 00000000..bb1f1c3a --- /dev/null +++ b/docs/models/connectorlistorganizationcredentialsv1request.md @@ -0,0 +1,10 @@ +# ConnectorListOrganizationCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlisttoolsv1request.md b/docs/models/connectorlisttoolsv1request.md index e080455b..e9c21374 100644 --- a/docs/models/connectorlisttoolsv1request.md +++ b/docs/models/connectorlisttoolsv1request.md @@ -9,4 +9,5 @@ | `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | | `refresh` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `pretty` | *Optional[bool]* | :heavy_minus_sign: | Return a simplified payload with only name, description, annotations, and a compact inputSchema. | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistusercredentialsv1request.md b/docs/models/connectorlistusercredentialsv1request.md new file mode 100644 index 00000000..63ec93d5 --- /dev/null +++ b/docs/models/connectorlistusercredentialsv1request.md @@ -0,0 +1,10 @@ +# ConnectorListUserCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistworkspacecredentialsv1request.md b/docs/models/connectorlistworkspacecredentialsv1request.md new file mode 100644 index 00000000..45e90077 --- /dev/null +++ b/docs/models/connectorlistworkspacecredentialsv1request.md @@ -0,0 +1,10 @@ +# ConnectorListWorkspaceCredentialsV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/conversationrequest.md b/docs/models/conversationrequest.md index 4638049e..6a5dc206 100644 --- a/docs/models/conversationrequest.md +++ b/docs/models/conversationrequest.md @@ -15,7 +15,7 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRequestAgentVersion]](../models/conversationrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/conversationrestartrequest.md b/docs/models/conversationrestartrequest.md index 03dec2ec..be0f2289 100644 --- a/docs/models/conversationrestartrequest.md +++ b/docs/models/conversationrestartrequest.md @@ -13,6 +13,6 @@ Request to restart a new conversation from a given entry in the conversation. | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRestartRequestAgentVersion]](../models/conversationrestartrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | \ No newline at end of file diff --git a/docs/models/conversationrestartstreamrequest.md b/docs/models/conversationrestartstreamrequest.md index daa95584..f99a6e34 100644 --- a/docs/models/conversationrestartstreamrequest.md +++ b/docs/models/conversationrestartstreamrequest.md @@ -13,6 +13,6 @@ Request to restart a new conversation from a given entry in the conversation. | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `from_entry_id` | *str* | :heavy_check_mark: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRestartStreamRequestAgentVersion]](../models/conversationrestartstreamrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | \ No newline at end of file diff --git a/docs/models/conversationstreamrequest.md b/docs/models/conversationstreamrequest.md index 3c8b650f..af50989c 100644 --- a/docs/models/conversationstreamrequest.md +++ b/docs/models/conversationstreamrequest.md @@ -15,7 +15,7 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationStreamRequestAgentVersion]](../models/conversationstreamrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createagentrequest.md b/docs/models/createagentrequest.md index 2559a7c7..e9665545 100644 --- a/docs/models/createagentrequest.md +++ b/docs/models/createagentrequest.md @@ -13,5 +13,5 @@ | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createlibraryrequest.md b/docs/models/createlibraryrequest.md index 71562806..ea70d4d8 100644 --- a/docs/models/createlibraryrequest.md +++ b/docs/models/createlibraryrequest.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `owner_type` | [OptionalNullable[models.OwnerType]](../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | \ No newline at end of file diff --git a/docs/models/credentialscreateorupdate.md b/docs/models/credentialscreateorupdate.md new file mode 100644 index 00000000..c544d7c6 --- /dev/null +++ b/docs/models/credentialscreateorupdate.md @@ -0,0 +1,12 @@ +# CredentialsCreateOrUpdate + +Request to create or update non-OAuth2 credentials for a connector. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | \ No newline at end of file diff --git a/docs/models/credentialsresponse.md b/docs/models/credentialsresponse.md new file mode 100644 index 00000000..0cd5b336 --- /dev/null +++ b/docs/models/credentialsresponse.md @@ -0,0 +1,9 @@ +# CredentialsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `credentials` | List[[models.AuthenticationConfiguration](../models/authenticationconfiguration.md)] | :heavy_check_mark: | N/A | +| `connector_preset_credentials_for_auth` | List[[models.AuthenticationType](../models/authenticationtype.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/deploymentdetailresponse.md b/docs/models/deploymentdetailresponse.md index e1d84e11..1f095899 100644 --- a/docs/models/deploymentdetailresponse.md +++ b/docs/models/deploymentdetailresponse.md @@ -10,4 +10,5 @@ | `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | | `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | +| `location` | [OptionalNullable[models.DeploymentLocation]](../models/deploymentlocation.md) | :heavy_minus_sign: | Where the deployment is running | | `workers` | List[[models.DeploymentWorkerResponse](../models/deploymentworkerresponse.md)] | :heavy_check_mark: | Workers registered for the deployment | \ No newline at end of file diff --git a/docs/models/deploymentlocation.md b/docs/models/deploymentlocation.md new file mode 100644 index 00000000..a0cbe6bc --- /dev/null +++ b/docs/models/deploymentlocation.md @@ -0,0 +1,10 @@ +# DeploymentLocation + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `location_type` | [models.LocationType](../models/locationtype.md) | :heavy_check_mark: | N/A | +| `k8s_cluster` | *OptionalNullable[str]* | :heavy_minus_sign: | K8s cluster name, if applicable | +| `k8s_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | K8s namespace, if applicable | \ No newline at end of file diff --git a/docs/models/deploymentresponse.md b/docs/models/deploymentresponse.md index f6f12836..853ebbce 100644 --- a/docs/models/deploymentresponse.md +++ b/docs/models/deploymentresponse.md @@ -3,10 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | -| `name` | *str* | :heavy_check_mark: | Deployment name | -| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `id` | *str* | :heavy_check_mark: | Unique identifier of the deployment | +| `name` | *str* | :heavy_check_mark: | Deployment name | +| `is_active` | *bool* | :heavy_check_mark: | Whether at least one worker is currently live | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was first registered | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | When the deployment was last updated | +| `location` | [OptionalNullable[models.DeploymentLocation]](../models/deploymentlocation.md) | :heavy_minus_sign: | Where the deployment is running | \ No newline at end of file diff --git a/docs/models/fimcompletionrequest.md b/docs/models/fimcompletionrequest.md index fde0b625..c0c52b66 100644 --- a/docs/models/fimcompletionrequest.md +++ b/docs/models/fimcompletionrequest.md @@ -7,10 +7,10 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *str* | :heavy_check_mark: | ID of the model with FIM to use. | codestral-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.FIMCompletionRequestStop]](../models/fimcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.FIMCompletionRequestStop]](../models/fimcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | diff --git a/docs/models/fimcompletionstreamrequest.md b/docs/models/fimcompletionstreamrequest.md index ba62d854..c02b622c 100644 --- a/docs/models/fimcompletionstreamrequest.md +++ b/docs/models/fimcompletionstreamrequest.md @@ -7,10 +7,10 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *str* | :heavy_check_mark: | ID of the model with FIM to use. | codestral-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.FIMCompletionStreamRequestStop]](../models/fimcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.FIMCompletionStreamRequestStop]](../models/fimcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | diff --git a/docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md b/docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md index ee724445..ee53e5a2 100644 --- a/docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md +++ b/docs/models/getworkflowregistrationsv1workflowsregistrationsgetrequest.md @@ -12,6 +12,6 @@ | `workflow_search` | *OptionalNullable[str]* | :heavy_minus_sign: | The workflow name to filter by | | `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | | `with_workflow` | *Optional[bool]* | :heavy_minus_sign: | Whether to include the workflow definition | -| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | | `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows versions to return | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | \ No newline at end of file diff --git a/docs/models/getworkflowsv1workflowsgetrequest.md b/docs/models/getworkflowsv1workflowsgetrequest.md index c83ed6d1..c361f027 100644 --- a/docs/models/getworkflowsv1workflowsgetrequest.md +++ b/docs/models/getworkflowsv1workflowsgetrequest.md @@ -7,7 +7,7 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows | | `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | -| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | | `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | | `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | \ No newline at end of file diff --git a/docs/models/ingestionpipelineconfiguration.md b/docs/models/ingestionpipelineconfiguration.md new file mode 100644 index 00000000..5d25ab15 --- /dev/null +++ b/docs/models/ingestionpipelineconfiguration.md @@ -0,0 +1,11 @@ +# IngestionPipelineConfiguration + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/instructrequest.md b/docs/models/instructrequest.md index 1bd5eb64..5f0cdfff 100644 --- a/docs/models/instructrequest.md +++ b/docs/models/instructrequest.md @@ -1,7 +1,5 @@ # InstructRequest -A valid request to be tokenized - ## Fields diff --git a/docs/models/internalmetadata.md b/docs/models/internalmetadata.md deleted file mode 100644 index 24ca04d9..00000000 --- a/docs/models/internalmetadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# InternalMetadata - -Typed structure for internal metadata. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `agent_version` | [OptionalNullable[models.InternalMetadataAgentVersion]](../models/internalmetadataagentversion.md) | :heavy_minus_sign: | N/A | -| `mirror_config` | [OptionalNullable[models.MirrorConfig]](../models/mirrorconfig.md) | :heavy_minus_sign: | N/A | -| `science_config` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/internalmetadataagentversion.md b/docs/models/internalmetadataagentversion.md deleted file mode 100644 index 8dd7955d..00000000 --- a/docs/models/internalmetadataagentversion.md +++ /dev/null @@ -1,17 +0,0 @@ -# InternalMetadataAgentVersion - - -## Supported Types - -### `str` - -```python -value: str = /* values here */ -``` - -### `int` - -```python -value: int = /* values here */ -``` - diff --git a/docs/models/librariesdocumentsgettextcontentv1request.md b/docs/models/librariesdocumentsgettextcontentv1request.md index 2f58a446..6413e51c 100644 --- a/docs/models/librariesdocumentsgettextcontentv1request.md +++ b/docs/models/librariesdocumentsgettextcontentv1request.md @@ -3,7 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `document_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `page_start` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `page_end` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/listrunsv1workflowsrunsgetrequest.md b/docs/models/listrunsv1workflowsrunsgetrequest.md index 259876c6..319d9ed5 100644 --- a/docs/models/listrunsv1workflowsrunsgetrequest.md +++ b/docs/models/listrunsv1workflowsrunsgetrequest.md @@ -8,5 +8,6 @@ | `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | | `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | | `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | | `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | | `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | \ No newline at end of file diff --git a/docs/models/locationtype.md b/docs/models/locationtype.md new file mode 100644 index 00000000..6daecdd1 --- /dev/null +++ b/docs/models/locationtype.md @@ -0,0 +1,18 @@ +# LocationType + +## Example Usage + +```python +from mistralai.client.models import LocationType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: LocationType = "local" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"local"` +- `"k8s"` diff --git a/docs/models/mirrorconfig.md b/docs/models/mirrorconfig.md deleted file mode 100644 index a722c88d..00000000 --- a/docs/models/mirrorconfig.md +++ /dev/null @@ -1,10 +0,0 @@ -# MirrorConfig - -Configuration for mirroring behavior. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `mirror_source` | [models.MirrorSource](../models/mirrorsource.md) | :heavy_check_mark: | Source information for mirrored requests. | \ No newline at end of file diff --git a/docs/models/mirrorsource.md b/docs/models/mirrorsource.md deleted file mode 100644 index 77c946da..00000000 --- a/docs/models/mirrorsource.md +++ /dev/null @@ -1,14 +0,0 @@ -# MirrorSource - -Source information for mirrored requests. - - -## Fields - -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `app` | *str* | :heavy_check_mark: | N/A | -| `version` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `root_model_name` | *str* | :heavy_check_mark: | N/A | -| `mirror_model_name` | *str* | :heavy_check_mark: | N/A | -| `experiment_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/modelconversation.md b/docs/models/modelconversation.md index e30d93d1..190a6f6e 100644 --- a/docs/models/modelconversation.md +++ b/docs/models/modelconversation.md @@ -11,7 +11,7 @@ | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name given to the conversation. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description of the what the conversation is about. | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `object` | *Optional[Literal["conversation"]]* | :heavy_minus_sign: | N/A | | `id` | *str* | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | diff --git a/docs/models/oauth2token.md b/docs/models/oauth2token.md new file mode 100644 index 00000000..59716ed6 --- /dev/null +++ b/docs/models/oauth2token.md @@ -0,0 +1,13 @@ +# OAuth2Token + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `access_token` | *str* | :heavy_check_mark: | N/A | +| `token_type` | *Optional[Literal["Bearer"]]* | :heavy_minus_sign: | N/A | +| `expires_in` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `scope` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `refresh_token` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/ownertype.md b/docs/models/ownertype.md new file mode 100644 index 00000000..288d5833 --- /dev/null +++ b/docs/models/ownertype.md @@ -0,0 +1,14 @@ +# OwnerType + +## Example Usage + +```python +from mistralai.client.models import OwnerType +value: OwnerType = "User" +``` + + +## Values + +- `"User"` +- `"Workspace"` diff --git a/docs/models/publicauthenticationmethod.md b/docs/models/publicauthenticationmethod.md new file mode 100644 index 00000000..c98413b6 --- /dev/null +++ b/docs/models/publicauthenticationmethod.md @@ -0,0 +1,11 @@ +# PublicAuthenticationMethod + +Public view of an authentication method, without secrets. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `method_type` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_check_mark: | N/A | +| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/speechrequest.md b/docs/models/speechrequest.md index 2e1e4cde..3a22e80a 100644 --- a/docs/models/speechrequest.md +++ b/docs/models/speechrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `voice_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The preset or custom voice to use for generating the speech. | | `ref_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | The audio reference for generating the speech. | diff --git a/docs/models/tempotraceattributearraycontainer.md b/docs/models/tempotraceattributearraycontainer.md new file mode 100644 index 00000000..049dce7d --- /dev/null +++ b/docs/models/tempotraceattributearraycontainer.md @@ -0,0 +1,8 @@ +# TempoTraceAttributeArrayContainer + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `values` | List[[models.TempoTraceAttributeArrayElement](../models/tempotraceattributearrayelement.md)] | :heavy_minus_sign: | The values of the array | \ No newline at end of file diff --git a/docs/models/tempotraceattributearrayelement.md b/docs/models/tempotraceattributearrayelement.md new file mode 100644 index 00000000..a4b82080 --- /dev/null +++ b/docs/models/tempotraceattributearrayelement.md @@ -0,0 +1,10 @@ +# TempoTraceAttributeArrayElement + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `string_value` | *OptionalNullable[str]* | :heavy_minus_sign: | A string element in the array | +| `int_value` | *OptionalNullable[str]* | :heavy_minus_sign: | An integer element in the array | +| `bool_value` | *OptionalNullable[bool]* | :heavy_minus_sign: | A boolean element in the array | \ No newline at end of file diff --git a/docs/models/tempotraceattributearrayvalue.md b/docs/models/tempotraceattributearrayvalue.md new file mode 100644 index 00000000..b763756f --- /dev/null +++ b/docs/models/tempotraceattributearrayvalue.md @@ -0,0 +1,8 @@ +# TempoTraceAttributeArrayValue + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `array_value` | [models.TempoTraceAttributeArrayContainer](../models/tempotraceattributearraycontainer.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/tempotraceattributevalue.md b/docs/models/tempotraceattributevalue.md index eb448c3b..3b0a1869 100644 --- a/docs/models/tempotraceattributevalue.md +++ b/docs/models/tempotraceattributevalue.md @@ -23,3 +23,9 @@ value: models.TempoTraceAttributeIntValue = /* values here */ value: models.TempoTraceAttributeBoolValue = /* values here */ ``` +### `models.TempoTraceAttributeArrayValue` + +```python +value: models.TempoTraceAttributeArrayValue = /* values here */ +``` + diff --git a/docs/models/thinkchunk.md b/docs/models/thinkchunk.md index 98603d8f..b7494bee 100644 --- a/docs/models/thinkchunk.md +++ b/docs/models/thinkchunk.md @@ -7,4 +7,5 @@ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `type` | *Optional[Literal["thinking"]]* | :heavy_minus_sign: | N/A | | `thinking` | List[[models.Thinking](../models/thinking.md)] | :heavy_check_mark: | N/A | +| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | Signature to replay some reasoning blocks across turns. | | `closed` | *Optional[bool]* | :heavy_minus_sign: | Whether the thinking chunk is closed or not. Currently only used for prefixing. | \ No newline at end of file diff --git a/docs/models/updateagentrequest.md b/docs/models/updateagentrequest.md index 7852472b..b8aa01f6 100644 --- a/docs/models/updateagentrequest.md +++ b/docs/models/updateagentrequest.md @@ -14,5 +14,5 @@ | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | | `deployment_chat` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/workflow.md b/docs/models/workflow.md index 4b245e07..b1765cc4 100644 --- a/docs/models/workflow.md +++ b/docs/models/workflow.md @@ -15,4 +15,5 @@ | `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | | `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | | `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | +| `on_behalf_of` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow must run associated to a user's identity | | `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | \ No newline at end of file diff --git a/docs/models/workflowcodedefinition.md b/docs/models/workflowcodedefinition.md index 2034f81f..f8cf3bbd 100644 --- a/docs/models/workflowcodedefinition.md +++ b/docs/models/workflowcodedefinition.md @@ -11,4 +11,5 @@ | `queries` | List[[models.QueryDefinition](../models/querydefinition.md)] | :heavy_minus_sign: | Query handlers defined by the workflow | | `updates` | List[[models.UpdateDefinition](../models/updatedefinition.md)] | :heavy_minus_sign: | Update handlers defined by the workflow | | `enforce_determinism` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow enforces deterministic execution | -| `execution_timeout` | *Optional[float]* | :heavy_minus_sign: | Maximum total execution time including retries and continue-as-new | \ No newline at end of file +| `execution_timeout` | *Optional[float]* | :heavy_minus_sign: | Maximum total execution time including retries and continue-as-new | +| `plugin_metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific metadata (e.g. connector declarations) | \ No newline at end of file diff --git a/docs/models/workflowexecutionlistresponse.md b/docs/models/workflowexecutionlistresponse.md index 3fe61f60..0434e948 100644 --- a/docs/models/workflowexecutionlistresponse.md +++ b/docs/models/workflowexecutionlistresponse.md @@ -1,5 +1,7 @@ # WorkflowExecutionListResponse +Deprecated: use WorkflowRunListResponse instead. Will be removed in the next major version. + ## Fields diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md index 54f61ea3..08b584f9 100644 --- a/docs/models/workflowexecutionrequest.md +++ b/docs/models/workflowexecutionrequest.md @@ -11,5 +11,6 @@ | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | | ~~`task_queue`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | | `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | \ No newline at end of file diff --git a/docs/models/workflowexecutionresponse.md b/docs/models/workflowexecutionresponse.md index e414c47e..03f10100 100644 --- a/docs/models/workflowexecutionresponse.md +++ b/docs/models/workflowexecutionresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutionstartedattributesresponse.md b/docs/models/workflowexecutionstartedattributesresponse.md index c28de680..e222a142 100644 --- a/docs/models/workflowexecutionstartedattributesresponse.md +++ b/docs/models/workflowexecutionstartedattributesresponse.md @@ -9,4 +9,5 @@ Attributes for workflow execution started events. | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | | `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow being executed. | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The user-friendly display name of the workflow, if available. | | `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file diff --git a/docs/models/workflowexecutiontraceeventsresponse.md b/docs/models/workflowexecutiontraceeventsresponse.md index a0e6e486..d24dfcaf 100644 --- a/docs/models/workflowexecutiontraceeventsresponse.md +++ b/docs/models/workflowexecutiontraceeventsresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutiontraceotelresponse.md b/docs/models/workflowexecutiontraceotelresponse.md index 62188776..cc4ff9ca 100644 --- a/docs/models/workflowexecutiontraceotelresponse.md +++ b/docs/models/workflowexecutiontraceotelresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutiontracesummaryattributesvalues.md b/docs/models/workflowexecutiontracesummaryattributesvalues.md index c01a122f..04bd34ab 100644 --- a/docs/models/workflowexecutiontracesummaryattributesvalues.md +++ b/docs/models/workflowexecutiontracesummaryattributesvalues.md @@ -27,3 +27,9 @@ value: float = /* values here */ value: bool = /* values here */ ``` +### `List[Any]` + +```python +value: List[Any] = /* values here */ +``` + diff --git a/docs/models/workflowexecutiontracesummaryresponse.md b/docs/models/workflowexecutiontracesummaryresponse.md index 3c1ab0e5..c0380e78 100644 --- a/docs/models/workflowexecutiontracesummaryresponse.md +++ b/docs/models/workflowexecutiontracesummaryresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowexecutionwithoutresultresponse.md b/docs/models/workflowexecutionwithoutresultresponse.md index f74414a6..47d79589 100644 --- a/docs/models/workflowexecutionwithoutresultresponse.md +++ b/docs/models/workflowexecutionwithoutresultresponse.md @@ -9,6 +9,7 @@ | `execution_id` | *str* | :heavy_check_mark: | The ID of the workflow execution | | `parent_execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The parent execution ID of the workflow execution | | `root_execution_id` | *str* | :heavy_check_mark: | The root execution ID of the workflow execution | +| `run_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique run identifier (database UUID) | | `status` | [Nullable[models.WorkflowExecutionStatus]](../models/workflowexecutionstatus.md) | :heavy_check_mark: | The status of the workflow execution | | `start_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the workflow execution | | `end_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the workflow execution, if available | diff --git a/docs/models/workflowwithworkerstatus.md b/docs/models/workflowwithworkerstatus.md index ac6efb9c..daa637fa 100644 --- a/docs/models/workflowwithworkerstatus.md +++ b/docs/models/workflowwithworkerstatus.md @@ -15,5 +15,6 @@ | `shared_namespace` | *OptionalNullable[str]* | :heavy_minus_sign: | Reserved namespace for shared workflows (e.g., 'shared:my-shared-workflow') | | `available_in_chat_assistant` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is available in chat assistant | | `is_technical` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is technical (e.g. SDK-managed) | +| `on_behalf_of` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow must run associated to a user's identity | | `archived` | *Optional[bool]* | :heavy_minus_sign: | Whether the workflow is archived | | `active` | *bool* | :heavy_check_mark: | Whether the workflow is active | \ No newline at end of file diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index db15db81..fa85c988 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -47,14 +47,14 @@ with Mistral( | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.AgentsCompletionRequestStop]](../../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.AgentsCompletionRequestStop]](../../models/agentscompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.AgentsCompletionRequestTool](../../models/agentscompletionrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionRequestToolChoice]](../../models/agentscompletionrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | @@ -114,14 +114,14 @@ with Mistral( | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.AgentsCompletionStreamRequestStop]](../../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.AgentsCompletionStreamRequestStop]](../../models/agentscompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.AgentsCompletionStreamRequestTool](../../models/agentscompletionstreamrequesttool.md)] | :heavy_minus_sign: | N/A | | | `tool_choice` | [Optional[models.AgentsCompletionStreamRequestToolChoice]](../../models/agentscompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | N/A | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | N/A | | diff --git a/docs/sdks/betaagents/README.md b/docs/sdks/betaagents/README.md index ae5e0e5b..56773f08 100644 --- a/docs/sdks/betaagents/README.md +++ b/docs/sdks/betaagents/README.md @@ -57,7 +57,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -203,7 +203,7 @@ with Mistral( | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `handoffs` | List[*str*] | :heavy_minus_sign: | N/A | | `deployment_chat` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index 2e5aaaf7..fe778e60 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -46,17 +46,17 @@ with Mistral( | `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `messages` | List[[models.ChatCompletionRequestMessage](../../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.ChatCompletionRequestStop]](../../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.ChatCompletionRequestTool](../../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | @@ -116,17 +116,17 @@ with Mistral( | `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.ChatCompletionStreamRequestStop]](../../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `response_format` | [Optional[models.ResponseFormat]](../../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | | `tools` | List[[models.ChatCompletionStreamRequestTool](../../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index f4a0a097..67005b8f 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -11,6 +11,16 @@ * [get_auth_url](#get_auth_url) - Get the auth URL for a connector. * [call_tool](#call_tool) - Call Connector Tool * [list_tools](#list_tools) - List tools for a connector. +* [get_authentication_methods](#get_authentication_methods) - Get authentication methods for a connector. +* [list_organization_credentials](#list_organization_credentials) - List organization credentials for a connector. +* [create_or_update_organization_credentials](#create_or_update_organization_credentials) - Create or update organization credentials for a connector. +* [list_workspace_credentials](#list_workspace_credentials) - List workspace credentials for a connector. +* [create_or_update_workspace_credentials](#create_or_update_workspace_credentials) - Create or update workspace credentials for a connector. +* [list_user_credentials](#list_user_credentials) - List user credentials for a connector. +* [create_or_update_user_credentials](#create_or_update_user_credentials) - Create or update user credentials for a connector. +* [delete_organization_credentials](#delete_organization_credentials) - Delete organization credentials for a connector. +* [delete_workspace_credentials](#delete_workspace_credentials) - Delete workspace credentials for a connector. +* [delete_user_credentials](#delete_user_credentials) - Delete user credentials for a connector. * [get](#get) - Get a connector. * [update](#update) - Update a connector. * [delete](#delete) - Delete a connector. @@ -135,6 +145,7 @@ with Mistral( | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | | `app_return_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -224,6 +235,7 @@ with Mistral( | `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | | `refresh` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `pretty` | *Optional[bool]* | :heavy_minus_sign: | Return a simplified payload with only name, description, annotations, and a compact inputSchema. | +| `credentials_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -237,6 +249,433 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## get_authentication_methods + +Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.get_authentication_methods(connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.PublicAuthenticationMethod]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_organization_credentials + +List all credentials configured at the organization level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list_organization_credentials(connector_id_or_name="", fetch_default=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CredentialsResponse](../../models/credentialsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create_or_update_organization_credentials + +Create or update credentials at the organization level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.create_or_update_organization_credentials(connector_id_or_name="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_workspace_credentials + +List all credentials configured at the workspace level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list_workspace_credentials(connector_id_or_name="", fetch_default=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CredentialsResponse](../../models/credentialsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create_or_update_workspace_credentials + +Create or update credentials at the workspace level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.create_or_update_workspace_credentials(connector_id_or_name="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## list_user_credentials + +List all credentials configured at the user level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.list_user_credentials(connector_id_or_name="", fetch_default=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CredentialsResponse](../../models/credentialsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create_or_update_user_credentials + +Create or update credentials at the user level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.create_or_update_user_credentials(connector_id_or_name="", name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | Name of the credentials. Use this name to access or modify your credentials. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. | +| `credentials` | [OptionalNullable[models.ConnectionCredentials]](../../models/connectioncredentials.md) | :heavy_minus_sign: | The credential data (headers, bearer_token). | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete_organization_credentials + +Delete credentials at the organization level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.delete_organization_credentials(credentials_name="", connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete_workspace_credentials + +Delete credentials at the workspace level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.delete_workspace_credentials(credentials_name="", connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## delete_user_credentials + +Delete credentials at the user level for a given connector. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.delete_user_credentials(credentials_name="", connector_id_or_name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `credentials_name` | *str* | :heavy_check_mark: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## get Get a connector by its ID or name. diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 1fc5da57..e6c73e23 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -58,7 +58,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationRequestAgentVersion]](../../models/conversationrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -365,7 +365,7 @@ with Mistral( | `handoff_execution` | [Optional[models.ConversationRestartRequestHandoffExecution]](../../models/conversationrestartrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `agent_version` | [OptionalNullable[models.ConversationRestartRequestAgentVersion]](../../models/conversationrestartrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -429,7 +429,7 @@ with Mistral( | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `agent_version` | [OptionalNullable[models.ConversationStreamRequestAgentVersion]](../../models/conversationstreamrequestagentversion.md) | :heavy_minus_sign: | N/A | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | @@ -538,7 +538,7 @@ with Mistral( | `handoff_execution` | [Optional[models.ConversationRestartStreamRequestHandoffExecution]](../../models/conversationrestartstreamrequesthandoffexecution.md) | :heavy_minus_sign: | N/A | | `completion_args` | [Optional[models.CompletionArgs]](../../models/completionargs.md) | :heavy_minus_sign: | White-listed arguments from the completion API | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | Custom metadata for the conversation. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | Custom metadata for the conversation. | | `agent_version` | [OptionalNullable[models.ConversationRestartStreamRequestAgentVersion]](../../models/conversationrestartstreamrequestagentversion.md) | :heavy_minus_sign: | Specific version of the agent to use when restarting. If not provided, uses the current version. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/documents/README.md b/docs/sdks/documents/README.md index 48ddb6f8..fde6d9a3 100644 --- a/docs/sdks/documents/README.md +++ b/docs/sdks/documents/README.md @@ -261,6 +261,8 @@ with Mistral( | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `library_id` | *str* | :heavy_check_mark: | N/A | | `document_id` | *str* | :heavy_check_mark: | N/A | +| `page_start` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `page_end` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/fim/README.md b/docs/sdks/fim/README.md index d06ed31e..29ee129c 100644 --- a/docs/sdks/fim/README.md +++ b/docs/sdks/fim/README.md @@ -25,7 +25,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.fim.complete(model="codestral-latest", prompt="def", top_p=1, stream=False, suffix="return a+b") + res = mistral.fim.complete(model="codestral-latest", prompt="def", stream=False, suffix="return a+b") # Handle response print(res) @@ -39,10 +39,10 @@ with Mistral( | `model` | *str* | :heavy_check_mark: | ID of the model with FIM to use. | codestral-latest | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.FIMCompletionRequestStop]](../../models/fimcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.FIMCompletionRequestStop]](../../models/fimcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | @@ -76,7 +76,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.fim.stream(model="codestral-latest", prompt="def", top_p=1, stream=True, suffix="return a+b") + res = mistral.fim.stream(model="codestral-latest", prompt="def", stream=True, suffix="return a+b") with res as event_stream: for event in event_stream: @@ -92,10 +92,10 @@ with Mistral( | `model` | *str* | :heavy_check_mark: | ID of the model with FIM to use. | codestral-latest | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.FIMCompletionStreamRequestStop]](../../models/fimcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.FIMCompletionStreamRequestStop]](../../models/fimcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | diff --git a/docs/sdks/ingestionpipelineconfigurations/README.md b/docs/sdks/ingestionpipelineconfigurations/README.md new file mode 100644 index 00000000..30457be2 --- /dev/null +++ b/docs/sdks/ingestionpipelineconfigurations/README.md @@ -0,0 +1,46 @@ +# Beta.Rag.IngestionPipelineConfigurations + +## Overview + +### Available Operations + +* [list](#list) - List ingestion pipeline configurations + +## list + +For the current workspace, lists all of the registered ingestion pipeline configurations. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.ingestion_pipeline_configurations.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.IngestionPipelineConfiguration]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index 1f3d927c..b97756b3 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -81,12 +81,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `owner_type` | [OptionalNullable[models.OwnerType]](../../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/runs/README.md b/docs/sdks/runs/README.md index 33a551c5..7ed91420 100644 --- a/docs/sdks/runs/README.md +++ b/docs/sdks/runs/README.md @@ -40,6 +40,7 @@ with Mistral( | `workflow_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name or id | | `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Search by workflow name, display name or id | | `status` | [OptionalNullable[models.ListRunsV1WorkflowsRunsGetStatus]](../../models/listrunsv1workflowsrunsgetstatus.md) | :heavy_minus_sign: | Filter by workflow status | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user id. Use 'current' to filter by the authenticated user | | `page_size` | *Optional[int]* | :heavy_minus_sign: | Number of items per page | | `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/speech/README.md b/docs/sdks/speech/README.md index 309ab6e0..7cd76ff4 100644 --- a/docs/sdks/speech/README.md +++ b/docs/sdks/speech/README.md @@ -39,7 +39,7 @@ with Mistral( | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | `input` | *str* | :heavy_check_mark: | Text to generate a speech from | | `model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.MetadataDict]](../../models/metadatadict.md) | :heavy_minus_sign: | N/A | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | `voice_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The preset or custom voice to use for generating the speech. | | `ref_audio` | *OptionalNullable[str]* | :heavy_minus_sign: | The audio reference for generating the speech. | diff --git a/docs/sdks/voices/README.md b/docs/sdks/voices/README.md index 3b4d135f..49b8533f 100644 --- a/docs/sdks/voices/README.md +++ b/docs/sdks/voices/README.md @@ -264,7 +264,7 @@ with Mistral( ### Response -**[str](../../models/responsegetvoicesampleaudiov1audiovoicesvoiceidsampleget.md)** +**[httpx.Response](../../models/.md)** ### Errors diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index 324c46b1..93ff8660 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -45,7 +45,7 @@ with Mistral( | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `active_only` | *Optional[bool]* | :heavy_minus_sign: | Whether to only return active workflows | | `include_shared` | *Optional[bool]* | :heavy_minus_sign: | Whether to include shared workflows | -| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | | `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | | `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows to return | @@ -96,7 +96,7 @@ with Mistral( | `workflow_search` | *OptionalNullable[str]* | :heavy_minus_sign: | The workflow name to filter by | | `archived` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter by archived state. False=exclude archived, True=only archived, None=include all | | `with_workflow` | *Optional[bool]* | :heavy_minus_sign: | Whether to include the workflow definition | -| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows compatible with chat assistant | +| `available_in_chat_assistant` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to only return workflows available in chat assistant | | `limit` | *Optional[int]* | :heavy_minus_sign: | The maximum number of workflows versions to return | | `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | The cursor for pagination | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -146,6 +146,7 @@ with Mistral( | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | | `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | | `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -197,6 +198,7 @@ with Mistral( | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `extensions` | Dict[str, *Any*] | :heavy_minus_sign: | Plugin-specific data to propagate into WorkflowContext.extensions at execution time. | | `task_queue` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated. Use deployment_name instead. | | `deployment_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Name of the deployment to route this execution to | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/pyproject.toml b/pyproject.toml index e2fffb41..dce32456 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.0" +version = "2.4.1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index aa3edd4f..e6e50dc0 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.0" +__version__: str = "2.4.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.0 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.1 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index f16078e8..a3472b62 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -23,12 +23,12 @@ def complete( agent_id: str, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.AgentsCompletionRequestStop, models.AgentsCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -46,8 +46,8 @@ def complete( models.AgentsCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -204,12 +204,12 @@ async def complete_async( agent_id: str, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.AgentsCompletionRequestStop, models.AgentsCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -227,8 +227,8 @@ async def complete_async( models.AgentsCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -385,12 +385,12 @@ def stream( agent_id: str, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.AgentsCompletionStreamRequestStop, models.AgentsCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -408,8 +408,8 @@ def stream( models.AgentsCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -576,12 +576,12 @@ async def stream_async( agent_id: str, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.AgentsCompletionStreamRequestStop, models.AgentsCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -599,8 +599,8 @@ async def stream_async( models.AgentsCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] diff --git a/src/mistralai/client/beta.py b/src/mistralai/client/beta.py index 83b8fc87..f9bbb5ae 100644 --- a/src/mistralai/client/beta.py +++ b/src/mistralai/client/beta.py @@ -8,6 +8,7 @@ from mistralai.client.conversations import Conversations from mistralai.client.libraries import Libraries from mistralai.client.observability import Observability +from mistralai.client.rag import Rag from typing import Optional @@ -21,6 +22,7 @@ class Beta(BaseSDK): observability: Observability connectors: Connectors r"""(beta) Connectors API - manage your connectors""" + rag: Rag def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -39,3 +41,4 @@ def _init_sdks(self): self.sdk_configuration, parent_ref=self.parent_ref ) self.connectors = Connectors(self.sdk_configuration, parent_ref=self.parent_ref) + self.rag = Rag(self.sdk_configuration, parent_ref=self.parent_ref) diff --git a/src/mistralai/client/beta_agents.py b/src/mistralai/client/beta_agents.py index 5d60170e..67d17a05 100644 --- a/src/mistralai/client/beta_agents.py +++ b/src/mistralai/client/beta_agents.py @@ -33,9 +33,7 @@ def create( ] = UNSET, description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -89,9 +87,7 @@ def create( name=name, description=description, handoffs=handoffs, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, version_message=version_message, ) @@ -175,9 +171,7 @@ async def create_async( ] = UNSET, description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -231,9 +225,7 @@ async def create_async( name=name, description=description, handoffs=handoffs, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, version_message=version_message, ) @@ -749,9 +741,7 @@ def update( description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, deployment_chat: OptionalNullable[bool] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -810,9 +800,7 @@ def update( description=description, handoffs=handoffs, deployment_chat=deployment_chat, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, version_message=version_message, ), ) @@ -903,9 +891,7 @@ async def update_async( description: OptionalNullable[str] = UNSET, handoffs: OptionalNullable[List[str]] = UNSET, deployment_chat: OptionalNullable[bool] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, version_message: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -964,9 +950,7 @@ async def update_async( description=description, handoffs=handoffs, deployment_chat=deployment_chat, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, version_message=version_message, ), ) diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index cfc615eb..113d1453 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -107,15 +107,15 @@ def complete( List[models.ChatCompletionRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionRequestStop, models.ChatCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -133,8 +133,8 @@ def complete( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -297,15 +297,15 @@ async def complete_async( List[models.ChatCompletionRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionRequestStop, models.ChatCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -323,8 +323,8 @@ async def complete_async( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -487,15 +487,15 @@ def stream( List[models.ChatCompletionStreamRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionStreamRequestStop, models.ChatCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -513,8 +513,8 @@ def stream( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] @@ -687,15 +687,15 @@ async def stream_async( List[models.ChatCompletionStreamRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionStreamRequestStop, models.ChatCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ @@ -713,8 +713,8 @@ async def stream_async( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index fc9d6319..0d1dc703 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -7,7 +7,7 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Dict, Mapping, Optional, Union +from typing import Any, Dict, List, Mapping, Optional, Union class Connectors(BaseSDK): @@ -466,6 +466,7 @@ def get_auth_url( *, connector_id_or_name: str, app_return_url: OptionalNullable[str] = UNSET, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -477,6 +478,7 @@ def get_auth_url( :param connector_id_or_name: :param app_return_url: + :param credentials_name: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -497,6 +499,7 @@ def get_auth_url( request = models.ConnectorGetAuthURLV1Request( app_return_url=app_return_url, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -562,6 +565,7 @@ async def get_auth_url_async( *, connector_id_or_name: str, app_return_url: OptionalNullable[str] = UNSET, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -573,6 +577,7 @@ async def get_auth_url_async( :param connector_id_or_name: :param app_return_url: + :param credentials_name: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -593,6 +598,7 @@ async def get_auth_url_async( request = models.ConnectorGetAuthURLV1Request( app_return_url=app_return_url, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -883,6 +889,7 @@ def list_tools( page_size: Optional[int] = 100, refresh: Optional[bool] = False, pretty: Optional[bool] = False, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -897,6 +904,7 @@ def list_tools( :param page_size: :param refresh: :param pretty: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + :param credentials_name: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -920,6 +928,7 @@ def list_tools( page_size=page_size, refresh=refresh, pretty=pretty, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -990,6 +999,7 @@ async def list_tools_async( page_size: Optional[int] = 100, refresh: Optional[bool] = False, pretty: Optional[bool] = False, + credentials_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1004,6 +1014,7 @@ async def list_tools_async( :param page_size: :param refresh: :param pretty: Return a simplified payload with only name, description, annotations, and a compact inputSchema. + :param credentials_name: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1027,6 +1038,7 @@ async def list_tools_async( page_size=page_size, refresh=refresh, pretty=pretty, + credentials_name=credentials_name, connector_id_or_name=connector_id_or_name, ) @@ -1089,6 +1101,2044 @@ async def list_tools_async( raise errors.SDKError("Unexpected response received", http_res) + def get_authentication_methods( + self, + *, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.PublicAuthenticationMethod]: + r"""Get authentication methods for a connector. + + Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetAuthenticationMethodsV1Request( + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/authentication_methods", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_authentication_methods_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.PublicAuthenticationMethod], http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_authentication_methods_async( + self, + *, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.PublicAuthenticationMethod]: + r"""Get authentication methods for a connector. + + Get the authentication schema for a connector. Returns the list of supported authentication methods and their required headers. + + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorGetAuthenticationMethodsV1Request( + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/authentication_methods", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_get_authentication_methods_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.PublicAuthenticationMethod], http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_organization_credentials( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List organization credentials for a connector. + + List all credentials configured at the organization level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListOrganizationCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_organization_credentials_async( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List organization credentials for a connector. + + List all credentials configured at the organization level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListOrganizationCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create_or_update_organization_credentials( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update organization credentials for a connector. + + Create or update credentials at the organization level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateOrganizationCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_or_update_organization_credentials_async( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update organization credentials for a connector. + + Create or update credentials at the organization level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateOrganizationCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id_or_name}/organization/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_workspace_credentials( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List workspace credentials for a connector. + + List all credentials configured at the workspace level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListWorkspaceCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_workspace_credentials_async( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List workspace credentials for a connector. + + List all credentials configured at the workspace level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListWorkspaceCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create_or_update_workspace_credentials( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update workspace credentials for a connector. + + Create or update credentials at the workspace level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateWorkspaceCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_or_update_workspace_credentials_async( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update workspace credentials for a connector. + + Create or update credentials at the workspace level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateWorkspaceCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def list_user_credentials( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List user credentials for a connector. + + List all credentials configured at the user level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListUserCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="GET", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_user_credentials_async( + self, + *, + connector_id_or_name: str, + auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + fetch_default: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CredentialsResponse: + r"""List user credentials for a connector. + + List all credentials configured at the user level for a given connector. + + :param connector_id_or_name: + :param auth_type: + :param fetch_default: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorListUserCredentialsV1Request( + auth_type=auth_type, + fetch_default=fetch_default, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="GET", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_list_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CredentialsResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def create_or_update_user_credentials( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update user credentials for a connector. + + Create or update credentials at the user level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateUserCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def create_or_update_user_credentials_async( + self, + *, + connector_id_or_name: str, + name: str, + is_default: OptionalNullable[bool] = UNSET, + credentials: OptionalNullable[ + Union[models.ConnectionCredentials, models.ConnectionCredentialsTypedDict] + ] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Create or update user credentials for a connector. + + Create or update credentials at the user level for a given connector. + + :param connector_id_or_name: + :param name: Name of the credentials. Use this name to access or modify your credentials. + :param is_default: Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged. + :param credentials: The credential data (headers, bearer_token). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorCreateOrUpdateUserCredentialsV1Request( + connector_id_or_name=connector_id_or_name, + credentials_create_or_update=models.CredentialsCreateOrUpdate( + name=name, + is_default=is_default, + credentials=utils.get_pydantic_model( + credentials, OptionalNullable[models.ConnectionCredentials] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id_or_name}/user/credentials", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.credentials_create_or_update, + False, + False, + "json", + models.CredentialsCreateOrUpdate, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_create_or_update_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete_organization_credentials( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete organization credentials for a connector. + + Delete credentials at the organization level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteOrganizationCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/organization/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_organization_credentials_async( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete organization credentials for a connector. + + Delete credentials at the organization level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteOrganizationCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/organization/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_organization_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete_workspace_credentials( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete workspace credentials for a connector. + + Delete credentials at the workspace level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteWorkspaceCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_workspace_credentials_async( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete workspace credentials for a connector. + + Delete credentials at the workspace level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteWorkspaceCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/workspace/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_workspace_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def delete_user_credentials( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete user credentials for a connector. + + Delete credentials at the user level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteUserCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/user/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def delete_user_credentials_async( + self, + *, + credentials_name: str, + connector_id_or_name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Delete user credentials for a connector. + + Delete credentials at the user level for a given connector. + + :param credentials_name: + :param connector_id_or_name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeleteUserCredentialsV1Request( + credentials_name=credentials_name, + connector_id_or_name=connector_id_or_name, + ) + + req = self._build_request_async( + method="DELETE", + path="/v1/connectors/{connector_id_or_name}/user/credentials/{credentials_name}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_delete_user_credentials_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def get( self, *, diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index ed2e0fce..9947ea9d 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -395,9 +395,7 @@ def start( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -462,9 +460,7 @@ def start( ), name=name, description=description, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, agent_id=agent_id, agent_version=agent_version, model=model, @@ -553,9 +549,7 @@ async def start_async( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -620,9 +614,7 @@ async def start_async( ), name=name, description=description, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, agent_id=agent_id, agent_version=agent_version, model=model, @@ -1922,9 +1914,7 @@ def restart( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartRequestAgentVersion, @@ -1981,9 +1971,7 @@ def restart( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, ), @@ -2071,9 +2059,7 @@ async def restart_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartRequestAgentVersion, @@ -2130,9 +2116,7 @@ async def restart_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, ), @@ -2225,9 +2209,7 @@ def start_stream( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -2292,9 +2274,7 @@ def start_stream( ), name=name, description=description, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, agent_id=agent_id, agent_version=agent_version, model=model, @@ -2390,9 +2370,7 @@ async def start_stream_async( ] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_id: OptionalNullable[str] = UNSET, agent_version: OptionalNullable[ Union[ @@ -2457,9 +2435,7 @@ async def start_stream_async( ), name=name, description=description, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, agent_id=agent_id, agent_version=agent_version, model=model, @@ -2834,9 +2810,7 @@ def restart_stream( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartStreamRequestAgentVersion, @@ -2893,9 +2867,7 @@ def restart_stream( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, ), @@ -2990,9 +2962,7 @@ async def restart_stream_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, agent_version: OptionalNullable[ Union[ models.ConversationRestartStreamRequestAgentVersion, @@ -3049,9 +3019,7 @@ async def restart_stream_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, from_entry_id=from_entry_id, agent_version=agent_version, ), diff --git a/src/mistralai/client/documents.py b/src/mistralai/client/documents.py index 701e5310..aefcf749 100644 --- a/src/mistralai/client/documents.py +++ b/src/mistralai/client/documents.py @@ -1068,6 +1068,8 @@ def text_content( *, library_id: str, document_id: str, + page_start: OptionalNullable[int] = UNSET, + page_end: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1079,6 +1081,8 @@ def text_content( :param library_id: :param document_id: + :param page_start: + :param page_end: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1100,6 +1104,8 @@ def text_content( request = models.LibrariesDocumentsGetTextContentV1Request( library_id=library_id, document_id=document_id, + page_start=page_start, + page_end=page_end, ) req = self._build_request( @@ -1164,6 +1170,8 @@ async def text_content_async( *, library_id: str, document_id: str, + page_start: OptionalNullable[int] = UNSET, + page_end: OptionalNullable[int] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -1175,6 +1183,8 @@ async def text_content_async( :param library_id: :param document_id: + :param page_start: + :param page_end: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1196,6 +1206,8 @@ async def text_content_async( request = models.LibrariesDocumentsGetTextContentV1Request( library_id=library_id, document_id=document_id, + page_start=page_start, + page_end=page_end, ) req = self._build_request_async( diff --git a/src/mistralai/client/fim.py b/src/mistralai/client/fim.py index b4253ad6..ba2bd5b5 100644 --- a/src/mistralai/client/fim.py +++ b/src/mistralai/client/fim.py @@ -19,15 +19,15 @@ def complete( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionRequestStop, models.FIMCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, @@ -150,15 +150,15 @@ async def complete_async( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionRequestStop, models.FIMCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, @@ -281,15 +281,15 @@ def stream( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionStreamRequestStop, models.FIMCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, @@ -420,15 +420,15 @@ async def stream_async( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionStreamRequestStop, models.FIMCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, diff --git a/src/mistralai/client/ingestion_pipeline_configurations.py b/src/mistralai/client/ingestion_pipeline_configurations.py new file mode 100644 index 00000000..e795a8ab --- /dev/null +++ b/src/mistralai/client/ingestion_pipeline_configurations.py @@ -0,0 +1,176 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f5a994272058 + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import List, Mapping, Optional + + +class IngestionPipelineConfigurations(BaseSDK): + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.IngestionPipelineConfiguration]: + r"""List ingestion pipeline configurations + + For the current workspace, lists all of the registered ingestion pipeline configurations. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/rag/ingestion_pipeline_configurations", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_configs_v1_rag_ingestion_pipeline_configurations_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.IngestionPipelineConfiguration], http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.IngestionPipelineConfiguration]: + r"""List ingestion pipeline configurations + + For the current workspace, lists all of the registered ingestion pipeline configurations. + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/rag/ingestion_pipeline_configurations", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_configs_v1_rag_ingestion_pipeline_configurations_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["4XX", "5XX"], + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + List[models.IngestionPipelineConfiguration], http_res + ) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index fd9dbc5f..15153643 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -242,6 +242,7 @@ def create( name: str, description: OptionalNullable[str] = UNSET, chunk_size: OptionalNullable[int] = UNSET, + owner_type: OptionalNullable[models.OwnerType] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -254,6 +255,7 @@ def create( :param name: :param description: :param chunk_size: + :param owner_type: Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -276,6 +278,7 @@ def create( name=name, description=description, chunk_size=chunk_size, + owner_type=owner_type, ) req = self._build_request( @@ -344,6 +347,7 @@ async def create_async( name: str, description: OptionalNullable[str] = UNSET, chunk_size: OptionalNullable[int] = UNSET, + owner_type: OptionalNullable[models.OwnerType] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -356,6 +360,7 @@ async def create_async( :param name: :param description: :param chunk_size: + :param owner_type: Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -378,6 +383,7 @@ async def create_async( name=name, description=description, chunk_size=chunk_size, + owner_type=owner_type, ) req = self._build_request_async( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 34e6bdc1..efc6e811 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -205,6 +205,11 @@ AudioTranscriptionRequestStreamTypedDict, ) from .authdata import AuthData, AuthDataTypedDict + from .authenticationconfiguration import ( + AuthenticationConfiguration, + AuthenticationConfigurationTypedDict, + ) + from .authenticationtype import AuthenticationType from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, @@ -384,37 +389,85 @@ CompletionTrainingParameters, CompletionTrainingParametersTypedDict, ) + from .connectioncredentials import ( + ConnectionCredentials, + ConnectionCredentialsTypedDict, + ) from .connector import Connector, ConnectorTypedDict from .connector_call_tool_v1op import ( ConnectorCallToolV1Request, ConnectorCallToolV1RequestTypedDict, ) + from .connector_create_or_update_organization_credentials_v1op import ( + ConnectorCreateOrUpdateOrganizationCredentialsV1Request, + ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict, + ) + from .connector_create_or_update_user_credentials_v1op import ( + ConnectorCreateOrUpdateUserCredentialsV1Request, + ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict, + ) + from .connector_create_or_update_workspace_credentials_v1op import ( + ConnectorCreateOrUpdateWorkspaceCredentialsV1Request, + ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict, + ) + from .connector_delete_organization_credentials_v1op import ( + ConnectorDeleteOrganizationCredentialsV1Request, + ConnectorDeleteOrganizationCredentialsV1RequestTypedDict, + ) + from .connector_delete_user_credentials_v1op import ( + ConnectorDeleteUserCredentialsV1Request, + ConnectorDeleteUserCredentialsV1RequestTypedDict, + ) from .connector_delete_v1op import ( ConnectorDeleteV1Request, ConnectorDeleteV1RequestTypedDict, ) + from .connector_delete_workspace_credentials_v1op import ( + ConnectorDeleteWorkspaceCredentialsV1Request, + ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict, + ) from .connector_get_auth_url_v1op import ( ConnectorGetAuthURLV1Request, ConnectorGetAuthURLV1RequestTypedDict, ) + from .connector_get_authentication_methods_v1op import ( + ConnectorGetAuthenticationMethodsV1Request, + ConnectorGetAuthenticationMethodsV1RequestTypedDict, + ) from .connector_get_v1op import ( ConnectorGetV1Request, ConnectorGetV1RequestTypedDict, ) + from .connector_list_organization_credentials_v1op import ( + ConnectorListOrganizationCredentialsV1Request, + ConnectorListOrganizationCredentialsV1RequestTypedDict, + ) from .connector_list_tools_v1op import ( ConnectorListToolsV1Request, ConnectorListToolsV1RequestTypedDict, ResponseConnectorListToolsV1, ResponseConnectorListToolsV1TypedDict, ) + from .connector_list_user_credentials_v1op import ( + ConnectorListUserCredentialsV1Request, + ConnectorListUserCredentialsV1RequestTypedDict, + ) from .connector_list_v1op import ( ConnectorListV1Request, ConnectorListV1RequestTypedDict, ) + from .connector_list_workspace_credentials_v1op import ( + ConnectorListWorkspaceCredentialsV1Request, + ConnectorListWorkspaceCredentialsV1RequestTypedDict, + ) from .connector_update_v1op import ( ConnectorUpdateV1Request, ConnectorUpdateV1RequestTypedDict, ) + from .connectorauthenticationheader import ( + ConnectorAuthenticationHeader, + ConnectorAuthenticationHeaderTypedDict, + ) from .connectorcalltoolrequest import ( ConnectorCallToolRequest, ConnectorCallToolRequestTypedDict, @@ -567,7 +620,13 @@ from .createlibraryrequest import ( CreateLibraryRequest, CreateLibraryRequestTypedDict, + OwnerType, ) + from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, + ) + from .credentialsresponse import CredentialsResponse, CredentialsResponseTypedDict from .customconnector import ( Authorization, AuthorizationTypedDict, @@ -678,6 +737,7 @@ DeploymentListResponse, DeploymentListResponseTypedDict, ) + from .deploymentlocation import DeploymentLocation, DeploymentLocationTypedDict from .deploymentresponse import DeploymentResponse, DeploymentResponseTypedDict from .deploymentworkerresponse import ( DeploymentWorkerResponse, @@ -1024,6 +1084,10 @@ ImportDatasetFromPlaygroundRequest, ImportDatasetFromPlaygroundRequestTypedDict, ) + from .ingestionpipelineconfiguration import ( + IngestionPipelineConfiguration, + IngestionPipelineConfigurationTypedDict, + ) from .inputentries import InputEntries, InputEntriesTypedDict from .inputs import Inputs, InputsTypedDict from .instructrequest import ( @@ -1032,12 +1096,6 @@ InstructRequestMessageTypedDict, InstructRequestTypedDict, ) - from .internalmetadata import ( - InternalMetadata, - InternalMetadataAgentVersion, - InternalMetadataAgentVersionTypedDict, - InternalMetadataTypedDict, - ) from .jobmetadata import JobMetadata, JobMetadataTypedDict from .jobs_api_routes_batch_cancel_batch_jobop import ( JobsAPIRoutesBatchCancelBatchJobRequest, @@ -1307,6 +1365,7 @@ ListWorkflowEventResponseEventTypedDict, ListWorkflowEventResponseTypedDict, ) + from .locationtype import LocationType from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict from .mcptool import MCPTool, MCPToolTypedDict from .mcptoolmeta import MCPToolMeta, MCPToolMetaTypedDict @@ -1341,10 +1400,7 @@ ) from .messageresponse import MessageResponse, MessageResponseTypedDict from .messagetokens import MessageTokens, MessageTokensTypedDict - from .metadatadict import MetadataDict, MetadataDictTypedDict from .metric import Metric, MetricTypedDict - from .mirrorconfig import MirrorConfig, MirrorConfigTypedDict - from .mirrorsource import MirrorSource, MirrorSourceTypedDict from .mistralpromptmode import MistralPromptMode from .modelcapabilities import ModelCapabilities, ModelCapabilitiesTypedDict from .modelconversation import ( @@ -1381,6 +1437,7 @@ from .moderationobject import ModerationObject, ModerationObjectTypedDict from .moderationresponse import ModerationResponse, ModerationResponseTypedDict from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict + from .oauth2token import OAuth2Token, OAuth2TokenTypedDict from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict from .observabilityerrorcode import ObservabilityErrorCode from .observabilityerrordetail import ( @@ -1460,6 +1517,10 @@ from .processingstatus import ProcessingStatus, ProcessingStatusTypedDict from .processstatus import ProcessStatus from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict + from .publicauthenticationmethod import ( + PublicAuthenticationMethod, + PublicAuthenticationMethodTypedDict, + ) from .query_workflow_execution_v1_workflows_executions_execution_id_queries_postop import ( QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest, QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict, @@ -1660,6 +1721,18 @@ TempoTraceAttributeValue, TempoTraceAttributeValueTypedDict, ) + from .tempotraceattributearraycontainer import ( + TempoTraceAttributeArrayContainer, + TempoTraceAttributeArrayContainerTypedDict, + ) + from .tempotraceattributearrayelement import ( + TempoTraceAttributeArrayElement, + TempoTraceAttributeArrayElementTypedDict, + ) + from .tempotraceattributearrayvalue import ( + TempoTraceAttributeArrayValue, + TempoTraceAttributeArrayValueTypedDict, + ) from .tempotraceattributeboolvalue import ( TempoTraceAttributeBoolValue, TempoTraceAttributeBoolValueTypedDict, @@ -2217,6 +2290,9 @@ "AuthDataTypedDict", "AuthURLResponse", "AuthURLResponseTypedDict", + "AuthenticationConfiguration", + "AuthenticationConfigurationTypedDict", + "AuthenticationType", "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", @@ -2351,21 +2427,45 @@ "CompletionTrainingParametersTypedDict", "ConfidenceScoresGranularity", "Confirmation", + "ConnectionCredentials", + "ConnectionCredentialsTypedDict", "Connector", + "ConnectorAuthenticationHeader", + "ConnectorAuthenticationHeaderTypedDict", "ConnectorCallToolRequest", "ConnectorCallToolRequestTypedDict", "ConnectorCallToolV1Request", "ConnectorCallToolV1RequestTypedDict", + "ConnectorCreateOrUpdateOrganizationCredentialsV1Request", + "ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict", + "ConnectorCreateOrUpdateUserCredentialsV1Request", + "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict", + "ConnectorDeleteOrganizationCredentialsV1Request", + "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict", + "ConnectorDeleteUserCredentialsV1Request", + "ConnectorDeleteUserCredentialsV1RequestTypedDict", "ConnectorDeleteV1Request", "ConnectorDeleteV1RequestTypedDict", + "ConnectorDeleteWorkspaceCredentialsV1Request", + "ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict", "ConnectorGetAuthURLV1Request", "ConnectorGetAuthURLV1RequestTypedDict", + "ConnectorGetAuthenticationMethodsV1Request", + "ConnectorGetAuthenticationMethodsV1RequestTypedDict", "ConnectorGetV1Request", "ConnectorGetV1RequestTypedDict", + "ConnectorListOrganizationCredentialsV1Request", + "ConnectorListOrganizationCredentialsV1RequestTypedDict", "ConnectorListToolsV1Request", "ConnectorListToolsV1RequestTypedDict", + "ConnectorListUserCredentialsV1Request", + "ConnectorListUserCredentialsV1RequestTypedDict", "ConnectorListV1Request", "ConnectorListV1RequestTypedDict", + "ConnectorListWorkspaceCredentialsV1Request", + "ConnectorListWorkspaceCredentialsV1RequestTypedDict", "ConnectorTool", "ConnectorToolCallMetadata", "ConnectorToolCallMetadataTypedDict", @@ -2468,6 +2568,10 @@ "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", + "CredentialsCreateOrUpdate", + "CredentialsCreateOrUpdateTypedDict", + "CredentialsResponse", + "CredentialsResponseTypedDict", "CustomConnector", "CustomConnectorTypedDict", "CustomTaskCanceledAttributes", @@ -2530,6 +2634,8 @@ "DeploymentDetailResponseTypedDict", "DeploymentListResponse", "DeploymentListResponseTypedDict", + "DeploymentLocation", + "DeploymentLocationTypedDict", "DeploymentResponse", "DeploymentResponseTypedDict", "DeploymentWorkerResponse", @@ -2758,6 +2864,8 @@ "ImportDatasetFromFileRequestTypedDict", "ImportDatasetFromPlaygroundRequest", "ImportDatasetFromPlaygroundRequestTypedDict", + "IngestionPipelineConfiguration", + "IngestionPipelineConfigurationTypedDict", "InputEntries", "InputEntriesTypedDict", "Inputs", @@ -2766,10 +2874,6 @@ "InstructRequestMessage", "InstructRequestMessageTypedDict", "InstructRequestTypedDict", - "InternalMetadata", - "InternalMetadataAgentVersion", - "InternalMetadataAgentVersionTypedDict", - "InternalMetadataTypedDict", "JSONPatchAdd", "JSONPatchAddTypedDict", "JSONPatchAppend", @@ -2931,6 +3035,7 @@ "ListWorkflowEventResponseTypedDict", "Loc", "LocTypedDict", + "LocationType", "MCPServerIcon", "MCPServerIconTypedDict", "MCPTool", @@ -2961,14 +3066,8 @@ "MessageResponseTypedDict", "MessageTokens", "MessageTokensTypedDict", - "MetadataDict", - "MetadataDictTypedDict", "Metric", "MetricTypedDict", - "MirrorConfig", - "MirrorConfigTypedDict", - "MirrorSource", - "MirrorSourceTypedDict", "MistralPromptMode", "ModelCapabilities", "ModelCapabilitiesTypedDict", @@ -2997,8 +3096,10 @@ "MultiPartBodyParamsTypedDict", "NetworkEncodedInput", "NetworkEncodedInputTypedDict", + "OAuth2Token", "OAuth2TokenAuth", "OAuth2TokenAuthTypedDict", + "OAuth2TokenTypedDict", "OCRConfidenceScore", "OCRConfidenceScoreTypedDict", "OCRImageObject", @@ -3029,6 +3130,7 @@ "OrderBy", "OutputContentChunks", "OutputContentChunksTypedDict", + "OwnerType", "Pages", "PagesTypedDict", "PaginatedConnectors", @@ -3068,6 +3170,8 @@ "ProcessingStatusTypedDict", "PromptTokensDetails", "PromptTokensDetailsTypedDict", + "PublicAuthenticationMethod", + "PublicAuthenticationMethodTypedDict", "QueryDefinition", "QueryDefinitionTypedDict", "QueryInvocationBody", @@ -3228,6 +3332,12 @@ "TempoGetTraceResponse", "TempoGetTraceResponseTypedDict", "TempoTraceAttribute", + "TempoTraceAttributeArrayContainer", + "TempoTraceAttributeArrayContainerTypedDict", + "TempoTraceAttributeArrayElement", + "TempoTraceAttributeArrayElementTypedDict", + "TempoTraceAttributeArrayValue", + "TempoTraceAttributeArrayValueTypedDict", "TempoTraceAttributeBoolValue", "TempoTraceAttributeBoolValueTypedDict", "TempoTraceAttributeIntValue", @@ -3660,6 +3770,9 @@ "AudioTranscriptionRequestStreamTypedDict": ".audiotranscriptionrequeststream", "AuthData": ".authdata", "AuthDataTypedDict": ".authdata", + "AuthenticationConfiguration": ".authenticationconfiguration", + "AuthenticationConfigurationTypedDict": ".authenticationconfiguration", + "AuthenticationType": ".authenticationtype", "AuthURLResponse": ".authurlresponse", "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", @@ -3799,24 +3912,48 @@ "CompletionResponseStreamChoiceTypedDict": ".completionresponsestreamchoice", "CompletionTrainingParameters": ".completiontrainingparameters", "CompletionTrainingParametersTypedDict": ".completiontrainingparameters", + "ConnectionCredentials": ".connectioncredentials", + "ConnectionCredentialsTypedDict": ".connectioncredentials", "Connector": ".connector", "ConnectorTypedDict": ".connector", "ConnectorCallToolV1Request": ".connector_call_tool_v1op", "ConnectorCallToolV1RequestTypedDict": ".connector_call_tool_v1op", + "ConnectorCreateOrUpdateOrganizationCredentialsV1Request": ".connector_create_or_update_organization_credentials_v1op", + "ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict": ".connector_create_or_update_organization_credentials_v1op", + "ConnectorCreateOrUpdateUserCredentialsV1Request": ".connector_create_or_update_user_credentials_v1op", + "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict": ".connector_create_or_update_user_credentials_v1op", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request": ".connector_create_or_update_workspace_credentials_v1op", + "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict": ".connector_create_or_update_workspace_credentials_v1op", + "ConnectorDeleteOrganizationCredentialsV1Request": ".connector_delete_organization_credentials_v1op", + "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict": ".connector_delete_organization_credentials_v1op", + "ConnectorDeleteUserCredentialsV1Request": ".connector_delete_user_credentials_v1op", + "ConnectorDeleteUserCredentialsV1RequestTypedDict": ".connector_delete_user_credentials_v1op", "ConnectorDeleteV1Request": ".connector_delete_v1op", "ConnectorDeleteV1RequestTypedDict": ".connector_delete_v1op", + "ConnectorDeleteWorkspaceCredentialsV1Request": ".connector_delete_workspace_credentials_v1op", + "ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict": ".connector_delete_workspace_credentials_v1op", "ConnectorGetAuthURLV1Request": ".connector_get_auth_url_v1op", "ConnectorGetAuthURLV1RequestTypedDict": ".connector_get_auth_url_v1op", + "ConnectorGetAuthenticationMethodsV1Request": ".connector_get_authentication_methods_v1op", + "ConnectorGetAuthenticationMethodsV1RequestTypedDict": ".connector_get_authentication_methods_v1op", "ConnectorGetV1Request": ".connector_get_v1op", "ConnectorGetV1RequestTypedDict": ".connector_get_v1op", + "ConnectorListOrganizationCredentialsV1Request": ".connector_list_organization_credentials_v1op", + "ConnectorListOrganizationCredentialsV1RequestTypedDict": ".connector_list_organization_credentials_v1op", "ConnectorListToolsV1Request": ".connector_list_tools_v1op", "ConnectorListToolsV1RequestTypedDict": ".connector_list_tools_v1op", "ResponseConnectorListToolsV1": ".connector_list_tools_v1op", "ResponseConnectorListToolsV1TypedDict": ".connector_list_tools_v1op", + "ConnectorListUserCredentialsV1Request": ".connector_list_user_credentials_v1op", + "ConnectorListUserCredentialsV1RequestTypedDict": ".connector_list_user_credentials_v1op", "ConnectorListV1Request": ".connector_list_v1op", "ConnectorListV1RequestTypedDict": ".connector_list_v1op", + "ConnectorListWorkspaceCredentialsV1Request": ".connector_list_workspace_credentials_v1op", + "ConnectorListWorkspaceCredentialsV1RequestTypedDict": ".connector_list_workspace_credentials_v1op", "ConnectorUpdateV1Request": ".connector_update_v1op", "ConnectorUpdateV1RequestTypedDict": ".connector_update_v1op", + "ConnectorAuthenticationHeader": ".connectorauthenticationheader", + "ConnectorAuthenticationHeaderTypedDict": ".connectorauthenticationheader", "ConnectorCallToolRequest": ".connectorcalltoolrequest", "ConnectorCallToolRequestTypedDict": ".connectorcalltoolrequest", "ConnectorsQueryFilters": ".connectorsqueryfilters", @@ -3923,6 +4060,11 @@ "CreateJudgeRequestTypedDict": ".createjudgerequest", "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", + "OwnerType": ".createlibraryrequest", + "CredentialsCreateOrUpdate": ".credentialscreateorupdate", + "CredentialsCreateOrUpdateTypedDict": ".credentialscreateorupdate", + "CredentialsResponse": ".credentialsresponse", + "CredentialsResponseTypedDict": ".credentialsresponse", "Authorization": ".customconnector", "AuthorizationTypedDict": ".customconnector", "CustomConnector": ".customconnector", @@ -3991,6 +4133,8 @@ "DeploymentDetailResponseTypedDict": ".deploymentdetailresponse", "DeploymentListResponse": ".deploymentlistresponse", "DeploymentListResponseTypedDict": ".deploymentlistresponse", + "DeploymentLocation": ".deploymentlocation", + "DeploymentLocationTypedDict": ".deploymentlocation", "DeploymentResponse": ".deploymentresponse", "DeploymentResponseTypedDict": ".deploymentresponse", "DeploymentWorkerResponse": ".deploymentworkerresponse", @@ -4223,6 +4367,8 @@ "ImportDatasetFromFileRequestTypedDict": ".importdatasetfromfilerequest", "ImportDatasetFromPlaygroundRequest": ".importdatasetfromplaygroundrequest", "ImportDatasetFromPlaygroundRequestTypedDict": ".importdatasetfromplaygroundrequest", + "IngestionPipelineConfiguration": ".ingestionpipelineconfiguration", + "IngestionPipelineConfigurationTypedDict": ".ingestionpipelineconfiguration", "InputEntries": ".inputentries", "InputEntriesTypedDict": ".inputentries", "Inputs": ".inputs", @@ -4231,10 +4377,6 @@ "InstructRequestMessage": ".instructrequest", "InstructRequestMessageTypedDict": ".instructrequest", "InstructRequestTypedDict": ".instructrequest", - "InternalMetadata": ".internalmetadata", - "InternalMetadataAgentVersion": ".internalmetadata", - "InternalMetadataAgentVersionTypedDict": ".internalmetadata", - "InternalMetadataTypedDict": ".internalmetadata", "JobMetadata": ".jobmetadata", "JobMetadataTypedDict": ".jobmetadata", "JobsAPIRoutesBatchCancelBatchJobRequest": ".jobs_api_routes_batch_cancel_batch_jobop", @@ -4409,6 +4551,7 @@ "ListWorkflowEventResponseEvent": ".listworkfloweventresponse", "ListWorkflowEventResponseEventTypedDict": ".listworkfloweventresponse", "ListWorkflowEventResponseTypedDict": ".listworkfloweventresponse", + "LocationType": ".locationtype", "MCPServerIcon": ".mcpservericon", "MCPServerIconTypedDict": ".mcpservericon", "MCPTool": ".mcptool", @@ -4441,14 +4584,8 @@ "MessageResponseTypedDict": ".messageresponse", "MessageTokens": ".messagetokens", "MessageTokensTypedDict": ".messagetokens", - "MetadataDict": ".metadatadict", - "MetadataDictTypedDict": ".metadatadict", "Metric": ".metric", "MetricTypedDict": ".metric", - "MirrorConfig": ".mirrorconfig", - "MirrorConfigTypedDict": ".mirrorconfig", - "MirrorSource": ".mirrorsource", - "MirrorSourceTypedDict": ".mirrorsource", "MistralPromptMode": ".mistralpromptmode", "ModelCapabilities": ".modelcapabilities", "ModelCapabilitiesTypedDict": ".modelcapabilities", @@ -4477,6 +4614,8 @@ "ModerationResponseTypedDict": ".moderationresponse", "NetworkEncodedInput": ".networkencodedinput", "NetworkEncodedInputTypedDict": ".networkencodedinput", + "OAuth2Token": ".oauth2token", + "OAuth2TokenTypedDict": ".oauth2token", "OAuth2TokenAuth": ".oauth2tokenauth", "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", "ObservabilityErrorCode": ".observabilityerrorcode", @@ -4544,6 +4683,8 @@ "ProcessStatus": ".processstatus", "PromptTokensDetails": ".prompttokensdetails", "PromptTokensDetailsTypedDict": ".prompttokensdetails", + "PublicAuthenticationMethod": ".publicauthenticationmethod", + "PublicAuthenticationMethodTypedDict": ".publicauthenticationmethod", "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", "QueryDefinition": ".querydefinition", @@ -4692,6 +4833,12 @@ "TempoTraceAttributeTypedDict": ".tempotraceattribute", "TempoTraceAttributeValue": ".tempotraceattribute", "TempoTraceAttributeValueTypedDict": ".tempotraceattribute", + "TempoTraceAttributeArrayContainer": ".tempotraceattributearraycontainer", + "TempoTraceAttributeArrayContainerTypedDict": ".tempotraceattributearraycontainer", + "TempoTraceAttributeArrayElement": ".tempotraceattributearrayelement", + "TempoTraceAttributeArrayElementTypedDict": ".tempotraceattributearrayelement", + "TempoTraceAttributeArrayValue": ".tempotraceattributearrayvalue", + "TempoTraceAttributeArrayValueTypedDict": ".tempotraceattributearrayvalue", "TempoTraceAttributeBoolValue": ".tempotraceattributeboolvalue", "TempoTraceAttributeBoolValueTypedDict": ".tempotraceattributeboolvalue", "TempoTraceAttributeIntValue": ".tempotraceattributeintvalue", diff --git a/src/mistralai/client/models/agent.py b/src/mistralai/client/models/agent.py index 28d3751f..36cb26bf 100644 --- a/src/mistralai/client/models/agent.py +++ b/src/mistralai/client/models/agent.py @@ -9,7 +9,6 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from datetime import datetime @@ -26,7 +25,7 @@ import pydantic from pydantic import ConfigDict, model_serializer from pydantic.functional_validators import AfterValidator, BeforeValidator -from typing import Any, List, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -107,7 +106,7 @@ class AgentTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] object: Literal["agent"] version_message: NotRequired[Nullable[str]] @@ -146,7 +145,7 @@ class Agent(BaseModel): handoffs: OptionalNullable[List[str]] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET object: Annotated[ Annotated[Optional[Literal["agent"]], AfterValidator(validate_const("agent"))], diff --git a/src/mistralai/client/models/agentconversation.py b/src/mistralai/client/models/agentconversation.py index 061ff2ac..b52f5e5a 100644 --- a/src/mistralai/client/models/agentconversation.py +++ b/src/mistralai/client/models/agentconversation.py @@ -2,7 +2,6 @@ # @generated-id: 1b7d73eddf51 from __future__ import annotations -from .metadatadict import MetadataDict, MetadataDictTypedDict from datetime import datetime from mistralai.client.types import ( BaseModel, @@ -15,7 +14,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Literal, Optional, Union +from typing import Any, Dict, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -38,7 +37,7 @@ class AgentConversationTypedDict(TypedDict): r"""Name given to the conversation.""" description: NotRequired[Nullable[str]] r"""Description of the what the conversation is about.""" - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] r"""Custom metadata for the conversation.""" object: Literal["conversation"] agent_version: NotRequired[Nullable[AgentConversationAgentVersionTypedDict]] @@ -59,7 +58,7 @@ class AgentConversation(BaseModel): description: OptionalNullable[str] = UNSET r"""Description of the what the conversation is about.""" - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET r"""Custom metadata for the conversation.""" object: Annotated[ diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index a919dbc3..6b36c597 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -112,7 +112,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: NotRequired[AgentsCompletionRequestStopTypedDict] + stop: NotRequired[Nullable[AgentsCompletionRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -121,9 +121,9 @@ class AgentsCompletionRequestTypedDict(TypedDict): r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" tools: NotRequired[Nullable[List[AgentsCompletionRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionRequestToolChoiceTypedDict] - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -149,7 +149,7 @@ class AgentsCompletionRequest(BaseModel): stream: Optional[bool] = False r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: Optional[AgentsCompletionRequestStop] = None + stop: OptionalNullable[AgentsCompletionRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -164,10 +164,10 @@ class AgentsCompletionRequest(BaseModel): tool_choice: Optional[AgentsCompletionRequestToolChoice] = None - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -210,9 +210,12 @@ def serialize_model(self, handler): nullable_fields = set( [ "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", "reasoning_effort", "prompt_mode", diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index 05df8ae7..e23442aa 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -111,7 +111,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] - stop: NotRequired[AgentsCompletionStreamRequestStopTypedDict] + stop: NotRequired[Nullable[AgentsCompletionStreamRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -120,9 +120,9 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" tools: NotRequired[Nullable[List[AgentsCompletionStreamRequestToolTypedDict]]] tool_choice: NotRequired[AgentsCompletionStreamRequestToolChoiceTypedDict] - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -147,7 +147,7 @@ class AgentsCompletionStreamRequest(BaseModel): stream: Optional[bool] = True - stop: Optional[AgentsCompletionStreamRequestStop] = None + stop: OptionalNullable[AgentsCompletionStreamRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -162,10 +162,10 @@ class AgentsCompletionStreamRequest(BaseModel): tool_choice: Optional[AgentsCompletionStreamRequestToolChoice] = None - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -208,9 +208,12 @@ def serialize_model(self, handler): nullable_fields = set( [ "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", "reasoning_effort", "prompt_mode", diff --git a/src/mistralai/client/models/authenticationconfiguration.py b/src/mistralai/client/models/authenticationconfiguration.py new file mode 100644 index 00000000..c2ea5f94 --- /dev/null +++ b/src/mistralai/client/models/authenticationconfiguration.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 97b5056c29fb + +from __future__ import annotations +from .authenticationtype import AuthenticationType +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class AuthenticationConfigurationTypedDict(TypedDict): + name: str + authentication_type: AuthenticationType + is_default: NotRequired[bool] + + +class AuthenticationConfiguration(BaseModel): + name: str + + authentication_type: AuthenticationType + + is_default: Optional[bool] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_default"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/authenticationtype.py b/src/mistralai/client/models/authenticationtype.py new file mode 100644 index 00000000..f5827174 --- /dev/null +++ b/src/mistralai/client/models/authenticationtype.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b403278039c5 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +AuthenticationType = Union[ + Literal[ + "oauth2", + "bearer", + "none", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/basefielddefinition.py b/src/mistralai/client/models/basefielddefinition.py index acf9cf8d..2b45183d 100644 --- a/src/mistralai/client/models/basefielddefinition.py +++ b/src/mistralai/client/models/basefielddefinition.py @@ -24,6 +24,7 @@ "BOOL", "TIMESTAMP", "ARRAY", + "MAP", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index 1d0cf90d..5bce222f 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -112,13 +112,13 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: NotRequired[ChatCompletionRequestStopTypedDict] + stop: NotRequired[Nullable[ChatCompletionRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -129,9 +129,9 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -157,7 +157,7 @@ class ChatCompletionRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = None + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -166,7 +166,7 @@ class ChatCompletionRequest(BaseModel): stream: Optional[bool] = False r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: Optional[ChatCompletionRequestStop] = None + stop: OptionalNullable[ChatCompletionRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -183,10 +183,10 @@ class ChatCompletionRequest(BaseModel): tool_choice: Optional[ChatCompletionRequestToolChoice] = None r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -236,10 +236,14 @@ def serialize_model(self, handler): nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", "reasoning_effort", "prompt_mode", diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index 5cdccafb..7cc7a057 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -112,12 +112,12 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] - stop: NotRequired[ChatCompletionStreamRequestStopTypedDict] + stop: NotRequired[Nullable[ChatCompletionStreamRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -128,9 +128,9 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionStreamRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -156,7 +156,7 @@ class ChatCompletionStreamRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = None + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -164,7 +164,7 @@ class ChatCompletionStreamRequest(BaseModel): stream: Optional[bool] = True - stop: Optional[ChatCompletionStreamRequestStop] = None + stop: OptionalNullable[ChatCompletionStreamRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -181,10 +181,10 @@ class ChatCompletionStreamRequest(BaseModel): tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -234,10 +234,14 @@ def serialize_model(self, handler): nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", "reasoning_effort", "prompt_mode", diff --git a/src/mistralai/client/models/mirrorsource.py b/src/mistralai/client/models/connectioncredentials.py similarity index 62% rename from src/mistralai/client/models/mirrorsource.py rename to src/mistralai/client/models/connectioncredentials.py index 04603cb0..de461057 100644 --- a/src/mistralai/client/models/mirrorsource.py +++ b/src/mistralai/client/models/connectioncredentials.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 101888c5d045 +# @generated-id: 2f4a79b452fb from __future__ import annotations +from .oauth2token import OAuth2Token, OAuth2TokenTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -10,36 +11,27 @@ UNSET_SENTINEL, ) from pydantic import model_serializer +from typing import Dict from typing_extensions import NotRequired, TypedDict -class MirrorSourceTypedDict(TypedDict): - r"""Source information for mirrored requests.""" +class ConnectionCredentialsTypedDict(TypedDict): + oauth: NotRequired[Nullable[OAuth2TokenTypedDict]] + headers: NotRequired[Nullable[Dict[str, str]]] + bearer_token: NotRequired[Nullable[str]] - app: str - root_model_name: str - mirror_model_name: str - version: NotRequired[Nullable[str]] - experiment_id: NotRequired[Nullable[str]] +class ConnectionCredentials(BaseModel): + oauth: OptionalNullable[OAuth2Token] = UNSET -class MirrorSource(BaseModel): - r"""Source information for mirrored requests.""" + headers: OptionalNullable[Dict[str, str]] = UNSET - app: str - - root_model_name: str - - mirror_model_name: str - - version: OptionalNullable[str] = UNSET - - experiment_id: OptionalNullable[str] = UNSET + bearer_token: OptionalNullable[str] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["version", "experiment_id"]) - nullable_fields = set(["version", "experiment_id"]) + optional_fields = set(["oauth", "headers", "bearer_token"]) + nullable_fields = set(["oauth", "headers", "bearer_token"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py index 55730274..e7b83ed4 100644 --- a/src/mistralai/client/models/connector.py +++ b/src/mistralai/client/models/connector.py @@ -2,7 +2,6 @@ # @generated-id: 1a4facac922d from __future__ import annotations -from .connectortool import ConnectorTool, ConnectorToolTypedDict from datetime import datetime from mistralai.client.types import ( BaseModel, @@ -12,7 +11,6 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List from typing_extensions import NotRequired, TypedDict @@ -24,7 +22,6 @@ class ConnectorTypedDict(TypedDict): modified_at: datetime server: NotRequired[Nullable[str]] auth_type: NotRequired[Nullable[str]] - tools: NotRequired[Nullable[List[ConnectorToolTypedDict]]] class Connector(BaseModel): @@ -42,12 +39,10 @@ class Connector(BaseModel): auth_type: OptionalNullable[str] = UNSET - tools: OptionalNullable[List[ConnectorTool]] = UNSET - @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["server", "auth_type", "tools"]) - nullable_fields = set(["server", "auth_type", "tools"]) + optional_fields = set(["server", "auth_type"]) + nullable_fields = set(["server", "auth_type"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py b/src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py new file mode 100644 index 00000000..f66d73d3 --- /dev/null +++ b/src/mistralai/client/models/connector_create_or_update_organization_credentials_v1op.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 57c711e81d89 + +from __future__ import annotations +from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorCreateOrUpdateOrganizationCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + credentials_create_or_update: CredentialsCreateOrUpdateTypedDict + + +class ConnectorCreateOrUpdateOrganizationCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + credentials_create_or_update: Annotated[ + CredentialsCreateOrUpdate, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py b/src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py new file mode 100644 index 00000000..338d4f39 --- /dev/null +++ b/src/mistralai/client/models/connector_create_or_update_user_credentials_v1op.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6ededc839b03 + +from __future__ import annotations +from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + credentials_create_or_update: CredentialsCreateOrUpdateTypedDict + + +class ConnectorCreateOrUpdateUserCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + credentials_create_or_update: Annotated[ + CredentialsCreateOrUpdate, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py b/src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py new file mode 100644 index 00000000..43b3c1dc --- /dev/null +++ b/src/mistralai/client/models/connector_create_or_update_workspace_credentials_v1op.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7795b085704b + +from __future__ import annotations +from .credentialscreateorupdate import ( + CredentialsCreateOrUpdate, + CredentialsCreateOrUpdateTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + credentials_create_or_update: CredentialsCreateOrUpdateTypedDict + + +class ConnectorCreateOrUpdateWorkspaceCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + credentials_create_or_update: Annotated[ + CredentialsCreateOrUpdate, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/connector_delete_organization_credentials_v1op.py b/src/mistralai/client/models/connector_delete_organization_credentials_v1op.py new file mode 100644 index 00000000..6cdb0c31 --- /dev/null +++ b/src/mistralai/client/models/connector_delete_organization_credentials_v1op.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: aab3a70dbbc5 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeleteOrganizationCredentialsV1RequestTypedDict(TypedDict): + credentials_name: str + connector_id_or_name: str + + +class ConnectorDeleteOrganizationCredentialsV1Request(BaseModel): + credentials_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_delete_user_credentials_v1op.py b/src/mistralai/client/models/connector_delete_user_credentials_v1op.py new file mode 100644 index 00000000..40d25aab --- /dev/null +++ b/src/mistralai/client/models/connector_delete_user_credentials_v1op.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 8bf2075ebdbf + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeleteUserCredentialsV1RequestTypedDict(TypedDict): + credentials_name: str + connector_id_or_name: str + + +class ConnectorDeleteUserCredentialsV1Request(BaseModel): + credentials_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py b/src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py new file mode 100644 index 00000000..a746ff5e --- /dev/null +++ b/src/mistralai/client/models/connector_delete_workspace_credentials_v1op.py @@ -0,0 +1,22 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4f0993c25ece + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeleteWorkspaceCredentialsV1RequestTypedDict(TypedDict): + credentials_name: str + connector_id_or_name: str + + +class ConnectorDeleteWorkspaceCredentialsV1Request(BaseModel): + credentials_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_get_auth_url_v1op.py b/src/mistralai/client/models/connector_get_auth_url_v1op.py index f8f5fd78..10f42827 100644 --- a/src/mistralai/client/models/connector_get_auth_url_v1op.py +++ b/src/mistralai/client/models/connector_get_auth_url_v1op.py @@ -17,6 +17,7 @@ class ConnectorGetAuthURLV1RequestTypedDict(TypedDict): connector_id_or_name: str app_return_url: NotRequired[Nullable[str]] + credentials_name: NotRequired[Nullable[str]] class ConnectorGetAuthURLV1Request(BaseModel): @@ -29,10 +30,15 @@ class ConnectorGetAuthURLV1Request(BaseModel): FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET + credentials_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["app_return_url"]) - nullable_fields = set(["app_return_url"]) + optional_fields = set(["app_return_url", "credentials_name"]) + nullable_fields = set(["app_return_url", "credentials_name"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector_get_authentication_methods_v1op.py b/src/mistralai/client/models/connector_get_authentication_methods_v1op.py new file mode 100644 index 00000000..e0c4146d --- /dev/null +++ b/src/mistralai/client/models/connector_get_authentication_methods_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6861e4d57959 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorGetAuthenticationMethodsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + + +class ConnectorGetAuthenticationMethodsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_list_organization_credentials_v1op.py b/src/mistralai/client/models/connector_list_organization_credentials_v1op.py new file mode 100644 index 00000000..a20fa2a4 --- /dev/null +++ b/src/mistralai/client/models/connector_list_organization_credentials_v1op.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: a52ee058feab + +from __future__ import annotations +from .authenticationtype import AuthenticationType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorListOrganizationCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + auth_type: NotRequired[Nullable[AuthenticationType]] + fetch_default: NotRequired[bool] + + +class ConnectorListOrganizationCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + auth_type: Annotated[ + OptionalNullable[AuthenticationType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + fetch_default: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth_type", "fetch_default"]) + nullable_fields = set(["auth_type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_list_tools_v1op.py b/src/mistralai/client/models/connector_list_tools_v1op.py index 030ffb2c..3e9905c3 100644 --- a/src/mistralai/client/models/connector_list_tools_v1op.py +++ b/src/mistralai/client/models/connector_list_tools_v1op.py @@ -4,7 +4,13 @@ from __future__ import annotations from .connectortool import ConnectorTool, ConnectorToolTypedDict from .mcptool import MCPTool, MCPToolTypedDict -from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata from pydantic import model_serializer from typing import Any, Dict, List, Optional, Union @@ -18,6 +24,7 @@ class ConnectorListToolsV1RequestTypedDict(TypedDict): refresh: NotRequired[bool] pretty: NotRequired[bool] r"""Return a simplified payload with only name, description, annotations, and a compact inputSchema.""" + credentials_name: NotRequired[Nullable[str]] class ConnectorListToolsV1Request(BaseModel): @@ -46,18 +53,34 @@ class ConnectorListToolsV1Request(BaseModel): ] = False r"""Return a simplified payload with only name, description, annotations, and a compact inputSchema.""" + credentials_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["page", "page_size", "refresh", "pretty"]) + optional_fields = set( + ["page", "page_size", "refresh", "pretty", "credentials_name"] + ) + nullable_fields = set(["credentials_name"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/mistralai/client/models/connector_list_user_credentials_v1op.py b/src/mistralai/client/models/connector_list_user_credentials_v1op.py new file mode 100644 index 00000000..5b47ee83 --- /dev/null +++ b/src/mistralai/client/models/connector_list_user_credentials_v1op.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 106e8fba762d + +from __future__ import annotations +from .authenticationtype import AuthenticationType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorListUserCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + auth_type: NotRequired[Nullable[AuthenticationType]] + fetch_default: NotRequired[bool] + + +class ConnectorListUserCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + auth_type: Annotated[ + OptionalNullable[AuthenticationType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + fetch_default: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth_type", "fetch_default"]) + nullable_fields = set(["auth_type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py b/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py new file mode 100644 index 00000000..ef0f096e --- /dev/null +++ b/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: de7c431e8a54 + +from __future__ import annotations +from .authenticationtype import AuthenticationType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorListWorkspaceCredentialsV1RequestTypedDict(TypedDict): + connector_id_or_name: str + auth_type: NotRequired[Nullable[AuthenticationType]] + fetch_default: NotRequired[bool] + + +class ConnectorListWorkspaceCredentialsV1Request(BaseModel): + connector_id_or_name: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + auth_type: Annotated[ + OptionalNullable[AuthenticationType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + fetch_default: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["auth_type", "fetch_default"]) + nullable_fields = set(["auth_type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connectorauthenticationheader.py b/src/mistralai/client/models/connectorauthenticationheader.py new file mode 100644 index 00000000..5fc073f0 --- /dev/null +++ b/src/mistralai/client/models/connectorauthenticationheader.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 7271f22f39b0 + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ConnectorAuthenticationHeaderTypedDict(TypedDict): + name: str + is_required: NotRequired[bool] + is_secret: NotRequired[bool] + + +class ConnectorAuthenticationHeader(BaseModel): + name: str + + is_required: Optional[bool] = True + + is_secret: Optional[bool] = True + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_required", "is_secret"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/conversationrequest.py b/src/mistralai/client/models/conversationrequest.py index f7ed89b5..94fcb03b 100644 --- a/src/mistralai/client/models/conversationrequest.py +++ b/src/mistralai/client/models/conversationrequest.py @@ -10,7 +10,6 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -24,7 +23,7 @@ import pydantic from pydantic import Field, model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -83,7 +82,7 @@ class ConversationRequestTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] agent_id: NotRequired[Nullable[str]] agent_version: NotRequired[Nullable[ConversationRequestAgentVersionTypedDict]] model: NotRequired[Nullable[str]] @@ -113,7 +112,7 @@ class ConversationRequest(BaseModel): description: OptionalNullable[str] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET agent_id: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/conversationrestartrequest.py b/src/mistralai/client/models/conversationrestartrequest.py index 8e04cb45..b6b03f1f 100644 --- a/src/mistralai/client/models/conversationrestartrequest.py +++ b/src/mistralai/client/models/conversationrestartrequest.py @@ -5,7 +5,6 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -17,7 +16,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -51,7 +50,7 @@ class ConversationRestartRequestTypedDict(TypedDict): completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] r"""Custom metadata for the conversation.""" agent_version: NotRequired[ Nullable[ConversationRestartRequestAgentVersionTypedDict] @@ -81,7 +80,7 @@ class ConversationRestartRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET r"""Custom metadata for the conversation.""" agent_version: OptionalNullable[ConversationRestartRequestAgentVersion] = UNSET diff --git a/src/mistralai/client/models/conversationrestartstreamrequest.py b/src/mistralai/client/models/conversationrestartstreamrequest.py index d1aeb98d..41b7098f 100644 --- a/src/mistralai/client/models/conversationrestartstreamrequest.py +++ b/src/mistralai/client/models/conversationrestartstreamrequest.py @@ -5,7 +5,6 @@ from .completionargs import CompletionArgs, CompletionArgsTypedDict from .conversationinputs import ConversationInputs, ConversationInputsTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -17,7 +16,7 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -51,7 +50,7 @@ class ConversationRestartStreamRequestTypedDict(TypedDict): completion_args: NotRequired[CompletionArgsTypedDict] r"""White-listed arguments from the completion API""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] r"""Custom metadata for the conversation.""" agent_version: NotRequired[ Nullable[ConversationRestartStreamRequestAgentVersionTypedDict] @@ -83,7 +82,7 @@ class ConversationRestartStreamRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET r"""Custom metadata for the conversation.""" agent_version: OptionalNullable[ConversationRestartStreamRequestAgentVersion] = ( diff --git a/src/mistralai/client/models/conversationstreamrequest.py b/src/mistralai/client/models/conversationstreamrequest.py index 4ec455b2..a1afb267 100644 --- a/src/mistralai/client/models/conversationstreamrequest.py +++ b/src/mistralai/client/models/conversationstreamrequest.py @@ -10,7 +10,6 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -24,7 +23,7 @@ import pydantic from pydantic import Field, model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -83,7 +82,7 @@ class ConversationStreamRequestTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] name: NotRequired[Nullable[str]] description: NotRequired[Nullable[str]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] agent_id: NotRequired[Nullable[str]] agent_version: NotRequired[Nullable[ConversationStreamRequestAgentVersionTypedDict]] model: NotRequired[Nullable[str]] @@ -115,7 +114,7 @@ class ConversationStreamRequest(BaseModel): description: OptionalNullable[str] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET agent_id: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/createagentrequest.py b/src/mistralai/client/models/createagentrequest.py index b31fbc91..b434619d 100644 --- a/src/mistralai/client/models/createagentrequest.py +++ b/src/mistralai/client/models/createagentrequest.py @@ -9,7 +9,6 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -20,7 +19,7 @@ UNSET_SENTINEL, ) from pydantic import Field, model_serializer -from typing import List, Optional, Union +from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -64,7 +63,7 @@ class CreateAgentRequestTypedDict(TypedDict): guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] version_message: NotRequired[Nullable[str]] @@ -88,7 +87,7 @@ class CreateAgentRequest(BaseModel): handoffs: OptionalNullable[List[str]] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET version_message: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/createlibraryrequest.py b/src/mistralai/client/models/createlibraryrequest.py index 28dda0cb..7d75578e 100644 --- a/src/mistralai/client/models/createlibraryrequest.py +++ b/src/mistralai/client/models/createlibraryrequest.py @@ -10,13 +10,22 @@ UNSET_SENTINEL, ) from pydantic import model_serializer +from typing import Literal from typing_extensions import NotRequired, TypedDict +OwnerType = Literal[ + "User", + "Workspace", +] + + class CreateLibraryRequestTypedDict(TypedDict): name: str description: NotRequired[Nullable[str]] chunk_size: NotRequired[Nullable[int]] + owner_type: NotRequired[Nullable[OwnerType]] + r"""Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries.""" class CreateLibraryRequest(BaseModel): @@ -26,10 +35,13 @@ class CreateLibraryRequest(BaseModel): chunk_size: OptionalNullable[int] = UNSET + owner_type: OptionalNullable[OwnerType] = UNSET + r"""Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["description", "chunk_size"]) - nullable_fields = set(["description", "chunk_size"]) + optional_fields = set(["description", "chunk_size", "owner_type"]) + nullable_fields = set(["description", "chunk_size", "owner_type"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/credentialscreateorupdate.py b/src/mistralai/client/models/credentialscreateorupdate.py new file mode 100644 index 00000000..0766a4d3 --- /dev/null +++ b/src/mistralai/client/models/credentialscreateorupdate.py @@ -0,0 +1,63 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9927546f2487 + +from __future__ import annotations +from .connectioncredentials import ConnectionCredentials, ConnectionCredentialsTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class CredentialsCreateOrUpdateTypedDict(TypedDict): + r"""Request to create or update non-OAuth2 credentials for a connector.""" + + name: str + r"""Name of the credentials. Use this name to access or modify your credentials.""" + is_default: NotRequired[Nullable[bool]] + r"""Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.""" + credentials: NotRequired[Nullable[ConnectionCredentialsTypedDict]] + r"""The credential data (headers, bearer_token).""" + + +class CredentialsCreateOrUpdate(BaseModel): + r"""Request to create or update non-OAuth2 credentials for a connector.""" + + name: str + r"""Name of the credentials. Use this name to access or modify your credentials.""" + + is_default: OptionalNullable[bool] = UNSET + r"""Controls whether this credential is the default for its auth method. On creation: if no credential exists yet for this auth method, the credential is automatically set as default when is_default is true or omitted; setting is_default to false is rejected because a default must exist. If other credentials already exist, setting is_default to true promotes this credential (demoting the previous default); false or omitted creates it as non-default. On update: true promotes this credential, false is rejected if it is currently the default (promote another credential first), omitted leaves the default status unchanged.""" + + credentials: OptionalNullable[ConnectionCredentials] = UNSET + r"""The credential data (headers, bearer_token).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["is_default", "credentials"]) + nullable_fields = set(["is_default", "credentials"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/credentialsresponse.py b/src/mistralai/client/models/credentialsresponse.py new file mode 100644 index 00000000..4c6a41ab --- /dev/null +++ b/src/mistralai/client/models/credentialsresponse.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 80cc6fb316f9 + +from __future__ import annotations +from .authenticationconfiguration import ( + AuthenticationConfiguration, + AuthenticationConfigurationTypedDict, +) +from .authenticationtype import AuthenticationType +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class CredentialsResponseTypedDict(TypedDict): + credentials: List[AuthenticationConfigurationTypedDict] + connector_preset_credentials_for_auth: NotRequired[List[AuthenticationType]] + + +class CredentialsResponse(BaseModel): + credentials: List[AuthenticationConfiguration] + + connector_preset_credentials_for_auth: Optional[List[AuthenticationType]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["connector_preset_credentials_for_auth"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/deploymentdetailresponse.py b/src/mistralai/client/models/deploymentdetailresponse.py index 82f021f1..6bf22812 100644 --- a/src/mistralai/client/models/deploymentdetailresponse.py +++ b/src/mistralai/client/models/deploymentdetailresponse.py @@ -2,14 +2,22 @@ # @generated-id: 7f4a17a1c7ca from __future__ import annotations +from .deploymentlocation import DeploymentLocation, DeploymentLocationTypedDict from .deploymentworkerresponse import ( DeploymentWorkerResponse, DeploymentWorkerResponseTypedDict, ) from datetime import datetime -from mistralai.client.types import BaseModel +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import List -from typing_extensions import TypedDict +from typing_extensions import NotRequired, TypedDict class DeploymentDetailResponseTypedDict(TypedDict): @@ -25,6 +33,8 @@ class DeploymentDetailResponseTypedDict(TypedDict): r"""When the deployment was last updated""" workers: List[DeploymentWorkerResponseTypedDict] r"""Workers registered for the deployment""" + location: NotRequired[Nullable[DeploymentLocationTypedDict]] + r"""Where the deployment is running""" class DeploymentDetailResponse(BaseModel): @@ -45,3 +55,31 @@ class DeploymentDetailResponse(BaseModel): workers: List[DeploymentWorkerResponse] r"""Workers registered for the deployment""" + + location: OptionalNullable[DeploymentLocation] = UNSET + r"""Where the deployment is running""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location"]) + nullable_fields = set(["location"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/deploymentlocation.py b/src/mistralai/client/models/deploymentlocation.py new file mode 100644 index 00000000..52ce7993 --- /dev/null +++ b/src/mistralai/client/models/deploymentlocation.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c62839f1466c + +from __future__ import annotations +from .locationtype import LocationType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class DeploymentLocationTypedDict(TypedDict): + location_type: LocationType + k8s_cluster: NotRequired[Nullable[str]] + r"""K8s cluster name, if applicable""" + k8s_namespace: NotRequired[Nullable[str]] + r"""K8s namespace, if applicable""" + + +class DeploymentLocation(BaseModel): + location_type: LocationType + + k8s_cluster: OptionalNullable[str] = UNSET + r"""K8s cluster name, if applicable""" + + k8s_namespace: OptionalNullable[str] = UNSET + r"""K8s namespace, if applicable""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["k8s_cluster", "k8s_namespace"]) + nullable_fields = set(["k8s_cluster", "k8s_namespace"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/deploymentresponse.py b/src/mistralai/client/models/deploymentresponse.py index 7f8ed3a3..0e316849 100644 --- a/src/mistralai/client/models/deploymentresponse.py +++ b/src/mistralai/client/models/deploymentresponse.py @@ -2,9 +2,17 @@ # @generated-id: ea15ddd64402 from __future__ import annotations +from .deploymentlocation import DeploymentLocation, DeploymentLocationTypedDict from datetime import datetime -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict class DeploymentResponseTypedDict(TypedDict): @@ -18,6 +26,8 @@ class DeploymentResponseTypedDict(TypedDict): r"""When the deployment was first registered""" updated_at: datetime r"""When the deployment was last updated""" + location: NotRequired[Nullable[DeploymentLocationTypedDict]] + r"""Where the deployment is running""" class DeploymentResponse(BaseModel): @@ -35,3 +45,31 @@ class DeploymentResponse(BaseModel): updated_at: datetime r"""When the deployment was last updated""" + + location: OptionalNullable[DeploymentLocation] = UNSET + r"""Where the deployment is running""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["location"]) + nullable_fields = set(["location"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/fimcompletionrequest.py b/src/mistralai/client/models/fimcompletionrequest.py index 2ca34598..6b6b1f52 100644 --- a/src/mistralai/client/models/fimcompletionrequest.py +++ b/src/mistralai/client/models/fimcompletionrequest.py @@ -33,13 +33,13 @@ class FIMCompletionRequestTypedDict(TypedDict): r"""The text/code to complete.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: NotRequired[FIMCompletionRequestStopTypedDict] + stop: NotRequired[Nullable[FIMCompletionRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -60,7 +60,7 @@ class FIMCompletionRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = 1 + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -69,7 +69,7 @@ class FIMCompletionRequest(BaseModel): stream: Optional[bool] = False r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: Optional[FIMCompletionRequestStop] = None + stop: OptionalNullable[FIMCompletionRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -101,7 +101,9 @@ def serialize_model(self, handler): nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "suffix", diff --git a/src/mistralai/client/models/fimcompletionstreamrequest.py b/src/mistralai/client/models/fimcompletionstreamrequest.py index 9c91083c..6993807a 100644 --- a/src/mistralai/client/models/fimcompletionstreamrequest.py +++ b/src/mistralai/client/models/fimcompletionstreamrequest.py @@ -33,12 +33,12 @@ class FIMCompletionStreamRequestTypedDict(TypedDict): r"""The text/code to complete.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] - stop: NotRequired[FIMCompletionStreamRequestStopTypedDict] + stop: NotRequired[Nullable[FIMCompletionStreamRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -59,7 +59,7 @@ class FIMCompletionStreamRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = 1 + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -67,7 +67,7 @@ class FIMCompletionStreamRequest(BaseModel): stream: Optional[bool] = True - stop: Optional[FIMCompletionStreamRequestStop] = None + stop: OptionalNullable[FIMCompletionStreamRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -99,7 +99,9 @@ def serialize_model(self, handler): nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "suffix", diff --git a/src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py b/src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py index 478ee3fb..d8cc7f6e 100644 --- a/src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py +++ b/src/mistralai/client/models/get_workflow_registrations_v1_workflows_registrations_getop.py @@ -31,7 +31,7 @@ class GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequestTypedDict(TypedD with_workflow: NotRequired[bool] r"""Whether to include the workflow definition""" available_in_chat_assistant: NotRequired[Nullable[bool]] - r"""Whether to only return workflows compatible with chat assistant""" + r"""Whether to only return workflows available in chat assistant""" limit: NotRequired[int] r"""The maximum number of workflows versions to return""" cursor: NotRequired[Nullable[str]] @@ -85,7 +85,7 @@ class GetWorkflowRegistrationsV1WorkflowsRegistrationsGetRequest(BaseModel): OptionalNullable[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Whether to only return workflows compatible with chat assistant""" + r"""Whether to only return workflows available in chat assistant""" limit: Annotated[ Optional[int], diff --git a/src/mistralai/client/models/get_workflows_v1_workflows_getop.py b/src/mistralai/client/models/get_workflows_v1_workflows_getop.py index 6cbad5e4..38ca4d72 100644 --- a/src/mistralai/client/models/get_workflows_v1_workflows_getop.py +++ b/src/mistralai/client/models/get_workflows_v1_workflows_getop.py @@ -22,7 +22,7 @@ class GetWorkflowsV1WorkflowsGetRequestTypedDict(TypedDict): include_shared: NotRequired[bool] r"""Whether to include shared workflows""" available_in_chat_assistant: NotRequired[Nullable[bool]] - r"""Whether to only return workflows compatible with chat assistant""" + r"""Whether to only return workflows available in chat assistant""" archived: NotRequired[Nullable[bool]] r"""Filter by archived state. False=exclude archived, True=only archived, None=include all""" cursor: NotRequired[Nullable[str]] @@ -48,7 +48,7 @@ class GetWorkflowsV1WorkflowsGetRequest(BaseModel): OptionalNullable[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Whether to only return workflows compatible with chat assistant""" + r"""Whether to only return workflows available in chat assistant""" archived: Annotated[ OptionalNullable[bool], diff --git a/src/mistralai/client/models/ingestionpipelineconfiguration.py b/src/mistralai/client/models/ingestionpipelineconfiguration.py new file mode 100644 index 00000000..5aaa6a40 --- /dev/null +++ b/src/mistralai/client/models/ingestionpipelineconfiguration.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b4746c0f2c1c + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class IngestionPipelineConfigurationTypedDict(TypedDict): + id: str + name: str + created_at: datetime + modified_at: datetime + + +class IngestionPipelineConfiguration(BaseModel): + id: str + + name: str + + created_at: datetime + + modified_at: datetime diff --git a/src/mistralai/client/models/instructrequest.py b/src/mistralai/client/models/instructrequest.py index 2bda8378..e5f9cccf 100644 --- a/src/mistralai/client/models/instructrequest.py +++ b/src/mistralai/client/models/instructrequest.py @@ -36,12 +36,8 @@ class InstructRequestTypedDict(TypedDict): - r"""A valid request to be tokenized""" - messages: List[InstructRequestMessageTypedDict] class InstructRequest(BaseModel): - r"""A valid request to be tokenized""" - messages: List[InstructRequestMessage] diff --git a/src/mistralai/client/models/internalmetadata.py b/src/mistralai/client/models/internalmetadata.py deleted file mode 100644 index dca90b9a..00000000 --- a/src/mistralai/client/models/internalmetadata.py +++ /dev/null @@ -1,92 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 50a25e4e336c - -from __future__ import annotations -from .mirrorconfig import MirrorConfig, MirrorConfigTypedDict -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -import pydantic -from pydantic import ConfigDict, model_serializer -from typing import Any, Dict, Union -from typing_extensions import NotRequired, TypeAliasType, TypedDict - - -InternalMetadataAgentVersionTypedDict = TypeAliasType( - "InternalMetadataAgentVersionTypedDict", Union[str, int] -) - - -InternalMetadataAgentVersion = TypeAliasType( - "InternalMetadataAgentVersion", Union[str, int] -) - - -class InternalMetadataTypedDict(TypedDict): - r"""Typed structure for internal metadata.""" - - agent_id: NotRequired[Nullable[str]] - agent_version: NotRequired[Nullable[InternalMetadataAgentVersionTypedDict]] - mirror_config: NotRequired[Nullable[MirrorConfigTypedDict]] - science_config: NotRequired[Nullable[Dict[str, Any]]] - - -class InternalMetadata(BaseModel): - r"""Typed structure for internal metadata.""" - - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - - agent_id: OptionalNullable[str] = UNSET - - agent_version: OptionalNullable[InternalMetadataAgentVersion] = UNSET - - mirror_config: OptionalNullable[MirrorConfig] = UNSET - - science_config: OptionalNullable[Dict[str, Any]] = UNSET - - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - ["agent_id", "agent_version", "mirror_config", "science_config"] - ) - nullable_fields = set( - ["agent_id", "agent_version", "mirror_config", "science_config"] - ) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - for k, v in serialized.items(): - m[k] = v - - return m diff --git a/src/mistralai/client/models/libraries_documents_get_text_content_v1op.py b/src/mistralai/client/models/libraries_documents_get_text_content_v1op.py index e0508d66..3d2ad43d 100644 --- a/src/mistralai/client/models/libraries_documents_get_text_content_v1op.py +++ b/src/mistralai/client/models/libraries_documents_get_text_content_v1op.py @@ -2,14 +2,23 @@ # @generated-id: 1ca4e0c41321 from __future__ import annotations -from mistralai.client.types import BaseModel -from mistralai.client.utils import FieldMetadata, PathParamMetadata -from typing_extensions import Annotated, TypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict class LibrariesDocumentsGetTextContentV1RequestTypedDict(TypedDict): library_id: str document_id: str + page_start: NotRequired[Nullable[int]] + page_end: NotRequired[Nullable[int]] class LibrariesDocumentsGetTextContentV1Request(BaseModel): @@ -20,3 +29,38 @@ class LibrariesDocumentsGetTextContentV1Request(BaseModel): document_id: Annotated[ str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] + + page_start: Annotated[ + OptionalNullable[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + page_end: Annotated[ + OptionalNullable[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["page_start", "page_end"]) + nullable_fields = set(["page_start", "page_end"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py index e61140cf..3237a29a 100644 --- a/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py +++ b/src/mistralai/client/models/list_runs_v1_workflows_runs_getop.py @@ -41,6 +41,8 @@ class ListRunsV1WorkflowsRunsGetRequestTypedDict(TypedDict): r"""Search by workflow name, display name or id""" status: NotRequired[Nullable[ListRunsV1WorkflowsRunsGetStatusTypedDict]] r"""Filter by workflow status""" + user_id: NotRequired[Nullable[str]] + r"""Filter by user id. Use 'current' to filter by the authenticated user""" page_size: NotRequired[int] r"""Number of items per page""" next_page_token: NotRequired[Nullable[str]] @@ -66,6 +68,12 @@ class ListRunsV1WorkflowsRunsGetRequest(BaseModel): ] = UNSET r"""Filter by workflow status""" + user_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by user id. Use 'current' to filter by the authenticated user""" + page_size: Annotated[ Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), @@ -81,10 +89,17 @@ class ListRunsV1WorkflowsRunsGetRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["workflow_identifier", "search", "status", "page_size", "next_page_token"] + [ + "workflow_identifier", + "search", + "status", + "user_id", + "page_size", + "next_page_token", + ] ) nullable_fields = set( - ["workflow_identifier", "search", "status", "next_page_token"] + ["workflow_identifier", "search", "status", "user_id", "next_page_token"] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/locationtype.py b/src/mistralai/client/models/locationtype.py new file mode 100644 index 00000000..4e2ff2f6 --- /dev/null +++ b/src/mistralai/client/models/locationtype.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 72a73946b20e + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +LocationType = Union[ + Literal[ + "local", + "k8s", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/metadatadict.py b/src/mistralai/client/models/metadatadict.py deleted file mode 100644 index 9d6b6086..00000000 --- a/src/mistralai/client/models/metadatadict.py +++ /dev/null @@ -1,69 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 5c62d851af9a - -from __future__ import annotations -from .internalmetadata import InternalMetadata, InternalMetadataTypedDict -from mistralai.client.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -import pydantic -from pydantic import ConfigDict, model_serializer -from typing import Any, Dict -from typing_extensions import NotRequired, TypedDict - - -class MetadataDictTypedDict(TypedDict): - r"""Custom type for metadata with embedded validation.""" - - internal: NotRequired[Nullable[InternalMetadataTypedDict]] - - -class MetadataDict(BaseModel): - r"""Custom type for metadata with embedded validation.""" - - model_config = ConfigDict( - populate_by_name=True, arbitrary_types_allowed=True, extra="allow" - ) - __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - - internal: OptionalNullable[InternalMetadata] = UNSET - - @property - def additional_properties(self): - return self.__pydantic_extra__ - - @additional_properties.setter - def additional_properties(self, value): - self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["internal"]) - nullable_fields = set(["internal"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - serialized.pop(k, serialized.pop(n, None)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - for k, v in serialized.items(): - m[k] = v - - return m diff --git a/src/mistralai/client/models/mirrorconfig.py b/src/mistralai/client/models/mirrorconfig.py deleted file mode 100644 index e7754064..00000000 --- a/src/mistralai/client/models/mirrorconfig.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 0aebdaa43ceb - -from __future__ import annotations -from .mirrorsource import MirrorSource, MirrorSourceTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict - - -class MirrorConfigTypedDict(TypedDict): - r"""Configuration for mirroring behavior.""" - - mirror_source: MirrorSourceTypedDict - r"""Source information for mirrored requests.""" - - -class MirrorConfig(BaseModel): - r"""Configuration for mirroring behavior.""" - - mirror_source: MirrorSource - r"""Source information for mirrored requests.""" diff --git a/src/mistralai/client/models/modelconversation.py b/src/mistralai/client/models/modelconversation.py index ff3b85d3..72ca957f 100644 --- a/src/mistralai/client/models/modelconversation.py +++ b/src/mistralai/client/models/modelconversation.py @@ -9,7 +9,6 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from datetime import datetime @@ -26,7 +25,7 @@ import pydantic from pydantic import ConfigDict, model_serializer from pydantic.functional_validators import AfterValidator, BeforeValidator -from typing import Any, List, Literal, Optional, Union +from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -104,7 +103,7 @@ class ModelConversationTypedDict(TypedDict): r"""Name given to the conversation.""" description: NotRequired[Nullable[str]] r"""Description of the what the conversation is about.""" - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] r"""Custom metadata for the conversation.""" object: Literal["conversation"] @@ -135,7 +134,7 @@ class ModelConversation(BaseModel): description: OptionalNullable[str] = UNSET r"""Description of the what the conversation is about.""" - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET r"""Custom metadata for the conversation.""" object: Annotated[ diff --git a/src/mistralai/client/models/oauth2token.py b/src/mistralai/client/models/oauth2token.py new file mode 100644 index 00000000..0887216b --- /dev/null +++ b/src/mistralai/client/models/oauth2token.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6153dd0f41bc + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class OAuth2TokenTypedDict(TypedDict): + access_token: str + token_type: Literal["Bearer"] + expires_in: NotRequired[Nullable[int]] + scope: NotRequired[Nullable[str]] + refresh_token: NotRequired[Nullable[str]] + expires_at: NotRequired[Nullable[datetime]] + + +class OAuth2Token(BaseModel): + access_token: str + + token_type: Annotated[ + Annotated[ + Optional[Literal["Bearer"]], AfterValidator(validate_const("Bearer")) + ], + pydantic.Field(alias="token_type"), + ] = "Bearer" + + expires_in: OptionalNullable[int] = UNSET + + scope: OptionalNullable[str] = UNSET + + refresh_token: OptionalNullable[str] = UNSET + + expires_at: OptionalNullable[datetime] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["token_type", "expires_in", "scope", "refresh_token", "expires_at"] + ) + nullable_fields = set(["expires_in", "scope", "refresh_token", "expires_at"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + OAuth2Token.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/publicauthenticationmethod.py b/src/mistralai/client/models/publicauthenticationmethod.py new file mode 100644 index 00000000..3351b432 --- /dev/null +++ b/src/mistralai/client/models/publicauthenticationmethod.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 545ab7f24523 + +from __future__ import annotations +from .authenticationtype import AuthenticationType +from .connectorauthenticationheader import ( + ConnectorAuthenticationHeader, + ConnectorAuthenticationHeaderTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PublicAuthenticationMethodTypedDict(TypedDict): + r"""Public view of an authentication method, without secrets.""" + + method_type: AuthenticationType + headers: NotRequired[Nullable[List[ConnectorAuthenticationHeaderTypedDict]]] + + +class PublicAuthenticationMethod(BaseModel): + r"""Public view of an authentication method, without secrets.""" + + method_type: AuthenticationType + + headers: OptionalNullable[List[ConnectorAuthenticationHeader]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["headers"]) + nullable_fields = set(["headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/speechrequest.py b/src/mistralai/client/models/speechrequest.py index 8aaabda9..c57df7a8 100644 --- a/src/mistralai/client/models/speechrequest.py +++ b/src/mistralai/client/models/speechrequest.py @@ -2,7 +2,6 @@ # @generated-id: cf3bc148e629 from __future__ import annotations -from .metadatadict import MetadataDict, MetadataDictTypedDict from .speechoutputformat import SpeechOutputFormat from mistralai.client.types import ( BaseModel, @@ -21,7 +20,7 @@ class SpeechRequestTypedDict(TypedDict): input: str r"""Text to generate a speech from""" model: NotRequired[Nullable[str]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] stream: NotRequired[bool] voice_id: NotRequired[Nullable[str]] r"""The preset or custom voice to use for generating the speech.""" @@ -41,7 +40,7 @@ class SpeechRequest(BaseModel): model: OptionalNullable[str] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET stream: Optional[bool] = False diff --git a/src/mistralai/client/models/tempotraceattribute.py b/src/mistralai/client/models/tempotraceattribute.py index 71c1b1f2..dea530ea 100644 --- a/src/mistralai/client/models/tempotraceattribute.py +++ b/src/mistralai/client/models/tempotraceattribute.py @@ -2,6 +2,10 @@ # @generated-id: 7d0ec3402dc0 from __future__ import annotations +from .tempotraceattributearrayvalue import ( + TempoTraceAttributeArrayValue, + TempoTraceAttributeArrayValueTypedDict, +) from .tempotraceattributeboolvalue import ( TempoTraceAttributeBoolValue, TempoTraceAttributeBoolValueTypedDict, @@ -25,6 +29,7 @@ TempoTraceAttributeStringValueTypedDict, TempoTraceAttributeIntValueTypedDict, TempoTraceAttributeBoolValueTypedDict, + TempoTraceAttributeArrayValueTypedDict, ], ) r"""The value of the attribute""" @@ -36,6 +41,7 @@ TempoTraceAttributeStringValue, TempoTraceAttributeIntValue, TempoTraceAttributeBoolValue, + TempoTraceAttributeArrayValue, ], ) r"""The value of the attribute""" diff --git a/src/mistralai/client/models/tempotraceattributearraycontainer.py b/src/mistralai/client/models/tempotraceattributearraycontainer.py new file mode 100644 index 00000000..08206037 --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributearraycontainer.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: afca3b2e0b21 + +from __future__ import annotations +from .tempotraceattributearrayelement import ( + TempoTraceAttributeArrayElement, + TempoTraceAttributeArrayElementTypedDict, +) +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class TempoTraceAttributeArrayContainerTypedDict(TypedDict): + values: NotRequired[List[TempoTraceAttributeArrayElementTypedDict]] + r"""The values of the array""" + + +class TempoTraceAttributeArrayContainer(BaseModel): + values: Optional[List[TempoTraceAttributeArrayElement]] = None + r"""The values of the array""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["values"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/tempotraceattributearrayelement.py b/src/mistralai/client/models/tempotraceattributearrayelement.py new file mode 100644 index 00000000..6fa0ec60 --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributearrayelement.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4f3b1d9264a3 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TempoTraceAttributeArrayElementTypedDict(TypedDict): + string_value: NotRequired[Nullable[str]] + r"""A string element in the array""" + int_value: NotRequired[Nullable[str]] + r"""An integer element in the array""" + bool_value: NotRequired[Nullable[bool]] + r"""A boolean element in the array""" + + +class TempoTraceAttributeArrayElement(BaseModel): + string_value: Annotated[ + OptionalNullable[str], pydantic.Field(alias="stringValue") + ] = UNSET + r"""A string element in the array""" + + int_value: Annotated[OptionalNullable[str], pydantic.Field(alias="intValue")] = ( + UNSET + ) + r"""An integer element in the array""" + + bool_value: Annotated[OptionalNullable[bool], pydantic.Field(alias="boolValue")] = ( + UNSET + ) + r"""A boolean element in the array""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["stringValue", "intValue", "boolValue"]) + nullable_fields = set(["stringValue", "intValue", "boolValue"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + TempoTraceAttributeArrayElement.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/tempotraceattributearrayvalue.py b/src/mistralai/client/models/tempotraceattributearrayvalue.py new file mode 100644 index 00000000..95fe337e --- /dev/null +++ b/src/mistralai/client/models/tempotraceattributearrayvalue.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d75dd416f9e3 + +from __future__ import annotations +from .tempotraceattributearraycontainer import ( + TempoTraceAttributeArrayContainer, + TempoTraceAttributeArrayContainerTypedDict, +) +from mistralai.client.types import BaseModel +import pydantic +from typing_extensions import Annotated, TypedDict + + +class TempoTraceAttributeArrayValueTypedDict(TypedDict): + array_value: TempoTraceAttributeArrayContainerTypedDict + + +class TempoTraceAttributeArrayValue(BaseModel): + array_value: Annotated[ + TempoTraceAttributeArrayContainer, pydantic.Field(alias="arrayValue") + ] + + +try: + TempoTraceAttributeArrayValue.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/thinkchunk.py b/src/mistralai/client/models/thinkchunk.py index ae084a17..d2af3da6 100644 --- a/src/mistralai/client/models/thinkchunk.py +++ b/src/mistralai/client/models/thinkchunk.py @@ -5,7 +5,13 @@ from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict -from mistralai.client.types import BaseModel, UNSET_SENTINEL +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.client.utils import validate_const import pydantic from pydantic import model_serializer @@ -28,6 +34,8 @@ class ThinkChunkTypedDict(TypedDict): thinking: List[ThinkingTypedDict] type: Literal["thinking"] + signature: NotRequired[Nullable[str]] + r"""Signature to replay some reasoning blocks across turns.""" closed: NotRequired[bool] r"""Whether the thinking chunk is closed or not. Currently only used for prefixing.""" @@ -42,21 +50,33 @@ class ThinkChunk(BaseModel): pydantic.Field(alias="type"), ] = "thinking" + signature: OptionalNullable[str] = UNSET + r"""Signature to replay some reasoning blocks across turns.""" + closed: Optional[bool] = None r"""Whether the thinking chunk is closed or not. Currently only used for prefixing.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["type", "closed"]) + optional_fields = set(["type", "signature", "closed"]) + nullable_fields = set(["signature"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/mistralai/client/models/updateagentrequest.py b/src/mistralai/client/models/updateagentrequest.py index df4664fa..7bb9686b 100644 --- a/src/mistralai/client/models/updateagentrequest.py +++ b/src/mistralai/client/models/updateagentrequest.py @@ -9,7 +9,6 @@ from .functiontool import FunctionTool, FunctionToolTypedDict from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict -from .metadatadict import MetadataDict, MetadataDictTypedDict from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.client.types import ( @@ -20,7 +19,7 @@ UNSET_SENTINEL, ) from pydantic import Field, model_serializer -from typing import List, Optional, Union +from typing import Any, Dict, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -65,7 +64,7 @@ class UpdateAgentRequestTypedDict(TypedDict): description: NotRequired[Nullable[str]] handoffs: NotRequired[Nullable[List[str]]] deployment_chat: NotRequired[Nullable[bool]] - metadata: NotRequired[Nullable[MetadataDictTypedDict]] + metadata: NotRequired[Nullable[Dict[str, Any]]] version_message: NotRequired[Nullable[str]] @@ -91,7 +90,7 @@ class UpdateAgentRequest(BaseModel): deployment_chat: OptionalNullable[bool] = UNSET - metadata: OptionalNullable[MetadataDict] = UNSET + metadata: OptionalNullable[Dict[str, Any]] = UNSET version_message: OptionalNullable[str] = UNSET diff --git a/src/mistralai/client/models/workflow.py b/src/mistralai/client/models/workflow.py index 5edf326c..2eeac0dc 100644 --- a/src/mistralai/client/models/workflow.py +++ b/src/mistralai/client/models/workflow.py @@ -35,6 +35,8 @@ class WorkflowTypedDict(TypedDict): r"""Whether the workflow is available in chat assistant""" is_technical: NotRequired[bool] r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: NotRequired[bool] + r"""Whether the workflow must run associated to a user's identity""" archived: NotRequired[bool] r"""Whether the workflow is archived""" @@ -69,6 +71,9 @@ class Workflow(BaseModel): is_technical: Optional[bool] = False r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: Optional[bool] = False + r"""Whether the workflow must run associated to a user's identity""" + archived: Optional[bool] = False r"""Whether the workflow is archived""" @@ -80,6 +85,7 @@ def serialize_model(self, handler): "shared_namespace", "available_in_chat_assistant", "is_technical", + "on_behalf_of", "archived", ] ) diff --git a/src/mistralai/client/models/workflowcodedefinition.py b/src/mistralai/client/models/workflowcodedefinition.py index f71b9ff1..84444ce6 100644 --- a/src/mistralai/client/models/workflowcodedefinition.py +++ b/src/mistralai/client/models/workflowcodedefinition.py @@ -32,6 +32,8 @@ class WorkflowCodeDefinitionTypedDict(TypedDict): r"""Whether the workflow enforces deterministic execution""" execution_timeout: NotRequired[float] r"""Maximum total execution time including retries and continue-as-new""" + plugin_metadata: NotRequired[Nullable[Dict[str, Any]]] + r"""Plugin-specific metadata (e.g. connector declarations)""" class WorkflowCodeDefinition(BaseModel): @@ -56,6 +58,9 @@ class WorkflowCodeDefinition(BaseModel): execution_timeout: Optional[float] = None r"""Maximum total execution time including retries and continue-as-new""" + plugin_metadata: OptionalNullable[Dict[str, Any]] = UNSET + r"""Plugin-specific metadata (e.g. connector declarations)""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -66,9 +71,10 @@ def serialize_model(self, handler): "updates", "enforce_determinism", "execution_timeout", + "plugin_metadata", ] ) - nullable_fields = set(["output_schema"]) + nullable_fields = set(["output_schema", "plugin_metadata"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowexecutionlistresponse.py b/src/mistralai/client/models/workflowexecutionlistresponse.py index 442ed972..b992bc8e 100644 --- a/src/mistralai/client/models/workflowexecutionlistresponse.py +++ b/src/mistralai/client/models/workflowexecutionlistresponse.py @@ -19,6 +19,8 @@ class WorkflowExecutionListResponseTypedDict(TypedDict): + r"""Deprecated: use WorkflowRunListResponse instead. Will be removed in the next major version.""" + executions: List[WorkflowExecutionWithoutResultResponseTypedDict] r"""A list of workflow executions""" next_page_token: NotRequired[Nullable[str]] @@ -26,6 +28,8 @@ class WorkflowExecutionListResponseTypedDict(TypedDict): class WorkflowExecutionListResponse(BaseModel): + r"""Deprecated: use WorkflowRunListResponse instead. Will be removed in the next major version.""" + executions: List[WorkflowExecutionWithoutResultResponse] r"""A list of workflow executions""" diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py index 615276d3..e878b2f4 100644 --- a/src/mistralai/client/models/workflowexecutionrequest.py +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -28,6 +28,8 @@ class WorkflowExecutionRequestTypedDict(TypedDict): timeout_seconds: NotRequired[Nullable[float]] r"""Maximum time to wait for completion when wait_for_result is true.""" custom_tracing_attributes: NotRequired[Nullable[Dict[str, str]]] + extensions: NotRequired[Nullable[Dict[str, Any]]] + r"""Plugin-specific data to propagate into WorkflowContext.extensions at execution time.""" task_queue: NotRequired[Nullable[str]] r"""Deprecated. Use deployment_name instead.""" deployment_name: NotRequired[Nullable[str]] @@ -52,6 +54,9 @@ class WorkflowExecutionRequest(BaseModel): custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET + extensions: OptionalNullable[Dict[str, Any]] = UNSET + r"""Plugin-specific data to propagate into WorkflowContext.extensions at execution time.""" + task_queue: Annotated[ OptionalNullable[str], pydantic.Field( @@ -73,6 +78,7 @@ def serialize_model(self, handler): "wait_for_result", "timeout_seconds", "custom_tracing_attributes", + "extensions", "task_queue", "deployment_name", ] @@ -84,6 +90,7 @@ def serialize_model(self, handler): "encoded_input", "timeout_seconds", "custom_tracing_attributes", + "extensions", "task_queue", "deployment_name", ] diff --git a/src/mistralai/client/models/workflowexecutionresponse.py b/src/mistralai/client/models/workflowexecutionresponse.py index 84398375..83179054 100644 --- a/src/mistralai/client/models/workflowexecutionresponse.py +++ b/src/mistralai/client/models/workflowexecutionresponse.py @@ -33,6 +33,8 @@ class WorkflowExecutionResponseTypedDict(TypedDict): r"""The result of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" @@ -62,14 +64,24 @@ class WorkflowExecutionResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms"]) + optional_fields = set(["parent_execution_id", "run_id", "total_duration_ms"]) nullable_fields = set( - ["parent_execution_id", "status", "end_time", "total_duration_ms", "result"] + [ + "parent_execution_id", + "run_id", + "status", + "end_time", + "total_duration_ms", + "result", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py b/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py index 74e55c29..c6e118f4 100644 --- a/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py +++ b/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py @@ -3,8 +3,15 @@ from __future__ import annotations from .jsonpayloadresponse import JSONPayloadResponse, JSONPayloadResponseTypedDict -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict class WorkflowExecutionStartedAttributesResponseTypedDict(TypedDict): @@ -19,6 +26,8 @@ class WorkflowExecutionStartedAttributesResponseTypedDict(TypedDict): Used for complete state snapshots or final results. """ + display_name: NotRequired[Nullable[str]] + r"""The user-friendly display name of the workflow, if available.""" class WorkflowExecutionStartedAttributesResponse(BaseModel): @@ -35,3 +44,31 @@ class WorkflowExecutionStartedAttributesResponse(BaseModel): Used for complete state snapshots or final results. """ + + display_name: OptionalNullable[str] = UNSET + r"""The user-friendly display name of the workflow, if available.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["display_name"]) + nullable_fields = set(["display_name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py b/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py index 0c24a1ea..22853e9b 100644 --- a/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py +++ b/src/mistralai/client/models/workflowexecutiontraceeventsresponse.py @@ -56,6 +56,8 @@ class WorkflowExecutionTraceEventsResponseTypedDict(TypedDict): r"""The result of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" events: NotRequired[List[WorkflowExecutionTraceEventsResponseEventTypedDict]] @@ -87,6 +89,9 @@ class WorkflowExecutionTraceEventsResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @@ -95,9 +100,18 @@ class WorkflowExecutionTraceEventsResponse(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms", "events"]) + optional_fields = set( + ["parent_execution_id", "run_id", "total_duration_ms", "events"] + ) nullable_fields = set( - ["parent_execution_id", "status", "end_time", "total_duration_ms", "result"] + [ + "parent_execution_id", + "run_id", + "status", + "end_time", + "total_duration_ms", + "result", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowexecutiontraceotelresponse.py b/src/mistralai/client/models/workflowexecutiontraceotelresponse.py index b4320b83..46f5404e 100644 --- a/src/mistralai/client/models/workflowexecutiontraceotelresponse.py +++ b/src/mistralai/client/models/workflowexecutiontraceotelresponse.py @@ -36,6 +36,8 @@ class WorkflowExecutionTraceOTelResponseTypedDict(TypedDict): r"""The data source of the trace""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" otel_trace_id: NotRequired[Nullable[str]] @@ -72,6 +74,9 @@ class WorkflowExecutionTraceOTelResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @@ -86,6 +91,7 @@ def serialize_model(self, handler): optional_fields = set( [ "parent_execution_id", + "run_id", "total_duration_ms", "otel_trace_id", "otel_trace_data", @@ -94,6 +100,7 @@ def serialize_model(self, handler): nullable_fields = set( [ "parent_execution_id", + "run_id", "status", "end_time", "total_duration_ms", diff --git a/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py b/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py index e288146d..1957662c 100644 --- a/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py +++ b/src/mistralai/client/models/workflowexecutiontracesummaryattributesvalues.py @@ -2,16 +2,17 @@ # @generated-id: 5e3448a39a40 from __future__ import annotations -from typing import Union +from typing import Any, List, Union from typing_extensions import TypeAliasType WorkflowExecutionTraceSummaryAttributesValuesTypedDict = TypeAliasType( "WorkflowExecutionTraceSummaryAttributesValuesTypedDict", - Union[str, int, float, bool], + Union[str, int, float, bool, List[Any]], ) WorkflowExecutionTraceSummaryAttributesValues = TypeAliasType( - "WorkflowExecutionTraceSummaryAttributesValues", Union[str, int, float, bool] + "WorkflowExecutionTraceSummaryAttributesValues", + Union[str, int, float, bool, List[Any]], ) diff --git a/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py b/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py index d2cc7c6b..92e9a2a7 100644 --- a/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py +++ b/src/mistralai/client/models/workflowexecutiontracesummaryresponse.py @@ -37,6 +37,8 @@ class WorkflowExecutionTraceSummaryResponseTypedDict(TypedDict): r"""The result of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" span_tree: NotRequired[Nullable[WorkflowExecutionTraceSummarySpanTypedDict]] @@ -68,6 +70,9 @@ class WorkflowExecutionTraceSummaryResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @@ -76,10 +81,13 @@ class WorkflowExecutionTraceSummaryResponse(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms", "span_tree"]) + optional_fields = set( + ["parent_execution_id", "run_id", "total_duration_ms", "span_tree"] + ) nullable_fields = set( [ "parent_execution_id", + "run_id", "status", "end_time", "total_duration_ms", diff --git a/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py b/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py index 082653c8..5e7fe852 100644 --- a/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py +++ b/src/mistralai/client/models/workflowexecutionwithoutresultresponse.py @@ -30,6 +30,8 @@ class WorkflowExecutionWithoutResultResponseTypedDict(TypedDict): r"""The end time of the workflow execution, if available""" parent_execution_id: NotRequired[Nullable[str]] r"""The parent execution ID of the workflow execution""" + run_id: NotRequired[Nullable[str]] + r"""The unique run identifier (database UUID)""" total_duration_ms: NotRequired[Nullable[int]] r"""The total duration of the trace in milliseconds""" @@ -56,14 +58,17 @@ class WorkflowExecutionWithoutResultResponse(BaseModel): parent_execution_id: OptionalNullable[str] = UNSET r"""The parent execution ID of the workflow execution""" + run_id: OptionalNullable[str] = UNSET + r"""The unique run identifier (database UUID)""" + total_duration_ms: OptionalNullable[int] = UNSET r"""The total duration of the trace in milliseconds""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["parent_execution_id", "total_duration_ms"]) + optional_fields = set(["parent_execution_id", "run_id", "total_duration_ms"]) nullable_fields = set( - ["parent_execution_id", "status", "end_time", "total_duration_ms"] + ["parent_execution_id", "run_id", "status", "end_time", "total_duration_ms"] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowwithworkerstatus.py b/src/mistralai/client/models/workflowwithworkerstatus.py index 7f469007..81030e21 100644 --- a/src/mistralai/client/models/workflowwithworkerstatus.py +++ b/src/mistralai/client/models/workflowwithworkerstatus.py @@ -37,6 +37,8 @@ class WorkflowWithWorkerStatusTypedDict(TypedDict): r"""Whether the workflow is available in chat assistant""" is_technical: NotRequired[bool] r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: NotRequired[bool] + r"""Whether the workflow must run associated to a user's identity""" archived: NotRequired[bool] r"""Whether the workflow is archived""" @@ -74,6 +76,9 @@ class WorkflowWithWorkerStatus(BaseModel): is_technical: Optional[bool] = False r"""Whether the workflow is technical (e.g. SDK-managed)""" + on_behalf_of: Optional[bool] = False + r"""Whether the workflow must run associated to a user's identity""" + archived: Optional[bool] = False r"""Whether the workflow is archived""" @@ -85,6 +90,7 @@ def serialize_model(self, handler): "shared_namespace", "available_in_chat_assistant", "is_technical", + "on_behalf_of", "archived", ] ) diff --git a/src/mistralai/client/rag.py b/src/mistralai/client/rag.py new file mode 100644 index 00000000..091b0270 --- /dev/null +++ b/src/mistralai/client/rag.py @@ -0,0 +1,25 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2c2b641de1b6 + +from .basesdk import BaseSDK +from .sdkconfiguration import SDKConfiguration +from mistralai.client.ingestion_pipeline_configurations import ( + IngestionPipelineConfigurations, +) +from typing import Optional + + +class Rag(BaseSDK): + ingestion_pipeline_configurations: IngestionPipelineConfigurations + + def __init__( + self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None + ) -> None: + BaseSDK.__init__(self, sdk_config, parent_ref=parent_ref) + self.sdk_configuration = sdk_config + self._init_sdks() + + def _init_sdks(self): + self.ingestion_pipeline_configurations = IngestionPipelineConfigurations( + self.sdk_configuration, parent_ref=self.parent_ref + ) diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 08394802..031564ad 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -23,6 +23,7 @@ def list_runs( models.ListRunsV1WorkflowsRunsGetStatusTypedDict, ] ] = UNSET, + user_id: OptionalNullable[str] = UNSET, page_size: Optional[int] = 50, next_page_token: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -35,6 +36,7 @@ def list_runs( :param workflow_identifier: Filter by workflow name or id :param search: Search by workflow name, display name or id :param status: Filter by workflow status + :param user_id: Filter by user id. Use 'current' to filter by the authenticated user :param page_size: Number of items per page :param next_page_token: Token for the next page of results :param retries: Override the default retry configuration for this method @@ -59,6 +61,7 @@ def list_runs( workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_page_token, ) @@ -125,6 +128,7 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_cursor, retries=retries, @@ -166,6 +170,7 @@ async def list_runs_async( models.ListRunsV1WorkflowsRunsGetStatusTypedDict, ] ] = UNSET, + user_id: OptionalNullable[str] = UNSET, page_size: Optional[int] = 50, next_page_token: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -178,6 +183,7 @@ async def list_runs_async( :param workflow_identifier: Filter by workflow name or id :param search: Search by workflow name, display name or id :param status: Filter by workflow status + :param user_id: Filter by user id. Use 'current' to filter by the authenticated user :param page_size: Number of items per page :param next_page_token: Token for the next page of results :param retries: Override the default retry configuration for this method @@ -202,6 +208,7 @@ async def list_runs_async( workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_page_token, ) @@ -273,6 +280,7 @@ async def empty_result(): workflow_identifier=workflow_identifier, search=search, status=status, + user_id=user_id, page_size=page_size, next_page_token=next_cursor, retries=retries, diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py index 4c3aafd5..9b4eacf0 100644 --- a/src/mistralai/client/speech.py +++ b/src/mistralai/client/speech.py @@ -23,9 +23,7 @@ def complete( *, input: str, model: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, stream: Union[Literal[False], None] = None, voice_id: OptionalNullable[str] = UNSET, ref_audio: OptionalNullable[str] = UNSET, @@ -59,9 +57,7 @@ def complete( *, input: str, model: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, stream: Literal[True], voice_id: OptionalNullable[str] = UNSET, ref_audio: OptionalNullable[str] = UNSET, @@ -94,9 +90,7 @@ def complete( *, input: str, model: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, stream: Optional[bool] = False, voice_id: OptionalNullable[str] = UNSET, ref_audio: OptionalNullable[str] = UNSET, @@ -138,9 +132,7 @@ def complete( request = models.SpeechRequest( model=model, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, stream=stream, voice_id=voice_id, ref_audio=ref_audio, @@ -227,9 +219,7 @@ async def complete_async( *, input: str, model: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, stream: Union[Literal[False], None] = None, voice_id: OptionalNullable[str] = UNSET, ref_audio: OptionalNullable[str] = UNSET, @@ -263,9 +253,7 @@ async def complete_async( *, input: str, model: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, stream: Literal[True], voice_id: OptionalNullable[str] = UNSET, ref_audio: OptionalNullable[str] = UNSET, @@ -298,9 +286,7 @@ async def complete_async( *, input: str, model: OptionalNullable[str] = UNSET, - metadata: OptionalNullable[ - Union[models.MetadataDict, models.MetadataDictTypedDict] - ] = UNSET, + metadata: OptionalNullable[Dict[str, Any]] = UNSET, stream: Optional[bool] = False, voice_id: OptionalNullable[str] = UNSET, ref_audio: OptionalNullable[str] = UNSET, @@ -342,9 +328,7 @@ async def complete_async( request = models.SpeechRequest( model=model, - metadata=utils.get_pydantic_model( - metadata, OptionalNullable[models.MetadataDict] - ), + metadata=metadata, stream=stream, voice_id=voice_id, ref_audio=ref_audio, diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py index c4f1a71e..b95fd11d 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -2,6 +2,7 @@ # @generated-id: ab76b1377d79 from .basesdk import BaseSDK +import httpx from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext from mistralai.client.types import OptionalNullable, UNSET @@ -1069,7 +1070,7 @@ def get_sample_audio( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> str: + ) -> httpx.Response: r"""Get voice sample audio Get the audio sample for a voice @@ -1107,7 +1108,7 @@ def get_sample_audio( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="audio/wav", http_headers=http_headers, security=self.sdk_configuration.security, allow_empty_value=None, @@ -1134,17 +1135,19 @@ def get_sample_audio( ), request=req, error_status_codes=["422", "4XX", "5XX"], + stream=True, retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(str, http_res) + if utils.match_response(http_res, "200", "audio/wav"): + return http_res if utils.match_response(http_res, "422", "application/json"): + http_res_text = utils.stream_to_text(http_res) response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res + errors.HTTPValidationErrorData, http_res, http_res_text ) - raise errors.HTTPValidationError(response_data, http_res) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1152,7 +1155,8 @@ def get_sample_audio( http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) - raise errors.SDKError("Unexpected response received", http_res) + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) async def get_sample_audio_async( self, @@ -1162,7 +1166,7 @@ async def get_sample_audio_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> str: + ) -> httpx.Response: r"""Get voice sample audio Get the audio sample for a voice @@ -1200,7 +1204,7 @@ async def get_sample_audio_async( request_has_path_params=True, request_has_query_params=True, user_agent_header="user-agent", - accept_header_value="application/json", + accept_header_value="audio/wav", http_headers=http_headers, security=self.sdk_configuration.security, allow_empty_value=None, @@ -1227,17 +1231,19 @@ async def get_sample_audio_async( ), request=req, error_status_codes=["422", "4XX", "5XX"], + stream=True, retry_config=retry_config, ) response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(str, http_res) + if utils.match_response(http_res, "200", "audio/wav"): + return http_res if utils.match_response(http_res, "422", "application/json"): + http_res_text = await utils.stream_to_text_async(http_res) response_data = unmarshal_json_response( - errors.HTTPValidationErrorData, http_res + errors.HTTPValidationErrorData, http_res, http_res_text ) - raise errors.HTTPValidationError(response_data, http_res) + raise errors.HTTPValidationError(response_data, http_res, http_res_text) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -1245,4 +1251,5 @@ async def get_sample_audio_async( http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) - raise errors.SDKError("Unexpected response received", http_res) + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("Unexpected response received", http_res, http_res_text) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index fa53cc17..163f2031 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -310,7 +310,7 @@ def get_workflows( :param active_only: Whether to only return active workflows :param include_shared: Whether to include shared workflows - :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param available_in_chat_assistant: Whether to only return workflows available in chat assistant :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all :param cursor: The cursor for pagination :param limit: The maximum number of workflows to return @@ -450,7 +450,7 @@ async def get_workflows_async( :param active_only: Whether to only return active workflows :param include_shared: Whether to include shared workflows - :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param available_in_chat_assistant: Whether to only return workflows available in chat assistant :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all :param cursor: The cursor for pagination :param limit: The maximum number of workflows to return @@ -604,7 +604,7 @@ def get_workflow_registrations( :param workflow_search: The workflow name to filter by :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all :param with_workflow: Whether to include the workflow definition - :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param available_in_chat_assistant: Whether to only return workflows available in chat assistant :param limit: The maximum number of workflows versions to return :param cursor: The cursor for pagination :param retries: Override the default retry configuration for this method @@ -724,7 +724,7 @@ async def get_workflow_registrations_async( :param workflow_search: The workflow name to filter by :param archived: Filter by archived state. False=exclude archived, True=only archived, None=include all :param with_workflow: Whether to include the workflow definition - :param available_in_chat_assistant: Whether to only return workflows compatible with chat assistant + :param available_in_chat_assistant: Whether to only return workflows available in chat assistant :param limit: The maximum number of workflows versions to return :param cursor: The cursor for pagination :param retries: Override the default retry configuration for this method @@ -829,6 +829,7 @@ def execute_workflow( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -845,6 +846,7 @@ def execute_workflow( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -876,6 +878,7 @@ def execute_workflow( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), @@ -960,6 +963,7 @@ async def execute_workflow_async( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -976,6 +980,7 @@ async def execute_workflow_async( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1007,6 +1012,7 @@ async def execute_workflow_async( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), @@ -1094,6 +1100,7 @@ def execute_workflow_registration( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1110,6 +1117,7 @@ def execute_workflow_registration( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1141,6 +1149,7 @@ def execute_workflow_registration( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), @@ -1228,6 +1237,7 @@ async def execute_workflow_registration_async( wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, + extensions: OptionalNullable[Dict[str, Any]] = UNSET, task_queue: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -1244,6 +1254,7 @@ async def execute_workflow_registration_async( :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: + :param extensions: Plugin-specific data to propagate into WorkflowContext.extensions at execution time. :param task_queue: Deprecated. Use deployment_name instead. :param deployment_name: Name of the deployment to route this execution to :param retries: Override the default retry configuration for this method @@ -1275,6 +1286,7 @@ async def execute_workflow_registration_async( wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, + extensions=extensions, task_queue=task_queue, deployment_name=deployment_name, ), diff --git a/uv.lock b/uv.lock index 636bfa04..1b081d98 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.0" +version = "2.4.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 5d8199d2df820e8e3b70c3453ba3f51ef2ccd1c3 Mon Sep 17 00:00:00 2001 From: Peter Evers Date: Thu, 23 Apr 2026 13:32:17 +0200 Subject: [PATCH 55/82] feat: add workflow connector integration (#499) --- src/mistralai/extra/workflows/__init__.py | 16 ++ .../extra/workflows/connector_auth.py | 262 ++++++++++++++++++ .../extra/workflows/connector_slot.py | 62 +++++ 3 files changed, 340 insertions(+) create mode 100644 src/mistralai/extra/workflows/connector_auth.py create mode 100644 src/mistralai/extra/workflows/connector_slot.py diff --git a/src/mistralai/extra/workflows/__init__.py b/src/mistralai/extra/workflows/__init__.py index 08b4b4fa..f26edf4e 100644 --- a/src/mistralai/extra/workflows/__init__.py +++ b/src/mistralai/extra/workflows/__init__.py @@ -1,3 +1,13 @@ +from .connector_auth import ( + ConnectorAuthTaskState, + execute_with_connector_auth_async, +) +from .connector_slot import ( + ConnectorBindings, + ConnectorExtension, + ConnectorSlot, + WorkflowExtensions, +) from .encoding import ( WorkflowEncodingConfig, PayloadOffloadingConfig, @@ -11,6 +21,12 @@ ) __all__ = [ + "ConnectorAuthTaskState", + "ConnectorBindings", + "ConnectorExtension", + "ConnectorSlot", + "WorkflowExtensions", + "execute_with_connector_auth_async", "WorkflowEncodingConfig", "PayloadOffloadingConfig", "PayloadEncryptionConfig", diff --git a/src/mistralai/extra/workflows/connector_auth.py b/src/mistralai/extra/workflows/connector_auth.py new file mode 100644 index 00000000..94fd40ad --- /dev/null +++ b/src/mistralai/extra/workflows/connector_auth.py @@ -0,0 +1,262 @@ +"""Helper for executing workflows that require connector OAuth authentication. + +When a workflow uses connectors that need OAuth, it emits ``connector-auth`` +custom task events. This module provides a high-level async function that +automates the handshake: + +1. Start the workflow execution. +2. Stream events, watching for ``connector-auth`` custom task events. +3. When a ``waiting_for_auth`` event arrives, invoke a user-supplied callback. +4. The interceptor polls for credentials server-side and resumes automatically. +5. Return the final execution result once the workflow completes. + +Example:: + + from mistralai import Mistral + from mistralai.extra.workflows import ( + ConnectorAuthTaskState, + ConnectorSlot, + execute_with_connector_auth_async, + ) + + async def prompt_user(state: ConnectorAuthTaskState) -> None: + print(f"Please authenticate: {state.auth_url}") + + gmail = ConnectorSlot(connector_name="gmail") + + client = Mistral(api_key="...") + result = await execute_with_connector_auth_async( + client, + workflow_identifier="my-workflow", + input_data={"query": "summarize my emails"}, + on_auth_required=prompt_user, + connectors=[gmail], + ) +""" + +from __future__ import annotations + +import asyncio +import logging +from typing import ( + TYPE_CHECKING, + Any, + Awaitable, + Callable, + Dict, + Optional, + Sequence, +) + +import httpx +from pydantic import BaseModel + +from mistralai.client.models import ( + CustomTaskStartedResponse, + WorkflowExecutionCanceledResponse, + WorkflowExecutionCompletedResponse, + WorkflowExecutionFailedResponse, + WorkflowExecutionResponse, +) + +from .connector_slot import ConnectorSlot, WorkflowExtensions + +if TYPE_CHECKING: + from mistralai.client.sdk import Mistral + +logger = logging.getLogger(__name__) + +_TERMINAL_EVENT_TYPES = ( + WorkflowExecutionCompletedResponse, + WorkflowExecutionFailedResponse, + WorkflowExecutionCanceledResponse, +) + +_MAX_RECONNECT_ATTEMPTS = 10 + + +class ConnectorAuthTaskState(BaseModel): + """State emitted by a ``connector_auth`` custom task when it needs OAuth. + + Attributes: + connector_name: Identifier of the connector requiring authentication. + connector_id: Server-side connector ID. + credentials_name: Optional named credential set used for this connector. + auth_url: URL the user should visit to complete authentication. + message: Optional human-readable context about the auth request. + """ + + connector_name: str + connector_id: str + credentials_name: Optional[str] = None + auth_url: Optional[str] = None + message: Optional[str] = None + + +async def execute_with_connector_auth_async( + client: Mistral, + workflow_identifier: str, + input_data: Any = None, + *, + on_auth_required: Optional[ + Callable[[ConnectorAuthTaskState], Awaitable[None]] + ] = None, + execution_id: Optional[str] = None, + task_queue: Optional[str] = None, + deployment_name: Optional[str] = None, + connectors: Sequence[ConnectorSlot] = (), + polling_interval: float = 2, + max_polling_attempts: Optional[int] = None, +) -> WorkflowExecutionResponse: + """Execute a workflow, automatically handling connector OAuth flows. + + Args: + client: An initialised :class:`Mistral` client. + workflow_identifier: Name or ID of the workflow to execute. + input_data: Input payload for the workflow. Pydantic models are + serialised via ``model_dump(mode="json")``. + on_auth_required: Async callback invoked when a connector needs + the user to authenticate. Receives a + :class:`ConnectorAuthTaskState` whose ``auth_url`` field + contains the OAuth URL. The workflow resumes automatically + after this callback returns. + execution_id: Optional custom execution ID. + task_queue: Optional task queue name (deprecated upstream). + deployment_name: Optional deployment target. + connectors: Typed connector slots that declare which connectors + the workflow needs. + polling_interval: Seconds between status polls after the event + stream ends. + max_polling_attempts: Maximum number of polling iterations before + raising :class:`TimeoutError`. ``None`` means poll forever. + + Returns: + The completed :class:`WorkflowExecutionResponse`. + + Raises: + RuntimeError: If the workflow finishes with a non-COMPLETED status. + TimeoutError: If *max_polling_attempts* is set and exceeded. + """ + extensions = ( + WorkflowExtensions.from_connectors(connectors).to_dict() if connectors else None + ) + + execute_kwargs: Dict[str, Any] = dict( + workflow_identifier=workflow_identifier, + input=input_data, + execution_id=execution_id, + task_queue=task_queue, + deployment_name=deployment_name, + ) + if extensions is not None: + execute_kwargs["extensions"] = extensions + + execution = await client.workflows.execute_workflow_async(**execute_kwargs) + exec_id = execution.execution_id + + await _stream_and_handle_auth(client, exec_id, on_auth_required) + + return await _poll_until_done( + client, exec_id, polling_interval, max_polling_attempts + ) + + +# --------------------------------------------------------------------------- +# Internal helpers +# --------------------------------------------------------------------------- + + +async def _stream_and_handle_auth( + client: Mistral, + exec_id: str, + on_auth_required: Optional[Callable[[ConnectorAuthTaskState], Awaitable[None]]], +) -> None: + """Stream workflow events, handling connector-auth tasks. + + Reconnects automatically with exponential back-off when the SSE + connection drops. + """ + last_seq = 0 + + for attempt in range(_MAX_RECONNECT_ATTEMPTS): + try: + event_stream = await client.workflows.events.get_stream_events_async( + root_workflow_exec_id=exec_id, + workflow_exec_id="*", + parent_workflow_exec_id="*", + start_seq=last_seq, + ) + async with event_stream: + async for sse_event in event_stream: + if sse_event.data is None: + continue + + payload = sse_event.data + last_seq = payload.broker_sequence + 1 + event = payload.data + + if isinstance(event, _TERMINAL_EVENT_TYPES): + return + + if not isinstance(event, CustomTaskStartedResponse): + continue + if event.attributes.custom_task_type != "connector_auth": + continue + + payload_value = ( + event.attributes.payload.value + if event.attributes.payload is not None + else None + ) + if not isinstance(payload_value, dict): + continue + + state = ConnectorAuthTaskState.model_validate(payload_value) + + if on_auth_required: + await on_auth_required(state) + + # The interceptor polls for credentials server-side — + # no signal or update needed from the client. + else: + # Stream exhausted without a terminal event — retry. + continue + except (ConnectionError, httpx.RemoteProtocolError): + logger.debug( + "Event stream connection lost, reconnecting " + "(execution_id=%s, attempt=%d)", + exec_id, + attempt, + ) + await asyncio.sleep(min(2**attempt, 30)) + else: + logger.warning( + "Exhausted %d reconnect attempts for event stream (execution_id=%s)", + _MAX_RECONNECT_ATTEMPTS, + exec_id, + ) + + +async def _poll_until_done( + client: Mistral, + exec_id: str, + polling_interval: float, + max_attempts: Optional[int], +) -> WorkflowExecutionResponse: + """Poll the execution status until it reaches a terminal state.""" + attempts = 0 + while True: + result = await client.workflows.executions.get_workflow_execution_async( + execution_id=exec_id, + ) + if result.status != "RUNNING": + if result.status == "COMPLETED": + return result + raise RuntimeError(f"Workflow failed with status: {result.status}") + + attempts += 1 + if max_attempts is not None and attempts >= max_attempts: + raise TimeoutError( + f"Workflow still running after {max_attempts} polling attempts" + ) + await asyncio.sleep(polling_interval) diff --git a/src/mistralai/extra/workflows/connector_slot.py b/src/mistralai/extra/workflows/connector_slot.py new file mode 100644 index 00000000..7287cf32 --- /dev/null +++ b/src/mistralai/extra/workflows/connector_slot.py @@ -0,0 +1,62 @@ +"""Typed descriptors for connector dependencies and extensions.""" + +from __future__ import annotations + +from typing import Any, Dict, List, Optional, Sequence + +from pydantic import BaseModel + + +class ConnectorSlot(BaseModel): + """A declared connector dependency for a workflow execution. + + Mirrors the server-side ``ConnectorSlot`` from the workflow SDK plugin, + providing a typed interface for specifying connector bindings instead of + raw ``Dict[str, Any]`` extension dicts. + + Example:: + + from mistralai.extra.workflows import ConnectorSlot + + gmail = ConnectorSlot(connector_name="gmail") + notion = ConnectorSlot(connector_name="notion", credentials_name="work-account") + """ + + connector_name: str + credentials_name: Optional[str] = None + + +class ConnectorBindings(BaseModel): + """Container for a list of connector bindings.""" + + bindings: List[ConnectorSlot] + + +class ConnectorExtension(BaseModel): + """Mistral-specific extension carrying connector configuration.""" + + connectors: ConnectorBindings + + +class WorkflowExtensions(BaseModel): + """Top-level extensions dict passed to the workflow execution API. + + Serialises to the shape expected by the API:: + + {"mistralai": {"connectors": {"bindings": [...]}}} + """ + + mistralai: ConnectorExtension + + @classmethod + def from_connectors(cls, connectors: Sequence[ConnectorSlot]) -> WorkflowExtensions: + """Build extensions from a sequence of connector slots.""" + return cls( + mistralai=ConnectorExtension( + connectors=ConnectorBindings(bindings=list(connectors)) + ) + ) + + def to_dict(self) -> Dict[str, Any]: + """Serialise to the ``Dict[str, Any]`` the API expects.""" + return self.model_dump(mode="json", exclude_none=True) From 19e24ee3ea420f017e477b1f184a3551c8f8ad68 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 17:08:00 +0200 Subject: [PATCH 56/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.4.2=20(#501)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.beta.observability.chat_completion_events.search()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️) * `mistral.beta.observability.chat_completion_events.fetch()`: `response.extra_fields.Map.union(Map)` **Added** (Breaking ⚠️) * `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️) * `mistral.beta.observability.campaigns.list_events()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️) * `mistral.workflows.execute_workflow_registration()`: `request.encoded_input` **Removed** (Breaking ⚠️) * `mistral.workflows.execute_workflow()`: `request.encoded_input` **Removed** (Breaking ⚠️) * `mistral.chat.complete()`: `request.prompt_cache_key` **Added** * `mistral.beta.connectors.update()`: * `request.title` **Added** * `response.title` **Added** * `mistral.beta.connectors.get()`: `response.title` **Added** * `mistral.chat.stream()`: `request.prompt_cache_key` **Added** * `mistral.fim.complete()`: `request.prompt_cache_key` **Added** * `mistral.fim.stream()`: `request.prompt_cache_key` **Added** * `mistral.agents.complete()`: `request.prompt_cache_key` **Added** * `mistral.agents.stream()`: `request.prompt_cache_key` **Added** * `mistral.beta.connectors.list()`: `response.items[].title` **Added** * `mistral.beta.connectors.create()`: * `request.title` **Added** * `response.title` **Added** * chore: align pyproject.toml and uv.lock to version 2.4.2 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 222 +++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- docs/models/agentscompletionrequest.md | 1 + docs/models/agentscompletionstreamrequest.md | 1 + docs/models/authenticationconfiguration.md | 10 +- docs/models/chatcompletioneventextrafields.md | 6 + .../chatcompletioneventpreviewextrafields.md | 6 + docs/models/chatcompletionrequest.md | 1 + docs/models/chatcompletionstreamrequest.md | 1 + docs/models/connector.md | 1 + ...torlistorganizationcredentialsv1request.md | 10 +- .../connectorlistusercredentialsv1request.md | 10 +- ...nectorlistworkspacecredentialsv1request.md | 10 +- docs/models/createconnectorrequest.md | 1 + docs/models/credentialsresponse.md | 2 +- docs/models/fimcompletionrequest.md | 3 +- docs/models/fimcompletionstreamrequest.md | 3 +- ...ntype.md => outboundauthenticationtype.md} | 6 +- docs/models/publicauthenticationmethod.md | 2 +- docs/models/updateconnectorrequest.md | 1 + docs/models/workflowexecutionrequest.md | 1 - docs/sdks/agents/README.md | 2 + docs/sdks/chat/README.md | 2 + docs/sdks/connectors/README.md | 38 +-- docs/sdks/fim/README.md | 2 + docs/sdks/workflows/README.md | 2 - pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/agents.py | 12 + src/mistralai/client/chat.py | 12 + src/mistralai/client/connectors.py | 24 +- src/mistralai/client/fim.py | 12 + src/mistralai/client/models/__init__.py | 6 +- .../client/models/agentscompletionrequest.py | 5 + .../models/agentscompletionstreamrequest.py | 5 + .../models/authenticationconfiguration.py | 6 +- .../client/models/chatcompletionevent.py | 5 +- .../models/chatcompletioneventpreview.py | 4 +- .../client/models/chatcompletionrequest.py | 5 + .../models/chatcompletionstreamrequest.py | 5 + src/mistralai/client/models/connector.py | 7 +- ...ctor_list_organization_credentials_v1op.py | 6 +- .../connector_list_user_credentials_v1op.py | 6 +- ...nnector_list_workspace_credentials_v1op.py | 6 +- .../client/models/createconnectorrequest.py | 11 +- .../client/models/credentialsresponse.py | 8 +- .../client/models/fimcompletionrequest.py | 5 + .../models/fimcompletionstreamrequest.py | 5 + ...ntype.py => outboundauthenticationtype.py} | 4 +- .../models/publicauthenticationmethod.py | 6 +- .../client/models/updateconnectorrequest.py | 7 + .../client/models/workflowexecutionrequest.py | 8 - src/mistralai/client/workflows.py | 28 --- uv.lock | 2 +- 56 files changed, 341 insertions(+), 243 deletions(-) rename docs/models/{authenticationtype.md => outboundauthenticationtype.md} (61%) rename src/mistralai/client/models/{authenticationtype.py => outboundauthenticationtype.py} (81%) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 80ccb08d..76ab1480 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: fc508a5073d9d5561c97eb925d18d390 + docChecksum: 9d4e4682cf86aedc4f41751bdd0b0210 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.1 - configChecksum: 4a73cb94d9298b52588a00f50ab463b8 + releaseVersion: 2.4.2 + configChecksum: 864896ca5e5ed293f202b5fdd2c4f3a6 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 05db87ae-2691-45ee-bf0d-0f614e1c2c90 - pristine_commit_hash: af16606e009057f7fac9b1a43361f448562372b8 - pristine_tree_hash: fa4e1ee8a8c7340bf200d5a2f5465e0b80674b8c + generation_id: a5e61542-697b-42f4-9e58-06e7ae421c04 + pristine_commit_hash: 753f7e09c139aaacfbf0e4ae6767bc7d3651ef7c + pristine_tree_hash: 5116684d7dd290dba1b18e9313065b62d74025ba features: python: acceptHeaders: 3.0.0 @@ -220,8 +220,8 @@ trackedFiles: pristine_git_object: 7548286af5d1db51fbfd29c893eb8afdc3c97c4d docs/models/agentscompletionrequest.md: id: 906b82c214dc - last_write_checksum: sha1:6255ed17fdd14df3aec90e3a85b8310394455f16 - pristine_git_object: 0c3fe986f4c89a4e39fdc313fb9e130eef45dbf8 + last_write_checksum: sha1:972940e9ba4133d7956167a071733751e2120bbd + pristine_git_object: 3253fee1b9cb5608cdd7c261e1b65895d3d3f7f9 docs/models/agentscompletionrequestmessage.md: id: 5337f0644b40 last_write_checksum: sha1:ecf7b7cdf0d24a5e97b520366cf816b8731734bb @@ -240,8 +240,8 @@ trackedFiles: pristine_git_object: 63b9dca9fbb8d829f93d8327a77fbc385a846c76 docs/models/agentscompletionstreamrequest.md: id: 21d09756447b - last_write_checksum: sha1:4d15beaae8938de66d28e0ce3f4e370d78bbac94 - pristine_git_object: 4111877d33cb383697dcd8fe9b7a2362175b4ec1 + last_write_checksum: sha1:286562c88d085a713d100aaaaec82254fc44d96c + pristine_git_object: 29659238932a07f23da8a3a0d469927e4451af07 docs/models/agentscompletionstreamrequestmessage.md: id: b309ade92081 last_write_checksum: sha1:98744c9646969250242cbbfbdf428dbd7030e4bb @@ -340,12 +340,8 @@ trackedFiles: pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 docs/models/authenticationconfiguration.md: id: b470496ac0ad - last_write_checksum: sha1:5895ae27addf9e917660902384d24f48fccfaf79 - pristine_git_object: 081649ea299f852f14b57da69473ab4920a02e4a - docs/models/authenticationtype.md: - id: fc252db73e2a - last_write_checksum: sha1:2f600847a29462d970d753fce461e9e62bc47902 - pristine_git_object: 498bfeaae0b154d448712b8e27cce56750dcec2d + last_write_checksum: sha1:650e1e889d037f79a87c8ab0a679e245c2ddbb4b + pristine_git_object: 6644875efdc48b462a98193b391dc23e1f31b2c3 docs/models/authorization.md: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e @@ -432,20 +428,20 @@ trackedFiles: pristine_git_object: 500192f661b0657f594f85da4d38896954426db5 docs/models/chatcompletioneventextrafields.md: id: 686e5af33206 - last_write_checksum: sha1:1f9951574bf3f554beb8b1273af5fa7cf3c6381e - pristine_git_object: c2b7f855e76a35a3f61d7f11c7488245d8d99707 + last_write_checksum: sha1:1e967d85aa59349a84245be37fa627890f51162d + pristine_git_object: d63b251dc62850c425a889881eda8272e0699543 docs/models/chatcompletioneventpreview.md: id: 89dcfcc3bd32 last_write_checksum: sha1:ea5a4776fd299a1c8208392e54061615ddb19ad2 pristine_git_object: 855e8ab0ccf2851aad23067cc6386211bd1e80f0 docs/models/chatcompletioneventpreviewextrafields.md: id: 6562107fac56 - last_write_checksum: sha1:5bd3841a27c41dcc345a216e36b2bd1f90596d24 - pristine_git_object: dd2138278eb73abffc15fdc2583fe61c6c1f17d1 + last_write_checksum: sha1:2c5107faed8463f40d265da2e0907fb24d854ef4 + pristine_git_object: 5bcec6a085b8fe921efb44ab5f040faf99cff7a3 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:220052fe029ddec558a0dd826aef80bfe9a2d047 - pristine_git_object: 6d1fab76894ea1e9964fcc3b5e736f64b8377115 + last_write_checksum: sha1:3e240059856e4445d9b76934806b172021174889 + pristine_git_object: ad1b3d3912f04750172ebb0c5776215b716b96f9 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -468,8 +464,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:889cabc5347782584b1744eb6579e6aac66f8619 - pristine_git_object: a2796df2ee429c51f80c54e5cbc74fcf2c994e28 + last_write_checksum: sha1:0d243eb67aa8e905e88463d9b745bda2030d415c + pristine_git_object: 7288c818d03f0c672d99a2c61ea19cce4fd39654 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -648,8 +644,8 @@ trackedFiles: pristine_git_object: 7e89239996c86952aa3ddf7520c0a73858b31725 docs/models/connector.md: id: cbf7c2c53983 - last_write_checksum: sha1:f176fd1e55ba030a3b5bc0881a0c6c5023f3c46d - pristine_git_object: a0107820b8fdd26474f6e0d48280e5b6d713f7e3 + last_write_checksum: sha1:933fcdfbded00c65d36e46d6b2e18e56540802fe + pristine_git_object: 29f8ad0771bf8da6999345b78322001c3821a6ca docs/models/connectorauthenticationheader.md: id: bb5e842caa63 last_write_checksum: sha1:7c721f916ed1ce2d4155734bb8190e11de6bf4ac @@ -704,24 +700,24 @@ trackedFiles: pristine_git_object: c45148b97aad128744e0e6ccebb00bf22d400eff docs/models/connectorlistorganizationcredentialsv1request.md: id: cc1870566c72 - last_write_checksum: sha1:9f5c605b6bd07b3e9ffac5ae5e61e97e00ea4464 - pristine_git_object: bb1f1c3a5c0fe7d307951c9179c13192f19afb8b + last_write_checksum: sha1:633bb13df6fa25f746a9aa905da3f3beb75ff91a + pristine_git_object: 53ce36db49acb994ac1bbc6899d50035409a13f4 docs/models/connectorlisttoolsv1request.md: id: 43698382d3c4 last_write_checksum: sha1:e2ec4a2b6b595941890d400817ca38f996a441e8 pristine_git_object: e9c2137429509ea9edf43a5f9329208103c2bd11 docs/models/connectorlistusercredentialsv1request.md: id: 721da447813a - last_write_checksum: sha1:ef52fd446896bc737782e5c17e2051dbeda4f0f1 - pristine_git_object: 63ec93d546bbfe15823c161af79dcde0b1552b25 + last_write_checksum: sha1:b6a1ed55ec98439880f0a5274df2a6d3ac6c009d + pristine_git_object: 2c9547d51753c63f68fd8919e83ae26e38aa7748 docs/models/connectorlistv1request.md: id: 68b7a11faff6 last_write_checksum: sha1:e08effc0f17a95383c3ba96b06b1dba80f4dc767 pristine_git_object: 6b9a287ead2996c402ade5c18368eaff92c76b2a docs/models/connectorlistworkspacecredentialsv1request.md: id: c7f5827917c6 - last_write_checksum: sha1:63d4585f79ff1144e691b48ceada5d76d74b01cb - pristine_git_object: 45e90077d22f6d9caf4a8f9ab1889c5c39c82e53 + last_write_checksum: sha1:dfe772567d14a0552eec2e53ebf9c1ed6c39ab3e + pristine_git_object: 573869b2483b15da829b25e1863652680deb6a36 docs/models/connectorsqueryfilters.md: id: d6fb981cad1e last_write_checksum: sha1:3a33088e1e9332318aff437fba7d01239d417d84 @@ -892,8 +888,8 @@ trackedFiles: pristine_git_object: 2e81d26d19950ef6c1bc7186b8497e1f739e8f0b docs/models/createconnectorrequest.md: id: 7a0ef9d82658 - last_write_checksum: sha1:f536d97ffe5535b0d43f3390d4e90fe0ea74b1e1 - pristine_git_object: 4668e1a61f0b140599e283bf1144b29591df760c + last_write_checksum: sha1:f28eb17d562ab9b881f4c0c640f0b16163ada6dc + pristine_git_object: 111c460a711c1d971a300afda6afe4da608e6d21 docs/models/createdatasetrecordrequest.md: id: e2c8a858a8e6 last_write_checksum: sha1:6848c7398d763f7a046dbb41cda8bc33cbb98230 @@ -944,8 +940,8 @@ trackedFiles: pristine_git_object: c544d7c60332c29fe2c91e8af17282ca689537e2 docs/models/credentialsresponse.md: id: 20dd6478c581 - last_write_checksum: sha1:3150b304dcef82b0f1d18b6a33b48e22899a406e - pristine_git_object: 0cd5b336ca1cb55d54a123c283fdbd957ebb1588 + last_write_checksum: sha1:c87e14ea27c52f670a5bf7e33b5e84180b91ab83 + pristine_git_object: 1c9a8596b0021eeaad2872faa02cc72b85c0d760 docs/models/customconnector.md: id: 7bcc77607afa last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a @@ -1276,8 +1272,8 @@ trackedFiles: pristine_git_object: 4595b82b40fe37dc093bee73a4ffa9c8ac61d77d docs/models/fimcompletionrequest.md: id: b44677ecc293 - last_write_checksum: sha1:87a83a59fb3772ca6c7e60bcef27ca15f349ce46 - pristine_git_object: c0c52b6634c0a12b7e52686875805164d99b4c64 + last_write_checksum: sha1:b8bd917220bec15149c384b70bf2818c83926b49 + pristine_git_object: d25d45f64f081e90cc2fd3a4e5665af7c4184a8b docs/models/fimcompletionrequeststop.md: id: ea5475297a83 last_write_checksum: sha1:a6cdb4bda01ac58016a71f35da48a5d10df11623 @@ -1288,8 +1284,8 @@ trackedFiles: pristine_git_object: cd62d0349503fd8b13582d0ba47ab9cff40f6b28 docs/models/fimcompletionstreamrequest.md: id: c881d7e27637 - last_write_checksum: sha1:3574398ad561e06a8c2c95ffcb1456fe62cf7320 - pristine_git_object: c02b622c7e4113d7ca99ede3d735f17dc2ab26e7 + last_write_checksum: sha1:31cf266310e1f303a4d2c352a8fdd27460f0d281 + pristine_git_object: 15718c7c22b81f3a311023ea9e58d9f77d712d5a docs/models/fimcompletionstreamrequeststop.md: id: c97a11b764e9 last_write_checksum: sha1:958d5087050fdeb128745884ebcf565b4fdc3886 @@ -2110,6 +2106,10 @@ trackedFiles: id: 9e749ed80f72 last_write_checksum: sha1:4f6dd8e684dd11e4856d3d6cf2c0f2e2d1a01640 pristine_git_object: d778621f6b1e6788aecbe25bd741d27a0d863990 + docs/models/outboundauthenticationtype.md: + id: a62ff6260857 + last_write_checksum: sha1:fa53bfaf3b76537c2e044863430db44c41e5f83d + pristine_git_object: a8ddd6241371f24309c4878b4522738fde01d3d5 docs/models/outputcontentchunks.md: id: f7e175c8e002 last_write_checksum: sha1:5094466110028801726cc825e8809f524fe1ee24 @@ -2200,8 +2200,8 @@ trackedFiles: pristine_git_object: 36b58e9aa80a53dad530cad93fb1d565fdd03b59 docs/models/publicauthenticationmethod.md: id: abfb51fdf794 - last_write_checksum: sha1:58c5f7fa4f5ea2eddad8702b87b9af1dd8fa89ac - pristine_git_object: c98413b62ac80443aff52ce344dae41e46012745 + last_write_checksum: sha1:4feb0beeb50cf64ce370882599ae33b6e1676d6c + pristine_git_object: fa568d457c2db542a65cf498e254cda8c9fcf0e6 docs/models/querydefinition.md: id: 4831b7e558f9 last_write_checksum: sha1:f4983c0963906b3eda13c69e2852b08d662dd744 @@ -2816,8 +2816,8 @@ trackedFiles: pristine_git_object: cf590a2fc7f58707855eb0bda2d4b8460bfea800 docs/models/updateconnectorrequest.md: id: 40e38d9c7c2a - last_write_checksum: sha1:183567baed17e6b95628cfe17455e1861fd48758 - pristine_git_object: d6d76631ab4841a1bd6a75a978f4d3837449d7e9 + last_write_checksum: sha1:03a8cd1c8d6415b26cdf592534ba09c022a5414e + pristine_git_object: 335588eac79ddbd851ead9950f3681f7dda90ee3 docs/models/updatedatasetrecordpayloadrequest.md: id: ada11a6c544f last_write_checksum: sha1:220ce1184c9f6b6c6d1e5cdf2dc18197778f7af2 @@ -3016,8 +3016,8 @@ trackedFiles: pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e docs/models/workflowexecutionrequest.md: id: 44a6d9ef046a - last_write_checksum: sha1:7b89fdc9aad5d00d0bdef187cc59dc89377b780f - pristine_git_object: 08b584f940a741d661be0b4c8df114d018c9ccb8 + last_write_checksum: sha1:a7c35ec35e8ba3a3c48c2e27b334ae54abff2ff5 + pristine_git_object: 4b61c7b7fad5d597639122a8b32b7ac3c375d669 docs/models/workflowexecutionresponse.md: id: 73595cfc443f last_write_checksum: sha1:b2aacb271ca655f622ba0c724971620814e0272b @@ -3156,8 +3156,8 @@ trackedFiles: pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:b3208129bbad753f3608a5072ebf5b13a20d8656 - pristine_git_object: 02542a7502f85fd033dffdc5ee106269def51a36 + last_write_checksum: sha1:962df50ddc8aa1f501ad596313ee590ba704ff8a + pristine_git_object: f02ea6cd7f7405763edb09dcece22e65028e8fbb docs/sdks/batchjobs/README.md: id: a3b8043c6336 last_write_checksum: sha1:ecf3800c83f9455471766e0f20a07192e76a736e @@ -3172,8 +3172,8 @@ trackedFiles: pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:6b952de949ea5187cbfd94ce40d4e11ede230082 - pristine_git_object: 484191c3f9a89a819615a452031f893b58651fe6 + last_write_checksum: sha1:839bc022bed585cd691c403333f68ed8b68d1a8c + pristine_git_object: 54b9f02913409dd73b0a0f36f7eab4f7fbcf5791 docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 last_write_checksum: sha1:ae7c0a0e7576a1114a85b9e607cb91c2ac1181a2 @@ -3184,8 +3184,8 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:621a1e3c33c06d38cef7f0c446c8fff3b220f3eb - pristine_git_object: 67005b8f11e68e236e57a5558d4d7a206f9a4fa6 + last_write_checksum: sha1:f4c8a2ee577cae1b8b1e9551bb873bf34fe0f403 + pristine_git_object: 753c1cf3974ff3be77dc3b401d27ec5c0ef8bced docs/sdks/conversations/README.md: id: e22a9d2c5424 last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 @@ -3224,8 +3224,8 @@ trackedFiles: pristine_git_object: 246707073e9dee115d30b20a01bf728dcb43efd7 docs/sdks/fim/README.md: id: 499b227bf6ca - last_write_checksum: sha1:8f6120eef6e5978eca9d219ff62a9c23d61fd55b - pristine_git_object: 134f5388fc4240aaff22667bf6a8a182a92b7c2a + last_write_checksum: sha1:be2db0822c83cec2cfe2b5424d4b08db06d1c63c + pristine_git_object: 7bf8908378c764c58cca2eddc6a4a97574c3709f docs/sdks/finetuningjobs/README.md: id: 03d609f6ebdd last_write_checksum: sha1:2d7ff255c1462d5f1dff617a1993e730ec3911ea @@ -3280,8 +3280,8 @@ trackedFiles: pristine_git_object: 49b8533f85e2c6bf70ff1ea296136f4d18cb8348 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:12d8e73a88f35cef55d739bd243fd1d591a6d8d5 - pristine_git_object: 93ff8660eca16554191d6af5d26eac34ed90a5ed + last_write_checksum: sha1:807551c827dd5936819393e88ff2160839bd01fc + pristine_git_object: 4575977672501a047dcd701dc471e2694d13d294 docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3312,16 +3312,16 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:5052a82368babc34c9e2ea2cb8195df7532cd1a9 - pristine_git_object: e6e50dc030653f0670c788c55cc394e05b47dd7b + last_write_checksum: sha1:4393e3e6f74c2ed5e75e3ff261122e66c7b56cfe + pristine_git_object: 6f1030ba4606181e6bb3be3fa59e9f6539c295a3 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d pristine_git_object: 002f0103547db5107f4646d645b11682e220b955 src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:5f52254eae3323849773938e7e773692e7675f3a - pristine_git_object: a3472b62812218f21e79359fe4e85c7ab578a117 + last_write_checksum: sha1:80c182c157fcd980b657f0060ca7b59ae6b0bf9c + pristine_git_object: 48c7bb995ecd9104e9df55c19fc3ecefcc05c98c src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd @@ -3352,8 +3352,8 @@ trackedFiles: pristine_git_object: 427bef5e086a425aaa14381aba53085681029f3e src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:46d2954900c7819cc5790bf23393dd12bc7b515e - pristine_git_object: 113d145338c040f7d0070420e8ebb818a09f74bc + last_write_checksum: sha1:1c8c0a6001518aa5734b44854f95f8549014a419 + pristine_git_object: 5a1ff0f088a956405f9539247232df4c71c7161c src/mistralai/client/chat_completion_events.py: id: 1813f339625b last_write_checksum: sha1:1e7ed51f7ad879b3cd903d66e52716717142e4a8 @@ -3364,8 +3364,8 @@ trackedFiles: pristine_git_object: 9fd3b3a1b28b155ee397a6edb6da106408c3bade src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:42df853243a50c49ba13da10061dc22cc79e473f - pristine_git_object: 0d1dc703662b401fa56e0e5ee1649292864ada1a + last_write_checksum: sha1:ba16a5809ceb33d368308fab1dbba8324e3a1818 + pristine_git_object: 088d26fd205957f3d8830f78c4b88e88710c99ee src/mistralai/client/conversations.py: id: 40692a878064 last_write_checksum: sha1:12565953aff450ec47afb9cb2523c145ef822b1e @@ -3432,8 +3432,8 @@ trackedFiles: pristine_git_object: 0728e9a29b1703ec98c2e7c9d2984b30c51757fc src/mistralai/client/fim.py: id: 217bea5d701d - last_write_checksum: sha1:94a569cfa91532578c25cbe640ad83785228d548 - pristine_git_object: ba2bd5b5afff3d12d2d6e0c9ac5296eaccf95d56 + last_write_checksum: sha1:ce0a2669b055dd76d690461c5477b85f5971796b + pristine_git_object: 243786b38bd81f07c5fac74eecdfb0cb69348583 src/mistralai/client/fine_tuning.py: id: 5d5079bbd54e last_write_checksum: sha1:fe1f774df4436cc9c2e54ed01a48db573eb813cd @@ -3464,8 +3464,8 @@ trackedFiles: pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:7335a6de194bcfcb61b1411bf37070adc2a9574f - pristine_git_object: efc6e811898d33174d3b81b121287b4df6449b1e + last_write_checksum: sha1:5efc594476b39e675a1fe5bf8210629ab2fdeeaa + pristine_git_object: 1b9d07bb37b59bae830c2f5c56c1ee6d96dc6e6f src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -3600,12 +3600,12 @@ trackedFiles: pristine_git_object: 3186d5df9000d4a62c0fbc64a601e6b709803deb src/mistralai/client/models/agentscompletionrequest.py: id: 3960bc4c545f - last_write_checksum: sha1:d476b63df42077af04072ffc8823a5d0df3e8417 - pristine_git_object: 6b36c59702332065f974b2316bb371b37f387e8c + last_write_checksum: sha1:2f05e7029b2a283e82dd5744f333ced15b7519b9 + pristine_git_object: 55794ea2f7f27c8b2c1946fcee3fbc8887ce5f26 src/mistralai/client/models/agentscompletionstreamrequest.py: id: 1b73f90befc2 - last_write_checksum: sha1:f350bac2b12bf761a1b13e1f258277e7f9064e07 - pristine_git_object: e23442aa525e5baf7931e0d0d3801d91bd313357 + last_write_checksum: sha1:0d00a288f9ca11bcbe75e8f826fb73d8a13d75a2 + pristine_git_object: 5d3bdecd4ff8c2330de59873edfc9a69973a1d58 src/mistralai/client/models/annotations.py: id: 3ae9e07de11d last_write_checksum: sha1:c015e86fa53f60f6fccce2be63b2faf8a6d81f38 @@ -3660,12 +3660,8 @@ trackedFiles: pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe src/mistralai/client/models/authenticationconfiguration.py: id: 97b5056c29fb - last_write_checksum: sha1:731f7ee5fc0fce68a240341f0cf4d7aeb2313475 - pristine_git_object: c2ea5f94b966cb76ed2b20c67d624243d4bd8e71 - src/mistralai/client/models/authenticationtype.py: - id: b403278039c5 - last_write_checksum: sha1:dcd017f2e96b2d8f06a29f3d085e7f1fbc44af16 - pristine_git_object: f5827174101d03c0a2de45139f76c22af7a11b6f + last_write_checksum: sha1:95b12ce07e5656f40d1fcf4566af5336f5279cf3 + pristine_git_object: 84f665915ad716ce97cd9219f59ffa9cefc68bbd src/mistralai/client/models/authurlresponse.py: id: a2b468c87a8a last_write_checksum: sha1:8ffc0c770c51d7b0cb49770e6829486d0cb82741 @@ -3736,24 +3732,24 @@ trackedFiles: pristine_git_object: ab8f331f35e80425590a13948bdab8cadcb4d394 src/mistralai/client/models/chatcompletionevent.py: id: d85484d0205e - last_write_checksum: sha1:b709e6f710b62fee646eb7d12b24d69125522088 - pristine_git_object: 86253f5d97139c8b9043b9d9f2a71aba53b961c0 + last_write_checksum: sha1:065c475704210d080294d1e8585f423127f18b38 + pristine_git_object: bcd6757fde74639463848d39102dfbdb76d09dbb src/mistralai/client/models/chatcompletioneventpreview.py: id: 1cd843828e99 - last_write_checksum: sha1:f42767c2d344bc9cd9431acd7b911c81cafa9bc7 - pristine_git_object: e7fef9d08ca3d8ea1fa1f63c5847a5f8a6d74201 + last_write_checksum: sha1:25eeed82742f43de7e13337c4d9313e9710fde58 + pristine_git_object: 40985f844c72814bc23d3ed1f6869fcf33fb19c2 src/mistralai/client/models/chatcompletionrequest.py: id: 9979805d8c38 - last_write_checksum: sha1:a9252ff419763a8a41a576f3a6801ebe5dc308bd - pristine_git_object: 5bce222f013bd475507623a309e20e0ac0950698 + last_write_checksum: sha1:3211124d52b666c680a614d9c99bf8f4a80af273 + pristine_git_object: ee168c18d6427a745fce5a639c60ce2ae82024b9 src/mistralai/client/models/chatcompletionresponse.py: id: 669d996b8e82 last_write_checksum: sha1:97f164fea881127ac82303e637b6a270e200ac5b pristine_git_object: 7092bbc18425091d111ec998b33edc009ff0931b src/mistralai/client/models/chatcompletionstreamrequest.py: id: 18cb2b2415d4 - last_write_checksum: sha1:908b2feb55dc9c0143584b467d96236e5b2099e3 - pristine_git_object: 7cc7a057132017b06fb8baf16f2531a536649f03 + last_write_checksum: sha1:59663f3b3bd4a17253208e73025a3857e7c9de32 + pristine_git_object: f6ad6a3610ddd57857b3f1019dfde13d8e8e42bc src/mistralai/client/models/chatmoderationrequest.py: id: 057aecb07275 last_write_checksum: sha1:7677494c0e36ccbc201384cb587abeb852a1a924 @@ -3848,8 +3844,8 @@ trackedFiles: pristine_git_object: de461057f967b4dbd746cc82321fbed4afbdf145 src/mistralai/client/models/connector.py: id: 1a4facac922d - last_write_checksum: sha1:86f06a14b64400dc9994b198fd1dff2a2e8ada03 - pristine_git_object: e7b83ed4167acb3bef2d4c985f095ed92d075f91 + last_write_checksum: sha1:dc5989fda6b4a5f49e2e5febae8ebf8ddfc5b33a + pristine_git_object: 9d8b600032db4f260a96140433bce3f7e4c21f3a src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:c4388ac1594641c36f97daaedcf42b0e94753be7 @@ -3896,24 +3892,24 @@ trackedFiles: pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 src/mistralai/client/models/connector_list_organization_credentials_v1op.py: id: a52ee058feab - last_write_checksum: sha1:57cb81c3a5744f83aba43cd35f358e9b0e132c2d - pristine_git_object: a20fa2a4fc5a5809428460a592a81db3b23a8ec5 + last_write_checksum: sha1:2abf099d7a6ea68134d38c3a95dfec08d37e9ed9 + pristine_git_object: 6b37773fb3e7b1b0e999a342709599797d64c558 src/mistralai/client/models/connector_list_tools_v1op.py: id: 4c6ad704479b last_write_checksum: sha1:8af274c0304af97a649137075b4fea4acadeb434 pristine_git_object: 3e9905c30d02fef3e73689b2e8968462dc4b36fa src/mistralai/client/models/connector_list_user_credentials_v1op.py: id: 106e8fba762d - last_write_checksum: sha1:7f706dda1feb8a433370bf28dbe6511825a9ae71 - pristine_git_object: 5b47ee83a1608f0dd5e953a69a0e08b0744bf596 + last_write_checksum: sha1:35c2b9e14c552a6525c7d1baf1bdea509284e939 + pristine_git_object: 5434a2833038b37e0c944330569a3fa0eb295160 src/mistralai/client/models/connector_list_v1op.py: id: 5ec0889995f5 last_write_checksum: sha1:17c0a5965d058a4aacb891d37db3481a907ff091 pristine_git_object: 3cb31bf7fe0b814606b4bbdfbf7e5cbf733984bf src/mistralai/client/models/connector_list_workspace_credentials_v1op.py: id: de7c431e8a54 - last_write_checksum: sha1:f13cfb7cffc9ac054a65657c6cb61a284099e6a1 - pristine_git_object: ef0f096e6c05bc63511bde38317f95572b471b8e + last_write_checksum: sha1:01b9e654b460634000b4975323311dae56c983d4 + pristine_git_object: c610c4c8b4f8c3561c389eb5092023d86ee4767d src/mistralai/client/models/connector_update_v1op.py: id: 6f884d18ac56 last_write_checksum: sha1:be8044958ac76ecfc486dc5cb5f0876e595dcc38 @@ -4028,8 +4024,8 @@ trackedFiles: pristine_git_object: b3957df9ef369ecc1746ee3efd1b463bc10b4be7 src/mistralai/client/models/createconnectorrequest.py: id: 3da192d6491a - last_write_checksum: sha1:dffda28118cdc6e4a30ac7d86cf28a73b77b7fd0 - pristine_git_object: 52ebc0be8a073fbc66143b258db778e7f1a33e80 + last_write_checksum: sha1:21ab6824e52ffb3bd2f97a97b4521188d6725f02 + pristine_git_object: 18060ca33206509d6443e306b8e505c9698ea9c6 src/mistralai/client/models/createdatasetrecordrequest.py: id: 9455e38a8c31 last_write_checksum: sha1:df3e8d7425500f23101c25267738e617eeb2d467 @@ -4064,8 +4060,8 @@ trackedFiles: pristine_git_object: 0766a4d3226231936feb478187cf0de3a7af7d47 src/mistralai/client/models/credentialsresponse.py: id: 80cc6fb316f9 - last_write_checksum: sha1:73099f8280c3e753d693edb24f773112fefa6538 - pristine_git_object: 4c6a41abca469df0d1dcd92858461b07375a06c9 + last_write_checksum: sha1:f5dc920dbfba507188ddfa8a1ba964ab8b5ba755 + pristine_git_object: 5cf9a198ece228642c0147d218ddd6be39825fd4 src/mistralai/client/models/customconnector.py: id: 14f3643f7703 last_write_checksum: sha1:2162c7e4b3a9c747c5da88e72315d138f28dea5d @@ -4372,16 +4368,16 @@ trackedFiles: pristine_git_object: ced355f16abe74ce87d1770cebe761d0b26c35bc src/mistralai/client/models/fimcompletionrequest.py: id: cf3558adc3ab - last_write_checksum: sha1:4c5de51fc8ff8bf07cee739b884c422fea2d1e8c - pristine_git_object: 6b6b1f5259d7d5b7913bd9ccf29f9e037a70656b + last_write_checksum: sha1:ce9f8fa0775c9208ce5a393fdfc9439aabc2bdab + pristine_git_object: 65d132eac878cdb5e025ab34a149f832a6dc5ffe src/mistralai/client/models/fimcompletionresponse.py: id: b860d2ba771e last_write_checksum: sha1:dffd5a7005999340f57eaa94e17b2c82ddc7fd90 pristine_git_object: 1345a116b7855ab4b824cf0369c0a5281e44ea97 src/mistralai/client/models/fimcompletionstreamrequest.py: id: 1d1ee09f1913 - last_write_checksum: sha1:961586040cc53ebbf68a8fccb1c578f697a72f68 - pristine_git_object: 6993807aef51ba425eec3053b3377488a7e952d7 + last_write_checksum: sha1:68ca7eac3aeb3c8b35d9769201111aa078f32bc9 + pristine_git_object: dc7ede38dc81ac74d2e21a7e1de2fffe11295836 src/mistralai/client/models/finetuneablemodeltype.py: id: 05e097395df3 last_write_checksum: sha1:daf4cd1869da582981023dea1074268da071e16a @@ -5070,6 +5066,10 @@ trackedFiles: id: 272b7e1785d5 last_write_checksum: sha1:eb223a88b7e5175056197f64bb4bce2c88ccea19 pristine_git_object: bfd748e0010e6acc404fdadfff40ee54ac52b9be + src/mistralai/client/models/outboundauthenticationtype.py: + id: 705e7172ba40 + last_write_checksum: sha1:ccefdb6371573bd67aa1b567869f4f3dce884714 + pristine_git_object: 39da354ae26d5effad55be0d6541804b5bc2aa40 src/mistralai/client/models/outputcontentchunks.py: id: 9ad9741f4975 last_write_checksum: sha1:afb76f3af2952c2afab5397e348ddfd6dbb56c4f @@ -5148,8 +5148,8 @@ trackedFiles: pristine_git_object: 2c5186c02f6b463c12fd7819637b52c8c7ee4cd7 src/mistralai/client/models/publicauthenticationmethod.py: id: 545ab7f24523 - last_write_checksum: sha1:34851f4831b0bd8fbe4f6f53cdb642d4d0df54b6 - pristine_git_object: 3351b432a777ca2f584040f9f2968ceefa050979 + last_write_checksum: sha1:82c1403b8f1cf8de8efeb278ef2680db89c9c510 + pristine_git_object: 95dde29a95b7b034ae9ffe324e2c9ef6ba426dce src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py: id: 73826dbd3f5b last_write_checksum: sha1:5105618697e031bae45cf9f6d7c5227d9c08f155 @@ -5644,8 +5644,8 @@ trackedFiles: pristine_git_object: 7bb9686b9b542c47ac25fb6780017b5739829b1e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 - last_write_checksum: sha1:cdf3aa496722d84b0a76d52ce76133cfaafb0073 - pristine_git_object: 3540d02bd8e8bf45ba3fe33d0d080510c099ac14 + last_write_checksum: sha1:1a943da5e32a0eec70de5a15b56de278082bbc25 + pristine_git_object: 145091d4ce119383e611d845f52dbb4489b78ddf src/mistralai/client/models/updatedatasetrecordpayloadrequest.py: id: bd45f357a538 last_write_checksum: sha1:774ba70d9f417e84b546b9f4c5c85eb2876dd56d @@ -5796,8 +5796,8 @@ trackedFiles: pristine_git_object: ffebdb82a1a80d1d086b919da9b33e2f090388c4 src/mistralai/client/models/workflowexecutionrequest.py: id: 806340497ed4 - last_write_checksum: sha1:ca40b6f0bc818b277af8a1443b2b728c7a64708e - pristine_git_object: e878b2f4f0eb38d614787ac6d700e70075c3820f + last_write_checksum: sha1:624af9c880e6fff244752469c3681e2913ce3bb7 + pristine_git_object: ea5e752df355fd5a771813a7e5c569539e66c90a src/mistralai/client/models/workflowexecutionresponse.py: id: 758786637be5 last_write_checksum: sha1:1a06785d691c7bdc9e5d1fe4e2a4e3d5e2d3b96b @@ -6064,8 +6064,8 @@ trackedFiles: pristine_git_object: b95fd11d5fce3ffaede8bf9adc15335d83ae0cb2 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:f6d5aa9b9bd371545660765d40a68771df876edc - pristine_git_object: 163f203102ac43ddd25e31aef2213bcfce46bc94 + last_write_checksum: sha1:a6d1af4ef9ccc71baf6a42eb96e3107e8a06c34b + pristine_git_object: 02c865cfdeb7d32d5dd90e8f370bdec89fb9ba7f src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:79816d0388e471a4bbb3d09df84794e9405cf3b2 @@ -8603,7 +8603,7 @@ examples: application/json: [{"id": "bf1614ea-c74f-4b49-9415-f199d33c3281", "name": "", "created_at": "2026-06-16T10:34:55.929Z", "modified_at": "2026-04-16T03:39:05.055Z"}] examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.conversations.restart_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added**\n* `mistral.workflows.executions.get_workflow_execution_trace_events()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.workflows.executions.get_workflow_execution_trace_summary()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.workflows.executions.get_workflow_execution_trace_otel()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.connectors.update()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.get()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.list()`: `response.items[].tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.connectors.create()`: `response.tools` **Removed** (Breaking ⚠️)\n* `mistral.beta.agents.get_version()`: `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list_versions()`: `response.[].metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update_version()`: `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.audio.speech.complete()`: `request.metadata` **Changed** (Breaking ⚠️)\n* `mistral.audio.voices.get_sample_audio()`: `response.status[200]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.start()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.conversations.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get()`: `response` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.update()`: \n * `request.metadata` **Changed** (Breaking ⚠️)\n * `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.get()`: `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.agents.list()`: `response.[].metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.restart()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.conversations.start_stream()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added**\n* `mistral.beta.agents.create()`: \n * `request.metadata` **Changed** (Breaking ⚠️)\n * `response.metadata` **Changed** (Breaking ⚠️)\n* `mistral.beta.conversations.get_history()`: `response.entries[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.classifiers.moderate_chat()`: \n * `request.inputs.union(Array<>)[].union(system).content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.beta.conversations.get_messages()`: `response.messages[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.connectors.get_authentication_methods()`: **Added**\n* `mistral.beta.conversations.append()`: \n * `request.inputs.union(Array)[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n * `response.outputs[].union(MessageOutputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n* `mistral.beta.rag.ingestion_pipeline_configurations.list()`: **Added**\n* `mistral.beta.connectors.delete_user_credentials()`: **Added**\n* `mistral.beta.connectors.delete_workspace_credentials()`: **Added**\n* `mistral.beta.libraries.create()`: `request.owner_type` **Added**\n* `mistral.beta.libraries.documents.text_content()`: `request` **Changed**\n* `mistral.beta.observability.chat_completion_events.fields.list()`: `response.field_definitions[].type.enum(map)` **Added**\n* `mistral.beta.connectors.delete_organization_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_user_credentials()`: **Added**\n* `mistral.beta.connectors.get_auth_url()`: `request.credentials_name` **Added**\n* `mistral.beta.connectors.list_tools()`: `request.credentials_name` **Added**\n* `mistral.beta.connectors.list_user_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_workspace_credentials()`: **Added**\n* `mistral.chat.complete()`: \n * `request` **Changed**\n * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.chat.stream()`: \n * `request` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.fim.complete()`: \n * `request` **Changed**\n * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.fim.stream()`: \n * `request` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.agents.complete()`: \n * `request` **Changed**\n * `response.choices[].message.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.agents.stream()`: \n * `request` **Changed**\n * `response.[].data.choices[].delta.content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.beta.conversations.append_stream()`: \n * `request.inputs.union(Array)[].union(MessageInputEntry).content.union(Array)[].union(ThinkChunk).signature` **Added**\n * `response.[].data.union(message.output.delta).content.union(OutputContentChunks).union(ThinkChunk).signature` **Added**\n* `mistral.classifiers.classify_chat()`: \n * `request.input.union(InstructRequest).messages[].union(tool).content.union(Array)[].union(thinking).signature` **Added**\n* `mistral.workflows.get_workflow_registrations()`: `response.workflow_registrations[]` **Changed**\n* `mistral.workflows.execute_workflow()`: \n * `request.extensions` **Added**\n * `response.union(WorkflowExecutionResponse).run_id` **Added**\n* `mistral.workflows.execute_workflow_registration()`: \n * `request.extensions` **Added**\n * `response.union(WorkflowExecutionResponse).run_id` **Added**\n* `mistral.workflows.get_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.update_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.get_workflow_registration()`: `response.workflow_registration` **Changed**\n* `mistral.workflows.archive_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.unarchive_workflow()`: `response.workflow.on_behalf_of` **Added**\n* `mistral.workflows.executions.get_workflow_execution()`: `response.run_id` **Added**\n* `mistral.beta.connectors.list_workspace_credentials()`: **Added**\n* `mistral.beta.connectors.create_or_update_organization_credentials()`: **Added**\n* `mistral.beta.connectors.list_organization_credentials()`: **Added**\n* `mistral.workflows.executions.stream()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.workflows.runs.list_runs()`: \n * `request.user_id` **Added**\n * `response.executions[].run_id` **Added**\n* `mistral.workflows.runs.get_run()`: `response.run_id` **Added**\n* `mistral.workflows.events.get_stream_events()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.workflows.events.get_workflow_events()`: `response.events[].union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.workflows.deployments.list_deployments()`: `response.deployments[].location` **Added**\n* `mistral.workflows.deployments.get_deployment()`: `response.location` **Added**\n* `mistral.events.get_stream_events()`: `response.[].data.data.union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n* `mistral.events.get_workflow_events()`: `response.events[].union(WorkflowExecutionStartedResponse).attributes.display_name` **Added**\n" +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.observability.chat_completion_events.search()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.beta.observability.chat_completion_events.fetch()`: `response.extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.beta.observability.campaigns.list_events()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow_registration()`: `request.encoded_input` **Removed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow()`: `request.encoded_input` **Removed** (Breaking ⚠️)\n* `mistral.chat.complete()`: `request.prompt_cache_key` **Added**\n* `mistral.beta.connectors.update()`: \n * `request.title` **Added**\n * `response.title` **Added**\n* `mistral.beta.connectors.get()`: `response.title` **Added**\n* `mistral.chat.stream()`: `request.prompt_cache_key` **Added**\n* `mistral.fim.complete()`: `request.prompt_cache_key` **Added**\n* `mistral.fim.stream()`: `request.prompt_cache_key` **Added**\n* `mistral.agents.complete()`: `request.prompt_cache_key` **Added**\n* `mistral.agents.stream()`: `request.prompt_cache_key` **Added**\n* `mistral.beta.connectors.list()`: `response.items[].title` **Added**\n* `mistral.beta.connectors.create()`: \n * `request.title` **Added**\n * `response.title` **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index e677629a..6143d51b 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.1 + version: 2.4.2 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 5388026d..73c113e6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:81bd98c0c31f63e1c2ec66d8105defaf18aa59f48e84fa35fb205de7f3ebf48d - sourceBlobDigest: sha256:5062472fdb17553079df91cedaca25d72a8bb140d27fe6f294f85abce3692feb + sourceRevisionDigest: sha256:5f84708f9fc191bedfec3c08195993526479d6c4c631f20d9784bb4b3625671a + sourceBlobDigest: sha256:6f303b1cf1f1c8d2c00a2db79b73c56f37a2daffeef4db960e32a7b9f4d857df tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:81bd98c0c31f63e1c2ec66d8105defaf18aa59f48e84fa35fb205de7f3ebf48d - sourceBlobDigest: sha256:5062472fdb17553079df91cedaca25d72a8bb140d27fe6f294f85abce3692feb + sourceRevisionDigest: sha256:5f84708f9fc191bedfec3c08195993526479d6c4c631f20d9784bb4b3625671a + sourceBlobDigest: sha256:6f303b1cf1f1c8d2c00a2db79b73c56f37a2daffeef4db960e32a7b9f4d857df codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:815d79d20604e2b311b3553ba4f2f02400875cc37d29ed36a4b911e823f4fd8b + codeSamplesRevisionDigest: sha256:9db12a79324a0a57052aacff8bc5e08efee07e0f4e79ff061e027ff8b0969efd workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/RELEASES.md b/RELEASES.md index b23b8376..5ece32ff 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -598,4 +598,14 @@ Based on: ### Generated - [python v2.4.1] . ### Releases -- [PyPI v2.4.1] https://pypi.org/project/mistralai/2.4.1 - . \ No newline at end of file +- [PyPI v2.4.1] https://pypi.org/project/mistralai/2.4.1 - . + +## 2026-04-23 14:15:34 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.2] . +### Releases +- [PyPI v2.4.2] https://pypi.org/project/mistralai/2.4.2 - . \ No newline at end of file diff --git a/docs/models/agentscompletionrequest.md b/docs/models/agentscompletionrequest.md index 0c3fe986..3253fee1 100644 --- a/docs/models/agentscompletionrequest.md +++ b/docs/models/agentscompletionrequest.md @@ -22,4 +22,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/agentscompletionstreamrequest.md b/docs/models/agentscompletionstreamrequest.md index 4111877d..29659238 100644 --- a/docs/models/agentscompletionstreamrequest.md +++ b/docs/models/agentscompletionstreamrequest.md @@ -22,4 +22,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `agent_id` | *str* | :heavy_check_mark: | The ID of the agent to use for this completion. | | \ No newline at end of file diff --git a/docs/models/authenticationconfiguration.md b/docs/models/authenticationconfiguration.md index 081649ea..6644875e 100644 --- a/docs/models/authenticationconfiguration.md +++ b/docs/models/authenticationconfiguration.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `name` | *str* | :heavy_check_mark: | N/A | -| `authentication_type` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_check_mark: | N/A | -| `is_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `authentication_type` | [models.OutboundAuthenticationType](../models/outboundauthenticationtype.md) | :heavy_check_mark: | N/A | +| `is_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatcompletioneventextrafields.md b/docs/models/chatcompletioneventextrafields.md index c2b7f855..d63b251d 100644 --- a/docs/models/chatcompletioneventextrafields.md +++ b/docs/models/chatcompletioneventextrafields.md @@ -39,3 +39,9 @@ value: datetime = /* values here */ value: List[str] = /* values here */ ``` +### `Dict[str, str]` + +```python +value: Dict[str, str] = /* values here */ +``` + diff --git a/docs/models/chatcompletioneventpreviewextrafields.md b/docs/models/chatcompletioneventpreviewextrafields.md index dd213827..5bcec6a0 100644 --- a/docs/models/chatcompletioneventpreviewextrafields.md +++ b/docs/models/chatcompletioneventpreviewextrafields.md @@ -39,3 +39,9 @@ value: datetime = /* values here */ value: List[str] = /* values here */ ``` +### `Dict[str, str]` + +```python +value: Dict[str, str] = /* values here */ +``` + diff --git a/docs/models/chatcompletionrequest.md b/docs/models/chatcompletionrequest.md index 4a134824..4f98ef96 100644 --- a/docs/models/chatcompletionrequest.md +++ b/docs/models/chatcompletionrequest.md @@ -25,4 +25,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/chatcompletionstreamrequest.md b/docs/models/chatcompletionstreamrequest.md index a0f46c47..6409f474 100644 --- a/docs/models/chatcompletionstreamrequest.md +++ b/docs/models/chatcompletionstreamrequest.md @@ -25,4 +25,5 @@ | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/docs/models/connector.md b/docs/models/connector.md index a0107820..29f8ad07 100644 --- a/docs/models/connector.md +++ b/docs/models/connector.md @@ -7,6 +7,7 @@ | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `description` | *str* | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | | `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | diff --git a/docs/models/connectorlistorganizationcredentialsv1request.md b/docs/models/connectorlistorganizationcredentialsv1request.md index bb1f1c3a..53ce36db 100644 --- a/docs/models/connectorlistorganizationcredentialsv1request.md +++ b/docs/models/connectorlistorganizationcredentialsv1request.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | -| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `auth_type` | [OptionalNullable[models.OutboundAuthenticationType]](../models/outboundauthenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistusercredentialsv1request.md b/docs/models/connectorlistusercredentialsv1request.md index 63ec93d5..2c9547d5 100644 --- a/docs/models/connectorlistusercredentialsv1request.md +++ b/docs/models/connectorlistusercredentialsv1request.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | -| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `auth_type` | [OptionalNullable[models.OutboundAuthenticationType]](../models/outboundauthenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlistworkspacecredentialsv1request.md b/docs/models/connectorlistworkspacecredentialsv1request.md index 45e90077..573869b2 100644 --- a/docs/models/connectorlistworkspacecredentialsv1request.md +++ b/docs/models/connectorlistworkspacecredentialsv1request.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `auth_type` | [OptionalNullable[models.AuthenticationType]](../models/authenticationtype.md) | :heavy_minus_sign: | N/A | -| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `auth_type` | [OptionalNullable[models.OutboundAuthenticationType]](../models/outboundauthenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createconnectorrequest.md b/docs/models/createconnectorrequest.md index 4668e1a6..111c460a 100644 --- a/docs/models/createconnectorrequest.md +++ b/docs/models/createconnectorrequest.md @@ -6,6 +6,7 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | | `description` | *str* | :heavy_check_mark: | The description of the connector. | | `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | | `visibility` | [Optional[models.ResourceVisibility]](../models/resourcevisibility.md) | :heavy_minus_sign: | N/A | diff --git a/docs/models/credentialsresponse.md b/docs/models/credentialsresponse.md index 0cd5b336..1c9a8596 100644 --- a/docs/models/credentialsresponse.md +++ b/docs/models/credentialsresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | `credentials` | List[[models.AuthenticationConfiguration](../models/authenticationconfiguration.md)] | :heavy_check_mark: | N/A | -| `connector_preset_credentials_for_auth` | List[[models.AuthenticationType](../models/authenticationtype.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `connector_preset_credentials_for_auth` | List[[models.OutboundAuthenticationType](../models/outboundauthenticationtype.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/fimcompletionrequest.md b/docs/models/fimcompletionrequest.md index c0c52b66..d25d45f6 100644 --- a/docs/models/fimcompletionrequest.md +++ b/docs/models/fimcompletionrequest.md @@ -15,4 +15,5 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The minimum number of tokens to generate in the completion. | | \ No newline at end of file +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The minimum number of tokens to generate in the completion. | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/fimcompletionstreamrequest.md b/docs/models/fimcompletionstreamrequest.md index c02b622c..15718c7c 100644 --- a/docs/models/fimcompletionstreamrequest.md +++ b/docs/models/fimcompletionstreamrequest.md @@ -15,4 +15,5 @@ | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | -| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The minimum number of tokens to generate in the completion. | | \ No newline at end of file +| `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The minimum number of tokens to generate in the completion. | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/authenticationtype.md b/docs/models/outboundauthenticationtype.md similarity index 61% rename from docs/models/authenticationtype.md rename to docs/models/outboundauthenticationtype.md index 498bfeaa..a8ddd624 100644 --- a/docs/models/authenticationtype.md +++ b/docs/models/outboundauthenticationtype.md @@ -1,12 +1,12 @@ -# AuthenticationType +# OutboundAuthenticationType ## Example Usage ```python -from mistralai.client.models import AuthenticationType +from mistralai.client.models import OutboundAuthenticationType # Open enum: unrecognized values are captured as UnrecognizedStr -value: AuthenticationType = "oauth2" +value: OutboundAuthenticationType = "oauth2" ``` diff --git a/docs/models/publicauthenticationmethod.md b/docs/models/publicauthenticationmethod.md index c98413b6..fa568d45 100644 --- a/docs/models/publicauthenticationmethod.md +++ b/docs/models/publicauthenticationmethod.md @@ -7,5 +7,5 @@ Public view of an authentication method, without secrets. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `method_type` | [models.AuthenticationType](../models/authenticationtype.md) | :heavy_check_mark: | N/A | +| `method_type` | [models.OutboundAuthenticationType](../models/outboundauthenticationtype.md) | :heavy_check_mark: | N/A | | `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updateconnectorrequest.md b/docs/models/updateconnectorrequest.md index d6d76631..335588ea 100644 --- a/docs/models/updateconnectorrequest.md +++ b/docs/models/updateconnectorrequest.md @@ -5,6 +5,7 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | | `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md index 08b584f9..4b61c7b7 100644 --- a/docs/models/workflowexecutionrequest.md +++ b/docs/models/workflowexecutionrequest.md @@ -7,7 +7,6 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | | `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | -| `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | diff --git a/docs/sdks/agents/README.md b/docs/sdks/agents/README.md index fa85c988..03917165 100644 --- a/docs/sdks/agents/README.md +++ b/docs/sdks/agents/README.md @@ -61,6 +61,7 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -128,6 +129,7 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/chat/README.md b/docs/sdks/chat/README.md index fe778e60..96a1e204 100644 --- a/docs/sdks/chat/README.md +++ b/docs/sdks/chat/README.md @@ -63,6 +63,7 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | @@ -133,6 +134,7 @@ with Mistral( | `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | | `guardrails` | List[[models.GuardrailConfig](../../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index 67005b8f..753c1cf3 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -55,6 +55,7 @@ with Mistral( | `name` | *str* | :heavy_check_mark: | The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. | | `description` | *str* | :heavy_check_mark: | The description of the connector. | | `server` | *str* | :heavy_check_mark: | The url of the MCP server. | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | | `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | | `visibility` | [Optional[models.ResourceVisibility]](../../models/resourcevisibility.md) | :heavy_minus_sign: | N/A | | `headers` | Dict[str, *Any*] | :heavy_minus_sign: | Optional organization-level headers to be sent with the request to the mcp server. | @@ -314,12 +315,12 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | -| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | -| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.OutboundAuthenticationType]](../../models/outboundauthenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -401,12 +402,12 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | -| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | -| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.OutboundAuthenticationType]](../../models/outboundauthenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -488,12 +489,12 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | -| `auth_type` | [OptionalNullable[models.AuthenticationType]](../../models/authenticationtype.md) | :heavy_minus_sign: | N/A | -| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `auth_type` | [OptionalNullable[models.OutboundAuthenticationType]](../../models/outboundauthenticationtype.md) | :heavy_minus_sign: | N/A | +| `fetch_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -747,6 +748,7 @@ with Mistral( | Parameter | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `connector_id` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | | `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | diff --git a/docs/sdks/fim/README.md b/docs/sdks/fim/README.md index 29ee129c..57320084 100644 --- a/docs/sdks/fim/README.md +++ b/docs/sdks/fim/README.md @@ -47,6 +47,7 @@ with Mistral( | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | | `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The minimum number of tokens to generate in the completion. | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response @@ -100,6 +101,7 @@ with Mistral( | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | return a+b | | `min_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The minimum number of tokens to generate in the completion. | | +| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index 93ff8660..45759776 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -142,7 +142,6 @@ with Mistral( | `workflow_identifier` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | | `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | -| `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | @@ -194,7 +193,6 @@ with Mistral( | `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | | `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | -| `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | | `custom_tracing_attributes` | Dict[str, *str*] | :heavy_minus_sign: | N/A | diff --git a/pyproject.toml b/pyproject.toml index dce32456..2b2a5d07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.1" +version = "2.4.2" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index e6e50dc0..6f1030ba 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.1" +__version__: str = "2.4.2" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.1 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.2 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index a3472b62..48c7bb99 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -58,6 +58,7 @@ def complete( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -83,6 +84,7 @@ def complete( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -131,6 +133,7 @@ def complete( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, agent_id=agent_id, ) @@ -239,6 +242,7 @@ async def complete_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -264,6 +268,7 @@ async def complete_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -312,6 +317,7 @@ async def complete_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, agent_id=agent_id, ) @@ -420,6 +426,7 @@ def stream( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -447,6 +454,7 @@ def stream( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -495,6 +503,7 @@ def stream( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, agent_id=agent_id, ) @@ -611,6 +620,7 @@ async def stream_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -638,6 +648,7 @@ async def stream_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -686,6 +697,7 @@ async def stream_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, agent_id=agent_id, ) diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index 113d1453..5a1ff0f0 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -145,6 +145,7 @@ def complete( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -173,6 +174,7 @@ def complete( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -225,6 +227,7 @@ def complete( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, safe_prompt=safe_prompt, ) @@ -335,6 +338,7 @@ async def complete_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -363,6 +367,7 @@ async def complete_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -415,6 +420,7 @@ async def complete_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, safe_prompt=safe_prompt, ) @@ -525,6 +531,7 @@ def stream( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -555,6 +562,7 @@ def stream( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -607,6 +615,7 @@ def stream( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, safe_prompt=safe_prompt, ) @@ -725,6 +734,7 @@ async def stream_async( guardrails: OptionalNullable[ Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] ] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -755,6 +765,7 @@ async def stream_async( :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. :param guardrails: + :param prompt_cache_key: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -807,6 +818,7 @@ async def stream_async( guardrails=utils.get_pydantic_model( guardrails, OptionalNullable[List[models.GuardrailConfig]] ), + prompt_cache_key=prompt_cache_key, safe_prompt=safe_prompt, ) diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 0d1dc703..088d26fd 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -19,6 +19,7 @@ def create( name: str, description: str, server: str, + title: OptionalNullable[str] = UNSET, icon_url: OptionalNullable[str] = UNSET, visibility: Optional[models.ResourceVisibility] = None, headers: OptionalNullable[Dict[str, Any]] = UNSET, @@ -38,6 +39,7 @@ def create( :param name: The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. :param description: The description of the connector. :param server: The url of the MCP server. + :param title: Optional human-readable title for the connector. :param icon_url: The optional url of the icon you want to associate to the connector. :param visibility: :param headers: Optional organization-level headers to be sent with the request to the mcp server. @@ -63,6 +65,7 @@ def create( request = models.CreateConnectorRequest( name=name, + title=title, description=description, icon_url=icon_url, visibility=visibility, @@ -140,6 +143,7 @@ async def create_async( name: str, description: str, server: str, + title: OptionalNullable[str] = UNSET, icon_url: OptionalNullable[str] = UNSET, visibility: Optional[models.ResourceVisibility] = None, headers: OptionalNullable[Dict[str, Any]] = UNSET, @@ -159,6 +163,7 @@ async def create_async( :param name: The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. :param description: The description of the connector. :param server: The url of the MCP server. + :param title: Optional human-readable title for the connector. :param icon_url: The optional url of the icon you want to associate to the connector. :param visibility: :param headers: Optional organization-level headers to be sent with the request to the mcp server. @@ -184,6 +189,7 @@ async def create_async( request = models.CreateConnectorRequest( name=name, + title=title, description=description, icon_url=icon_url, visibility=visibility, @@ -1283,7 +1289,7 @@ def list_organization_credentials( self, *, connector_id_or_name: str, - auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + auth_type: OptionalNullable[models.OutboundAuthenticationType] = UNSET, fetch_default: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1382,7 +1388,7 @@ async def list_organization_credentials_async( self, *, connector_id_or_name: str, - auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + auth_type: OptionalNullable[models.OutboundAuthenticationType] = UNSET, fetch_default: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1711,7 +1717,7 @@ def list_workspace_credentials( self, *, connector_id_or_name: str, - auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + auth_type: OptionalNullable[models.OutboundAuthenticationType] = UNSET, fetch_default: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -1810,7 +1816,7 @@ async def list_workspace_credentials_async( self, *, connector_id_or_name: str, - auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + auth_type: OptionalNullable[models.OutboundAuthenticationType] = UNSET, fetch_default: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2139,7 +2145,7 @@ def list_user_credentials( self, *, connector_id_or_name: str, - auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + auth_type: OptionalNullable[models.OutboundAuthenticationType] = UNSET, fetch_default: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -2238,7 +2244,7 @@ async def list_user_credentials_async( self, *, connector_id_or_name: str, - auth_type: OptionalNullable[models.AuthenticationType] = UNSET, + auth_type: OptionalNullable[models.OutboundAuthenticationType] = UNSET, fetch_default: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -3341,6 +3347,7 @@ def update( self, *, connector_id: str, + title: OptionalNullable[str] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, icon_url: OptionalNullable[str] = UNSET, @@ -3362,6 +3369,7 @@ def update( Update a connector by its ID. :param connector_id: + :param title: Optional human-readable title for the connector. :param name: The name of the connector. :param description: The description of the connector. :param icon_url: The optional url of the icon you want to associate to the connector. @@ -3392,6 +3400,7 @@ def update( request = models.ConnectorUpdateV1Request( connector_id=connector_id, update_connector_request=models.UpdateConnectorRequest( + title=title, name=name, description=description, icon_url=icon_url, @@ -3474,6 +3483,7 @@ async def update_async( self, *, connector_id: str, + title: OptionalNullable[str] = UNSET, name: OptionalNullable[str] = UNSET, description: OptionalNullable[str] = UNSET, icon_url: OptionalNullable[str] = UNSET, @@ -3495,6 +3505,7 @@ async def update_async( Update a connector by its ID. :param connector_id: + :param title: Optional human-readable title for the connector. :param name: The name of the connector. :param description: The description of the connector. :param icon_url: The optional url of the icon you want to associate to the connector. @@ -3525,6 +3536,7 @@ async def update_async( request = models.ConnectorUpdateV1Request( connector_id=connector_id, update_connector_request=models.UpdateConnectorRequest( + title=title, name=name, description=description, icon_url=icon_url, diff --git a/src/mistralai/client/fim.py b/src/mistralai/client/fim.py index ba2bd5b5..243786b3 100644 --- a/src/mistralai/client/fim.py +++ b/src/mistralai/client/fim.py @@ -32,6 +32,7 @@ def complete( metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, min_tokens: OptionalNullable[int] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -52,6 +53,7 @@ def complete( :param metadata: :param suffix: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. :param min_tokens: The minimum number of tokens to generate in the completion. + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -82,6 +84,7 @@ def complete( prompt=prompt, suffix=suffix, min_tokens=min_tokens, + prompt_cache_key=prompt_cache_key, ) req = self._build_request( @@ -163,6 +166,7 @@ async def complete_async( metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, min_tokens: OptionalNullable[int] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -183,6 +187,7 @@ async def complete_async( :param metadata: :param suffix: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. :param min_tokens: The minimum number of tokens to generate in the completion. + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -213,6 +218,7 @@ async def complete_async( prompt=prompt, suffix=suffix, min_tokens=min_tokens, + prompt_cache_key=prompt_cache_key, ) req = self._build_request_async( @@ -294,6 +300,7 @@ def stream( metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, min_tokens: OptionalNullable[int] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -314,6 +321,7 @@ def stream( :param metadata: :param suffix: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. :param min_tokens: The minimum number of tokens to generate in the completion. + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -344,6 +352,7 @@ def stream( prompt=prompt, suffix=suffix, min_tokens=min_tokens, + prompt_cache_key=prompt_cache_key, ) req = self._build_request( @@ -433,6 +442,7 @@ async def stream_async( metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, min_tokens: OptionalNullable[int] = UNSET, + prompt_cache_key: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -453,6 +463,7 @@ async def stream_async( :param metadata: :param suffix: Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. :param min_tokens: The minimum number of tokens to generate in the completion. + :param prompt_cache_key: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -483,6 +494,7 @@ async def stream_async( prompt=prompt, suffix=suffix, min_tokens=min_tokens, + prompt_cache_key=prompt_cache_key, ) req = self._build_request_async( diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index efc6e811..1b9d07bb 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -209,7 +209,6 @@ AuthenticationConfiguration, AuthenticationConfigurationTypedDict, ) - from .authenticationtype import AuthenticationType from .authurlresponse import AuthURLResponse, AuthURLResponseTypedDict from .basefielddefinition import ( BaseFieldDefinition, @@ -1465,6 +1464,7 @@ from .ocrresponse import OCRResponse, OCRResponseTypedDict from .ocrtableobject import Format, OCRTableObject, OCRTableObjectTypedDict from .ocrusageinfo import OCRUsageInfo, OCRUsageInfoTypedDict + from .outboundauthenticationtype import OutboundAuthenticationType from .outputcontentchunks import OutputContentChunks, OutputContentChunksTypedDict from .paginatedconnectors import PaginatedConnectors, PaginatedConnectorsTypedDict from .paginatedresultcampaignpreview import ( @@ -2292,7 +2292,6 @@ "AuthURLResponseTypedDict", "AuthenticationConfiguration", "AuthenticationConfigurationTypedDict", - "AuthenticationType", "Authorization", "AuthorizationTypedDict", "BaseFieldDefinition", @@ -3128,6 +3127,7 @@ "Or", "OrTypedDict", "OrderBy", + "OutboundAuthenticationType", "OutputContentChunks", "OutputContentChunksTypedDict", "OwnerType", @@ -3772,7 +3772,6 @@ "AuthDataTypedDict": ".authdata", "AuthenticationConfiguration": ".authenticationconfiguration", "AuthenticationConfigurationTypedDict": ".authenticationconfiguration", - "AuthenticationType": ".authenticationtype", "AuthURLResponse": ".authurlresponse", "AuthURLResponseTypedDict": ".authurlresponse", "BaseFieldDefinition": ".basefielddefinition", @@ -4646,6 +4645,7 @@ "OCRTableObjectTypedDict": ".ocrtableobject", "OCRUsageInfo": ".ocrusageinfo", "OCRUsageInfoTypedDict": ".ocrusageinfo", + "OutboundAuthenticationType": ".outboundauthenticationtype", "OutputContentChunks": ".outputcontentchunks", "OutputContentChunksTypedDict": ".outputcontentchunks", "PaginatedConnectors": ".paginatedconnectors", diff --git a/src/mistralai/client/models/agentscompletionrequest.py b/src/mistralai/client/models/agentscompletionrequest.py index 6b36c597..55794ea2 100644 --- a/src/mistralai/client/models/agentscompletionrequest.py +++ b/src/mistralai/client/models/agentscompletionrequest.py @@ -134,6 +134,7 @@ class AgentsCompletionRequestTypedDict(TypedDict): prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] + prompt_cache_key: NotRequired[Nullable[str]] class AgentsCompletionRequest(BaseModel): @@ -185,6 +186,8 @@ class AgentsCompletionRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + prompt_cache_key: OptionalNullable[str] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -205,6 +208,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", ] ) nullable_fields = set( @@ -220,6 +224,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/agentscompletionstreamrequest.py b/src/mistralai/client/models/agentscompletionstreamrequest.py index e23442aa..5d3bdecd 100644 --- a/src/mistralai/client/models/agentscompletionstreamrequest.py +++ b/src/mistralai/client/models/agentscompletionstreamrequest.py @@ -133,6 +133,7 @@ class AgentsCompletionStreamRequestTypedDict(TypedDict): prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] + prompt_cache_key: NotRequired[Nullable[str]] class AgentsCompletionStreamRequest(BaseModel): @@ -183,6 +184,8 @@ class AgentsCompletionStreamRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + prompt_cache_key: OptionalNullable[str] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -203,6 +206,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", ] ) nullable_fields = set( @@ -218,6 +222,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/authenticationconfiguration.py b/src/mistralai/client/models/authenticationconfiguration.py index c2ea5f94..84f66591 100644 --- a/src/mistralai/client/models/authenticationconfiguration.py +++ b/src/mistralai/client/models/authenticationconfiguration.py @@ -2,7 +2,7 @@ # @generated-id: 97b5056c29fb from __future__ import annotations -from .authenticationtype import AuthenticationType +from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -11,14 +11,14 @@ class AuthenticationConfigurationTypedDict(TypedDict): name: str - authentication_type: AuthenticationType + authentication_type: OutboundAuthenticationType is_default: NotRequired[bool] class AuthenticationConfiguration(BaseModel): name: str - authentication_type: AuthenticationType + authentication_type: OutboundAuthenticationType is_default: Optional[bool] = False diff --git a/src/mistralai/client/models/chatcompletionevent.py b/src/mistralai/client/models/chatcompletionevent.py index 86253f5d..bcd6757f 100644 --- a/src/mistralai/client/models/chatcompletionevent.py +++ b/src/mistralai/client/models/chatcompletionevent.py @@ -14,12 +14,13 @@ ChatCompletionEventExtraFieldsTypedDict = TypeAliasType( "ChatCompletionEventExtraFieldsTypedDict", - Union[bool, int, float, str, datetime, List[str]], + Union[bool, int, float, str, datetime, List[str], Dict[str, str]], ) ChatCompletionEventExtraFields = TypeAliasType( - "ChatCompletionEventExtraFields", Union[bool, int, float, str, datetime, List[str]] + "ChatCompletionEventExtraFields", + Union[bool, int, float, str, datetime, List[str], Dict[str, str]], ) diff --git a/src/mistralai/client/models/chatcompletioneventpreview.py b/src/mistralai/client/models/chatcompletioneventpreview.py index e7fef9d0..40985f84 100644 --- a/src/mistralai/client/models/chatcompletioneventpreview.py +++ b/src/mistralai/client/models/chatcompletioneventpreview.py @@ -10,13 +10,13 @@ ChatCompletionEventPreviewExtraFieldsTypedDict = TypeAliasType( "ChatCompletionEventPreviewExtraFieldsTypedDict", - Union[bool, int, float, str, datetime, List[str]], + Union[bool, int, float, str, datetime, List[str], Dict[str, str]], ) ChatCompletionEventPreviewExtraFields = TypeAliasType( "ChatCompletionEventPreviewExtraFields", - Union[bool, int, float, str, datetime, List[str]], + Union[bool, int, float, str, datetime, List[str], Dict[str, str]], ) diff --git a/src/mistralai/client/models/chatcompletionrequest.py b/src/mistralai/client/models/chatcompletionrequest.py index 5bce222f..ee168c18 100644 --- a/src/mistralai/client/models/chatcompletionrequest.py +++ b/src/mistralai/client/models/chatcompletionrequest.py @@ -143,6 +143,7 @@ class ChatCompletionRequestTypedDict(TypedDict): prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] + prompt_cache_key: NotRequired[Nullable[str]] safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -205,6 +206,8 @@ class ChatCompletionRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + prompt_cache_key: OptionalNullable[str] = UNSET + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -230,6 +233,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", "safe_prompt", ] ) @@ -248,6 +252,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/chatcompletionstreamrequest.py b/src/mistralai/client/models/chatcompletionstreamrequest.py index 7cc7a057..f6ad6a36 100644 --- a/src/mistralai/client/models/chatcompletionstreamrequest.py +++ b/src/mistralai/client/models/chatcompletionstreamrequest.py @@ -142,6 +142,7 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] + prompt_cache_key: NotRequired[Nullable[str]] safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -203,6 +204,8 @@ class ChatCompletionStreamRequest(BaseModel): guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + prompt_cache_key: OptionalNullable[str] = UNSET + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -228,6 +231,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", "safe_prompt", ] ) @@ -246,6 +250,7 @@ def serialize_model(self, handler): "reasoning_effort", "prompt_mode", "guardrails", + "prompt_cache_key", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py index e7b83ed4..9d8b6000 100644 --- a/src/mistralai/client/models/connector.py +++ b/src/mistralai/client/models/connector.py @@ -20,6 +20,7 @@ class ConnectorTypedDict(TypedDict): description: str created_at: datetime modified_at: datetime + title: NotRequired[Nullable[str]] server: NotRequired[Nullable[str]] auth_type: NotRequired[Nullable[str]] @@ -35,14 +36,16 @@ class Connector(BaseModel): modified_at: datetime + title: OptionalNullable[str] = UNSET + server: OptionalNullable[str] = UNSET auth_type: OptionalNullable[str] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["server", "auth_type"]) - nullable_fields = set(["server", "auth_type"]) + optional_fields = set(["title", "server", "auth_type"]) + nullable_fields = set(["title", "server", "auth_type"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector_list_organization_credentials_v1op.py b/src/mistralai/client/models/connector_list_organization_credentials_v1op.py index a20fa2a4..6b37773f 100644 --- a/src/mistralai/client/models/connector_list_organization_credentials_v1op.py +++ b/src/mistralai/client/models/connector_list_organization_credentials_v1op.py @@ -2,7 +2,7 @@ # @generated-id: a52ee058feab from __future__ import annotations -from .authenticationtype import AuthenticationType +from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import ( BaseModel, Nullable, @@ -18,7 +18,7 @@ class ConnectorListOrganizationCredentialsV1RequestTypedDict(TypedDict): connector_id_or_name: str - auth_type: NotRequired[Nullable[AuthenticationType]] + auth_type: NotRequired[Nullable[OutboundAuthenticationType]] fetch_default: NotRequired[bool] @@ -28,7 +28,7 @@ class ConnectorListOrganizationCredentialsV1Request(BaseModel): ] auth_type: Annotated[ - OptionalNullable[AuthenticationType], + OptionalNullable[OutboundAuthenticationType], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET diff --git a/src/mistralai/client/models/connector_list_user_credentials_v1op.py b/src/mistralai/client/models/connector_list_user_credentials_v1op.py index 5b47ee83..5434a283 100644 --- a/src/mistralai/client/models/connector_list_user_credentials_v1op.py +++ b/src/mistralai/client/models/connector_list_user_credentials_v1op.py @@ -2,7 +2,7 @@ # @generated-id: 106e8fba762d from __future__ import annotations -from .authenticationtype import AuthenticationType +from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import ( BaseModel, Nullable, @@ -18,7 +18,7 @@ class ConnectorListUserCredentialsV1RequestTypedDict(TypedDict): connector_id_or_name: str - auth_type: NotRequired[Nullable[AuthenticationType]] + auth_type: NotRequired[Nullable[OutboundAuthenticationType]] fetch_default: NotRequired[bool] @@ -28,7 +28,7 @@ class ConnectorListUserCredentialsV1Request(BaseModel): ] auth_type: Annotated[ - OptionalNullable[AuthenticationType], + OptionalNullable[OutboundAuthenticationType], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET diff --git a/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py b/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py index ef0f096e..c610c4c8 100644 --- a/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py +++ b/src/mistralai/client/models/connector_list_workspace_credentials_v1op.py @@ -2,7 +2,7 @@ # @generated-id: de7c431e8a54 from __future__ import annotations -from .authenticationtype import AuthenticationType +from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import ( BaseModel, Nullable, @@ -18,7 +18,7 @@ class ConnectorListWorkspaceCredentialsV1RequestTypedDict(TypedDict): connector_id_or_name: str - auth_type: NotRequired[Nullable[AuthenticationType]] + auth_type: NotRequired[Nullable[OutboundAuthenticationType]] fetch_default: NotRequired[bool] @@ -28,7 +28,7 @@ class ConnectorListWorkspaceCredentialsV1Request(BaseModel): ] auth_type: Annotated[ - OptionalNullable[AuthenticationType], + OptionalNullable[OutboundAuthenticationType], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET diff --git a/src/mistralai/client/models/createconnectorrequest.py b/src/mistralai/client/models/createconnectorrequest.py index 52ebc0be..18060ca3 100644 --- a/src/mistralai/client/models/createconnectorrequest.py +++ b/src/mistralai/client/models/createconnectorrequest.py @@ -23,6 +23,8 @@ class CreateConnectorRequestTypedDict(TypedDict): r"""The description of the connector.""" server: str r"""The url of the MCP server.""" + title: NotRequired[Nullable[str]] + r"""Optional human-readable title for the connector.""" icon_url: NotRequired[Nullable[str]] r"""The optional url of the icon you want to associate to the connector.""" visibility: NotRequired[ResourceVisibility] @@ -44,6 +46,9 @@ class CreateConnectorRequest(BaseModel): server: str r"""The url of the MCP server.""" + title: OptionalNullable[str] = UNSET + r"""Optional human-readable title for the connector.""" + icon_url: OptionalNullable[str] = UNSET r"""The optional url of the icon you want to associate to the connector.""" @@ -61,9 +66,11 @@ class CreateConnectorRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["icon_url", "visibility", "headers", "auth_data", "system_prompt"] + ["title", "icon_url", "visibility", "headers", "auth_data", "system_prompt"] + ) + nullable_fields = set( + ["title", "icon_url", "headers", "auth_data", "system_prompt"] ) - nullable_fields = set(["icon_url", "headers", "auth_data", "system_prompt"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/credentialsresponse.py b/src/mistralai/client/models/credentialsresponse.py index 4c6a41ab..5cf9a198 100644 --- a/src/mistralai/client/models/credentialsresponse.py +++ b/src/mistralai/client/models/credentialsresponse.py @@ -6,7 +6,7 @@ AuthenticationConfiguration, AuthenticationConfigurationTypedDict, ) -from .authenticationtype import AuthenticationType +from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import List, Optional @@ -15,13 +15,15 @@ class CredentialsResponseTypedDict(TypedDict): credentials: List[AuthenticationConfigurationTypedDict] - connector_preset_credentials_for_auth: NotRequired[List[AuthenticationType]] + connector_preset_credentials_for_auth: NotRequired[List[OutboundAuthenticationType]] class CredentialsResponse(BaseModel): credentials: List[AuthenticationConfiguration] - connector_preset_credentials_for_auth: Optional[List[AuthenticationType]] = None + connector_preset_credentials_for_auth: Optional[ + List[OutboundAuthenticationType] + ] = None @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/fimcompletionrequest.py b/src/mistralai/client/models/fimcompletionrequest.py index 6b6b1f52..65d132ea 100644 --- a/src/mistralai/client/models/fimcompletionrequest.py +++ b/src/mistralai/client/models/fimcompletionrequest.py @@ -48,6 +48,7 @@ class FIMCompletionRequestTypedDict(TypedDict): r"""Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.""" min_tokens: NotRequired[Nullable[int]] r"""The minimum number of tokens to generate in the completion.""" + prompt_cache_key: NotRequired[Nullable[str]] class FIMCompletionRequest(BaseModel): @@ -83,6 +84,8 @@ class FIMCompletionRequest(BaseModel): min_tokens: OptionalNullable[int] = UNSET r"""The minimum number of tokens to generate in the completion.""" + prompt_cache_key: OptionalNullable[str] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -96,6 +99,7 @@ def serialize_model(self, handler): "metadata", "suffix", "min_tokens", + "prompt_cache_key", ] ) nullable_fields = set( @@ -108,6 +112,7 @@ def serialize_model(self, handler): "metadata", "suffix", "min_tokens", + "prompt_cache_key", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/fimcompletionstreamrequest.py b/src/mistralai/client/models/fimcompletionstreamrequest.py index 6993807a..dc7ede38 100644 --- a/src/mistralai/client/models/fimcompletionstreamrequest.py +++ b/src/mistralai/client/models/fimcompletionstreamrequest.py @@ -47,6 +47,7 @@ class FIMCompletionStreamRequestTypedDict(TypedDict): r"""Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.""" min_tokens: NotRequired[Nullable[int]] r"""The minimum number of tokens to generate in the completion.""" + prompt_cache_key: NotRequired[Nullable[str]] class FIMCompletionStreamRequest(BaseModel): @@ -81,6 +82,8 @@ class FIMCompletionStreamRequest(BaseModel): min_tokens: OptionalNullable[int] = UNSET r"""The minimum number of tokens to generate in the completion.""" + prompt_cache_key: OptionalNullable[str] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -94,6 +97,7 @@ def serialize_model(self, handler): "metadata", "suffix", "min_tokens", + "prompt_cache_key", ] ) nullable_fields = set( @@ -106,6 +110,7 @@ def serialize_model(self, handler): "metadata", "suffix", "min_tokens", + "prompt_cache_key", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/authenticationtype.py b/src/mistralai/client/models/outboundauthenticationtype.py similarity index 81% rename from src/mistralai/client/models/authenticationtype.py rename to src/mistralai/client/models/outboundauthenticationtype.py index f5827174..39da354a 100644 --- a/src/mistralai/client/models/authenticationtype.py +++ b/src/mistralai/client/models/outboundauthenticationtype.py @@ -1,12 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: b403278039c5 +# @generated-id: 705e7172ba40 from __future__ import annotations from mistralai.client.types import UnrecognizedStr from typing import Literal, Union -AuthenticationType = Union[ +OutboundAuthenticationType = Union[ Literal[ "oauth2", "bearer", diff --git a/src/mistralai/client/models/publicauthenticationmethod.py b/src/mistralai/client/models/publicauthenticationmethod.py index 3351b432..95dde29a 100644 --- a/src/mistralai/client/models/publicauthenticationmethod.py +++ b/src/mistralai/client/models/publicauthenticationmethod.py @@ -2,11 +2,11 @@ # @generated-id: 545ab7f24523 from __future__ import annotations -from .authenticationtype import AuthenticationType from .connectorauthenticationheader import ( ConnectorAuthenticationHeader, ConnectorAuthenticationHeaderTypedDict, ) +from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import ( BaseModel, Nullable, @@ -22,14 +22,14 @@ class PublicAuthenticationMethodTypedDict(TypedDict): r"""Public view of an authentication method, without secrets.""" - method_type: AuthenticationType + method_type: OutboundAuthenticationType headers: NotRequired[Nullable[List[ConnectorAuthenticationHeaderTypedDict]]] class PublicAuthenticationMethod(BaseModel): r"""Public view of an authentication method, without secrets.""" - method_type: AuthenticationType + method_type: OutboundAuthenticationType headers: OptionalNullable[List[ConnectorAuthenticationHeader]] = UNSET diff --git a/src/mistralai/client/models/updateconnectorrequest.py b/src/mistralai/client/models/updateconnectorrequest.py index 3540d02b..145091d4 100644 --- a/src/mistralai/client/models/updateconnectorrequest.py +++ b/src/mistralai/client/models/updateconnectorrequest.py @@ -16,6 +16,8 @@ class UpdateConnectorRequestTypedDict(TypedDict): + title: NotRequired[Nullable[str]] + r"""Optional human-readable title for the connector.""" name: NotRequired[Nullable[str]] r"""The name of the connector.""" description: NotRequired[Nullable[str]] @@ -37,6 +39,9 @@ class UpdateConnectorRequestTypedDict(TypedDict): class UpdateConnectorRequest(BaseModel): + title: OptionalNullable[str] = UNSET + r"""Optional human-readable title for the connector.""" + name: OptionalNullable[str] = UNSET r"""The name of the connector.""" @@ -68,6 +73,7 @@ class UpdateConnectorRequest(BaseModel): def serialize_model(self, handler): optional_fields = set( [ + "title", "name", "description", "icon_url", @@ -81,6 +87,7 @@ def serialize_model(self, handler): ) nullable_fields = set( [ + "title", "name", "description", "icon_url", diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py index e878b2f4..ea5e752d 100644 --- a/src/mistralai/client/models/workflowexecutionrequest.py +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -2,7 +2,6 @@ # @generated-id: 806340497ed4 from __future__ import annotations -from .networkencodedinput import NetworkEncodedInput, NetworkEncodedInputTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -21,8 +20,6 @@ class WorkflowExecutionRequestTypedDict(TypedDict): r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" input: NotRequired[Nullable[Any]] r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" - encoded_input: NotRequired[Nullable[NetworkEncodedInputTypedDict]] - r"""Encoded input to the workflow, used when payload encoding is enabled.""" wait_for_result: NotRequired[bool] r"""If true, wait for the workflow to complete and return the result directly.""" timeout_seconds: NotRequired[Nullable[float]] @@ -43,9 +40,6 @@ class WorkflowExecutionRequest(BaseModel): input: OptionalNullable[Any] = UNSET r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" - encoded_input: OptionalNullable[NetworkEncodedInput] = UNSET - r"""Encoded input to the workflow, used when payload encoding is enabled.""" - wait_for_result: Optional[bool] = False r"""If true, wait for the workflow to complete and return the result directly.""" @@ -74,7 +68,6 @@ def serialize_model(self, handler): [ "execution_id", "input", - "encoded_input", "wait_for_result", "timeout_seconds", "custom_tracing_attributes", @@ -87,7 +80,6 @@ def serialize_model(self, handler): [ "execution_id", "input", - "encoded_input", "timeout_seconds", "custom_tracing_attributes", "extensions", diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index 163f2031..02c865cf 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -823,9 +823,6 @@ def execute_workflow( workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, input: OptionalNullable[Any] = UNSET, - encoded_input: OptionalNullable[ - Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] - ] = UNSET, wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -842,7 +839,6 @@ def execute_workflow( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. - :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: @@ -872,9 +868,6 @@ def execute_workflow( workflow_execution_request=models.WorkflowExecutionRequest( execution_id=execution_id, input=input, - encoded_input=utils.get_pydantic_model( - encoded_input, OptionalNullable[models.NetworkEncodedInput] - ), wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, @@ -957,9 +950,6 @@ async def execute_workflow_async( workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, input: OptionalNullable[Any] = UNSET, - encoded_input: OptionalNullable[ - Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] - ] = UNSET, wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -976,7 +966,6 @@ async def execute_workflow_async( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. - :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: @@ -1006,9 +995,6 @@ async def execute_workflow_async( workflow_execution_request=models.WorkflowExecutionRequest( execution_id=execution_id, input=input, - encoded_input=utils.get_pydantic_model( - encoded_input, OptionalNullable[models.NetworkEncodedInput] - ), wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, @@ -1094,9 +1080,6 @@ def execute_workflow_registration( workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, input: OptionalNullable[Any] = UNSET, - encoded_input: OptionalNullable[ - Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] - ] = UNSET, wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -1113,7 +1096,6 @@ def execute_workflow_registration( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. - :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: @@ -1143,9 +1125,6 @@ def execute_workflow_registration( workflow_execution_request=models.WorkflowExecutionRequest( execution_id=execution_id, input=input, - encoded_input=utils.get_pydantic_model( - encoded_input, OptionalNullable[models.NetworkEncodedInput] - ), wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, @@ -1231,9 +1210,6 @@ async def execute_workflow_registration_async( workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, input: OptionalNullable[Any] = UNSET, - encoded_input: OptionalNullable[ - Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] - ] = UNSET, wait_for_result: Optional[bool] = False, timeout_seconds: OptionalNullable[float] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -1250,7 +1226,6 @@ async def execute_workflow_registration_async( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. - :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. :param custom_tracing_attributes: @@ -1280,9 +1255,6 @@ async def execute_workflow_registration_async( workflow_execution_request=models.WorkflowExecutionRequest( execution_id=execution_id, input=input, - encoded_input=utils.get_pydantic_model( - encoded_input, OptionalNullable[models.NetworkEncodedInput] - ), wait_for_result=wait_for_result, timeout_seconds=timeout_seconds, custom_tracing_attributes=custom_tracing_attributes, diff --git a/uv.lock b/uv.lock index 1b081d98..52b3440f 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.1" +version = "2.4.2" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 362e8a691fdb492b4d6230ce68ce47b1e900dd06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 14:53:29 +0200 Subject: [PATCH 57/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=202.4.3=20(#503)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.ocr.process()`: `request.id` **Removed** (Breaking ⚠️) * `mistral.beta.rag.ingestion_pipeline_configurations.register()`: **Added** * chore: align pyproject.toml and uv.lock to version 2.4.3 * chore: trigger CI --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action Co-authored-by: Louis Sanna --- .speakeasy/gen.lock | 160 ++++++++------ .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 5 +- README.md | 5 +- RELEASES.md | 12 +- docs/models/classifierfinetuningjob.md | 36 +-- docs/models/classifierfinetuningjobdetails.md | 42 ++-- .../classifierfinetuningjobdetailsstatus.md | 2 + docs/models/classifiertrainingparameters.md | 16 +- docs/models/completionfinetuningjob.md | 38 ++-- docs/models/completionfinetuningjobdetails.md | 42 ++-- .../completionfinetuningjobdetailsstatus.md | 2 + docs/models/completiontrainingparameters.md | 18 +- docs/models/createbatchjobrequest.md | 18 +- ...teingestionpipelineconfigurationrequest.md | 8 + docs/models/deletefileresponse.md | 2 +- docs/models/deletemodelresponse.md | 4 +- docs/models/jobmetadata.md | 18 +- docs/models/ocrrequest.md | 1 - docs/sdks/batchjobs/README.md | 20 +- .../ingestionpipelineconfigurations/README.md | 44 +++- docs/sdks/ocr/README.md | 1 - pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/batch_jobs.py | 14 +- .../ingestion_pipeline_configurations.py | 206 +++++++++++++++++- src/mistralai/client/models/__init__.py | 8 + .../client/models/classifierfinetuningjob.py | 4 +- .../models/classifierfinetuningjobdetails.py | 25 +++ .../models/classifiertrainingparameters.py | 8 + .../client/models/completionfinetuningjob.py | 4 +- .../models/completionfinetuningjobdetails.py | 25 +++ .../models/completiontrainingparameters.py | 8 + .../client/models/createbatchjobrequest.py | 16 +- ...teingestionpipelineconfigurationrequest.py | 14 ++ .../client/models/deletemodelresponse.py | 8 +- src/mistralai/client/models/jobmetadata.py | 12 + src/mistralai/client/models/ocrrequest.py | 4 - src/mistralai/client/ocr.py | 6 - uv.lock | 2 +- 41 files changed, 638 insertions(+), 238 deletions(-) create mode 100644 docs/models/createingestionpipelineconfigurationrequest.md create mode 100644 src/mistralai/client/models/createingestionpipelineconfigurationrequest.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 76ab1480..813bc286 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 9d4e4682cf86aedc4f41751bdd0b0210 + docChecksum: 98c438e66d611406c6da2e8ebfc43fc4 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.2 - configChecksum: 864896ca5e5ed293f202b5fdd2c4f3a6 + releaseVersion: 2.4.3 + configChecksum: 5a5fe525cb5b0884f4ee2e1b2f7aca6d repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: a5e61542-697b-42f4-9e58-06e7ae421c04 - pristine_commit_hash: 753f7e09c139aaacfbf0e4ae6767bc7d3651ef7c - pristine_tree_hash: 5116684d7dd290dba1b18e9313065b62d74025ba + generation_id: 5f70b1d2-6fdf-48ad-aeb5-7eb6ac9fa83b + pristine_commit_hash: 9da4e7675727717887f2f4ee112ff23f88a759dc + pristine_tree_hash: 56af87d1a352f0999ecd92ef1a51d558525a3eea features: python: acceptHeaders: 3.0.0 @@ -528,20 +528,20 @@ trackedFiles: pristine_git_object: 9fa69cbb27a53456fd359ba8650d3510264926b9 docs/models/classifierfinetuningjob.md: id: 5bf35c25183f - last_write_checksum: sha1:afedddfe38e217189b5ec12ded74606c3b1e4c59 - pristine_git_object: 369756ba16a4c64f03cb6bb5da9bc0abd2a8eac6 + last_write_checksum: sha1:e26e4f2fb93f1111d2e2ec8563f0677a4f0651b3 + pristine_git_object: 123a51d83e1ab12abab08d32e591d4f39852cfad docs/models/classifierfinetuningjobdetails.md: id: c91d53e010d5 - last_write_checksum: sha1:59a4c11a0d52b02ffc48e011a40fb4ebb1604825 - pristine_git_object: c5efdf1c817b978506a4862991a0f8eab8b219fb + last_write_checksum: sha1:c828f982f03db4a14c9a2e24c6ff2c1692c45524 + pristine_git_object: d4a17ecaf29bb4831728f03b2714c9e96f6c672a docs/models/classifierfinetuningjobdetailsintegration.md: id: e6c161ac2a44 last_write_checksum: sha1:6450686e7f92ac8c1c02fcea82d5855ca6738b46 pristine_git_object: 438a35d9eb0e4250a9e6bcbb7dafeb26d74e018a docs/models/classifierfinetuningjobdetailsstatus.md: id: 87737e85b845 - last_write_checksum: sha1:aad42f83c0ad41e64179d8e1d4c86f798bb3de51 - pristine_git_object: 3c6b1f52851559210efa6575832647d838aa80b0 + last_write_checksum: sha1:4b26849973572cd836a9ccd180de41bb77196279 + pristine_git_object: 589d37a139b0a820f2f41b111191f4cc261335cb docs/models/classifierfinetuningjobintegration.md: id: 91de20176a8c last_write_checksum: sha1:e49a7c082300eb4d3106e96b21ebc6860060b8c3 @@ -560,8 +560,8 @@ trackedFiles: pristine_git_object: ccadc623493bfa946dc2cccf894364b1e6b8b452 docs/models/classifiertrainingparameters.md: id: 9370e1ccd3d5 - last_write_checksum: sha1:03f7c32717792966afdec50cb9dc1c85bb99dd84 - pristine_git_object: 3b6f3be6942bbcf56261f773864a518d16923880 + last_write_checksum: sha1:31a490471292a397e7e7526f2f724fcb743e65d1 + pristine_git_object: 6c6da1bd74aa8c67cc40307a88ffac1db1957f3a docs/models/codeinterpretertool.md: id: f009740c6e54 last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad @@ -588,12 +588,12 @@ trackedFiles: pristine_git_object: 26bcdb1700c8e8ce52c93da302e7c05e97935091 docs/models/completionfinetuningjob.md: id: 13c69dd18690 - last_write_checksum: sha1:b77e82f00f851034999986ff67aea5b0b558fbd2 - pristine_git_object: 83c0ae7e551e1f70df8dad4dce75ad20fe2b7ae7 + last_write_checksum: sha1:6fe9defa896540ae0c92af5a15f2b8f16bd1c680 + pristine_git_object: c022fbfacf251008fb8dd3400e9ca3d718eac89e docs/models/completionfinetuningjobdetails.md: id: b285f80afd59 - last_write_checksum: sha1:6ced5483d8249d7e8f502ec3f53f45d76e348003 - pristine_git_object: 3c54e874bcd968a9d5d9c8b3285632ba71364763 + last_write_checksum: sha1:7c6bff4e32e3699fb5bfac86292c6606bb47c953 + pristine_git_object: e092e51022fcc6c6a9329d14ab2c3ed8a15fd4e3 docs/models/completionfinetuningjobdetailsintegration.md: id: 27662795c95f last_write_checksum: sha1:655f03341ad1b590ec451288607cec61024bfefc @@ -604,8 +604,8 @@ trackedFiles: pristine_git_object: c6bd67cde1d1628aa3efc4a53fa8487a009aa129 docs/models/completionfinetuningjobdetailsstatus.md: id: b1b717a4e256 - last_write_checksum: sha1:bcb7e6d9345ba6eea99dc8e0d3b5e2de959e8a7a - pristine_git_object: 6c7a097932391e0524c15c50f989c9d4803aee22 + last_write_checksum: sha1:41fdb748129168280171af63e18e6ca1f525872a + pristine_git_object: 6de580b814933cbb51646e859cc6f8369072cba0 docs/models/completionfinetuningjobintegration.md: id: 392ffc2cdef2 last_write_checksum: sha1:53540da44e0edbad5d4085f81ded159dbc582a6c @@ -628,8 +628,8 @@ trackedFiles: pristine_git_object: 3e8c30ec1199363880991e0f8c631d32bb84a980 docs/models/completiontrainingparameters.md: id: b716b0195d39 - last_write_checksum: sha1:1d8d7c469f933ea741ec15c8b9ef8b986e0ca95e - pristine_git_object: 4746a95df18c78331f572425a16b2b3dcbc2df4c + last_write_checksum: sha1:e143de81ddb8411db75c7b83c503c7bd444aea6d + pristine_git_object: 9228221e4d6a15ffdeb1b8eeae229bee97c7f1e2 docs/models/confidencescoresgranularity.md: id: 76a175c65878 last_write_checksum: sha1:5287635d80d2f4e285cacfd0f571d3f06c01e962 @@ -880,8 +880,8 @@ trackedFiles: pristine_git_object: e45d57bc9eea6f192d0cc0258e5d31e8409dd00d docs/models/createbatchjobrequest.md: id: e79afe8f495c - last_write_checksum: sha1:6cedce49f3108b9d5bc80e6d11712c594f2d9e50 - pristine_git_object: d094e2d518b31ada68c282241af3aa1483e98ff6 + last_write_checksum: sha1:35f67b131b7027d9d62bb829cb2bbfcb5b22b066 + pristine_git_object: 1f27a56351f8dc2eb31a8a7dca3777cb9fc9abcd docs/models/createcampaignrequest.md: id: fe54d07fe49b last_write_checksum: sha1:fa1ea12391459548b455fb5ad22c4704415d6e5c @@ -922,6 +922,10 @@ trackedFiles: id: c12cba110d76 last_write_checksum: sha1:38c125d3aff11137dbab5b6b1c430c892ff897cb pristine_git_object: 502afa7b708f40698f443dc76e504cc6324916a9 + docs/models/createingestionpipelineconfigurationrequest.md: + id: fec0e339a487 + last_write_checksum: sha1:f9ff3328d684fff5fd86fe40efca9d65db0d827f + pristine_git_object: 4b2febcea3de867d6fecb8d297c9e31a07c9b2b2 docs/models/createjudgerequest.md: id: 13683829ce5d last_write_checksum: sha1:84122cf178b65c87a11a9c012d8d066441e2401d @@ -1032,16 +1036,16 @@ trackedFiles: pristine_git_object: 4557d3c603d6a0b6ae2873e2ac11cca58604849b docs/models/deletefileresponse.md: id: ab3aa44589a0 - last_write_checksum: sha1:47ebc2474e4725e9ecb0f0d5940c604d9a82a4df - pristine_git_object: 188e2504606b051674352339c6aa999116a43b61 + last_write_checksum: sha1:6d6ff32f1a9a6caf26eaf590fa78c0f9efb2be9d + pristine_git_object: 2c3e1c2373f89425d1782d902313974a264533d3 docs/models/deletejudgev1observabilityjudgesjudgeiddeleterequest.md: id: 9031fd7f46f4 last_write_checksum: sha1:6879788359096a08d1adc32320e63f3657f1a2dd pristine_git_object: 44042efca294d38b53502e18fc574cf5dc67ab8a docs/models/deletemodelresponse.md: id: a5a703ee49a7 - last_write_checksum: sha1:cb8ef720c216ec0f9ae5a8663052e0602d3a2536 - pristine_git_object: d8bd2f32f83840769942c8c27dd9401b34515ea8 + last_write_checksum: sha1:37f9728cb9dcb2d1c6aa44b24000e197997b08c0 + pristine_git_object: 3a9f853b774c50ed29557294c58758149caa6728 docs/models/deletemodelv1modelsmodeliddeleterequest.md: id: c838cee0f093 last_write_checksum: sha1:e5b6d18b4f8ab91630ae34a4f50f01e536e08d99 @@ -1580,8 +1584,8 @@ trackedFiles: pristine_git_object: 57ed27ab3b1430514797dd0073bc87b31e5e3815 docs/models/jobmetadata.md: id: 1f8e4c2f49e5 - last_write_checksum: sha1:a29ec10cd129b955672f60aaf526905780afe6b6 - pristine_git_object: 5d8a89ddc6b401a80e23d51cb378cdac5d4eb342 + last_write_checksum: sha1:f5365977a4874f5ea142c80274f79d2cdaddee67 + pristine_git_object: 2c289a3bda1a37a35853c176f5cd9a28dc6a42c2 docs/models/jobsapiroutesbatchcancelbatchjobrequest.md: id: 798cb1ca1385 last_write_checksum: sha1:67e8bda117608aee0e09a702a1ef8a4b03c40b68 @@ -2072,8 +2076,8 @@ trackedFiles: pristine_git_object: 0fc55052cdf2360131c0adcec93a732e2b0f78c5 docs/models/ocrrequest.md: id: 6862a3fc2d0f - last_write_checksum: sha1:d1e42525dabe16676e8579f463001a6a0023ab37 - pristine_git_object: f5a9cd596b56ed03d75e29a4db2042642fb48e9f + last_write_checksum: sha1:2ea2303ff17a962fe38a64f20f43ea0986e29cc4 + pristine_git_object: 54cea7c1359b338c552fdfd321abd2fd137602df docs/models/ocrresponse.md: id: 30042328fb78 last_write_checksum: sha1:8e4a4ae404ea752f3e9f1108c2a5f89ed6cfb143 @@ -3160,8 +3164,8 @@ trackedFiles: pristine_git_object: f02ea6cd7f7405763edb09dcece22e65028e8fbb docs/sdks/batchjobs/README.md: id: a3b8043c6336 - last_write_checksum: sha1:ecf3800c83f9455471766e0f20a07192e76a736e - pristine_git_object: 3e082340c7c8740bd6acd6143dc35a940145ccb6 + last_write_checksum: sha1:ca7b55fb1705fa127f1750ec41bf31bc1f05c37d + pristine_git_object: b9655075680d5046d4b10d10de77d6b7b2ccea23 docs/sdks/betaagents/README.md: id: 5df79b1612d8 last_write_checksum: sha1:6d14ffeace9a068f45ed9c62ee6663dc3768239f @@ -3232,8 +3236,8 @@ trackedFiles: pristine_git_object: 4262b3a9833180ce86da43a26ee7ab27403f2cd0 docs/sdks/ingestionpipelineconfigurations/README.md: id: ead2af7afd1c - last_write_checksum: sha1:27a44e0a0e7ef48fa3053c975d15e5012bf8e13e - pristine_git_object: 30457be25c61740bfccdcb06e91aaaa7eb0076d9 + last_write_checksum: sha1:2baf7ae9c75ddf4579abe41029ae44fcde674940 + pristine_git_object: b6edd8b330651e72c8e5a2f63e7751d274d76144 docs/sdks/judges/README.md: id: 330e067ff8b7 last_write_checksum: sha1:e21c7f2201ab3e2ed14c5be687e5291f7c6ee9cb @@ -3252,8 +3256,8 @@ trackedFiles: pristine_git_object: f585dcbeadeb87d5634a505450f3599af21df155 docs/sdks/ocr/README.md: id: 545e35d2613e - last_write_checksum: sha1:e3b41d5e998bf5246aaf8715509204b37bd892e8 - pristine_git_object: ca3b795d627bc820dcaa90afb744b8b3e90dd454 + last_write_checksum: sha1:be72cd3b23779c9538f01ed718be7c44ae43c775 + pristine_git_object: 533b1bb20d121df7feb586680f20a5349b46acfa docs/sdks/records/README.md: id: db86bab024d3 last_write_checksum: sha1:2ef5b164016e9b40c27d8a4915aeb8d3d2ed42c7 @@ -3312,8 +3316,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:4393e3e6f74c2ed5e75e3ff261122e66c7b56cfe - pristine_git_object: 6f1030ba4606181e6bb3be3fa59e9f6539c295a3 + last_write_checksum: sha1:3f85800403ec2b5cb78ad7dd638af82c06003bac + pristine_git_object: cc33682c7c90bec34206abd2711245a7f7993a5b src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d @@ -3336,8 +3340,8 @@ trackedFiles: pristine_git_object: 7e36fd0d73ebeb873f74f4109896a6cf3bb7d2ba src/mistralai/client/batch_jobs.py: id: 3423fec25840 - last_write_checksum: sha1:ae829e85bfc6194483f8fa2185e8634806a9cb58 - pristine_git_object: 9c6fd9c268e0d242c63277812bd0b0224ac61475 + last_write_checksum: sha1:164b956e7cc6672dd6ec76e9217dc1e655ecba8f + pristine_git_object: de8147f57352420d941e0ca34eac65641e185cac src/mistralai/client/beta.py: id: 981417f45147 last_write_checksum: sha1:1f6972862310651111b52027dd8b4c5519adadfd @@ -3448,8 +3452,8 @@ trackedFiles: pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 src/mistralai/client/ingestion_pipeline_configurations.py: id: f5a994272058 - last_write_checksum: sha1:c1fcdadd2d2fc9391dee1eb8ede14fa5ef5c5baf - pristine_git_object: e795a8ab2f4acaee98203eab16a142521d47abbd + last_write_checksum: sha1:d89828313f35c5f76b05b1f5ab3c09195a2a5534 + pristine_git_object: c94068d4b183837b0376d7b7ca4c70ab7d32fc7f src/mistralai/client/judges.py: id: b6024a41ecb4 last_write_checksum: sha1:f79c7d8e28e343cd699cf36a6d53165cc54d8da2 @@ -3464,8 +3468,8 @@ trackedFiles: pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:5efc594476b39e675a1fe5bf8210629ab2fdeeaa - pristine_git_object: 1b9d07bb37b59bae830c2f5c56c1ee6d96dc6e6f + last_write_checksum: sha1:5d43891217a9fa585a7960174189f536986a584a + pristine_git_object: b60ab7c2c269745cd1e5ee32304e8aef82b164fc src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -3780,12 +3784,12 @@ trackedFiles: pristine_git_object: 35d557aa6c122efe7fd300233f5837e69302fc33 src/mistralai/client/models/classifierfinetuningjob.py: id: a244d5f2afc5 - last_write_checksum: sha1:b65b4bab42100c8e00821e6f81e03d2efe039dde - pristine_git_object: 5a5f8a482b3eca6948bd58a550a81eda36da83e2 + last_write_checksum: sha1:70194835716d3499c0ba695e978f095eaeba9556 + pristine_git_object: 05de88c794b3ada262a9de2386d3107fd6f86ee6 src/mistralai/client/models/classifierfinetuningjobdetails.py: id: 75c5dee8df2e - last_write_checksum: sha1:a1f4c81b573aa48a3b1558b07fa43dc124fede88 - pristine_git_object: dcdd62b3d2311f633908cfc065701a6464557d30 + last_write_checksum: sha1:d48adf952a85493d565a039bd0e67e34b479df24 + pristine_git_object: 98cdc81022ed2250535f59abbb348cf1237564f8 src/mistralai/client/models/classifiertarget.py: id: 2177d51d9dcf last_write_checksum: sha1:ea159e369ba3dcaada53eec102ec37234fa14670 @@ -3796,8 +3800,8 @@ trackedFiles: pristine_git_object: 8ce7c0ca167b38ebaf1e5fc6393ab56d9f142cfa src/mistralai/client/models/classifiertrainingparameters.py: id: 4000b05e3b8d - last_write_checksum: sha1:c2279b1a67b20f0f2643a0fbe5f1a01c6ba72f49 - pristine_git_object: 3a9576c830163d351b5d8f6b66bb612fca12b844 + last_write_checksum: sha1:1d639da446bf3e2df7576f4320b0d0e2dbdfff8d + pristine_git_object: 5d1d1f8f3adad438f83619f61e3e396aa3b65d15 src/mistralai/client/models/codeinterpretertool.py: id: 950cd8f4ad49 last_write_checksum: sha1:248d6e6c1906303f03eb4f29429227a7d39679a2 @@ -3824,20 +3828,20 @@ trackedFiles: pristine_git_object: 9b420ed73a496a0bfd0309422992178332ec6b48 src/mistralai/client/models/completionfinetuningjob.py: id: c242237efe9b - last_write_checksum: sha1:653d253e02c252ece805d0172d7e214c474fd074 - pristine_git_object: bbcf773217c3d7951b030b7d248b04b30dec17c8 + last_write_checksum: sha1:36f1d95e323f90b723ab0d96854d526cdf972e73 + pristine_git_object: ff94ed5fdb46a1d6b33d68412601eb09b0771400 src/mistralai/client/models/completionfinetuningjobdetails.py: id: e8379265af48 - last_write_checksum: sha1:71a05ed146d634c6aa3241a2eacbd3d4d4245a7d - pristine_git_object: 8aa8b75da38a73c3857d90d7f7a560a18905507b + last_write_checksum: sha1:2179c2fd436674da7dd6968630b1f833e71fdb82 + pristine_git_object: 490982cd8aa74f2379c48a27c0dc4605d19cf823 src/mistralai/client/models/completionresponsestreamchoice.py: id: 5969a6bc07f3 last_write_checksum: sha1:4a1cd9adf6558faf84f873313210e9ae448c287b pristine_git_object: ef1a106bdbde4eba5de9342a9418413daa08c0da src/mistralai/client/models/completiontrainingparameters.py: id: be202ea0d5a6 - last_write_checksum: sha1:b0c6896368230fd499799cc42b25f9fd51a4d0a1 - pristine_git_object: b91ec9dfd51b8e6fa208ef54dc2a22437df3a22d + last_write_checksum: sha1:fe9420a42d598d1a6ae15ff0d35bbfad4f56e7b8 + pristine_git_object: 3b99a69322ac18cfda3df0d4726d218063092ae0 src/mistralai/client/models/connectioncredentials.py: id: 2f4a79b452fb last_write_checksum: sha1:2183abeb08ce54a985d531baac5f67b84f42417d @@ -4016,8 +4020,8 @@ trackedFiles: pristine_git_object: b434619d8c161f74453e2546986e24ea802269e8 src/mistralai/client/models/createbatchjobrequest.py: id: 56e24cd24e98 - last_write_checksum: sha1:9061e5f387d98c2c2f624efafd6ef178dfad6b43 - pristine_git_object: 6ff1e4964a7f37476074e40522d476920efd4249 + last_write_checksum: sha1:8f3af5306ce986bde39b315e19947d1f21cfe0e1 + pristine_git_object: c74c13815aae904b0b8da9c864edbf41d891cc6a src/mistralai/client/models/createcampaignrequest.py: id: 60012b559aee last_write_checksum: sha1:b45a2ee90bf901bec844aa20e9184ca1afba4172 @@ -4046,6 +4050,10 @@ trackedFiles: id: 0814afcf63bb last_write_checksum: sha1:a69ba08cf88aedc6c478cc8083cdd33d4f0ca815 pristine_git_object: a3f6cd61bec7eab9f734906b6ef1758525fd2d06 + src/mistralai/client/models/createingestionpipelineconfigurationrequest.py: + id: 480f219c27e5 + last_write_checksum: sha1:f768769b0b12daea4cc97b49691bb402d7b16453 + pristine_git_object: fd04b72f274b025ea830fb565220ceae409acdbd src/mistralai/client/models/createjudgerequest.py: id: e606837a626e last_write_checksum: sha1:d5c16104089075af1b8b2fe922006aea9d74b0e3 @@ -4168,8 +4176,8 @@ trackedFiles: pristine_git_object: ffd0e0d015e38e5f6113da036ebeba98441444f4 src/mistralai/client/models/deletemodelresponse.py: id: 8957175b7482 - last_write_checksum: sha1:0b24f0b36dc12ccaac5ed628357aa9a9e3c30f27 - pristine_git_object: 4bc6c5e678b66ac04f9a08b27cf392a2903a96a6 + last_write_checksum: sha1:f5cef2da79834be2cbd72c4bd37c94aa4ef5abb2 + pristine_git_object: 1e65e08f881d1c57b8ea61c7db5551be964b47f6 src/mistralai/client/models/deltamessage.py: id: 68f53d67a140 last_write_checksum: sha1:5653c52c448643feab36e03ba2c73b602438149f @@ -4636,8 +4644,8 @@ trackedFiles: pristine_git_object: e5f9cccf174d8e73c42e8ee4aa294b43e1ad6cf5 src/mistralai/client/models/jobmetadata.py: id: cfbdde7fc0a2 - last_write_checksum: sha1:efe10ba4aad0a0e0befd94525b73ab2194e43be8 - pristine_git_object: 8409872bc3149d28558bfd23e85196169499c539 + last_write_checksum: sha1:7048bbb5be8434a39170b428f9211a0455d32dd5 + pristine_git_object: deddb4e1f8e0bd85b5a122e2dbd523c6a458b9b4 src/mistralai/client/models/jobs_api_routes_batch_cancel_batch_jobop.py: id: b56cb6c17c95 last_write_checksum: sha1:21b5794f110c53691654d7195201f9a4b7793f21 @@ -5052,8 +5060,8 @@ trackedFiles: pristine_git_object: d77661aad5832248ab66bfb3c7bf48bfd2910303 src/mistralai/client/models/ocrrequest.py: id: 36f204c64074 - last_write_checksum: sha1:95a8b65a08962c207c9c5458a294451abfbc2255 - pristine_git_object: 7f1adc40222d0d8ebb70a9108b3b973965c0d732 + last_write_checksum: sha1:032a1fcd9eb0a6c0a4249772c2e5790705ee2b28 + pristine_git_object: 2a16e7128eeb7f262bb1f80633a9a50d02a093b5 src/mistralai/client/models/ocrresponse.py: id: 2fdfc881ca56 last_write_checksum: sha1:8e496f6122ea0798df0d23f50ea3046a29f0f8db @@ -5936,8 +5944,8 @@ trackedFiles: pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 src/mistralai/client/ocr.py: id: 2f804a12fc62 - last_write_checksum: sha1:1466dcd0033799227a2b5be7d2e4741a061e08a4 - pristine_git_object: 8a13ca43083a9588fe05cde7e4a29978aaeab003 + last_write_checksum: sha1:37808f62074f238e582288e3abbe9b0f0756abab + pristine_git_object: 7ecbaae9756efc82b0e419617911c45b564dd130 src/mistralai/client/py.typed: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -6394,7 +6402,7 @@ examples: created_by_me: false responses: "200": - application/json: {"object": "list", "total": 843585} + application/json: {"data": [{"id": "26eef0fc-3789-443c-b2ac-b2993519b4b7", "auto_start": true, "model": "Fortwo", "status": "FAILED_VALIDATION", "created_at": 267488, "modified_at": 203336, "training_files": ["3ea0059a-6d48-49ed-b22d-3cb0ef3f47fa"], "object": "job", "job_type": "completion", "hyperparameters": {"learning_rate": 0.0001}}], "object": "list", "total": 843585} jobs_api_routes_fine_tuning_create_fine_tuning_job: speakeasy-default-jobs-api-routes-fine-tuning-create-fine-tuning-job: requestBody: @@ -8601,9 +8609,21 @@ examples: responses: "200": application/json: [{"id": "bf1614ea-c74f-4b49-9415-f199d33c3281", "name": "", "created_at": "2026-06-16T10:34:55.929Z", "modified_at": "2026-04-16T03:39:05.055Z"}] + register_config_v1_rag_ingestion_pipeline_configurations_put: + speakeasy-default-register-config-v1-rag-ingestion-pipeline-configurations-put: + requestBody: + application/json: {"name": ""} + responses: + "200": + application/json: {"id": "18c459f4-028b-430d-b3b1-a9cc0d558710", "name": "", "created_at": "2026-08-09T11:37:55.676Z", "modified_at": "2025-11-21T07:06:21.204Z"} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.observability.chat_completion_events.search()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.beta.observability.chat_completion_events.fetch()`: `response.extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.beta.observability.chat_completion_events.fetch_similar_events()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.beta.observability.campaigns.list_events()`: `response.completion_events.results[].extra_fields.Map.union(Map)` **Added** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow_registration()`: `request.encoded_input` **Removed** (Breaking ⚠️)\n* `mistral.workflows.execute_workflow()`: `request.encoded_input` **Removed** (Breaking ⚠️)\n* `mistral.chat.complete()`: `request.prompt_cache_key` **Added**\n* `mistral.beta.connectors.update()`: \n * `request.title` **Added**\n * `response.title` **Added**\n* `mistral.beta.connectors.get()`: `response.title` **Added**\n* `mistral.chat.stream()`: `request.prompt_cache_key` **Added**\n* `mistral.fim.complete()`: `request.prompt_cache_key` **Added**\n* `mistral.fim.stream()`: `request.prompt_cache_key` **Added**\n* `mistral.agents.complete()`: `request.prompt_cache_key` **Added**\n* `mistral.agents.stream()`: `request.prompt_cache_key` **Added**\n* `mistral.beta.connectors.list()`: `response.items[].title` **Added**\n* `mistral.beta.connectors.create()`: \n * `request.title` **Added**\n * `response.title` **Added**\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.ocr.process()`: `request.id` **Removed** (Breaking ⚠️) + * `mistral.beta.rag.ingestion_pipeline_configurations.register()`: **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 6143d51b..1a5c0cb4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.2 + version: 2.4.3 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 73c113e6..7e33b44d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5f84708f9fc191bedfec3c08195993526479d6c4c631f20d9784bb4b3625671a - sourceBlobDigest: sha256:6f303b1cf1f1c8d2c00a2db79b73c56f37a2daffeef4db960e32a7b9f4d857df + sourceRevisionDigest: sha256:224619b477164e1a1768ee73fdda28b4ab994bad22ed713e2b23397ab12f3b57 + sourceBlobDigest: sha256:5148633458f3efeb064e4d6e113e906dd6c5a5b4a667e865c2a33c663b98835e tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:5f84708f9fc191bedfec3c08195993526479d6c4c631f20d9784bb4b3625671a - sourceBlobDigest: sha256:6f303b1cf1f1c8d2c00a2db79b73c56f37a2daffeef4db960e32a7b9f4d857df + sourceRevisionDigest: sha256:224619b477164e1a1768ee73fdda28b4ab994bad22ed713e2b23397ab12f3b57 + sourceBlobDigest: sha256:5148633458f3efeb064e4d6e113e906dd6c5a5b4a667e865c2a33c663b98835e codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:9db12a79324a0a57052aacff8bc5e08efee07e0f4e79ff061e027ff8b0969efd + codeSamplesRevisionDigest: sha256:e187b17d9a82818b60c5df49bccb51e58acbb250087df04d9957c6502cc2bcdc workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/README-PYPI.md b/README-PYPI.md index b8985d3a..4e011ef4 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -632,6 +632,7 @@ print(res.choices[0].message.content) ### [Beta.Rag.IngestionPipelineConfigurations](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md) * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations +* [register](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config ### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) @@ -954,8 +955,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 112 of 179 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 179 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 113 of 180 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 180 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index 899efa9d..36fbef50 100644 --- a/README.md +++ b/README.md @@ -632,6 +632,7 @@ print(res.choices[0].message.content) ### [Beta.Rag.IngestionPipelineConfigurations](docs/sdks/ingestionpipelineconfigurations/README.md) * [list](docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations +* [register](docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config ### [Chat](docs/sdks/chat/README.md) @@ -954,8 +955,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 112 of 179 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 179 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 113 of 180 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 180 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 5ece32ff..511efda4 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -608,4 +608,14 @@ Based on: ### Generated - [python v2.4.2] . ### Releases -- [PyPI v2.4.2] https://pypi.org/project/mistralai/2.4.2 - . \ No newline at end of file +- [PyPI v2.4.2] https://pypi.org/project/mistralai/2.4.2 - . + +## 2026-04-27 12:18:00 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.3] . +### Releases +- [PyPI v2.4.3] https://pypi.org/project/mistralai/2.4.3 - . \ No newline at end of file diff --git a/docs/models/classifierfinetuningjob.md b/docs/models/classifierfinetuningjob.md index 369756ba..123a51d8 100644 --- a/docs/models/classifierfinetuningjob.md +++ b/docs/models/classifierfinetuningjob.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the job. | -| `auto_start` | *bool* | :heavy_check_mark: | N/A | -| `model` | *str* | :heavy_check_mark: | N/A | -| `status` | [models.ClassifierFineTuningJobStatus](../models/classifierfinetuningjobstatus.md) | :heavy_check_mark: | The current status of the fine-tuning job. | -| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was created. | -| `modified_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. | -| `training_files` | List[*str*] | :heavy_check_mark: | A list containing the IDs of uploaded files that contain training data. | -| `validation_files` | List[*str*] | :heavy_minus_sign: | A list containing the IDs of uploaded files that contain validation data. | -| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | The object type of the fine-tuning job. | -| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. | -| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | -| `integrations` | List[[models.ClassifierFineTuningJobIntegration](../models/classifierfinetuningjobintegration.md)] | :heavy_minus_sign: | A list of integrations enabled for your fine-tuning job. | -| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Total number of tokens trained. | -| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | -| `job_type` | *Literal["classifier"]* | :heavy_check_mark: | The type of job (`FT` for fine-tuning). | -| `hyperparameters` | [models.ClassifierTrainingParameters](../models/classifiertrainingparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the job. | +| `auto_start` | *bool* | :heavy_check_mark: | N/A | +| `model` | *str* | :heavy_check_mark: | N/A | +| `status` | [models.ClassifierFineTuningJobStatus](../models/classifierfinetuningjobstatus.md) | :heavy_check_mark: | The current status of the fine-tuning job. | +| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was created. | +| `modified_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. | +| `training_files` | List[*str*] | :heavy_check_mark: | A list containing the IDs of uploaded files that contain training data. | +| `validation_files` | List[*str*] | :heavy_minus_sign: | A list containing the IDs of uploaded files that contain validation data. | +| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | The object type of the fine-tuning job. | +| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. | +| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `"my-great-model"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`. | +| `integrations` | List[[models.ClassifierFineTuningJobIntegration](../models/classifierfinetuningjobintegration.md)] | :heavy_minus_sign: | A list of integrations enabled for your fine-tuning job. | +| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Total number of tokens trained. | +| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | +| `job_type` | *Literal["classifier"]* | :heavy_check_mark: | The type of job (`FT` for fine-tuning). | +| `hyperparameters` | [models.ClassifierTrainingParameters](../models/classifiertrainingparameters.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/classifierfinetuningjobdetails.md b/docs/models/classifierfinetuningjobdetails.md index c5efdf1c..d4a17eca 100644 --- a/docs/models/classifierfinetuningjobdetails.md +++ b/docs/models/classifierfinetuningjobdetails.md @@ -3,24 +3,24 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `auto_start` | *bool* | :heavy_check_mark: | N/A | -| `model` | *str* | :heavy_check_mark: | N/A | -| `status` | [models.ClassifierFineTuningJobDetailsStatus](../models/classifierfinetuningjobdetailsstatus.md) | :heavy_check_mark: | N/A | -| `created_at` | *int* | :heavy_check_mark: | N/A | -| `modified_at` | *int* | :heavy_check_mark: | N/A | -| `training_files` | List[*str*] | :heavy_check_mark: | N/A | -| `validation_files` | List[*str*] | :heavy_minus_sign: | N/A | -| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | N/A | -| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `integrations` | List[[models.ClassifierFineTuningJobDetailsIntegration](../models/classifierfinetuningjobdetailsintegration.md)] | :heavy_minus_sign: | N/A | -| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | -| `job_type` | *Literal["classifier"]* | :heavy_check_mark: | N/A | -| `hyperparameters` | [models.ClassifierTrainingParameters](../models/classifiertrainingparameters.md) | :heavy_check_mark: | N/A | -| `events` | List[[models.Event](../models/event.md)] | :heavy_minus_sign: | Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here. | -| `checkpoints` | List[[models.Checkpoint](../models/checkpoint.md)] | :heavy_minus_sign: | N/A | -| `classifier_targets` | List[[models.ClassifierTargetResult](../models/classifiertargetresult.md)] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the job. | +| `auto_start` | *bool* | :heavy_check_mark: | N/A | +| `model` | *str* | :heavy_check_mark: | N/A | +| `status` | [models.ClassifierFineTuningJobDetailsStatus](../models/classifierfinetuningjobdetailsstatus.md) | :heavy_check_mark: | The current status of the fine-tuning job. | +| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was created. | +| `modified_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. | +| `training_files` | List[*str*] | :heavy_check_mark: | A list containing the IDs of uploaded files that contain training data. | +| `validation_files` | List[*str*] | :heavy_minus_sign: | A list containing the IDs of uploaded files that contain validation data. | +| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | The object type of the fine-tuning job. | +| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. | +| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `"my-great-model"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`. | +| `integrations` | List[[models.ClassifierFineTuningJobDetailsIntegration](../models/classifierfinetuningjobdetailsintegration.md)] | :heavy_minus_sign: | A list of integrations enabled for your fine-tuning job. | +| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Total number of tokens trained. | +| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | +| `job_type` | *Literal["classifier"]* | :heavy_check_mark: | The type of job (`FT` for fine-tuning). | +| `hyperparameters` | [models.ClassifierTrainingParameters](../models/classifiertrainingparameters.md) | :heavy_check_mark: | N/A | +| `events` | List[[models.Event](../models/event.md)] | :heavy_minus_sign: | Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here. | +| `checkpoints` | List[[models.Checkpoint](../models/checkpoint.md)] | :heavy_minus_sign: | N/A | +| `classifier_targets` | List[[models.ClassifierTargetResult](../models/classifiertargetresult.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/classifierfinetuningjobdetailsstatus.md b/docs/models/classifierfinetuningjobdetailsstatus.md index 3c6b1f52..589d37a1 100644 --- a/docs/models/classifierfinetuningjobdetailsstatus.md +++ b/docs/models/classifierfinetuningjobdetailsstatus.md @@ -1,5 +1,7 @@ # ClassifierFineTuningJobDetailsStatus +The current status of the fine-tuning job. + ## Example Usage ```python diff --git a/docs/models/classifiertrainingparameters.md b/docs/models/classifiertrainingparameters.md index 3b6f3be6..6c6da1bd 100644 --- a/docs/models/classifiertrainingparameters.md +++ b/docs/models/classifiertrainingparameters.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `training_steps` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `learning_rate` | *Optional[float]* | :heavy_minus_sign: | N/A | -| `weight_decay` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `warmup_fraction` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `epochs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `seq_len` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `training_steps` | *OptionalNullable[int]* | :heavy_minus_sign: | The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset. | +| `learning_rate` | *Optional[float]* | :heavy_minus_sign: | A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process. | +| `weight_decay` | *OptionalNullable[float]* | :heavy_minus_sign: | (Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large. | +| `warmup_fraction` | *OptionalNullable[float]* | :heavy_minus_sign: | (Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune) | +| `epochs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `seq_len` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/completionfinetuningjob.md b/docs/models/completionfinetuningjob.md index 83c0ae7e..c022fbfa 100644 --- a/docs/models/completionfinetuningjob.md +++ b/docs/models/completionfinetuningjob.md @@ -3,22 +3,22 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | The ID of the job. | -| `auto_start` | *bool* | :heavy_check_mark: | N/A | -| `model` | *str* | :heavy_check_mark: | N/A | -| `status` | [models.CompletionFineTuningJobStatus](../models/completionfinetuningjobstatus.md) | :heavy_check_mark: | The current status of the fine-tuning job. | -| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was created. | -| `modified_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. | -| `training_files` | List[*str*] | :heavy_check_mark: | A list containing the IDs of uploaded files that contain training data. | -| `validation_files` | List[*str*] | :heavy_minus_sign: | A list containing the IDs of uploaded files that contain validation data. | -| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | The object type of the fine-tuning job. | -| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. | -| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. | -| `integrations` | List[[models.CompletionFineTuningJobIntegration](../models/completionfinetuningjobintegration.md)] | :heavy_minus_sign: | A list of integrations enabled for your fine-tuning job. | -| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Total number of tokens trained. | -| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | -| `job_type` | *Literal["completion"]* | :heavy_check_mark: | The type of job (`FT` for fine-tuning). | -| `hyperparameters` | [models.CompletionTrainingParameters](../models/completiontrainingparameters.md) | :heavy_check_mark: | N/A | -| `repositories` | List[[models.CompletionFineTuningJobRepository](../models/completionfinetuningjobrepository.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the job. | +| `auto_start` | *bool* | :heavy_check_mark: | N/A | +| `model` | *str* | :heavy_check_mark: | N/A | +| `status` | [models.CompletionFineTuningJobStatus](../models/completionfinetuningjobstatus.md) | :heavy_check_mark: | The current status of the fine-tuning job. | +| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was created. | +| `modified_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. | +| `training_files` | List[*str*] | :heavy_check_mark: | A list containing the IDs of uploaded files that contain training data. | +| `validation_files` | List[*str*] | :heavy_minus_sign: | A list containing the IDs of uploaded files that contain validation data. | +| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | The object type of the fine-tuning job. | +| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. | +| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `"my-great-model"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`. | +| `integrations` | List[[models.CompletionFineTuningJobIntegration](../models/completionfinetuningjobintegration.md)] | :heavy_minus_sign: | A list of integrations enabled for your fine-tuning job. | +| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Total number of tokens trained. | +| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | +| `job_type` | *Literal["completion"]* | :heavy_check_mark: | The type of job (`FT` for fine-tuning). | +| `hyperparameters` | [models.CompletionTrainingParameters](../models/completiontrainingparameters.md) | :heavy_check_mark: | N/A | +| `repositories` | List[[models.CompletionFineTuningJobRepository](../models/completionfinetuningjobrepository.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/completionfinetuningjobdetails.md b/docs/models/completionfinetuningjobdetails.md index 3c54e874..e092e510 100644 --- a/docs/models/completionfinetuningjobdetails.md +++ b/docs/models/completionfinetuningjobdetails.md @@ -3,24 +3,24 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `auto_start` | *bool* | :heavy_check_mark: | N/A | -| `model` | *str* | :heavy_check_mark: | N/A | -| `status` | [models.CompletionFineTuningJobDetailsStatus](../models/completionfinetuningjobdetailsstatus.md) | :heavy_check_mark: | N/A | -| `created_at` | *int* | :heavy_check_mark: | N/A | -| `modified_at` | *int* | :heavy_check_mark: | N/A | -| `training_files` | List[*str*] | :heavy_check_mark: | N/A | -| `validation_files` | List[*str*] | :heavy_minus_sign: | N/A | -| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | N/A | -| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `integrations` | List[[models.CompletionFineTuningJobDetailsIntegration](../models/completionfinetuningjobdetailsintegration.md)] | :heavy_minus_sign: | N/A | -| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | -| `job_type` | *Literal["completion"]* | :heavy_check_mark: | N/A | -| `hyperparameters` | [models.CompletionTrainingParameters](../models/completiontrainingparameters.md) | :heavy_check_mark: | N/A | -| `repositories` | List[[models.CompletionFineTuningJobDetailsRepository](../models/completionfinetuningjobdetailsrepository.md)] | :heavy_minus_sign: | N/A | -| `events` | List[[models.Event](../models/event.md)] | :heavy_minus_sign: | Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here. | -| `checkpoints` | List[[models.Checkpoint](../models/checkpoint.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | The ID of the job. | +| `auto_start` | *bool* | :heavy_check_mark: | N/A | +| `model` | *str* | :heavy_check_mark: | N/A | +| `status` | [models.CompletionFineTuningJobDetailsStatus](../models/completionfinetuningjobdetailsstatus.md) | :heavy_check_mark: | The current status of the fine-tuning job. | +| `created_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was created. | +| `modified_at` | *int* | :heavy_check_mark: | The UNIX timestamp (in seconds) for when the fine-tuning job was last modified. | +| `training_files` | List[*str*] | :heavy_check_mark: | A list containing the IDs of uploaded files that contain training data. | +| `validation_files` | List[*str*] | :heavy_minus_sign: | A list containing the IDs of uploaded files that contain validation data. | +| `object` | *Optional[Literal["job"]]* | :heavy_minus_sign: | The object type of the fine-tuning job. | +| `fine_tuned_model` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running. | +| `suffix` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `"my-great-model"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`. | +| `integrations` | List[[models.CompletionFineTuningJobDetailsIntegration](../models/completionfinetuningjobdetailsintegration.md)] | :heavy_minus_sign: | A list of integrations enabled for your fine-tuning job. | +| `trained_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | Total number of tokens trained. | +| `metadata` | [OptionalNullable[models.JobMetadata]](../models/jobmetadata.md) | :heavy_minus_sign: | N/A | +| `job_type` | *Literal["completion"]* | :heavy_check_mark: | The type of job (`FT` for fine-tuning). | +| `hyperparameters` | [models.CompletionTrainingParameters](../models/completiontrainingparameters.md) | :heavy_check_mark: | N/A | +| `repositories` | List[[models.CompletionFineTuningJobDetailsRepository](../models/completionfinetuningjobdetailsrepository.md)] | :heavy_minus_sign: | N/A | +| `events` | List[[models.Event](../models/event.md)] | :heavy_minus_sign: | Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here. | +| `checkpoints` | List[[models.Checkpoint](../models/checkpoint.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/completionfinetuningjobdetailsstatus.md b/docs/models/completionfinetuningjobdetailsstatus.md index 6c7a0979..6de580b8 100644 --- a/docs/models/completionfinetuningjobdetailsstatus.md +++ b/docs/models/completionfinetuningjobdetailsstatus.md @@ -1,5 +1,7 @@ # CompletionFineTuningJobDetailsStatus +The current status of the fine-tuning job. + ## Example Usage ```python diff --git a/docs/models/completiontrainingparameters.md b/docs/models/completiontrainingparameters.md index 4746a95d..9228221e 100644 --- a/docs/models/completiontrainingparameters.md +++ b/docs/models/completiontrainingparameters.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `training_steps` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `learning_rate` | *Optional[float]* | :heavy_minus_sign: | N/A | -| `weight_decay` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `warmup_fraction` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `epochs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `seq_len` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `fim_ratio` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `training_steps` | *OptionalNullable[int]* | :heavy_minus_sign: | The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset. | +| `learning_rate` | *Optional[float]* | :heavy_minus_sign: | A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process. | +| `weight_decay` | *OptionalNullable[float]* | :heavy_minus_sign: | (Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large. | +| `warmup_fraction` | *OptionalNullable[float]* | :heavy_minus_sign: | (Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune) | +| `epochs` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `seq_len` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `fim_ratio` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createbatchjobrequest.md b/docs/models/createbatchjobrequest.md index d094e2d5..1f27a563 100644 --- a/docs/models/createbatchjobrequest.md +++ b/docs/models/createbatchjobrequest.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `input_files` | List[*str*] | :heavy_minus_sign: | The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a "body" field. An example of such file is the following: ```json {"custom_id": "0", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French cheese?"}]}} {"custom_id": "1", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French wine?"}]}} ``` | | -| `requests` | List[[models.BatchRequest](../models/batchrequest.md)] | :heavy_minus_sign: | N/A | | -| `endpoint` | [models.APIEndpoint](../models/apiendpoint.md) | :heavy_check_mark: | N/A | | -| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | The model to be used for batch inference. | **Example 1:** mistral-small-latest
**Example 2:** mistral-medium-latest | -| `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here. | | -| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | The metadata of your choice to be associated with the batch inference job. | | -| `timeout_hours` | *Optional[int]* | :heavy_minus_sign: | The timeout in hours for the batch inference job. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input_files` | List[*str*] | :heavy_minus_sign: | A list of `.jsonl` files for batch inference.
Each line must be a JSON object with a `body` field containing the request payload:
```json
{"custom_id": "0", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French cheese?"}]}}
{"custom_id": "1", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French wine?"}]}}
``` | | +| `requests` | List[[models.BatchRequest](../models/batchrequest.md)] | :heavy_minus_sign: | N/A | | +| `endpoint` | [models.APIEndpoint](../models/apiendpoint.md) | :heavy_check_mark: | N/A | | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | The model to be used for batch inference. | **Example 1:** mistral-small-latest
**Example 2:** mistral-medium-latest | +| `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here. | | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | The metadata of your choice to be associated with the batch inference job. | | +| `timeout_hours` | *Optional[int]* | :heavy_minus_sign: | The timeout in hours for the batch inference job. | | \ No newline at end of file diff --git a/docs/models/createingestionpipelineconfigurationrequest.md b/docs/models/createingestionpipelineconfigurationrequest.md new file mode 100644 index 00000000..4b2febce --- /dev/null +++ b/docs/models/createingestionpipelineconfigurationrequest.md @@ -0,0 +1,8 @@ +# CreateIngestionPipelineConfigurationRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/deletefileresponse.md b/docs/models/deletefileresponse.md index 188e2504..2c3e1c23 100644 --- a/docs/models/deletefileresponse.md +++ b/docs/models/deletefileresponse.md @@ -7,4 +7,4 @@ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | | `id` | *str* | :heavy_check_mark: | The ID of the deleted file. | 497f6eca-6276-4993-bfeb-53cbbbba6f09 | | `object` | *str* | :heavy_check_mark: | The object type that was deleted | file | -| `deleted` | *bool* | :heavy_check_mark: | The deletion status. | false | \ No newline at end of file +| `deleted` | *bool* | :heavy_check_mark: | The deletion status. | true | \ No newline at end of file diff --git a/docs/models/deletemodelresponse.md b/docs/models/deletemodelresponse.md index d8bd2f32..3a9f853b 100644 --- a/docs/models/deletemodelresponse.md +++ b/docs/models/deletemodelresponse.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | | `id` | *str* | :heavy_check_mark: | The ID of the deleted model. | ft:open-mistral-7b:587a6b29:20240514:7e773925 | -| `object` | *Optional[str]* | :heavy_minus_sign: | The object type that was deleted | | -| `deleted` | *Optional[bool]* | :heavy_minus_sign: | The deletion status | true | \ No newline at end of file +| `object` | *Optional[str]* | :heavy_minus_sign: | The object type that was deleted. | | +| `deleted` | *Optional[bool]* | :heavy_minus_sign: | The deletion status. | true | \ No newline at end of file diff --git a/docs/models/jobmetadata.md b/docs/models/jobmetadata.md index 5d8a89dd..2c289a3b 100644 --- a/docs/models/jobmetadata.md +++ b/docs/models/jobmetadata.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------- | --------------------------- | --------------------------- | --------------------------- | -| `expected_duration_seconds` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `cost` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `cost_currency` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `train_tokens_per_step` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `train_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `data_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `estimated_start_time` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `expected_duration_seconds` | *OptionalNullable[int]* | :heavy_minus_sign: | The approximated time (in seconds) for the fine-tuning process to complete. | 220 | +| `cost` | *OptionalNullable[float]* | :heavy_minus_sign: | The cost of the fine-tuning job. | 10 | +| `cost_currency` | *OptionalNullable[str]* | :heavy_minus_sign: | The currency used for the fine-tuning job cost. | EUR | +| `train_tokens_per_step` | *OptionalNullable[int]* | :heavy_minus_sign: | The number of tokens consumed by one training step. | 131072 | +| `train_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The total number of tokens used during the fine-tuning process. | 1310720 | +| `data_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The total number of tokens in the training dataset. | 305375 | +| `estimated_start_time` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/ocrrequest.md b/docs/models/ocrrequest.md index f5a9cd59..54cea7c1 100644 --- a/docs/models/ocrrequest.md +++ b/docs/models/ocrrequest.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *Nullable[str]* | :heavy_check_mark: | N/A | | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `document` | [models.DocumentUnion](../models/documentunion.md) | :heavy_check_mark: | Document to run OCR on | | | `pages` | [OptionalNullable[models.Pages]](../models/pages.md) | :heavy_minus_sign: | Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. | | | `include_image_base64` | *OptionalNullable[bool]* | :heavy_minus_sign: | Include image URLs in response | | diff --git a/docs/sdks/batchjobs/README.md b/docs/sdks/batchjobs/README.md index 3e082340..b9655075 100644 --- a/docs/sdks/batchjobs/README.md +++ b/docs/sdks/batchjobs/README.md @@ -83,16 +83,16 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `endpoint` | [models.APIEndpoint](../../models/apiendpoint.md) | :heavy_check_mark: | N/A | | -| `input_files` | List[*str*] | :heavy_minus_sign: | The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a "body" field. An example of such file is the following: ```json {"custom_id": "0", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French cheese?"}]}} {"custom_id": "1", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French wine?"}]}} ``` | | -| `requests` | List[[models.BatchRequest](../../models/batchrequest.md)] | :heavy_minus_sign: | N/A | | -| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | The model to be used for batch inference. | **Example 1:** mistral-small-latest
**Example 2:** mistral-medium-latest | -| `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here. | | -| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | The metadata of your choice to be associated with the batch inference job. | | -| `timeout_hours` | *Optional[int]* | :heavy_minus_sign: | The timeout in hours for the batch inference job. | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `endpoint` | [models.APIEndpoint](../../models/apiendpoint.md) | :heavy_check_mark: | N/A | | +| `input_files` | List[*str*] | :heavy_minus_sign: | A list of `.jsonl` files for batch inference.
Each line must be a JSON object with a `body` field containing the request payload:
```json
{"custom_id": "0", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French cheese?"}]}}
{"custom_id": "1", "body": {"max_tokens": 100, "messages": [{"role": "user", "content": "What is the best French wine?"}]}}
``` | | +| `requests` | List[[models.BatchRequest](../../models/batchrequest.md)] | :heavy_minus_sign: | N/A | | +| `model` | *OptionalNullable[str]* | :heavy_minus_sign: | The model to be used for batch inference. | **Example 1:** mistral-small-latest
**Example 2:** mistral-medium-latest | +| `agent_id` | *OptionalNullable[str]* | :heavy_minus_sign: | In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here. | | +| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | The metadata of your choice to be associated with the batch inference job. | | +| `timeout_hours` | *Optional[int]* | :heavy_minus_sign: | The timeout in hours for the batch inference job. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | ### Response diff --git a/docs/sdks/ingestionpipelineconfigurations/README.md b/docs/sdks/ingestionpipelineconfigurations/README.md index 30457be2..b6edd8b3 100644 --- a/docs/sdks/ingestionpipelineconfigurations/README.md +++ b/docs/sdks/ingestionpipelineconfigurations/README.md @@ -5,6 +5,7 @@ ### Available Operations * [list](#list) - List ingestion pipeline configurations +* [register](#register) - Register Config ## list @@ -43,4 +44,45 @@ with Mistral( | Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| errors.SDKError | 4XX, 5XX | \*/\* | + +## register + +Register an ingestion configuration. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.ingestion_pipeline_configurations.register(name="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.IngestionPipelineConfiguration](../../models/ingestionpipelineconfiguration.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/ocr/README.md b/docs/sdks/ocr/README.md index ca3b795d..533b1bb2 100644 --- a/docs/sdks/ocr/README.md +++ b/docs/sdks/ocr/README.md @@ -44,7 +44,6 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *Nullable[str]* | :heavy_check_mark: | N/A | | | `document` | [models.DocumentUnion](../../models/documentunion.md) | :heavy_check_mark: | Document to run OCR on | | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `pages` | [OptionalNullable[models.Pages]](../../models/pages.md) | :heavy_minus_sign: | Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. | | | `include_image_base64` | *OptionalNullable[bool]* | :heavy_minus_sign: | Include image URLs in response | | | `image_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | Max images to extract | | diff --git a/pyproject.toml b/pyproject.toml index 2b2a5d07..67d9e66b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.2" +version = "2.4.3" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 6f1030ba..cc33682c 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.2" +__version__: str = "2.4.3" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.2 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.3 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/batch_jobs.py b/src/mistralai/client/batch_jobs.py index 9c6fd9c2..de8147f5 100644 --- a/src/mistralai/client/batch_jobs.py +++ b/src/mistralai/client/batch_jobs.py @@ -256,7 +256,12 @@ def create( Create a new batch job, it will be queued for processing. :param endpoint: - :param input_files: The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a \"body\" field. An example of such file is the following: ```json {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} ``` + :param input_files: A list of `.jsonl` files for batch inference. + Each line must be a JSON object with a `body` field containing the request payload: + ```json + {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} + {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} + ``` :param requests: :param model: The model to be used for batch inference. :param agent_id: In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here. @@ -368,7 +373,12 @@ async def create_async( Create a new batch job, it will be queued for processing. :param endpoint: - :param input_files: The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a \"body\" field. An example of such file is the following: ```json {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} ``` + :param input_files: A list of `.jsonl` files for batch inference. + Each line must be a JSON object with a `body` field containing the request payload: + ```json + {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} + {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} + ``` :param requests: :param model: The model to be used for batch inference. :param agent_id: In case you want to use a specific agent from the **deprecated** agents api for batch inference, you can specify the agent ID here. diff --git a/src/mistralai/client/ingestion_pipeline_configurations.py b/src/mistralai/client/ingestion_pipeline_configurations.py index e795a8ab..c94068d4 100644 --- a/src/mistralai/client/ingestion_pipeline_configurations.py +++ b/src/mistralai/client/ingestion_pipeline_configurations.py @@ -7,7 +7,7 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import List, Mapping, Optional +from typing import Any, List, Mapping, Optional class IngestionPipelineConfigurations(BaseSDK): @@ -174,3 +174,207 @@ async def list_async( raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) + + def register( + self, + *, + name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IngestionPipelineConfiguration: + r"""Register Config + + Register an ingestion configuration. + + :param name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateIngestionPipelineConfigurationRequest( + name=name, + ) + + req = self._build_request( + method="PUT", + path="/v1/rag/ingestion_pipeline_configurations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + False, + "json", + models.CreateIngestionPipelineConfigurationRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_config_v1_rag_ingestion_pipeline_configurations_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.IngestionPipelineConfiguration, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def register_async( + self, + *, + name: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IngestionPipelineConfiguration: + r"""Register Config + + Register an ingestion configuration. + + :param name: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 30000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateIngestionPipelineConfigurationRequest( + name=name, + ) + + req = self._build_request_async( + method="PUT", + path="/v1/rag/ingestion_pipeline_configurations", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, + False, + False, + "json", + models.CreateIngestionPipelineConfigurationRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_config_v1_rag_ingestion_pipeline_configurations_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.IngestionPipelineConfiguration, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index 1b9d07bb..b60ab7c2 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -610,6 +610,10 @@ CreateGithubRepositoryRequest, CreateGithubRepositoryRequestTypedDict, ) + from .createingestionpipelineconfigurationrequest import ( + CreateIngestionPipelineConfigurationRequest, + CreateIngestionPipelineConfigurationRequestTypedDict, + ) from .createjudgerequest import ( CreateJudgeRequest, CreateJudgeRequestOutput, @@ -2561,6 +2565,8 @@ "CreateFineTuningJobRequestTypedDict", "CreateGithubRepositoryRequest", "CreateGithubRepositoryRequestTypedDict", + "CreateIngestionPipelineConfigurationRequest", + "CreateIngestionPipelineConfigurationRequestTypedDict", "CreateJudgeRequest", "CreateJudgeRequestOutput", "CreateJudgeRequestOutputTypedDict", @@ -4053,6 +4059,8 @@ "HyperparametersTypedDict": ".createfinetuningjobrequest", "CreateGithubRepositoryRequest": ".creategithubrepositoryrequest", "CreateGithubRepositoryRequestTypedDict": ".creategithubrepositoryrequest", + "CreateIngestionPipelineConfigurationRequest": ".createingestionpipelineconfigurationrequest", + "CreateIngestionPipelineConfigurationRequestTypedDict": ".createingestionpipelineconfigurationrequest", "CreateJudgeRequest": ".createjudgerequest", "CreateJudgeRequestOutput": ".createjudgerequest", "CreateJudgeRequestOutputTypedDict": ".createjudgerequest", diff --git a/src/mistralai/client/models/classifierfinetuningjob.py b/src/mistralai/client/models/classifierfinetuningjob.py index 5a5f8a48..05de88c7 100644 --- a/src/mistralai/client/models/classifierfinetuningjob.py +++ b/src/mistralai/client/models/classifierfinetuningjob.py @@ -87,7 +87,7 @@ class ClassifierFineTuningJobTypedDict(TypedDict): fine_tuned_model: NotRequired[Nullable[str]] r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: NotRequired[Nullable[str]] - r"""Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.""" + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: NotRequired[ Nullable[List[ClassifierFineTuningJobIntegrationTypedDict]] ] @@ -134,7 +134,7 @@ class ClassifierFineTuningJob(BaseModel): r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: OptionalNullable[str] = UNSET - r"""Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.""" + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: OptionalNullable[List[ClassifierFineTuningJobIntegration]] = UNSET r"""A list of integrations enabled for your fine-tuning job.""" diff --git a/src/mistralai/client/models/classifierfinetuningjobdetails.py b/src/mistralai/client/models/classifierfinetuningjobdetails.py index dcdd62b3..98cdc810 100644 --- a/src/mistralai/client/models/classifierfinetuningjobdetails.py +++ b/src/mistralai/client/models/classifierfinetuningjobdetails.py @@ -48,6 +48,7 @@ ], UnrecognizedStr, ] +r"""The current status of the fine-tuning job.""" ClassifierFineTuningJobDetailsIntegrationTypedDict = WandbIntegrationResultTypedDict @@ -73,24 +74,36 @@ class UnknownClassifierFineTuningJobDetailsIntegration(BaseModel): class ClassifierFineTuningJobDetailsTypedDict(TypedDict): id: str + r"""The ID of the job.""" auto_start: bool model: str status: ClassifierFineTuningJobDetailsStatus + r"""The current status of the fine-tuning job.""" created_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was created.""" modified_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was last modified.""" training_files: List[str] + r"""A list containing the IDs of uploaded files that contain training data.""" hyperparameters: ClassifierTrainingParametersTypedDict classifier_targets: List[ClassifierTargetResultTypedDict] validation_files: NotRequired[Nullable[List[str]]] + r"""A list containing the IDs of uploaded files that contain validation data.""" object: Literal["job"] + r"""The object type of the fine-tuning job.""" fine_tuned_model: NotRequired[Nullable[str]] + r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: NotRequired[Nullable[str]] + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: NotRequired[ Nullable[List[ClassifierFineTuningJobDetailsIntegrationTypedDict]] ] + r"""A list of integrations enabled for your fine-tuning job.""" trained_tokens: NotRequired[Nullable[int]] + r"""Total number of tokens trained.""" metadata: NotRequired[Nullable[JobMetadataTypedDict]] job_type: Literal["classifier"] + r"""The type of job (`FT` for fine-tuning).""" events: NotRequired[List[EventTypedDict]] r"""Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here.""" checkpoints: NotRequired[List[CheckpointTypedDict]] @@ -98,39 +111,50 @@ class ClassifierFineTuningJobDetailsTypedDict(TypedDict): class ClassifierFineTuningJobDetails(BaseModel): id: str + r"""The ID of the job.""" auto_start: bool model: str status: ClassifierFineTuningJobDetailsStatus + r"""The current status of the fine-tuning job.""" created_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was created.""" modified_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was last modified.""" training_files: List[str] + r"""A list containing the IDs of uploaded files that contain training data.""" hyperparameters: ClassifierTrainingParameters classifier_targets: List[ClassifierTargetResult] validation_files: OptionalNullable[List[str]] = UNSET + r"""A list containing the IDs of uploaded files that contain validation data.""" object: Annotated[ Annotated[Optional[Literal["job"]], AfterValidator(validate_const("job"))], pydantic.Field(alias="object"), ] = "job" + r"""The object type of the fine-tuning job.""" fine_tuned_model: OptionalNullable[str] = UNSET + r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: OptionalNullable[str] = UNSET + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: OptionalNullable[List[ClassifierFineTuningJobDetailsIntegration]] = ( UNSET ) + r"""A list of integrations enabled for your fine-tuning job.""" trained_tokens: OptionalNullable[int] = UNSET + r"""Total number of tokens trained.""" metadata: OptionalNullable[JobMetadata] = UNSET @@ -138,6 +162,7 @@ class ClassifierFineTuningJobDetails(BaseModel): Annotated[Literal["classifier"], AfterValidator(validate_const("classifier"))], pydantic.Field(alias="job_type"), ] = "classifier" + r"""The type of job (`FT` for fine-tuning).""" events: Optional[List[Event]] = None r"""Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here.""" diff --git a/src/mistralai/client/models/classifiertrainingparameters.py b/src/mistralai/client/models/classifiertrainingparameters.py index 3a9576c8..5d1d1f8f 100644 --- a/src/mistralai/client/models/classifiertrainingparameters.py +++ b/src/mistralai/client/models/classifiertrainingparameters.py @@ -16,21 +16,29 @@ class ClassifierTrainingParametersTypedDict(TypedDict): training_steps: NotRequired[Nullable[int]] + r"""The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset.""" learning_rate: NotRequired[float] + r"""A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process.""" weight_decay: NotRequired[Nullable[float]] + r"""(Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large.""" warmup_fraction: NotRequired[Nullable[float]] + r"""(Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune)""" epochs: NotRequired[Nullable[float]] seq_len: NotRequired[Nullable[int]] class ClassifierTrainingParameters(BaseModel): training_steps: OptionalNullable[int] = UNSET + r"""The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset.""" learning_rate: Optional[float] = 0.0001 + r"""A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process.""" weight_decay: OptionalNullable[float] = UNSET + r"""(Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large.""" warmup_fraction: OptionalNullable[float] = UNSET + r"""(Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune)""" epochs: OptionalNullable[float] = UNSET diff --git a/src/mistralai/client/models/completionfinetuningjob.py b/src/mistralai/client/models/completionfinetuningjob.py index bbcf7732..ff94ed5f 100644 --- a/src/mistralai/client/models/completionfinetuningjob.py +++ b/src/mistralai/client/models/completionfinetuningjob.py @@ -109,7 +109,7 @@ class CompletionFineTuningJobTypedDict(TypedDict): fine_tuned_model: NotRequired[Nullable[str]] r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: NotRequired[Nullable[str]] - r"""Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.""" + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: NotRequired[ Nullable[List[CompletionFineTuningJobIntegrationTypedDict]] ] @@ -157,7 +157,7 @@ class CompletionFineTuningJob(BaseModel): r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: OptionalNullable[str] = UNSET - r"""Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`.""" + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: OptionalNullable[List[CompletionFineTuningJobIntegration]] = UNSET r"""A list of integrations enabled for your fine-tuning job.""" diff --git a/src/mistralai/client/models/completionfinetuningjobdetails.py b/src/mistralai/client/models/completionfinetuningjobdetails.py index 8aa8b75d..490982cd 100644 --- a/src/mistralai/client/models/completionfinetuningjobdetails.py +++ b/src/mistralai/client/models/completionfinetuningjobdetails.py @@ -45,6 +45,7 @@ ], UnrecognizedStr, ] +r"""The current status of the fine-tuning job.""" CompletionFineTuningJobDetailsIntegrationTypedDict = WandbIntegrationResultTypedDict @@ -91,23 +92,35 @@ class UnknownCompletionFineTuningJobDetailsRepository(BaseModel): class CompletionFineTuningJobDetailsTypedDict(TypedDict): id: str + r"""The ID of the job.""" auto_start: bool model: str status: CompletionFineTuningJobDetailsStatus + r"""The current status of the fine-tuning job.""" created_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was created.""" modified_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was last modified.""" training_files: List[str] + r"""A list containing the IDs of uploaded files that contain training data.""" hyperparameters: CompletionTrainingParametersTypedDict validation_files: NotRequired[Nullable[List[str]]] + r"""A list containing the IDs of uploaded files that contain validation data.""" object: Literal["job"] + r"""The object type of the fine-tuning job.""" fine_tuned_model: NotRequired[Nullable[str]] + r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: NotRequired[Nullable[str]] + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: NotRequired[ Nullable[List[CompletionFineTuningJobDetailsIntegrationTypedDict]] ] + r"""A list of integrations enabled for your fine-tuning job.""" trained_tokens: NotRequired[Nullable[int]] + r"""Total number of tokens trained.""" metadata: NotRequired[Nullable[JobMetadataTypedDict]] job_type: Literal["completion"] + r"""The type of job (`FT` for fine-tuning).""" repositories: NotRequired[List[CompletionFineTuningJobDetailsRepositoryTypedDict]] events: NotRequired[List[EventTypedDict]] r"""Event items are created every time the status of a fine-tuning job changes. The timestamped list of all events is accessible here.""" @@ -116,37 +129,48 @@ class CompletionFineTuningJobDetailsTypedDict(TypedDict): class CompletionFineTuningJobDetails(BaseModel): id: str + r"""The ID of the job.""" auto_start: bool model: str status: CompletionFineTuningJobDetailsStatus + r"""The current status of the fine-tuning job.""" created_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was created.""" modified_at: int + r"""The UNIX timestamp (in seconds) for when the fine-tuning job was last modified.""" training_files: List[str] + r"""A list containing the IDs of uploaded files that contain training data.""" hyperparameters: CompletionTrainingParameters validation_files: OptionalNullable[List[str]] = UNSET + r"""A list containing the IDs of uploaded files that contain validation data.""" object: Annotated[ Annotated[Optional[Literal["job"]], AfterValidator(validate_const("job"))], pydantic.Field(alias="object"), ] = "job" + r"""The object type of the fine-tuning job.""" fine_tuned_model: OptionalNullable[str] = UNSET + r"""The name of the fine-tuned model that is being created. The value will be `null` if the fine-tuning job is still running.""" suffix: OptionalNullable[str] = UNSET + r"""Optional user-provided string inserted into the fine-tuned model name to help identify it. For example, a suffix of `\"my-great-model\"` produces a name like `ft:open-mistral-7b:abcd1234:20260101:my-great-model:efgh5678`.""" integrations: OptionalNullable[List[CompletionFineTuningJobDetailsIntegration]] = ( UNSET ) + r"""A list of integrations enabled for your fine-tuning job.""" trained_tokens: OptionalNullable[int] = UNSET + r"""Total number of tokens trained.""" metadata: OptionalNullable[JobMetadata] = UNSET @@ -154,6 +178,7 @@ class CompletionFineTuningJobDetails(BaseModel): Annotated[Literal["completion"], AfterValidator(validate_const("completion"))], pydantic.Field(alias="job_type"), ] = "completion" + r"""The type of job (`FT` for fine-tuning).""" repositories: Optional[List[CompletionFineTuningJobDetailsRepository]] = None diff --git a/src/mistralai/client/models/completiontrainingparameters.py b/src/mistralai/client/models/completiontrainingparameters.py index b91ec9df..3b99a693 100644 --- a/src/mistralai/client/models/completiontrainingparameters.py +++ b/src/mistralai/client/models/completiontrainingparameters.py @@ -16,9 +16,13 @@ class CompletionTrainingParametersTypedDict(TypedDict): training_steps: NotRequired[Nullable[int]] + r"""The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset.""" learning_rate: NotRequired[float] + r"""A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process.""" weight_decay: NotRequired[Nullable[float]] + r"""(Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large.""" warmup_fraction: NotRequired[Nullable[float]] + r"""(Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune)""" epochs: NotRequired[Nullable[float]] seq_len: NotRequired[Nullable[int]] fim_ratio: NotRequired[Nullable[float]] @@ -26,12 +30,16 @@ class CompletionTrainingParametersTypedDict(TypedDict): class CompletionTrainingParameters(BaseModel): training_steps: OptionalNullable[int] = UNSET + r"""The number of training steps to perform. A training step refers to a single update of the model weights during the fine-tuning process. This update is typically calculated using a batch of samples from the training dataset.""" learning_rate: Optional[float] = 0.0001 + r"""A parameter describing how much to adjust the pre-trained model's weights in response to the estimated error each time the weights are updated during the fine-tuning process.""" weight_decay: OptionalNullable[float] = UNSET + r"""(Advanced Usage) Weight decay adds a term to the loss function that is proportional to the sum of the squared weights. This term reduces the magnitude of the weights and prevents them from growing too large.""" warmup_fraction: OptionalNullable[float] = UNSET + r"""(Advanced Usage) A parameter that specifies the percentage of the total training steps at which the learning rate warm-up phase ends. During this phase, the learning rate gradually increases from a small value to the initial learning rate, helping to stabilize the training process and improve convergence. Similar to `pct_start` in [mistral-finetune](https://github.com/mistralai/mistral-finetune)""" epochs: OptionalNullable[float] = UNSET diff --git a/src/mistralai/client/models/createbatchjobrequest.py b/src/mistralai/client/models/createbatchjobrequest.py index 6ff1e496..c74c1381 100644 --- a/src/mistralai/client/models/createbatchjobrequest.py +++ b/src/mistralai/client/models/createbatchjobrequest.py @@ -19,7 +19,13 @@ class CreateBatchJobRequestTypedDict(TypedDict): endpoint: APIEndpoint input_files: NotRequired[Nullable[List[str]]] - r"""The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a \"body\" field. An example of such file is the following: ```json {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} ```""" + r"""A list of `.jsonl` files for batch inference. + Each line must be a JSON object with a `body` field containing the request payload: + ```json + {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} + {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} + ``` + """ requests: NotRequired[Nullable[List[BatchRequestTypedDict]]] model: NotRequired[Nullable[str]] r"""The model to be used for batch inference.""" @@ -35,7 +41,13 @@ class CreateBatchJobRequest(BaseModel): endpoint: APIEndpoint input_files: OptionalNullable[List[str]] = UNSET - r"""The list of input files to be used for batch inference, these files should be `jsonl` files, containing the input data corresponding to the bory request for the batch inference in a \"body\" field. An example of such file is the following: ```json {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} ```""" + r"""A list of `.jsonl` files for batch inference. + Each line must be a JSON object with a `body` field containing the request payload: + ```json + {\"custom_id\": \"0\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French cheese?\"}]}} + {\"custom_id\": \"1\", \"body\": {\"max_tokens\": 100, \"messages\": [{\"role\": \"user\", \"content\": \"What is the best French wine?\"}]}} + ``` + """ requests: OptionalNullable[List[BatchRequest]] = UNSET diff --git a/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py new file mode 100644 index 00000000..fd04b72f --- /dev/null +++ b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 480f219c27e5 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class CreateIngestionPipelineConfigurationRequestTypedDict(TypedDict): + name: str + + +class CreateIngestionPipelineConfigurationRequest(BaseModel): + name: str diff --git a/src/mistralai/client/models/deletemodelresponse.py b/src/mistralai/client/models/deletemodelresponse.py index 4bc6c5e6..1e65e08f 100644 --- a/src/mistralai/client/models/deletemodelresponse.py +++ b/src/mistralai/client/models/deletemodelresponse.py @@ -12,9 +12,9 @@ class DeleteModelResponseTypedDict(TypedDict): id: str r"""The ID of the deleted model.""" object: NotRequired[str] - r"""The object type that was deleted""" + r"""The object type that was deleted.""" deleted: NotRequired[bool] - r"""The deletion status""" + r"""The deletion status.""" class DeleteModelResponse(BaseModel): @@ -22,10 +22,10 @@ class DeleteModelResponse(BaseModel): r"""The ID of the deleted model.""" object: Optional[str] = "model" - r"""The object type that was deleted""" + r"""The object type that was deleted.""" deleted: Optional[bool] = True - r"""The deletion status""" + r"""The deletion status.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/jobmetadata.py b/src/mistralai/client/models/jobmetadata.py index 8409872b..deddb4e1 100644 --- a/src/mistralai/client/models/jobmetadata.py +++ b/src/mistralai/client/models/jobmetadata.py @@ -15,26 +15,38 @@ class JobMetadataTypedDict(TypedDict): expected_duration_seconds: NotRequired[Nullable[int]] + r"""The approximated time (in seconds) for the fine-tuning process to complete.""" cost: NotRequired[Nullable[float]] + r"""The cost of the fine-tuning job.""" cost_currency: NotRequired[Nullable[str]] + r"""The currency used for the fine-tuning job cost.""" train_tokens_per_step: NotRequired[Nullable[int]] + r"""The number of tokens consumed by one training step.""" train_tokens: NotRequired[Nullable[int]] + r"""The total number of tokens used during the fine-tuning process.""" data_tokens: NotRequired[Nullable[int]] + r"""The total number of tokens in the training dataset.""" estimated_start_time: NotRequired[Nullable[int]] class JobMetadata(BaseModel): expected_duration_seconds: OptionalNullable[int] = UNSET + r"""The approximated time (in seconds) for the fine-tuning process to complete.""" cost: OptionalNullable[float] = UNSET + r"""The cost of the fine-tuning job.""" cost_currency: OptionalNullable[str] = UNSET + r"""The currency used for the fine-tuning job cost.""" train_tokens_per_step: OptionalNullable[int] = UNSET + r"""The number of tokens consumed by one training step.""" train_tokens: OptionalNullable[int] = UNSET + r"""The total number of tokens used during the fine-tuning process.""" data_tokens: OptionalNullable[int] = UNSET + r"""The total number of tokens in the training dataset.""" estimated_start_time: OptionalNullable[int] = UNSET diff --git a/src/mistralai/client/models/ocrrequest.py b/src/mistralai/client/models/ocrrequest.py index 7f1adc40..2a16e712 100644 --- a/src/mistralai/client/models/ocrrequest.py +++ b/src/mistralai/client/models/ocrrequest.py @@ -55,7 +55,6 @@ class OCRRequestTypedDict(TypedDict): model: Nullable[str] document: DocumentUnionTypedDict r"""Document to run OCR on""" - id: NotRequired[str] pages: NotRequired[Nullable[PagesTypedDict]] r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" include_image_base64: NotRequired[Nullable[bool]] @@ -83,8 +82,6 @@ class OCRRequest(BaseModel): document: DocumentUnion r"""Document to run OCR on""" - id: Optional[str] = None - pages: OptionalNullable[Pages] = UNSET r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" @@ -119,7 +116,6 @@ class OCRRequest(BaseModel): def serialize_model(self, handler): optional_fields = set( [ - "id", "pages", "include_image_base64", "image_limit", diff --git a/src/mistralai/client/ocr.py b/src/mistralai/client/ocr.py index 8a13ca43..7ecbaae9 100644 --- a/src/mistralai/client/ocr.py +++ b/src/mistralai/client/ocr.py @@ -18,7 +18,6 @@ def process( *, model: Nullable[str], document: Union[models.DocumentUnion, models.DocumentUnionTypedDict], - id: Optional[str] = None, pages: OptionalNullable[Union[models.Pages, models.PagesTypedDict]] = UNSET, include_image_base64: OptionalNullable[bool] = UNSET, image_limit: OptionalNullable[int] = UNSET, @@ -45,7 +44,6 @@ def process( :param model: :param document: Document to run OCR on - :param id: :param pages: Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. :param include_image_base64: Include image URLs in response :param image_limit: Max images to extract @@ -77,7 +75,6 @@ def process( request = models.OCRRequest( model=model, - id=id, document=utils.get_pydantic_model(document, models.DocumentUnion), pages=pages, include_image_base64=include_image_base64, @@ -161,7 +158,6 @@ async def process_async( *, model: Nullable[str], document: Union[models.DocumentUnion, models.DocumentUnionTypedDict], - id: Optional[str] = None, pages: OptionalNullable[Union[models.Pages, models.PagesTypedDict]] = UNSET, include_image_base64: OptionalNullable[bool] = UNSET, image_limit: OptionalNullable[int] = UNSET, @@ -188,7 +184,6 @@ async def process_async( :param model: :param document: Document to run OCR on - :param id: :param pages: Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. :param include_image_base64: Include image URLs in response :param image_limit: Max images to extract @@ -220,7 +215,6 @@ async def process_async( request = models.OCRRequest( model=model, - id=id, document=utils.get_pydantic_model(document, models.DocumentUnion), pages=pages, include_image_base64=include_image_base64, diff --git a/uv.lock b/uv.lock index 52b3440f..462b81ce 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.2" +version = "2.4.3" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 0703589ac2c80789fb4dcb1352db45ecb3371e9c Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Wed, 29 Apr 2026 10:39:42 +0200 Subject: [PATCH 58/82] fix(extra): use asyncio.run() in tests for Python 3.14 compat (#504) * fix(extra): use asyncio.run() in tests for Python 3.14 compat Replaces asyncio.get_event_loop().run_until_complete(coro) with asyncio.run(coro) in two tests. Python 3.14 removed the implicit creation of an event loop in get_event_loop() when none is running, which caused these tests to fail. Verified passing on Python 3.11/3.12; asyncio.run() is available on 3.10+ so behavior is unchanged on 3.11/3.13. --- scripts/run_examples.sh | 1 + src/mistralai/extra/tests/test_otel_tracing.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/run_examples.sh b/scripts/run_examples.sh index 83b866fb..3411fef8 100755 --- a/scripts/run_examples.sh +++ b/scripts/run_examples.sh @@ -46,6 +46,7 @@ exclude_files=( "examples/mistral/agents/async_conversation_run_stream.py" "examples/mistral/agents/async_conversation_run_mcp.py" "examples/mistral/agents/async_conversation_run_mcp_remote.py" + "examples/mistral/agents/async_agents_no_streaming.py" "examples/mistral/audio/async_realtime_transcription_microphone.py" "examples/mistral/audio/async_realtime_transcription_stream.py" "examples/mistral/audio/async_realtime_transcription_dual_delay_microphone.py" diff --git a/src/mistralai/extra/tests/test_otel_tracing.py b/src/mistralai/extra/tests/test_otel_tracing.py index 5228c9e5..818d38e3 100644 --- a/src/mistralai/extra/tests/test_otel_tracing.py +++ b/src/mistralai/extra/tests/test_otel_tracing.py @@ -1467,7 +1467,7 @@ def get_weather(location: str) -> dict: tool=FunctionTool(function=Function(name="get_weather", parameters={})), ) - result = asyncio.get_event_loop().run_until_complete( + result = asyncio.run( create_function_result(function_call, run_tool) ) self.assertEqual(result.tool_call_id, "tc-001") @@ -1509,7 +1509,7 @@ def failing_tool(x: int) -> str: tool=FunctionTool(function=Function(name="failing_tool", parameters={})), ) - asyncio.get_event_loop().run_until_complete( + asyncio.run( create_function_result(function_call, run_tool, continue_on_fn_error=True) ) From 46c1b9801730482a249abcfbfe0f7da362d11aeb Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:04:57 +0200 Subject: [PATCH 59/82] chore(ci): use CLIENT_PIPELINE PAT for generated PRs (#500) chore(ci): use CLIENT_PIPELINE PAT for generated PRs --- .github/workflows/sdk_generation_mistralai_azure_sdk.yaml | 5 +++-- .github/workflows/sdk_generation_mistralai_gcp_sdk.yaml | 5 +++-- .github/workflows/sdk_generation_mistralai_sdk.yaml | 5 +++-- .github/workflows/sdk_publish_mistralai_sdk.yaml | 2 +- .github/workflows/update_speakeasy.yaml | 4 +++- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml index f56e1d89..d5b59b96 100644 --- a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml @@ -45,7 +45,7 @@ jobs: speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-azure-sdk secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + github_access_token: ${{ secrets.CLIENT_PIPELINE }} pypi_token: ${{ secrets.PYPI_TOKEN }} speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} @@ -56,7 +56,7 @@ jobs: - name: Find PR branch id: find-pr env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} run: | PR_BRANCH=$(gh pr list --repo ${{ github.repository }} --author "app/github-actions" \ --json headRefName,updatedAt --jq 'sort_by(.updatedAt) | reverse | .[0].headRefName // empty') @@ -67,6 +67,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: ref: ${{ steps.find-pr.outputs.branch }} + token: ${{ secrets.CLIENT_PIPELINE }} - name: Install uv if: steps.find-pr.outputs.branch != '' diff --git a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml index 2bf4e3dd..f2e33f06 100644 --- a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml @@ -45,7 +45,7 @@ jobs: speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-gcp-sdk secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + github_access_token: ${{ secrets.CLIENT_PIPELINE }} pypi_token: ${{ secrets.PYPI_TOKEN }} speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} @@ -56,7 +56,7 @@ jobs: - name: Find PR branch id: find-pr env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} run: | PR_BRANCH=$(gh pr list --repo ${{ github.repository }} --author "app/github-actions" \ --json headRefName,updatedAt --jq 'sort_by(.updatedAt) | reverse | .[0].headRefName // empty') @@ -67,6 +67,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: ref: ${{ steps.find-pr.outputs.branch }} + token: ${{ secrets.CLIENT_PIPELINE }} - name: Install uv if: steps.find-pr.outputs.branch != '' diff --git a/.github/workflows/sdk_generation_mistralai_sdk.yaml b/.github/workflows/sdk_generation_mistralai_sdk.yaml index 3f7f5f6c..d9106b95 100644 --- a/.github/workflows/sdk_generation_mistralai_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_sdk.yaml @@ -45,7 +45,7 @@ jobs: speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-sdk secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + github_access_token: ${{ secrets.CLIENT_PIPELINE }} pypi_token: ${{ secrets.PYPI_TOKEN }} speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} @@ -56,7 +56,7 @@ jobs: - name: Find PR branch id: find-pr env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} run: | PR_BRANCH=$(gh pr list --repo ${{ github.repository }} --author "app/github-actions" \ --json headRefName,updatedAt --jq 'sort_by(.updatedAt) | reverse | .[0].headRefName // empty') @@ -67,6 +67,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: ref: ${{ steps.find-pr.outputs.branch }} + token: ${{ secrets.CLIENT_PIPELINE }} - name: Install uv if: steps.find-pr.outputs.branch != '' diff --git a/.github/workflows/sdk_publish_mistralai_sdk.yaml b/.github/workflows/sdk_publish_mistralai_sdk.yaml index c3fdd9e0..3fa424df 100644 --- a/.github/workflows/sdk_publish_mistralai_sdk.yaml +++ b/.github/workflows/sdk_publish_mistralai_sdk.yaml @@ -25,6 +25,6 @@ jobs: (github.event_name == 'workflow_dispatch' && github.event.inputs.confirm_publish == 'publish') uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 secrets: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + github_access_token: ${{ secrets.CLIENT_PIPELINE }} pypi_token: ${{ secrets.PYPI_TOKEN }} speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} diff --git a/.github/workflows/update_speakeasy.yaml b/.github/workflows/update_speakeasy.yaml index 78b5317b..f0179686 100644 --- a/.github/workflows/update_speakeasy.yaml +++ b/.github/workflows/update_speakeasy.yaml @@ -27,6 +27,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 + with: + token: ${{ secrets.CLIENT_PIPELINE }} - name: Set up Python uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 @@ -102,7 +104,7 @@ jobs: --label speakeasy-update \ --assignee ${{ github.actor }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.CLIENT_PIPELINE }} - name: Comment on workflow run if: steps.check-changes.outputs.has_changes == 'false' From 40ed8dc345e647ffbbab7eb997ac9108df9f3a4b Mon Sep 17 00:00:00 2001 From: maiengineering Date: Thu, 30 Apr 2026 14:04:07 +0200 Subject: [PATCH 60/82] ## Python SDK Changes: (#506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * `mistral.beta.libraries.update()`: `request.name` **Changed** (Breaking ⚠️) * `mistral.beta.libraries.documents.update()`: `request.name` **Changed** (Breaking ⚠️) * `mistral.beta.rag.ingestion_pipeline_configurations.update_run_info()`: **Added** * `mistral.workflows.schedules.pause_schedule()`: **Added** * `mistral.workflows.schedules.resume_schedule()`: **Added** * `mistral.beta.rag.ingestion_pipeline_configurations.list()`: `response.[]` **Changed** * `mistral.beta.rag.ingestion_pipeline_configurations.register()`: * `request.pipeline_composition` **Added** * `response` **Changed** * `mistral.workflows.schedules.get_schedules()`: `response.schedules[]` **Changed** * `mistral.workflows.schedules.schedule_workflow()`: * `request.schedule.max_executions` **Added** Co-authored-by: speakeasybot --- .speakeasy/gen.lock | 329 ++++++++----- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- README-PYPI.md | 7 +- README.md | 7 +- RELEASES.md | 12 +- ...teingestionpipelineconfigurationrequest.md | 7 +- docs/models/createlibraryrequest.md | 2 +- docs/models/ingestionpipelineconfiguration.md | 7 +- ...lowsschedulesscheduleidpausepostrequest.md | 9 + docs/models/referenceid.md | 8 +- ...owsschedulesscheduleidresumepostrequest.md | 9 + docs/models/scheduledefinition.md | 27 +- docs/models/scheduledefinitionoutput.md | 32 +- docs/models/schedulefutureexecution.md | 8 + docs/models/schedulerecentexecution.md | 10 + docs/models/updatedocumentrequest.md | 2 +- docs/models/updatelibraryrequest.md | 2 +- docs/models/updateruninfo.md | 9 + ...pelineconfigurationsidruninfoputrequest.md | 9 + docs/models/workflowschedulepauserequest.md | 8 + docs/sdks/documents/README.md | 2 +- .../ingestionpipelineconfigurations/README.md | 46 ++ docs/sdks/libraries/README.md | 4 +- docs/sdks/schedules/README.md | 76 +++ src/mistralai/client/_version.py | 4 +- src/mistralai/client/accesses.py | 12 +- src/mistralai/client/agents.py | 8 +- src/mistralai/client/batch_jobs.py | 20 +- src/mistralai/client/beta_agents.py | 44 +- src/mistralai/client/campaigns.py | 24 +- src/mistralai/client/chat.py | 8 +- .../client/chat_completion_events.py | 20 +- src/mistralai/client/classifiers.py | 16 +- src/mistralai/client/connectors.py | 72 +-- src/mistralai/client/conversations.py | 44 +- src/mistralai/client/datasets.py | 60 +-- src/mistralai/client/deployments.py | 8 +- src/mistralai/client/documents.py | 44 +- src/mistralai/client/embeddings.py | 4 +- src/mistralai/client/events.py | 8 +- src/mistralai/client/executions.py | 56 +-- src/mistralai/client/fields.py | 12 +- src/mistralai/client/files.py | 24 +- src/mistralai/client/fim.py | 8 +- src/mistralai/client/fine_tuning_jobs.py | 20 +- .../ingestion_pipeline_configurations.py | 229 +++++++++- src/mistralai/client/judges.py | 24 +- src/mistralai/client/libraries.py | 28 +- src/mistralai/client/metrics.py | 4 +- src/mistralai/client/models/__init__.py | 53 +++ ...teingestionpipelineconfigurationrequest.py | 40 +- .../client/models/createlibraryrequest.py | 2 + .../models/ingestionpipelineconfiguration.py | 33 +- ...lows_schedules_schedule_id_pause_postop.py | 61 +++ src/mistralai/client/models/referencechunk.py | 4 +- ...ows_schedules_schedule_id_resume_postop.py | 61 +++ .../client/models/scheduledefinition.py | 15 +- .../client/models/scheduledefinitionoutput.py | 53 ++- .../client/models/schedulefutureexecution.py | 17 + .../client/models/schedulerecentexecution.py | 27 ++ ...peline_configurations_id_run_info_putop.py | 26 ++ .../client/models/updatedocumentrequest.py | 8 +- .../client/models/updatelibraryrequest.py | 7 +- src/mistralai/client/models/updateruninfo.py | 18 + .../models/workflowschedulepauserequest.py | 48 ++ src/mistralai/client/models_.py | 24 +- src/mistralai/client/ocr.py | 4 +- src/mistralai/client/records.py | 24 +- src/mistralai/client/runs.py | 12 +- src/mistralai/client/schedules.py | 432 +++++++++++++++++- src/mistralai/client/speech.py | 4 +- src/mistralai/client/transcriptions.py | 8 +- src/mistralai/client/voices.py | 24 +- src/mistralai/client/workflows.py | 36 +- src/mistralai/client/workflows_events.py | 8 +- 76 files changed, 1936 insertions(+), 558 deletions(-) create mode 100644 docs/models/pauseschedulev1workflowsschedulesscheduleidpausepostrequest.md create mode 100644 docs/models/resumeschedulev1workflowsschedulesscheduleidresumepostrequest.md create mode 100644 docs/models/schedulefutureexecution.md create mode 100644 docs/models/schedulerecentexecution.md create mode 100644 docs/models/updateruninfo.md create mode 100644 docs/models/updateruninfov1ragingestionpipelineconfigurationsidruninfoputrequest.md create mode 100644 docs/models/workflowschedulepauserequest.md create mode 100644 src/mistralai/client/models/pause_schedule_v1_workflows_schedules_schedule_id_pause_postop.py create mode 100644 src/mistralai/client/models/resume_schedule_v1_workflows_schedules_schedule_id_resume_postop.py create mode 100644 src/mistralai/client/models/schedulefutureexecution.py create mode 100644 src/mistralai/client/models/schedulerecentexecution.py create mode 100644 src/mistralai/client/models/update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop.py create mode 100644 src/mistralai/client/models/updateruninfo.py create mode 100644 src/mistralai/client/models/workflowschedulepauserequest.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 813bc286..b62a204c 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 98c438e66d611406c6da2e8ebfc43fc4 + docChecksum: 880172609750b5058efe2f0ff8f5c722 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.3 - configChecksum: 5a5fe525cb5b0884f4ee2e1b2f7aca6d + releaseVersion: 2.4.4 + configChecksum: d237fa5a6bc2a67b0977a61520bd85fb repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 5f70b1d2-6fdf-48ad-aeb5-7eb6ac9fa83b - pristine_commit_hash: 9da4e7675727717887f2f4ee112ff23f88a759dc - pristine_tree_hash: 56af87d1a352f0999ecd92ef1a51d558525a3eea + generation_id: 8315974b-9a57-4a9f-b6b1-a75627dc6b85 + pristine_commit_hash: 969db46e6806db3556c93296ed4c87a2b6a0c709 + pristine_tree_hash: b900e343a3b555d433748ed99095b1468250aa44 features: python: acceptHeaders: 3.0.0 @@ -924,8 +924,8 @@ trackedFiles: pristine_git_object: 502afa7b708f40698f443dc76e504cc6324916a9 docs/models/createingestionpipelineconfigurationrequest.md: id: fec0e339a487 - last_write_checksum: sha1:f9ff3328d684fff5fd86fe40efca9d65db0d827f - pristine_git_object: 4b2febcea3de867d6fecb8d297c9e31a07c9b2b2 + last_write_checksum: sha1:1a3dad0fa0f5ac30494c6207a11e027c3bf1a349 + pristine_git_object: f6aeb2105adebedd85c3242c693616b14816ec63 docs/models/createjudgerequest.md: id: 13683829ce5d last_write_checksum: sha1:84122cf178b65c87a11a9c012d8d066441e2401d @@ -936,8 +936,8 @@ trackedFiles: pristine_git_object: a72676719b90a7b840a2b21d043c61bdf83ce294 docs/models/createlibraryrequest.md: id: 8935b2ed9d13 - last_write_checksum: sha1:cfcf0edd715f9c731b0a267d1335545faaee2209 - pristine_git_object: ea70d4d8a757e8be2da3806ab125330edee4cadf + last_write_checksum: sha1:14480a2eb03a9e5076a866a21bff0dfd80bb585d + pristine_git_object: 07ff97d0cbaf4f3e260cce4b80fcbd637cc6b488 docs/models/credentialscreateorupdate.md: id: b2a0e87b0a91 last_write_checksum: sha1:6b778120a84c08601b4f2fbba368d3454204d939 @@ -1564,8 +1564,8 @@ trackedFiles: pristine_git_object: 72a586bc65f6219abed50105d9df9cb8b6ec8d02 docs/models/ingestionpipelineconfiguration.md: id: 95a1d6bf413b - last_write_checksum: sha1:d13948eacf546bd07a8cec91381536c28277144a - pristine_git_object: 5d25ab15ea52894ac28e39e8870bc8fb8043b6ed + last_write_checksum: sha1:ba9e052c6ab8b13b4108ff395ac0e20181326f0b + pristine_git_object: 16fde9c6a161526de8a86ccd330803f590285586 docs/models/inputentries.md: id: a5c647d5ad90 last_write_checksum: sha1:4231bb97837bdcff4515ae1b00ff5e7712256e53 @@ -2162,6 +2162,10 @@ trackedFiles: id: 592cf80526b8 last_write_checksum: sha1:e72a2238fe984cc4fa0d2522b462aa9ad247af78 pristine_git_object: 7ed17a697771f10febe2b893f092865b09dc04c7 + docs/models/pauseschedulev1workflowsschedulesscheduleidpausepostrequest.md: + id: 56f6ceab8262 + last_write_checksum: sha1:3b5c8e341c685a7f4b2789a9d051eef54ff8cfda + pristine_git_object: dc69416ce94c9709dda30becc7616016c397615f docs/models/payload.md: id: cd93a0338683 last_write_checksum: sha1:58bb76cb62da4c0c3c0f41965854dac205dcae3c @@ -2280,8 +2284,8 @@ trackedFiles: pristine_git_object: 0186d3c358e27d01617c982f61db0910039a049a docs/models/referenceid.md: id: 22fa492a467e - last_write_checksum: sha1:274c6c868426621086d623f14a1d5b146a7b7506 - pristine_git_object: f9769645cbbb8a59c30f60a4e0d0caec60d82ad0 + last_write_checksum: sha1:80161796acbc185876a3656ee8cbdde4df7e23d0 + pristine_git_object: 1d29397fd96b42b7dc33bd10184bef55de5ae066 docs/models/requestsource.md: id: 8857ab6025c4 last_write_checksum: sha1:5634447d01c483713dad3d6d39df182007e6181b @@ -2350,6 +2354,10 @@ trackedFiles: id: 48d4a45780a9 last_write_checksum: sha1:8e75db359f0d640a27498d20c2ea6d561c318d7e pristine_git_object: 844c5d610a9a351532d12b1a73f6c660059da76b + docs/models/resumeschedulev1workflowsschedulesscheduleidresumepostrequest.md: + id: 70bace616181 + last_write_checksum: sha1:2c13407b2c3b01bc59f486e2848fac0c3d025dc1 + pristine_git_object: e50fe6cd7baa2a65e3b74bf213196fdcd42d5472 docs/models/retrievemodelv1modelsmodelidgetrequest.md: id: ac567924689c last_write_checksum: sha1:7534c5ec5f1ae1e750c8f610f81f2106587e81a9 @@ -2380,12 +2388,16 @@ trackedFiles: pristine_git_object: 4166bef5ded04c323f5644b80305ed5bb4159fb4 docs/models/scheduledefinition.md: id: 5a795fa1c041 - last_write_checksum: sha1:542e8de454c8a75e18de51f08cff031fa2928cc2 - pristine_git_object: 4f8f8b80b6687092a5fde30366cba91f7cae5f3f + last_write_checksum: sha1:cbe6e2f2ebaf6bb52be56ffbca6b9d966fdbc2e3 + pristine_git_object: 7d0509f6263ae04d3eb99b65cef0b85adf71aeae docs/models/scheduledefinitionoutput.md: id: e5f8d9d43716 - last_write_checksum: sha1:d65378cd7873dd8aa5e60d5fc84b1ecefc5ef4e9 - pristine_git_object: c4937c6969d586f9909bab342a05afa3cf61696f + last_write_checksum: sha1:a41e2d99be8b57984e9db632fb17af0212b51e60 + pristine_git_object: 64b7b525f9f5187980711921055bff171cd218f6 + docs/models/schedulefutureexecution.md: + id: 9e732a58123f + last_write_checksum: sha1:2b88b19a82bb66a6910986e5608aef6bdb474aea + pristine_git_object: 7dfa16af938f21db25cb992477e76d276902f996 docs/models/scheduleinterval.md: id: 4792384fc173 last_write_checksum: sha1:3c73f2b3bcf44494d0ecd943cf15a592fed95493 @@ -2402,6 +2414,10 @@ trackedFiles: id: 70268cb45dae last_write_checksum: sha1:cc9778a0389b2255c8ce8433802fa327a1716980 pristine_git_object: d6cb09759e5a983434ffd094b77fd3d36ab450c3 + docs/models/schedulerecentexecution.md: + id: c093e67b0d4d + last_write_checksum: sha1:c8f57f472e2df609a23d94bf07684348bb007d04 + pristine_git_object: f849e1ae2896ee6db55c7af27f575f9f6c8c9132 docs/models/scope.md: id: c7d8338540ba last_write_checksum: sha1:08e688325601e4c4614cc6b7264ea4d2f631da36 @@ -2852,8 +2868,8 @@ trackedFiles: pristine_git_object: 8cf62617303949d2633773af0268447befb04af2 docs/models/updatedocumentrequest.md: id: ee4e094a6aa7 - last_write_checksum: sha1:4c4d774c67449402eb7e1476b9d0fef5b63f2b99 - pristine_git_object: 7e0b41b7be9f559b27a3430f46ed53d0453f6e03 + last_write_checksum: sha1:09171d42fdac0060276af58c5f036cb5714709d3 + pristine_git_object: dd06dd4b43b72ee73faf0bb2d39edf22889c0780 docs/models/updateinvocationbody.md: id: d8b3b9cca5ae last_write_checksum: sha1:0fed6d77626ec76d3584e8d38b97ee228218a390 @@ -2876,12 +2892,20 @@ trackedFiles: pristine_git_object: bfe3648d706b6c1f95b8c5515d4ee999d556fa2d docs/models/updatelibraryrequest.md: id: 2eda82f12f31 - last_write_checksum: sha1:436e08988daa8ca04ece36a4790ed84e0629b81a - pristine_git_object: aaffc5a9f0d588ff935db2ec2c079af9f162c2c3 + last_write_checksum: sha1:67b0996be205dc819aa1add249822f72a03b4c27 + pristine_git_object: 32d53eecafd52a692f5f34da54afd358b1ab55b2 docs/models/updatemodelrequest.md: id: 8eabdced3e0e last_write_checksum: sha1:96879df11c005b591f2e59975897feff8fc8656e pristine_git_object: 56b84c59c48ac135345394235c71ce77d384e33e + docs/models/updateruninfo.md: + id: 88a321690025 + last_write_checksum: sha1:29e161253e4cfe28981968a10c0a7ff153f35779 + pristine_git_object: 1f09fb3bdaf0d8f62e1cd93e437e1c314b1c0f81 + docs/models/updateruninfov1ragingestionpipelineconfigurationsidruninfoputrequest.md: + id: fef8641b24c8 + last_write_checksum: sha1:4c9532d96f40fc0b406e3c8e34b40d2b457963bf + pristine_git_object: c675adeffe4da132426b8002b45d4c290bdd97bc docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md: id: 0b7dfc68573f last_write_checksum: sha1:53d5d07d53d184d68b57185d251c8d68ff3cf4d4 @@ -3110,6 +3134,10 @@ trackedFiles: id: 4c425808aa60 last_write_checksum: sha1:d8e8aad7a91d7f8e398f7716109d436df6c4fc86 pristine_git_object: 7142185b8081d076cb3b8fcd592234d49e3e0e5a + docs/models/workflowschedulepauserequest.md: + id: 3a6d7adc379a + last_write_checksum: sha1:97b3dc2321f62497cea5f13b54c5b1d049d855d1 + pristine_git_object: 3abd719fd5b320498860757bf86776e4859dde90 docs/models/workflowschedulerequest.md: id: 5a6b71dbc1a7 last_write_checksum: sha1:d053fd9a98d217986d09f941bb3429a9b9123e39 @@ -3204,8 +3232,8 @@ trackedFiles: pristine_git_object: 941b5538a57b3b693914d6b0d2acad2e8bb47611 docs/sdks/documents/README.md: id: 9758e88a0a9d - last_write_checksum: sha1:0c5f5c460384857c687b50505076459cd0ebf4f1 - pristine_git_object: 81195b66f8e1c7ded4f37e20c74a8667013ed7d2 + last_write_checksum: sha1:c3ee7c987ddaa856fa0a2f1040a2592edb0b82f1 + pristine_git_object: 2efbc3488ec4b4b6bc5d30d9ae1b5a344a0fe79b docs/sdks/embeddings/README.md: id: 15b5b04486c1 last_write_checksum: sha1:4a279bf9bcd84a9878ef979c78b8b75af3d52f02 @@ -3236,16 +3264,16 @@ trackedFiles: pristine_git_object: 4262b3a9833180ce86da43a26ee7ab27403f2cd0 docs/sdks/ingestionpipelineconfigurations/README.md: id: ead2af7afd1c - last_write_checksum: sha1:2baf7ae9c75ddf4579abe41029ae44fcde674940 - pristine_git_object: b6edd8b330651e72c8e5a2f63e7751d274d76144 + last_write_checksum: sha1:77adda7a00ccea31ceca1aadde96141a1462dc94 + pristine_git_object: 671a7182a9fb2622b68db2826640d6eeae93e6b0 docs/sdks/judges/README.md: id: 330e067ff8b7 last_write_checksum: sha1:e21c7f2201ab3e2ed14c5be687e5291f7c6ee9cb pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 - last_write_checksum: sha1:1fc0de7c3bf00ddb7f9bc74701ee788d6fd3c9ce - pristine_git_object: 711e3b765238b940efbee69ce34e38c03d7d86dc + last_write_checksum: sha1:3cd3aef0294fb5b421a2b64baa7a53cfc1ad4f31 + pristine_git_object: 08606189680228ca4f4d30b6fc626c2d0c4b9287 docs/sdks/metrics/README.md: id: a8545d964e21 last_write_checksum: sha1:0c559bd570e162c994c6125058f3712e24bc576b @@ -3268,8 +3296,8 @@ trackedFiles: pristine_git_object: 7ed914205115222f7ade5a656541af0dba64ff28 docs/sdks/schedules/README.md: id: 2f28c809a225 - last_write_checksum: sha1:70cf78f4dd201a70da97aa86a1f5d936dfabbe13 - pristine_git_object: dd1565e04c21206cb8498f6cf5cea719ee0856ec + last_write_checksum: sha1:cb4f7d988d25d87b8c18443c6cf64b5cb31146df + pristine_git_object: 7bf59931141869fc2797586fb6cdcb8adb9f0b7b docs/sdks/speech/README.md: id: d5924688d48c last_write_checksum: sha1:7128863f5b445f343d4fde121c78de3a8ee4cc11 @@ -3316,16 +3344,16 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:3f85800403ec2b5cb78ad7dd638af82c06003bac - pristine_git_object: cc33682c7c90bec34206abd2711245a7f7993a5b + last_write_checksum: sha1:9096662e60738fa15fd58b70880e1e8dff442403 + pristine_git_object: 026fdee0423c494d6d525bd1a67d566a76c4fd7d src/mistralai/client/accesses.py: id: 76fc53bfcf59 - last_write_checksum: sha1:0c417e7a0bf9dfc523dbabee816b73d7a4d52f1d - pristine_git_object: 002f0103547db5107f4646d645b11682e220b955 + last_write_checksum: sha1:de197fbbfea8bc95f44b4e7ee1b39e68fdde8bc7 + pristine_git_object: 5d859a399cb62144f5e47ae879407907427d56fc src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:80c182c157fcd980b657f0060ca7b59ae6b0bf9c - pristine_git_object: 48c7bb995ecd9104e9df55c19fc3ecefcc05c98c + last_write_checksum: sha1:02f7e2c669dba9f1d29f41bc6427357e9d04be5c + pristine_git_object: 1bcd8c54f685630c8248243b7dbf0ad5a8aa6082 src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd @@ -3340,56 +3368,56 @@ trackedFiles: pristine_git_object: 7e36fd0d73ebeb873f74f4109896a6cf3bb7d2ba src/mistralai/client/batch_jobs.py: id: 3423fec25840 - last_write_checksum: sha1:164b956e7cc6672dd6ec76e9217dc1e655ecba8f - pristine_git_object: de8147f57352420d941e0ca34eac65641e185cac + last_write_checksum: sha1:89deea7e036f775d7d0551ef7edd550a7903ccfb + pristine_git_object: 2bf50fd3dc54ca084c026c97cac055f75d4a885a src/mistralai/client/beta.py: id: 981417f45147 last_write_checksum: sha1:1f6972862310651111b52027dd8b4c5519adadfd pristine_git_object: f9bbb5aed59e7f9505e4bba2ee9c0190d51cf626 src/mistralai/client/beta_agents.py: id: b64ad29b7174 - last_write_checksum: sha1:72a9be3966526edb69ec86d2841f45cb5fe4739e - pristine_git_object: 67d17a052718e6aec0582167f2e0c1b4b3722d7a + last_write_checksum: sha1:307dd8e2fd0e8bda707894118ce9b89d329e7964 + pristine_git_object: 64baf53b7d7757a35324c0b3b86544167f331b16 src/mistralai/client/campaigns.py: id: 9e64fcf4e60e - last_write_checksum: sha1:5fb00fbd6551d63a545e3a28a4e8d55ea5d49daf - pristine_git_object: 427bef5e086a425aaa14381aba53085681029f3e + last_write_checksum: sha1:8d4471059539934a69b9fa1f98b4cf35f1db61ab + pristine_git_object: c9f28794e32130e6ef92127316815772c6a04c71 src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:1c8c0a6001518aa5734b44854f95f8549014a419 - pristine_git_object: 5a1ff0f088a956405f9539247232df4c71c7161c + last_write_checksum: sha1:e8b8b2e745117b6d78402148121c9f5229694066 + pristine_git_object: 9deff9a0d2091c706146eb903834a354c5432ec8 src/mistralai/client/chat_completion_events.py: id: 1813f339625b - last_write_checksum: sha1:1e7ed51f7ad879b3cd903d66e52716717142e4a8 - pristine_git_object: 9d00fe4f80b3cb63828aa028b74033b2e47600df + last_write_checksum: sha1:785474540b9ddc3d3e9c7ec5011e2f25519bc8c2 + pristine_git_object: af4124f0c3e71e3f335f4c0b54d36a0b2dddcbb6 src/mistralai/client/classifiers.py: id: 26e773725732 - last_write_checksum: sha1:733bff8a462ff4190ff4c2aeb963ff153ba1ea79 - pristine_git_object: 9fd3b3a1b28b155ee397a6edb6da106408c3bade + last_write_checksum: sha1:d057b735d057147e1341953dd696fbc7110611ec + pristine_git_object: ddb2d0b1abaff5f267320779bf9ae64d5ae0adf3 src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:ba16a5809ceb33d368308fab1dbba8324e3a1818 - pristine_git_object: 088d26fd205957f3d8830f78c4b88e88710c99ee + last_write_checksum: sha1:16a6fe8ffbf14828b1b930d7dda7a001d4780ea4 + pristine_git_object: 793c9f8ae726f86fc82de044e8a09b6931bb2592 src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:12565953aff450ec47afb9cb2523c145ef822b1e - pristine_git_object: 9a2cff81739d305e2886b24071caa1f33b97fbf9 + last_write_checksum: sha1:501da7474cc0bc6fd627150f15870dd3acf70235 + pristine_git_object: a30f8b05f9735464ac53b612cdfe139e5469b8b4 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 - last_write_checksum: sha1:52f8dc6df7430622882b02e8d01d8da02e4e998f - pristine_git_object: f9a8dec3fe679e1f1bde07dd6a93a3af8b5c3732 + last_write_checksum: sha1:fdd59e77aa9d19e64ab31cb949ea3565392c3113 + pristine_git_object: 437b42fdc5354378e822b38172bb5ee769355425 src/mistralai/client/deployments.py: id: a874b267fcb9 - last_write_checksum: sha1:ed90412267891097432b4a988cd6113d35530c9b - pristine_git_object: 6613b91c79b3aaa7e3a43fe815b2e018167e47e3 + last_write_checksum: sha1:5b62dd6436ce4914de7fbf0abc0819734eb08136 + pristine_git_object: 26e9c5658068de85878942b444538e0e58f706f5 src/mistralai/client/documents.py: id: bcc17286c31c - last_write_checksum: sha1:bdf4a3cfcb1a59b5d5af361ba75990d3b650b30e - pristine_git_object: aefcf749f4191bcc95ce77f81c20d0f36cd1b313 + last_write_checksum: sha1:27beb1104b009c5237d37f11e11b589fadf3838b + pristine_git_object: 2a555d3e3d34afe673de231bd1fcadb8fc36b59b src/mistralai/client/embeddings.py: id: f9c17258207e - last_write_checksum: sha1:3766f5877ce2bb2069e0881b4f4c22b4beb7b8d6 - pristine_git_object: a8a15363d4daeeae90186a74685ed76d440b481f + last_write_checksum: sha1:737e09a794867ea7242fb7c9e09cdff5f837fbf4 + pristine_git_object: 64337b4f3f56f084ed47a3f1f17a999a868db2c3 src/mistralai/client/errors/__init__.py: id: 0b2db51246df last_write_checksum: sha1:0032f4eb3501c71fafb8f68113a8c80e677311a4 @@ -3420,56 +3448,56 @@ trackedFiles: pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d src/mistralai/client/events.py: id: ac9b961cc70d - last_write_checksum: sha1:6a2146acbeee59ba5f3b20dc87cde247b25ec04a - pristine_git_object: db3ebcf5f9830ebbdf7c055104aadc7677a73710 + last_write_checksum: sha1:b250b6454555bb436cbc194e732c72982af23d94 + pristine_git_object: 3a4c47224be925a5701c88f9cf363e61bc1afd7f src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:af39569f54368dfd89eb74e6ff6d00e75155c06a - pristine_git_object: 4e6291f40a44f69f8d49a775cc4918770c8fe744 + last_write_checksum: sha1:bc0b48a037c85cc0411dc16f59da9481510c0469 + pristine_git_object: e4b9f90b0d985710715421cf68320a8dd0585a19 src/mistralai/client/fields.py: id: 862335210b20 - last_write_checksum: sha1:af527d7976d092d01437a584fc692c07fd1e5f6d - pristine_git_object: 1ac05dc5281541da93cabcc8bbb4caac9090dad2 + last_write_checksum: sha1:c200568ed4ad334849643bd85f19edc258877ff2 + pristine_git_object: 17441ca699fd8fb22701a0e59411d3ebd292f049 src/mistralai/client/files.py: id: f12df4b2ce43 - last_write_checksum: sha1:a09a667a20e56ab900500a00f7f8fc329219b49c - pristine_git_object: 0728e9a29b1703ec98c2e7c9d2984b30c51757fc + last_write_checksum: sha1:076c1f6435398d29491e1dcdaecab760e9f4a0a1 + pristine_git_object: e4549c75f5b5c21e8025383cce66737e0b1a96f6 src/mistralai/client/fim.py: id: 217bea5d701d - last_write_checksum: sha1:ce0a2669b055dd76d690461c5477b85f5971796b - pristine_git_object: 243786b38bd81f07c5fac74eecdfb0cb69348583 + last_write_checksum: sha1:4fdaa4ccd058e700e510c63a5397e5c28fa4e923 + pristine_git_object: d25f79b193237ef5d3b55921837882c8dd9dd30f src/mistralai/client/fine_tuning.py: id: 5d5079bbd54e last_write_checksum: sha1:fe1f774df4436cc9c2e54ed01a48db573eb813cd pristine_git_object: df6bc5643a13294ddfbeecc6ae84d00cd7199bed src/mistralai/client/fine_tuning_jobs.py: id: fa1ea246e0b2 - last_write_checksum: sha1:be61b90560da5c1b4ff57b922e0e65484fe9c00b - pristine_git_object: f13c8f2ddc0c5476923027db309324213a447a28 + last_write_checksum: sha1:18c53b380f2524d2dcca63ad014b1adb2dd682a0 + pristine_git_object: a6bf93a320939857513d85a8f5ecb1b5a47d8533 src/mistralai/client/httpclient.py: id: 3e46bde74327 last_write_checksum: sha1:0f4ecc805be1dc3d6e0ca090f0feb7d988f6eb9d pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 src/mistralai/client/ingestion_pipeline_configurations.py: id: f5a994272058 - last_write_checksum: sha1:d89828313f35c5f76b05b1f5ab3c09195a2a5534 - pristine_git_object: c94068d4b183837b0376d7b7ca4c70ab7d32fc7f + last_write_checksum: sha1:b34f23cf74285c410c1258be40b37c2c3b652a73 + pristine_git_object: adef39f9953d4c6e59c1288c7e6deb2cdd75ad60 src/mistralai/client/judges.py: id: b6024a41ecb4 - last_write_checksum: sha1:f79c7d8e28e343cd699cf36a6d53165cc54d8da2 - pristine_git_object: 210a147a86956d2da0d2e80d51d37bf4fa3bafd4 + last_write_checksum: sha1:a5c33a8bc46f6f3d435827a2a701016a428cc83c + pristine_git_object: 52c8899eb8c8ec092be454aca929012a62fec337 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:ae60e80c9d987db4e58634ca9308048ebc06eaa0 - pristine_git_object: 151536438423cf5c02f2e7d5892ba8b646e74ffb + last_write_checksum: sha1:db5cab2f824979cfe953e31f465c30fa322a4cff + pristine_git_object: 928c1ea8a79f1f838a6ea4c7a23826f5bdb82445 src/mistralai/client/metrics.py: id: 937cb03f8130 - last_write_checksum: sha1:0f650d881a321f34f03cf53d841bdb422516d699 - pristine_git_object: 8c132926e570f913fe57f77d2e8971732464c863 + last_write_checksum: sha1:491be33059fb0bbccff73b2a3bb0a66fb7a5ba9b + pristine_git_object: 60597c40f00705b4758827fb7d119f33ae2ad1b9 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:5d43891217a9fa585a7960174189f536986a584a - pristine_git_object: b60ab7c2c269745cd1e5ee32304e8aef82b164fc + last_write_checksum: sha1:6ff671f3761cb215e02e16a12303fb62d8165a9f + pristine_git_object: cb0320b35793d86e8b0afa1a92003a7ed9b8d29c src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 @@ -4052,16 +4080,16 @@ trackedFiles: pristine_git_object: a3f6cd61bec7eab9f734906b6ef1758525fd2d06 src/mistralai/client/models/createingestionpipelineconfigurationrequest.py: id: 480f219c27e5 - last_write_checksum: sha1:f768769b0b12daea4cc97b49691bb402d7b16453 - pristine_git_object: fd04b72f274b025ea830fb565220ceae409acdbd + last_write_checksum: sha1:1cb2730b7d0c680c180eff4b285242bb198d29bc + pristine_git_object: 068c8db95da3561ae993c5d780c54bdbbdba29c7 src/mistralai/client/models/createjudgerequest.py: id: e606837a626e last_write_checksum: sha1:d5c16104089075af1b8b2fe922006aea9d74b0e3 pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 - last_write_checksum: sha1:500d7eacc93b9af13d5400493793bc48e7ceea35 - pristine_git_object: 7d75578eb59dbdda5e088318c6f16aaedcd041b8 + last_write_checksum: sha1:0d98f058dc61560790d2bde49026dd631845218b + pristine_git_object: e0357e9252a4911292e5dce370c808350b6da0ec src/mistralai/client/models/credentialscreateorupdate.py: id: 9927546f2487 last_write_checksum: sha1:e31d3c7fc19e2a7fb49d07cb6f85c5ea73aabb98 @@ -4628,8 +4656,8 @@ trackedFiles: pristine_git_object: f5bd720db16c37504e1993cc6e651712551d2612 src/mistralai/client/models/ingestionpipelineconfiguration.py: id: b4746c0f2c1c - last_write_checksum: sha1:3f2f9354886721ec9d6f79dbd8cc8d991ccfc639 - pristine_git_object: 5aaa6a40e03f9ef95258fde6cb66b96687359f29 + last_write_checksum: sha1:f256b78196bde2b5bf39f15ed65b1daba784680a + pristine_git_object: 5289c66d7097548dc5d434f639eaefe2ceb7e504 src/mistralai/client/models/inputentries.py: id: 44727997dacb last_write_checksum: sha1:9e2a776be59c5043ea4179a60ac082faf064cc3d @@ -5118,6 +5146,10 @@ trackedFiles: id: d64678967bf0 last_write_checksum: sha1:693e9b575e0da721b15363db1e381d19f8766efb pristine_git_object: a60640aae96b54f7f8e7561029fda45a165007c4 + src/mistralai/client/models/pause_schedule_v1_workflows_schedules_schedule_id_pause_postop.py: + id: "53799174e259" + last_write_checksum: sha1:0d12062b4884937e8100490414a29842da524c5f + pristine_git_object: 2a53eaecc95afba612552debcadb0d0dad63afb8 ? src/mistralai/client/models/post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop.py : id: 3e8e390b7fa1 last_write_checksum: sha1:7785e0e41ffed189357a2f5682a0158fbcfe80ca @@ -5220,8 +5252,8 @@ trackedFiles: pristine_git_object: e4dd2a33247f23ad98f3e39802d98df028d65fab src/mistralai/client/models/referencechunk.py: id: 921acd3a224a - last_write_checksum: sha1:2534e964c706b886e64fdedfe34b1cbf4cb23e76 - pristine_git_object: c0d7c06584814227621699df817971a4e6920e39 + last_write_checksum: sha1:4547701c01752a19e509f3edabfe6a5de0281454 + pristine_git_object: 0ed4a73708e2c63435c0733c06bb0653b96559f2 src/mistralai/client/models/requestsource.py: id: 3f2774d9e609 last_write_checksum: sha1:1ce68530a46793968f1122d29df722f0a5c9d267 @@ -5262,6 +5294,10 @@ trackedFiles: id: 24f54ee8b0f2 last_write_checksum: sha1:bbe13695d5cde5f98635c01453057061d0167f99 pristine_git_object: ca3750421f3dda97cd85a6783084a934ed4f0fd4 + src/mistralai/client/models/resume_schedule_v1_workflows_schedules_schedule_id_resume_postop.py: + id: 2daf20be73bb + last_write_checksum: sha1:4775b3a31c7dcdd5be1db4117044bfacb4698d51 + pristine_git_object: 101bef6a08df0fc4fb4c4db2f5675b58908863e0 src/mistralai/client/models/retrieve_model_v1_models_model_id_getop.py: id: 6fefa90ca351 last_write_checksum: sha1:52775e73fb5c51d245362ce63672cec776e5b6bd @@ -5284,12 +5320,16 @@ trackedFiles: pristine_git_object: 2cb179eb22e9ac10e820ed276187cd863fc7a440 src/mistralai/client/models/scheduledefinition.py: id: 6ea58a356f77 - last_write_checksum: sha1:d1d24eb6d844bae8c1c31962bf0d60f9d21601d5 - pristine_git_object: dc622c3a26bd3341f17c95ed6cab5948be5c0fae + last_write_checksum: sha1:a394dee8c49c4a6c6ede7e27ca256a3c376e137b + pristine_git_object: 5810229349e4b84c88458fa729b4b1bce4d761cc src/mistralai/client/models/scheduledefinitionoutput.py: id: 69dc15b9a0d6 - last_write_checksum: sha1:65b865908446dcf7f9a1d45f4b2491157dda644c - pristine_git_object: f40470fa3b05672e7817cb996d5ef6bbeb3b961d + last_write_checksum: sha1:4dd8612486768de992731c044cb13b4c52f4622a + pristine_git_object: 8a9f205886f5fb2051c3c4591cf140ab65f6e2d3 + src/mistralai/client/models/schedulefutureexecution.py: + id: 44bb85af3d44 + last_write_checksum: sha1:11be9c9a4c488c42aabaa8090b8032b2e699ac4b + pristine_git_object: 50f0491e7acfe4dc7c2a65e5c7f3eb2259f01076 src/mistralai/client/models/scheduleinterval.py: id: 1d89c2043566 last_write_checksum: sha1:8119be5607d6ccad371b83f93b22da6e08c21504 @@ -5306,6 +5346,10 @@ trackedFiles: id: f9d442a062b5 last_write_checksum: sha1:763d3229958d166028203998b964abaf73d42a2c pristine_git_object: e30eed16bde2b71981b7b15e9d88a044910c6c3b + src/mistralai/client/models/schedulerecentexecution.py: + id: 745d146d9413 + last_write_checksum: sha1:ffa517cc252189aab02c3dd0b342475e2aa2e5a5 + pristine_git_object: ad46a70d3b507aac0811d7250e5a11fb26d5b32b src/mistralai/client/models/searchchatcompletioneventidsrequest.py: id: cabc8ef82d67 last_write_checksum: sha1:3290793dcf229bffc16b16d32d2c599c9a54bf4a @@ -5634,6 +5678,10 @@ trackedFiles: id: a1bace5342e6 last_write_checksum: sha1:2fd7c698f8fe16e5df54e49c7aba85e247d3f19b pristine_git_object: 41c3a36574b60207207535a6930ae094c23a8fff + src/mistralai/client/models/update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop.py: + id: 2a14ebf4ef57 + last_write_checksum: sha1:dc63747af5ef650f6d5f5a99e447bebc41450e46 + pristine_git_object: 6b7d24d465d34289f97aeb83dc036501883c9c7e src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py: id: 399da05bd75e last_write_checksum: sha1:aca7b6539571a8111e8f1abb7f90dde1e461d4bc @@ -5672,8 +5720,8 @@ trackedFiles: pristine_git_object: e878c8764774e4420a85145196cfb93c32d108fa src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 - last_write_checksum: sha1:57b5a2c77ddcf2e09a8eead6b4f5e5c694e21844 - pristine_git_object: 12d9c89b9ab67f6d7e69c26c31da76e7aaf1e817 + last_write_checksum: sha1:612b16cee373b0e395f51eb03b3dff70d7988148 + pristine_git_object: 5f67ea697ac8d4449c76863a8e4f42e0bd197908 src/mistralai/client/models/updateinvocationbody.py: id: b8558eff0be0 last_write_checksum: sha1:ea486ca10c1165b9f3dd40c005cc98bc6b0e937f @@ -5684,12 +5732,16 @@ trackedFiles: pristine_git_object: 04c86ab65599b96478f9b6a0cfa6ce3af1a489bb src/mistralai/client/models/updatelibraryrequest.py: id: 51bc63885337 - last_write_checksum: sha1:3fb7d575fff336485bb48158b082e1e27e4848a2 - pristine_git_object: d5183ac048c60522563532e48899cd0398d2effe + last_write_checksum: sha1:aebbb99655ad350295e5eea6943947eb8960e742 + pristine_git_object: 64af28c596d42f349ccd94daa7aae422a77e031e src/mistralai/client/models/updatemodelrequest.py: id: fe649967751e last_write_checksum: sha1:b5ce56ef430768ee806b45d9c2e4c405764a1ef5 pristine_git_object: 0179ba140d7d598a4a363ddfab67197e56857964 + src/mistralai/client/models/updateruninfo.py: + id: 4330bdaa00b9 + last_write_checksum: sha1:57f94ec7b05a21ab4849deffaf32078b01161567 + pristine_git_object: 91038d1d8f39b650ebd347afca60dc21c144856d src/mistralai/client/models/updateworkflowresponse.py: id: f5dcf717a0a1 last_write_checksum: sha1:f0da842336a6aef26bab3fab2f0c742deda2653e @@ -5890,6 +5942,10 @@ trackedFiles: id: e5247c5183bb last_write_checksum: sha1:37cea2f0f3220331105f9454169f1ea49ed1b51a pristine_git_object: 3c9eb3d7f445a0ec010340aeae788cf47e034628 + src/mistralai/client/models/workflowschedulepauserequest.py: + id: da7b9a522bcb + last_write_checksum: sha1:079663a44a62694c48dd839ef1d3b4cd6fb7429b + pristine_git_object: a27f2e90c23222d27566a5ca49575b195f41aa41 src/mistralai/client/models/workflowschedulerequest.py: id: 2d8256704c6b last_write_checksum: sha1:bac5dd140544747ebcd15a21da1df52303adaa17 @@ -5936,16 +5992,16 @@ trackedFiles: pristine_git_object: 81030e21fe08c8ac1401ac6fb0a105f985985cf0 src/mistralai/client/models_.py: id: 1d277958a843 - last_write_checksum: sha1:4247baa39847450e7d4d42678b6199dc83e9f057 - pristine_git_object: 1e96448537301468be159bd870d6d01d4928dfd8 + last_write_checksum: sha1:a5e45504b21a4126a41b59c52be2050cd8215cff + pristine_git_object: 2a00325f9205bec7b5ca6ff8df2915593d12bd0e src/mistralai/client/observability.py: id: 453a1d06d130 last_write_checksum: sha1:62d4d03a08807271b404a8684b1153a739d70b05 pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 src/mistralai/client/ocr.py: id: 2f804a12fc62 - last_write_checksum: sha1:37808f62074f238e582288e3abbe9b0f0756abab - pristine_git_object: 7ecbaae9756efc82b0e419617911c45b564dd130 + last_write_checksum: sha1:f9fe8ca3be4450aff01d1a159d905b66054cf665 + pristine_git_object: c290b1bb53f62a966f724216b29f9dc3a949197d src/mistralai/client/py.typed: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -5956,16 +6012,16 @@ trackedFiles: pristine_git_object: 091b02705ce1bd11ea3dc3602a1ebf8e29815495 src/mistralai/client/records.py: id: 10f90c990bd8 - last_write_checksum: sha1:e4d0a85b402c59788843296276dd516b07311d3b - pristine_git_object: a47d12c36d50f3b8cd0e56d840e1394647f887ba + last_write_checksum: sha1:3b54fb25751ef4d12a8263bc6f29999a42ac4f61 + pristine_git_object: 2ac04c2fcc4277af7abd42a2a0cacdbba741dd4d src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:c4df89a6693ea4242c5b3c4f8c1d8333e918a716 - pristine_git_object: 031564ad217349dc89f1b692c438078696c06fd3 + last_write_checksum: sha1:65b82f507ef945cd17f5f4fc2767d6dab3e6909b + pristine_git_object: d1a242fb2bd517b27656e2f60eef07421418cb6e src/mistralai/client/schedules.py: id: d3b4fe452390 - last_write_checksum: sha1:029d95bc3440ffd3b03a89fd045283d7ddab19a8 - pristine_git_object: d036900982e6db67d9d3f79f4e906541a1af0179 + last_write_checksum: sha1:946fac6872a9994efbea349a91c0fd14485859b0 + pristine_git_object: 9b013acdc092797cd78e9be3f50666f4a8203fd9 src/mistralai/client/sdk.py: id: 48edbcb38d7e last_write_checksum: sha1:a606046063cd946633918efa1662846c987c9b7e @@ -5976,12 +6032,12 @@ trackedFiles: pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 src/mistralai/client/speech.py: id: 5c1f1109aa5e - last_write_checksum: sha1:92ec388be858318b47c428d1a1191052baf3a2ab - pristine_git_object: 9b4eacf0402b8bf477d83ae3f942b1cd554bb322 + last_write_checksum: sha1:3cbd55d0df062a0de6e93c32816dd6e805018150 + pristine_git_object: 4893684b70781a097845f48c4b0a09b4fcb38dd5 src/mistralai/client/transcriptions.py: id: 75b45780c978 - last_write_checksum: sha1:e333611029fccbd1fb66f7a1e96025c9311bc5b5 - pristine_git_object: d6489bf302d1d0edbc02466418444a9a4d5fec63 + last_write_checksum: sha1:c72a2c07abd80bc78554669e549ded4ec2b027e7 + pristine_git_object: d84b59f8efbe0adaff62dd4a95a9c7d9bb117d10 src/mistralai/client/types/__init__.py: id: 000b943f821c last_write_checksum: sha1:12a4ace69cbc63f1125eeddf901afed7cdf378b0 @@ -6068,16 +6124,16 @@ trackedFiles: pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c src/mistralai/client/voices.py: id: ab76b1377d79 - last_write_checksum: sha1:a1b8b30045116c3149e9d1e9e79a31c4016f0773 - pristine_git_object: b95fd11d5fce3ffaede8bf9adc15335d83ae0cb2 + last_write_checksum: sha1:a8009497c11da1e145fcc462ca5d6e7dcfd6e0f1 + pristine_git_object: e19d5d5a184d08110592147ba04c570cbb2b291a src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:a6d1af4ef9ccc71baf6a42eb96e3107e8a06c34b - pristine_git_object: 02c865cfdeb7d32d5dd90e8f370bdec89fb9ba7f + last_write_checksum: sha1:b0644f87b63f179114350f2d90a2ec646cd72931 + pristine_git_object: 2693b05b7716298daafffbc76c7358feb49923c6 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef - last_write_checksum: sha1:79816d0388e471a4bbb3d09df84794e9405cf3b2 - pristine_git_object: 57b6f1cbff925f194f8ec6275222271c0fc5f02d + last_write_checksum: sha1:a6362c45808a5fac5bc0a8f58c29b4d9291b9a7d + pristine_git_object: 71e44ac74c571debabf7a8b811f8c244f2b7c30a examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -8608,22 +8664,47 @@ examples: speakeasy-default-get-configs-v1-rag-ingestion-pipeline-configurations-get: responses: "200": - application/json: [{"id": "bf1614ea-c74f-4b49-9415-f199d33c3281", "name": "", "created_at": "2026-06-16T10:34:55.929Z", "modified_at": "2026-04-16T03:39:05.055Z"}] + application/json: [{"id": "bf1614ea-c74f-4b49-9415-f199d33c3281", "author_id": "", "name": "", "created_at": "2026-06-16T10:34:55.929Z", "modified_at": "2026-04-16T03:39:05.055Z", "last_run_time": "2026-12-11T13:45:06.230Z", "last_run_chunks_count": 69748, "total_chunks_count": 398669, "pipeline_composition": {"key": ""}}] register_config_v1_rag_ingestion_pipeline_configurations_put: speakeasy-default-register-config-v1-rag-ingestion-pipeline-configurations-put: requestBody: application/json: {"name": ""} responses: "200": - application/json: {"id": "18c459f4-028b-430d-b3b1-a9cc0d558710", "name": "", "created_at": "2026-08-09T11:37:55.676Z", "modified_at": "2025-11-21T07:06:21.204Z"} + application/json: {"id": "18c459f4-028b-430d-b3b1-a9cc0d558710", "author_id": "", "name": "", "created_at": "2026-08-09T11:37:55.676Z", "modified_at": "2025-11-21T07:06:21.204Z", "last_run_time": null, "last_run_chunks_count": 540758, "total_chunks_count": 810454, "pipeline_composition": {"key": ""}} + "422": + application/json: {} + update_run_info_v1_rag_ingestion_pipeline_configurations__id__run_info_put: + speakeasy-default-update-run-info-v1-rag-ingestion-pipeline-configurations-id-run-info-put: + parameters: + path: + id: "6b630c1b-b57e-4237-a015-ff6247cbbcf8" + requestBody: + application/json: {"execution_time": "2024-06-27T06:29:04.390Z", "chunks_count": 983906} + responses: + "200": + application/json: {"id": "42307a95-2f0a-45fe-a93e-784bb9cbe579", "author_id": "", "name": "", "created_at": "2024-06-11T03:24:52.044Z", "modified_at": "2026-04-02T07:19:18.488Z", "last_run_time": "2025-05-13T23:34:46.111Z", "last_run_chunks_count": 197616, "total_chunks_count": 256799, "pipeline_composition": {"key": "", "key1": ""}} + "422": + application/json: {} + pause_schedule_v1_workflows_schedules__schedule_id__pause_post: + speakeasy-default-pause-schedule-v1-workflows-schedules-schedule-id-pause-post: + parameters: + path: + schedule_id: "" + responses: + "422": + application/json: {} + resume_schedule_v1_workflows_schedules__schedule_id__resume_post: + speakeasy-default-resume-schedule-v1-workflows-schedules-schedule-id-resume-post: + parameters: + path: + schedule_id: "" + responses: "422": application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.ocr.process()`: `request.id` **Removed** (Breaking ⚠️) - * `mistral.beta.rag.ingestion_pipeline_configurations.register()`: **Added** +releaseNotes: "## Python SDK Changes:\n* `mistral.beta.libraries.update()`: `request.name` **Changed** (Breaking ⚠️)\n* `mistral.beta.libraries.documents.update()`: `request.name` **Changed** (Breaking ⚠️)\n* `mistral.beta.rag.ingestion_pipeline_configurations.update_run_info()`: **Added**\n* `mistral.workflows.schedules.pause_schedule()`: **Added**\n* `mistral.workflows.schedules.resume_schedule()`: **Added**\n* `mistral.beta.rag.ingestion_pipeline_configurations.list()`: `response.[]` **Changed**\n* `mistral.beta.rag.ingestion_pipeline_configurations.register()`: \n * `request.pipeline_composition` **Added**\n * `response` **Changed**\n* `mistral.workflows.schedules.get_schedules()`: `response.schedules[]` **Changed**\n* `mistral.workflows.schedules.schedule_workflow()`: \n * `request.schedule.max_executions` **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 1a5c0cb4..465afa47 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.3 + version: 2.4.4 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7e33b44d..265ea37e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:224619b477164e1a1768ee73fdda28b4ab994bad22ed713e2b23397ab12f3b57 - sourceBlobDigest: sha256:5148633458f3efeb064e4d6e113e906dd6c5a5b4a667e865c2a33c663b98835e + sourceRevisionDigest: sha256:1f3eeb2513538e3ae8b5483477b559a460ce3dac0cdd41c31d47db9167acec60 + sourceBlobDigest: sha256:b743e6e51b23d2d5207d1f4348076d22f130052fea4e1676095a2ddc654822a9 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:224619b477164e1a1768ee73fdda28b4ab994bad22ed713e2b23397ab12f3b57 - sourceBlobDigest: sha256:5148633458f3efeb064e4d6e113e906dd6c5a5b4a667e865c2a33c663b98835e + sourceRevisionDigest: sha256:1f3eeb2513538e3ae8b5483477b559a460ce3dac0cdd41c31d47db9167acec60 + sourceBlobDigest: sha256:b743e6e51b23d2d5207d1f4348076d22f130052fea4e1676095a2ddc654822a9 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:e187b17d9a82818b60c5df49bccb51e58acbb250087df04d9957c6502cc2bcdc + codeSamplesRevisionDigest: sha256:fa3aa9d30da8a70f9e5d8c74ceab2cd4a043bfa5c5dacfe0035b09d907f41705 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/README-PYPI.md b/README-PYPI.md index 4e011ef4..67cd2cbe 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -633,6 +633,7 @@ print(res.choices[0].message.content) * [list](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations * [register](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config +* [update_run_info](https://github.com/mistralai/client-python/blob/main/docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info ### [Chat](https://github.com/mistralai/client-python/blob/main/docs/sdks/chat/README.md) @@ -744,6 +745,8 @@ print(res.choices[0].message.content) * [get_schedules](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#get_schedules) - Get Schedules * [schedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow +* [pause_schedule](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#pause_schedule) - Pause Schedule +* [resume_schedule](https://github.com/mistralai/client-python/blob/main/docs/sdks/schedules/README.md#resume_schedule) - Resume Schedule @@ -955,8 +958,8 @@ with Mistral( **Inherit from [`MistralError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 113 of 180 methods.* -* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 180 methods.* +* [`HTTPValidationError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 116 of 183 methods.* +* [`ObservabilityError`](https://github.com/mistralai/client-python/blob/main/src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 183 methods.* * [`ResponseValidationError`](https://github.com/mistralai/client-python/blob/main/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. diff --git a/README.md b/README.md index 36fbef50..2a3bedff 100644 --- a/README.md +++ b/README.md @@ -633,6 +633,7 @@ print(res.choices[0].message.content) * [list](docs/sdks/ingestionpipelineconfigurations/README.md#list) - List ingestion pipeline configurations * [register](docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config +* [update_run_info](docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info ### [Chat](docs/sdks/chat/README.md) @@ -744,6 +745,8 @@ print(res.choices[0].message.content) * [get_schedules](docs/sdks/schedules/README.md#get_schedules) - Get Schedules * [schedule_workflow](docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow * [unschedule_workflow](docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow +* [pause_schedule](docs/sdks/schedules/README.md#pause_schedule) - Pause Schedule +* [resume_schedule](docs/sdks/schedules/README.md#resume_schedule) - Resume Schedule @@ -955,8 +958,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 113 of 180 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 180 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 116 of 183 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 183 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 511efda4..440bed5f 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -618,4 +618,14 @@ Based on: ### Generated - [python v2.4.3] . ### Releases -- [PyPI v2.4.3] https://pypi.org/project/mistralai/2.4.3 - . \ No newline at end of file +- [PyPI v2.4.3] https://pypi.org/project/mistralai/2.4.3 - . + +## 2026-04-30 12:00:09 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.4] . +### Releases +- [PyPI v2.4.4] https://pypi.org/project/mistralai/2.4.4 - . \ No newline at end of file diff --git a/docs/models/createingestionpipelineconfigurationrequest.md b/docs/models/createingestionpipelineconfigurationrequest.md index 4b2febce..f6aeb210 100644 --- a/docs/models/createingestionpipelineconfigurationrequest.md +++ b/docs/models/createingestionpipelineconfigurationrequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------ | ------------------ | ------------------ | ------------------ | -| `name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------- | ---------------------- | ---------------------- | ---------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createlibraryrequest.md b/docs/models/createlibraryrequest.md index ea70d4d8..07ff97d0 100644 --- a/docs/models/createlibraryrequest.md +++ b/docs/models/createlibraryrequest.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | | `owner_type` | [OptionalNullable[models.OwnerType]](../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | \ No newline at end of file diff --git a/docs/models/ingestionpipelineconfiguration.md b/docs/models/ingestionpipelineconfiguration.md index 5d25ab15..16fde9c6 100644 --- a/docs/models/ingestionpipelineconfiguration.md +++ b/docs/models/ingestionpipelineconfiguration.md @@ -6,6 +6,11 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `id` | *str* | :heavy_check_mark: | N/A | +| `author_id` | *str* | :heavy_check_mark: | N/A | | `name` | *str* | :heavy_check_mark: | N/A | | `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | \ No newline at end of file +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `last_run_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `last_run_chunks_count` | *int* | :heavy_check_mark: | N/A | +| `total_chunks_count` | *int* | :heavy_check_mark: | N/A | +| `pipeline_composition` | Dict[str, *str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/pauseschedulev1workflowsschedulesscheduleidpausepostrequest.md b/docs/models/pauseschedulev1workflowsschedulesscheduleidpausepostrequest.md new file mode 100644 index 00000000..dc69416c --- /dev/null +++ b/docs/models/pauseschedulev1workflowsschedulesscheduleidpausepostrequest.md @@ -0,0 +1,9 @@ +# PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_schedule_pause_request` | [OptionalNullable[models.WorkflowSchedulePauseRequest]](../models/workflowschedulepauserequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/referenceid.md b/docs/models/referenceid.md index f9769645..1d29397f 100644 --- a/docs/models/referenceid.md +++ b/docs/models/referenceid.md @@ -3,15 +3,15 @@ ## Supported Types -### `str` +### `int` ```python -value: str = /* values here */ +value: int = /* values here */ ``` -### `int` +### `str` ```python -value: int = /* values here */ +value: str = /* values here */ ``` diff --git a/docs/models/resumeschedulev1workflowsschedulesscheduleidresumepostrequest.md b/docs/models/resumeschedulev1workflowsschedulesscheduleidresumepostrequest.md new file mode 100644 index 00000000..e50fe6cd --- /dev/null +++ b/docs/models/resumeschedulev1workflowsschedulesscheduleidresumepostrequest.md @@ -0,0 +1,9 @@ +# ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_schedule_pause_request` | [OptionalNullable[models.WorkflowSchedulePauseRequest]](../models/workflowschedulepauserequest.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/scheduledefinition.md b/docs/models/scheduledefinition.md index 4f8f8b80..7d0509f6 100644 --- a/docs/models/scheduledefinition.md +++ b/docs/models/scheduledefinition.md @@ -10,16 +10,17 @@ Used for input where schedule_id is optional (can be provided or auto-generated) ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `input` | *Any* | :heavy_check_mark: | Input to provide to the workflow when starting it. | -| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | -| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | -| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | -| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | -| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | -| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | -| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| -| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | -| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | -| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the schedule. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | *Any* | :heavy_check_mark: | Input to provide to the workflow when starting it. | +| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | +| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | +| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | +| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | +| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | +| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | +| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| +| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | +| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | +| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the schedule. | +| `max_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited. | \ No newline at end of file diff --git a/docs/models/scheduledefinitionoutput.md b/docs/models/scheduledefinitionoutput.md index c4937c69..64b7b525 100644 --- a/docs/models/scheduledefinitionoutput.md +++ b/docs/models/scheduledefinitionoutput.md @@ -7,16 +7,22 @@ Used when returning schedules from the API where schedule_id is always present. ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `input` | *Any* | :heavy_check_mark: | Input to provide to the workflow when starting it. | -| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | -| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | -| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | -| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | -| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | -| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | -| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| -| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | -| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | -| `schedule_id` | *str* | :heavy_check_mark: | Unique identifier for the schedule. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | *Any* | :heavy_check_mark: | Input to provide to the workflow when starting it. | +| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | +| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | +| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | +| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | +| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | +| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | +| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| +| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | +| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | +| `schedule_id` | *str* | :heavy_check_mark: | Unique identifier for the schedule. | +| `remaining_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Remaining workflow executions before this schedule stops triggering automatically. null means unlimited; 0 means the limit has been reached and the schedule is exhausted. | +| `workflow_name` | *str* | :heavy_check_mark: | Name of the workflow this schedule triggers. | +| `paused` | *bool* | :heavy_check_mark: | Whether the schedule is currently paused. | +| `note` | *OptionalNullable[str]* | :heavy_minus_sign: | Human-readable note associated with the current pause or resume state. | +| `future_executions` | List[[models.ScheduleFutureExecution](../models/schedulefutureexecution.md)] | :heavy_minus_sign: | Upcoming scheduled executions (10 next executions, earliest first). | +| `recent_executions` | List[[models.ScheduleRecentExecution](../models/schedulerecentexecution.md)] | :heavy_minus_sign: | Most recent scheduled executions (10 most recent, newest last). | \ No newline at end of file diff --git a/docs/models/schedulefutureexecution.md b/docs/models/schedulefutureexecution.md new file mode 100644 index 00000000..7dfa16af --- /dev/null +++ b/docs/models/schedulefutureexecution.md @@ -0,0 +1,8 @@ +# ScheduleFutureExecution + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `scheduled_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Time the execution is scheduled to run. | \ No newline at end of file diff --git a/docs/models/schedulerecentexecution.md b/docs/models/schedulerecentexecution.md new file mode 100644 index 00000000..f849e1ae --- /dev/null +++ b/docs/models/schedulerecentexecution.md @@ -0,0 +1,10 @@ +# ScheduleRecentExecution + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `scheduled_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Time the execution was scheduled to run. | +| `started_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Actual time the execution started. | +| `execution_id` | *str* | :heavy_check_mark: | ID of the workflow execution that was started. | \ No newline at end of file diff --git a/docs/models/updatedocumentrequest.md b/docs/models/updatedocumentrequest.md index 7e0b41b7..dd06dd4b 100644 --- a/docs/models/updatedocumentrequest.md +++ b/docs/models/updatedocumentrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | | `attributes` | Dict[str, [models.Attributes](../models/attributes.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updatelibraryrequest.md b/docs/models/updatelibraryrequest.md index aaffc5a9..32d53eec 100644 --- a/docs/models/updatelibraryrequest.md +++ b/docs/models/updatelibraryrequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updateruninfo.md b/docs/models/updateruninfo.md new file mode 100644 index 00000000..1f09fb3b --- /dev/null +++ b/docs/models/updateruninfo.md @@ -0,0 +1,9 @@ +# UpdateRunInfo + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `execution_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `chunks_count` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/updateruninfov1ragingestionpipelineconfigurationsidruninfoputrequest.md b/docs/models/updateruninfov1ragingestionpipelineconfigurationsidruninfoputrequest.md new file mode 100644 index 00000000..c675adef --- /dev/null +++ b/docs/models/updateruninfov1ragingestionpipelineconfigurationsidruninfoputrequest.md @@ -0,0 +1,9 @@ +# UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `update_run_info` | [models.UpdateRunInfo](../models/updateruninfo.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowschedulepauserequest.md b/docs/models/workflowschedulepauserequest.md new file mode 100644 index 00000000..3abd719f --- /dev/null +++ b/docs/models/workflowschedulepauserequest.md @@ -0,0 +1,8 @@ +# WorkflowSchedulePauseRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `note` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional note recorded in Temporal when pausing or resuming a schedule | \ No newline at end of file diff --git a/docs/sdks/documents/README.md b/docs/sdks/documents/README.md index fde6d9a3..eabe9976 100644 --- a/docs/sdks/documents/README.md +++ b/docs/sdks/documents/README.md @@ -180,7 +180,7 @@ with Mistral( | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `library_id` | *str* | :heavy_check_mark: | N/A | | `document_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | | `attributes` | Dict[str, [models.Attributes](../../models/attributes.md)] | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/ingestionpipelineconfigurations/README.md b/docs/sdks/ingestionpipelineconfigurations/README.md index b6edd8b3..671a7182 100644 --- a/docs/sdks/ingestionpipelineconfigurations/README.md +++ b/docs/sdks/ingestionpipelineconfigurations/README.md @@ -6,6 +6,7 @@ * [list](#list) - List ingestion pipeline configurations * [register](#register) - Register Config +* [update_run_info](#update_run_info) - Update Run Info ## list @@ -74,6 +75,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | +| `pipeline_composition` | Dict[str, *str*] | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -82,6 +84,50 @@ with Mistral( ### Errors +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update_run_info + +Update Run Info + +### Example Usage + + +```python +from mistralai.client import Mistral +from mistralai.client.utils import parse_datetime +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.ingestion_pipeline_configurations.update_run_info(id="6b630c1b-b57e-4237-a015-ff6247cbbcf8", execution_time=parse_datetime("2024-06-27T06:29:04.390Z"), chunks_count=983906) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `execution_time` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `chunks_count` | *int* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.IngestionPipelineConfiguration](../../models/ingestionpipelineconfiguration.md)** + +### Errors + | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index b97756b3..d282f541 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -85,7 +85,7 @@ with Mistral( | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | | `owner_type` | [OptionalNullable[models.OwnerType]](../../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -210,7 +210,7 @@ with Mistral( | Parameter | Type | Required | Description | | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | | `library_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | diff --git a/docs/sdks/schedules/README.md b/docs/sdks/schedules/README.md index dd1565e0..7bf59931 100644 --- a/docs/sdks/schedules/README.md +++ b/docs/sdks/schedules/README.md @@ -7,6 +7,8 @@ * [get_schedules](#get_schedules) - Get Schedules * [schedule_workflow](#schedule_workflow) - Schedule Workflow * [unschedule_workflow](#unschedule_workflow) - Unschedule Workflow +* [pause_schedule](#pause_schedule) - Pause Schedule +* [resume_schedule](#resume_schedule) - Resume Schedule ## get_schedules @@ -127,6 +129,80 @@ with Mistral( ### Errors +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## pause_schedule + +Pause Schedule + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.schedules.pause_schedule(schedule_id="") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `note` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional note recorded in Temporal when pausing or resuming a schedule | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## resume_schedule + +Resume Schedule + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + mistral.workflows.schedules.resume_schedule(schedule_id="") + + # Use the SDK ... + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `note` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional note recorded in Temporal when pausing or resuming a schedule | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Errors + | Error Type | Status Code | Content Type | | -------------------------- | -------------------------- | -------------------------- | | errors.HTTPValidationError | 422 | application/json | diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index cc33682c..026fdee0 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.3" +__version__: str = "2.4.4" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.3 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.4 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/accesses.py b/src/mistralai/client/accesses.py index 002f0103..5d859a39 100644 --- a/src/mistralai/client/accesses.py +++ b/src/mistralai/client/accesses.py @@ -38,7 +38,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -131,7 +131,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -232,7 +232,7 @@ def update_or_create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -342,7 +342,7 @@ async def update_or_create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -450,7 +450,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -557,7 +557,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 48c7bb99..1bcd8c54 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -96,7 +96,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -280,7 +280,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -466,7 +466,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -660,7 +660,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/batch_jobs.py b/src/mistralai/client/batch_jobs.py index de8147f5..2bf50fd3 100644 --- a/src/mistralai/client/batch_jobs.py +++ b/src/mistralai/client/batch_jobs.py @@ -53,7 +53,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -164,7 +164,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -278,7 +278,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -395,7 +395,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -498,7 +498,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -591,7 +591,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -679,7 +679,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -766,7 +766,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -853,7 +853,7 @@ def cancel( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -940,7 +940,7 @@ async def cancel_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/beta_agents.py b/src/mistralai/client/beta_agents.py index 67d17a05..64baf53b 100644 --- a/src/mistralai/client/beta_agents.py +++ b/src/mistralai/client/beta_agents.py @@ -65,7 +65,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -203,7 +203,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -328,7 +328,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -442,7 +442,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -549,7 +549,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -650,7 +650,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -775,7 +775,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -925,7 +925,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1042,7 +1042,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1133,7 +1133,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1228,7 +1228,7 @@ def update_version( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1324,7 +1324,7 @@ async def update_version_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1422,7 +1422,7 @@ def list_versions( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1521,7 +1521,7 @@ async def list_versions_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1618,7 +1618,7 @@ def get_version( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1714,7 +1714,7 @@ async def get_version_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1812,7 +1812,7 @@ def create_version_alias( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1911,7 +1911,7 @@ async def create_version_alias_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2006,7 +2006,7 @@ def list_version_aliases( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2099,7 +2099,7 @@ async def list_version_aliases_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2194,7 +2194,7 @@ def delete_version_alias( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2290,7 +2290,7 @@ async def delete_version_alias_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/campaigns.py b/src/mistralai/client/campaigns.py index 427bef5e..c9f28794 100644 --- a/src/mistralai/client/campaigns.py +++ b/src/mistralai/client/campaigns.py @@ -42,7 +42,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -150,7 +150,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -254,7 +254,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -353,7 +353,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -448,7 +448,7 @@ def fetch( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -541,7 +541,7 @@ async def fetch_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -634,7 +634,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -727,7 +727,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -820,7 +820,7 @@ def fetch_status( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -913,7 +913,7 @@ async def fetch_status_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1010,7 +1010,7 @@ def list_events( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1111,7 +1111,7 @@ async def list_events_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index 5a1ff0f0..9deff9a0 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -187,7 +187,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -380,7 +380,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -575,7 +575,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -778,7 +778,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/chat_completion_events.py b/src/mistralai/client/chat_completion_events.py index 9d00fe4f..af4124f0 100644 --- a/src/mistralai/client/chat_completion_events.py +++ b/src/mistralai/client/chat_completion_events.py @@ -54,7 +54,7 @@ def search( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -169,7 +169,7 @@ async def search_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -280,7 +280,7 @@ def search_ids( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -385,7 +385,7 @@ async def search_ids_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -488,7 +488,7 @@ def fetch( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -581,7 +581,7 @@ async def fetch_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -674,7 +674,7 @@ def fetch_similar_events( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -769,7 +769,7 @@ async def fetch_similar_events_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -868,7 +868,7 @@ def judge( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -977,7 +977,7 @@ async def judge_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/classifiers.py b/src/mistralai/client/classifiers.py index 9fd3b3a1..ddb2d0b1 100644 --- a/src/mistralai/client/classifiers.py +++ b/src/mistralai/client/classifiers.py @@ -43,7 +43,7 @@ def moderate( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -146,7 +146,7 @@ async def moderate_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -247,7 +247,7 @@ def moderate_chat( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -349,7 +349,7 @@ async def moderate_chat_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -453,7 +453,7 @@ def classify( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -556,7 +556,7 @@ async def classify_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -654,7 +654,7 @@ def classify_chat( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -751,7 +751,7 @@ async def classify_chat_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 088d26fd..793c9f8a 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -56,7 +56,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -180,7 +180,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -292,7 +292,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -395,7 +395,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -496,7 +496,7 @@ def get_auth_url( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -595,7 +595,7 @@ async def get_auth_url_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -696,7 +696,7 @@ def call_tool( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -807,7 +807,7 @@ async def call_tool_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -922,7 +922,7 @@ def list_tools( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1032,7 +1032,7 @@ async def list_tools_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1132,7 +1132,7 @@ def get_authentication_methods( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1221,7 +1221,7 @@ async def get_authentication_methods_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1314,7 +1314,7 @@ def list_organization_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1413,7 +1413,7 @@ async def list_organization_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1516,7 +1516,7 @@ def create_or_update_organization_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1631,7 +1631,7 @@ async def create_or_update_organization_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1742,7 +1742,7 @@ def list_workspace_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1841,7 +1841,7 @@ async def list_workspace_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1944,7 +1944,7 @@ def create_or_update_workspace_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2059,7 +2059,7 @@ async def create_or_update_workspace_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2170,7 +2170,7 @@ def list_user_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2269,7 +2269,7 @@ async def list_user_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2372,7 +2372,7 @@ def create_or_update_user_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2487,7 +2487,7 @@ async def create_or_update_user_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2596,7 +2596,7 @@ def delete_organization_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2692,7 +2692,7 @@ async def delete_organization_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2788,7 +2788,7 @@ def delete_workspace_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2884,7 +2884,7 @@ async def delete_workspace_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2980,7 +2980,7 @@ def delete_user_credentials( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -3076,7 +3076,7 @@ async def delete_user_credentials_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -3174,7 +3174,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -3273,7 +3273,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -3390,7 +3390,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -3526,7 +3526,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -3640,7 +3640,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -3733,7 +3733,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 9947ea9d..0e0bca0d 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -437,7 +437,7 @@ def start( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -591,7 +591,7 @@ async def start_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -709,7 +709,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -810,7 +810,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -907,7 +907,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1000,7 +1000,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1093,7 +1093,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1186,7 +1186,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1300,7 +1300,7 @@ def append( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1435,7 +1435,7 @@ async def append_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1549,7 +1549,7 @@ def get_history( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1642,7 +1642,7 @@ async def get_history_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1735,7 +1735,7 @@ def get_messages( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1828,7 +1828,7 @@ async def get_messages_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1950,7 +1950,7 @@ def restart( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2095,7 +2095,7 @@ async def restart_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2251,7 +2251,7 @@ def start_stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2412,7 +2412,7 @@ async def start_stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2554,7 +2554,7 @@ def append_stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2696,7 +2696,7 @@ async def append_stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2846,7 +2846,7 @@ def restart_stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2998,7 +2998,7 @@ async def restart_stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/datasets.py b/src/mistralai/client/datasets.py index f9a8dec3..437b42fd 100644 --- a/src/mistralai/client/datasets.py +++ b/src/mistralai/client/datasets.py @@ -50,7 +50,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -149,7 +149,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -250,7 +250,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -349,7 +349,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -444,7 +444,7 @@ def fetch( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -537,7 +537,7 @@ async def fetch_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -630,7 +630,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -723,7 +723,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -820,7 +820,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -928,7 +928,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1036,7 +1036,7 @@ def list_records( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1137,7 +1137,7 @@ async def list_records_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1238,7 +1238,7 @@ def create_record( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1346,7 +1346,7 @@ async def create_record_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1452,7 +1452,7 @@ def import_from_campaign( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1557,7 +1557,7 @@ async def import_from_campaign_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1662,7 +1662,7 @@ def import_from_explorer( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1767,7 +1767,7 @@ async def import_from_explorer_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1872,7 +1872,7 @@ def import_from_file( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1977,7 +1977,7 @@ async def import_from_file_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2082,7 +2082,7 @@ def import_from_playground( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2187,7 +2187,7 @@ async def import_from_playground_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2292,7 +2292,7 @@ def import_from_dataset_records( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2397,7 +2397,7 @@ async def import_from_dataset_records_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2500,7 +2500,7 @@ def export_to_jsonl( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2593,7 +2593,7 @@ async def export_to_jsonl_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2688,7 +2688,7 @@ def fetch_task( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2784,7 +2784,7 @@ async def fetch_task_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2882,7 +2882,7 @@ def list_tasks( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2985,7 +2985,7 @@ async def list_tasks_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py index 6613b91c..26e9c565 100644 --- a/src/mistralai/client/deployments.py +++ b/src/mistralai/client/deployments.py @@ -36,7 +36,7 @@ def list_deployments( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -130,7 +130,7 @@ async def list_deployments_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -222,7 +222,7 @@ def get_deployment( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -313,7 +313,7 @@ async def get_deployment_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/documents.py b/src/mistralai/client/documents.py index aefcf749..2a555d3e 100644 --- a/src/mistralai/client/documents.py +++ b/src/mistralai/client/documents.py @@ -50,7 +50,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -161,7 +161,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -270,7 +270,7 @@ def upload( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -379,7 +379,7 @@ async def upload_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -480,7 +480,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -576,7 +576,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -650,7 +650,7 @@ def update( *, library_id: str, document_id: str, - name: OptionalNullable[str] = UNSET, + name: Optional[str] = None, attributes: OptionalNullable[ Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] ] = UNSET, @@ -678,7 +678,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -763,7 +763,7 @@ async def update_async( *, library_id: str, document_id: str, - name: OptionalNullable[str] = UNSET, + name: Optional[str] = None, attributes: OptionalNullable[ Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] ] = UNSET, @@ -791,7 +791,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -898,7 +898,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -994,7 +994,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1094,7 +1094,7 @@ def text_content( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1196,7 +1196,7 @@ async def text_content_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1294,7 +1294,7 @@ def status( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1390,7 +1390,7 @@ async def status_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1486,7 +1486,7 @@ def get_signed_url( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1582,7 +1582,7 @@ async def get_signed_url_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1678,7 +1678,7 @@ def extracted_text_signed_url( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1774,7 +1774,7 @@ async def extracted_text_signed_url_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1870,7 +1870,7 @@ def reprocess( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1966,7 +1966,7 @@ async def reprocess_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/embeddings.py b/src/mistralai/client/embeddings.py index a8a15363..64337b4f 100644 --- a/src/mistralai/client/embeddings.py +++ b/src/mistralai/client/embeddings.py @@ -50,7 +50,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -163,7 +163,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/events.py b/src/mistralai/client/events.py index db3ebcf5..3a4c4722 100644 --- a/src/mistralai/client/events.py +++ b/src/mistralai/client/events.py @@ -58,7 +58,7 @@ def get_stream_events( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -194,7 +194,7 @@ async def get_stream_events_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -314,7 +314,7 @@ def get_workflow_events( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -417,7 +417,7 @@ async def get_workflow_events_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index 4e6291f4..e4b9f90b 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -34,7 +34,7 @@ def get_workflow_execution( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -125,7 +125,7 @@ async def get_workflow_execution_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -218,7 +218,7 @@ def get_workflow_execution_history( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -312,7 +312,7 @@ async def get_workflow_execution_history_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -413,7 +413,7 @@ def signal_workflow_execution( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -526,7 +526,7 @@ async def signal_workflow_execution_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -639,7 +639,7 @@ def query_workflow_execution( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -752,7 +752,7 @@ async def query_workflow_execution_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -856,7 +856,7 @@ def terminate_workflow_execution( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -947,7 +947,7 @@ async def terminate_workflow_execution_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1038,7 +1038,7 @@ def batch_terminate_workflow_executions( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1132,7 +1132,7 @@ async def batch_terminate_workflow_executions_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1226,7 +1226,7 @@ def cancel_workflow_execution( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1317,7 +1317,7 @@ async def cancel_workflow_execution_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1408,7 +1408,7 @@ def batch_cancel_workflow_executions( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1502,7 +1502,7 @@ async def batch_cancel_workflow_executions_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1604,7 +1604,7 @@ def reset_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1716,7 +1716,7 @@ async def reset_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1829,7 +1829,7 @@ def update_workflow_execution( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1942,7 +1942,7 @@ async def update_workflow_execution_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2046,7 +2046,7 @@ def get_workflow_execution_trace_otel( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2139,7 +2139,7 @@ async def get_workflow_execution_trace_otel_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2232,7 +2232,7 @@ def get_workflow_execution_trace_summary( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2325,7 +2325,7 @@ async def get_workflow_execution_trace_summary_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2422,7 +2422,7 @@ def get_workflow_execution_trace_events( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2521,7 +2521,7 @@ async def get_workflow_execution_trace_events_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2622,7 +2622,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2732,7 +2732,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/fields.py b/src/mistralai/client/fields.py index 1ac05dc5..17441ca6 100644 --- a/src/mistralai/client/fields.py +++ b/src/mistralai/client/fields.py @@ -32,7 +32,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -120,7 +120,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -212,7 +212,7 @@ def fetch_options( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -310,7 +310,7 @@ async def fetch_options_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -410,7 +410,7 @@ def fetch_option_counts( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -521,7 +521,7 @@ async def fetch_option_counts_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/files.py b/src/mistralai/client/files.py index 0728e9a2..e4549c75 100644 --- a/src/mistralai/client/files.py +++ b/src/mistralai/client/files.py @@ -59,7 +59,7 @@ def upload( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -172,7 +172,7 @@ async def upload_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -279,7 +279,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -387,7 +387,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -481,7 +481,7 @@ def retrieve( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -568,7 +568,7 @@ async def retrieve_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -655,7 +655,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -742,7 +742,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -829,7 +829,7 @@ def download( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -918,7 +918,7 @@ async def download_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1007,7 +1007,7 @@ def get_signed_url( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1095,7 +1095,7 @@ async def get_signed_url_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/fim.py b/src/mistralai/client/fim.py index 243786b3..d25f79b1 100644 --- a/src/mistralai/client/fim.py +++ b/src/mistralai/client/fim.py @@ -65,7 +65,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -199,7 +199,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -333,7 +333,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -475,7 +475,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/fine_tuning_jobs.py b/src/mistralai/client/fine_tuning_jobs.py index f13c8f2d..a6bf93a3 100644 --- a/src/mistralai/client/fine_tuning_jobs.py +++ b/src/mistralai/client/fine_tuning_jobs.py @@ -57,7 +57,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -173,7 +173,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -303,7 +303,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -451,7 +451,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -565,7 +565,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -654,7 +654,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -743,7 +743,7 @@ def cancel( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -832,7 +832,7 @@ async def cancel_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -921,7 +921,7 @@ def start( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1010,7 +1010,7 @@ async def start_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/ingestion_pipeline_configurations.py b/src/mistralai/client/ingestion_pipeline_configurations.py index c94068d4..adef39f9 100644 --- a/src/mistralai/client/ingestion_pipeline_configurations.py +++ b/src/mistralai/client/ingestion_pipeline_configurations.py @@ -2,12 +2,13 @@ # @generated-id: f5a994272058 from .basesdk import BaseSDK +from datetime import datetime from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional +from typing import Any, Dict, List, Mapping, Optional class IngestionPipelineConfigurations(BaseSDK): @@ -34,7 +35,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -116,7 +117,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -179,6 +180,7 @@ def register( self, *, name: str, + pipeline_composition: OptionalNullable[Dict[str, str]] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -189,6 +191,7 @@ def register( Register an ingestion configuration. :param name: + :param pipeline_composition: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -200,7 +203,7 @@ def register( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -209,6 +212,7 @@ def register( request = models.CreateIngestionPipelineConfigurationRequest( name=name, + pipeline_composition=pipeline_composition, ) req = self._build_request( @@ -281,6 +285,7 @@ async def register_async( self, *, name: str, + pipeline_composition: OptionalNullable[Dict[str, str]] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -291,6 +296,7 @@ async def register_async( Register an ingestion configuration. :param name: + :param pipeline_composition: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -302,7 +308,7 @@ async def register_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -311,6 +317,7 @@ async def register_async( request = models.CreateIngestionPipelineConfigurationRequest( name=name, + pipeline_composition=pipeline_composition, ) req = self._build_request_async( @@ -378,3 +385,215 @@ async def register_async( raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) + + def update_run_info( + self, + *, + id: str, + execution_time: datetime, + chunks_count: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IngestionPipelineConfiguration: + r"""Update Run Info + + :param id: + :param execution_time: + :param chunks_count: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest( + id=id, + update_run_info=models.UpdateRunInfo( + execution_time=execution_time, + chunks_count=chunks_count, + ), + ) + ) + + req = self._build_request( + method="PUT", + path="/v1/rag/ingestion_pipeline_configurations/{id}/run_info", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_run_info, False, False, "json", models.UpdateRunInfo + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_run_info_v1_rag_ingestion_pipeline_configurations__id__run_info_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.IngestionPipelineConfiguration, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_run_info_async( + self, + *, + id: str, + execution_time: datetime, + chunks_count: int, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.IngestionPipelineConfiguration: + r"""Update Run Info + + :param id: + :param execution_time: + :param chunks_count: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = ( + models.UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest( + id=id, + update_run_info=models.UpdateRunInfo( + execution_time=execution_time, + chunks_count=chunks_count, + ), + ) + ) + + req = self._build_request_async( + method="PUT", + path="/v1/rag/ingestion_pipeline_configurations/{id}/run_info", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_run_info, False, False, "json", models.UpdateRunInfo + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_run_info_v1_rag_ingestion_pipeline_configurations__id__run_info_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.IngestionPipelineConfiguration, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/judges.py b/src/mistralai/client/judges.py index 210a147a..52c8899e 100644 --- a/src/mistralai/client/judges.py +++ b/src/mistralai/client/judges.py @@ -46,7 +46,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -159,7 +159,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -268,7 +268,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -373,7 +373,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -470,7 +470,7 @@ def fetch( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -563,7 +563,7 @@ async def fetch_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -656,7 +656,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -749,7 +749,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -856,7 +856,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -980,7 +980,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1094,7 +1094,7 @@ def judge_conversation( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1204,7 +1204,7 @@ async def judge_conversation_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index 15153643..928c1ea8 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -63,7 +63,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -165,7 +165,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -254,7 +254,7 @@ def create( :param name: :param description: - :param chunk_size: + :param chunk_size: The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. :param owner_type: Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -267,7 +267,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -359,7 +359,7 @@ async def create_async( :param name: :param description: - :param chunk_size: + :param chunk_size: The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. :param owner_type: Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -372,7 +372,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -471,7 +471,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -564,7 +564,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -657,7 +657,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -750,7 +750,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -822,7 +822,7 @@ def update( self, *, library_id: str, - name: OptionalNullable[str] = UNSET, + name: Optional[str] = None, description: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -847,7 +847,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -930,7 +930,7 @@ async def update_async( self, *, library_id: str, - name: OptionalNullable[str] = UNSET, + name: Optional[str] = None, description: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -955,7 +955,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/metrics.py b/src/mistralai/client/metrics.py index 8c132926..60597c40 100644 --- a/src/mistralai/client/metrics.py +++ b/src/mistralai/client/metrics.py @@ -60,7 +60,7 @@ def get_workflow_metrics( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -178,7 +178,7 @@ async def get_workflow_metrics_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index b60ab7c2..cb0320b3 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -1497,6 +1497,10 @@ ) from .paginationinfo import PaginationInfo, PaginationInfoTypedDict from .paginationresponse import PaginationResponse, PaginationResponseTypedDict + from .pause_schedule_v1_workflows_schedules_schedule_id_pause_postop import ( + PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest, + PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict, + ) from .post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop import ( PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest, PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequestTypedDict, @@ -1605,6 +1609,10 @@ ResponseStartedEvent, ResponseStartedEventTypedDict, ) + from .resume_schedule_v1_workflows_schedules_schedule_id_resume_postop import ( + ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequest, + ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequestTypedDict, + ) from .retrieve_model_v1_models_model_id_getop import ( ResponseRetrieveModelV1ModelsModelIDGet, ResponseRetrieveModelV1ModelsModelIDGetTypedDict, @@ -1626,10 +1634,18 @@ ScheduleDefinitionOutput, ScheduleDefinitionOutputTypedDict, ) + from .schedulefutureexecution import ( + ScheduleFutureExecution, + ScheduleFutureExecutionTypedDict, + ) from .scheduleinterval import ScheduleInterval, ScheduleIntervalTypedDict from .scheduleoverlappolicy import ScheduleOverlapPolicy from .schedulepolicy import SchedulePolicy, SchedulePolicyTypedDict from .schedulerange import ScheduleRange, ScheduleRangeTypedDict + from .schedulerecentexecution import ( + ScheduleRecentExecution, + ScheduleRecentExecutionTypedDict, + ) from .searchchatcompletioneventidsrequest import ( SearchChatCompletionEventIdsRequest, SearchChatCompletionEventIdsRequestTypedDict, @@ -1894,6 +1910,10 @@ UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest, UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict, ) + from .update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop import ( + UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest, + UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict, + ) from .update_voice_v1_audio_voices_voice_id_patchop import ( UpdateVoiceV1AudioVoicesVoiceIDPatchRequest, UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict, @@ -1952,6 +1972,7 @@ UpdateLibraryRequestTypedDict, ) from .updatemodelrequest import UpdateModelRequest, UpdateModelRequestTypedDict + from .updateruninfo import UpdateRunInfo, UpdateRunInfoTypedDict from .updateworkflowresponse import ( UpdateWorkflowResponse, UpdateWorkflowResponseTypedDict, @@ -2118,6 +2139,10 @@ WorkflowScheduleListResponse, WorkflowScheduleListResponseTypedDict, ) + from .workflowschedulepauserequest import ( + WorkflowSchedulePauseRequest, + WorkflowSchedulePauseRequestTypedDict, + ) from .workflowschedulerequest import ( WorkflowScheduleRequest, WorkflowScheduleRequestTypedDict, @@ -3157,6 +3182,8 @@ "PaginationInfoTypedDict", "PaginationResponse", "PaginationResponseTypedDict", + "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest", + "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict", "Payload", "PayloadTypedDict", "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest", @@ -3246,6 +3273,8 @@ "ResponseTypedDict", "ResponseV1ConversationsGet", "ResponseV1ConversationsGetTypedDict", + "ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequest", + "ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequestTypedDict", "RetrieveModelV1ModelsModelIDGetRequest", "RetrieveModelV1ModelsModelIDGetRequestTypedDict", "Role", @@ -3262,6 +3291,8 @@ "ScheduleDefinitionOutput", "ScheduleDefinitionOutputTypedDict", "ScheduleDefinitionTypedDict", + "ScheduleFutureExecution", + "ScheduleFutureExecutionTypedDict", "ScheduleInterval", "ScheduleIntervalTypedDict", "ScheduleOverlapPolicy", @@ -3269,6 +3300,8 @@ "SchedulePolicyTypedDict", "ScheduleRange", "ScheduleRangeTypedDict", + "ScheduleRecentExecution", + "ScheduleRecentExecutionTypedDict", "Scope", "SearchChatCompletionEventIdsRequest", "SearchChatCompletionEventIdsRequestTypedDict", @@ -3519,6 +3552,10 @@ "UpdateLibraryRequestTypedDict", "UpdateModelRequest", "UpdateModelRequestTypedDict", + "UpdateRunInfo", + "UpdateRunInfoTypedDict", + "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest", + "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict", "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest", @@ -3627,6 +3664,8 @@ "WorkflowRegistrationWithWorkerStatusTypedDict", "WorkflowScheduleListResponse", "WorkflowScheduleListResponseTypedDict", + "WorkflowSchedulePauseRequest", + "WorkflowSchedulePauseRequestTypedDict", "WorkflowScheduleRequest", "WorkflowScheduleRequestTypedDict", "WorkflowScheduleResponse", @@ -4674,6 +4713,8 @@ "PaginationInfoTypedDict": ".paginationinfo", "PaginationResponse": ".paginationresponse", "PaginationResponseTypedDict": ".paginationresponse", + "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest": ".pause_schedule_v1_workflows_schedules_schedule_id_pause_postop", + "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict": ".pause_schedule_v1_workflows_schedules_schedule_id_pause_postop", "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest": ".post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop", "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequestTypedDict": ".post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop", "PostDatasetRecordsFromDatasetV1ObservabilityDatasetsDatasetIDImportsFromDatasetPostRequest": ".post_dataset_records_from_dataset_v1_observability_datasets_dataset_id_imports_from_dataset_postop", @@ -4747,6 +4788,8 @@ "ResponseFormats": ".responseformats", "ResponseStartedEvent": ".responsestartedevent", "ResponseStartedEventTypedDict": ".responsestartedevent", + "ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequest": ".resume_schedule_v1_workflows_schedules_schedule_id_resume_postop", + "ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequestTypedDict": ".resume_schedule_v1_workflows_schedules_schedule_id_resume_postop", "ResponseRetrieveModelV1ModelsModelIDGet": ".retrieve_model_v1_models_model_id_getop", "ResponseRetrieveModelV1ModelsModelIDGetTypedDict": ".retrieve_model_v1_models_model_id_getop", "RetrieveModelV1ModelsModelIDGetRequest": ".retrieve_model_v1_models_model_id_getop", @@ -4764,6 +4807,8 @@ "ScheduleDefinitionTypedDict": ".scheduledefinition", "ScheduleDefinitionOutput": ".scheduledefinitionoutput", "ScheduleDefinitionOutputTypedDict": ".scheduledefinitionoutput", + "ScheduleFutureExecution": ".schedulefutureexecution", + "ScheduleFutureExecutionTypedDict": ".schedulefutureexecution", "ScheduleInterval": ".scheduleinterval", "ScheduleIntervalTypedDict": ".scheduleinterval", "ScheduleOverlapPolicy": ".scheduleoverlappolicy", @@ -4771,6 +4816,8 @@ "SchedulePolicyTypedDict": ".schedulepolicy", "ScheduleRange": ".schedulerange", "ScheduleRangeTypedDict": ".schedulerange", + "ScheduleRecentExecution": ".schedulerecentexecution", + "ScheduleRecentExecutionTypedDict": ".schedulerecentexecution", "SearchChatCompletionEventIdsRequest": ".searchchatcompletioneventidsrequest", "SearchChatCompletionEventIdsRequestTypedDict": ".searchchatcompletioneventidsrequest", "SearchChatCompletionEventIdsResponse": ".searchchatcompletioneventidsresponse", @@ -4969,6 +5016,8 @@ "UpdateDatasetV1ObservabilityDatasetsDatasetIDPatchRequestTypedDict": ".update_dataset_v1_observability_datasets_dataset_id_patchop", "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequest": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict": ".update_judge_v1_observability_judges_judge_id_putop", + "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest": ".update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop", + "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict": ".update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest": ".update_workflow_execution_v1_workflows_executions_execution_id_updates_postop", @@ -5005,6 +5054,8 @@ "UpdateLibraryRequestTypedDict": ".updatelibraryrequest", "UpdateModelRequest": ".updatemodelrequest", "UpdateModelRequestTypedDict": ".updatemodelrequest", + "UpdateRunInfo": ".updateruninfo", + "UpdateRunInfoTypedDict": ".updateruninfo", "UpdateWorkflowResponse": ".updateworkflowresponse", "UpdateWorkflowResponseTypedDict": ".updateworkflowresponse", "UsageInfo": ".usageinfo", @@ -5111,6 +5162,8 @@ "WorkflowRegistrationWithWorkerStatusTypedDict": ".workflowregistrationwithworkerstatus", "WorkflowScheduleListResponse": ".workflowschedulelistresponse", "WorkflowScheduleListResponseTypedDict": ".workflowschedulelistresponse", + "WorkflowSchedulePauseRequest": ".workflowschedulepauserequest", + "WorkflowSchedulePauseRequestTypedDict": ".workflowschedulepauserequest", "WorkflowScheduleRequest": ".workflowschedulerequest", "WorkflowScheduleRequestTypedDict": ".workflowschedulerequest", "WorkflowScheduleResponse": ".workflowscheduleresponse", diff --git a/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py index fd04b72f..068c8db9 100644 --- a/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py +++ b/src/mistralai/client/models/createingestionpipelineconfigurationrequest.py @@ -2,13 +2,49 @@ # @generated-id: 480f219c27e5 from __future__ import annotations -from mistralai.client.types import BaseModel -from typing_extensions import TypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Dict +from typing_extensions import NotRequired, TypedDict class CreateIngestionPipelineConfigurationRequestTypedDict(TypedDict): name: str + pipeline_composition: NotRequired[Nullable[Dict[str, str]]] class CreateIngestionPipelineConfigurationRequest(BaseModel): name: str + + pipeline_composition: OptionalNullable[Dict[str, str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["pipeline_composition"]) + nullable_fields = set(["pipeline_composition"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/createlibraryrequest.py b/src/mistralai/client/models/createlibraryrequest.py index 7d75578e..e0357e92 100644 --- a/src/mistralai/client/models/createlibraryrequest.py +++ b/src/mistralai/client/models/createlibraryrequest.py @@ -24,6 +24,7 @@ class CreateLibraryRequestTypedDict(TypedDict): name: str description: NotRequired[Nullable[str]] chunk_size: NotRequired[Nullable[int]] + r"""The size of the chunks (in characters) to split document text into. Must be between 256 and 32768.""" owner_type: NotRequired[Nullable[OwnerType]] r"""Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries.""" @@ -34,6 +35,7 @@ class CreateLibraryRequest(BaseModel): description: OptionalNullable[str] = UNSET chunk_size: OptionalNullable[int] = UNSET + r"""The size of the chunks (in characters) to split document text into. Must be between 256 and 32768.""" owner_type: OptionalNullable[OwnerType] = UNSET r"""Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries.""" diff --git a/src/mistralai/client/models/ingestionpipelineconfiguration.py b/src/mistralai/client/models/ingestionpipelineconfiguration.py index 5aaa6a40..5289c66d 100644 --- a/src/mistralai/client/models/ingestionpipelineconfiguration.py +++ b/src/mistralai/client/models/ingestionpipelineconfiguration.py @@ -3,22 +3,53 @@ from __future__ import annotations from datetime import datetime -from mistralai.client.types import BaseModel +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing import Dict from typing_extensions import TypedDict class IngestionPipelineConfigurationTypedDict(TypedDict): id: str + author_id: str name: str created_at: datetime modified_at: datetime + last_run_time: Nullable[datetime] + last_run_chunks_count: int + total_chunks_count: int + pipeline_composition: Nullable[Dict[str, str]] class IngestionPipelineConfiguration(BaseModel): id: str + author_id: str + name: str created_at: datetime modified_at: datetime + + last_run_time: Nullable[datetime] + + last_run_chunks_count: int + + total_chunks_count: int + + pipeline_composition: Nullable[Dict[str, str]] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/pause_schedule_v1_workflows_schedules_schedule_id_pause_postop.py b/src/mistralai/client/models/pause_schedule_v1_workflows_schedules_schedule_id_pause_postop.py new file mode 100644 index 00000000..2a53eaec --- /dev/null +++ b/src/mistralai/client/models/pause_schedule_v1_workflows_schedules_schedule_id_pause_postop.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 53799174e259 + +from __future__ import annotations +from .workflowschedulepauserequest import ( + WorkflowSchedulePauseRequest, + WorkflowSchedulePauseRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict(TypedDict): + schedule_id: str + workflow_schedule_pause_request: NotRequired[ + Nullable[WorkflowSchedulePauseRequestTypedDict] + ] + + +class PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_schedule_pause_request: Annotated[ + OptionalNullable[WorkflowSchedulePauseRequest], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["WorkflowSchedulePauseRequest"]) + nullable_fields = set(["WorkflowSchedulePauseRequest"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/referencechunk.py b/src/mistralai/client/models/referencechunk.py index c0d7c065..0ed4a737 100644 --- a/src/mistralai/client/models/referencechunk.py +++ b/src/mistralai/client/models/referencechunk.py @@ -11,10 +11,10 @@ from typing_extensions import Annotated, TypeAliasType, TypedDict -ReferenceIDTypedDict = TypeAliasType("ReferenceIDTypedDict", Union[str, int]) +ReferenceIDTypedDict = TypeAliasType("ReferenceIDTypedDict", Union[int, str]) -ReferenceID = TypeAliasType("ReferenceID", Union[str, int]) +ReferenceID = TypeAliasType("ReferenceID", Union[int, str]) class ReferenceChunkTypedDict(TypedDict): diff --git a/src/mistralai/client/models/resume_schedule_v1_workflows_schedules_schedule_id_resume_postop.py b/src/mistralai/client/models/resume_schedule_v1_workflows_schedules_schedule_id_resume_postop.py new file mode 100644 index 00000000..101bef6a --- /dev/null +++ b/src/mistralai/client/models/resume_schedule_v1_workflows_schedules_schedule_id_resume_postop.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2daf20be73bb + +from __future__ import annotations +from .workflowschedulepauserequest import ( + WorkflowSchedulePauseRequest, + WorkflowSchedulePauseRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequestTypedDict(TypedDict): + schedule_id: str + workflow_schedule_pause_request: NotRequired[ + Nullable[WorkflowSchedulePauseRequestTypedDict] + ] + + +class ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_schedule_pause_request: Annotated[ + OptionalNullable[WorkflowSchedulePauseRequest], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["WorkflowSchedulePauseRequest"]) + nullable_fields = set(["WorkflowSchedulePauseRequest"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/scheduledefinition.py b/src/mistralai/client/models/scheduledefinition.py index dc622c3a..58102293 100644 --- a/src/mistralai/client/models/scheduledefinition.py +++ b/src/mistralai/client/models/scheduledefinition.py @@ -53,6 +53,8 @@ class ScheduleDefinitionTypedDict(TypedDict): policy: NotRequired[SchedulePolicyTypedDict] schedule_id: NotRequired[Nullable[str]] r"""Unique identifier for the schedule.""" + max_executions: NotRequired[Nullable[int]] + r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" class ScheduleDefinition(BaseModel): @@ -101,6 +103,9 @@ class ScheduleDefinition(BaseModel): schedule_id: OptionalNullable[str] = UNSET r"""Unique identifier for the schedule.""" + max_executions: OptionalNullable[int] = UNSET + r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -115,10 +120,18 @@ def serialize_model(self, handler): "time_zone_name", "policy", "schedule_id", + "max_executions", ] ) nullable_fields = set( - ["start_at", "end_at", "jitter", "time_zone_name", "schedule_id"] + [ + "start_at", + "end_at", + "jitter", + "time_zone_name", + "schedule_id", + "max_executions", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/scheduledefinitionoutput.py b/src/mistralai/client/models/scheduledefinitionoutput.py index f40470fa..8a9f2058 100644 --- a/src/mistralai/client/models/scheduledefinitionoutput.py +++ b/src/mistralai/client/models/scheduledefinitionoutput.py @@ -3,8 +3,16 @@ from __future__ import annotations from .schedulecalendar import ScheduleCalendar, ScheduleCalendarTypedDict +from .schedulefutureexecution import ( + ScheduleFutureExecution, + ScheduleFutureExecutionTypedDict, +) from .scheduleinterval import ScheduleInterval, ScheduleIntervalTypedDict from .schedulepolicy import SchedulePolicy, SchedulePolicyTypedDict +from .schedulerecentexecution import ( + ScheduleRecentExecution, + ScheduleRecentExecutionTypedDict, +) from datetime import datetime from mistralai.client.types import ( BaseModel, @@ -28,6 +36,10 @@ class ScheduleDefinitionOutputTypedDict(TypedDict): r"""Input to provide to the workflow when starting it.""" schedule_id: str r"""Unique identifier for the schedule.""" + workflow_name: str + r"""Name of the workflow this schedule triggers.""" + paused: bool + r"""Whether the schedule is currently paused.""" calendars: NotRequired[List[ScheduleCalendarTypedDict]] r"""Calendar-based specification of times.""" intervals: NotRequired[List[ScheduleIntervalTypedDict]] @@ -50,6 +62,14 @@ class ScheduleDefinitionOutputTypedDict(TypedDict): time_zone_name: NotRequired[Nullable[str]] r"""IANA time zone name, for example ``US/Central``.""" policy: NotRequired[SchedulePolicyTypedDict] + remaining_executions: NotRequired[Nullable[int]] + r"""Remaining workflow executions before this schedule stops triggering automatically. null means unlimited; 0 means the limit has been reached and the schedule is exhausted.""" + note: NotRequired[Nullable[str]] + r"""Human-readable note associated with the current pause or resume state.""" + future_executions: NotRequired[List[ScheduleFutureExecutionTypedDict]] + r"""Upcoming scheduled executions (10 next executions, earliest first).""" + recent_executions: NotRequired[List[ScheduleRecentExecutionTypedDict]] + r"""Most recent scheduled executions (10 most recent, newest last).""" class ScheduleDefinitionOutput(BaseModel): @@ -64,6 +84,12 @@ class ScheduleDefinitionOutput(BaseModel): schedule_id: str r"""Unique identifier for the schedule.""" + workflow_name: str + r"""Name of the workflow this schedule triggers.""" + + paused: bool + r"""Whether the schedule is currently paused.""" + calendars: Optional[List[ScheduleCalendar]] = None r"""Calendar-based specification of times.""" @@ -95,6 +121,18 @@ class ScheduleDefinitionOutput(BaseModel): policy: Optional[SchedulePolicy] = None + remaining_executions: OptionalNullable[int] = UNSET + r"""Remaining workflow executions before this schedule stops triggering automatically. null means unlimited; 0 means the limit has been reached and the schedule is exhausted.""" + + note: OptionalNullable[str] = UNSET + r"""Human-readable note associated with the current pause or resume state.""" + + future_executions: Optional[List[ScheduleFutureExecution]] = None + r"""Upcoming scheduled executions (10 next executions, earliest first).""" + + recent_executions: Optional[List[ScheduleRecentExecution]] = None + r"""Most recent scheduled executions (10 most recent, newest last).""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -108,9 +146,22 @@ def serialize_model(self, handler): "jitter", "time_zone_name", "policy", + "remaining_executions", + "note", + "future_executions", + "recent_executions", + ] + ) + nullable_fields = set( + [ + "start_at", + "end_at", + "jitter", + "time_zone_name", + "remaining_executions", + "note", ] ) - nullable_fields = set(["start_at", "end_at", "jitter", "time_zone_name"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/schedulefutureexecution.py b/src/mistralai/client/models/schedulefutureexecution.py new file mode 100644 index 00000000..50f0491e --- /dev/null +++ b/src/mistralai/client/models/schedulefutureexecution.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 44bb85af3d44 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ScheduleFutureExecutionTypedDict(TypedDict): + scheduled_at: datetime + r"""Time the execution is scheduled to run.""" + + +class ScheduleFutureExecution(BaseModel): + scheduled_at: datetime + r"""Time the execution is scheduled to run.""" diff --git a/src/mistralai/client/models/schedulerecentexecution.py b/src/mistralai/client/models/schedulerecentexecution.py new file mode 100644 index 00000000..ad46a70d --- /dev/null +++ b/src/mistralai/client/models/schedulerecentexecution.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 745d146d9413 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class ScheduleRecentExecutionTypedDict(TypedDict): + scheduled_at: datetime + r"""Time the execution was scheduled to run.""" + started_at: datetime + r"""Actual time the execution started.""" + execution_id: str + r"""ID of the workflow execution that was started.""" + + +class ScheduleRecentExecution(BaseModel): + scheduled_at: datetime + r"""Time the execution was scheduled to run.""" + + started_at: datetime + r"""Actual time the execution started.""" + + execution_id: str + r"""ID of the workflow execution that was started.""" diff --git a/src/mistralai/client/models/update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop.py b/src/mistralai/client/models/update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop.py new file mode 100644 index 00000000..6b7d24d4 --- /dev/null +++ b/src/mistralai/client/models/update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop.py @@ -0,0 +1,26 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2a14ebf4ef57 + +from __future__ import annotations +from .updateruninfo import UpdateRunInfo, UpdateRunInfoTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict( + TypedDict +): + id: str + update_run_info: UpdateRunInfoTypedDict + + +class UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_run_info: Annotated[ + UpdateRunInfo, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/updatedocumentrequest.py b/src/mistralai/client/models/updatedocumentrequest.py index 12d9c89b..5f67ea69 100644 --- a/src/mistralai/client/models/updatedocumentrequest.py +++ b/src/mistralai/client/models/updatedocumentrequest.py @@ -11,7 +11,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import Dict, List, Union +from typing import Dict, List, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -32,19 +32,19 @@ class UpdateDocumentRequestTypedDict(TypedDict): - name: NotRequired[Nullable[str]] + name: NotRequired[str] attributes: NotRequired[Nullable[Dict[str, AttributesTypedDict]]] class UpdateDocumentRequest(BaseModel): - name: OptionalNullable[str] = UNSET + name: Optional[str] = None attributes: OptionalNullable[Dict[str, Attributes]] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["name", "attributes"]) - nullable_fields = set(["name", "attributes"]) + nullable_fields = set(["attributes"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/updatelibraryrequest.py b/src/mistralai/client/models/updatelibraryrequest.py index d5183ac0..64af28c5 100644 --- a/src/mistralai/client/models/updatelibraryrequest.py +++ b/src/mistralai/client/models/updatelibraryrequest.py @@ -10,23 +10,24 @@ UNSET_SENTINEL, ) from pydantic import model_serializer +from typing import Optional from typing_extensions import NotRequired, TypedDict class UpdateLibraryRequestTypedDict(TypedDict): - name: NotRequired[Nullable[str]] + name: NotRequired[str] description: NotRequired[Nullable[str]] class UpdateLibraryRequest(BaseModel): - name: OptionalNullable[str] = UNSET + name: Optional[str] = None description: OptionalNullable[str] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set(["name", "description"]) - nullable_fields = set(["name", "description"]) + nullable_fields = set(["description"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/updateruninfo.py b/src/mistralai/client/models/updateruninfo.py new file mode 100644 index 00000000..91038d1d --- /dev/null +++ b/src/mistralai/client/models/updateruninfo.py @@ -0,0 +1,18 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4330bdaa00b9 + +from __future__ import annotations +from datetime import datetime +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class UpdateRunInfoTypedDict(TypedDict): + execution_time: datetime + chunks_count: int + + +class UpdateRunInfo(BaseModel): + execution_time: datetime + + chunks_count: int diff --git a/src/mistralai/client/models/workflowschedulepauserequest.py b/src/mistralai/client/models/workflowschedulepauserequest.py new file mode 100644 index 00000000..a27f2e90 --- /dev/null +++ b/src/mistralai/client/models/workflowschedulepauserequest.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: da7b9a522bcb + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowSchedulePauseRequestTypedDict(TypedDict): + note: NotRequired[Nullable[str]] + r"""Optional note recorded in Temporal when pausing or resuming a schedule""" + + +class WorkflowSchedulePauseRequest(BaseModel): + note: OptionalNullable[str] = UNSET + r"""Optional note recorded in Temporal when pausing or resuming a schedule""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["note"]) + nullable_fields = set(["note"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models_.py b/src/mistralai/client/models_.py index 1e964485..2a00325f 100644 --- a/src/mistralai/client/models_.py +++ b/src/mistralai/client/models_.py @@ -40,7 +40,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -136,7 +136,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -230,7 +230,7 @@ def retrieve( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -325,7 +325,7 @@ async def retrieve_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -420,7 +420,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -513,7 +513,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -610,7 +610,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -714,7 +714,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -814,7 +814,7 @@ def archive( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -901,7 +901,7 @@ async def archive_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -988,7 +988,7 @@ def unarchive( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1075,7 +1075,7 @@ async def unarchive_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/ocr.py b/src/mistralai/client/ocr.py index 7ecbaae9..c290b1bb 100644 --- a/src/mistralai/client/ocr.py +++ b/src/mistralai/client/ocr.py @@ -66,7 +66,7 @@ def process( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -206,7 +206,7 @@ async def process_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/records.py b/src/mistralai/client/records.py index a47d12c3..2ac04c2f 100644 --- a/src/mistralai/client/records.py +++ b/src/mistralai/client/records.py @@ -34,7 +34,7 @@ def fetch( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -127,7 +127,7 @@ async def fetch_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -220,7 +220,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -313,7 +313,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -406,7 +406,7 @@ def bulk_delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -502,7 +502,7 @@ async def bulk_delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -602,7 +602,7 @@ def judge( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -711,7 +711,7 @@ async def judge_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -818,7 +818,7 @@ def update_payload( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -923,7 +923,7 @@ async def update_payload_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1028,7 +1028,7 @@ def update_properties( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1133,7 +1133,7 @@ async def update_properties_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index 031564ad..d1a242fb 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -50,7 +50,7 @@ def list_runs( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -197,7 +197,7 @@ async def list_runs_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -334,7 +334,7 @@ def get_run( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -425,7 +425,7 @@ async def get_run_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -518,7 +518,7 @@ def get_run_history( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -612,7 +612,7 @@ async def get_run_history_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/schedules.py b/src/mistralai/client/schedules.py index d0369009..9b013acd 100644 --- a/src/mistralai/client/schedules.py +++ b/src/mistralai/client/schedules.py @@ -32,7 +32,7 @@ def get_schedules( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -112,7 +112,7 @@ async def get_schedules_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -211,7 +211,7 @@ def schedule_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -328,7 +328,7 @@ async def schedule_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -428,7 +428,7 @@ def unschedule_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -519,7 +519,7 @@ async def unschedule_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -586,3 +586,423 @@ async def unschedule_workflow_async( raise errors.SDKError("API error occurred", http_res, http_res_text) raise errors.SDKError("Unexpected response received", http_res) + + def pause_schedule( + self, + *, + schedule_id: str, + note: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Pause Schedule + + :param schedule_id: + :param note: Optional note recorded in Temporal when pausing or resuming a schedule + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest( + schedule_id=schedule_id, + workflow_schedule_pause_request=models.WorkflowSchedulePauseRequest( + note=note, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/schedules/{schedule_id}/pause", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_pause_request + if request is not None + else None, + True, + True, + "json", + OptionalNullable[models.WorkflowSchedulePauseRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="pause_schedule_v1_workflows_schedules__schedule_id__pause_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def pause_schedule_async( + self, + *, + schedule_id: str, + note: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Pause Schedule + + :param schedule_id: + :param note: Optional note recorded in Temporal when pausing or resuming a schedule + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest( + schedule_id=schedule_id, + workflow_schedule_pause_request=models.WorkflowSchedulePauseRequest( + note=note, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/schedules/{schedule_id}/pause", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_pause_request + if request is not None + else None, + True, + True, + "json", + OptionalNullable[models.WorkflowSchedulePauseRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="pause_schedule_v1_workflows_schedules__schedule_id__pause_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def resume_schedule( + self, + *, + schedule_id: str, + note: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Resume Schedule + + :param schedule_id: + :param note: Optional note recorded in Temporal when pausing or resuming a schedule + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequest( + schedule_id=schedule_id, + workflow_schedule_pause_request=models.WorkflowSchedulePauseRequest( + note=note, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/workflows/schedules/{schedule_id}/resume", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_pause_request + if request is not None + else None, + True, + True, + "json", + OptionalNullable[models.WorkflowSchedulePauseRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="resume_schedule_v1_workflows_schedules__schedule_id__resume_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def resume_schedule_async( + self, + *, + schedule_id: str, + note: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ): + r"""Resume Schedule + + :param schedule_id: + :param note: Optional note recorded in Temporal when pausing or resuming a schedule + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ResumeScheduleV1WorkflowsSchedulesScheduleIDResumePostRequest( + schedule_id=schedule_id, + workflow_schedule_pause_request=models.WorkflowSchedulePauseRequest( + note=note, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/workflows/schedules/{schedule_id}/resume", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_pause_request + if request is not None + else None, + True, + True, + "json", + OptionalNullable[models.WorkflowSchedulePauseRequest], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="resume_schedule_v1_workflows_schedules__schedule_id__resume_post", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "204", "*"): + return + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py index 9b4eacf0..4893684b 100644 --- a/src/mistralai/client/speech.py +++ b/src/mistralai/client/speech.py @@ -123,7 +123,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -319,7 +319,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/transcriptions.py b/src/mistralai/client/transcriptions.py index d6489bf3..d84b59f8 100644 --- a/src/mistralai/client/transcriptions.py +++ b/src/mistralai/client/transcriptions.py @@ -52,7 +52,7 @@ def complete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -164,7 +164,7 @@ async def complete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -276,7 +276,7 @@ def stream( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -398,7 +398,7 @@ async def stream_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py index b95fd11d..e19d5d5a 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -41,7 +41,7 @@ def list( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -140,7 +140,7 @@ async def list_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -253,7 +253,7 @@ def create( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -376,7 +376,7 @@ async def create_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -481,7 +481,7 @@ def delete( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -574,7 +574,7 @@ async def delete_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -677,7 +677,7 @@ def update( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -794,7 +794,7 @@ async def update_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -901,7 +901,7 @@ def get( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -994,7 +994,7 @@ async def get_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1087,7 +1087,7 @@ def get_sample_audio( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1183,7 +1183,7 @@ async def get_sample_audio_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index 02c865cf..2693b05b 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -325,7 +325,7 @@ def get_workflows( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -465,7 +465,7 @@ async def get_workflows_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -618,7 +618,7 @@ def get_workflow_registrations( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -738,7 +738,7 @@ async def get_workflow_registrations_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -856,7 +856,7 @@ def execute_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -983,7 +983,7 @@ async def execute_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1113,7 +1113,7 @@ def execute_workflow_registration( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1243,7 +1243,7 @@ async def execute_workflow_registration_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1354,7 +1354,7 @@ def get_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1445,7 +1445,7 @@ async def get_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1542,7 +1542,7 @@ def update_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1651,7 +1651,7 @@ async def update_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1758,7 +1758,7 @@ def get_workflow_registration( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1857,7 +1857,7 @@ async def get_workflow_registration_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -1952,7 +1952,7 @@ def archive_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2043,7 +2043,7 @@ async def archive_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2134,7 +2134,7 @@ def unarchive_workflow( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -2227,7 +2227,7 @@ async def unarchive_workflow_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url diff --git a/src/mistralai/client/workflows_events.py b/src/mistralai/client/workflows_events.py index 57b6f1cb..71e44ac7 100644 --- a/src/mistralai/client/workflows_events.py +++ b/src/mistralai/client/workflows_events.py @@ -58,7 +58,7 @@ def get_stream_events( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -194,7 +194,7 @@ async def get_stream_events_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -314,7 +314,7 @@ def get_workflow_events( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url @@ -417,7 +417,7 @@ async def get_workflow_events_async( timeout_ms = self.sdk_configuration.timeout_ms if timeout_ms is None: - timeout_ms = 30000 + timeout_ms = 60000 if server_url is not None: base_url = server_url From 373316545980d9b048b7e6274c3f34394f9a59a1 Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 30 Apr 2026 13:21:18 +0100 Subject: [PATCH 61/82] Bump SDK to v2.4.4 in pyproject.toml only (#507) This was meant to happen in https://github.com/mistralai/client-python/pull/506 but it was somehow missed. So we are manually bumping the version. --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 67d9e66b..674de675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.3" +version = "2.4.4" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index 462b81ce..8f07ac6b 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.3" +version = "2.4.4" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 09882f6563afff32142519d0bee65d8058ed928d Mon Sep 17 00:00:00 2001 From: andreaonofrei01 Date: Tue, 5 May 2026 10:23:52 +0200 Subject: [PATCH 62/82] docs(examples): add chat reasoning_effort examples (#511) * docs(examples): add chat reasoning_effort examples Add four examples in examples/mistral/chat/ demonstrating reasoning_effort on mistral-medium-3-5: - reasoning_response_shape.py: dump the raw response shape for reasoning_effort="high" vs "none" so users see the ThinkChunk / TextChunk JSON before consuming it. - reasoning.py: single-turn call, iterate ThinkChunk and TextChunk in message.content. - reasoning_with_streaming.py: handle streaming deltas where chunks arrive as ThinkChunk lists during thinking and as plain string fragments after thinking ends. - reasoning_multi_turn.py: 3-turn math chain run with two replay strategies (keep vs drop ThinkChunks) and prints token usage so the cost difference is visible. * address review: keep ThinkChunks for MM3.5; use timeout_ms - reasoning_multi_turn.py: drop the keep-vs-drop comparison and recommend keeping ThinkChunks across turns. Per reviewer feedback, dropping the reasoning trace degrades MM3.5 performance. - All four files: replace httpx.Client(timeout=...) with the SDK's timeout_ms parameter; remove the httpx import. * fix lint: remove unused ThinkChunk import in reasoning_multi_turn * simplify multi-turn: append response.choices[0].message directly Avoids the unnecessary AssistantMessage(content=content) re-wrap and forwards any future fields on AssistantMessage automatically. Verified end-to-end: 3/3 runs of the math chain produce 391 -> 1173 -> 1073, and history inspection confirms each AssistantMessage slot preserves [ThinkChunk, TextChunk]. --- examples/mistral/chat/reasoning.py | 52 ++++++++++++++ examples/mistral/chat/reasoning_multi_turn.py | 68 +++++++++++++++++++ .../mistral/chat/reasoning_response_shape.py | 43 ++++++++++++ .../mistral/chat/reasoning_with_streaming.py | 64 +++++++++++++++++ 4 files changed, 227 insertions(+) create mode 100644 examples/mistral/chat/reasoning.py create mode 100644 examples/mistral/chat/reasoning_multi_turn.py create mode 100644 examples/mistral/chat/reasoning_response_shape.py create mode 100644 examples/mistral/chat/reasoning_with_streaming.py diff --git a/examples/mistral/chat/reasoning.py b/examples/mistral/chat/reasoning.py new file mode 100644 index 00000000..1e2b1348 --- /dev/null +++ b/examples/mistral/chat/reasoning.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python + +import os + +from mistralai.client import Mistral +from mistralai.client.models import TextChunk, ThinkChunk, UserMessage + + +def main(): + api_key = os.environ["MISTRAL_API_KEY"] + model = "mistral-medium-3-5" + + # Bump request timeout because reasoning runs can be long. + client = Mistral(api_key=api_key, timeout_ms=300_000) + + chat_response = client.chat.complete( + model=model, + messages=[ + UserMessage( + content=( + "John is one of 4 children. The first sister is 4 years old. " + "Next year, the second sister will be twice as old as the first sister. " + "The third sister is two years older than the second sister. " + "The third sister is half the age of her older brother. " + "How old is John?" + ) + ) + ], + reasoning_effort="high", + temperature=0.7, + ) + + # With reasoning_effort="high", message.content is a list of chunks. + # With reasoning_effort="none", message.content is a plain string. + content = chat_response.choices[0].message.content + if isinstance(content, str): + print(content) + return + + for chunk in content or []: + if isinstance(chunk, ThinkChunk): + print("--- thinking ---") + for inner in chunk.thinking: + if isinstance(inner, TextChunk): + print(inner.text) + print("--- /thinking ---") + elif isinstance(chunk, TextChunk): + print(chunk.text) + + +if __name__ == "__main__": + main() diff --git a/examples/mistral/chat/reasoning_multi_turn.py b/examples/mistral/chat/reasoning_multi_turn.py new file mode 100644 index 00000000..84b880de --- /dev/null +++ b/examples/mistral/chat/reasoning_multi_turn.py @@ -0,0 +1,68 @@ +#!/usr/bin/env python + +# Multi-turn conversation with a reasoning model. +# +# IMPORTANT: for Mistral Medium 3.5, always replay the assistant turn +# back into `messages` with its ThinkChunks intact. Dropping the +# reasoning trace across turns DEGRADES the model's performance. +# +# This example runs a 3-turn math chain and prints per-turn token +# usage. The prompt grows as the reasoning trace accumulates; that +# growth is expected. + +import os + +from mistralai.client import Mistral +from mistralai.client.models import TextChunk, UserMessage + +MODEL = "mistral-medium-3-5" +TURNS = [ + "What is 17 * 23?", + "Now multiply that by 3.", + "And subtract 100 from the result.", +] + + +def final_text(content): + if isinstance(content, str): + return content + return "".join(c.text for c in (content or []) if isinstance(c, TextChunk)) + + +def main(): + # Bump request timeout because reasoning runs can be long. + client = Mistral(api_key=os.environ["MISTRAL_API_KEY"], timeout_ms=300_000) + + messages = [] + total_prompt = 0 + total_completion = 0 + + for i, user_text in enumerate(TURNS, start=1): + messages.append(UserMessage(content=user_text)) + response = client.chat.complete( + model=MODEL, + messages=messages, + reasoning_effort="high", + temperature=0.7, + ) + message = response.choices[0].message + usage = response.usage + total_prompt += usage.prompt_tokens + total_completion += usage.completion_tokens + + print( + f"turn {i}: prompt={usage.prompt_tokens:>4} " + f"completion={usage.completion_tokens:>4} -> {final_text(message.content)}" + ) + # Append the full assistant message back into history so the + # ThinkChunks are preserved across turns. + messages.append(message) + + print( + f"TOTAL: prompt={total_prompt} completion={total_completion} " + f"(sum {total_prompt + total_completion})" + ) + + +if __name__ == "__main__": + main() diff --git a/examples/mistral/chat/reasoning_response_shape.py b/examples/mistral/chat/reasoning_response_shape.py new file mode 100644 index 00000000..6cb820ab --- /dev/null +++ b/examples/mistral/chat/reasoning_response_shape.py @@ -0,0 +1,43 @@ +#!/usr/bin/env python + +# Print the raw shape of a chat response when using `reasoning_effort`. +# Run this first to see what ThinkChunk / TextChunk look like in the wire +# format, then move on to the other reasoning_*.py examples. + +import json +import os + +from mistralai.client import Mistral +from mistralai.client.models import UserMessage + + +def main(): + # Bump request timeout because reasoning runs can be long. + client = Mistral(api_key=os.environ["MISTRAL_API_KEY"], timeout_ms=300_000) + + prompt = "What is 12 * 14? Answer in one short sentence." + + for effort in ["high", "none"]: + print(f"\n========== reasoning_effort={effort!r} ==========") + response = client.chat.complete( + model="mistral-medium-3-5", + messages=[UserMessage(content=prompt)], + reasoning_effort=effort, + temperature=0.7, + ) + message = response.choices[0].message + print(f"type(message.content) = {type(message.content).__name__}") + print("message.content =") + if isinstance(message.content, str): + print(json.dumps(message.content, indent=2)) + else: + print( + json.dumps( + [chunk.model_dump() for chunk in message.content], + indent=2, + ) + ) + + +if __name__ == "__main__": + main() diff --git a/examples/mistral/chat/reasoning_with_streaming.py b/examples/mistral/chat/reasoning_with_streaming.py new file mode 100644 index 00000000..377844a2 --- /dev/null +++ b/examples/mistral/chat/reasoning_with_streaming.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +import os + +from mistralai.client import Mistral +from mistralai.client.models import TextChunk, ThinkChunk, UserMessage + + +def main(): + api_key = os.environ["MISTRAL_API_KEY"] + model = "mistral-medium-3-5" + + # Bump request timeout because reasoning runs can be long. + client = Mistral(api_key=api_key, timeout_ms=300_000) + + # While the model is thinking, delta.content is a list containing a + # ThinkChunk. After the thinking phase ends, delta.content arrives as + # plain string fragments. The transition event may contain both a closing + # ThinkChunk and the first TextChunk in a single list. + in_thinking = False + for event in client.chat.stream( + model=model, + messages=[ + UserMessage( + content=( + "If a train leaves Paris at 9am going 120 km/h and another " + "leaves Lyon at 10am going 150 km/h on the same track, " + "when do they meet? Paris-Lyon is 465 km." + ) + ) + ], + reasoning_effort="high", + temperature=0.7, + ): + delta = event.data.choices[0].delta.content + if not delta: + continue + + if isinstance(delta, str): + if in_thinking: + print("\n--- /thinking ---") + in_thinking = False + print(delta, end="", flush=True) + continue + + for chunk in delta: + if isinstance(chunk, ThinkChunk): + if not in_thinking: + print("--- thinking ---") + in_thinking = True + for inner in chunk.thinking: + if isinstance(inner, TextChunk): + print(inner.text, end="", flush=True) + elif isinstance(chunk, TextChunk): + if in_thinking: + print("\n--- /thinking ---") + in_thinking = False + print(chunk.text, end="", flush=True) + + print() + + +if __name__ == "__main__": + main() From 109ee43e8d5e9f8502986f263adf9f6ed816f4e9 Mon Sep 17 00:00:00 2001 From: Nicolas Faurie Date: Wed, 6 May 2026 16:36:09 +0200 Subject: [PATCH 63/82] Workflows: Event decryption (#510) * Workflows: Event decryption * Improvements * Improvements * Decryption for event stream endpoint * Add new route to stream decoding * Fix a generation issue * Do not trigger SDK generation --- .../client/_hooks/workflow_encoding_hook.py | 247 +++++++++++++++--- .../workflows/encoding/payload_encoder.py | 55 ++++ 2 files changed, 265 insertions(+), 37 deletions(-) diff --git a/src/mistralai/client/_hooks/workflow_encoding_hook.py b/src/mistralai/client/_hooks/workflow_encoding_hook.py index f383842d..d65c3ff4 100644 --- a/src/mistralai/client/_hooks/workflow_encoding_hook.py +++ b/src/mistralai/client/_hooks/workflow_encoding_hook.py @@ -5,9 +5,10 @@ import re import uuid import weakref -from typing import Any, Coroutine, Dict, Optional, TypeVar, Union +from typing import Any, AsyncIterator, Coroutine, Dict, Optional, TypeVar, Union import httpx +from httpx._types import AsyncByteStream from .types import ( AfterSuccessContext, @@ -28,9 +29,7 @@ class _WorkflowEncodingConfig: - def __init__( - self, payload_encoder: PayloadEncoder, namespace: str - ) -> None: + def __init__(self, payload_encoder: PayloadEncoder, namespace: str) -> None: self.payload_encoder = payload_encoder self.namespace = namespace @@ -64,7 +63,9 @@ def configure_workflow_encoding( ) -def _get_encoding_config(sdk_config: SDKConfiguration) -> Optional[_WorkflowEncodingConfig]: +def _get_encoding_config( + sdk_config: SDKConfiguration, +) -> Optional[_WorkflowEncodingConfig]: """Get workflow encoding config for a client.""" config_id = getattr(sdk_config, _ENCODING_CONFIG_ID_ATTR, None) if config_id is None: @@ -100,9 +101,31 @@ def _get_encoding_config(sdk_config: SDKConfiguration) -> Optional[_WorkflowEnco "update_workflow_execution_v1_workflows_executions__execution_id__updates_post", } +# Operations that return event data that may need decryption +OPERATIONS_DECODE_EVENTS = { + "get_workflow_events_v1_workflows_events_list_get", +} + +# Streaming operations that return SSE event data that may need decryption +OPERATIONS_DECODE_EVENTS_STREAM = { + "get_stream_events_v1_workflows_events_stream_get", + "stream_v1_workflows_executions__execution_id__stream_get", +} + SCHEDULE_CORRELATION_ID_PLACEHOLDER = "__scheduled_workflow__" +def _is_payload_type(value: Any) -> bool: + """Check if a value is a JSONPayload or JSONPatchPayload by its structure. + + Payload types have: {"type": "json" | "json_patch", "value": ...} + """ + if not isinstance(value, dict): + return False + payload_type = value.get("type") + return payload_type in ("json", "json_patch") and "value" in value + + _T = TypeVar("_T") @@ -143,6 +166,127 @@ def _extract_execution_id_from_body(body: Dict[str, Any]) -> Optional[str]: return body.get("execution_id") +async def _decrypt_event_attributes( + attributes: Dict[str, Any], + payload_encoder: PayloadEncoder, +) -> Dict[str, Any]: + """Decrypt payload fields in event attributes.""" + for field_name, field_value in attributes.items(): + if not _is_payload_type(field_value): + continue + + # Check if it has encoding_options (meaning it's encrypted) + if not field_value.get("encoding_options"): + continue + + # Decrypt the payload + decrypted = await payload_encoder.decode_event_payload(field_value) + attributes[field_name] = decrypted + + return attributes + + +async def _decrypt_events_in_response( + body: Dict[str, Any], + payload_encoder: PayloadEncoder, +) -> Dict[str, Any]: + """Decrypt payload fields in events within a response body.""" + events = body.get("events", []) + if not events: + return body + + for event in events: + attributes = event.get("attributes") + if isinstance(attributes, dict): + event["attributes"] = await _decrypt_event_attributes( + attributes, payload_encoder + ) + + return body + + +def _decrypt_sse_line(line: bytes, payload_encoder: PayloadEncoder) -> bytes: + """Decrypt event payloads in an SSE data line.""" + if not line.startswith(b"data:"): + return line + + try: + data_part = line[5:].strip() + if not data_part: + return line + + event_wrapper = json.loads(data_part) + data = event_wrapper.get("data") + if not isinstance(data, dict): + return line + + attributes = data.get("attributes") + if not isinstance(attributes, dict): + return line + + # Decrypt in place - _decrypt_event_attributes modifies attributes dict + _run_async(_decrypt_event_attributes(attributes, payload_encoder)) + + return b"data: " + json.dumps(event_wrapper).encode("utf-8") + except (json.JSONDecodeError, Exception) as e: + logger.debug("SSE line decryption failed: %s", e) + return line + + +class _DecryptingAsyncByteStream(AsyncByteStream): + """Async byte stream wrapper that decrypts SSE event payloads.""" + + def __init__(self, original_stream: Any, payload_encoder: PayloadEncoder): + self._original = original_stream + self._payload_encoder = payload_encoder + self._buffer = b"" + + async def __aiter__(self) -> AsyncIterator[bytes]: + async for chunk in self._original: + for processed in self._process_chunk(chunk): + yield processed + # Flush remaining buffer + if self._buffer: + yield _decrypt_sse_line(self._buffer, self._payload_encoder) + + def _process_chunk(self, chunk: bytes): + self._buffer += chunk + lines = self._buffer.split(b"\n") + # Keep last incomplete line in buffer + self._buffer = lines[-1] + for line in lines[:-1]: + yield _decrypt_sse_line(line, self._payload_encoder) + b"\n" + + async def aclose(self) -> None: + if hasattr(self._original, "aclose"): + await self._original.aclose() + + +def _wrap_sse_response_with_decryption( + response: httpx.Response, + payload_encoder: PayloadEncoder, +) -> httpx.Response: + """Wrap an SSE response to decrypt event payloads as they stream. + + Creates a new response with a custom stream that decrypts payloads on-the-fly. + """ + # Get the original stream from the response + original_stream = response.stream + + # Create wrapped stream + decrypting_stream = _DecryptingAsyncByteStream(original_stream, payload_encoder) + + # Create new response with wrapped stream + # Use internal _content to avoid reading stream + new_response = httpx.Response( + status_code=response.status_code, + headers=response.headers, + stream=decrypting_stream, + request=response.request, + extensions=response.extensions, + ) + + return new_response class WorkflowEncodingHook(BeforeRequestHook, AfterSuccessHook): @@ -203,12 +347,10 @@ def before_request( execution_id=execution_id, ) - logger.debug( - "WorkflowEncodingHook: Encoding input for %s", hook_ctx.operation_id - ) - encoded_input = _run_async( - encoding_config.payload_encoder.encode_network_input(input_data, context) + encoding_config.payload_encoder.encode_network_input( + input_data, context + ) ) # Update body based on operation type: @@ -241,40 +383,71 @@ def after_success( hook_ctx: AfterSuccessContext, response: httpx.Response, ) -> Union[httpx.Response, Exception]: - """Intercept responses to decode workflow result payloads.""" + """Intercept responses to decode workflow result payloads and event payloads.""" encoding_config = _get_encoding_config(hook_ctx.config) if not encoding_config: return response - if hook_ctx.operation_id not in OPERATIONS_DECODE_RESULT: + content_type = response.headers.get("content-type", "") + + # Handle SSE stream decryption + if hook_ctx.operation_id in OPERATIONS_DECODE_EVENTS_STREAM: + if "text/event-stream" in content_type: + return _wrap_sse_response_with_decryption( + response, encoding_config.payload_encoder + ) return response - content_type = response.headers.get("content-type", "") if "application/json" not in content_type: return response - try: - body = json.loads(response.content) - result = body.get("result") - if result is None or not encoding_config.payload_encoder.check_is_payload_encoded(result): - return response - - logger.debug( - "WorkflowEncodingHook: Decoding result for %s", hook_ctx.operation_id - ) - - decoded_result = _run_async(encoding_config.payload_encoder.decode_network_result(result)) - - body["result"] = decoded_result - new_content = json.dumps(body).encode("utf-8") + # Handle workflow result decoding + if hook_ctx.operation_id in OPERATIONS_DECODE_RESULT: + try: + body = json.loads(response.content) + result = body.get("result") + if ( + result is not None + and encoding_config.payload_encoder.check_is_payload_encoded( + result + ) + ): + decoded_result = _run_async( + encoding_config.payload_encoder.decode_network_result(result) + ) + + body["result"] = decoded_result + new_content = json.dumps(body).encode("utf-8") + + response = httpx.Response( + status_code=response.status_code, + headers=response.headers, + content=new_content, + request=response.request, + extensions=response.extensions, + ) + except Exception as e: + logger.error("WorkflowEncodingHook: Failed to decode result: %s", e) + raise + + # Handle event payload decoding + elif hook_ctx.operation_id in OPERATIONS_DECODE_EVENTS: + try: + body = json.loads(response.content) + body = _run_async( + _decrypt_events_in_response(body, encoding_config.payload_encoder) + ) + new_content = json.dumps(body).encode("utf-8") + + response = httpx.Response( + status_code=response.status_code, + headers=response.headers, + content=new_content, + request=response.request, + extensions=response.extensions, + ) + except Exception as e: + logger.error("WorkflowEncodingHook: Failed to decode events: %s", e) + raise - return httpx.Response( - status_code=response.status_code, - headers=response.headers, - content=new_content, - request=response.request, - extensions=response.extensions, - ) - except Exception as e: - logger.error("WorkflowEncodingHook: Failed to decode result: %s", e) - raise + return response diff --git a/src/mistralai/extra/workflows/encoding/payload_encoder.py b/src/mistralai/extra/workflows/encoding/payload_encoder.py index 802ae41b..611f33fa 100644 --- a/src/mistralai/extra/workflows/encoding/payload_encoder.py +++ b/src/mistralai/extra/workflows/encoding/payload_encoder.py @@ -263,6 +263,35 @@ async def encode_payload_content( return data, encoding_options + async def encode_event_payload_content( + self, data: Union[bytes, str], force_full_encryption: bool = False + ) -> tuple[bytes, list[EncodedPayloadOptions]]: + """Encrypt event payload content. + + Unlike encode_payload_content, this only handles encryption (no offloading). + + Args: + data: The payload data to encrypt. + force_full_encryption: Force full encryption regardless of configured mode. + Use for payloads like json_patch that don't support partial encryption. + """ + if isinstance(data, str): + data = data.encode() + + if self.encryption_config is None: + return data, [] + + if force_full_encryption or self.encryption_config.mode == PayloadEncryptionMode.FULL: + encrypted_data = self._encrypt(data) + return encrypted_data, [EncodedPayloadOptions.ENCRYPTED] + + # Partial encryption mode + data, partially_encrypted = await self._partially_encrypt_fields(data) + if partially_encrypted: + return data, [EncodedPayloadOptions.PARTIALLY_ENCRYPTED] + + return data, [] + async def decode_payload_content( self, data: bytes, encoding_options: List[EncodedPayloadOptions] ) -> bytes: @@ -294,6 +323,32 @@ async def decode_payload_content( return data + async def decode_event_payload( + self, payload_data: Dict[str, Any] + ) -> Dict[str, Any]: + """Decrypt an event payload's value if it has encoding_options. + + Args: + payload_data: Dict with 'type', 'value', and 'encoding_options' fields + + Returns: + Dict with decrypted 'value' and empty 'encoding_options' + """ + encoding_options_strs = payload_data.get("encoding_options", []) + if not encoding_options_strs: + return payload_data + + encoding_options = [EncodedPayloadOptions(opt) for opt in encoding_options_strs] + encrypted_bytes = base64.b64decode(payload_data["value"]) + decrypted_bytes = await self.decode_payload_content(encrypted_bytes, encoding_options) + decrypted_value = json.loads(decrypted_bytes) + + return { + "type": payload_data["type"], + "value": decrypted_value, + "encoding_options": [], + } + async def encode_network_input( self, data: Optional[Dict[str, Any]], context: WorkflowContext ) -> NetworkEncodedInput: From b8e3a84b2c1d6cce69cc486f7193f89983f45c05 Mon Sep 17 00:00:00 2001 From: Louis Sanna <85956496+louis-sanna-dev@users.noreply.github.com> Date: Wed, 6 May 2026 17:45:12 +0200 Subject: [PATCH 64/82] ci: align versions from generated branch output (#514) --- .../workflows/sdk_generation_mistralai_azure_sdk.yaml | 9 ++++++--- .github/workflows/sdk_generation_mistralai_gcp_sdk.yaml | 9 ++++++--- .github/workflows/sdk_generation_mistralai_sdk.yaml | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml index d5b59b96..7b412a4c 100644 --- a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml @@ -44,6 +44,7 @@ jobs: set_version: ${{ github.event.inputs.set_version }} speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-azure-sdk + feature_branch: speakeasy-sdk-regen-${{ github.run_id }} secrets: github_access_token: ${{ secrets.CLIENT_PIPELINE }} pypi_token: ${{ secrets.PYPI_TOKEN }} @@ -57,10 +58,12 @@ jobs: id: find-pr env: GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} + SPEAKEASY_BRANCH: speakeasy-sdk-regen-${{ github.run_id }} run: | - PR_BRANCH=$(gh pr list --repo ${{ github.repository }} --author "app/github-actions" \ - --json headRefName,updatedAt --jq 'sort_by(.updatedAt) | reverse | .[0].headRefName // empty') - echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT + set -euo pipefail + PR_BRANCH="$SPEAKEASY_BRANCH" + echo "Using Speakeasy generated branch: $PR_BRANCH" + echo "branch=$PR_BRANCH" >> "$GITHUB_OUTPUT" - name: Checkout PR branch if: steps.find-pr.outputs.branch != '' diff --git a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml index f2e33f06..5d200ae0 100644 --- a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml @@ -44,6 +44,7 @@ jobs: set_version: ${{ github.event.inputs.set_version }} speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-gcp-sdk + feature_branch: speakeasy-sdk-regen-${{ github.run_id }} secrets: github_access_token: ${{ secrets.CLIENT_PIPELINE }} pypi_token: ${{ secrets.PYPI_TOKEN }} @@ -57,10 +58,12 @@ jobs: id: find-pr env: GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} + SPEAKEASY_BRANCH: speakeasy-sdk-regen-${{ github.run_id }} run: | - PR_BRANCH=$(gh pr list --repo ${{ github.repository }} --author "app/github-actions" \ - --json headRefName,updatedAt --jq 'sort_by(.updatedAt) | reverse | .[0].headRefName // empty') - echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT + set -euo pipefail + PR_BRANCH="$SPEAKEASY_BRANCH" + echo "Using Speakeasy generated branch: $PR_BRANCH" + echo "branch=$PR_BRANCH" >> "$GITHUB_OUTPUT" - name: Checkout PR branch if: steps.find-pr.outputs.branch != '' diff --git a/.github/workflows/sdk_generation_mistralai_sdk.yaml b/.github/workflows/sdk_generation_mistralai_sdk.yaml index d9106b95..251cfdde 100644 --- a/.github/workflows/sdk_generation_mistralai_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_sdk.yaml @@ -44,6 +44,7 @@ jobs: set_version: ${{ github.event.inputs.set_version }} speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} target: mistralai-sdk + feature_branch: speakeasy-sdk-regen-${{ github.run_id }} secrets: github_access_token: ${{ secrets.CLIENT_PIPELINE }} pypi_token: ${{ secrets.PYPI_TOKEN }} @@ -57,10 +58,12 @@ jobs: id: find-pr env: GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} + SPEAKEASY_BRANCH: speakeasy-sdk-regen-${{ github.run_id }} run: | - PR_BRANCH=$(gh pr list --repo ${{ github.repository }} --author "app/github-actions" \ - --json headRefName,updatedAt --jq 'sort_by(.updatedAt) | reverse | .[0].headRefName // empty') - echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT + set -euo pipefail + PR_BRANCH="$SPEAKEASY_BRANCH" + echo "Using Speakeasy generated branch: $PR_BRANCH" + echo "branch=$PR_BRANCH" >> "$GITHUB_OUTPUT" - name: Checkout PR branch if: steps.find-pr.outputs.branch != '' From 77ff32a65526a380e7e238ac40d8cc6443776c2f Mon Sep 17 00:00:00 2001 From: Louis Sanna <85956496+louis-sanna-dev@users.noreply.github.com> Date: Wed, 6 May 2026 17:53:58 +0200 Subject: [PATCH 65/82] ci: add required examples gate (#513) * ci: add required examples gate * ci: add required lint gates --- .github/workflows/lint_custom_code.yaml | 13 +++++++++++++ .github/workflows/run_example_scripts.yaml | 13 +++++++++++++ .github/workflows/test_custom_code.yaml | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/.github/workflows/lint_custom_code.yaml b/.github/workflows/lint_custom_code.yaml index 9dcb04e4..da520486 100644 --- a/.github/workflows/lint_custom_code.yaml +++ b/.github/workflows/lint_custom_code.yaml @@ -31,3 +31,16 @@ jobs: # The init, sdkhooks.py and types.py files in the _hooks folders are generated by Speakeasy hence the exclusion - name: Run all linters run: scripts/lint_custom_code.sh + + lint_custom_code_required: + runs-on: ubuntu-latest + needs: lint + if: ${{ always() }} + + steps: + - name: Require custom code lint to pass + run: | + if [ "${{ needs.lint.result }}" != "success" ]; then + echo "Expected custom code lint to pass, got: ${{ needs.lint.result }}" + exit 1 + fi diff --git a/.github/workflows/run_example_scripts.yaml b/.github/workflows/run_example_scripts.yaml index 4f82e0d7..35ec1def 100644 --- a/.github/workflows/run_example_scripts.yaml +++ b/.github/workflows/run_example_scripts.yaml @@ -48,3 +48,16 @@ jobs: ./scripts/run_examples.sh env: MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }} + + run_examples_required: + runs-on: ubuntu-latest + needs: run_examples + if: ${{ always() }} + + steps: + - name: Require all example jobs to pass + run: | + if [ "${{ needs.run_examples.result }}" != "success" ]; then + echo "Expected all run_examples matrix jobs to pass, got: ${{ needs.run_examples.result }}" + exit 1 + fi diff --git a/.github/workflows/test_custom_code.yaml b/.github/workflows/test_custom_code.yaml index 9a53c1e5..33cc3d5a 100644 --- a/.github/workflows/test_custom_code.yaml +++ b/.github/workflows/test_custom_code.yaml @@ -34,3 +34,16 @@ jobs: - name: Run pytest for repository tests run: uv run pytest tests/ + + test_custom_code_required: + runs-on: ubuntu-latest + needs: lint + if: ${{ always() }} + + steps: + - name: Require custom code tests to pass + run: | + if [ "${{ needs.lint.result }}" != "success" ]; then + echo "Expected custom code tests to pass, got: ${{ needs.lint.result }}" + exit 1 + fi From 99fb677c4e786b90f0cf74d600790c9c7957fa79 Mon Sep 17 00:00:00 2001 From: Raquel Barbadillo Date: Thu, 7 May 2026 10:13:21 +0200 Subject: [PATCH 66/82] feat: support per-instance OpenTelemetry TracerProvider via set_tracer_provider (#517) Add a set_tracer_provider(client, provider) helper that attaches a custom TracerProvider to a specific Mistral client instance. Spans produced by that client are emitted through the custom provider; other instances continue using the global provider. Usage: from mistralai.extra.observability import set_tracer_provider set_tracer_provider(client, my_provider) Generated by Mistral Vibe. Co-authored-by: Mistral Vibe --- src/mistralai/client/_hooks/tracing.py | 6 +- src/mistralai/extra/observability/__init__.py | 42 +++++- src/mistralai/extra/observability/otel.py | 25 ++-- .../extra/tests/test_otel_tracing.py | 124 ++++++++++++++++++ 4 files changed, 185 insertions(+), 12 deletions(-) diff --git a/src/mistralai/client/_hooks/tracing.py b/src/mistralai/client/_hooks/tracing.py index 632320ce..14c8cffc 100644 --- a/src/mistralai/client/_hooks/tracing.py +++ b/src/mistralai/client/_hooks/tracing.py @@ -2,6 +2,7 @@ from typing import Optional, Tuple, Union import httpx +from opentelemetry import trace from opentelemetry.trace import Span from mistralai.extra.observability.otel import ( @@ -27,6 +28,7 @@ class TracingHook(BeforeRequestHook, AfterSuccessHook, AfterErrorHook): def __init__(self) -> None: + self.tracer_provider: Optional[trace.TracerProvider] = None self.tracing_enabled, self.tracer = get_or_create_otel_tracer() def before_request( @@ -34,7 +36,9 @@ def before_request( ) -> Union[httpx.Request, Exception]: # Refresh tracer/provider per request so tracing can be enabled if the # application configures OpenTelemetry after the client is instantiated. - self.tracing_enabled, self.tracer = get_or_create_otel_tracer() + self.tracing_enabled, self.tracer = get_or_create_otel_tracer( + provider=self.tracer_provider, + ) request, span = get_traced_request_and_span( tracing_enabled=self.tracing_enabled, tracer=self.tracer, diff --git a/src/mistralai/extra/observability/__init__.py b/src/mistralai/extra/observability/__init__.py index 4ff5873c..d3ae6cd9 100644 --- a/src/mistralai/extra/observability/__init__.py +++ b/src/mistralai/extra/observability/__init__.py @@ -1,9 +1,13 @@ from contextlib import contextmanager +from typing import TYPE_CHECKING from opentelemetry import trace as otel_trace from .otel import MISTRAL_SDK_OTEL_TRACER_NAME +if TYPE_CHECKING: + from mistralai.client.sdk import Mistral + @contextmanager def trace(name: str, **kwargs): @@ -12,4 +16,40 @@ def trace(name: str, **kwargs): yield span -__all__ = ["trace"] +def set_tracer_provider( + client: "Mistral", + provider: otel_trace.TracerProvider, +) -> None: + """Attach a per-instance OpenTelemetry TracerProvider to a Mistral client. + + When set, all SDK spans produced by *client* will be emitted through + *provider* instead of the global TracerProvider. + + Usage:: + + from opentelemetry.sdk.trace import TracerProvider + from mistralai.client import Mistral + from mistralai.extra.observability import set_tracer_provider + + client = Mistral(api_key="...") + set_tracer_provider(client, TracerProvider()) + """ + from mistralai.client._hooks.tracing import TracingHook + + hooks = getattr(client.sdk_configuration, "_hooks", None) + if hooks is None: + raise ValueError( + "Cannot set tracer_provider: SDK hooks not initialised on this client." + ) + + for hook in hooks.before_request_hooks: + if isinstance(hook, TracingHook): + hook.tracer_provider = provider + return + + raise ValueError( + "Cannot set tracer_provider: TracingHook not found in the client's hooks." + ) + + +__all__ = ["trace", "set_tracer_provider"] diff --git a/src/mistralai/extra/observability/otel.py b/src/mistralai/extra/observability/otel.py index 7c75271e..f71fb301 100644 --- a/src/mistralai/extra/observability/otel.py +++ b/src/mistralai/extra/observability/otel.py @@ -417,25 +417,30 @@ def _enrich_span_from_response( _enrich_ocr(span, response_data) -def get_or_create_otel_tracer() -> tuple[bool, Tracer]: +def get_or_create_otel_tracer( + provider: trace.TracerProvider | None = None, +) -> tuple[bool, Tracer]: """ - Get a tracer from the current TracerProvider. + Get a tracer from the given or global TracerProvider. - The SDK does not set up its own TracerProvider - it relies on the application - to configure OpenTelemetry. This follows OTEL best practices where: - - Libraries/SDKs get tracers from the global provider - - Applications configure the TracerProvider + When *provider* is supplied (per-instance tracer provider), the tracer is + obtained from it directly. Otherwise the global provider is used, following + the standard OTEL library convention. - If no TracerProvider is configured, the ProxyTracerProvider (default) will - return a NoOp tracer, effectively disabling tracing. Once the application - sets up a real TracerProvider, subsequent spans will be recorded. + If no TracerProvider is configured (neither custom nor global), the + ProxyTracerProvider (default) will return a NoOp tracer, effectively + disabling tracing. Returns: Tuple[bool, Tracer]: (tracing_enabled, tracer) - tracing_enabled is True if a real TracerProvider is configured - tracer is always valid (may be NoOp if no provider configured) """ - tracer_provider = trace.get_tracer_provider() + if provider is not None: + tracer_provider = provider + else: + tracer_provider = trace.get_tracer_provider() + tracer = tracer_provider.get_tracer(MISTRAL_SDK_OTEL_TRACER_NAME) # Tracing is considered enabled if we have a real TracerProvider (not the default proxy) diff --git a/src/mistralai/extra/tests/test_otel_tracing.py b/src/mistralai/extra/tests/test_otel_tracing.py index 818d38e3..82b78ec1 100644 --- a/src/mistralai/extra/tests/test_otel_tracing.py +++ b/src/mistralai/extra/tests/test_otel_tracing.py @@ -1711,5 +1711,129 @@ async def _run(): ) +class TestPerInstanceTracerProvider(unittest.TestCase): + """Tests for per-instance tracer_provider support via set_tracer_provider.""" + + def test_custom_provider_captures_spans(self): + """Spans go to the instance-specific exporter, not the global provider.""" + # Create a standalone provider with its own exporter + custom_exporter = InMemorySpanExporter() + custom_provider = TracerProvider() + custom_provider.add_span_processor(SimpleSpanProcessor(custom_exporter)) + + # Clear the global exporter to ensure spans don't land there + _EXPORTER.clear() + + # Set the custom provider on the hook directly (as set_tracer_provider does) + hook = TracingHook() + hook.tracer_provider = custom_provider + + hook_ctx = _make_hook_context("chat_completion") + + request_body = _dump( + ChatCompletionRequest( + model="mistral-small-latest", + messages=[UserMessage(content="hello")], + ) + ) + request = _make_httpx_request(request_body) + + result = hook.before_request(BeforeRequestContext(hook_ctx), request) + assert isinstance(result, httpx.Request) + + response_body = _dump( + ChatCompletionResponse( + id="custom-prov-1", + object="chat.completion", + model="mistral-small-latest", + created=1234567890, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage(content="hi"), + finish_reason="stop", + ) + ], + usage=UsageInfo(prompt_tokens=5, completion_tokens=3, total_tokens=8), + ) + ) + response = _make_httpx_response(response_body) + response.request = result + hook.after_success(AfterSuccessContext(hook_ctx), response) + + # Spans should be in the custom exporter + custom_spans = custom_exporter.get_finished_spans() + self.assertEqual(len(custom_spans), 1) + self.assertEqual(custom_spans[0].attributes.get("gen_ai.request.model"), "mistral-small-latest") + + # Global exporter should NOT have received the span + global_spans = [ + s for s in _EXPORTER.get_finished_spans() + if s.attributes.get("gen_ai.response.id") == "custom-prov-1" + ] + self.assertEqual(len(global_spans), 0) + + def test_fallback_to_global_provider(self): + """When tracer_provider is None (default), spans go to the global provider.""" + _EXPORTER.clear() + + hook = TracingHook() + # tracer_provider defaults to None — should use global provider + self.assertIsNone(hook.tracer_provider) + + hook_ctx = _make_hook_context("chat_completion") + + request_body = _dump( + ChatCompletionRequest( + model="mistral-small-latest", + messages=[UserMessage(content="fallback test")], + ) + ) + request = _make_httpx_request(request_body) + result = hook.before_request(BeforeRequestContext(hook_ctx), request) + assert isinstance(result, httpx.Request) + + response_body = _dump( + ChatCompletionResponse( + id="fallback-1", + object="chat.completion", + model="mistral-small-latest", + created=1234567890, + choices=[ + ChatCompletionChoice( + index=0, + message=AssistantMessage(content="response"), + finish_reason="stop", + ) + ], + usage=UsageInfo(prompt_tokens=5, completion_tokens=3, total_tokens=8), + ) + ) + response = _make_httpx_response(response_body) + response.request = result + hook.after_success(AfterSuccessContext(hook_ctx), response) + + # Spans should be in the global exporter + global_spans = [ + s for s in _EXPORTER.get_finished_spans() + if s.attributes.get("gen_ai.response.id") == "fallback-1" + ] + self.assertEqual(len(global_spans), 1) + + def test_set_tracer_provider_helper(self): + """set_tracer_provider(client, provider) sets the provider on the TracingHook.""" + from mistralai.extra.observability import set_tracer_provider + + custom_provider = TracerProvider() + client = Mistral(api_key="test-key") + set_tracer_provider(client, custom_provider) + + # Verify the TracingHook now has the custom provider + hooks = client.sdk_configuration.__dict__["_hooks"] + tracing_hooks = [h for h in hooks.before_request_hooks if isinstance(h, TracingHook)] + self.assertEqual(len(tracing_hooks), 1) + self.assertIs(tracing_hooks[0].tracer_provider, custom_provider) + + if __name__ == "__main__": unittest.main() From 7ebe84b5a9eee0714f81c687c8cf636eaa12476f Mon Sep 17 00:00:00 2001 From: maiengineering Date: Thu, 7 May 2026 13:44:22 +0200 Subject: [PATCH 67/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=20[speakeasy-sdk-regen-?= =?UTF-8?q?25492313905]=202.4.5=20(#518)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ## Python SDK Changes: * `mistral.workflows.executions.stream()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) * `mistral.workflows.events.get_stream_events()`: `response.[].data.data` **Changed** (Breaking ⚠️) * `mistral.workflows.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) * `mistral.events.get_stream_events()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) * `mistral.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) * `mistral.beta.connectors.get_authentication_methods()`: `response.[].has_default_credentials` **Added** * chore: align pyproject.toml and uv.lock to version 2.4.5 --------- Co-authored-by: speakeasybot Co-authored-by: GitHub Action --- .speakeasy/gen.lock | 139 ++++++++++-------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +- RELEASES.md | 12 +- ...activitytaskcompletedattributesresponse.md | 10 +- .../activitytaskstartedattributesresponse.md | 10 +- .../customtaskcompletedattributesresponse.md | 10 +- .../customtaskstartedattributesresponse.md | 10 +- docs/models/encodedpayloadoptions.md | 4 + ...chpayloadresponsevalue.md => jsonpatch.md} | 2 +- docs/models/jsonpatchpayloadresponse.md | 11 +- docs/models/jsonpatchpayloadvalueresponse.md | 17 +++ docs/models/jsonpayloadresponse.md | 11 +- docs/models/publicauthenticationmethod.md | 3 +- ...lowexecutioncompletedattributesresponse.md | 8 +- ...ecutioncontinuedasnewattributesresponse.md | 12 +- ...kflowexecutionstartedattributesresponse.md | 12 +- pyproject.toml | 2 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/models/__init__.py | 24 +-- ...activitytaskcompletedattributesresponse.py | 4 + .../activitytaskstartedattributesresponse.py | 4 + .../customtaskcompletedattributesresponse.py | 4 + .../customtaskstartedattributesresponse.py | 4 + .../client/models/encodedpayloadoptions.py | 14 +- src/mistralai/client/models/jsonpatch.py | 64 ++++++++ .../client/models/jsonpatchpayloadresponse.py | 116 +++++++-------- .../models/jsonpatchpayloadvalueresponse.py | 17 +++ .../client/models/jsonpayloadresponse.py | 39 ++++- .../models/publicauthenticationmethod.py | 3 + ...lowexecutioncompletedattributesresponse.py | 4 + ...ecutioncontinuedasnewattributesresponse.py | 4 + ...kflowexecutionstartedattributesresponse.py | 4 + uv.lock | 2 +- 34 files changed, 394 insertions(+), 202 deletions(-) rename docs/models/{jsonpatchpayloadresponsevalue.md => jsonpatch.md} (92%) create mode 100644 docs/models/jsonpatchpayloadvalueresponse.md create mode 100644 src/mistralai/client/models/jsonpatch.py create mode 100644 src/mistralai/client/models/jsonpatchpayloadvalueresponse.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index b62a204c..5587955b 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 880172609750b5058efe2f0ff8f5c722 + docChecksum: a0fa9ebdce4c9ca7549f9dce826a2169 docVersion: 1.0.0 speakeasyVersion: 1.761.1 generationVersion: 2.879.6 - releaseVersion: 2.4.4 - configChecksum: d237fa5a6bc2a67b0977a61520bd85fb + releaseVersion: 2.4.5 + configChecksum: f6852fb59e3bcc9a7750210521f2c2d4 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 8315974b-9a57-4a9f-b6b1-a75627dc6b85 - pristine_commit_hash: 969db46e6806db3556c93296ed4c87a2b6a0c709 - pristine_tree_hash: b900e343a3b555d433748ed99095b1468250aa44 + generation_id: bcab0c88-1877-4209-a77d-49b4681f030e + pristine_commit_hash: 56d30233849b5a3cb3d207e646ee849c77835f70 + pristine_tree_hash: 3feb3429dfead0d0228262509f23a6c5e9c9c7a2 features: python: acceptHeaders: 3.0.0 @@ -76,8 +76,8 @@ trackedFiles: pristine_git_object: 615552c32013c702b3e7476b1691952b0a4a65df docs/models/activitytaskcompletedattributesresponse.md: id: 972b526f8415 - last_write_checksum: sha1:d04ffa5085fcf5e440a922bdb130035b86277ff1 - pristine_git_object: 5baaffa6840cb04dbb8eb2379fcea08c96826455 + last_write_checksum: sha1:ac33517d238733a00d938ed19c7b30ba2b3f7955 + pristine_git_object: 43c92fe262f8e8657d337420526959424889d5dd docs/models/activitytaskcompletedresponse.md: id: 6aade3f8c26c last_write_checksum: sha1:944b923aa932452372abebfe6d61ab739555109f @@ -100,8 +100,8 @@ trackedFiles: pristine_git_object: 8b7bdd42e45eb8b3c5ad33a2de5ac2d15d8b3453 docs/models/activitytaskstartedattributesresponse.md: id: b0d2e886ad19 - last_write_checksum: sha1:81ddc501fe7c04dc2313ef93ec5897a806934798 - pristine_git_object: 5d1f59a838412b1fc863dc51f4269548c760e584 + last_write_checksum: sha1:89068691379007eb892b4d81bfaeeb8f889771fd + pristine_git_object: dd97ff85fb14f03afb8e3b390d7000cd3c308e64 docs/models/activitytaskstartedresponse.md: id: c25113506e99 last_write_checksum: sha1:3cd53ec4c3c8bdc389c55cf527c960b3b8a91c30 @@ -960,8 +960,8 @@ trackedFiles: pristine_git_object: 0bcee2279755656a624d626acea0a157fa3b381c docs/models/customtaskcompletedattributesresponse.md: id: c12961b43e1c - last_write_checksum: sha1:772f6aa0610241727b090426384fcf883fa919cb - pristine_git_object: a6a136e75a0625d155eb57808fc6f967dc10cc47 + last_write_checksum: sha1:e549b58f4d1a544e3c453a9ec454930d342f5adf + pristine_git_object: 4c7cbfa21dcdcf91ceac8f1ca5d84413eefc4bbb docs/models/customtaskcompletedresponse.md: id: 81d843216312 last_write_checksum: sha1:0439d35a428e5d8d321da8b710ce72c188802085 @@ -984,8 +984,8 @@ trackedFiles: pristine_git_object: 72afa91fb2baadd7dd8cf32aad2b2812316a6953 docs/models/customtaskstartedattributesresponse.md: id: 272cf75ac5d3 - last_write_checksum: sha1:cd16d650b11898966e3950305b3ca2cf035fc6d5 - pristine_git_object: 8bf43423f0dbba2d89429e4d98f7ae1ac1c460b1 + last_write_checksum: sha1:bc09d8da2636e28821260a08235fcf69d577758a + pristine_git_object: 41cd66a9e59dbfdb9c0574001a4a12f2ac499f93 docs/models/customtaskstartedresponse.md: id: 6ccd9fe137bc last_write_checksum: sha1:031eac9a01bc24b36a9cf2eb4ea864c89ba709e5 @@ -1132,8 +1132,8 @@ trackedFiles: pristine_git_object: 20b50618ac99c63f7cf57fe4377840bfc1f85823 docs/models/encodedpayloadoptions.md: id: 033bd880796d - last_write_checksum: sha1:49223cf4218c03c0615357040dc31149214fa67a - pristine_git_object: 15367ce6382bcfb3bb090620877719fac93438fe + last_write_checksum: sha1:7047a8dee852e5dea9d05f872f92a15ef0860f7c + pristine_git_object: 51fcfdc497db0f7cf17e413c4b5c04bf7d15bc7b docs/models/encodingformat.md: id: 066e154e4d43 last_write_checksum: sha1:cc98abdb803d374146f58a6811c9e3f2b58ff5f3 @@ -1654,6 +1654,10 @@ trackedFiles: id: c265a30fd4cf last_write_checksum: sha1:410c62a884aae902cdfbfcab33779e62487de13b pristine_git_object: f40350bf9d74d09ca3a2ec6d91d9068bda631ef5 + docs/models/jsonpatch.md: + id: 629a76c95cc5 + last_write_checksum: sha1:8f4e93adfbf15a92cfed990a7b603b00807a9ec9 + pristine_git_object: eb8d934774c3e860a07e6a9a8eb61541dea1a4bd docs/models/jsonpatchadd.md: id: 07cac5b1f9b2 last_write_checksum: sha1:74f0bea77f7e1dfebdc686e709a6be90bbda7228 @@ -1664,12 +1668,12 @@ trackedFiles: pristine_git_object: 684cc896b4ba80ba1bbc278e119fc9fc1dbbf924 docs/models/jsonpatchpayloadresponse.md: id: fb6daf532ebb - last_write_checksum: sha1:bb2d72a81a43a44a183fea86372e037b072ae085 - pristine_git_object: ce9dbd90491812583b873030d1cc50139769b3fa - docs/models/jsonpatchpayloadresponsevalue.md: - id: 8c09c68e6201 - last_write_checksum: sha1:16506ea5571f2f58b488210f08b6b22431d6b248 - pristine_git_object: 21c7d186ad3eaa1b233d0a640fa8e2c27cc08e83 + last_write_checksum: sha1:b896fa130e63bfc0831bb8067669df89a8342314 + pristine_git_object: 3436bee34833e304f47453a8d0c92e613484869d + docs/models/jsonpatchpayloadvalueresponse.md: + id: 27f4583c18d6 + last_write_checksum: sha1:1d068499c19f0ccb80f26befcedd7ef63245e579 + pristine_git_object: f12623e5727cae5f12d1c97bcf394e37b9843644 docs/models/jsonpatchremove.md: id: 8a64b68498b3 last_write_checksum: sha1:9619b20ac7d2b69e034fd7e549d2469e2369985a @@ -1680,8 +1684,8 @@ trackedFiles: pristine_git_object: 382b7d93925d0d68af43c4a745144a71d1f61dcf docs/models/jsonpayloadresponse.md: id: ce61786a7c2e - last_write_checksum: sha1:369e120be622bd6deb9d2d5161482e018cb8ef42 - pristine_git_object: 01eaae6160941599a44254091a0b237a90bc77f5 + last_write_checksum: sha1:24183d30f65d4cfacacc8df713feacc145df9dab + pristine_git_object: 2976dea591a3c7a18220fcd4b9e5799811320b62 docs/models/jsonschema.md: id: a6b15ed6fac8 last_write_checksum: sha1:523465666ad3c292252b3fe60f345c7ffb29053f @@ -2208,8 +2212,8 @@ trackedFiles: pristine_git_object: 36b58e9aa80a53dad530cad93fb1d565fdd03b59 docs/models/publicauthenticationmethod.md: id: abfb51fdf794 - last_write_checksum: sha1:4feb0beeb50cf64ce370882599ae33b6e1676d6c - pristine_git_object: fa568d457c2db542a65cf498e254cda8c9fcf0e6 + last_write_checksum: sha1:9be30607f8c895958f33b5be25fc1b8b4cb3d328 + pristine_git_object: 59de7076ce05ff71ba4bd5f22112459f4500bf4d docs/models/querydefinition.md: id: 4831b7e558f9 last_write_checksum: sha1:f4983c0963906b3eda13c69e2852b08d662dd744 @@ -3012,16 +3016,16 @@ trackedFiles: pristine_git_object: f9f4c01d263fb222de033128cd43f86c56f2b8cd docs/models/workflowexecutioncompletedattributesresponse.md: id: ee786dd87f88 - last_write_checksum: sha1:56f6a37a7e59b6026988373b0d88b09bd6062ee5 - pristine_git_object: 30a33052d50278e5cb14e08e4631caf68cc8e058 + last_write_checksum: sha1:0d6121ea184c00cb362a345113fcb1f84cff3b13 + pristine_git_object: 53596a91525e00e58cdf548c2b17deeecba8b567 docs/models/workflowexecutioncompletedresponse.md: id: c1888ba90ec6 last_write_checksum: sha1:491656749133e6b0d7714d2a9cbc8de8aa9c92d7 pristine_git_object: a4d40dc52ead7c8a525cfd838fc0aa336570fb3b docs/models/workflowexecutioncontinuedasnewattributesresponse.md: id: 30eef6da0d67 - last_write_checksum: sha1:10f85d5ec5f9fbb442d3d69319b651604baf9a0b - pristine_git_object: b49a25964981bb48a5563b230413cb2ff6c5bd70 + last_write_checksum: sha1:5419f5ccfb9b13fbef8aef96a97a34a32ea136c6 + pristine_git_object: 13e21499434f9bdef975a6d6902e2b85d8c7a04f docs/models/workflowexecutioncontinuedasnewresponse.md: id: 1ea81bc536b4 last_write_checksum: sha1:e65c01b128029322249b28e4152cd60af2443b18 @@ -3052,8 +3056,8 @@ trackedFiles: pristine_git_object: 03f1010030defa48eb7d3f98189baab9ff7b1bfe docs/models/workflowexecutionstartedattributesresponse.md: id: 384d48b3e104 - last_write_checksum: sha1:c5fb16f4017b9332fb97b54172320bbd9cdb91d4 - pristine_git_object: e222a142f4042032e2f4fc8c3a714a0b00e35835 + last_write_checksum: sha1:54ce029d9db1b0f5dee6a42019995a58ef196268 + pristine_git_object: 63c20eb12a9d285cf448057f156820f98e282c43 docs/models/workflowexecutionstartedresponse.md: id: 64174669ff20 last_write_checksum: sha1:8eee734d26442d9c6e6693386c78eb204a932847 @@ -3344,8 +3348,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:9096662e60738fa15fd58b70880e1e8dff442403 - pristine_git_object: 026fdee0423c494d6d525bd1a67d566a76c4fd7d + last_write_checksum: sha1:6b2772cd63b60cddf4ea95d94cfc44f81a878a73 + pristine_git_object: 9f9ae8c6224af17b3e22410b33f5a5ad37389e33 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:de197fbbfea8bc95f44b4e7ee1b39e68fdde8bc7 @@ -3496,12 +3500,12 @@ trackedFiles: pristine_git_object: 60597c40f00705b4758827fb7d119f33ae2ad1b9 src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:6ff671f3761cb215e02e16a12303fb62d8165a9f - pristine_git_object: cb0320b35793d86e8b0afa1a92003a7ed9b8d29c + last_write_checksum: sha1:c072eedd54264d94cc39317fd40433adf40f6fa9 + pristine_git_object: ab36240c66a1da2d58318b7155af6a803e2e1e13 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc - last_write_checksum: sha1:8a22b80fbd7e5ea9a72a34016e68fdb4a375ed75 - pristine_git_object: 899acb62afc89955ccb4ccb7a4e4d4bb8a4ce424 + last_write_checksum: sha1:b5246e203765ba0532a6a65d391bdd237ab2c891 + pristine_git_object: 8e355d48421982b9480d0ea50ce07de0aaba6e3b src/mistralai/client/models/activitytaskcompletedresponse.py: id: 28373f0a2c9e last_write_checksum: sha1:93e29f246bdade11ed0bcd55e5781fe86d352f89 @@ -3524,8 +3528,8 @@ trackedFiles: pristine_git_object: cf054a27d05dc1683275094a40336cc6f4164eb5 src/mistralai/client/models/activitytaskstartedattributesresponse.py: id: 3a365e2c2942 - last_write_checksum: sha1:7a125f9f9cb1a2eb14bb929742981b488686ab81 - pristine_git_object: 100626d49be3d849b35e0e041d02f7eb9c7964a2 + last_write_checksum: sha1:e932c7960e78f8b31008efef29df7cc8ce3c4ce4 + pristine_git_object: 9a049150e26cf8fd89f5f85195cab961629c5402 src/mistralai/client/models/activitytaskstartedresponse.py: id: d01ef9cb3955 last_write_checksum: sha1:1f1dda76127bdb08549b0dd94f68dafd1d6a71fc @@ -4112,8 +4116,8 @@ trackedFiles: pristine_git_object: 7873b3ca5fdb61c6c4d1205894727cd09e8d939d src/mistralai/client/models/customtaskcompletedattributesresponse.py: id: 0b9fb891f354 - last_write_checksum: sha1:d0c1d0c181c3b0d2c9e73a09a40cd84dd5e49b85 - pristine_git_object: 8b28d1058d3ffc20d9c86c1cbac03ea343d0947a + last_write_checksum: sha1:f5053cec4e78eaa7b83df2c7e6d7f9f66cd35933 + pristine_git_object: afd48d7660446f5daa52b7358934227bb3761e87 src/mistralai/client/models/customtaskcompletedresponse.py: id: 719b68571f4c last_write_checksum: sha1:4d8b84868e4d94be8ca9190e29dc8dbf37c442fe @@ -4136,8 +4140,8 @@ trackedFiles: pristine_git_object: 33c126f716d9b63fef593498a2442bfa1637d5dc src/mistralai/client/models/customtaskstartedattributesresponse.py: id: 6b8946c77018 - last_write_checksum: sha1:25f404c0770dac0b612c67d3445b40fd8659fb59 - pristine_git_object: 71bed58f6bb9b88110a79dbff38bb32f9fde6090 + last_write_checksum: sha1:5902afbf5696150caae710ef55a4c5b5f8b2ed1a + pristine_git_object: 4f53ae8a35f590ab4bd2fd5e5ab63e44ea449cc1 src/mistralai/client/models/customtaskstartedresponse.py: id: 02b330a5292e last_write_checksum: sha1:676b985755499c4691c1ac615d04fb35481d9a0f @@ -4268,8 +4272,8 @@ trackedFiles: pristine_git_object: 03b23a7cba53c27ef02f3bc025f38f10d7b98e2d src/mistralai/client/models/encodedpayloadoptions.py: id: 97955ebc2eb9 - last_write_checksum: sha1:464d35eea8a12a0a1a7a58ec66ffaada14f07bb9 - pristine_git_object: 5c369046204ed55ac2c5dd63befd7598b7fd35ac + last_write_checksum: sha1:d6acbb9cd0a962a9ae91da84cf10c7f066ede245 + pristine_git_object: cc19b54359640f2af7a058f179a459cc2d70c539 src/mistralai/client/models/encodingformat.py: id: b51ec296cc92 last_write_checksum: sha1:ea907f86b00323d99df37f7ff45d582aace798e7 @@ -4722,6 +4726,10 @@ trackedFiles: id: 6d9dc624aafd last_write_checksum: sha1:fbacb171b9c75f1fe45406f542a958d10c15fae2 pristine_git_object: 296070b426900305fe4596f03a3c9f081cdb2dcf + src/mistralai/client/models/jsonpatch.py: + id: b7521bc9a558 + last_write_checksum: sha1:0f81a4adaa3fb28ba2620c9a89459b70f0ec3d86 + pristine_git_object: d67657f54dd315a9df71f1bf8a87c96dc3a25749 src/mistralai/client/models/jsonpatchadd.py: id: fb2a1e58a6a5 last_write_checksum: sha1:a323e406accd1b25f4e094a54647dd140aab43d5 @@ -4732,8 +4740,12 @@ trackedFiles: pristine_git_object: 7181ddac1956f1c29b815231f30c3405d4f50754 src/mistralai/client/models/jsonpatchpayloadresponse.py: id: 1b39f46f529f - last_write_checksum: sha1:bf48ca0dd13e374dec8c2ee082fe9b78cab391e5 - pristine_git_object: 345e6d14ce3244ff4234c80502e553de81ac8dcf + last_write_checksum: sha1:1d2a8b1039cef824f0e030804a72a0325c413a10 + pristine_git_object: a0301f9a7045f6b64a7d22b60be6e8ce5a2cbff3 + src/mistralai/client/models/jsonpatchpayloadvalueresponse.py: + id: 6cf0e3599e2c + last_write_checksum: sha1:46b19e3813ed9f20969ae14fbab56ea559507fc5 + pristine_git_object: d6ac1b6b02b55ebefe7f3298975679e7962473f1 src/mistralai/client/models/jsonpatchremove.py: id: e472e5b752ec last_write_checksum: sha1:2dec39f883b362968f8d55b9b7daef6fb40094e4 @@ -4744,8 +4756,8 @@ trackedFiles: pristine_git_object: 3dd7aee65f0c4f0a2218762a9b9ea8cd571c406d src/mistralai/client/models/jsonpayloadresponse.py: id: ba3265f85453 - last_write_checksum: sha1:9103c6d30a65222458b9bc9b5b15cc88126f4284 - pristine_git_object: 038ea329340d2e2ecc5d2db503e367e2a279cd1c + last_write_checksum: sha1:0c659a3bab8faea27b23bf827167601a968ce796 + pristine_git_object: 9de73d2c5162a15ab1dbd394a46d9e9fdaf8365c src/mistralai/client/models/jsonschema.py: id: e1fc1d8a434a last_write_checksum: sha1:f6e3ddb37e55ff27b795389fce6d4f433e7d5639 @@ -5188,8 +5200,8 @@ trackedFiles: pristine_git_object: 2c5186c02f6b463c12fd7819637b52c8c7ee4cd7 src/mistralai/client/models/publicauthenticationmethod.py: id: 545ab7f24523 - last_write_checksum: sha1:82c1403b8f1cf8de8efeb278ef2680db89c9c510 - pristine_git_object: 95dde29a95b7b034ae9ffe324e2c9ef6ba426dce + last_write_checksum: sha1:5256ee8833f1e44717f19b6d2ee3aeff6dbe2dc4 + pristine_git_object: 42e943a6f63dcfcfcfc3e994080e318c21a5e619 src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py: id: 73826dbd3f5b last_write_checksum: sha1:5105618697e031bae45cf9f6d7c5227d9c08f155 @@ -5824,16 +5836,16 @@ trackedFiles: pristine_git_object: ee1c4e71acecff7f4a94078aae1560ca43c36e31 src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py: id: f831331b0eb1 - last_write_checksum: sha1:113cbedfc242da04a708e29b23a55742bc0de084 - pristine_git_object: 3afc8dcf36f4f5fea19263095c14b245b32b76f9 + last_write_checksum: sha1:dbb84007cd94e2d0ed45aec7da846e1375588396 + pristine_git_object: 1fe0c24872cdeac5a53ad8469d01deb6d2053183 src/mistralai/client/models/workflowexecutioncompletedresponse.py: id: a1bec20dfb0e last_write_checksum: sha1:c6c891ed6fdae6204c47d425e0391e2163f20a2e pristine_git_object: 17716668a30d68aad23a98d312e965171ca71306 src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py: id: 2dd61dcd7b48 - last_write_checksum: sha1:e7737a3bb65c1ca887c0f28a1e18102d80755e04 - pristine_git_object: 943e5ebc979c9381d36e92e1e94d818bb17a83bf + last_write_checksum: sha1:05d7ec612f2674ee265f54c5233e1b79de8ebdae + pristine_git_object: 2ddbf0af4a9b8584f7c1efb6c883a1f9b524295e src/mistralai/client/models/workflowexecutioncontinuedasnewresponse.py: id: be26cd87dcb3 last_write_checksum: sha1:4947f8cbfa73eae9607e252e85236894a34123d5 @@ -5864,8 +5876,8 @@ trackedFiles: pristine_git_object: 83179054bf4ca0e3da6be1644fcb32680a4c43c7 src/mistralai/client/models/workflowexecutionstartedattributesresponse.py: id: d2276919a895 - last_write_checksum: sha1:67f7f7ce3ac895677b946e2e8e492192bd2709b8 - pristine_git_object: c6e118f4772209df61b90302566d7c6892b40827 + last_write_checksum: sha1:53312110c8c2902f32c72a88ee68cea048833fca + pristine_git_object: 59746a615c07e0aeb10d315240b600145d7b45d2 src/mistralai/client/models/workflowexecutionstartedresponse.py: id: e1a597c911ea last_write_checksum: sha1:9c761698883844061bf5cae76e3bc6444941124e @@ -8554,7 +8566,7 @@ examples: connector_id_or_name: "" responses: "200": - application/json: [{"method_type": "none"}] + application/json: [{"method_type": "none", "has_default_credentials": false}] connector_list_organization_credentials_v1: speakeasy-default-connector-list-organization-credentials-v1: parameters: @@ -8704,7 +8716,14 @@ examples: application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral.beta.libraries.update()`: `request.name` **Changed** (Breaking ⚠️)\n* `mistral.beta.libraries.documents.update()`: `request.name` **Changed** (Breaking ⚠️)\n* `mistral.beta.rag.ingestion_pipeline_configurations.update_run_info()`: **Added**\n* `mistral.workflows.schedules.pause_schedule()`: **Added**\n* `mistral.workflows.schedules.resume_schedule()`: **Added**\n* `mistral.beta.rag.ingestion_pipeline_configurations.list()`: `response.[]` **Changed**\n* `mistral.beta.rag.ingestion_pipeline_configurations.register()`: \n * `request.pipeline_composition` **Added**\n * `response` **Changed**\n* `mistral.workflows.schedules.get_schedules()`: `response.schedules[]` **Changed**\n* `mistral.workflows.schedules.schedule_workflow()`: \n * `request.schedule.max_executions` **Added**\n" +releaseNotes: | + ## Python SDK Changes: + * `mistral.workflows.executions.stream()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) + * `mistral.workflows.events.get_stream_events()`: `response.[].data.data` **Changed** (Breaking ⚠️) + * `mistral.workflows.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) + * `mistral.events.get_stream_events()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) + * `mistral.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) + * `mistral.beta.connectors.get_authentication_methods()`: `response.[].has_default_credentials` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 465afa47..a246d5a7 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.4 + version: 2.4.5 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 265ea37e..aa443ef1 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:1f3eeb2513538e3ae8b5483477b559a460ce3dac0cdd41c31d47db9167acec60 - sourceBlobDigest: sha256:b743e6e51b23d2d5207d1f4348076d22f130052fea4e1676095a2ddc654822a9 + sourceRevisionDigest: sha256:6b325264f8e8a60caa875776438b07d4eb5b56283da0796b283e9c5597810e22 + sourceBlobDigest: sha256:11d21b003c903f5539d5d7a79cf8fe17d1d284b48e47da0009eac3866ad58899 tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:1f3eeb2513538e3ae8b5483477b559a460ce3dac0cdd41c31d47db9167acec60 - sourceBlobDigest: sha256:b743e6e51b23d2d5207d1f4348076d22f130052fea4e1676095a2ddc654822a9 + sourceRevisionDigest: sha256:6b325264f8e8a60caa875776438b07d4eb5b56283da0796b283e9c5597810e22 + sourceBlobDigest: sha256:11d21b003c903f5539d5d7a79cf8fe17d1d284b48e47da0009eac3866ad58899 codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:fa3aa9d30da8a70f9e5d8c74ceab2cd4a043bfa5c5dacfe0035b09d907f41705 + codeSamplesRevisionDigest: sha256:95c443855a95966259bd108beec0cbdb8238f6f753dc4b021bf833d398e86c0c workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.761.1 diff --git a/RELEASES.md b/RELEASES.md index 440bed5f..2f69eacf 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -628,4 +628,14 @@ Based on: ### Generated - [python v2.4.4] . ### Releases -- [PyPI v2.4.4] https://pypi.org/project/mistralai/2.4.4 - . \ No newline at end of file +- [PyPI v2.4.4] https://pypi.org/project/mistralai/2.4.4 - . + +## 2026-05-07 11:13:37 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.1 (2.879.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.5] . +### Releases +- [PyPI v2.4.5] https://pypi.org/project/mistralai/2.4.5 - . \ No newline at end of file diff --git a/docs/models/activitytaskcompletedattributesresponse.md b/docs/models/activitytaskcompletedattributesresponse.md index 5baaffa6..43c92fe2 100644 --- a/docs/models/activitytaskcompletedattributesresponse.md +++ b/docs/models/activitytaskcompletedattributesresponse.md @@ -5,8 +5,8 @@ Attributes for activity task completed events. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | -| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | -| `result` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `result` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results.
When encrypted, the value field contains base64-encoded encrypted data
and encoding_options indicates the type of encryption applied. | \ No newline at end of file diff --git a/docs/models/activitytaskstartedattributesresponse.md b/docs/models/activitytaskstartedattributesresponse.md index 5d1f59a8..dd97ff85 100644 --- a/docs/models/activitytaskstartedattributesresponse.md +++ b/docs/models/activitytaskstartedattributesresponse.md @@ -5,8 +5,8 @@ Attributes for activity task started events. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | -| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | -| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the activity task within the workflow. | +| `activity_name` | *str* | :heavy_check_mark: | The registered name of the activity being executed. | +| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results.
When encrypted, the value field contains base64-encoded encrypted data
and encoding_options indicates the type of encryption applied. | \ No newline at end of file diff --git a/docs/models/customtaskcompletedattributesresponse.md b/docs/models/customtaskcompletedattributesresponse.md index a6a136e7..4c7cbfa2 100644 --- a/docs/models/customtaskcompletedattributesresponse.md +++ b/docs/models/customtaskcompletedattributesresponse.md @@ -5,8 +5,8 @@ Attributes for custom task completed events. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | -| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | -| `payload` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results.
When encrypted, the value field contains base64-encoded encrypted data
and encoding_options indicates the type of encryption applied. | \ No newline at end of file diff --git a/docs/models/customtaskstartedattributesresponse.md b/docs/models/customtaskstartedattributesresponse.md index 8bf43423..41cd66a9 100644 --- a/docs/models/customtaskstartedattributesresponse.md +++ b/docs/models/customtaskstartedattributesresponse.md @@ -5,8 +5,8 @@ Attributes for custom task started events. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | -| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | -| `payload` | [Optional[models.JSONPayloadResponse]](../models/jsonpayloadresponse.md) | :heavy_minus_sign: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `custom_task_id` | *str* | :heavy_check_mark: | Unique identifier for the custom task within the workflow. | +| `custom_task_type` | *str* | :heavy_check_mark: | The type/category of the custom task (e.g., 'llm_call', 'api_request'). | +| `payload` | [Optional[models.JSONPayloadResponse]](../models/jsonpayloadresponse.md) | :heavy_minus_sign: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results.
When encrypted, the value field contains base64-encoded encrypted data
and encoding_options indicates the type of encryption applied. | \ No newline at end of file diff --git a/docs/models/encodedpayloadoptions.md b/docs/models/encodedpayloadoptions.md index 15367ce6..51fcfdc4 100644 --- a/docs/models/encodedpayloadoptions.md +++ b/docs/models/encodedpayloadoptions.md @@ -4,12 +4,16 @@ ```python from mistralai.client.models import EncodedPayloadOptions + +# Open enum: unrecognized values are captured as UnrecognizedStr value: EncodedPayloadOptions = "offloaded" ``` ## Values +This is an open enum. Unrecognized values will not fail type checks. + - `"offloaded"` - `"encrypted"` - `"encrypted-partial"` diff --git a/docs/models/jsonpatchpayloadresponsevalue.md b/docs/models/jsonpatch.md similarity index 92% rename from docs/models/jsonpatchpayloadresponsevalue.md rename to docs/models/jsonpatch.md index 21c7d186..eb8d9347 100644 --- a/docs/models/jsonpatchpayloadresponsevalue.md +++ b/docs/models/jsonpatch.md @@ -1,4 +1,4 @@ -# JSONPatchPayloadResponseValue +# JSONPatch ## Supported Types diff --git a/docs/models/jsonpatchpayloadresponse.md b/docs/models/jsonpatchpayloadresponse.md index ce9dbd90..3436bee3 100644 --- a/docs/models/jsonpatchpayloadresponse.md +++ b/docs/models/jsonpatchpayloadresponse.md @@ -3,11 +3,14 @@ A payload containing a list of JSON Patch operations. Used for streaming incremental updates to workflow state. +When encrypted, the value field contains base64-encoded encrypted data +and encoding_options indicates the type of encryption applied. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -| `type` | *Literal["json_patch"]* | :heavy_check_mark: | Discriminator indicating this is a JSON Patch payload. | -| `value` | List[[models.JSONPatchPayloadResponseValue](../models/jsonpatchpayloadresponsevalue.md)] | :heavy_check_mark: | The list of JSON Patch operations to apply in order. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `type` | *Literal["json_patch"]* | :heavy_check_mark: | Discriminator indicating this is a JSON Patch payload. | +| `value` | [models.JSONPatchPayloadValueResponse](../models/jsonpatchpayloadvalueresponse.md) | :heavy_check_mark: | N/A | +| `encoding_options` | List[[models.EncodedPayloadOptions](../models/encodedpayloadoptions.md)] | :heavy_minus_sign: | Encoding options applied to the payload. | \ No newline at end of file diff --git a/docs/models/jsonpatchpayloadvalueresponse.md b/docs/models/jsonpatchpayloadvalueresponse.md new file mode 100644 index 00000000..f12623e5 --- /dev/null +++ b/docs/models/jsonpatchpayloadvalueresponse.md @@ -0,0 +1,17 @@ +# JSONPatchPayloadValueResponse + + +## Supported Types + +### `List[models.JSONPatch]` + +```python +value: List[models.JSONPatch] = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/docs/models/jsonpayloadresponse.md b/docs/models/jsonpayloadresponse.md index 01eaae61..2976dea5 100644 --- a/docs/models/jsonpayloadresponse.md +++ b/docs/models/jsonpayloadresponse.md @@ -3,11 +3,14 @@ A payload containing arbitrary JSON data. Used for complete state snapshots or final results. +When encrypted, the value field contains base64-encoded encrypted data +and encoding_options indicates the type of encryption applied. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `type` | *Optional[Literal["json"]]* | :heavy_minus_sign: | Discriminator indicating this is a raw JSON payload. | -| `value` | *Any* | :heavy_check_mark: | The JSON-serializable payload value. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `type` | *Optional[Literal["json"]]* | :heavy_minus_sign: | Discriminator indicating this is a raw JSON payload. | +| `value` | *Any* | :heavy_check_mark: | The JSON-serializable payload value. When encrypted, contains base64-encoded data. | +| `encoding_options` | List[[models.EncodedPayloadOptions](../models/encodedpayloadoptions.md)] | :heavy_minus_sign: | Encoding options applied to the payload. | \ No newline at end of file diff --git a/docs/models/publicauthenticationmethod.md b/docs/models/publicauthenticationmethod.md index fa568d45..59de7076 100644 --- a/docs/models/publicauthenticationmethod.md +++ b/docs/models/publicauthenticationmethod.md @@ -8,4 +8,5 @@ Public view of an authentication method, without secrets. | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `method_type` | [models.OutboundAuthenticationType](../models/outboundauthenticationtype.md) | :heavy_check_mark: | N/A | -| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| `headers` | List[[models.ConnectorAuthenticationHeader](../models/connectorauthenticationheader.md)] | :heavy_minus_sign: | N/A | +| `has_default_credentials` | *bool* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/workflowexecutioncompletedattributesresponse.md b/docs/models/workflowexecutioncompletedattributesresponse.md index 30a33052..53596a91 100644 --- a/docs/models/workflowexecutioncompletedattributesresponse.md +++ b/docs/models/workflowexecutioncompletedattributesresponse.md @@ -5,7 +5,7 @@ Attributes for workflow execution completed events. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | -| `result` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `result` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results.
When encrypted, the value field contains base64-encoded encrypted data
and encoding_options indicates the type of encryption applied. | \ No newline at end of file diff --git a/docs/models/workflowexecutioncontinuedasnewattributesresponse.md b/docs/models/workflowexecutioncontinuedasnewattributesresponse.md index b49a2596..13e21499 100644 --- a/docs/models/workflowexecutioncontinuedasnewattributesresponse.md +++ b/docs/models/workflowexecutioncontinuedasnewattributesresponse.md @@ -5,9 +5,9 @@ Attributes for workflow execution continued-as-new events. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | -| `new_execution_run_id` | *str* | :heavy_check_mark: | The run ID of the new workflow execution that continues this workflow. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the continued workflow. | -| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `new_execution_run_id` | *str* | :heavy_check_mark: | The run ID of the new workflow execution that continues this workflow. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the continued workflow. | +| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results.
When encrypted, the value field contains base64-encoded encrypted data
and encoding_options indicates the type of encryption applied. | \ No newline at end of file diff --git a/docs/models/workflowexecutionstartedattributesresponse.md b/docs/models/workflowexecutionstartedattributesresponse.md index e222a142..63c20eb1 100644 --- a/docs/models/workflowexecutionstartedattributesresponse.md +++ b/docs/models/workflowexecutionstartedattributesresponse.md @@ -5,9 +5,9 @@ Attributes for workflow execution started events. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | -| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow being executed. | -| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The user-friendly display name of the workflow, if available. | -| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `task_id` | *str* | :heavy_check_mark: | Unique identifier for the task within the workflow execution. | +| `workflow_name` | *str* | :heavy_check_mark: | The registered name of the workflow being executed. | +| `display_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The user-friendly display name of the workflow, if available. | +| `input` | [models.JSONPayloadResponse](../models/jsonpayloadresponse.md) | :heavy_check_mark: | A payload containing arbitrary JSON data.

Used for complete state snapshots or final results.
When encrypted, the value field contains base64-encoded encrypted data
and encoding_options indicates the type of encryption applied. | \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 674de675..f79b279f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.4" +version = "2.4.5" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 026fdee0..9f9ae8c6 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.4" +__version__: str = "2.4.5" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.4 2.879.6 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.4.5 2.879.6 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index cb0320b3..ab36240c 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -1165,14 +1165,16 @@ JobsAPIRoutesFineTuningUpdateFineTunedModelResponseTypedDict, UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse, ) + from .jsonpatch import JSONPatch, JSONPatchTypedDict, UnknownJSONPatch from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict from .jsonpatchpayloadresponse import ( JSONPatchPayloadResponse, JSONPatchPayloadResponseTypedDict, - JSONPatchPayloadResponseValue, - JSONPatchPayloadResponseValueTypedDict, - UnknownJSONPatchPayloadResponseValue, + ) + from .jsonpatchpayloadvalueresponse import ( + JSONPatchPayloadValueResponse, + JSONPatchPayloadValueResponseTypedDict, ) from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict @@ -2904,18 +2906,20 @@ "InstructRequestMessage", "InstructRequestMessageTypedDict", "InstructRequestTypedDict", + "JSONPatch", "JSONPatchAdd", "JSONPatchAddTypedDict", "JSONPatchAppend", "JSONPatchAppendTypedDict", "JSONPatchPayloadResponse", "JSONPatchPayloadResponseTypedDict", - "JSONPatchPayloadResponseValue", - "JSONPatchPayloadResponseValueTypedDict", + "JSONPatchPayloadValueResponse", + "JSONPatchPayloadValueResponseTypedDict", "JSONPatchRemove", "JSONPatchRemoveTypedDict", "JSONPatchReplace", "JSONPatchReplaceTypedDict", + "JSONPatchTypedDict", "JSONPayloadResponse", "JSONPayloadResponseTypedDict", "JSONSchema", @@ -3500,7 +3504,7 @@ "UnknownConnectorToolCallResponseContent", "UnknownContentChunk", "UnknownConversationEventsData", - "UnknownJSONPatchPayloadResponseValue", + "UnknownJSONPatch", "UnknownJobsAPIRoutesFineTuningCancelFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningGetFineTuningJobResponse", "UnknownJobsAPIRoutesFineTuningStartFineTuningJobResponse", @@ -4466,15 +4470,17 @@ "JobsAPIRoutesFineTuningUpdateFineTunedModelResponse": ".jobs_api_routes_fine_tuning_update_fine_tuned_modelop", "JobsAPIRoutesFineTuningUpdateFineTunedModelResponseTypedDict": ".jobs_api_routes_fine_tuning_update_fine_tuned_modelop", "UnknownJobsAPIRoutesFineTuningUpdateFineTunedModelResponse": ".jobs_api_routes_fine_tuning_update_fine_tuned_modelop", + "JSONPatch": ".jsonpatch", + "JSONPatchTypedDict": ".jsonpatch", + "UnknownJSONPatch": ".jsonpatch", "JSONPatchAdd": ".jsonpatchadd", "JSONPatchAddTypedDict": ".jsonpatchadd", "JSONPatchAppend": ".jsonpatchappend", "JSONPatchAppendTypedDict": ".jsonpatchappend", "JSONPatchPayloadResponse": ".jsonpatchpayloadresponse", "JSONPatchPayloadResponseTypedDict": ".jsonpatchpayloadresponse", - "JSONPatchPayloadResponseValue": ".jsonpatchpayloadresponse", - "JSONPatchPayloadResponseValueTypedDict": ".jsonpatchpayloadresponse", - "UnknownJSONPatchPayloadResponseValue": ".jsonpatchpayloadresponse", + "JSONPatchPayloadValueResponse": ".jsonpatchpayloadvalueresponse", + "JSONPatchPayloadValueResponseTypedDict": ".jsonpatchpayloadvalueresponse", "JSONPatchRemove": ".jsonpatchremove", "JSONPatchRemoveTypedDict": ".jsonpatchremove", "JSONPatchReplace": ".jsonpatchreplace", diff --git a/src/mistralai/client/models/activitytaskcompletedattributesresponse.py b/src/mistralai/client/models/activitytaskcompletedattributesresponse.py index 899acb62..8e355d48 100644 --- a/src/mistralai/client/models/activitytaskcompletedattributesresponse.py +++ b/src/mistralai/client/models/activitytaskcompletedattributesresponse.py @@ -18,6 +18,8 @@ class ActivityTaskCompletedAttributesResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ @@ -34,4 +36,6 @@ class ActivityTaskCompletedAttributesResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ diff --git a/src/mistralai/client/models/activitytaskstartedattributesresponse.py b/src/mistralai/client/models/activitytaskstartedattributesresponse.py index 100626d4..9a049150 100644 --- a/src/mistralai/client/models/activitytaskstartedattributesresponse.py +++ b/src/mistralai/client/models/activitytaskstartedattributesresponse.py @@ -18,6 +18,8 @@ class ActivityTaskStartedAttributesResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ @@ -34,4 +36,6 @@ class ActivityTaskStartedAttributesResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ diff --git a/src/mistralai/client/models/customtaskcompletedattributesresponse.py b/src/mistralai/client/models/customtaskcompletedattributesresponse.py index 8b28d105..afd48d76 100644 --- a/src/mistralai/client/models/customtaskcompletedattributesresponse.py +++ b/src/mistralai/client/models/customtaskcompletedattributesresponse.py @@ -18,6 +18,8 @@ class CustomTaskCompletedAttributesResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ @@ -34,4 +36,6 @@ class CustomTaskCompletedAttributesResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ diff --git a/src/mistralai/client/models/customtaskstartedattributesresponse.py b/src/mistralai/client/models/customtaskstartedattributesresponse.py index 71bed58f..4f53ae8a 100644 --- a/src/mistralai/client/models/customtaskstartedattributesresponse.py +++ b/src/mistralai/client/models/customtaskstartedattributesresponse.py @@ -20,6 +20,8 @@ class CustomTaskStartedAttributesResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ @@ -36,6 +38,8 @@ class CustomTaskStartedAttributesResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ @model_serializer(mode="wrap") diff --git a/src/mistralai/client/models/encodedpayloadoptions.py b/src/mistralai/client/models/encodedpayloadoptions.py index 5c369046..cc19b543 100644 --- a/src/mistralai/client/models/encodedpayloadoptions.py +++ b/src/mistralai/client/models/encodedpayloadoptions.py @@ -2,11 +2,15 @@ # @generated-id: 97955ebc2eb9 from __future__ import annotations -from typing import Literal +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union -EncodedPayloadOptions = Literal[ - "offloaded", - "encrypted", - "encrypted-partial", +EncodedPayloadOptions = Union[ + Literal[ + "offloaded", + "encrypted", + "encrypted-partial", + ], + UnrecognizedStr, ] diff --git a/src/mistralai/client/models/jsonpatch.py b/src/mistralai/client/models/jsonpatch.py new file mode 100644 index 00000000..d67657f5 --- /dev/null +++ b/src/mistralai/client/models/jsonpatch.py @@ -0,0 +1,64 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b7521bc9a558 + +from __future__ import annotations +from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict +from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict +from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict +from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict +from functools import partial +from mistralai.client.types import BaseModel +from mistralai.client.utils.unions import parse_open_union +from pydantic import ConfigDict +from pydantic.functional_validators import BeforeValidator +from typing import Any, Literal, Union +from typing_extensions import Annotated, TypeAliasType + + +JSONPatchTypedDict = TypeAliasType( + "JSONPatchTypedDict", + Union[ + JSONPatchAppendTypedDict, + JSONPatchAddTypedDict, + JSONPatchReplaceTypedDict, + JSONPatchRemoveTypedDict, + ], +) + + +class UnknownJSONPatch(BaseModel): + r"""A JSONPatch variant the SDK doesn't recognize. Preserves the raw payload.""" + + op: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_JSON_PATCH_VARIANTS: dict[str, Any] = { + "add": JSONPatchAdd, + "append": JSONPatchAppend, + "remove": JSONPatchRemove, + "replace": JSONPatchReplace, +} + + +JSONPatch = Annotated[ + Union[ + JSONPatchAdd, + JSONPatchAppend, + JSONPatchRemove, + JSONPatchReplace, + UnknownJSONPatch, + ], + BeforeValidator( + partial( + parse_open_union, + disc_key="op", + variants=_JSON_PATCH_VARIANTS, + unknown_cls=UnknownJSONPatch, + union_name="JSONPatch", + ) + ), +] diff --git a/src/mistralai/client/models/jsonpatchpayloadresponse.py b/src/mistralai/client/models/jsonpatchpayloadresponse.py index 345e6d14..a0301f9a 100644 --- a/src/mistralai/client/models/jsonpatchpayloadresponse.py +++ b/src/mistralai/client/models/jsonpatchpayloadresponse.py @@ -2,90 +2,50 @@ # @generated-id: 1b39f46f529f from __future__ import annotations -from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict -from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict -from .jsonpatchremove import JSONPatchRemove, JSONPatchRemoveTypedDict -from .jsonpatchreplace import JSONPatchReplace, JSONPatchReplaceTypedDict -from functools import partial -from mistralai.client.types import BaseModel +from .encodedpayloadoptions import EncodedPayloadOptions +from .jsonpatchpayloadvalueresponse import ( + JSONPatchPayloadValueResponse, + JSONPatchPayloadValueResponseTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.client.utils import validate_const -from mistralai.client.utils.unions import parse_open_union import pydantic -from pydantic import ConfigDict -from pydantic.functional_validators import AfterValidator, BeforeValidator -from typing import Any, List, Literal, Union -from typing_extensions import Annotated, TypeAliasType, TypedDict - - -JSONPatchPayloadResponseValueTypedDict = TypeAliasType( - "JSONPatchPayloadResponseValueTypedDict", - Union[ - JSONPatchAppendTypedDict, - JSONPatchAddTypedDict, - JSONPatchReplaceTypedDict, - JSONPatchRemoveTypedDict, - ], -) - - -class UnknownJSONPatchPayloadResponseValue(BaseModel): - r"""A JSONPatchPayloadResponseValue variant the SDK doesn't recognize. Preserves the raw payload.""" - - op: Literal["UNKNOWN"] = "UNKNOWN" - raw: Any - is_unknown: Literal[True] = True - - model_config = ConfigDict(frozen=True) - - -_JSON_PATCH_PAYLOAD_RESPONSE_VALUE_VARIANTS: dict[str, Any] = { - "add": JSONPatchAdd, - "append": JSONPatchAppend, - "remove": JSONPatchRemove, - "replace": JSONPatchReplace, -} - - -JSONPatchPayloadResponseValue = Annotated[ - Union[ - JSONPatchAdd, - JSONPatchAppend, - JSONPatchRemove, - JSONPatchReplace, - UnknownJSONPatchPayloadResponseValue, - ], - BeforeValidator( - partial( - parse_open_union, - disc_key="op", - variants=_JSON_PATCH_PAYLOAD_RESPONSE_VALUE_VARIANTS, - unknown_cls=UnknownJSONPatchPayloadResponseValue, - union_name="JSONPatchPayloadResponseValue", - ) - ), -] +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, NotRequired, TypedDict class JSONPatchPayloadResponseTypedDict(TypedDict): r"""A payload containing a list of JSON Patch operations. Used for streaming incremental updates to workflow state. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ - value: List[JSONPatchPayloadResponseValueTypedDict] - r"""The list of JSON Patch operations to apply in order.""" + value: JSONPatchPayloadValueResponseTypedDict type: Literal["json_patch"] r"""Discriminator indicating this is a JSON Patch payload.""" + encoding_options: NotRequired[Nullable[List[EncodedPayloadOptions]]] + r"""Encoding options applied to the payload.""" class JSONPatchPayloadResponse(BaseModel): r"""A payload containing a list of JSON Patch operations. Used for streaming incremental updates to workflow state. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ - value: List[JSONPatchPayloadResponseValue] - r"""The list of JSON Patch operations to apply in order.""" + value: JSONPatchPayloadValueResponse type: Annotated[ Annotated[Literal["json_patch"], AfterValidator(validate_const("json_patch"))], @@ -93,6 +53,34 @@ class JSONPatchPayloadResponse(BaseModel): ] = "json_patch" r"""Discriminator indicating this is a JSON Patch payload.""" + encoding_options: OptionalNullable[List[EncodedPayloadOptions]] = UNSET + r"""Encoding options applied to the payload.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["encoding_options"]) + nullable_fields = set(["encoding_options"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + try: JSONPatchPayloadResponse.model_rebuild() diff --git a/src/mistralai/client/models/jsonpatchpayloadvalueresponse.py b/src/mistralai/client/models/jsonpatchpayloadvalueresponse.py new file mode 100644 index 00000000..d6ac1b6b --- /dev/null +++ b/src/mistralai/client/models/jsonpatchpayloadvalueresponse.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6cf0e3599e2c + +from __future__ import annotations +from .jsonpatch import JSONPatch, JSONPatchTypedDict +from typing import List, Union +from typing_extensions import TypeAliasType + + +JSONPatchPayloadValueResponseTypedDict = TypeAliasType( + "JSONPatchPayloadValueResponseTypedDict", Union[List[JSONPatchTypedDict], str] +) + + +JSONPatchPayloadValueResponse = TypeAliasType( + "JSONPatchPayloadValueResponse", Union[List[JSONPatch], str] +) diff --git a/src/mistralai/client/models/jsonpayloadresponse.py b/src/mistralai/client/models/jsonpayloadresponse.py index 038ea329..9de73d2c 100644 --- a/src/mistralai/client/models/jsonpayloadresponse.py +++ b/src/mistralai/client/models/jsonpayloadresponse.py @@ -2,35 +2,48 @@ # @generated-id: ba3265f85453 from __future__ import annotations -from mistralai.client.types import BaseModel, UNSET_SENTINEL +from .encodedpayloadoptions import EncodedPayloadOptions +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.client.utils import validate_const import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import Any, Literal, Optional -from typing_extensions import Annotated, TypedDict +from typing import Any, List, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class JSONPayloadResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ value: Any - r"""The JSON-serializable payload value.""" + r"""The JSON-serializable payload value. When encrypted, contains base64-encoded data.""" type: Literal["json"] r"""Discriminator indicating this is a raw JSON payload.""" + encoding_options: NotRequired[Nullable[List[EncodedPayloadOptions]]] + r"""Encoding options applied to the payload.""" class JSONPayloadResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ value: Any - r"""The JSON-serializable payload value.""" + r"""The JSON-serializable payload value. When encrypted, contains base64-encoded data.""" type: Annotated[ Annotated[Optional[Literal["json"]], AfterValidator(validate_const("json"))], @@ -38,18 +51,30 @@ class JSONPayloadResponse(BaseModel): ] = "json" r"""Discriminator indicating this is a raw JSON payload.""" + encoding_options: OptionalNullable[List[EncodedPayloadOptions]] = UNSET + r"""Encoding options applied to the payload.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["type"]) + optional_fields = set(["type", "encoding_options"]) + nullable_fields = set(["encoding_options"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/src/mistralai/client/models/publicauthenticationmethod.py b/src/mistralai/client/models/publicauthenticationmethod.py index 95dde29a..42e943a6 100644 --- a/src/mistralai/client/models/publicauthenticationmethod.py +++ b/src/mistralai/client/models/publicauthenticationmethod.py @@ -23,6 +23,7 @@ class PublicAuthenticationMethodTypedDict(TypedDict): r"""Public view of an authentication method, without secrets.""" method_type: OutboundAuthenticationType + has_default_credentials: bool headers: NotRequired[Nullable[List[ConnectorAuthenticationHeaderTypedDict]]] @@ -31,6 +32,8 @@ class PublicAuthenticationMethod(BaseModel): method_type: OutboundAuthenticationType + has_default_credentials: bool + headers: OptionalNullable[List[ConnectorAuthenticationHeader]] = UNSET @model_serializer(mode="wrap") diff --git a/src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py b/src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py index 3afc8dcf..1fe0c248 100644 --- a/src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py +++ b/src/mistralai/client/models/workflowexecutioncompletedattributesresponse.py @@ -16,6 +16,8 @@ class WorkflowExecutionCompletedAttributesResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ @@ -29,4 +31,6 @@ class WorkflowExecutionCompletedAttributesResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ diff --git a/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py b/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py index 943e5ebc..2ddbf0af 100644 --- a/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py +++ b/src/mistralai/client/models/workflowexecutioncontinuedasnewattributesresponse.py @@ -20,6 +20,8 @@ class WorkflowExecutionContinuedAsNewAttributesResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ @@ -39,4 +41,6 @@ class WorkflowExecutionContinuedAsNewAttributesResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ diff --git a/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py b/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py index c6e118f4..59746a61 100644 --- a/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py +++ b/src/mistralai/client/models/workflowexecutionstartedattributesresponse.py @@ -25,6 +25,8 @@ class WorkflowExecutionStartedAttributesResponseTypedDict(TypedDict): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ display_name: NotRequired[Nullable[str]] r"""The user-friendly display name of the workflow, if available.""" @@ -43,6 +45,8 @@ class WorkflowExecutionStartedAttributesResponse(BaseModel): r"""A payload containing arbitrary JSON data. Used for complete state snapshots or final results. + When encrypted, the value field contains base64-encoded encrypted data + and encoding_options indicates the type of encryption applied. """ display_name: OptionalNullable[str] = UNSET diff --git a/uv.lock b/uv.lock index 8f07ac6b..2f23fc8b 100644 --- a/uv.lock +++ b/uv.lock @@ -1015,7 +1015,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.4" +version = "2.4.5" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 8e8bedf08b27544b149dc515e600e4d383e17a7f Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Wed, 20 May 2026 17:08:22 +0200 Subject: [PATCH 68/82] ci: split run_examples to keep PR runs unsecured and gate API runs to main (#531) - run_examples: build + install only, no secrets, no env, runs on PR + push - examples: build + run examples with CI_MISTRAL_API_KEY_PYTHON_*, environment: publish, push-to-main only Pins runners to ubuntu-24.04 while here. --- .github/workflows/run_example_scripts.yaml | 34 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_example_scripts.yaml b/.github/workflows/run_example_scripts.yaml index 35ec1def..a14e83e4 100644 --- a/.github/workflows/run_example_scripts.yaml +++ b/.github/workflows/run_example_scripts.yaml @@ -10,7 +10,37 @@ on: jobs: run_examples: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + + steps: + - name: Checkout code + uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 + + - name: Build the package + run: | + uv build + + - name: Install client with extras + run: | + PACKAGE="dist/$(ls dist | grep whl | head -n 1)[agents]" + uv pip install --system "$PACKAGE" + + examples: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-24.04 + environment: publish strategy: fail-fast: false matrix: @@ -50,7 +80,7 @@ jobs: MISTRAL_API_KEY: ${{ env.MISTRAL_API_KEY }} run_examples_required: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: run_examples if: ${{ always() }} From 0ff6ee9fc8c04e2c34068b7a6be3b90ff4643f4d Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Wed, 20 May 2026 17:20:53 +0200 Subject: [PATCH 69/82] ci: scope secrets to publish environment (#527) ci: rename environment to publish --- .github/workflows/sdk_generation_mistralai_azure_sdk.yaml | 1 + .github/workflows/sdk_generation_mistralai_gcp_sdk.yaml | 1 + .github/workflows/sdk_generation_mistralai_sdk.yaml | 1 + .github/workflows/update_speakeasy.yaml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml index 7b412a4c..f6fd4b79 100644 --- a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml @@ -53,6 +53,7 @@ jobs: align-version: needs: generate runs-on: ubuntu-latest + environment: publish steps: - name: Find PR branch id: find-pr diff --git a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml index 5d200ae0..2b47480e 100644 --- a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml @@ -53,6 +53,7 @@ jobs: align-version: needs: generate runs-on: ubuntu-latest + environment: publish steps: - name: Find PR branch id: find-pr diff --git a/.github/workflows/sdk_generation_mistralai_sdk.yaml b/.github/workflows/sdk_generation_mistralai_sdk.yaml index 251cfdde..727f644d 100644 --- a/.github/workflows/sdk_generation_mistralai_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_sdk.yaml @@ -53,6 +53,7 @@ jobs: align-version: needs: generate runs-on: ubuntu-latest + environment: publish steps: - name: Find PR branch id: find-pr diff --git a/.github/workflows/update_speakeasy.yaml b/.github/workflows/update_speakeasy.yaml index f0179686..e7244c67 100644 --- a/.github/workflows/update_speakeasy.yaml +++ b/.github/workflows/update_speakeasy.yaml @@ -24,6 +24,7 @@ on: jobs: update-sdks: runs-on: ubuntu-latest + environment: publish steps: - name: Checkout repository uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 From 3acff983942ab417ea4cbb1d17e0042746102c85 Mon Sep 17 00:00:00 2001 From: Ivana Dunisijevic Date: Wed, 20 May 2026 17:31:05 +0200 Subject: [PATCH 70/82] ci: publish Python SDKs to PyPI with OIDC (#529) * ci: publish Python SDKs to PyPI with OIDC * ci: pin PyPI publish runner --- .../workflows/sdk_publish_mistralai_sdk.yaml | 70 ++++++++++++++++--- packages/azure/pyproject.toml | 3 + packages/gcp/pyproject.toml | 3 + pyproject.toml | 1 + 4 files changed, 66 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sdk_publish_mistralai_sdk.yaml b/.github/workflows/sdk_publish_mistralai_sdk.yaml index 3fa424df..e6bc350d 100644 --- a/.github/workflows/sdk_publish_mistralai_sdk.yaml +++ b/.github/workflows/sdk_publish_mistralai_sdk.yaml @@ -1,9 +1,7 @@ name: Publish MISTRALAI-SDK permissions: - checks: write - contents: write - pull-requests: write - statuses: write + contents: read + id-token: write "on": workflow_dispatch: inputs: @@ -15,16 +13,66 @@ permissions: branches: - main paths: - - RELEASES.md - - "*/RELEASES.md" + - "**/RELEASES.md" jobs: publish: + name: Publish Python SDKs to PyPI # Auto-publish on push to main branch; require manual confirmation for workflow_dispatch if: | (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.confirm_publish == 'publish') - uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 - secrets: - github_access_token: ${{ secrets.CLIENT_PIPELINE }} - pypi_token: ${{ secrets.PYPI_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} + runs-on: ubuntu-24.04 + environment: + name: public-sdk + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + + - name: Set up Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 + with: + python-version: "3.12" + + - name: Install uv + uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 + + - name: Build mistralai + run: | + python scripts/prepare_readme.py + uv build --sdist --wheel --out-dir dist/mistralai + + - name: Publish mistralai to PyPI + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13 + with: + packages-dir: dist/mistralai/ + print-hash: true + verbose: true + skip-existing: true + + - name: Build mistralai-azure + working-directory: packages/azure + run: | + python scripts/prepare_readme.py + uv build --sdist --wheel --out-dir ../../dist/mistralai-azure + + - name: Publish mistralai-azure to PyPI + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13 + with: + packages-dir: dist/mistralai-azure/ + print-hash: true + verbose: true + skip-existing: true + + - name: Build mistralai-gcp + working-directory: packages/gcp + run: | + python scripts/prepare_readme.py + uv build --sdist --wheel --out-dir ../../dist/mistralai-gcp + + - name: Publish mistralai-gcp to PyPI + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13 + with: + packages-dir: dist/mistralai-gcp/ + print-hash: true + verbose: true + skip-existing: true diff --git a/packages/azure/pyproject.toml b/packages/azure/pyproject.toml index 334767bd..9b93e71a 100644 --- a/packages/azure/pyproject.toml +++ b/packages/azure/pyproject.toml @@ -20,6 +20,9 @@ dev = [ "pytest-asyncio>=0.23.7,<0.24", ] +[tool.uv] +exclude-newer = "7 days" + [tool.setuptools.package-data] "*" = ["py.typed", "src/mistralai/azure/client/py.typed"] diff --git a/packages/gcp/pyproject.toml b/packages/gcp/pyproject.toml index 9a8969c1..5cec57e1 100644 --- a/packages/gcp/pyproject.toml +++ b/packages/gcp/pyproject.toml @@ -25,6 +25,9 @@ dev = [ "types-python-dateutil>=2.9.0.20240316,<3", ] +[tool.uv] +exclude-newer = "7 days" + [tool.setuptools.package-data] "*" = ["py.typed", "src/mistralai/gcp/client/py.typed"] diff --git a/pyproject.toml b/pyproject.toml index f79b279f..bba2a431 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,6 +77,7 @@ lint = [ ] [tool.uv] +exclude-newer = "7 days" default-groups = [ "dev", "lint", From 63d49fdb62e756c7aac8b62811af3b62911eb072 Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Thu, 21 May 2026 10:15:04 +0200 Subject: [PATCH 71/82] ci: migrate SDK generation to speakeasy ci CLI (#533) Replaces Speakeasy's reusable workflow with a steps-based job invoking the speakeasy ci generate CLI directly. This lets the generate job declare environment: publish, gating secrets access behind the required reviewer approval. Also bumps speakeasyVersion to 1.763.2, which includes the upstream fix for the go-git push bug in CommitAndPush (speakeasy-api/speakeasy#2043). Three generation workflows updated: mistralai-sdk, mistralai-azure-sdk, mistralai-gcp-sdk. --- .../sdk_generation_mistralai_azure_sdk.yaml | 78 ++++++++++++------- .../sdk_generation_mistralai_gcp_sdk.yaml | 78 ++++++++++++------- .../sdk_generation_mistralai_sdk.yaml | 76 ++++++++++++------ .speakeasy/workflow.yaml | 2 +- 4 files changed, 156 insertions(+), 78 deletions(-) diff --git a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml index f6fd4b79..8bfe94db 100644 --- a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml @@ -16,7 +16,7 @@ permissions: type: string jobs: resolve-speakeasy-version: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: version: ${{ steps.resolve.outputs.version }} steps: @@ -32,53 +32,79 @@ jobs: echo "Could not resolve speakeasyVersion from .speakeasy/workflow.yaml" exit 1 fi + # Strip optional leading 'v' + VERSION="${VERSION#v}" echo "Resolved Speakeasy version: $VERSION" echo "version=$VERSION" >> "$GITHUB_OUTPUT" generate: needs: resolve-speakeasy-version - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - set_version: ${{ github.event.inputs.set_version }} - speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} - target: mistralai-azure-sdk - feature_branch: speakeasy-sdk-regen-${{ github.run_id }} - secrets: - github_access_token: ${{ secrets.CLIENT_PIPELINE }} - pypi_token: ${{ secrets.PYPI_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} + runs-on: ubuntu-24.04 + environment: publish + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + token: ${{ secrets.CLIENT_PIPELINE }} + + - name: Install Speakeasy CLI + env: + VERSION: ${{ needs.resolve-speakeasy-version.outputs.version }} + run: | + curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/07977787cc394cb30b418a591b3332e40e209be1/install.sh | sh + speakeasy --version + + - name: Run SDK generation + env: + INPUT_GITHUB_ACCESS_TOKEN: ${{ secrets.CLIENT_PIPELINE }} + SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }} + INPUT_MODE: pr + INPUT_FORCE: ${{ github.event.inputs.force }} + INPUT_TARGET: mistralai-azure-sdk + INPUT_SET_VERSION: ${{ github.event.inputs.set_version }} + INPUT_FEATURE_BRANCH: ${{ format('speakeasy/mistralai-azure-sdk-{0}-{1}', github.run_id, github.run_attempt) }} + INPUT_CLI_ENVIRONMENT_VARIABLES: | + NODE_OPTIONS=--max-old-space-size=4096 + run: speakeasy ci generate align-version: needs: generate - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: publish steps: - - name: Find PR branch - id: find-pr + - name: Compute expected PR branch + id: branch + run: | + BRANCH="${{ format('speakeasy/mistralai-azure-sdk-{0}-{1}', github.run_id, github.run_attempt) }}" + echo "name=$BRANCH" >> "$GITHUB_OUTPUT" + + - name: Check PR branch exists + id: branch-exists env: GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} - SPEAKEASY_BRANCH: speakeasy-sdk-regen-${{ github.run_id }} run: | set -euo pipefail - PR_BRANCH="$SPEAKEASY_BRANCH" - echo "Using Speakeasy generated branch: $PR_BRANCH" - echo "branch=$PR_BRANCH" >> "$GITHUB_OUTPUT" + if git ls-remote --heads "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.branch.outputs.name }}" | grep -q .; then + echo "exists=true" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + echo "Branch not found: ${{ steps.branch.outputs.name }}. Skipping alignment." + fi - name: Checkout PR branch - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: - ref: ${{ steps.find-pr.outputs.branch }} + ref: ${{ steps.branch.outputs.name }} token: ${{ secrets.CLIENT_PIPELINE }} - name: Install uv - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 - name: Align version using uv - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' run: | set -euo pipefail @@ -99,7 +125,7 @@ jobs: uv version "$VERSION" --directory packages/azure - name: Commit and push - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' run: | git config user.email "action@github.com" git config user.name "GitHub Action" @@ -108,6 +134,6 @@ jobs: echo "No changes to commit" else VERSION=$(grep '^version = ' packages/azure/pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/') - git commit -m "chore: align Azure pyproject.toml and uv.lock to version $VERSION" + git commit -m "chore: align pyproject.toml and uv.lock to version $VERSION" git push fi diff --git a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml index 2b47480e..a23105e8 100644 --- a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml @@ -16,7 +16,7 @@ permissions: type: string jobs: resolve-speakeasy-version: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: version: ${{ steps.resolve.outputs.version }} steps: @@ -32,53 +32,79 @@ jobs: echo "Could not resolve speakeasyVersion from .speakeasy/workflow.yaml" exit 1 fi + # Strip optional leading 'v' + VERSION="${VERSION#v}" echo "Resolved Speakeasy version: $VERSION" echo "version=$VERSION" >> "$GITHUB_OUTPUT" generate: needs: resolve-speakeasy-version - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - set_version: ${{ github.event.inputs.set_version }} - speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} - target: mistralai-gcp-sdk - feature_branch: speakeasy-sdk-regen-${{ github.run_id }} - secrets: - github_access_token: ${{ secrets.CLIENT_PIPELINE }} - pypi_token: ${{ secrets.PYPI_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} + runs-on: ubuntu-24.04 + environment: publish + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + token: ${{ secrets.CLIENT_PIPELINE }} + + - name: Install Speakeasy CLI + env: + VERSION: ${{ needs.resolve-speakeasy-version.outputs.version }} + run: | + curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/07977787cc394cb30b418a591b3332e40e209be1/install.sh | sh + speakeasy --version + + - name: Run SDK generation + env: + INPUT_GITHUB_ACCESS_TOKEN: ${{ secrets.CLIENT_PIPELINE }} + SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }} + INPUT_MODE: pr + INPUT_FORCE: ${{ github.event.inputs.force }} + INPUT_TARGET: mistralai-gcp-sdk + INPUT_SET_VERSION: ${{ github.event.inputs.set_version }} + INPUT_FEATURE_BRANCH: ${{ format('speakeasy/mistralai-gcp-sdk-{0}-{1}', github.run_id, github.run_attempt) }} + INPUT_CLI_ENVIRONMENT_VARIABLES: | + NODE_OPTIONS=--max-old-space-size=4096 + run: speakeasy ci generate align-version: needs: generate - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: publish steps: - - name: Find PR branch - id: find-pr + - name: Compute expected PR branch + id: branch + run: | + BRANCH="${{ format('speakeasy/mistralai-gcp-sdk-{0}-{1}', github.run_id, github.run_attempt) }}" + echo "name=$BRANCH" >> "$GITHUB_OUTPUT" + + - name: Check PR branch exists + id: branch-exists env: GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} - SPEAKEASY_BRANCH: speakeasy-sdk-regen-${{ github.run_id }} run: | set -euo pipefail - PR_BRANCH="$SPEAKEASY_BRANCH" - echo "Using Speakeasy generated branch: $PR_BRANCH" - echo "branch=$PR_BRANCH" >> "$GITHUB_OUTPUT" + if git ls-remote --heads "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.branch.outputs.name }}" | grep -q .; then + echo "exists=true" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + echo "Branch not found: ${{ steps.branch.outputs.name }}. Skipping alignment." + fi - name: Checkout PR branch - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: - ref: ${{ steps.find-pr.outputs.branch }} + ref: ${{ steps.branch.outputs.name }} token: ${{ secrets.CLIENT_PIPELINE }} - name: Install uv - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 - name: Align version using uv - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' run: | set -euo pipefail @@ -99,7 +125,7 @@ jobs: uv version "$VERSION" --directory packages/gcp - name: Commit and push - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' run: | git config user.email "action@github.com" git config user.name "GitHub Action" @@ -108,6 +134,6 @@ jobs: echo "No changes to commit" else VERSION=$(grep '^version = ' packages/gcp/pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/') - git commit -m "chore: align GCP pyproject.toml and uv.lock to version $VERSION" + git commit -m "chore: align pyproject.toml and uv.lock to version $VERSION" git push fi diff --git a/.github/workflows/sdk_generation_mistralai_sdk.yaml b/.github/workflows/sdk_generation_mistralai_sdk.yaml index 727f644d..50845a3a 100644 --- a/.github/workflows/sdk_generation_mistralai_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_sdk.yaml @@ -16,7 +16,7 @@ permissions: type: string jobs: resolve-speakeasy-version: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 outputs: version: ${{ steps.resolve.outputs.version }} steps: @@ -32,53 +32,79 @@ jobs: echo "Could not resolve speakeasyVersion from .speakeasy/workflow.yaml" exit 1 fi + # Strip optional leading 'v' + VERSION="${VERSION#v}" echo "Resolved Speakeasy version: $VERSION" echo "version=$VERSION" >> "$GITHUB_OUTPUT" generate: needs: resolve-speakeasy-version - uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@7951d9dce457425b900b2dd317253499d98c2587 # v15 - with: - force: ${{ github.event.inputs.force }} - mode: pr - set_version: ${{ github.event.inputs.set_version }} - speakeasy_version: ${{ needs.resolve-speakeasy-version.outputs.version }} - target: mistralai-sdk - feature_branch: speakeasy-sdk-regen-${{ github.run_id }} - secrets: - github_access_token: ${{ secrets.CLIENT_PIPELINE }} - pypi_token: ${{ secrets.PYPI_TOKEN }} - speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} + runs-on: ubuntu-24.04 + environment: publish + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + with: + fetch-depth: 0 + token: ${{ secrets.CLIENT_PIPELINE }} + + - name: Install Speakeasy CLI + env: + VERSION: ${{ needs.resolve-speakeasy-version.outputs.version }} + run: | + curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/07977787cc394cb30b418a591b3332e40e209be1/install.sh | sh + speakeasy --version + + - name: Run SDK generation + env: + INPUT_GITHUB_ACCESS_TOKEN: ${{ secrets.CLIENT_PIPELINE }} + SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }} + INPUT_MODE: pr + INPUT_FORCE: ${{ github.event.inputs.force }} + INPUT_TARGET: mistralai-sdk + INPUT_SET_VERSION: ${{ github.event.inputs.set_version }} + INPUT_FEATURE_BRANCH: ${{ format('speakeasy/mistralai-sdk-{0}-{1}', github.run_id, github.run_attempt) }} + INPUT_CLI_ENVIRONMENT_VARIABLES: | + NODE_OPTIONS=--max-old-space-size=4096 + run: speakeasy ci generate align-version: needs: generate - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: publish steps: - - name: Find PR branch - id: find-pr + - name: Compute expected PR branch + id: branch + run: | + BRANCH="${{ format('speakeasy/mistralai-sdk-{0}-{1}', github.run_id, github.run_attempt) }}" + echo "name=$BRANCH" >> "$GITHUB_OUTPUT" + + - name: Check PR branch exists + id: branch-exists env: GH_TOKEN: ${{ secrets.CLIENT_PIPELINE }} - SPEAKEASY_BRANCH: speakeasy-sdk-regen-${{ github.run_id }} run: | set -euo pipefail - PR_BRANCH="$SPEAKEASY_BRANCH" - echo "Using Speakeasy generated branch: $PR_BRANCH" - echo "branch=$PR_BRANCH" >> "$GITHUB_OUTPUT" + if git ls-remote --heads "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git" "${{ steps.branch.outputs.name }}" | grep -q .; then + echo "exists=true" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + echo "Branch not found: ${{ steps.branch.outputs.name }}. Skipping alignment." + fi - name: Checkout PR branch - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: - ref: ${{ steps.find-pr.outputs.branch }} + ref: ${{ steps.branch.outputs.name }} token: ${{ secrets.CLIENT_PIPELINE }} - name: Install uv - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 - name: Align version using uv - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' run: | set -euo pipefail @@ -99,7 +125,7 @@ jobs: uv version "$VERSION" - name: Commit and push - if: steps.find-pr.outputs.branch != '' + if: steps.branch-exists.outputs.exists == 'true' run: | git config user.email "action@github.com" git config user.name "GitHub Action" diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 5e708727..f592ebe8 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,5 +1,5 @@ workflowVersion: 1.0.0 -speakeasyVersion: 1.761.1 +speakeasyVersion: 1.763.2 sources: mistral-azure-source: inputs: From d60af25c96ab7a8a092ee746475f3b3d89a8f596 Mon Sep 17 00:00:00 2001 From: Nicolas Faurie Date: Thu, 21 May 2026 15:25:23 +0200 Subject: [PATCH 72/82] Workflows: Add JSONPatch events partial decryption (#530) * Workflows: Add JSONPatch events partial decryption * Update to new format * Improvement --- .../workflows/encoding/payload_encoder.py | 63 +++++++++++++++++-- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/src/mistralai/extra/workflows/encoding/payload_encoder.py b/src/mistralai/extra/workflows/encoding/payload_encoder.py index 611f33fa..1a7fe7ae 100644 --- a/src/mistralai/extra/workflows/encoding/payload_encoder.py +++ b/src/mistralai/extra/workflows/encoding/payload_encoder.py @@ -9,7 +9,7 @@ import urllib.parse from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union -from pydantic import BaseModel +from pydantic import BaseModel, ValidationError if TYPE_CHECKING: from cryptography.exceptions import InvalidTag @@ -38,6 +38,7 @@ NetworkEncodedResult, WorkflowContext, ) +from mistralai.client.models.jsonpatchpayloadresponse import JSONPatchPayloadResponse from mistralai.extra.exceptions import ( WorkflowPayloadEncryptionException, WorkflowPayloadOffloadingException, @@ -151,7 +152,10 @@ def _decrypt(self, data: bytes) -> bytes: async def _handle_offloading( self, data: bytes, context: Optional[WorkflowContext] ) -> tuple[bytes, bool]: - if self.offloading_config is None or self.offloading_config.storage_config is None: + if ( + self.offloading_config is None + or self.offloading_config.storage_config is None + ): raise WorkflowPayloadOffloadingException( "You must configure payload offloading storage" ) @@ -281,7 +285,10 @@ async def encode_event_payload_content( if self.encryption_config is None: return data, [] - if force_full_encryption or self.encryption_config.mode == PayloadEncryptionMode.FULL: + if ( + force_full_encryption + or self.encryption_config.mode == PayloadEncryptionMode.FULL + ): encrypted_data = self._encrypt(data) return encrypted_data, [EncodedPayloadOptions.ENCRYPTED] @@ -339,8 +346,28 @@ async def decode_event_payload( return payload_data encoding_options = [EncodedPayloadOptions(opt) for opt in encoding_options_strs] + + # Handle selective encryption for json_patch payloads + if EncodedPayloadOptions.PARTIALLY_ENCRYPTED in encoding_options: + try: + payload = JSONPatchPayloadResponse.model_validate(payload_data) + if isinstance(payload.value, list): + decrypted_patches = self._decrypt_json_patch_selective( + [p.model_dump() for p in payload.value] + ) + return { + "type": payload.type, + "value": decrypted_patches, + "encoding_options": [], + } + except ValidationError: + pass # Not a json_patch payload, fall through to full decryption + + # Standard full encryption (base64 string value) encrypted_bytes = base64.b64decode(payload_data["value"]) - decrypted_bytes = await self.decode_payload_content(encrypted_bytes, encoding_options) + decrypted_bytes = await self.decode_payload_content( + encrypted_bytes, encoding_options + ) decrypted_value = json.loads(decrypted_bytes) return { @@ -349,6 +376,34 @@ async def decode_event_payload( "encoding_options": [], } + _ENCRYPTED_PATCH_TYPE = "__encrypted__" + + def _decrypt_json_patch_selective( + self, patches: List[Dict[str, Any]] + ) -> List[Dict[str, Any]]: + """Decrypt patches with EncryptedPatchValue wrapper: {type: "__encrypted__", value: "base64..."}.""" + decrypted = [] + for patch in patches: + patch_value = patch.get("value") + + # EncryptedPatchValue format: {"type": "__encrypted__", "value": "base64-encrypted-data"} + if ( + isinstance(patch_value, dict) + and patch_value.get("type") == self._ENCRYPTED_PATCH_TYPE + ): + encrypted_b64 = patch_value.get("value", "") + encrypted_data = base64.b64decode(encrypted_b64) + decrypted_bytes = self._decrypt(encrypted_data) + decrypted.append( + { + **patch, + "value": json.loads(decrypted_bytes), + } + ) + else: + decrypted.append(patch) + return decrypted + async def encode_network_input( self, data: Optional[Dict[str, Any]], context: WorkflowContext ) -> NetworkEncodedInput: From 91f067b3cbec568444695b488f9ebb7cded65b52 Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Thu, 21 May 2026 15:58:57 +0200 Subject: [PATCH 73/82] docs: sync accesses delete description with current spec (#538) The persistent-edits baseline in .speakeasy/gen.lock anchors this paragraph to text that the upstream OpenAPI spec has since updated (typo fix and deprecation warning). Every speakeasy run produces a 3-way merge conflict on this single line, blocking the entire mistralai-sdk gen workflow. Updating the file in-tree re-anchors the persistent edit so the next gen run can proceed cleanly and produce a normal regen PR with the accumulated spec changes. --- docs/sdks/accesses/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/accesses/README.md b/docs/sdks/accesses/README.md index 09515e0b..51a63779 100644 --- a/docs/sdks/accesses/README.md +++ b/docs/sdks/accesses/README.md @@ -98,7 +98,7 @@ with Mistral( ## delete -Given a library id, you can delete the access level of an entity. An owner cannot delete its own access. You have to be the owner of the library to delete an access other than yours. +Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. ### Example Usage From a2fd94dd6426d5337b0dbf6edb1e5a0b4d17b93a Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Thu, 21 May 2026 16:02:29 +0200 Subject: [PATCH 74/82] ci: generate README-PYPI.md before aligning azure/gcp versions (#537) uv version triggers a hatchling editable build which validates pyproject.toml. The azure and gcp packages declare readme = "README-PYPI.md" but the file is generated at publish time by scripts/prepare_readme.py and not committed. On fresh CI checkouts hatchling raises OSError: Readme file does not exist: README-PYPI.md before the version is bumped. Run prepare_readme.py before uv version so the file exists for validation, mirroring what publish.sh already does at release time. --- .github/workflows/sdk_generation_mistralai_azure_sdk.yaml | 5 +++++ .github/workflows/sdk_generation_mistralai_gcp_sdk.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml index 8bfe94db..620ecf79 100644 --- a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml @@ -103,6 +103,11 @@ jobs: if: steps.branch-exists.outputs.exists == 'true' uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 + - name: Generate README-PYPI.md + if: steps.branch-exists.outputs.exists == 'true' + working-directory: packages/azure + run: uv run python scripts/prepare_readme.py + - name: Align version using uv if: steps.branch-exists.outputs.exists == 'true' run: | diff --git a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml index a23105e8..8902ccbe 100644 --- a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml @@ -103,6 +103,11 @@ jobs: if: steps.branch-exists.outputs.exists == 'true' uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 + - name: Generate README-PYPI.md + if: steps.branch-exists.outputs.exists == 'true' + working-directory: packages/gcp + run: uv run python scripts/prepare_readme.py + - name: Align version using uv if: steps.branch-exists.outputs.exists == 'true' run: | From 55c6318a32241bebf1a9a78e03e3f68c15cb3391 Mon Sep 17 00:00:00 2001 From: Akhil Nair Date: Thu, 21 May 2026 16:18:58 +0200 Subject: [PATCH 75/82] feat: add Azure DefaultAzureCredential support for blob storage (#508) * feat: add Azure DefaultAzureCredential support for blob storage * fix: narrow account_url type for mypy/pyright --- pyproject.toml | 1 + .../extra/workflows/encoding/config.py | 1 + .../workflows/encoding/storage/_azure.py | 29 ++++++++++-- .../encoding/storage/blob_storage.py | 9 ++-- uv.lock | 45 +++++++++++++++++++ 5 files changed, 75 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bba2a431..09efd36c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ realtime = [ workflow_payload_offloading_azure = [ "azure-storage-blob[aio]>=12.28.0,<13.0.0", + "azure-identity[aio]>=1.25.0,<2.0.0", ] workflow_payload_offloading_gcs = [ "gcloud-aio-storage>=9.3.0,<10.0.0", diff --git a/src/mistralai/extra/workflows/encoding/config.py b/src/mistralai/extra/workflows/encoding/config.py index ff849fd7..af02f64a 100644 --- a/src/mistralai/extra/workflows/encoding/config.py +++ b/src/mistralai/extra/workflows/encoding/config.py @@ -16,6 +16,7 @@ class BlobStorageConfig(BaseModel): # Azure settings container_name: Optional[str] = None azure_connection_string: Optional[SecretStr] = None + azure_storage_account_url: Optional[str] = None # GCS settings bucket_id: Optional[str] = None diff --git a/src/mistralai/extra/workflows/encoding/storage/_azure.py b/src/mistralai/extra/workflows/encoding/storage/_azure.py index e62d9926..8865634c 100644 --- a/src/mistralai/extra/workflows/encoding/storage/_azure.py +++ b/src/mistralai/extra/workflows/encoding/storage/_azure.py @@ -3,6 +3,7 @@ from typing import Any, cast from azure.core.exceptions import ResourceNotFoundError +from azure.identity.aio import DefaultAzureCredential from azure.storage.blob.aio import BlobServiceClient from .blob_storage import BlobNotFoundError, BlobStorage @@ -11,14 +12,25 @@ class AzureBlobStorage(BlobStorage): def __init__( self, container_name: str, - azure_connection_string: str, + azure_connection_string: str | None = None, prefix: str | None = None, + azure_storage_account_url: str | None = None, ): + if azure_connection_string and azure_storage_account_url: + raise ValueError( + "azure_connection_string and azure_storage_account_url are mutually exclusive" + ) + if not azure_connection_string and not azure_storage_account_url: + raise ValueError( + "Either azure_connection_string or azure_storage_account_url must be provided" + ) self.container_name = container_name self.connection_string = azure_connection_string + self.account_url = azure_storage_account_url self.prefix = prefix or "" self._service_client: BlobServiceClient | None = None self._container_client: Any = None + self._credential: Any = None def _get_full_key(self, key: str) -> str: if not self.prefix: @@ -28,9 +40,16 @@ def _get_full_key(self, key: str) -> str: return f"{self.prefix}/{key}" async def __aenter__(self) -> "AzureBlobStorage": - self._service_client = BlobServiceClient.from_connection_string( - self.connection_string - ) + if self.connection_string: + self._service_client = BlobServiceClient.from_connection_string( + self.connection_string + ) + else: + assert self.account_url is not None + self._credential = DefaultAzureCredential() + self._service_client = BlobServiceClient( + self.account_url, credential=self._credential + ) assert self._service_client is not None self._container_client = self._service_client.get_container_client( self.container_name @@ -40,6 +59,8 @@ async def __aenter__(self) -> "AzureBlobStorage": async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: if self._service_client: await self._service_client.close() + if self._credential: + await self._credential.close() async def upload_blob(self, key: str, content: bytes) -> str: full_key = self._get_full_key(key) diff --git a/src/mistralai/extra/workflows/encoding/storage/blob_storage.py b/src/mistralai/extra/workflows/encoding/storage/blob_storage.py index ce488421..e267b979 100644 --- a/src/mistralai/extra/workflows/encoding/storage/blob_storage.py +++ b/src/mistralai/extra/workflows/encoding/storage/blob_storage.py @@ -65,8 +65,8 @@ async def get_blob_storage( from ._azure import AzureBlobStorage # type: ignore[import-untyped] except ImportError as e: raise ImportError( - "Azure Blob Storage support requires azure-storage-blob. " - "Install it with: pip install 'mistralai[workflow_payload_offloading_azure]'" + "Azure Blob Storage support requires azure-storage-blob and azure-identity. " + "Install with: pip install 'mistralai[workflow_payload_offloading_azure]'" ) from e if not blob_storage_config.container_name: @@ -78,14 +78,11 @@ async def get_blob_storage( if blob_storage_config.azure_connection_string else None ) - if not azure_conn_str: - raise WorkflowPayloadOffloadingException( - "azure_connection_string is required for Azure blob storage" - ) storage = AzureBlobStorage( container_name=blob_storage_config.container_name, azure_connection_string=azure_conn_str, prefix=prefix, + azure_storage_account_url=blob_storage_config.azure_storage_account_url, ) elif blob_storage_config.storage_provider == StorageProvider.GCS: diff --git a/uv.lock b/uv.lock index 2f23fc8b..8cc60189 100644 --- a/uv.lock +++ b/uv.lock @@ -282,6 +282,22 @@ aio = [ { name = "aiohttp" }, ] +[[package]] +name = "azure-identity" +version = "1.25.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "azure-core" }, + { name = "cryptography" }, + { name = "msal" }, + { name = "msal-extensions" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c5/0e/3a63efb48aa4a5ae2cfca61ee152fbcb668092134d3eb8bfda472dd5c617/azure_identity-1.25.3.tar.gz", hash = "sha256:ab23c0d63015f50b630ef6c6cf395e7262f439ce06e5d07a64e874c724f8d9e6", size = 286304, upload-time = "2026-03-13T01:12:20.892Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/9a/417b3a533e01953a7c618884df2cb05a71e7b68bdbce4fbdb62349d2a2e8/azure_identity-1.25.3-py3-none-any.whl", hash = "sha256:f4d0b956a8146f30333e071374171f3cfa7bdb8073adb8c3814b65567aa7447c", size = 192138, upload-time = "2026-03-13T01:12:22.951Z" }, +] + [[package]] name = "azure-storage-blob" version = "12.28.0" @@ -1046,10 +1062,12 @@ workflow-payload-encryption = [ ] workflow-payload-offloading = [ { name = "aioboto3" }, + { name = "azure-identity" }, { name = "azure-storage-blob", extra = ["aio"] }, { name = "gcloud-aio-storage" }, ] workflow-payload-offloading-azure = [ + { name = "azure-identity" }, { name = "azure-storage-blob", extra = ["aio"] }, ] workflow-payload-offloading-gcs = [ @@ -1086,6 +1104,7 @@ lint = [ requires-dist = [ { name = "aioboto3", marker = "extra == 'workflow-payload-offloading-s3'", specifier = ">=12.4.0,<13.0.0" }, { name = "authlib", marker = "extra == 'agents'", specifier = ">=1.5.2,<2.0" }, + { name = "azure-identity", extras = ["aio"], marker = "extra == 'workflow-payload-offloading-azure'", specifier = ">=1.25.0,<2.0.0" }, { name = "azure-storage-blob", extras = ["aio"], marker = "extra == 'workflow-payload-offloading-azure'", specifier = ">=12.28.0,<13.0.0" }, { name = "cryptography", marker = "extra == 'workflow-payload-encryption'", specifier = ">=41.0.0,<47.0.0" }, { name = "eval-type-backport", specifier = ">=0.2.0" }, @@ -1131,6 +1150,32 @@ lint = [ { name = "ruff", specifier = ">=0.11.10,<0.12" }, ] +[[package]] +name = "msal" +version = "1.36.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, + { name = "pyjwt", extra = ["crypto"] }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/de/cb/b02b0f748ac668922364ccb3c3bff5b71628a05f5adfec2ba2a5c3031483/msal-1.36.0.tar.gz", hash = "sha256:3f6a4af2b036b476a4215111c4297b4e6e236ed186cd804faefba23e4990978b", size = 174217, upload-time = "2026-04-09T10:20:33.525Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/d3/414d1f0a5f6f4fe5313c2b002c54e78a3332970feb3f5fed14237aa17064/msal-1.36.0-py3-none-any.whl", hash = "sha256:36ecac30e2ff4322d956029aabce3c82301c29f0acb1ad89b94edcabb0e58ec4", size = 121547, upload-time = "2026-04-09T10:20:32.336Z" }, +] + +[[package]] +name = "msal-extensions" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "msal" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/01/99/5d239b6156eddf761a636bded1118414d161bd6b7b37a9335549ed159396/msal_extensions-1.3.1.tar.gz", hash = "sha256:c5b0fd10f65ef62b5f1d62f4251d51cbcaf003fcedae8c91b040a488614be1a4", size = 23315, upload-time = "2025-03-14T23:51:03.902Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5e/75/bd9b7bb966668920f06b200e84454c8f3566b102183bc55c5473d96cb2b9/msal_extensions-1.3.1-py3-none-any.whl", hash = "sha256:96d3de4d034504e969ac5e85bae8106c8373b5c6568e4c8fa7af2eca9dbe6bca", size = 20583, upload-time = "2025-03-14T23:51:03.016Z" }, +] + [[package]] name = "multidict" version = "6.7.1" From 90c2bed7694ecbfd0dc5da329f8c51fd683f1f8f Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Thu, 21 May 2026 17:21:10 +0200 Subject: [PATCH 76/82] ci: commit README-PYPI.md for azure and gcp to match main package (#543) The mistralai-{azure,gcp} pyproject.toml files reference README-PYPI.md which is generated by scripts/prepare_readme.py from the regular README.md with relative links rewritten to absolute GitHub URLs. Until now, the file was gitignored per package and only generated at publish time. This caused align-version to fail in CI because uv version triggers a hatchling editable build which validates pyproject.toml, and hatchling refuses to validate a non-existent readme file. The root mistralai package already commits its README-PYPI.md (added in #518) and works fine. Apply the same pattern to azure and gcp: - Remove README-PYPI.md from each package's .gitignore - Commit the generated file - Drop the prepare_readme step from gen workflows (added in #537) since the file is now always present on disk prepare_readme.py is still called by publish.sh and the publish workflow to refresh the file at release time, so it stays accurate. --- .../sdk_generation_mistralai_azure_sdk.yaml | 5 - .../sdk_generation_mistralai_gcp_sdk.yaml | 5 - packages/azure/.gitignore | 1 - packages/azure/README-PYPI.md | 464 ++++++++++++++++++ packages/gcp/.gitignore | 1 - packages/gcp/README-PYPI.md | 428 ++++++++++++++++ 6 files changed, 892 insertions(+), 12 deletions(-) create mode 100644 packages/azure/README-PYPI.md create mode 100644 packages/gcp/README-PYPI.md diff --git a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml index 620ecf79..8bfe94db 100644 --- a/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_azure_sdk.yaml @@ -103,11 +103,6 @@ jobs: if: steps.branch-exists.outputs.exists == 'true' uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 - - name: Generate README-PYPI.md - if: steps.branch-exists.outputs.exists == 'true' - working-directory: packages/azure - run: uv run python scripts/prepare_readme.py - - name: Align version using uv if: steps.branch-exists.outputs.exists == 'true' run: | diff --git a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml index 8902ccbe..a23105e8 100644 --- a/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml +++ b/.github/workflows/sdk_generation_mistralai_gcp_sdk.yaml @@ -103,11 +103,6 @@ jobs: if: steps.branch-exists.outputs.exists == 'true' uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6 - - name: Generate README-PYPI.md - if: steps.branch-exists.outputs.exists == 'true' - working-directory: packages/gcp - run: uv run python scripts/prepare_readme.py - - name: Align version using uv if: steps.branch-exists.outputs.exists == 'true' run: | diff --git a/packages/azure/.gitignore b/packages/azure/.gitignore index b386de74..a9654890 100644 --- a/packages/azure/.gitignore +++ b/packages/azure/.gitignore @@ -4,7 +4,6 @@ **/.speakeasy/temp/ **/.speakeasy/logs/ .speakeasy/reports -README-PYPI.md .venv/ venv/ src/*.egg-info/ diff --git a/packages/azure/README-PYPI.md b/packages/azure/README-PYPI.md new file mode 100644 index 00000000..7b71bce3 --- /dev/null +++ b/packages/azure/README-PYPI.md @@ -0,0 +1,464 @@ +# Mistral on Azure Python Client + +## SDK Installation + +PIP +```bash +pip install mistralai +``` + +UV +```bash +uv add mistralai +``` + +**Prerequisites** + +Before you begin, ensure you have `AZURE_ENDPOINT` and an `AZURE_API_KEY`. To obtain these, you will need to deploy Mistral on Azure AI. +See [instructions for deploying Mistral on Azure AI here](https://docs.mistral.ai/deployment/cloud/azure/). + + +## SDK Example Usage + +### Create Chat Completions + +This example shows how to create chat completions. + +The SDK automatically injects the `api-version` query parameter. + +```python +# Synchronous Example +from mistralai.azure.client import MistralAzure +import os + +AZURE_API_KEY = os.environ["AZURE_API_KEY"] +AZURE_ENDPOINT = os.environ["AZURE_ENDPOINT"] +AZURE_MODEL = os.environ["AZURE_MODEL"] +AZURE_API_VERSION = os.environ.get("AZURE_API_VERSION", "2024-05-01-preview") + +# The SDK automatically injects api-version as a query parameter +s = MistralAzure( + api_key=AZURE_API_KEY, + server_url=AZURE_ENDPOINT, + api_version=AZURE_API_VERSION, +) + +res = s.chat.complete( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=AZURE_MODEL, +) + +if res is not None: + # handle response + print(res.choices[0].message.content) +``` + +
+ +The same SDK client can also be used to make asynchronous requests by importing asyncio. +```python +# Asynchronous Example +import asyncio +import os +from mistralai.azure.client import MistralAzure + +AZURE_API_KEY = os.environ["AZURE_API_KEY"] +AZURE_ENDPOINT = os.environ["AZURE_ENDPOINT"] +AZURE_MODEL = os.environ["AZURE_MODEL"] +AZURE_API_VERSION = os.environ.get("AZURE_API_VERSION", "2024-05-01-preview") + +async def main(): + # The SDK automatically injects api-version as a query parameter + s = MistralAzure( + api_key=AZURE_API_KEY, + server_url=AZURE_ENDPOINT, + api_version=AZURE_API_VERSION, + ) + res = await s.chat.complete_async( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=AZURE_MODEL, + ) + if res is not None: + # handle response + print(res.choices[0].message.content) + +asyncio.run(main()) +``` + + + +## Available Resources and Operations + +### [chat](https://github.com/mistralai/client-python/blob/main/packages/azure/docs/sdks/chat/README.md) + +* [stream](https://github.com/mistralai/client-python/blob/main/packages/azure/docs/sdks/chat/README.md#stream) - Stream chat completion +* [complete](https://github.com/mistralai/client-python/blob/main/packages/azure/docs/sdks/chat/README.md#complete) - Chat Completion + + + +## Server-sent event streaming + +[Server-sent events][mdn-sse] are used to stream content from certain +operations. These operations will expose the stream as [Generator][generator] that +can be consumed using a simple `for` loop. The loop will +terminate when the server no longer has any events to send and closes the +underlying connection. + +```python +from mistralai.azure.client import MistralAzure +import os + +AZURE_API_KEY = os.environ["AZURE_API_KEY"] +AZURE_ENDPOINT = os.environ["AZURE_ENDPOINT"] +AZURE_MODEL = os.environ["AZURE_MODEL"] +AZURE_API_VERSION = os.environ.get("AZURE_API_VERSION", "2024-05-01-preview") + +# The SDK automatically injects api-version as a query parameter +s = MistralAzure( + api_key=AZURE_API_KEY, + server_url=AZURE_ENDPOINT, + api_version=AZURE_API_VERSION, +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=AZURE_MODEL, +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + +[mdn-sse]: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events +[generator]: https://wiki.python.org/moin/Generators + + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: +```python +from mistralai.azure.client import MistralAzure +from mistralai.azure.client.utils import BackoffStrategy, RetryConfig +import os + +AZURE_API_KEY = os.environ["AZURE_API_KEY"] +AZURE_ENDPOINT = os.environ["AZURE_ENDPOINT"] +AZURE_MODEL = os.environ["AZURE_MODEL"] +AZURE_API_VERSION = os.environ.get("AZURE_API_VERSION", "2024-05-01-preview") + +# The SDK automatically injects api-version as a query parameter +s = MistralAzure( + api_key=AZURE_API_KEY, + server_url=AZURE_ENDPOINT, + api_version=AZURE_API_VERSION, +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=AZURE_MODEL, + retries=RetryConfig( + "backoff", + BackoffStrategy(1, 50, 1.1, 100), + False + ), +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: +```python +from mistralai.azure.client import MistralAzure +from mistralai.azure.client.utils import BackoffStrategy, RetryConfig +import os + +AZURE_API_KEY = os.environ["AZURE_API_KEY"] +AZURE_ENDPOINT = os.environ["AZURE_ENDPOINT"] +AZURE_MODEL = os.environ["AZURE_MODEL"] +AZURE_API_VERSION = os.environ["AZURE_API_VERSION"] + +# The SDK automatically injects api-version as a query parameter +s = MistralAzure( + api_key=AZURE_API_KEY, + server_url=AZURE_ENDPOINT, + api_version=AZURE_API_VERSION, + retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=AZURE_MODEL, +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. + +| Error Object | Status Code | Content Type | +| -------------------------- | ----------- | ---------------- | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4xx-5xx | */* | + +### Example + +```python +from mistralai.azure.client import MistralAzure +from mistralai.azure.client import models +import os + +AZURE_API_KEY = os.environ["AZURE_API_KEY"] +AZURE_ENDPOINT = os.environ["AZURE_ENDPOINT"] +AZURE_MODEL = os.environ["AZURE_MODEL"] +AZURE_API_VERSION = os.environ.get("AZURE_API_VERSION", "2024-05-01-preview") + +# The SDK automatically injects api-version as a query parameter +s = MistralAzure( + api_key=AZURE_API_KEY, + server_url=AZURE_ENDPOINT, + api_version=AZURE_API_VERSION, +) + +res = None +try: + res = s.chat.complete( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=AZURE_MODEL, + ) + +except models.HTTPValidationError as e: + # handle exception + raise(e) +except models.SDKError as e: + # handle exception + raise(e) + +if res is not None: + # handle response + pass + +``` + + + +## Server Selection + +### Override Server URL Per-Client + +For Azure, you must provide your Azure AI Foundry endpoint via `server_url`. The SDK automatically injects the `api-version` query parameter: +```python +from mistralai.azure.client import MistralAzure +import os + +s = MistralAzure( + api_key=os.environ["AZURE_API_KEY"], + server_url=os.environ["AZURE_ENDPOINT"], + api_version=os.environ.get("AZURE_API_VERSION", "2024-05-01-preview"), +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=os.environ["AZURE_MODEL"], +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + + + +## Custom HTTP Client + +The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. +This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. + +For example, you could specify a header for every request that this SDK makes as follows: +```python +from mistralai.azure.client import MistralAzure +import httpx +import os + +http_client = httpx.Client(headers={"x-custom-header": "someValue"}) +s = MistralAzure( + api_key=os.environ["AZURE_API_KEY"], + server_url=os.environ["AZURE_ENDPOINT"], + api_version=os.environ.get("AZURE_API_VERSION", "2024-05-01-preview"), + client=http_client, +) +``` + +or you could wrap the client with your own custom logic: +```python +from typing import Any, Optional, Union +from mistralai.azure.client import MistralAzure +from mistralai.azure.client.httpclient import AsyncHttpClient +import httpx + +class CustomClient(AsyncHttpClient): + client: AsyncHttpClient + + def __init__(self, client: AsyncHttpClient): + self.client = client + + async def send( + self, + request: httpx.Request, + *, + stream: bool = False, + auth: Union[ + httpx._types.AuthTypes, httpx._client.UseClientDefault, None + ] = httpx.USE_CLIENT_DEFAULT, + follow_redirects: Union[ + bool, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + ) -> httpx.Response: + request.headers["Client-Level-Header"] = "added by client" + + return await self.client.send( + request, stream=stream, auth=auth, follow_redirects=follow_redirects + ) + + def build_request( + self, + method: str, + url: httpx._types.URLTypes, + *, + content: Optional[httpx._types.RequestContent] = None, + data: Optional[httpx._types.RequestData] = None, + files: Optional[httpx._types.RequestFiles] = None, + json: Optional[Any] = None, + params: Optional[httpx._types.QueryParamTypes] = None, + headers: Optional[httpx._types.HeaderTypes] = None, + cookies: Optional[httpx._types.CookieTypes] = None, + timeout: Union[ + httpx._types.TimeoutTypes, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + extensions: Optional[httpx._types.RequestExtensions] = None, + ) -> httpx.Request: + return self.client.build_request( + method, + url, + content=content, + data=data, + files=files, + json=json, + params=params, + headers=headers, + cookies=cookies, + timeout=timeout, + extensions=extensions, + ) + +s = MistralAzure( + api_key="", + server_url="", + async_client=CustomClient(httpx.AsyncClient()), +) +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| --------- | ---- | ----------- | +| `api_key` | http | HTTP Bearer | + +To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. You must also provide `server_url` pointing to your Azure AI Foundry endpoint. The SDK automatically injects the `api-version` query parameter: +```python +from mistralai.azure.client import MistralAzure +import os + +s = MistralAzure( + api_key=os.environ["AZURE_API_KEY"], + server_url=os.environ["AZURE_ENDPOINT"], + api_version=os.environ.get("AZURE_API_VERSION", "2024-05-01-preview"), +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model=os.environ["AZURE_MODEL"], +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + + + + +# Development + +## Contributions + +While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. +We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release. diff --git a/packages/gcp/.gitignore b/packages/gcp/.gitignore index b386de74..a9654890 100644 --- a/packages/gcp/.gitignore +++ b/packages/gcp/.gitignore @@ -4,7 +4,6 @@ **/.speakeasy/temp/ **/.speakeasy/logs/ .speakeasy/reports -README-PYPI.md .venv/ venv/ src/*.egg-info/ diff --git a/packages/gcp/README-PYPI.md b/packages/gcp/README-PYPI.md new file mode 100644 index 00000000..28a873a0 --- /dev/null +++ b/packages/gcp/README-PYPI.md @@ -0,0 +1,428 @@ +# Mistral on GCP Python Client + + +**Prerequisites** + +Before you begin, you will need to create a Google Cloud project and enable the Mistral API. To do this, follow the instructions [here](https://docs.mistral.ai/deployment/cloud/vertex/). + +To run this locally you will also need to ensure you are authenticated with Google Cloud. You can do this by running + +```bash +gcloud auth application-default login +``` + +## SDK Installation + +Install the extras dependencies specific to Google Cloud: + +```bash +pip install mistralai[gcp] +``` + + +## SDK Example Usage + +### Create Chat Completions + +This example shows how to create chat completions. + +The SDK automatically: +- Detects credentials via `google.auth.default()` +- Auto-refreshes tokens when they expire +- Builds the Vertex AI URL from `project_id` and `region` + +```python +# Synchronous Example +import os +from mistralai.gcp.client import MistralGCP + +# The SDK auto-detects credentials and builds the Vertex AI URL +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected from credentials + region=os.environ.get("GCP_REGION", "us-central1"), +) + +res = s.chat.complete(messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, +], model="mistral-small-2503") + +if res is not None: + # handle response + print(res.choices[0].message.content) +``` + +
+ +The same SDK client can also be used to make asynchronous requests by importing asyncio. +```python +# Asynchronous Example +import asyncio +import os +from mistralai.gcp.client import MistralGCP + +async def main(): + # The SDK auto-detects credentials and builds the Vertex AI URL + s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected + region=os.environ.get("GCP_REGION", "us-central1"), + ) + res = await s.chat.complete_async(messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], model="mistral-small-2503") + if res is not None: + # handle response + print(res.choices[0].message.content) + +asyncio.run(main()) +``` + + + +## Available Resources and Operations + +### [chat](https://github.com/mistralai/client-python/blob/main/packages/gcp/docs/sdks/chat/README.md) + +* [stream](https://github.com/mistralai/client-python/blob/main/packages/gcp/docs/sdks/chat/README.md#stream) - Stream chat completion +* [complete](https://github.com/mistralai/client-python/blob/main/packages/gcp/docs/sdks/chat/README.md#complete) - Chat Completion + +### [fim](https://github.com/mistralai/client-python/blob/main/packages/gcp/docs/sdks/fim/README.md) + +* [stream](https://github.com/mistralai/client-python/blob/main/packages/gcp/docs/sdks/fim/README.md#stream) - Stream fim completion +* [complete](https://github.com/mistralai/client-python/blob/main/packages/gcp/docs/sdks/fim/README.md#complete) - Fim Completion + + + +## Server-sent event streaming + +[Server-sent events][mdn-sse] are used to stream content from certain +operations. These operations will expose the stream as [Generator][generator] that +can be consumed using a simple `for` loop. The loop will +terminate when the server no longer has any events to send and closes the +underlying connection. + +```python +import os +from mistralai.gcp.client import MistralGCP + +# The SDK auto-detects credentials and builds the Vertex AI URL +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected + region=os.environ.get("GCP_REGION", "us-central1"), +) + +res = s.chat.stream(messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, +], model="mistral-small-2503") + +if res is not None: + for event in res: + # handle event + print(event) + +``` + +[mdn-sse]: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events +[generator]: https://wiki.python.org/moin/Generators + + + +## Retries + +Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK. + +To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call: +```python +import os +from mistralai.gcp.client import MistralGCP +from mistralai.gcp.client.utils import BackoffStrategy, RetryConfig + +# The SDK auto-detects credentials and builds the Vertex AI URL +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected + region=os.environ.get("GCP_REGION", "us-central1"), +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model="mistral-small-2503", + retries=RetryConfig( + "backoff", + BackoffStrategy(1, 50, 1.1, 100), + False + ) +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + +If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK: +```python +import os +from mistralai.gcp.client import MistralGCP +from mistralai.gcp.client.utils import BackoffStrategy, RetryConfig + +# The SDK auto-detects credentials and builds the Vertex AI URL +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), + region=os.environ.get("GCP_REGION", "us-central1"), + retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model="mistral-small-2503", +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + + + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. + +| Error Object | Status Code | Content Type | +| -------------------------- | ----------- | ---------------- | +| models.HTTPValidationError | 422 | application/json | +| models.SDKError | 4xx-5xx | */* | + +### Example + +```python +import os +from mistralai.gcp.client import MistralGCP +from mistralai.gcp.client import models + +# The SDK auto-detects credentials and builds the Vertex AI URL +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), + region=os.environ.get("GCP_REGION", "us-central1"), +) + +res = None +try: + res = s.chat.complete( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model="mistral-small-2503", + ) + +except models.HTTPValidationError as e: + # handle exception + raise(e) +except models.SDKError as e: + # handle exception + raise(e) + +if res is not None: + # handle response + pass + +``` + + + +## Server Selection + +### Override Server URL Per-Client + +The SDK automatically constructs the Vertex AI endpoint from `project_id` and `region`: +```python +import os +from mistralai.gcp.client import MistralGCP + +# The SDK auto-detects credentials and builds the Vertex AI URL +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected + region=os.environ.get("GCP_REGION", "us-central1"), +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model="mistral-small-2503", +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + + + +## Custom HTTP Client + +The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance. +Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocols ensuring that the client has the necessary methods to make API calls. +This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly. + +For example, you could specify a header for every request that this SDK makes as follows: +```python +import os +from mistralai.gcp.client import MistralGCP +import httpx + +http_client = httpx.Client(headers={"x-custom-header": "someValue"}) +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), + region="us-central1", + client=http_client, +) +``` + +or you could wrap the client with your own custom logic: +```python +from typing import Any, Optional, Union +from mistralai.gcp.client import MistralGCP +from mistralai.gcp.client.httpclient import AsyncHttpClient +import httpx + +class CustomClient(AsyncHttpClient): + client: AsyncHttpClient + + def __init__(self, client: AsyncHttpClient): + self.client = client + + async def send( + self, + request: httpx.Request, + *, + stream: bool = False, + auth: Union[ + httpx._types.AuthTypes, httpx._client.UseClientDefault, None + ] = httpx.USE_CLIENT_DEFAULT, + follow_redirects: Union[ + bool, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + ) -> httpx.Response: + request.headers["Client-Level-Header"] = "added by client" + + return await self.client.send( + request, stream=stream, auth=auth, follow_redirects=follow_redirects + ) + + def build_request( + self, + method: str, + url: httpx._types.URLTypes, + *, + content: Optional[httpx._types.RequestContent] = None, + data: Optional[httpx._types.RequestData] = None, + files: Optional[httpx._types.RequestFiles] = None, + json: Optional[Any] = None, + params: Optional[httpx._types.QueryParamTypes] = None, + headers: Optional[httpx._types.HeaderTypes] = None, + cookies: Optional[httpx._types.CookieTypes] = None, + timeout: Union[ + httpx._types.TimeoutTypes, httpx._client.UseClientDefault + ] = httpx.USE_CLIENT_DEFAULT, + extensions: Optional[httpx._types.RequestExtensions] = None, + ) -> httpx.Request: + return self.client.build_request( + method, + url, + content=content, + data=data, + files=files, + json=json, + params=params, + headers=headers, + cookies=cookies, + timeout=timeout, + extensions=extensions, + ) + +s = MistralGCP( + project_id="", + region="us-central1", + async_client=CustomClient(httpx.AsyncClient()), +) +``` + + + +## Authentication + +### Per-Client Security Schemes + +This SDK supports the following security scheme globally: + +| Name | Type | Scheme | +| --------- | ---- | ----------- | +| `api_key` | http | HTTP Bearer | + +The SDK automatically handles GCP authentication via `google.auth.default()`. Tokens are auto-refreshed when they expire. For example: +```python +import os +from mistralai.gcp.client import MistralGCP + +# The SDK auto-detects credentials and builds the Vertex AI URL +s = MistralGCP( + project_id=os.environ.get("GCP_PROJECT_ID"), # Optional: auto-detected + region=os.environ.get("GCP_REGION", "us-central1"), +) + +res = s.chat.stream( + messages=[ + { + "role": "user", + "content": "Who is the best French painter? Answer in one short sentence.", + }, + ], + model="mistral-small-2503", +) + +if res is not None: + for event in res: + # handle event + print(event) + +``` + + + + +# Development + +## Contributions + +While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. +We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release. From f409a73f30911fa056e595fae3a6fcac14af58c1 Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Fri, 22 May 2026 15:12:47 +0200 Subject: [PATCH 77/82] chore: bump speakeasyVersion to 1.763.6 (#547) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Picks up two upstream Python generator fixes: - envVarPrefix fallback when SDK is constructed without security args (1.763.4 + 1.763.6) — Mistral() now correctly reads MISTRAL_API_KEY from the environment when no api_key argument is passed, matching the standard pattern used by OpenAI, Anthropic, Cohere, etc. - Types package support exports preserved correctly - General multi-SDK fixes for async declarations, doc rendering, exports Validated locally with speakeasy run -t mistralai-sdk: regen is clean and the generated src/mistralai/client/sdk.py contains the security fallback patch. Confirmed Mistral() + MISTRAL_API_KEY env var correctly resolves the api_key via get_security_from_env. --- .speakeasy/workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index f592ebe8..d7039dba 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,5 +1,5 @@ workflowVersion: 1.0.0 -speakeasyVersion: 1.763.2 +speakeasyVersion: 1.763.6 sources: mistral-azure-source: inputs: From 79e10e10f1e07f02663f4286b83b7390cf0834b6 Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Fri, 22 May 2026 17:21:30 +0200 Subject: [PATCH 78/82] ci: rename publish env from public-sdk to publish (#551) Aligns the python publish workflow with the env name used by all other workflows. The public-sdk environment no longer exists on the repo (removed when renaming to publish), so the publish workflow currently references a non-existent environment. --- .github/workflows/sdk_publish_mistralai_sdk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sdk_publish_mistralai_sdk.yaml b/.github/workflows/sdk_publish_mistralai_sdk.yaml index e6bc350d..7ef2419d 100644 --- a/.github/workflows/sdk_publish_mistralai_sdk.yaml +++ b/.github/workflows/sdk_publish_mistralai_sdk.yaml @@ -23,7 +23,7 @@ jobs: (github.event_name == 'workflow_dispatch' && github.event.inputs.confirm_publish == 'publish') runs-on: ubuntu-24.04 environment: - name: public-sdk + name: publish steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 From 6fc2ef080418dc49a9d4113e451c923fb1f69960 Mon Sep 17 00:00:00 2001 From: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com> Date: Fri, 22 May 2026 18:03:34 +0200 Subject: [PATCH 79/82] ci: narrow publish trigger to root RELEASES.md only (#552) The publish workflow builds a single bundled mistralai wheel from root pyproject.toml that includes the sub-packages as source. Only the root RELEASES.md changing reflects a new release. Sub-package RELEASES.md changes (packages/azure, packages/gcp) shouldn't trigger publish runs since they don't produce a new wheel. --- .github/workflows/sdk_publish_mistralai_sdk.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sdk_publish_mistralai_sdk.yaml b/.github/workflows/sdk_publish_mistralai_sdk.yaml index 7ef2419d..f845e8b1 100644 --- a/.github/workflows/sdk_publish_mistralai_sdk.yaml +++ b/.github/workflows/sdk_publish_mistralai_sdk.yaml @@ -13,7 +13,7 @@ permissions: branches: - main paths: - - "**/RELEASES.md" + - RELEASES.md jobs: publish: name: Publish Python SDKs to PyPI From 66b29450418a8e7b0ec71363f8ffaef3c378e8f6 Mon Sep 17 00:00:00 2001 From: maiengineering Date: Fri, 22 May 2026 18:06:49 +0200 Subject: [PATCH 80/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRAL-PYTHON-SDK-GOOGLE-CLOUD=20MISTRALAI-GCP-S?= =?UTF-8?q?DK=20[speakeasy/mistralai-gcp-sdk-26292830187-1]=202.1.0=20(#54?= =?UTF-8?q?8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.763.6 * chore: align pyproject.toml and uv.lock to version 2.1.0 * fix(tests): top_p, stop, presence_penalty, frequency_penalty default to UNSET The regenerated SDK uses the UNSET sentinel instead of None as the default value for these parameters in the GCP chat client. Update the parity tests to match. * fix(tests): Fim top_p and stop default to UNSET The regenerated SDK uses UNSET for these parameters on Fim too. * fix(tests): Fim top_p default test asserts UNSET The regenerated SDK uses UNSET for Fim.complete/stream top_p, not 1. --------- Co-authored-by: speakeasybot --- .speakeasy/workflow.lock | 16 +- packages/gcp/.speakeasy/gen.lock | 420 ++++++++++++------ packages/gcp/.speakeasy/gen.yaml | 2 +- packages/gcp/RELEASES.md | 12 +- packages/gcp/docs/models/apikeyauth.md | 9 + packages/gcp/docs/models/authorization.md | 17 + packages/gcp/docs/models/builtinconnectors.md | 19 +- .../gcp/docs/models/chatcompletionchoice.md | 3 +- .../chatcompletionchoicefinishreason.md | 23 +- .../gcp/docs/models/chatcompletionrequest.md | 16 +- .../docs/models/chatcompletionrequesttool.md | 47 ++ .../models/chatcompletionstreamrequest.md | 16 +- .../models/chatcompletionstreamrequesttool.md | 47 ++ .../gcp/docs/models/codeinterpretertool.md | 9 + ...pletionresponsestreamchoicefinishreason.md | 21 +- packages/gcp/docs/models/customconnector.md | 11 + packages/gcp/docs/models/deltamessage.md | 13 +- .../gcp/docs/models/documentlibrarytool.md | 10 + .../gcp/docs/models/fimcompletionrequest.md | 4 +- .../docs/models/fimcompletionstreamrequest.md | 4 +- packages/gcp/docs/models/guardrailconfig.md | 10 + packages/gcp/docs/models/imagedetail.md | 19 +- .../gcp/docs/models/imagegenerationtool.md | 9 + packages/gcp/docs/models/imageurlchunk.md | 2 +- packages/gcp/docs/models/mistralpromptmode.md | 15 +- .../gcp/docs/models/moderationllmaction.md | 14 + .../moderationllmv1categorythresholds.md | 16 + .../gcp/docs/models/moderationllmv1config.md | 11 + .../moderationllmv2categorythresholds.md | 18 + .../gcp/docs/models/moderationllmv2config.md | 11 + packages/gcp/docs/models/oauth2tokenauth.md | 9 + packages/gcp/docs/models/reasoningeffort.md | 14 + packages/gcp/docs/models/referencechunk.md | 8 +- packages/gcp/docs/models/referenceid.md | 17 + packages/gcp/docs/models/responseformats.md | 15 +- packages/gcp/docs/models/thinkchunk.md | 1 + packages/gcp/docs/models/tool.md | 8 +- packages/gcp/docs/models/toolcall.md | 12 +- packages/gcp/docs/models/toolchoice.md | 2 +- packages/gcp/docs/models/toolchoiceenum.md | 17 +- packages/gcp/docs/models/toolconfiguration.md | 10 + .../gcp/docs/models/toolreferencechunk.md | 16 +- ...toolunion.md => toolreferencechunktool.md} | 2 +- packages/gcp/docs/models/tooltypes.md | 8 - .../gcp/docs/models/websearchpremiumtool.md | 9 + packages/gcp/docs/models/websearchtool.md | 9 + packages/gcp/pyproject.toml | 2 +- .../gcp/src/mistralai/gcp/client/_version.py | 6 +- .../gcp/src/mistralai/gcp/client/basesdk.py | 86 ++-- packages/gcp/src/mistralai/gcp/client/chat.py | 136 ++++-- packages/gcp/src/mistralai/gcp/client/fim.py | 44 +- .../mistralai/gcp/client/models/__init__.py | 138 +++++- .../mistralai/gcp/client/models/apikeyauth.py | 29 ++ .../gcp/client/models/assistantmessage.py | 2 +- .../gcp/client/models/chatcompletionchoice.py | 33 +- .../client/models/chatcompletionrequest.py | 69 ++- .../models/chatcompletionstreamrequest.py | 69 ++- .../gcp/client/models/codeinterpretertool.py | 65 +++ .../gcp/client/models/completionchunk.py | 2 +- .../models/completionresponsestreamchoice.py | 2 +- .../gcp/client/models/customconnector.py | 80 ++++ .../gcp/client/models/deltamessage.py | 23 +- .../gcp/client/models/documentlibrarytool.py | 70 +++ .../gcp/client/models/fimcompletionrequest.py | 12 +- .../models/fimcompletionstreamrequest.py | 12 +- .../mistralai/gcp/client/models/function.py | 2 +- .../gcp/client/models/guardrailconfig.py | 58 +++ .../gcp/client/models/imagegenerationtool.py | 65 +++ .../mistralai/gcp/client/models/imageurl.py | 2 +- .../gcp/client/models/imageurlchunk.py | 4 +- .../mistralai/gcp/client/models/jsonschema.py | 2 +- .../gcp/client/models/moderationllmaction.py | 10 + .../moderationllmv1categorythresholds.py | 93 ++++ .../client/models/moderationllmv1config.py | 75 ++++ .../moderationllmv2categorythresholds.py | 103 +++++ .../client/models/moderationllmv2config.py | 75 ++++ .../gcp/client/models/oauth2tokenauth.py | 31 ++ .../mistralai/gcp/client/models/prediction.py | 2 +- .../gcp/client/models/reasoningeffort.py | 10 + .../gcp/client/models/referencechunk.py | 16 +- .../gcp/client/models/responseformat.py | 2 +- .../mistralai/gcp/client/models/thinkchunk.py | 28 +- .../src/mistralai/gcp/client/models/tool.py | 39 +- .../mistralai/gcp/client/models/toolcall.py | 7 +- .../mistralai/gcp/client/models/toolchoice.py | 7 +- .../gcp/client/models/toolconfiguration.py | 52 +++ .../gcp/client/models/toolmessage.py | 2 +- .../gcp/client/models/toolreferencechunk.py | 14 +- .../mistralai/gcp/client/models/tooltypes.py | 8 - .../mistralai/gcp/client/models/usageinfo.py | 4 +- .../gcp/client/models/usermessage.py | 2 +- .../gcp/client/models/validationerror.py | 2 +- .../gcp/client/models/websearchpremiumtool.py | 65 +++ .../gcp/client/models/websearchtool.py | 62 +++ .../gcp/client/utils/eventstreaming.py | 41 +- .../mistralai/gcp/client/utils/metadata.py | 1 + .../mistralai/gcp/client/utils/security.py | 32 +- .../mistralai/gcp/client/utils/serializers.py | 12 +- packages/gcp/uv.lock | 6 +- tests/test_gcp_v2_parity.py | 20 +- 100 files changed, 2346 insertions(+), 489 deletions(-) create mode 100644 packages/gcp/docs/models/apikeyauth.md create mode 100644 packages/gcp/docs/models/authorization.md create mode 100644 packages/gcp/docs/models/chatcompletionrequesttool.md create mode 100644 packages/gcp/docs/models/chatcompletionstreamrequesttool.md create mode 100644 packages/gcp/docs/models/codeinterpretertool.md create mode 100644 packages/gcp/docs/models/customconnector.md create mode 100644 packages/gcp/docs/models/documentlibrarytool.md create mode 100644 packages/gcp/docs/models/guardrailconfig.md create mode 100644 packages/gcp/docs/models/imagegenerationtool.md create mode 100644 packages/gcp/docs/models/moderationllmaction.md create mode 100644 packages/gcp/docs/models/moderationllmv1categorythresholds.md create mode 100644 packages/gcp/docs/models/moderationllmv1config.md create mode 100644 packages/gcp/docs/models/moderationllmv2categorythresholds.md create mode 100644 packages/gcp/docs/models/moderationllmv2config.md create mode 100644 packages/gcp/docs/models/oauth2tokenauth.md create mode 100644 packages/gcp/docs/models/reasoningeffort.md create mode 100644 packages/gcp/docs/models/referenceid.md create mode 100644 packages/gcp/docs/models/toolconfiguration.md rename packages/gcp/docs/models/{toolunion.md => toolreferencechunktool.md} (87%) delete mode 100644 packages/gcp/docs/models/tooltypes.md create mode 100644 packages/gcp/docs/models/websearchpremiumtool.md create mode 100644 packages/gcp/docs/models/websearchtool.md create mode 100644 packages/gcp/src/mistralai/gcp/client/models/apikeyauth.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/codeinterpretertool.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/customconnector.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/documentlibrarytool.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/guardrailconfig.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/imagegenerationtool.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/moderationllmaction.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/moderationllmv1categorythresholds.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/moderationllmv1config.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/moderationllmv2categorythresholds.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/moderationllmv2config.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/oauth2tokenauth.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/toolconfiguration.py delete mode 100644 packages/gcp/src/mistralai/gcp/client/models/tooltypes.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/websearchpremiumtool.py create mode 100644 packages/gcp/src/mistralai/gcp/client/models/websearchtool.py diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index aa443ef1..baa46296 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.761.1 +speakeasyVersion: 1.763.6 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure @@ -9,11 +9,11 @@ sources: - speakeasy-sdk-regen-1773084953 mistral-google-cloud-source: sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:b2406e82ec4ce411afc0c307d5a037c7737388bcc696bbb41884fe54e22831c9 - sourceBlobDigest: sha256:795c0e010501e770b07cd28f1d0253cdb8f1419381e828b26575fdf149c022da + sourceRevisionDigest: sha256:34edde5edcaf43acc036c9635cf4c60ce4e86f49b3fa2bed8960b995454e8d7c + sourceBlobDigest: sha256:4e9e44f332073700612c1311c0d844241cc4b206140b82d5951879e1efdb0f2d tags: - latest - - speakeasy-sdk-regen-1773084660 + - speakeasy-mistralai-gcp-sdk-26292830187-1 mistral-openapi: sourceNamespace: mistral-openapi sourceRevisionDigest: sha256:6b325264f8e8a60caa875776438b07d4eb5b56283da0796b283e9c5597810e22 @@ -31,10 +31,10 @@ targets: mistralai-gcp-sdk: source: mistral-google-cloud-source sourceNamespace: mistral-openapi-google-cloud - sourceRevisionDigest: sha256:b2406e82ec4ce411afc0c307d5a037c7737388bcc696bbb41884fe54e22831c9 - sourceBlobDigest: sha256:795c0e010501e770b07cd28f1d0253cdb8f1419381e828b26575fdf149c022da + sourceRevisionDigest: sha256:34edde5edcaf43acc036c9635cf4c60ce4e86f49b3fa2bed8960b995454e8d7c + sourceBlobDigest: sha256:4e9e44f332073700612c1311c0d844241cc4b206140b82d5951879e1efdb0f2d codeSamplesNamespace: mistral-openapi-google-cloud-code-samples - codeSamplesRevisionDigest: sha256:c5a968a0454378d7f03ace500b309c0c709ea0b88d79700091d9ca7ea82c55a2 + codeSamplesRevisionDigest: sha256:5da37f5c1b536a390868432838e6bcb81db4a4701a44b28f19c6ebb64c3c499f mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi @@ -44,7 +44,7 @@ targets: codeSamplesRevisionDigest: sha256:95c443855a95966259bd108beec0cbdb8238f6f753dc4b021bf833d398e86c0c workflow: workflowVersion: 1.0.0 - speakeasyVersion: 1.761.1 + speakeasyVersion: 1.763.6 sources: mistral-azure-source: inputs: diff --git a/packages/gcp/.speakeasy/gen.lock b/packages/gcp/.speakeasy/gen.lock index 08289d3a..eb166f15 100644 --- a/packages/gcp/.speakeasy/gen.lock +++ b/packages/gcp/.speakeasy/gen.lock @@ -1,48 +1,49 @@ lockVersion: 2.0.0 id: ec60f2d8-7869-45c1-918e-773d41a8cf74 management: - docChecksum: 6f32cd54fc5f3d2a609ff3933cbf34b8 + docChecksum: 77634408b308396940276ab2a5724949 docVersion: 1.0.0 - speakeasyVersion: 1.729.0 - generationVersion: 2.841.0 - releaseVersion: 2.0.0 - configChecksum: d208fbfc438189901f0d6546484d5f26 + speakeasyVersion: 1.763.6 + generationVersion: 2.884.13 + releaseVersion: 2.1.0 + configChecksum: f42a555f90ecca4a17e379c855efcb4b repoURL: https://github.com/mistralai/client-python.git repoSubDirectory: packages/gcp installationURL: https://github.com/mistralai/client-python.git#subdirectory=packages/gcp published: true persistentEdits: - generation_id: 4c7dd269-a55c-4b55-a90a-e8fec97c6b98 - pristine_commit_hash: 81f2700802a475a353aad9d56a4a9845f061ce74 - pristine_tree_hash: 0984d2a0c850ed3ed1b0ca1e96672c03a46be7d5 + generation_id: d5b7efd4-ee87-4b61-ac4b-42d3fa6730b5 + pristine_commit_hash: 67ca27bd960456dc9531c66d0fb44f21c723b80e + pristine_tree_hash: dc9cd254e0158ad038f5096a54e2c0a6131da35b features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.12 + core: 6.0.22 defaultEnabledRetries: 0.2.0 - enumUnions: 0.1.0 - envVarSecurityUsage: 0.3.2 - examples: 3.0.2 + enumUnions: 0.1.1 + envVarSecurityUsage: 0.3.3 + examples: 3.0.4 flatRequests: 1.0.1 - globalSecurity: 3.0.5 + globalSecurity: 3.0.7 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.2.0 + globalServerURLs: 3.2.1 includes: 3.0.0 methodArguments: 1.0.2 nameOverrides: 3.0.3 nullables: 1.0.2 openEnums: 1.0.4 + operationTimeout: 0.3.1 responseFormat: 1.1.0 - retries: 3.0.4 + retries: 3.0.5 sdkHooks: 1.2.1 - serverEvents: 1.0.13 + serverEvents: 1.0.15 serverEventsSentinels: 0.1.0 serverIDs: 3.0.0 - unions: 3.1.4 + unions: 3.1.5 trackedFiles: .gitattributes: id: 24139dae6567 @@ -56,6 +57,10 @@ trackedFiles: id: 7fe2e5327e07 last_write_checksum: sha1:277a46811144643262651853dc6176d21b33573e pristine_git_object: 712a148c3e2305dca4c702851865f9f8c8e674cc + docs/models/apikeyauth.md: + id: 529789e1b079 + last_write_checksum: sha1:edb801076d411a5d6c1f7a3f4fdb4c3612b12ab1 + pristine_git_object: 1fbff10e21eb51df061790f0215cb4916318ebc1 docs/models/arguments.md: id: 7ea5e33709a7 last_write_checksum: sha1:09eea126210d7fd0353e60a76bf1dbed173f13ec @@ -68,22 +73,26 @@ trackedFiles: id: 9f1795bbe642 last_write_checksum: sha1:1ce4066623a8d62d969e5ed3a088d73a9ba26643 pristine_git_object: 047b7cf95f4db203bf2c501680b73ca0562a122d + docs/models/authorization.md: + id: dec4d9809e25 + last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e + pristine_git_object: 11ea5c6a700e7b92f5cbd29e88e41b834f8b8ef4 docs/models/builtinconnectors.md: id: 9d14e972f08a - last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c - pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 + last_write_checksum: sha1:83b573a69c86ab00e8660c7b6c02c14fdb8e1459 + pristine_git_object: ad9b9823d7e76bb827524701e9995a40dfa83147 docs/models/chatcompletionchoice.md: id: 0d15c59ab501 - last_write_checksum: sha1:a6274a39a4239e054816d08517bf8507cb5c4564 - pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 + last_write_checksum: sha1:f3c9fa3cc092674a36bf28552b6900d62871b789 + pristine_git_object: 79d24a335c7ca1acb1469213d60ced2ec4987461 docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 - last_write_checksum: sha1:b894d3408cb801e072c3c302a5676ff939d59284 - pristine_git_object: b2f15ecbe88328de95b4961ddb3940fd8a6ee64b + last_write_checksum: sha1:9a0715ecc16437ce4411743e852d8438a313cd41 + pristine_git_object: 53290d8eab975e171c02064fc34097f598633e17 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:6374e05aeb66d48137d657acaa89527df2db35c6 - pristine_git_object: 8dbd4a82ad1d7725b9a6ce56daea208ca01b9210 + last_write_checksum: sha1:195c1c434fefe7a6d684622bdd55acc716bef7b5 + pristine_git_object: db61b5c0deafb18c5133e07b9ba69d2b1e8adfe1 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -92,6 +101,10 @@ trackedFiles: id: fcaf5bbea451 last_write_checksum: sha1:71a25f84f0d88c7acf72e801ced6159546201851 pristine_git_object: 749296d420c0671d2a1d6d22483b51f577a86485 + docs/models/chatcompletionrequesttool.md: + id: 01554a1b158a + last_write_checksum: sha1:e7259e65ba3c614e5e70d0d55c88db03e90097d0 + pristine_git_object: 572d12ca006caead244387a5e91000ac33b0aa0e docs/models/chatcompletionrequesttoolchoice.md: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 @@ -102,8 +115,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:e23cf88a5a9b0c99e68d06a8450b8bfb9aee33a2 - pristine_git_object: db76b6c81a71607f94c212a542fe30e082053a90 + last_write_checksum: sha1:3901c8c3e8b2cba3d2510f61e18f47edfda86f7e + pristine_git_object: bd19d37b64d30b110596e438c425c36372faf6e9 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -112,10 +125,18 @@ trackedFiles: id: d0e89a4dca78 last_write_checksum: sha1:a889e9580fa94bda7c848682d6ba501b7f5c0f41 pristine_git_object: a48460a92ac47fec1de2188ba46b238229736d32 + docs/models/chatcompletionstreamrequesttool.md: + id: cbfb16fb3b03 + last_write_checksum: sha1:163ad1e31d7ba4eaef7797b399d1323465e97110 + pristine_git_object: 48998fcbb16a8ce5f5a4fd8b2794125d97e935ac docs/models/chatcompletionstreamrequesttoolchoice.md: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 pristine_git_object: 43f3ca3809bf1a2a040e2ad7c19a2b22db0b73f8 + docs/models/codeinterpretertool.md: + id: f009740c6e54 + last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad + pristine_git_object: 6302fc627d7c49442b6c9aec19c70fdceaf7c519 docs/models/completionchunk.md: id: 60cb30423c60 last_write_checksum: sha1:61b976fe2e71236cf7941ee1635decc31bd304b2 @@ -130,8 +151,8 @@ trackedFiles: pristine_git_object: 1532c25b8fc065d486f52d4610a7f757e5340875 docs/models/completionresponsestreamchoicefinishreason.md: id: 5f1fbfc90b8e - last_write_checksum: sha1:20824b4a223cbd3658b32440973a7d47dcd108b9 - pristine_git_object: 0fece473297227c75db4e7ded63417a2f117cac0 + last_write_checksum: sha1:0d6278fdfec974d1e8782c5bfca0fad5300a2125 + pristine_git_object: 7b37dc06c1d30d19ae969fde2170d0cc3ad052ef docs/models/contentchunk.md: id: d2d3a32080cd last_write_checksum: sha1:5839a26cdc412b78caad7fb59df97bdcea57be6d @@ -140,18 +161,26 @@ trackedFiles: id: e8f2f9e54b8e last_write_checksum: sha1:4c14b386f9f89d98f4dd9487ab030f10478c0e63 pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 + docs/models/customconnector.md: + id: 7bcc77607afa + last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a + pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 docs/models/deltamessage.md: id: 6c5ed6b60968 - last_write_checksum: sha1:00052476b9b2474dbc149f18dd18c71c86d0fc74 - pristine_git_object: e0ee575f3fce7c312114ce8c5390efc5c4854952 + last_write_checksum: sha1:c49575abe1bb581db1ae497b7a3b1ff2820abfbc + pristine_git_object: c2395e1bb06f983a2f56ab5900f126ed99ae9c11 docs/models/deltamessagecontent.md: id: 7307bedc8733 last_write_checksum: sha1:a1211b8cb576ad1358e68983680ee326c3920a5e pristine_git_object: 8142772d7ea33ad8a75cf9cf822564ba3f630de2 + docs/models/documentlibrarytool.md: + id: 68083b0ef8f3 + last_write_checksum: sha1:76b9f47c399915a338abe929cb10c1b37282eadf + pristine_git_object: 95c3fa52ee3ff29e72bc0240a98c0afaa0cd5f62 docs/models/fimcompletionrequest.md: id: b44677ecc293 - last_write_checksum: sha1:24bcb54d39b3fabd487549a27b4c0a65dd5ffe50 - pristine_git_object: fde0b625c29340e8dce1eb3026ce644b1885e53a + last_write_checksum: sha1:87a83a59fb3772ca6c7e60bcef27ca15f349ce46 + pristine_git_object: c0c52b6634c0a12b7e52686875805164d99b4c64 docs/models/fimcompletionrequeststop.md: id: ea5475297a83 last_write_checksum: sha1:a6cdb4bda01ac58016a71f35da48a5d10df11623 @@ -162,8 +191,8 @@ trackedFiles: pristine_git_object: cd62d0349503fd8b13582d0ba47ab9cff40f6b28 docs/models/fimcompletionstreamrequest.md: id: c881d7e27637 - last_write_checksum: sha1:f8755bc554dd44568c42eb5b6dde04db464647ab - pristine_git_object: ba62d854f030390418597cbd8febae0e1ce27ea8 + last_write_checksum: sha1:3574398ad561e06a8c2c95ffcb1456fe62cf7320 + pristine_git_object: c02b622c7e4113d7ca99ede3d735f17dc2ab26e7 docs/models/fimcompletionstreamrequeststop.md: id: c97a11b764e9 last_write_checksum: sha1:958d5087050fdeb128745884ebcf565b4fdc3886 @@ -180,18 +209,26 @@ trackedFiles: id: 4b3bd62c0f26 last_write_checksum: sha1:754fe32bdffe53c1057b302702f5516f4e551cfb pristine_git_object: 87d7b4852de629015166605b273deb9341202dc0 + docs/models/guardrailconfig.md: + id: f60bf2eefb45 + last_write_checksum: sha1:e8dd384d2fd18d731753ba8d45a2975379c97052 + pristine_git_object: 1276462cc43fbd940f12282b1dca05e6fc7a16f9 docs/models/imagedetail.md: id: f8217529b496 - last_write_checksum: sha1:fdf19ac9459f64616240955cb81a84ef03e775c8 - pristine_git_object: 1e5ba3fd405a14e5e2872cc85504584dca19b726 + last_write_checksum: sha1:165fedf9506a2cef070fd6d910beef431dd2f32d + pristine_git_object: 15cc63e77da0ae4fa6926b8045f58678dff91265 + docs/models/imagegenerationtool.md: + id: d5deb6b06d28 + last_write_checksum: sha1:a1813ef99e4a0990fd073bb2311c475e88072029 + pristine_git_object: b476b6f2733a49767d7f7a4ad091fc321ab514f4 docs/models/imageurl.md: id: e75dd23cec1d last_write_checksum: sha1:a5cf621ce58a9cc7c96afa7de53367eac7b4cb0b pristine_git_object: 6358e0acb2dea4816203413842243704ca955783 docs/models/imageurlchunk.md: id: 4407097bfff3 - last_write_checksum: sha1:30b72826963e22cadf76ac0b7604288dbc4fb943 - pristine_git_object: a84dac32b99390e3fd0559714ca43795742192c6 + last_write_checksum: sha1:705bdd81424cc35eeba9f280dda5124d8091d1af + pristine_git_object: 73e1ed5a07333e86310575a80a7baa61dadd61bf docs/models/imageurlunion.md: id: 9d3c691a9db0 last_write_checksum: sha1:4e32bcd7d44746d2ddbfafbef96152bb2bdb2a15 @@ -206,24 +243,56 @@ trackedFiles: pristine_git_object: d6094ac2c6e0326c039dad2f6b89158694ef6aa7 docs/models/mistralpromptmode.md: id: d17d5db4d3b6 - last_write_checksum: sha1:abcb7205c5086169c7d9449d15ac142448a7d258 - pristine_git_object: c3409d03b9646e21a3793372d06dcae6fef95463 + last_write_checksum: sha1:d6b2f03f1d6999a77991735ef1f86ff6cf3f7bd0 + pristine_git_object: 921f81a4379b6a20fab6e97a942023f27ff2eff1 + docs/models/moderationllmaction.md: + id: 26373b4ad9cd + last_write_checksum: sha1:8687fc217e476dab04380a72720a546d1ba94c67 + pristine_git_object: e0077a32956f08393fc440364384f580317625cc + docs/models/moderationllmv1categorythresholds.md: + id: b474ca28a6e7 + last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 + pristine_git_object: 90ae213feda5e63ad71fbd7bb0bfb07ee7b1e2c1 + docs/models/moderationllmv1config.md: + id: e39a45c3e458 + last_write_checksum: sha1:63b7677d0b488d44312417d9335abd595f9b6fa9 + pristine_git_object: bdb5812b87a69af904eb9cdc0fffff6e73d96cd3 + docs/models/moderationllmv2categorythresholds.md: + id: 401d3285071c + last_write_checksum: sha1:6fbfadaba4db8bed9fc7d38ad77cd47a089dd5f0 + pristine_git_object: e95b81b0315cf77724d027dbf8ff0f524ad1d068 + docs/models/moderationllmv2config.md: + id: 64c1e213e7cc + last_write_checksum: sha1:851923395e5a4097b82d184e070a85bf648a9e8c + pristine_git_object: e928506c8d210b865e8aee9739a35433ca136872 + docs/models/oauth2tokenauth.md: + id: f23959dcc4b0 + last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 + pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 docs/models/prediction.md: id: 3c70b2262201 last_write_checksum: sha1:ca8a77219e6113f2358a5363e935288d90df0725 pristine_git_object: fae3c1ca4ba2c2ddb3b7de401ecdc8d56dcc7740 + docs/models/reasoningeffort.md: + id: c8fd630d3f07 + last_write_checksum: sha1:b0933ea955ebeacb7fcbdf59be935216d2ab999b + pristine_git_object: 87e0ae7696172b508326028224b10de557057ad7 docs/models/referencechunk.md: id: 07895f9debfd - last_write_checksum: sha1:4384049375a2566c7567599f97ce1ec19e9f6276 - pristine_git_object: d847e24845a399c7ca93d54701832fb65e01b3ab + last_write_checksum: sha1:3d35227a4f7612301fd5f17a445c4c2b712f0bf1 + pristine_git_object: 0186d3c358e27d01617c982f61db0910039a049a + docs/models/referenceid.md: + id: 22fa492a467e + last_write_checksum: sha1:80161796acbc185876a3656ee8cbdde4df7e23d0 + pristine_git_object: 1d29397fd96b42b7dc33bd10184bef55de5ae066 docs/models/responseformat.md: id: 50a1e4140614 last_write_checksum: sha1:e877b2e81470ef5eec5675dfb91a47e74d5d3add pristine_git_object: 5cab22f2bf1c412699f6a7ed18ef801ecbc3ee4b docs/models/responseformats.md: id: cf1f250b82db - last_write_checksum: sha1:105e1f9181913104b554051838cbdd0f728aa2c4 - pristine_git_object: 2f5f1e5511b048323fee18a0ffdd506fe2b3d56f + last_write_checksum: sha1:947c2b47f8a73e5c299585c1109bad626675112e + pristine_git_object: 5d9aeb3e9193e621df527095aedd26fbf5ec5096 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:ce2871b49c1632d50e22d0b1ebe4999021d52313 @@ -246,28 +315,32 @@ trackedFiles: pristine_git_object: b266619dcb57222ec343f373c43b2b5cef5b8b93 docs/models/thinkchunk.md: id: bca24d7153f6 - last_write_checksum: sha1:2b8ff7737fa7255673ca31da7cb2e6803fce9e02 - pristine_git_object: b07f598ebc5f0e9c041186c081dc98bc21104bdb + last_write_checksum: sha1:db29812dbc6f9be7a385322d25a5cd98bfb3ef1e + pristine_git_object: d825497ee09624b829965d2b5bea2ddc54a32608 docs/models/thinking.md: id: 07234f8dd364 last_write_checksum: sha1:90c0b34284137712678b0671e9f4bfb319548cbf pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/tool.md: id: 8966139dbeed - last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a - pristine_git_object: fb661f72887271d5bb470e4edf025a32b00ade17 + last_write_checksum: sha1:2ab2016846da06ab38751176ba80fb6527c2818b + pristine_git_object: 85888d01cf439be601c8d1df4048c90161cf47df docs/models/toolcall.md: id: 80892ea1a051 - last_write_checksum: sha1:cb27b9d36cfe6227978c7a7a01b1349b6bac99d9 - pristine_git_object: 3819236b9f3eee2f6878818cfbbe2817e97f7de2 + last_write_checksum: sha1:621dc83981e13cbcbc21f2e16a34178c322c4566 + pristine_git_object: 9d236e8b289977d2aa7bded0d633b224c5ec9e57 docs/models/toolchoice.md: id: "097076343426" - last_write_checksum: sha1:25b33b34da02c3b46349dc8b6223f9ae18370d16 - pristine_git_object: 373046bbbc834169293b4f4ae8b2e238f952ddde + last_write_checksum: sha1:65a2794a1102fdcba6fa5a3f497630fbaf98f94b + pristine_git_object: a457f96f6e295d590a5ef75f83a5a6c4fdd41c47 docs/models/toolchoiceenum.md: id: 15410de51ffc - last_write_checksum: sha1:ca0cf9bf128bebc8faedd9333cc6a56b30f58130 - pristine_git_object: 0be3d6c54b13a8bf30773398a2c12e0d30d3ae58 + last_write_checksum: sha1:8b5e1a5e3df1e72baad48cd526299a31dc766e39 + pristine_git_object: c97bf91224c7bbb1e5f35d6d9da737313bfd1296 + docs/models/toolconfiguration.md: + id: 06bfa2c4e662 + last_write_checksum: sha1:9b619977375f228c76f09d48d6e2833add6c07e2 + pristine_git_object: 89286a172124ce3473bcb081de6e4db8c95afefa docs/models/toolmessage.md: id: 0553747c37a1 last_write_checksum: sha1:ac61e644ba7c6da607cb479eafd1db78d8e8012e @@ -278,16 +351,12 @@ trackedFiles: pristine_git_object: 5c76091fbd2c8e0d768921fab19c7b761df73411 docs/models/toolreferencechunk.md: id: 10414b39b7b3 - last_write_checksum: sha1:a0e93881de5ecaf765300d45a18ab21dcffe54f9 - pristine_git_object: 9fc10399fe4ce9eb3b5e87a6bc609643d6a2cb3a - docs/models/tooltypes.md: - id: adb50fe63ea2 - last_write_checksum: sha1:f224c3d8732450b9c969b3e04027b7df7892694c - pristine_git_object: 84e49253c9b9bd1bd314e2a126106404cbb52f16 - docs/models/toolunion.md: - id: ad708b0ce4e0 - last_write_checksum: sha1:61909a56240c784e05f13dff8d9787272e1aa8bc - pristine_git_object: 2dcb3deec9f05d1e578c485a47a8ddd10b375f48 + last_write_checksum: sha1:ea3bdfc83177c6b7183ad51fddb2d15aee0f0729 + pristine_git_object: 49ea4ca7b05e5fcaaf914f781e3a28483199d82d + docs/models/toolreferencechunktool.md: + id: c2210d74792a + last_write_checksum: sha1:368add3ac6df876bc85bb4968de840ac578ae623 + pristine_git_object: 999f7c34885015a687c4213d067b144f1585c946 docs/models/usageinfo.md: id: ec6fe65028a9 last_write_checksum: sha1:cf71fb9676d870eba7c4d10a69636e1db4054adc @@ -308,6 +377,14 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a + docs/models/websearchpremiumtool.md: + id: 267988aa8c3f + last_write_checksum: sha1:38f80a43f73a13ddedc7730f853c092a48b665f9 + pristine_git_object: 78b736cd314617caa0d77f3c42015212e37ab539 + docs/models/websearchtool.md: + id: fc4df52fb9b5 + last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 + pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -316,10 +393,6 @@ trackedFiles: id: 7ce8b9f946e6 last_write_checksum: sha1:8f871a5aac4b10bff724c9d91b8d7496eb1fbdde pristine_git_object: 0391ac11bdc5526b697b69d047d568a611ce87d0 - scripts/prepare_readme.py: - id: e0c5957a6035 - last_write_checksum: sha1:eb988bc0e00ed4bb14e9a3572845af14f06c9b42 - pristine_git_object: ae27b555c05c3c9f35d84e8bbe6a7c9f80cf94b2 scripts/publish.sh: id: fe273b08f514 last_write_checksum: sha1:b290b25b36dca3d5eb1a2e66a2e1bcf2e7326cf3 @@ -342,16 +415,16 @@ trackedFiles: pristine_git_object: ea95bed210db9180824efddfb1b3e47f5bf96489 src/mistralai/gcp/client/_version.py: id: f87319e32c7b - last_write_checksum: sha1:2c22a5ebb7568968607db20612021af35240f714 - pristine_git_object: 377c9836b5f8bdf65e87ba375232422114af2966 + last_write_checksum: sha1:a8381a446688258017504fe271c6c05db83f5b6f + pristine_git_object: e6a19a24aeb633a7c6741fac4aa1cd935f6eff3d src/mistralai/gcp/client/basesdk.py: id: 4d594572857b - last_write_checksum: sha1:d8ef9e2f4fa97d402eb9f5472ceb80fb39693991 - pristine_git_object: b3edcb0aca1882d0cbe4d499cfba9cb5464c5b58 + last_write_checksum: sha1:09816f367408668addafe77aa5f69e6a089f8fca + pristine_git_object: 1c518adee8029a46ec5d6951cc6804465e1c3355 src/mistralai/gcp/client/chat.py: id: 4c41f05f786e - last_write_checksum: sha1:60b2697e2ecfb62eebed910007e62ab1df565eec - pristine_git_object: 925d69eda2fdac458045cc12327ca72997e07600 + last_write_checksum: sha1:ab6973161c8faa694e5132d7a8838d975ec23e55 + pristine_git_object: 8a9abf59a633510f6086a520e755debd40d9b641 src/mistralai/gcp/client/errors/__init__.py: id: c51c8ed21629 last_write_checksum: sha1:29f08ad600a712ff572843a250839ef92efac19b @@ -378,76 +451,92 @@ trackedFiles: pristine_git_object: 6980924626fa5fbf67fb62a30fd23d5883dbe650 src/mistralai/gcp/client/fim.py: id: 13d2d208e0ef - last_write_checksum: sha1:1027165887446ce0764ad542ca52f61b460c71b8 - pristine_git_object: 4202102ae5218784a10ee93ada5a0643d23a1d0c + last_write_checksum: sha1:cd7d11744022f12d4fa5889746f3861a563537b6 + pristine_git_object: cd5abaf8a8174536cca8ee3e5451fe6ce0379540 src/mistralai/gcp/client/httpclient.py: id: a53dd7be6a4c last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/mistralai/gcp/client/models/__init__.py: id: d9e976d01972 - last_write_checksum: sha1:9ba03a47ef26bb6d64366ec4a2b466a6d417aa82 - pristine_git_object: e42ed4bb30a39afd1d63dc2f9918e86981f2bf94 + last_write_checksum: sha1:f4b9b23318c8e44f32d4becc4ad1afd0faee3715 + pristine_git_object: f7a311a2f7cd41b491e0b5cd4203c711b31873f6 + src/mistralai/gcp/client/models/apikeyauth.py: + id: 6b9f6832e632 + last_write_checksum: sha1:6ec18425d5aa90f6c131763d39a8bf4d74944b7d + pristine_git_object: 99d2ad79e388b0b77baafd431c890e3b9cd1032e src/mistralai/gcp/client/models/assistantmessage.py: id: d39c4bdd289e - last_write_checksum: sha1:c813783bcbeec4e40f12e007d1dde4aed8ec71cf - pristine_git_object: 702ac4708abb95fc18d138500b8353715c2dbc98 + last_write_checksum: sha1:c4714e1d6eea548e68118c44a5fcac63548c7605 + pristine_git_object: 63f3b0dd9b7348e06c63d8ac2bdcc2d7faa59853 src/mistralai/gcp/client/models/builtinconnectors.py: id: 7bbec8f3c9c7 last_write_checksum: sha1:4e94744e3854d4cdc9d1272e4f1d9371f9829a5f pristine_git_object: 6a3b2476d54096722eb3e7a271629d108028bd35 src/mistralai/gcp/client/models/chatcompletionchoice.py: id: 8e65b56f3e6d - last_write_checksum: sha1:e6d1382e9f880b866130d900fd866997aaf80e45 - pristine_git_object: ae5a2fbf38afbd86233dcaa8aa1c8441f5ed9eba + last_write_checksum: sha1:022f638fc4c28e3983c804e4b24b7f7a9f6542ea + pristine_git_object: 89f4868b1262e1aac6d0898409b5d2e27ffc209a src/mistralai/gcp/client/models/chatcompletionrequest.py: id: 4694a31c0003 - last_write_checksum: sha1:80fcbbcde773c22c93cf2db63beef2cfe3777497 - pristine_git_object: 8229c5bb13ded84039f3d8ddb95ac0a9c184e1bd + last_write_checksum: sha1:298b0d06dec99a85d086b19314c3361622451bd0 + pristine_git_object: 0e3de41307489a6ee395c535ebbd42303c971c63 src/mistralai/gcp/client/models/chatcompletionresponse.py: id: dd9e4796fca9 last_write_checksum: sha1:76d7257583389ff5021e320a8f9a45a6deb07c7c pristine_git_object: 317c4d84e378c14294d58c5aefd8c55ffe28754a src/mistralai/gcp/client/models/chatcompletionstreamrequest.py: id: 7294862af8ea - last_write_checksum: sha1:899210f881bdbe0a0d94e29fe7044fabbccc578c - pristine_git_object: 3c228d2e7edf08c36f310e190a8dedc7b4958459 + last_write_checksum: sha1:6dbe04dd7c8b3f509e0ada777aac7e77c1ad4cb8 + pristine_git_object: 2adc781281387122f81527547624ac6a68a08787 + src/mistralai/gcp/client/models/codeinterpretertool.py: + id: dae8864ee549 + last_write_checksum: sha1:25508d287514c3b28f5902a84e09461e8eef595f + pristine_git_object: 9fdedce7f27cfe6fc8981cdb9fb6df8235c6da9c src/mistralai/gcp/client/models/completionchunk.py: id: 6b9ed8c30877 - last_write_checksum: sha1:f1f091e94e3c1c1aefd3c3bb60c8de8236ab0ead - pristine_git_object: a0b1ae2fa3109a2c2b76bbc483b691d88dc9a15c + last_write_checksum: sha1:c19d80a18060082a73b7e7fcc6af6fccac0cf5d6 + pristine_git_object: 3f8d8c6b62b4ba5d158e0243382110c39c1f3140 src/mistralai/gcp/client/models/completionevent.py: id: 3f55c4b8fc75 last_write_checksum: sha1:66665d921fd27df6ef0efce996a5446e49b989d8 pristine_git_object: bb1550093ce9adcb9bcd0548b69796e82f4f260b src/mistralai/gcp/client/models/completionresponsestreamchoice.py: id: ad9b98ca7e1c - last_write_checksum: sha1:c4f9d733461bdb9a0d6c96e82212de7dddc04ffe - pristine_git_object: e58d4c88009ed3696d2a3a57f3796d8fb067019d + last_write_checksum: sha1:03cf7a80e925662eff06a16e55206f0f1f9f09dd + pristine_git_object: 0f189b553a81308dca9e4a96831bbd4a8910962e src/mistralai/gcp/client/models/contentchunk.py: id: 8714d3bf2698 last_write_checksum: sha1:acab1b53b1d324544c6aa6c4126a3fb5265278d2 pristine_git_object: 18d481505e17d2125e380d796b0c406b0e66d601 + src/mistralai/gcp/client/models/customconnector.py: + id: a86074dd071e + last_write_checksum: sha1:52168a13fb6e6a4e1addd6b4efeb8448de2abbd3 + pristine_git_object: 3829972679bba9567d1277e3b6f64851d2d8f2a8 src/mistralai/gcp/client/models/deltamessage.py: id: 404fc85f1a4c - last_write_checksum: sha1:982c2d15a570c7f4d5e1c3b012db46ea3bac609b - pristine_git_object: 63e6a7f3e50c138f235f5a36277aa8668f85cef1 + last_write_checksum: sha1:7e043f7d5335255efbd80813e6cfdf44bf92bd4b + pristine_git_object: 1943aec72be09f7fafdf2e2976d4765962dbd897 + src/mistralai/gcp/client/models/documentlibrarytool.py: + id: 265f6eb0b1b0 + last_write_checksum: sha1:02390e6d5a0061a442453f588447923dfc7e17c9 + pristine_git_object: 36fb81e59dbcd42983f20df16cae29e35e81bd9d src/mistralai/gcp/client/models/fimcompletionrequest.py: id: 5b79e2595d31 - last_write_checksum: sha1:80a2e3d5e10c240869cd96c41936d714cf8bf801 - pristine_git_object: e460f76c59315c22c75194936f1f3b232331f83c + last_write_checksum: sha1:78e0ea727e094b45a444251776aaccd9d273bffe + pristine_git_object: 5b6013f6a4c11591f2c5e0c0c204845e7c2caeb6 src/mistralai/gcp/client/models/fimcompletionresponse.py: id: 402f602d29b8 last_write_checksum: sha1:cfe26848c7b14d6e374b7944d7ad44df822990b0 pristine_git_object: 5b80da3f03e4e99dfca971a53af1cf6472c889bb src/mistralai/gcp/client/models/fimcompletionstreamrequest.py: id: 31190cf25070 - last_write_checksum: sha1:a95ab8c20b2fdff48102f08258a556af9f382ffa - pristine_git_object: fffc305499e578f77e42fb7992b59e933ae0ae7c + last_write_checksum: sha1:13d68fffdc4f0984732b64d12cfcc781ace0a757 + pristine_git_object: d2e86d406c255ecf2ae0242391be81f09c377572 src/mistralai/gcp/client/models/function.py: id: 2285a899b32e - last_write_checksum: sha1:6439f7f781174ae56b2b02ccbb4d02b08d8d5a03 - pristine_git_object: 439e831355444e0f9e82d23636651201f0db4bfc + last_write_checksum: sha1:3f8f9274cb5acacabb8f5bcbfef5bf4070a8f87b + pristine_git_object: 877b72737f1b21319c3d1b20ad7d8335118e1d8b src/mistralai/gcp/client/models/functioncall.py: id: 17bb51f08e5f last_write_checksum: sha1:b5fe2f061ea5f47057ee50011babc80de27e0ee6 @@ -456,38 +545,74 @@ trackedFiles: id: 313a6001145f last_write_checksum: sha1:fe1eefaed314efa788bd15beb63bf6b81abb307e pristine_git_object: 585b9e39762e49356823e211ad86f701bca389b8 + src/mistralai/gcp/client/models/guardrailconfig.py: + id: e3ef48444e1d + last_write_checksum: sha1:4ce14efae5297fe180dfc6478bde73cf5dcd3c45 + pristine_git_object: abc5decaebbc2d40b3a578e0198c7209f93b9ca5 src/mistralai/gcp/client/models/imagedetail.py: id: a28b2f3e2cb5 last_write_checksum: sha1:a4874529961952019eaa86a2fa0989626f537a4c pristine_git_object: 68ed76080716eb1424b13f182479f57e51a4fabf + src/mistralai/gcp/client/models/imagegenerationtool.py: + id: 4839c86ce5cc + last_write_checksum: sha1:e193a8b758b91c5fa57b8839fba5f315773b6254 + pristine_git_object: e6b289207b3cae97db469a46670d0749ed5cc574 src/mistralai/gcp/client/models/imageurl.py: id: 4e330f3eae74 - last_write_checksum: sha1:6c0bee7d7c765fb2611131c7d270041671b428b8 - pristine_git_object: 903d0a1a45eeb7c5e8cde80f624b6e039de1f4cc + last_write_checksum: sha1:19cd630d12f901879c5014b550261cc2f156eb07 + pristine_git_object: 99e555985d4478c286470d7e2430848cd876cdd3 src/mistralai/gcp/client/models/imageurlchunk.py: id: e68a4a393e9b - last_write_checksum: sha1:eae1d0e69a90b2f7513492e4cd0ed68d647f0b5d - pristine_git_object: 4bec0eec882c1eeee8a80f663ff7d686ca677ea0 + last_write_checksum: sha1:54bbaac8e5f3b0d42e7da9463ebe30b6f82b2a94 + pristine_git_object: e939c34b76aeabb53d82abb42d80828010f89e78 src/mistralai/gcp/client/models/jsonschema.py: id: 39c6e7d412a0 - last_write_checksum: sha1:19b34a5e3f5c00d1a1b96f91a6e02f5ad12240c7 - pristine_git_object: 684ac09f0460bef1f26bf0030b79bbc7141ab99b + last_write_checksum: sha1:0a1f92793e57e8357d395f4d99756d1c237baa3a + pristine_git_object: f500fa5636ef18e1eb47a8ea7e7fbe023cd46025 src/mistralai/gcp/client/models/mistralpromptmode.py: id: 8be4a4a683e4 last_write_checksum: sha1:c958567e95490abf3941fde69be69733e8afb90e pristine_git_object: c765e4f1a0b86735255771231377f13d62f3d7a6 + src/mistralai/gcp/client/models/moderationllmaction.py: + id: 27fbed8d6919 + last_write_checksum: sha1:fbc27faa2fbaa51a66bee21935c4bce350291f5e + pristine_git_object: cff03d9aa6de26ce3daa9edbc065ec3f759b5ee6 + src/mistralai/gcp/client/models/moderationllmv1categorythresholds.py: + id: 9c3f2837e5c3 + last_write_checksum: sha1:bcd4b4632002d240091bcf20cc643257e8559de5 + pristine_git_object: 3f5713fe1aa8f988af9964961b803f4ad890536b + src/mistralai/gcp/client/models/moderationllmv1config.py: + id: 348cd52230bd + last_write_checksum: sha1:5f252b76d5c9fe9ebba7cb2bee49a3ab8bacb16a + pristine_git_object: 579acd736d23bb75e8aba284a261a3506e83d0b3 + src/mistralai/gcp/client/models/moderationllmv2categorythresholds.py: + id: a1f948710f49 + last_write_checksum: sha1:1ac252d7c87caf344454a2c839cddeb9e92169d9 + pristine_git_object: 8b9252604ea4786365fa1b7273d6b99acef7c134 + src/mistralai/gcp/client/models/moderationllmv2config.py: + id: 17b6f1e661fd + last_write_checksum: sha1:96fa77b745e084aa25cfb1baf7914e580b89ecc4 + pristine_git_object: 000d2e2c70accf7434f99f803e6b2d5d13ea4c2f + src/mistralai/gcp/client/models/oauth2tokenauth.py: + id: e04fbd0e98a6 + last_write_checksum: sha1:34d2464532aae4a6d025d5d87024c31ee645fca5 + pristine_git_object: d1b4c93503cf990a56ab7641f2eadf5d6d3ab4c7 src/mistralai/gcp/client/models/prediction.py: id: 7a5463285bc8 - last_write_checksum: sha1:67c4a9b06d3e98552409a26960e0afd64f829b53 - pristine_git_object: 2e325289fd6c2a987ad270fd808f7b9a3f423440 + last_write_checksum: sha1:6a375252b2c5bdad129aa10462b8ac7613ef6c1d + pristine_git_object: 1e290f334a502cc643e33f53d30695b75c93c2ec + src/mistralai/gcp/client/models/reasoningeffort.py: + id: 9e62d78449a6 + last_write_checksum: sha1:703d87ae8c89b9fa9284833c45daa77752c3a8e8 + pristine_git_object: 43ffa02b8407ab64d41f23c3a56c02fe275e38de src/mistralai/gcp/client/models/referencechunk.py: id: 523e477f8725 - last_write_checksum: sha1:aade1dc05c2a2672630eb17626e4f49367d6bfe6 - pristine_git_object: 261c4755641093a38f97b17dce3a387623e69ead + last_write_checksum: sha1:5da5e54980082fec24a7f0700d7f4fa32793d342 + pristine_git_object: eca4c4dea0f8672be08727106bdd06110ba38246 src/mistralai/gcp/client/models/responseformat.py: id: 06774bb65b42 - last_write_checksum: sha1:7e64de46ef34718003cf0d198868a193f2122178 - pristine_git_object: f3aa9930e0f8a009dac628300d66c6209a538031 + last_write_checksum: sha1:92b8c399f81f9da7ed503c5fa0c298bdf16dd49c + pristine_git_object: afd1bd307ec231be64094f7263975eb4450b9607 src/mistralai/gcp/client/models/responseformats.py: id: 18112ad0f6db last_write_checksum: sha1:a212e85d286b5b49219f57d071a2232ff8b5263b @@ -510,48 +635,56 @@ trackedFiles: pristine_git_object: 690322725c0f852a005d08c5b722c41709868b22 src/mistralai/gcp/client/models/thinkchunk.py: id: 59a1d1ef2020 - last_write_checksum: sha1:f2f07f8bf1094cff718fb0f3ef760890c54e4003 - pristine_git_object: d534fc1ecc2a127d9ac9ac3d7a7aba7156faf7c2 + last_write_checksum: sha1:5896f44bd4868c2c14b83be15e536e129ad30752 + pristine_git_object: 34397d30a28dd42d06617e1b0863cfef6696a8c8 src/mistralai/gcp/client/models/tool.py: id: 4b27d45e56ad - last_write_checksum: sha1:cb0d879a55218fd7753bdd005be8a155982feb8f - pristine_git_object: 670aa81f8767e7c079105cf5995225168b4d6eb6 + last_write_checksum: sha1:e97109b00c31a731920e963ce0a346c3e8059448 + pristine_git_object: e95b303696e3881c58a9df16e059d22ba2e2b11b src/mistralai/gcp/client/models/toolcall.py: id: e6c25869a579 - last_write_checksum: sha1:f88e69a8e352025ca4b6897f6c16e1f7e4cd7264 - pristine_git_object: 3ea8e283c8f695bcc1fbc734b0074d37c2efeac8 + last_write_checksum: sha1:49733947b95332a77156893623bb58845518cdb8 + pristine_git_object: 4e4c2581af45686e0e4fe3c5cce9670f7f07d0c5 src/mistralai/gcp/client/models/toolchoice.py: id: cb13a9f64c92 - last_write_checksum: sha1:71be72b1aae19aef1f8a461c89b71ad6daa009b7 - pristine_git_object: 6e795fd72792f740c8aa5b4da7d1f516018f2c2e + last_write_checksum: sha1:613b18868534759b45e26e00e5a83c8f8b14b006 + pristine_git_object: 528cc801e876cd978be94027f36b83449136800b src/mistralai/gcp/client/models/toolchoiceenum.py: id: d62e9c92d93c last_write_checksum: sha1:3dbba9a58c5569aafe115f3f7713a52b01ad8620 pristine_git_object: 01f6f677b379f9e3c99db9d1ad248cb0033a2804 + src/mistralai/gcp/client/models/toolconfiguration.py: + id: c64c4cb6272c + last_write_checksum: sha1:f16ad6049988244f20f2ec3454236ae50c4198a1 + pristine_git_object: 724ed8c65f4b77d74d72898d3566843947de5f82 src/mistralai/gcp/client/models/toolmessage.py: id: b3774786c2e9 - last_write_checksum: sha1:3d414da8132467d1472ebe485802ffc78eb6f7e4 - pristine_git_object: ce160391f37ce3568daf2877f8dc1aa0f3694821 + last_write_checksum: sha1:7807f5b2b124643126cf6d141af40924838dba28 + pristine_git_object: a5a9645dda134345f5a023d49c8d5dbe9dd135ec src/mistralai/gcp/client/models/toolreferencechunk.py: id: 16363389756d - last_write_checksum: sha1:42abb2395ed4aa06831723288ce3d20f53f38da7 - pristine_git_object: 0a2a7fa3b80417ac2462126c4fae1e9f777df534 - src/mistralai/gcp/client/models/tooltypes.py: - id: 5926c64f5229 - last_write_checksum: sha1:ffd576511eed9f823c3d67df9fc5574d8d53c54b - pristine_git_object: fd1aa13d7b8c5d9bdb0922e04b8bd653ff843f60 + last_write_checksum: sha1:b70e37ab08799a0332a23856314b3a1a3cdf16b5 + pristine_git_object: eb2b80e409d2b929d6a4018f3ef80a2d61c06ab0 src/mistralai/gcp/client/models/usageinfo.py: id: 3aab1af66cff - last_write_checksum: sha1:c0c949ac48ed35efe1e8fbf820b8e390edd9c3ce - pristine_git_object: cb6feb6e8d173d39b828d8f5b38af75173b4f7f2 + last_write_checksum: sha1:432d75c62a44820c9b068e8e14c15fcfdb0931e8 + pristine_git_object: df40efab5b7a0457b4d8f62d46a7a8820fec8cc4 src/mistralai/gcp/client/models/usermessage.py: id: 9cfa7260463e - last_write_checksum: sha1:780984241b84a7dfe1f6ad6eccace1204bfec8bd - pristine_git_object: e237e900421a9e65fd15aede29ade0e510b189f6 + last_write_checksum: sha1:8d3eb6d719e8fb0bff460c1e7acc5ef2a5633882 + pristine_git_object: 8199f2936c2a2cc1e971400813acc508e4242e2f src/mistralai/gcp/client/models/validationerror.py: id: 6b4f4910ea9c - last_write_checksum: sha1:1fd1ffba68b202465f3a0269d7099b4fee5c85c9 - pristine_git_object: 3ff872c15f6380c3a7f9dc9be1b80be159f752ba + last_write_checksum: sha1:e595fb93b91fd9d1d1b48cb551c277be9c0a9dbd + pristine_git_object: 653b63e906c0a341e4fef6e7d7a253314e545f8c + src/mistralai/gcp/client/models/websearchpremiumtool.py: + id: 0f6734458e65 + last_write_checksum: sha1:64842c599d3ff0161c4b9fbca2dde21b75ab1ac2 + pristine_git_object: e416f96472bc8956d5ff44c061f725e10fa0a317 + src/mistralai/gcp/client/models/websearchtool.py: + id: 40ee5a5ac881 + last_write_checksum: sha1:36287a70e58b48968effec4feb9bc9dbfbb9cd94 + pristine_git_object: 69d6e04373c665012103489006f4e39bd85cd565 src/mistralai/gcp/client/py.typed: id: 98b8ab80ab0d last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -590,8 +723,8 @@ trackedFiles: pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/mistralai/gcp/client/utils/eventstreaming.py: id: bb66f0c3e0dc - last_write_checksum: sha1:ffa870a25a7e4e2015bfd7a467ccd3aa1de97f0e - pristine_git_object: f2052fc22d9fd6c663ba3dce019fe234ca37108b + last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 + pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 src/mistralai/gcp/client/utils/forms.py: id: ebf34781d6bd last_write_checksum: sha1:0ca31459b99f761fcc6d0557a0a38daac4ad50f4 @@ -606,8 +739,8 @@ trackedFiles: pristine_git_object: b661aff65d38b77d035149699aea09b2785d2fc6 src/mistralai/gcp/client/utils/metadata.py: id: ff0e832b8b9c - last_write_checksum: sha1:c6a560bd0c63ab158582f34dadb69433ea73b3d4 - pristine_git_object: 173b3e5ce658675c2f504222a56b3daaaa68107d + last_write_checksum: sha1:e703e5cbb5255144aacf86898d1420529afaaff8 + pristine_git_object: 5abddd588837ac297050ca3b543627faadb350a9 src/mistralai/gcp/client/utils/queryparams.py: id: 133b8408e73e last_write_checksum: sha1:b94c3f314fd3da0d1d215afc2731f48748e2aa59 @@ -622,12 +755,12 @@ trackedFiles: pristine_git_object: af07d4e941007af4213c5ec9047ef8a2fca04e5e src/mistralai/gcp/client/utils/security.py: id: 5273152365f4 - last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 - pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed + last_write_checksum: sha1:c11eef495b6aaa249178c24c796940cc540b7a00 + pristine_git_object: 42d8d78e9981eed7507670014d99588e27ab325a src/mistralai/gcp/client/utils/serializers.py: id: a7836e553d41 - last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 - pristine_git_object: 14321eb479de81d0d9580ec8291e0ff91bf29e57 + last_write_checksum: sha1:61009f2e4ef6613a1a5af813fe020373dae5a492 + pristine_git_object: d2149f8b909cb96628db140ac3cddb1b1e981367 src/mistralai/gcp/client/utils/unions.py: id: 8abba1cf1b6d last_write_checksum: sha1:6e38049f323e0b5fb4bd0e88ab51ec447197ccb0 @@ -664,20 +797,19 @@ examples: stream_fim: speakeasy-default-stream-fim: requestBody: - application/json: {"model": "codestral-latest", "top_p": 1, "stream": true, "prompt": "def", "suffix": "return a+b"} + application/json: {"model": "codestral-latest", "stream": true, "prompt": "def", "suffix": "return a+b"} responses: "422": application/json: {} fim_completion_v1_fim_completions_post: userExample: requestBody: - application/json: {"model": "codestral-latest", "top_p": 1, "stream": false, "prompt": "def", "suffix": "return a+b"} + application/json: {"model": "codestral-latest", "stream": false, "prompt": "def", "suffix": "return a+b"} responses: "200": application/json: {"id": "447e3e0d457e42e98248b5d2ef52a2a3", "object": "chat.completion", "model": "codestral-2508", "usage": {"prompt_tokens": 8, "completion_tokens": 91, "total_tokens": 99}, "created": 1759496862, "choices": [{"index": 0, "message": {"role": "assistant", "content": "add_numbers(a: int, b: int) -> int:\n \"\"\"\n You are given two integers `a` and `b`. Your task is to write a function that\n returns the sum of these two integers. The function should be implemented in a\n way that it can handle very large integers (up to 10^18). As a reminder, your\n code has to be in python\n \"\"\"\n", "tool_calls": null, "prefix": false}, "finish_reason": "stop"}]} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral_gcp.chat.stream()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_gcp.chat.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_gcp.fim.stream()`: `error.detail[]` **Changed**\n* `mistral_gcp.fim.complete()`: `error.detail[]` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/packages/gcp/.speakeasy/gen.yaml b/packages/gcp/.speakeasy/gen.yaml index 27793130..ebf8a3a0 100644 --- a/packages/gcp/.speakeasy/gen.yaml +++ b/packages/gcp/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.0 + version: 2.1.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/packages/gcp/RELEASES.md b/packages/gcp/RELEASES.md index 30d3e580..9cf7beb2 100644 --- a/packages/gcp/RELEASES.md +++ b/packages/gcp/RELEASES.md @@ -38,4 +38,14 @@ Based on: ### Generated - [python v2.0.0] packages/gcp ### Releases -- [PyPI v2.0.0] https://pypi.org/project/mistralai-gcp/2.0.0 - packages/gcp \ No newline at end of file +- [PyPI v2.0.0] https://pypi.org/project/mistralai-gcp/2.0.0 - packages/gcp + +## 2026-05-22 14:13:02 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.6 (2.884.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.0] packages/gcp +### Releases +- [PyPI v2.1.0] https://pypi.org/project/mistralai-gcp/2.1.0 - packages/gcp \ No newline at end of file diff --git a/packages/gcp/docs/models/apikeyauth.md b/packages/gcp/docs/models/apikeyauth.md new file mode 100644 index 00000000..1fbff10e --- /dev/null +++ b/packages/gcp/docs/models/apikeyauth.md @@ -0,0 +1,9 @@ +# APIKeyAuth + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `type` | *Literal["api-key"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/authorization.md b/packages/gcp/docs/models/authorization.md new file mode 100644 index 00000000..11ea5c6a --- /dev/null +++ b/packages/gcp/docs/models/authorization.md @@ -0,0 +1,17 @@ +# Authorization + + +## Supported Types + +### `models.APIKeyAuth` + +```python +value: models.APIKeyAuth = /* values here */ +``` + +### `models.OAuth2TokenAuth` + +```python +value: models.OAuth2TokenAuth = /* values here */ +``` + diff --git a/packages/gcp/docs/models/builtinconnectors.md b/packages/gcp/docs/models/builtinconnectors.md index f96f5044..ad9b9823 100644 --- a/packages/gcp/docs/models/builtinconnectors.md +++ b/packages/gcp/docs/models/builtinconnectors.md @@ -1,12 +1,17 @@ # BuiltInConnectors +## Example Usage + +```python +from mistralai.gcp.client.models import BuiltInConnectors +value: BuiltInConnectors = "web_search" +``` + ## Values -| Name | Value | -| -------------------- | -------------------- | -| `WEB_SEARCH` | web_search | -| `WEB_SEARCH_PREMIUM` | web_search_premium | -| `CODE_INTERPRETER` | code_interpreter | -| `IMAGE_GENERATION` | image_generation | -| `DOCUMENT_LIBRARY` | document_library | \ No newline at end of file +- `"web_search"` +- `"web_search_premium"` +- `"code_interpreter"` +- `"image_generation"` +- `"document_library"` diff --git a/packages/gcp/docs/models/chatcompletionchoice.md b/packages/gcp/docs/models/chatcompletionchoice.md index deaa0ea0..79d24a33 100644 --- a/packages/gcp/docs/models/chatcompletionchoice.md +++ b/packages/gcp/docs/models/chatcompletionchoice.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [models.AssistantMessage](../models/assistantmessage.md) | :heavy_check_mark: | N/A | | +| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | +| `messages` | List[[models.DeltaMessage](../models/deltamessage.md)] | :heavy_minus_sign: | N/A | | | `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file diff --git a/packages/gcp/docs/models/chatcompletionchoicefinishreason.md b/packages/gcp/docs/models/chatcompletionchoicefinishreason.md index b2f15ecb..53290d8e 100644 --- a/packages/gcp/docs/models/chatcompletionchoicefinishreason.md +++ b/packages/gcp/docs/models/chatcompletionchoicefinishreason.md @@ -1,12 +1,21 @@ # ChatCompletionChoiceFinishReason +## Example Usage + +```python +from mistralai.gcp.client.models import ChatCompletionChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ChatCompletionChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `STOP` | stop | -| `LENGTH` | length | -| `MODEL_LENGTH` | model_length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"model_length"` +- `"error"` +- `"tool_calls"` diff --git a/packages/gcp/docs/models/chatcompletionrequest.md b/packages/gcp/docs/models/chatcompletionrequest.md index 78cce437..db61b5c0 100644 --- a/packages/gcp/docs/models/chatcompletionrequest.md +++ b/packages/gcp/docs/models/chatcompletionrequest.md @@ -5,21 +5,23 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionRequestMessage](../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionRequestTool](../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | \ No newline at end of file +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/packages/gcp/docs/models/chatcompletionrequesttool.md b/packages/gcp/docs/models/chatcompletionrequesttool.md new file mode 100644 index 00000000..572d12ca --- /dev/null +++ b/packages/gcp/docs/models/chatcompletionrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/packages/gcp/docs/models/chatcompletionstreamrequest.md b/packages/gcp/docs/models/chatcompletionstreamrequest.md index a26a85d7..bd19d37b 100644 --- a/packages/gcp/docs/models/chatcompletionstreamrequest.md +++ b/packages/gcp/docs/models/chatcompletionstreamrequest.md @@ -5,21 +5,23 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](https://docs.mistral.ai/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](https://docs.mistral.ai/models) for model descriptions. | mistral-large-latest | +| `model` | *str* | :heavy_check_mark: | ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. | mistral-large-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionStreamRequestTool](../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | -| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | \ No newline at end of file +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | +| `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/packages/gcp/docs/models/chatcompletionstreamrequesttool.md b/packages/gcp/docs/models/chatcompletionstreamrequesttool.md new file mode 100644 index 00000000..48998fcb --- /dev/null +++ b/packages/gcp/docs/models/chatcompletionstreamrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionStreamRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/packages/gcp/docs/models/codeinterpretertool.md b/packages/gcp/docs/models/codeinterpretertool.md new file mode 100644 index 00000000..6302fc62 --- /dev/null +++ b/packages/gcp/docs/models/codeinterpretertool.md @@ -0,0 +1,9 @@ +# CodeInterpreterTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["code_interpreter"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/completionresponsestreamchoicefinishreason.md b/packages/gcp/docs/models/completionresponsestreamchoicefinishreason.md index 0fece473..7b37dc06 100644 --- a/packages/gcp/docs/models/completionresponsestreamchoicefinishreason.md +++ b/packages/gcp/docs/models/completionresponsestreamchoicefinishreason.md @@ -1,11 +1,20 @@ # CompletionResponseStreamChoiceFinishReason +## Example Usage + +```python +from mistralai.gcp.client.models import CompletionResponseStreamChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionResponseStreamChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `STOP` | stop | -| `LENGTH` | length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"error"` +- `"tool_calls"` diff --git a/packages/gcp/docs/models/customconnector.md b/packages/gcp/docs/models/customconnector.md new file mode 100644 index 00000000..0a0b6921 --- /dev/null +++ b/packages/gcp/docs/models/customconnector.md @@ -0,0 +1,11 @@ +# CustomConnector + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | *Literal["connector"]* | :heavy_check_mark: | N/A | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `authorization` | [OptionalNullable[models.Authorization]](../models/authorization.md) | :heavy_minus_sign: | N/A | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/deltamessage.md b/packages/gcp/docs/models/deltamessage.md index e0ee575f..c2395e1b 100644 --- a/packages/gcp/docs/models/deltamessage.md +++ b/packages/gcp/docs/models/deltamessage.md @@ -3,8 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `content` | [OptionalNullable[models.DeltaMessageContent]](../models/deltamessagecontent.md) | :heavy_minus_sign: | N/A | -| `tool_calls` | List[[models.ToolCall](../models/toolcall.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `content` | [OptionalNullable[models.DeltaMessageContent]](../models/deltamessagecontent.md) | :heavy_minus_sign: | N/A | +| `tool_calls` | List[[models.ToolCall](../models/toolcall.md)] | :heavy_minus_sign: | N/A | +| `tool_call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `index` | *OptionalNullable[int]* | :heavy_minus_sign: | If the completion returns multiple messages, this is to specify which message this delta is for. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/documentlibrarytool.md b/packages/gcp/docs/models/documentlibrarytool.md new file mode 100644 index 00000000..95c3fa52 --- /dev/null +++ b/packages/gcp/docs/models/documentlibrarytool.md @@ -0,0 +1,10 @@ +# DocumentLibraryTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["document_library"]* | :heavy_check_mark: | N/A | +| `library_ids` | List[*str*] | :heavy_check_mark: | Ids of the library in which to search. | \ No newline at end of file diff --git a/packages/gcp/docs/models/fimcompletionrequest.md b/packages/gcp/docs/models/fimcompletionrequest.md index fde0b625..c0c52b66 100644 --- a/packages/gcp/docs/models/fimcompletionrequest.md +++ b/packages/gcp/docs/models/fimcompletionrequest.md @@ -7,10 +7,10 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *str* | :heavy_check_mark: | ID of the model with FIM to use. | codestral-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.FIMCompletionRequestStop]](../models/fimcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.FIMCompletionRequestStop]](../models/fimcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | diff --git a/packages/gcp/docs/models/fimcompletionstreamrequest.md b/packages/gcp/docs/models/fimcompletionstreamrequest.md index ba62d854..c02b622c 100644 --- a/packages/gcp/docs/models/fimcompletionstreamrequest.md +++ b/packages/gcp/docs/models/fimcompletionstreamrequest.md @@ -7,10 +7,10 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *str* | :heavy_check_mark: | ID of the model with FIM to use. | codestral-latest | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.FIMCompletionStreamRequestStop]](../models/fimcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.FIMCompletionStreamRequestStop]](../models/fimcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `prompt` | *str* | :heavy_check_mark: | The text/code to complete. | def | diff --git a/packages/gcp/docs/models/guardrailconfig.md b/packages/gcp/docs/models/guardrailconfig.md new file mode 100644 index 00000000..1276462c --- /dev/null +++ b/packages/gcp/docs/models/guardrailconfig.md @@ -0,0 +1,10 @@ +# GuardrailConfig + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `block_on_error` | *Optional[bool]* | :heavy_minus_sign: | If true, return HTTP 403 and block request in the event of a server-side error | +| `moderation_llm_v1` | [OptionalNullable[models.ModerationLlmv1Config]](../models/moderationllmv1config.md) | :heavy_minus_sign: | N/A | +| `moderation_llm_v2` | [OptionalNullable[models.ModerationLlmv2Config]](../models/moderationllmv2config.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/imagedetail.md b/packages/gcp/docs/models/imagedetail.md index 1e5ba3fd..15cc63e7 100644 --- a/packages/gcp/docs/models/imagedetail.md +++ b/packages/gcp/docs/models/imagedetail.md @@ -1,10 +1,19 @@ # ImageDetail +## Example Usage + +```python +from mistralai.gcp.client.models import ImageDetail + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ImageDetail = "low" +``` + ## Values -| Name | Value | -| ------ | ------ | -| `LOW` | low | -| `AUTO` | auto | -| `HIGH` | high | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"low"` +- `"auto"` +- `"high"` diff --git a/packages/gcp/docs/models/imagegenerationtool.md b/packages/gcp/docs/models/imagegenerationtool.md new file mode 100644 index 00000000..b476b6f2 --- /dev/null +++ b/packages/gcp/docs/models/imagegenerationtool.md @@ -0,0 +1,9 @@ +# ImageGenerationTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["image_generation"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/imageurlchunk.md b/packages/gcp/docs/models/imageurlchunk.md index a84dac32..73e1ed5a 100644 --- a/packages/gcp/docs/models/imageurlchunk.md +++ b/packages/gcp/docs/models/imageurlchunk.md @@ -1,6 +1,6 @@ # ImageURLChunk -{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0 +{"type":"image_url","image_url":"data:image/png;base64,iVBORw0"} ## Fields diff --git a/packages/gcp/docs/models/mistralpromptmode.md b/packages/gcp/docs/models/mistralpromptmode.md index c3409d03..921f81a4 100644 --- a/packages/gcp/docs/models/mistralpromptmode.md +++ b/packages/gcp/docs/models/mistralpromptmode.md @@ -4,9 +4,18 @@ Available options to the prompt_mode argument on the chat completion endpoint. Values represent high-level intent. Assignment to actual SPs is handled internally. System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelines, etc. +## Example Usage + +```python +from mistralai.gcp.client.models import MistralPromptMode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MistralPromptMode = "reasoning" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `REASONING` | reasoning | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"reasoning"` diff --git a/packages/gcp/docs/models/moderationllmaction.md b/packages/gcp/docs/models/moderationllmaction.md new file mode 100644 index 00000000..e0077a32 --- /dev/null +++ b/packages/gcp/docs/models/moderationllmaction.md @@ -0,0 +1,14 @@ +# ModerationLLMAction + +## Example Usage + +```python +from mistralai.gcp.client.models import ModerationLLMAction +value: ModerationLLMAction = "none" +``` + + +## Values + +- `"none"` +- `"block"` diff --git a/packages/gcp/docs/models/moderationllmv1categorythresholds.md b/packages/gcp/docs/models/moderationllmv1categorythresholds.md new file mode 100644 index 00000000..90ae213f --- /dev/null +++ b/packages/gcp/docs/models/moderationllmv1categorythresholds.md @@ -0,0 +1,16 @@ +# ModerationLlmv1CategoryThresholds + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `sexual` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `hate_and_discrimination` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `violence_and_threats` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `dangerous_and_criminal_content` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `selfharm` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `health` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `financial` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `law` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `pii` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/moderationllmv1config.md b/packages/gcp/docs/models/moderationllmv1config.md new file mode 100644 index 00000000..bdb5812b --- /dev/null +++ b/packages/gcp/docs/models/moderationllmv1config.md @@ -0,0 +1,11 @@ +# ModerationLlmv1Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv1CategoryThresholds]](../models/moderationllmv1categorythresholds.md) | :heavy_minus_sign: | N/A | +| `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/moderationllmv2categorythresholds.md b/packages/gcp/docs/models/moderationllmv2categorythresholds.md new file mode 100644 index 00000000..e95b81b0 --- /dev/null +++ b/packages/gcp/docs/models/moderationllmv2categorythresholds.md @@ -0,0 +1,18 @@ +# ModerationLlmv2CategoryThresholds + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `sexual` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `hate_and_discrimination` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `violence_and_threats` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `dangerous` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `criminal` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `selfharm` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `health` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `financial` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `law` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `pii` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `jailbreaking` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/moderationllmv2config.md b/packages/gcp/docs/models/moderationllmv2config.md new file mode 100644 index 00000000..e928506c --- /dev/null +++ b/packages/gcp/docs/models/moderationllmv2config.md @@ -0,0 +1,11 @@ +# ModerationLlmv2Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv2CategoryThresholds]](../models/moderationllmv2categorythresholds.md) | :heavy_minus_sign: | N/A | +| `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/oauth2tokenauth.md b/packages/gcp/docs/models/oauth2tokenauth.md new file mode 100644 index 00000000..89f80436 --- /dev/null +++ b/packages/gcp/docs/models/oauth2tokenauth.md @@ -0,0 +1,9 @@ +# OAuth2TokenAuth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `type` | *Literal["oauth2-token"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/reasoningeffort.md b/packages/gcp/docs/models/reasoningeffort.md new file mode 100644 index 00000000..87e0ae76 --- /dev/null +++ b/packages/gcp/docs/models/reasoningeffort.md @@ -0,0 +1,14 @@ +# ReasoningEffort + +## Example Usage + +```python +from mistralai.gcp.client.models import ReasoningEffort +value: ReasoningEffort = "none" +``` + + +## Values + +- `"none"` +- `"high"` diff --git a/packages/gcp/docs/models/referencechunk.md b/packages/gcp/docs/models/referencechunk.md index d847e248..0186d3c3 100644 --- a/packages/gcp/docs/models/referencechunk.md +++ b/packages/gcp/docs/models/referencechunk.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `type` | *Optional[Literal["reference"]]* | :heavy_minus_sign: | N/A | -| `reference_ids` | List[*int*] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *Optional[Literal["reference"]]* | :heavy_minus_sign: | N/A | +| `reference_ids` | List[[models.ReferenceID](../models/referenceid.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/referenceid.md b/packages/gcp/docs/models/referenceid.md new file mode 100644 index 00000000..1d29397f --- /dev/null +++ b/packages/gcp/docs/models/referenceid.md @@ -0,0 +1,17 @@ +# ReferenceID + + +## Supported Types + +### `int` + +```python +value: int = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/packages/gcp/docs/models/responseformats.md b/packages/gcp/docs/models/responseformats.md index 2f5f1e55..5d9aeb3e 100644 --- a/packages/gcp/docs/models/responseformats.md +++ b/packages/gcp/docs/models/responseformats.md @@ -1,10 +1,15 @@ # ResponseFormats +## Example Usage + +```python +from mistralai.gcp.client.models import ResponseFormats +value: ResponseFormats = "text" +``` + ## Values -| Name | Value | -| ------------- | ------------- | -| `TEXT` | text | -| `JSON_OBJECT` | json_object | -| `JSON_SCHEMA` | json_schema | \ No newline at end of file +- `"text"` +- `"json_object"` +- `"json_schema"` diff --git a/packages/gcp/docs/models/thinkchunk.md b/packages/gcp/docs/models/thinkchunk.md index b07f598e..d825497e 100644 --- a/packages/gcp/docs/models/thinkchunk.md +++ b/packages/gcp/docs/models/thinkchunk.md @@ -7,4 +7,5 @@ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `type` | *Literal["thinking"]* | :heavy_check_mark: | N/A | | `thinking` | List[[models.Thinking](../models/thinking.md)] | :heavy_check_mark: | N/A | +| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | Signature to replay some reasoning blocks across turns. | | `closed` | *Optional[bool]* | :heavy_minus_sign: | Whether the thinking chunk is closed or not. Currently only used for prefixing. | \ No newline at end of file diff --git a/packages/gcp/docs/models/tool.md b/packages/gcp/docs/models/tool.md index fb661f72..85888d01 100644 --- a/packages/gcp/docs/models/tool.md +++ b/packages/gcp/docs/models/tool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `type` | *Union[Literal["function"], UnrecognizedStr]* | :heavy_check_mark: | N/A | +| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/toolcall.md b/packages/gcp/docs/models/toolcall.md index 3819236b..9d236e8b 100644 --- a/packages/gcp/docs/models/toolcall.md +++ b/packages/gcp/docs/models/toolcall.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | -| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | +| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/toolchoice.md b/packages/gcp/docs/models/toolchoice.md index 373046bb..a457f96f 100644 --- a/packages/gcp/docs/models/toolchoice.md +++ b/packages/gcp/docs/models/toolchoice.md @@ -7,5 +7,5 @@ ToolChoice is either a ToolChoiceEnum or a ToolChoice | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | | `function` | [models.FunctionName](../models/functionname.md) | :heavy_check_mark: | this restriction of `Function` is used to select a specific function to call | \ No newline at end of file diff --git a/packages/gcp/docs/models/toolchoiceenum.md b/packages/gcp/docs/models/toolchoiceenum.md index 0be3d6c5..c97bf912 100644 --- a/packages/gcp/docs/models/toolchoiceenum.md +++ b/packages/gcp/docs/models/toolchoiceenum.md @@ -1,11 +1,16 @@ # ToolChoiceEnum +## Example Usage + +```python +from mistralai.gcp.client.models import ToolChoiceEnum +value: ToolChoiceEnum = "auto" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `AUTO` | auto | -| `NONE` | none | -| `ANY` | any | -| `REQUIRED` | required | \ No newline at end of file +- `"auto"` +- `"none"` +- `"any"` +- `"required"` diff --git a/packages/gcp/docs/models/toolconfiguration.md b/packages/gcp/docs/models/toolconfiguration.md new file mode 100644 index 00000000..89286a17 --- /dev/null +++ b/packages/gcp/docs/models/toolconfiguration.md @@ -0,0 +1,10 @@ +# ToolConfiguration + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `requires_confirmation` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/toolreferencechunk.md b/packages/gcp/docs/models/toolreferencechunk.md index 9fc10399..49ea4ca7 100644 --- a/packages/gcp/docs/models/toolreferencechunk.md +++ b/packages/gcp/docs/models/toolreferencechunk.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `type` | *Optional[Literal["tool_reference"]]* | :heavy_minus_sign: | N/A | -| `tool` | [models.ToolUnion](../models/toolunion.md) | :heavy_check_mark: | N/A | -| `title` | *str* | :heavy_check_mark: | N/A | -| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `favicon` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Optional[Literal["tool_reference"]]* | :heavy_minus_sign: | N/A | +| `tool` | [models.ToolReferenceChunkTool](../models/toolreferencechunktool.md) | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | N/A | +| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `favicon` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/toolunion.md b/packages/gcp/docs/models/toolreferencechunktool.md similarity index 87% rename from packages/gcp/docs/models/toolunion.md rename to packages/gcp/docs/models/toolreferencechunktool.md index 2dcb3dee..999f7c34 100644 --- a/packages/gcp/docs/models/toolunion.md +++ b/packages/gcp/docs/models/toolreferencechunktool.md @@ -1,4 +1,4 @@ -# ToolUnion +# ToolReferenceChunkTool ## Supported Types diff --git a/packages/gcp/docs/models/tooltypes.md b/packages/gcp/docs/models/tooltypes.md deleted file mode 100644 index 84e49253..00000000 --- a/packages/gcp/docs/models/tooltypes.md +++ /dev/null @@ -1,8 +0,0 @@ -# ToolTypes - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/packages/gcp/docs/models/websearchpremiumtool.md b/packages/gcp/docs/models/websearchpremiumtool.md new file mode 100644 index 00000000..78b736cd --- /dev/null +++ b/packages/gcp/docs/models/websearchpremiumtool.md @@ -0,0 +1,9 @@ +# WebSearchPremiumTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["web_search_premium"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/docs/models/websearchtool.md b/packages/gcp/docs/models/websearchtool.md new file mode 100644 index 00000000..4ca7333c --- /dev/null +++ b/packages/gcp/docs/models/websearchtool.md @@ -0,0 +1,9 @@ +# WebSearchTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["web_search"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/gcp/pyproject.toml b/packages/gcp/pyproject.toml index 5cec57e1..bb0d6ead 100644 --- a/packages/gcp/pyproject.toml +++ b/packages/gcp/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai-gcp" -version = "2.0.0" +version = "2.1.0" description = "Python Client SDK for the Mistral AI API in GCP." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/packages/gcp/src/mistralai/gcp/client/_version.py b/packages/gcp/src/mistralai/gcp/client/_version.py index 377c9836..e6a19a24 100644 --- a/packages/gcp/src/mistralai/gcp/client/_version.py +++ b/packages/gcp/src/mistralai/gcp/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai-gcp" -__version__: str = "2.0.0" +__version__: str = "2.1.0" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.841.0 1.0.0 mistralai-gcp" +__gen_version__: str = "2.884.13" +__user_agent__: str = "speakeasy-sdk/python 2.1.0 2.884.13 1.0.0 mistralai-gcp" try: if __package__ is not None: diff --git a/packages/gcp/src/mistralai/gcp/client/basesdk.py b/packages/gcp/src/mistralai/gcp/client/basesdk.py index b3edcb0a..1c518ade 100644 --- a/packages/gcp/src/mistralai/gcp/client/basesdk.py +++ b/packages/gcp/src/mistralai/gcp/client/basesdk.py @@ -7,6 +7,7 @@ AfterErrorContext, AfterSuccessContext, BeforeRequestContext, + HookContext, ) from mistralai.gcp.client.utils import ( RetryConfig, @@ -66,6 +67,7 @@ def _build_request_async( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.async_client return self._build_request_with_client( @@ -87,6 +89,7 @@ def _build_request_async( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request( @@ -110,6 +113,7 @@ def _build_request( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.client return self._build_request_with_client( @@ -131,6 +135,7 @@ def _build_request( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request_with_client( @@ -155,6 +160,7 @@ def _build_request_with_client( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: query_params = {} @@ -188,7 +194,9 @@ def _build_request_with_client( security = security() if security is not None: - security_headers, security_query_params = utils.get_security(security) + security_headers, security_query_params = utils.get_security( + security, allowed_fields + ) headers = {**headers, **security_headers} query_params = {**query_params, **security_query_params} @@ -225,15 +233,15 @@ def _build_request_with_client( data=serialized_request_body.data, files=serialized_request_body.files, headers=headers, - timeout=timeout, + timeout=timeout if timeout is not None else httpx.USE_CLIENT_DEFAULT, ) def do_request( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.client @@ -245,6 +253,8 @@ def do(): http_res = None try: req = hooks.before_request(BeforeRequestContext(hook_ctx), request) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -275,19 +285,6 @@ def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = hooks.after_error( - AfterErrorContext(hook_ctx), http_res, None - ) - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -295,17 +292,27 @@ def do(): else: http_res = do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = hooks.after_error(AfterErrorContext(hook_ctx), http_res, None) + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res async def do_request_async( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.async_client @@ -320,6 +327,8 @@ async def do(): hooks.before_request, BeforeRequestContext(hook_ctx), request ) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -353,20 +362,6 @@ async def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = await run_sync_in_thread( - hooks.after_error, AfterErrorContext(hook_ctx), http_res, None - ) - - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -376,7 +371,20 @@ async def do(): else: http_res = await do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None + ) + + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = await run_sync_in_thread( hooks.after_success, AfterSuccessContext(hook_ctx), http_res ) diff --git a/packages/gcp/src/mistralai/gcp/client/chat.py b/packages/gcp/src/mistralai/gcp/client/chat.py index 925d69ed..8a9abf59 100644 --- a/packages/gcp/src/mistralai/gcp/client/chat.py +++ b/packages/gcp/src/mistralai/gcp/client/chat.py @@ -21,22 +21,25 @@ def stream( List[models.ChatCompletionStreamRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionStreamRequestStop, models.ChatCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -44,14 +47,18 @@ def stream( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -78,7 +85,9 @@ def stream( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -89,6 +98,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -109,7 +121,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -120,7 +134,11 @@ def stream( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), ) req = self._build_request( @@ -160,7 +178,7 @@ def stream( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -198,22 +216,25 @@ async def stream_async( List[models.ChatCompletionStreamRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionStreamRequestStop, models.ChatCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -221,14 +242,18 @@ async def stream_async( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -255,7 +280,9 @@ async def stream_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -266,6 +293,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -286,7 +316,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -297,7 +329,11 @@ async def stream_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), ) req = self._build_request_async( @@ -337,7 +373,7 @@ async def stream_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -375,22 +411,25 @@ def complete( List[models.ChatCompletionRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionRequestStop, models.ChatCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -398,14 +437,18 @@ def complete( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -430,7 +473,9 @@ def complete( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -441,6 +486,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -461,7 +509,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -472,7 +522,11 @@ def complete( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), ) req = self._build_request( @@ -512,7 +566,7 @@ def complete( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -542,22 +596,25 @@ async def complete_async( List[models.ChatCompletionRequestMessageTypedDict], ], temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionRequestStop, models.ChatCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -565,14 +622,18 @@ async def complete_async( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -597,7 +658,9 @@ async def complete_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -608,6 +671,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -628,7 +694,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -639,7 +707,11 @@ async def complete_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), ) req = self._build_request_async( @@ -679,7 +751,7 @@ async def complete_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/packages/gcp/src/mistralai/gcp/client/fim.py b/packages/gcp/src/mistralai/gcp/client/fim.py index 4202102a..cd5abaf8 100644 --- a/packages/gcp/src/mistralai/gcp/client/fim.py +++ b/packages/gcp/src/mistralai/gcp/client/fim.py @@ -18,15 +18,15 @@ def stream( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionStreamRequestStop, models.FIMCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, @@ -61,6 +61,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -117,7 +120,7 @@ def stream( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -152,15 +155,15 @@ async def stream_async( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionStreamRequestStop, models.FIMCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, @@ -195,6 +198,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -251,7 +257,7 @@ async def stream_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -286,15 +292,15 @@ def complete( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionRequestStop, models.FIMCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, @@ -329,6 +335,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -385,7 +394,7 @@ def complete( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -412,15 +421,15 @@ async def complete_async( model: str, prompt: str, temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = 1, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.FIMCompletionRequestStop, models.FIMCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, suffix: OptionalNullable[str] = UNSET, @@ -455,6 +464,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -511,7 +523,7 @@ async def complete_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/packages/gcp/src/mistralai/gcp/client/models/__init__.py b/packages/gcp/src/mistralai/gcp/client/models/__init__.py index e42ed4bb..f7a311a2 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/__init__.py +++ b/packages/gcp/src/mistralai/gcp/client/models/__init__.py @@ -5,6 +5,7 @@ from mistralai.gcp.client.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: + from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict from .assistantmessage import ( AssistantMessage, AssistantMessageContent, @@ -23,8 +24,10 @@ ChatCompletionRequestMessageTypedDict, ChatCompletionRequestStop, ChatCompletionRequestStopTypedDict, + ChatCompletionRequestTool, ChatCompletionRequestToolChoice, ChatCompletionRequestToolChoiceTypedDict, + ChatCompletionRequestToolTypedDict, ChatCompletionRequestTypedDict, ) from .chatcompletionresponse import ( @@ -37,10 +40,13 @@ ChatCompletionStreamRequestMessageTypedDict, ChatCompletionStreamRequestStop, ChatCompletionStreamRequestStopTypedDict, + ChatCompletionStreamRequestTool, ChatCompletionStreamRequestToolChoice, ChatCompletionStreamRequestToolChoiceTypedDict, + ChatCompletionStreamRequestToolTypedDict, ChatCompletionStreamRequestTypedDict, ) + from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionchunk import CompletionChunk, CompletionChunkTypedDict from .completionevent import CompletionEvent, CompletionEventTypedDict from .completionresponsestreamchoice import ( @@ -49,12 +55,19 @@ CompletionResponseStreamChoiceTypedDict, ) from .contentchunk import ContentChunk, ContentChunkTypedDict, UnknownContentChunk + from .customconnector import ( + Authorization, + AuthorizationTypedDict, + CustomConnector, + CustomConnectorTypedDict, + ) from .deltamessage import ( DeltaMessage, DeltaMessageContent, DeltaMessageContentTypedDict, DeltaMessageTypedDict, ) + from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .fimcompletionrequest import ( FIMCompletionRequest, FIMCompletionRequestStop, @@ -79,7 +92,9 @@ FunctionCallTypedDict, ) from .functionname import FunctionName, FunctionNameTypedDict + from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagedetail import ImageDetail + from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .imageurl import ImageURL, ImageURLTypedDict from .imageurlchunk import ( ImageURLChunk, @@ -89,8 +104,32 @@ ) from .jsonschema import JSONSchema, JSONSchemaTypedDict from .mistralpromptmode import MistralPromptMode + from .moderationllmaction import ModerationLLMAction + from .moderationllmv1categorythresholds import ( + ModerationLlmv1CategoryThresholds, + ModerationLlmv1CategoryThresholdsTypedDict, + ) + from .moderationllmv1config import ( + ModerationLlmv1Config, + ModerationLlmv1ConfigTypedDict, + ) + from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, + ) + from .moderationllmv2config import ( + ModerationLlmv2Config, + ModerationLlmv2ConfigTypedDict, + ) + from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict from .prediction import Prediction, PredictionTypedDict - from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict + from .reasoningeffort import ReasoningEffort + from .referencechunk import ( + ReferenceChunk, + ReferenceChunkTypedDict, + ReferenceID, + ReferenceIDTypedDict, + ) from .responseformat import ResponseFormat, ResponseFormatTypedDict from .responseformats import ResponseFormats from .security import Security, SecurityTypedDict @@ -110,6 +149,7 @@ from .toolcall import ToolCall, ToolCallTypedDict from .toolchoice import ToolChoice, ToolChoiceTypedDict from .toolchoiceenum import ToolChoiceEnum + from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict from .toolmessage import ( ToolMessage, ToolMessageContent, @@ -118,11 +158,10 @@ ) from .toolreferencechunk import ( ToolReferenceChunk, + ToolReferenceChunkTool, + ToolReferenceChunkToolTypedDict, ToolReferenceChunkTypedDict, - ToolUnion, - ToolUnionTypedDict, ) - from .tooltypes import ToolTypes from .usageinfo import UsageInfo, UsageInfoTypedDict from .usermessage import ( UserMessage, @@ -138,14 +177,23 @@ ValidationError, ValidationErrorTypedDict, ) + from .websearchpremiumtool import ( + WebSearchPremiumTool, + WebSearchPremiumToolTypedDict, + ) + from .websearchtool import WebSearchTool, WebSearchToolTypedDict __all__ = [ + "APIKeyAuth", + "APIKeyAuthTypedDict", "Arguments", "ArgumentsTypedDict", "AssistantMessage", "AssistantMessageContent", "AssistantMessageContentTypedDict", "AssistantMessageTypedDict", + "Authorization", + "AuthorizationTypedDict", "BuiltInConnectors", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", @@ -155,8 +203,10 @@ "ChatCompletionRequestMessageTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", + "ChatCompletionRequestTool", "ChatCompletionRequestToolChoice", "ChatCompletionRequestToolChoiceTypedDict", + "ChatCompletionRequestToolTypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", @@ -165,9 +215,13 @@ "ChatCompletionStreamRequestMessageTypedDict", "ChatCompletionStreamRequestStop", "ChatCompletionStreamRequestStopTypedDict", + "ChatCompletionStreamRequestTool", "ChatCompletionStreamRequestToolChoice", "ChatCompletionStreamRequestToolChoiceTypedDict", + "ChatCompletionStreamRequestToolTypedDict", "ChatCompletionStreamRequestTypedDict", + "CodeInterpreterTool", + "CodeInterpreterToolTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", @@ -179,10 +233,14 @@ "ContentChunkTypedDict", "Context", "ContextTypedDict", + "CustomConnector", + "CustomConnectorTypedDict", "DeltaMessage", "DeltaMessageContent", "DeltaMessageContentTypedDict", "DeltaMessageTypedDict", + "DocumentLibraryTool", + "DocumentLibraryToolTypedDict", "FIMCompletionRequest", "FIMCompletionRequestStop", "FIMCompletionRequestStopTypedDict", @@ -199,7 +257,11 @@ "FunctionName", "FunctionNameTypedDict", "FunctionTypedDict", + "GuardrailConfig", + "GuardrailConfigTypedDict", "ImageDetail", + "ImageGenerationTool", + "ImageGenerationToolTypedDict", "ImageURL", "ImageURLChunk", "ImageURLChunkTypedDict", @@ -211,10 +273,24 @@ "Loc", "LocTypedDict", "MistralPromptMode", + "ModerationLLMAction", + "ModerationLlmv1CategoryThresholds", + "ModerationLlmv1CategoryThresholdsTypedDict", + "ModerationLlmv1Config", + "ModerationLlmv1ConfigTypedDict", + "ModerationLlmv2CategoryThresholds", + "ModerationLlmv2CategoryThresholdsTypedDict", + "ModerationLlmv2Config", + "ModerationLlmv2ConfigTypedDict", + "OAuth2TokenAuth", + "OAuth2TokenAuthTypedDict", "Prediction", "PredictionTypedDict", + "ReasoningEffort", "ReferenceChunk", "ReferenceChunkTypedDict", + "ReferenceID", + "ReferenceIDTypedDict", "ResponseFormat", "ResponseFormatTypedDict", "ResponseFormats", @@ -238,16 +314,17 @@ "ToolChoice", "ToolChoiceEnum", "ToolChoiceTypedDict", + "ToolConfiguration", + "ToolConfigurationTypedDict", "ToolMessage", "ToolMessageContent", "ToolMessageContentTypedDict", "ToolMessageTypedDict", "ToolReferenceChunk", + "ToolReferenceChunkTool", + "ToolReferenceChunkToolTypedDict", "ToolReferenceChunkTypedDict", "ToolTypedDict", - "ToolTypes", - "ToolUnion", - "ToolUnionTypedDict", "UnknownContentChunk", "UsageInfo", "UsageInfoTypedDict", @@ -257,9 +334,15 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", + "WebSearchPremiumTool", + "WebSearchPremiumToolTypedDict", + "WebSearchTool", + "WebSearchToolTypedDict", ] _dynamic_imports: dict[str, str] = { + "APIKeyAuth": ".apikeyauth", + "APIKeyAuthTypedDict": ".apikeyauth", "AssistantMessage": ".assistantmessage", "AssistantMessageContent": ".assistantmessage", "AssistantMessageContentTypedDict": ".assistantmessage", @@ -273,8 +356,10 @@ "ChatCompletionRequestMessageTypedDict": ".chatcompletionrequest", "ChatCompletionRequestStop": ".chatcompletionrequest", "ChatCompletionRequestStopTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestTool": ".chatcompletionrequest", "ChatCompletionRequestToolChoice": ".chatcompletionrequest", "ChatCompletionRequestToolChoiceTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestToolTypedDict": ".chatcompletionrequest", "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", @@ -283,9 +368,13 @@ "ChatCompletionStreamRequestMessageTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStop": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStopTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTool": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoice": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestToolTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", + "CodeInterpreterTool": ".codeinterpretertool", + "CodeInterpreterToolTypedDict": ".codeinterpretertool", "CompletionChunk": ".completionchunk", "CompletionChunkTypedDict": ".completionchunk", "CompletionEvent": ".completionevent", @@ -296,10 +385,16 @@ "ContentChunk": ".contentchunk", "ContentChunkTypedDict": ".contentchunk", "UnknownContentChunk": ".contentchunk", + "Authorization": ".customconnector", + "AuthorizationTypedDict": ".customconnector", + "CustomConnector": ".customconnector", + "CustomConnectorTypedDict": ".customconnector", "DeltaMessage": ".deltamessage", "DeltaMessageContent": ".deltamessage", "DeltaMessageContentTypedDict": ".deltamessage", "DeltaMessageTypedDict": ".deltamessage", + "DocumentLibraryTool": ".documentlibrarytool", + "DocumentLibraryToolTypedDict": ".documentlibrarytool", "FIMCompletionRequest": ".fimcompletionrequest", "FIMCompletionRequestStop": ".fimcompletionrequest", "FIMCompletionRequestStopTypedDict": ".fimcompletionrequest", @@ -318,7 +413,11 @@ "FunctionCallTypedDict": ".functioncall", "FunctionName": ".functionname", "FunctionNameTypedDict": ".functionname", + "GuardrailConfig": ".guardrailconfig", + "GuardrailConfigTypedDict": ".guardrailconfig", "ImageDetail": ".imagedetail", + "ImageGenerationTool": ".imagegenerationtool", + "ImageGenerationToolTypedDict": ".imagegenerationtool", "ImageURL": ".imageurl", "ImageURLTypedDict": ".imageurl", "ImageURLChunk": ".imageurlchunk", @@ -328,10 +427,24 @@ "JSONSchema": ".jsonschema", "JSONSchemaTypedDict": ".jsonschema", "MistralPromptMode": ".mistralpromptmode", + "ModerationLLMAction": ".moderationllmaction", + "ModerationLlmv1CategoryThresholds": ".moderationllmv1categorythresholds", + "ModerationLlmv1CategoryThresholdsTypedDict": ".moderationllmv1categorythresholds", + "ModerationLlmv1Config": ".moderationllmv1config", + "ModerationLlmv1ConfigTypedDict": ".moderationllmv1config", + "ModerationLlmv2CategoryThresholds": ".moderationllmv2categorythresholds", + "ModerationLlmv2CategoryThresholdsTypedDict": ".moderationllmv2categorythresholds", + "ModerationLlmv2Config": ".moderationllmv2config", + "ModerationLlmv2ConfigTypedDict": ".moderationllmv2config", + "OAuth2TokenAuth": ".oauth2tokenauth", + "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", "Prediction": ".prediction", "PredictionTypedDict": ".prediction", + "ReasoningEffort": ".reasoningeffort", "ReferenceChunk": ".referencechunk", "ReferenceChunkTypedDict": ".referencechunk", + "ReferenceID": ".referencechunk", + "ReferenceIDTypedDict": ".referencechunk", "ResponseFormat": ".responseformat", "ResponseFormatTypedDict": ".responseformat", "ResponseFormats": ".responseformats", @@ -356,15 +469,16 @@ "ToolChoice": ".toolchoice", "ToolChoiceTypedDict": ".toolchoice", "ToolChoiceEnum": ".toolchoiceenum", + "ToolConfiguration": ".toolconfiguration", + "ToolConfigurationTypedDict": ".toolconfiguration", "ToolMessage": ".toolmessage", "ToolMessageContent": ".toolmessage", "ToolMessageContentTypedDict": ".toolmessage", "ToolMessageTypedDict": ".toolmessage", "ToolReferenceChunk": ".toolreferencechunk", + "ToolReferenceChunkTool": ".toolreferencechunk", + "ToolReferenceChunkToolTypedDict": ".toolreferencechunk", "ToolReferenceChunkTypedDict": ".toolreferencechunk", - "ToolUnion": ".toolreferencechunk", - "ToolUnionTypedDict": ".toolreferencechunk", - "ToolTypes": ".tooltypes", "UsageInfo": ".usageinfo", "UsageInfoTypedDict": ".usageinfo", "UserMessage": ".usermessage", @@ -377,6 +491,10 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", + "WebSearchPremiumTool": ".websearchpremiumtool", + "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", + "WebSearchTool": ".websearchtool", + "WebSearchToolTypedDict": ".websearchtool", } diff --git a/packages/gcp/src/mistralai/gcp/client/models/apikeyauth.py b/packages/gcp/src/mistralai/gcp/client/models/apikeyauth.py new file mode 100644 index 00000000..99d2ad79 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/apikeyauth.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.gcp.client.types import BaseModel +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class APIKeyAuthTypedDict(TypedDict): + value: str + type: Literal["api-key"] + + +class APIKeyAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[Literal["api-key"], AfterValidator(validate_const("api-key"))], + pydantic.Field(alias="type"), + ] = "api-key" + + +try: + APIKeyAuth.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/assistantmessage.py b/packages/gcp/src/mistralai/gcp/client/models/assistantmessage.py index 702ac470..63f3b0dd 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/assistantmessage.py +++ b/packages/gcp/src/mistralai/gcp/client/models/assistantmessage.py @@ -60,7 +60,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py index ae5a2fbf..89f4868b 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionchoice.py @@ -2,9 +2,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from mistralai.gcp.client.types import BaseModel, UnrecognizedStr -from typing import Literal, Union -from typing_extensions import TypedDict +from .deltamessage import DeltaMessage, DeltaMessageTypedDict +from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr +from pydantic import model_serializer +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypedDict ChatCompletionChoiceFinishReason = Union[ @@ -21,13 +23,32 @@ class ChatCompletionChoiceTypedDict(TypedDict): index: int - message: AssistantMessageTypedDict finish_reason: ChatCompletionChoiceFinishReason + message: NotRequired[AssistantMessageTypedDict] + messages: NotRequired[List[DeltaMessageTypedDict]] class ChatCompletionChoice(BaseModel): index: int - message: AssistantMessage - finish_reason: ChatCompletionChoiceFinishReason + + message: Optional[AssistantMessage] = None + + messages: Optional[List[DeltaMessage]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message", "messages"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py index 8229c5bb..0e3de413 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionrequest.py @@ -2,8 +2,14 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -11,6 +17,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.gcp.client.types import ( BaseModel, Nullable, @@ -58,6 +66,31 @@ ] +ChatCompletionRequestToolTypedDict = TypeAliasType( + "ChatCompletionRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -78,26 +111,26 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: NotRequired[ChatCompletionRequestStopTypedDict] + stop: NotRequired[Nullable[ChatCompletionRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -105,8 +138,10 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] class ChatCompletionRequest(BaseModel): @@ -119,7 +154,7 @@ class ChatCompletionRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = None + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -128,7 +163,7 @@ class ChatCompletionRequest(BaseModel): stream: Optional[bool] = False r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: Optional[ChatCompletionRequestStop] = None + stop: OptionalNullable[ChatCompletionRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -139,16 +174,16 @@ class ChatCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionRequestToolChoice] = None r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -160,9 +195,13 @@ class ChatCompletionRequest(BaseModel): parallel_tool_calls: Optional[bool] = None r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -182,18 +221,26 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", + "guardrails", ] ) nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", + "reasoning_effort", "prompt_mode", + "guardrails", ] ) serialized = handler(self) @@ -201,7 +248,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py index 3c228d2e..2adc7812 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py +++ b/packages/gcp/src/mistralai/gcp/client/models/chatcompletionstreamrequest.py @@ -2,8 +2,14 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -11,6 +17,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.gcp.client.types import ( BaseModel, Nullable, @@ -58,6 +66,31 @@ ] +ChatCompletionStreamRequestToolTypedDict = TypeAliasType( + "ChatCompletionStreamRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionStreamRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -78,25 +111,25 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""The prompt(s) to generate completions for, encoded as a list of dict with role and content.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] - stop: NotRequired[ChatCompletionStreamRequestStopTypedDict] + stop: NotRequired[Nullable[ChatCompletionStreamRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionStreamRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionStreamRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -104,8 +137,10 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] class ChatCompletionStreamRequest(BaseModel): @@ -118,7 +153,7 @@ class ChatCompletionStreamRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = None + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -126,7 +161,7 @@ class ChatCompletionStreamRequest(BaseModel): stream: Optional[bool] = True - stop: Optional[ChatCompletionStreamRequestStop] = None + stop: OptionalNullable[ChatCompletionStreamRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -137,16 +172,16 @@ class ChatCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionStreamRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -158,9 +193,13 @@ class ChatCompletionStreamRequest(BaseModel): parallel_tool_calls: Optional[bool] = None r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -180,18 +219,26 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", + "guardrails", ] ) nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", + "reasoning_effort", "prompt_mode", + "guardrails", ] ) serialized = handler(self) @@ -199,7 +246,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/codeinterpretertool.py b/packages/gcp/src/mistralai/gcp/client/models/codeinterpretertool.py new file mode 100644 index 00000000..9fdedce7 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/codeinterpretertool.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CodeInterpreterToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["code_interpreter"] + + +class CodeInterpreterTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["code_interpreter"], + AfterValidator(validate_const("code_interpreter")), + ], + pydantic.Field(alias="type"), + ] = "code_interpreter" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CodeInterpreterTool.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/completionchunk.py b/packages/gcp/src/mistralai/gcp/client/models/completionchunk.py index a0b1ae2f..3f8d8c6b 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/completionchunk.py +++ b/packages/gcp/src/mistralai/gcp/client/models/completionchunk.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py b/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py index e58d4c88..0f189b55 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py +++ b/packages/gcp/src/mistralai/gcp/client/models/completionresponsestreamchoice.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/packages/gcp/src/mistralai/gcp/client/models/customconnector.py b/packages/gcp/src/mistralai/gcp/client/models/customconnector.py new file mode 100644 index 00000000..38299726 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/customconnector.py @@ -0,0 +1,80 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict +from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic import Field, model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +AuthorizationTypedDict = TypeAliasType( + "AuthorizationTypedDict", Union[OAuth2TokenAuthTypedDict, APIKeyAuthTypedDict] +) + + +Authorization = Annotated[ + Union[APIKeyAuth, OAuth2TokenAuth], Field(discriminator="type") +] + + +class CustomConnectorTypedDict(TypedDict): + connector_id: str + type: Literal["connector"] + authorization: NotRequired[Nullable[AuthorizationTypedDict]] + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + + +class CustomConnector(BaseModel): + connector_id: str + + type: Annotated[ + Annotated[Literal["connector"], AfterValidator(validate_const("connector"))], + pydantic.Field(alias="type"), + ] = "connector" + + authorization: OptionalNullable[Authorization] = UNSET + + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["authorization", "tool_configuration"]) + nullable_fields = set(["authorization", "tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomConnector.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/deltamessage.py b/packages/gcp/src/mistralai/gcp/client/models/deltamessage.py index 63e6a7f3..1943aec7 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/deltamessage.py +++ b/packages/gcp/src/mistralai/gcp/client/models/deltamessage.py @@ -11,7 +11,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List, Union +from typing import Any, Dict, List, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -29,6 +29,10 @@ class DeltaMessageTypedDict(TypedDict): role: NotRequired[Nullable[str]] content: NotRequired[Nullable[DeltaMessageContentTypedDict]] tool_calls: NotRequired[Nullable[List[ToolCallTypedDict]]] + tool_call_id: NotRequired[Nullable[str]] + index: NotRequired[Nullable[int]] + r"""If the completion returns multiple messages, this is to specify which message this delta is for.""" + metadata: NotRequired[Nullable[Dict[str, Any]]] class DeltaMessage(BaseModel): @@ -38,16 +42,27 @@ class DeltaMessage(BaseModel): tool_calls: OptionalNullable[List[ToolCall]] = UNSET + tool_call_id: OptionalNullable[str] = UNSET + + index: OptionalNullable[int] = UNSET + r"""If the completion returns multiple messages, this is to specify which message this delta is for.""" + + metadata: OptionalNullable[Dict[str, Any]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["role", "content", "tool_calls"]) - nullable_fields = set(["role", "content", "tool_calls"]) + optional_fields = set( + ["role", "content", "tool_calls", "tool_call_id", "index", "metadata"] + ) + nullable_fields = set( + ["role", "content", "tool_calls", "tool_call_id", "index", "metadata"] + ) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/documentlibrarytool.py b/packages/gcp/src/mistralai/gcp/client/models/documentlibrarytool.py new file mode 100644 index 00000000..36fb81e5 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/documentlibrarytool.py @@ -0,0 +1,70 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DocumentLibraryToolTypedDict(TypedDict): + library_ids: List[str] + r"""Ids of the library in which to search.""" + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["document_library"] + + +class DocumentLibraryTool(BaseModel): + library_ids: List[str] + r"""Ids of the library in which to search.""" + + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["document_library"], + AfterValidator(validate_const("document_library")), + ], + pydantic.Field(alias="type"), + ] = "document_library" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + DocumentLibraryTool.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/fimcompletionrequest.py b/packages/gcp/src/mistralai/gcp/client/models/fimcompletionrequest.py index e460f76c..5b6013f6 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/fimcompletionrequest.py +++ b/packages/gcp/src/mistralai/gcp/client/models/fimcompletionrequest.py @@ -32,13 +32,13 @@ class FIMCompletionRequestTypedDict(TypedDict): r"""The text/code to complete.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: NotRequired[FIMCompletionRequestStopTypedDict] + stop: NotRequired[Nullable[FIMCompletionRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -59,7 +59,7 @@ class FIMCompletionRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = 1 + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -68,7 +68,7 @@ class FIMCompletionRequest(BaseModel): stream: Optional[bool] = False r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: Optional[FIMCompletionRequestStop] = None + stop: OptionalNullable[FIMCompletionRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -100,7 +100,9 @@ def serialize_model(self, handler): nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "suffix", @@ -112,7 +114,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/fimcompletionstreamrequest.py b/packages/gcp/src/mistralai/gcp/client/models/fimcompletionstreamrequest.py index fffc3054..d2e86d40 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/fimcompletionstreamrequest.py +++ b/packages/gcp/src/mistralai/gcp/client/models/fimcompletionstreamrequest.py @@ -32,12 +32,12 @@ class FIMCompletionStreamRequestTypedDict(TypedDict): r"""The text/code to complete.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] - stop: NotRequired[FIMCompletionStreamRequestStopTypedDict] + stop: NotRequired[Nullable[FIMCompletionStreamRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" @@ -58,7 +58,7 @@ class FIMCompletionStreamRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = 1 + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -66,7 +66,7 @@ class FIMCompletionStreamRequest(BaseModel): stream: Optional[bool] = True - stop: Optional[FIMCompletionStreamRequestStop] = None + stop: OptionalNullable[FIMCompletionStreamRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -98,7 +98,9 @@ def serialize_model(self, handler): nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "suffix", @@ -110,7 +112,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/function.py b/packages/gcp/src/mistralai/gcp/client/models/function.py index 439e8313..877b7273 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/function.py +++ b/packages/gcp/src/mistralai/gcp/client/models/function.py @@ -31,7 +31,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/gcp/src/mistralai/gcp/client/models/guardrailconfig.py b/packages/gcp/src/mistralai/gcp/client/models/guardrailconfig.py new file mode 100644 index 00000000..abc5deca --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/guardrailconfig.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .moderationllmv1config import ModerationLlmv1Config, ModerationLlmv1ConfigTypedDict +from .moderationllmv2config import ModerationLlmv2Config, ModerationLlmv2ConfigTypedDict +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GuardrailConfigTypedDict(TypedDict): + block_on_error: NotRequired[bool] + r"""If true, return HTTP 403 and block request in the event of a server-side error""" + moderation_llm_v1: NotRequired[Nullable[ModerationLlmv1ConfigTypedDict]] + moderation_llm_v2: NotRequired[Nullable[ModerationLlmv2ConfigTypedDict]] + + +class GuardrailConfig(BaseModel): + block_on_error: Optional[bool] = False + r"""If true, return HTTP 403 and block request in the event of a server-side error""" + + moderation_llm_v1: OptionalNullable[ModerationLlmv1Config] = UNSET + + moderation_llm_v2: OptionalNullable[ModerationLlmv2Config] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["block_on_error", "moderation_llm_v1", "moderation_llm_v2"] + ) + nullable_fields = set(["moderation_llm_v1", "moderation_llm_v2"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/imagegenerationtool.py b/packages/gcp/src/mistralai/gcp/client/models/imagegenerationtool.py new file mode 100644 index 00000000..e6b28920 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/imagegenerationtool.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ImageGenerationToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["image_generation"] + + +class ImageGenerationTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["image_generation"], + AfterValidator(validate_const("image_generation")), + ], + pydantic.Field(alias="type"), + ] = "image_generation" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ImageGenerationTool.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/imageurl.py b/packages/gcp/src/mistralai/gcp/client/models/imageurl.py index 903d0a1a..99e55598 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/imageurl.py +++ b/packages/gcp/src/mistralai/gcp/client/models/imageurl.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/imageurlchunk.py b/packages/gcp/src/mistralai/gcp/client/models/imageurlchunk.py index 4bec0eec..e939c34b 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/imageurlchunk.py +++ b/packages/gcp/src/mistralai/gcp/client/models/imageurlchunk.py @@ -19,14 +19,14 @@ class ImageURLChunkTypedDict(TypedDict): - r"""{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0""" + r"""{\"type\":\"image_url\",\"image_url\":\"data:image/png;base64,iVBORw0\"}""" image_url: ImageURLUnionTypedDict type: Literal["image_url"] class ImageURLChunk(BaseModel): - r"""{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0""" + r"""{\"type\":\"image_url\",\"image_url\":\"data:image/png;base64,iVBORw0\"}""" image_url: ImageURLUnion diff --git a/packages/gcp/src/mistralai/gcp/client/models/jsonschema.py b/packages/gcp/src/mistralai/gcp/client/models/jsonschema.py index 684ac09f..f500fa56 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/jsonschema.py +++ b/packages/gcp/src/mistralai/gcp/client/models/jsonschema.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/moderationllmaction.py b/packages/gcp/src/mistralai/gcp/client/models/moderationllmaction.py new file mode 100644 index 00000000..cff03d9a --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/moderationllmaction.py @@ -0,0 +1,10 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Literal + + +ModerationLLMAction = Literal[ + "none", + "block", +] diff --git a/packages/gcp/src/mistralai/gcp/client/models/moderationllmv1categorythresholds.py b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv1categorythresholds.py new file mode 100644 index 00000000..3f5713fe --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv1categorythresholds.py @@ -0,0 +1,93 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv1CategoryThresholdsTypedDict(TypedDict): + sexual: NotRequired[Nullable[float]] + hate_and_discrimination: NotRequired[Nullable[float]] + violence_and_threats: NotRequired[Nullable[float]] + dangerous_and_criminal_content: NotRequired[Nullable[float]] + selfharm: NotRequired[Nullable[float]] + health: NotRequired[Nullable[float]] + financial: NotRequired[Nullable[float]] + law: NotRequired[Nullable[float]] + pii: NotRequired[Nullable[float]] + + +class ModerationLlmv1CategoryThresholds(BaseModel): + sexual: OptionalNullable[float] = UNSET + + hate_and_discrimination: OptionalNullable[float] = UNSET + + violence_and_threats: OptionalNullable[float] = UNSET + + dangerous_and_criminal_content: OptionalNullable[float] = UNSET + + selfharm: OptionalNullable[float] = UNSET + + health: OptionalNullable[float] = UNSET + + financial: OptionalNullable[float] = UNSET + + law: OptionalNullable[float] = UNSET + + pii: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous_and_criminal_content", + "selfharm", + "health", + "financial", + "law", + "pii", + ] + ) + nullable_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous_and_criminal_content", + "selfharm", + "health", + "financial", + "law", + "pii", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/moderationllmv1config.py b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv1config.py new file mode 100644 index 00000000..579acd73 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv1config.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .moderationllmaction import ModerationLLMAction +from .moderationllmv1categorythresholds import ( + ModerationLlmv1CategoryThresholds, + ModerationLlmv1CategoryThresholdsTypedDict, +) +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv1ConfigTypedDict(TypedDict): + model_name: NotRequired[str] + r"""Override model name. Should be omitted in general.""" + custom_category_thresholds: NotRequired[ + Nullable[ModerationLlmv1CategoryThresholdsTypedDict] + ] + ignore_other_categories: NotRequired[bool] + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + action: NotRequired[ModerationLLMAction] + + +class ModerationLlmv1Config(BaseModel): + model_name: Optional[str] = "mistral-moderation-2411" + r"""Override model name. Should be omitted in general.""" + + custom_category_thresholds: OptionalNullable[ModerationLlmv1CategoryThresholds] = ( + UNSET + ) + + ignore_other_categories: Optional[bool] = False + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + + action: Optional[ModerationLLMAction] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "model_name", + "custom_category_thresholds", + "ignore_other_categories", + "action", + ] + ) + nullable_fields = set(["custom_category_thresholds"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/moderationllmv2categorythresholds.py b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv2categorythresholds.py new file mode 100644 index 00000000..8b925260 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv2categorythresholds.py @@ -0,0 +1,103 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv2CategoryThresholdsTypedDict(TypedDict): + sexual: NotRequired[Nullable[float]] + hate_and_discrimination: NotRequired[Nullable[float]] + violence_and_threats: NotRequired[Nullable[float]] + dangerous: NotRequired[Nullable[float]] + criminal: NotRequired[Nullable[float]] + selfharm: NotRequired[Nullable[float]] + health: NotRequired[Nullable[float]] + financial: NotRequired[Nullable[float]] + law: NotRequired[Nullable[float]] + pii: NotRequired[Nullable[float]] + jailbreaking: NotRequired[Nullable[float]] + + +class ModerationLlmv2CategoryThresholds(BaseModel): + sexual: OptionalNullable[float] = UNSET + + hate_and_discrimination: OptionalNullable[float] = UNSET + + violence_and_threats: OptionalNullable[float] = UNSET + + dangerous: OptionalNullable[float] = UNSET + + criminal: OptionalNullable[float] = UNSET + + selfharm: OptionalNullable[float] = UNSET + + health: OptionalNullable[float] = UNSET + + financial: OptionalNullable[float] = UNSET + + law: OptionalNullable[float] = UNSET + + pii: OptionalNullable[float] = UNSET + + jailbreaking: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + nullable_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/moderationllmv2config.py b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv2config.py new file mode 100644 index 00000000..000d2e2c --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/moderationllmv2config.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .moderationllmaction import ModerationLLMAction +from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, +) +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv2ConfigTypedDict(TypedDict): + model_name: NotRequired[str] + r"""Override model name. Should be omitted in general.""" + custom_category_thresholds: NotRequired[ + Nullable[ModerationLlmv2CategoryThresholdsTypedDict] + ] + ignore_other_categories: NotRequired[bool] + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + action: NotRequired[ModerationLLMAction] + + +class ModerationLlmv2Config(BaseModel): + model_name: Optional[str] = "mistral-moderation-2603" + r"""Override model name. Should be omitted in general.""" + + custom_category_thresholds: OptionalNullable[ModerationLlmv2CategoryThresholds] = ( + UNSET + ) + + ignore_other_categories: Optional[bool] = False + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + + action: Optional[ModerationLLMAction] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "model_name", + "custom_category_thresholds", + "ignore_other_categories", + "action", + ] + ) + nullable_fields = set(["custom_category_thresholds"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/oauth2tokenauth.py b/packages/gcp/src/mistralai/gcp/client/models/oauth2tokenauth.py new file mode 100644 index 00000000..d1b4c935 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/oauth2tokenauth.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.gcp.client.types import BaseModel +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class OAuth2TokenAuthTypedDict(TypedDict): + value: str + type: Literal["oauth2-token"] + + +class OAuth2TokenAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[ + Literal["oauth2-token"], AfterValidator(validate_const("oauth2-token")) + ], + pydantic.Field(alias="type"), + ] = "oauth2-token" + + +try: + OAuth2TokenAuth.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/prediction.py b/packages/gcp/src/mistralai/gcp/client/models/prediction.py index 2e325289..1e290f33 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/prediction.py +++ b/packages/gcp/src/mistralai/gcp/client/models/prediction.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py b/packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py new file mode 100644 index 00000000..43ffa02b --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/reasoningeffort.py @@ -0,0 +1,10 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Literal + + +ReasoningEffort = Literal[ + "none", + "high", +] diff --git a/packages/gcp/src/mistralai/gcp/client/models/referencechunk.py b/packages/gcp/src/mistralai/gcp/client/models/referencechunk.py index 261c4755..eca4c4de 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/referencechunk.py +++ b/packages/gcp/src/mistralai/gcp/client/models/referencechunk.py @@ -6,17 +6,23 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional -from typing_extensions import Annotated, TypedDict +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +ReferenceIDTypedDict = TypeAliasType("ReferenceIDTypedDict", Union[int, str]) + + +ReferenceID = TypeAliasType("ReferenceID", Union[int, str]) class ReferenceChunkTypedDict(TypedDict): - reference_ids: List[int] + reference_ids: List[ReferenceIDTypedDict] type: Literal["reference"] class ReferenceChunk(BaseModel): - reference_ids: List[int] + reference_ids: List[ReferenceID] type: Annotated[ Annotated[ @@ -33,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/gcp/src/mistralai/gcp/client/models/responseformat.py b/packages/gcp/src/mistralai/gcp/client/models/responseformat.py index f3aa9930..afd1bd30 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/responseformat.py +++ b/packages/gcp/src/mistralai/gcp/client/models/responseformat.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py b/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py index d534fc1e..34397d30 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py +++ b/packages/gcp/src/mistralai/gcp/client/models/thinkchunk.py @@ -4,7 +4,13 @@ from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict -from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.gcp.client.utils import validate_const import pydantic from pydantic import model_serializer @@ -27,6 +33,8 @@ class ThinkChunkTypedDict(TypedDict): thinking: List[ThinkingTypedDict] type: Literal["thinking"] + signature: NotRequired[Nullable[str]] + r"""Signature to replay some reasoning blocks across turns.""" closed: NotRequired[bool] r"""Whether the thinking chunk is closed or not. Currently only used for prefixing.""" @@ -39,21 +47,33 @@ class ThinkChunk(BaseModel): pydantic.Field(alias="type"), ] = "thinking" + signature: OptionalNullable[str] = UNSET + r"""Signature to replay some reasoning blocks across turns.""" + closed: Optional[bool] = None r"""Whether the thinking chunk is closed or not. Currently only used for prefixing.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["closed"]) + optional_fields = set(["signature", "closed"]) + nullable_fields = set(["signature"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/tool.py b/packages/gcp/src/mistralai/gcp/client/models/tool.py index 670aa81f..e95b3036 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/tool.py +++ b/packages/gcp/src/mistralai/gcp/client/models/tool.py @@ -2,35 +2,32 @@ from __future__ import annotations from .function import Function, FunctionTypedDict -from .tooltypes import ToolTypes -from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict +from mistralai.gcp.client.types import BaseModel, UnrecognizedStr +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypedDict class ToolTypedDict(TypedDict): function: FunctionTypedDict - type: NotRequired[ToolTypes] + type: Union[Literal["function"], UnrecognizedStr] class Tool(BaseModel): function: Function - type: Optional[ToolTypes] = None + type: Annotated[ + Annotated[ + Union[Literal["function"], UnrecognizedStr], + AfterValidator(validate_const("function")), + ], + pydantic.Field(alias="type"), + ] = "function" - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["type"]) - serialized = handler(self) - m = {} - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m +try: + Tool.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolcall.py b/packages/gcp/src/mistralai/gcp/client/models/toolcall.py index 3ea8e283..4e4c2581 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/toolcall.py +++ b/packages/gcp/src/mistralai/gcp/client/models/toolcall.py @@ -2,7 +2,6 @@ from __future__ import annotations from .functioncall import FunctionCall, FunctionCallTypedDict -from .tooltypes import ToolTypes from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -12,7 +11,7 @@ class ToolCallTypedDict(TypedDict): function: FunctionCallTypedDict id: NotRequired[str] - type: NotRequired[ToolTypes] + type: NotRequired[str] index: NotRequired[int] @@ -21,7 +20,7 @@ class ToolCall(BaseModel): id: Optional[str] = "null" - type: Optional[ToolTypes] = None + type: Optional[str] = None index: Optional[int] = 0 @@ -33,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py b/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py index 6e795fd7..528cc801 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py +++ b/packages/gcp/src/mistralai/gcp/client/models/toolchoice.py @@ -2,7 +2,6 @@ from __future__ import annotations from .functionname import FunctionName, FunctionNameTypedDict -from .tooltypes import ToolTypes from mistralai.gcp.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -14,7 +13,7 @@ class ToolChoiceTypedDict(TypedDict): function: FunctionNameTypedDict r"""this restriction of `Function` is used to select a specific function to call""" - type: NotRequired[ToolTypes] + type: NotRequired[str] class ToolChoice(BaseModel): @@ -23,7 +22,7 @@ class ToolChoice(BaseModel): function: FunctionName r"""this restriction of `Function` is used to select a specific function to call""" - type: Optional[ToolTypes] = None + type: Optional[str] = None @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -33,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolconfiguration.py b/packages/gcp/src/mistralai/gcp/client/models/toolconfiguration.py new file mode 100644 index 00000000..724ed8c6 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/toolconfiguration.py @@ -0,0 +1,52 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ToolConfigurationTypedDict(TypedDict): + exclude: NotRequired[Nullable[List[str]]] + include: NotRequired[Nullable[List[str]]] + requires_confirmation: NotRequired[Nullable[List[str]]] + + +class ToolConfiguration(BaseModel): + exclude: OptionalNullable[List[str]] = UNSET + + include: OptionalNullable[List[str]] = UNSET + + requires_confirmation: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["exclude", "include", "requires_confirmation"]) + nullable_fields = set(["exclude", "include", "requires_confirmation"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolmessage.py b/packages/gcp/src/mistralai/gcp/client/models/toolmessage.py index ce160391..a5a9645d 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/toolmessage.py +++ b/packages/gcp/src/mistralai/gcp/client/models/toolmessage.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py b/packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py index 0a2a7fa3..eb2b80e4 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py +++ b/packages/gcp/src/mistralai/gcp/client/models/toolreferencechunk.py @@ -17,14 +17,18 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -ToolUnionTypedDict = TypeAliasType("ToolUnionTypedDict", Union[BuiltInConnectors, str]) +ToolReferenceChunkToolTypedDict = TypeAliasType( + "ToolReferenceChunkToolTypedDict", Union[BuiltInConnectors, str] +) -ToolUnion = TypeAliasType("ToolUnion", Union[BuiltInConnectors, str]) +ToolReferenceChunkTool = TypeAliasType( + "ToolReferenceChunkTool", Union[BuiltInConnectors, str] +) class ToolReferenceChunkTypedDict(TypedDict): - tool: ToolUnionTypedDict + tool: ToolReferenceChunkToolTypedDict title: str type: Literal["tool_reference"] url: NotRequired[Nullable[str]] @@ -33,7 +37,7 @@ class ToolReferenceChunkTypedDict(TypedDict): class ToolReferenceChunk(BaseModel): - tool: ToolUnion + tool: ToolReferenceChunkTool title: str @@ -60,7 +64,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/tooltypes.py b/packages/gcp/src/mistralai/gcp/client/models/tooltypes.py deleted file mode 100644 index fd1aa13d..00000000 --- a/packages/gcp/src/mistralai/gcp/client/models/tooltypes.py +++ /dev/null @@ -1,8 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.gcp.client.types import UnrecognizedStr -from typing import Literal, Union - - -ToolTypes = Union[Literal["function",], UnrecognizedStr] diff --git a/packages/gcp/src/mistralai/gcp/client/models/usageinfo.py b/packages/gcp/src/mistralai/gcp/client/models/usageinfo.py index cb6feb6e..df40efab 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/usageinfo.py +++ b/packages/gcp/src/mistralai/gcp/client/models/usageinfo.py @@ -59,8 +59,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/gcp/src/mistralai/gcp/client/models/usermessage.py b/packages/gcp/src/mistralai/gcp/client/models/usermessage.py index e237e900..8199f293 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/usermessage.py +++ b/packages/gcp/src/mistralai/gcp/client/models/usermessage.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/packages/gcp/src/mistralai/gcp/client/models/validationerror.py b/packages/gcp/src/mistralai/gcp/client/models/validationerror.py index 3ff872c1..653b63e9 100644 --- a/packages/gcp/src/mistralai/gcp/client/models/validationerror.py +++ b/packages/gcp/src/mistralai/gcp/client/models/validationerror.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/gcp/src/mistralai/gcp/client/models/websearchpremiumtool.py b/packages/gcp/src/mistralai/gcp/client/models/websearchpremiumtool.py new file mode 100644 index 00000000..e416f964 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/websearchpremiumtool.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WebSearchPremiumToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["web_search_premium"] + + +class WebSearchPremiumTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["web_search_premium"], + AfterValidator(validate_const("web_search_premium")), + ], + pydantic.Field(alias="type"), + ] = "web_search_premium" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WebSearchPremiumTool.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/models/websearchtool.py b/packages/gcp/src/mistralai/gcp/client/models/websearchtool.py new file mode 100644 index 00000000..69d6e043 --- /dev/null +++ b/packages/gcp/src/mistralai/gcp/client/models/websearchtool.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.gcp.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.gcp.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WebSearchToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["web_search"] + + +class WebSearchTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[Literal["web_search"], AfterValidator(validate_const("web_search"))], + pydantic.Field(alias="type"), + ] = "web_search" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WebSearchTool.model_rebuild() +except NameError: + pass diff --git a/packages/gcp/src/mistralai/gcp/client/utils/eventstreaming.py b/packages/gcp/src/mistralai/gcp/client/utils/eventstreaming.py index f2052fc2..3bdcd6d3 100644 --- a/packages/gcp/src/mistralai/gcp/client/utils/eventstreaming.py +++ b/packages/gcp/src/mistralai/gcp/client/utils/eventstreaming.py @@ -32,9 +32,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events(response, decoder, sentinel) + self.generator = stream_events( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -68,9 +71,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events_async(response, decoder, sentinel) + self.generator = stream_events_async( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -116,6 +122,7 @@ async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 @@ -138,7 +145,11 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -151,7 +162,11 @@ async def stream_events_async( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -161,6 +176,7 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 @@ -183,7 +199,11 @@ def stream_events( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -196,7 +216,11 @@ def stream_events( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -208,6 +232,7 @@ def _parse_event( decoder: Callable[[str], T], sentinel: Optional[str] = None, event_id: Optional[str] = None, + data_required: bool = True, ) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) @@ -250,6 +275,10 @@ def _parse_event( if sentinel and data == f"{sentinel}\n": return None, True, event_id + # Skip data-less events when data is required + if not data and publish and data_required: + return None, False, event_id + if data: data = data[:-1] try: diff --git a/packages/gcp/src/mistralai/gcp/client/utils/metadata.py b/packages/gcp/src/mistralai/gcp/client/utils/metadata.py index 173b3e5c..5abddd58 100644 --- a/packages/gcp/src/mistralai/gcp/client/utils/metadata.py +++ b/packages/gcp/src/mistralai/gcp/client/utils/metadata.py @@ -15,6 +15,7 @@ class SecurityMetadata: scheme_type: Optional[str] = None sub_type: Optional[str] = None field_name: Optional[str] = None + composite: bool = False def get_field_name(self, default: str) -> str: return self.field_name or default diff --git a/packages/gcp/src/mistralai/gcp/client/utils/security.py b/packages/gcp/src/mistralai/gcp/client/utils/security.py index 17996bd5..42d8d78e 100644 --- a/packages/gcp/src/mistralai/gcp/client/utils/security.py +++ b/packages/gcp/src/mistralai/gcp/client/utils/security.py @@ -5,6 +5,7 @@ Any, Dict, List, + Optional, Tuple, ) from pydantic import BaseModel @@ -16,7 +17,9 @@ ) -def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: +def get_security( + security: Any, allowed_fields: Optional[List[str]] = None +) -> Tuple[Dict[str, str], Dict[str, List[str]]]: headers: Dict[str, str] = {} query_params: Dict[str, List[str]] = {} @@ -27,7 +30,14 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: raise TypeError("security must be a pydantic model") sec_fields: Dict[str, FieldInfo] = security.__class__.model_fields - for name in sec_fields: + sec_field_names = ( + list(sec_fields.keys()) if allowed_fields is None else allowed_fields + ) + + for name in sec_field_names: + if name not in sec_fields: + continue + sec_field = sec_fields[name] value = getattr(security, name) @@ -49,6 +59,9 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: else: _parse_security_scheme(headers, query_params, metadata, name, value) + if not metadata.composite: + return headers, query_params + return headers, query_params @@ -59,15 +72,24 @@ def _parse_security_option( raise TypeError("security option must be a pydantic model") opt_fields: Dict[str, FieldInfo] = option.__class__.model_fields + for name in opt_fields: opt_field = opt_fields[name] metadata = find_field_metadata(opt_field, SecurityMetadata) if metadata is None or not metadata.scheme: continue - _parse_security_scheme( - headers, query_params, metadata, name, getattr(option, name) - ) + + value = getattr(option, name) + if ( + metadata.scheme_type == "http" + and metadata.sub_type == "basic" + and not isinstance(value, BaseModel) + ): + _parse_basic_auth_scheme(headers, option) + return + + _parse_security_scheme(headers, query_params, metadata, name, value) def _parse_security_scheme( diff --git a/packages/gcp/src/mistralai/gcp/client/utils/serializers.py b/packages/gcp/src/mistralai/gcp/client/utils/serializers.py index 14321eb4..d2149f8b 100644 --- a/packages/gcp/src/mistralai/gcp/client/utils/serializers.py +++ b/packages/gcp/src/mistralai/gcp/client/utils/serializers.py @@ -17,8 +17,7 @@ def serialize_decimal(as_str: bool): def serialize(d): - # Optional[T] is a Union[T, None] - if is_union(type(d)) and type(None) in get_args(type(d)) and d is None: + if d is None: return None if isinstance(d, Unset): return d @@ -46,8 +45,7 @@ def validate_decimal(d): def serialize_float(as_str: bool): def serialize(f): - # Optional[T] is a Union[T, None] - if is_union(type(f)) and type(None) in get_args(type(f)) and f is None: + if f is None: return None if isinstance(f, Unset): return f @@ -75,8 +73,7 @@ def validate_float(f): def serialize_int(as_str: bool): def serialize(i): - # Optional[T] is a Union[T, None] - if is_union(type(i)) and type(None) in get_args(type(i)) and i is None: + if i is None: return None if isinstance(i, Unset): return i @@ -104,8 +101,7 @@ def validate_int(b): def validate_const(v): def validate(c): - # Optional[T] is a Union[T, None] - if is_union(type(c)) and type(None) in get_args(type(c)) and c is None: + if c is None: return None if v != c: diff --git a/packages/gcp/uv.lock b/packages/gcp/uv.lock index 3fca8e89..89b92c92 100644 --- a/packages/gcp/uv.lock +++ b/packages/gcp/uv.lock @@ -7,6 +7,10 @@ resolution-markers = [ "python_full_version < '3.11'", ] +[options] +exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values. +exclude-newer-span = "P7D" + [[package]] name = "annotated-types" version = "0.7.0" @@ -277,7 +281,7 @@ wheels = [ [[package]] name = "mistralai-gcp" -version = "2.0.0" +version = "2.1.0" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, diff --git a/tests/test_gcp_v2_parity.py b/tests/test_gcp_v2_parity.py index 0d6471e4..71ca1348 100644 --- a/tests/test_gcp_v2_parity.py +++ b/tests/test_gcp_v2_parity.py @@ -51,17 +51,17 @@ def mark_tested(resource: str, method: str) -> None: ("model", _EMPTY), ("messages", _EMPTY), ("temperature", UNSET), - ("top_p", None), + ("top_p", UNSET), ("max_tokens", UNSET), ("stream", False), - ("stop", None), + ("stop", UNSET), ("random_seed", UNSET), ("metadata", UNSET), ("response_format", None), ("tools", UNSET), ("tool_choice", None), - ("presence_penalty", None), - ("frequency_penalty", None), + ("presence_penalty", UNSET), + ("frequency_penalty", UNSET), ("n", UNSET), ("prediction", None), ("parallel_tool_calls", None), @@ -81,10 +81,10 @@ def mark_tested(resource: str, method: str) -> None: ("model", _EMPTY), ("prompt", _EMPTY), ("temperature", UNSET), - ("top_p", 1), + ("top_p", UNSET), ("max_tokens", UNSET), ("stream", False), - ("stop", None), + ("stop", UNSET), ("random_seed", UNSET), ("metadata", UNSET), ("suffix", UNSET), @@ -298,13 +298,13 @@ def test_stream_stream_defaults_true(self): sig = inspect.signature(Fim.stream) assert sig.parameters["stream"].default is True - def test_complete_top_p_defaults_to_1(self): + def test_complete_top_p_defaults_to_unset(self): sig = inspect.signature(Fim.complete) - assert sig.parameters["top_p"].default == 1 + assert sig.parameters["top_p"].default == UNSET - def test_stream_top_p_defaults_to_1(self): + def test_stream_top_p_defaults_to_unset(self): sig = inspect.signature(Fim.stream) - assert sig.parameters["top_p"].default == 1 + assert sig.parameters["top_p"].default == UNSET class TestGCPCoverage: From 59f1bf779ab910fec4a0cebe9bafb4caaf8b4b1c Mon Sep 17 00:00:00 2001 From: maiengineering Date: Fri, 22 May 2026 18:08:51 +0200 Subject: [PATCH 81/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRAL-PYTHON-SDK-AZURE=20MISTRALAI-AZURE-SDK=20?= =?UTF-8?q?[speakeasy/mistralai-azure-sdk-26292833044-1]=202.1.0=20(#549)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.763.6 * chore: align pyproject.toml and uv.lock to version 2.1.0 * fix(examples,tests): adapt to regenerated SDK changes - examples/azure/chat_no_streaming.py: guard against None message (message can now be AssistantMessage | None in the new generation) - tests/test_azure_v2_parity.py: top_p, stop, presence_penalty, and frequency_penalty now default to UNSET instead of None * fix(tests): remove id from OCR_PROCESS_PARAMS The regenerated SDK no longer exposes the id parameter on Ocr.process (removed from the spec). Drop the obsolete test entry. --------- Co-authored-by: speakeasybot --- .speakeasy/workflow.lock | 12 +- examples/azure/chat_no_streaming.py | 3 +- packages/azure/.speakeasy/gen.lock | 476 ++++++++++++------ packages/azure/.speakeasy/gen.yaml | 2 +- packages/azure/RELEASES.md | 12 +- packages/azure/docs/models/apikeyauth.md | 9 + packages/azure/docs/models/authorization.md | 17 + .../azure/docs/models/builtinconnectors.md | 19 +- .../azure/docs/models/chatcompletionchoice.md | 3 +- .../chatcompletionchoicefinishreason.md | 23 +- .../docs/models/chatcompletionrequest.md | 12 +- .../docs/models/chatcompletionrequesttool.md | 47 ++ .../models/chatcompletionstreamrequest.md | 12 +- .../models/chatcompletionstreamrequesttool.md | 47 ++ .../azure/docs/models/codeinterpretertool.md | 9 + ...pletionresponsestreamchoicefinishreason.md | 21 +- .../models/confidencescoresgranularity.md | 14 + packages/azure/docs/models/customconnector.md | 11 + packages/azure/docs/models/deltamessage.md | 13 +- .../azure/docs/models/documentlibrarytool.md | 10 + packages/azure/docs/models/format_.md | 17 +- packages/azure/docs/models/guardrailconfig.md | 10 + packages/azure/docs/models/imagedetail.md | 19 +- .../azure/docs/models/imagegenerationtool.md | 9 + packages/azure/docs/models/imageurlchunk.md | 2 +- .../azure/docs/models/mistralpromptmode.md | 15 +- .../azure/docs/models/moderationllmaction.md | 14 + .../moderationllmv1categorythresholds.md | 16 + .../docs/models/moderationllmv1config.md | 11 + .../moderationllmv2categorythresholds.md | 18 + .../docs/models/moderationllmv2config.md | 11 + packages/azure/docs/models/oauth2tokenauth.md | 9 + .../azure/docs/models/ocrconfidencescore.md | 12 + .../docs/models/ocrpageconfidencescores.md | 18 + packages/azure/docs/models/ocrpageobject.md | 21 +- packages/azure/docs/models/ocrrequest.md | 6 +- packages/azure/docs/models/ocrtableobject.md | 11 +- packages/azure/docs/models/pages.md | 19 + packages/azure/docs/models/reasoningeffort.md | 14 + packages/azure/docs/models/referencechunk.md | 8 +- packages/azure/docs/models/referenceid.md | 17 + packages/azure/docs/models/responseformats.md | 15 +- packages/azure/docs/models/tableformat.md | 13 +- packages/azure/docs/models/thinkchunk.md | 1 + packages/azure/docs/models/tool.md | 8 +- packages/azure/docs/models/toolcall.md | 12 +- packages/azure/docs/models/toolchoice.md | 2 +- packages/azure/docs/models/toolchoiceenum.md | 17 +- .../azure/docs/models/toolconfiguration.md | 10 + .../azure/docs/models/toolreferencechunk.md | 16 +- ...toolunion.md => toolreferencechunktool.md} | 2 +- packages/azure/docs/models/tooltypes.md | 8 - .../azure/docs/models/websearchpremiumtool.md | 9 + packages/azure/docs/models/websearchtool.md | 9 + packages/azure/pyproject.toml | 2 +- .../src/mistralai/azure/client/_version.py | 6 +- .../src/mistralai/azure/client/basesdk.py | 86 ++-- .../azure/src/mistralai/azure/client/chat.py | 144 ++++-- .../mistralai/azure/client/models/__init__.py | 160 +++++- .../azure/client/models/apikeyauth.py | 29 ++ .../azure/client/models/assistantmessage.py | 2 +- .../client/models/chatcompletionchoice.py | 33 +- .../client/models/chatcompletionrequest.py | 69 ++- .../models/chatcompletionstreamrequest.py | 69 ++- .../client/models/codeinterpretertool.py | 65 +++ .../azure/client/models/completionchunk.py | 2 +- .../models/completionresponsestreamchoice.py | 2 +- .../azure/client/models/customconnector.py | 80 +++ .../azure/client/models/deltamessage.py | 23 +- .../client/models/documentlibrarytool.py | 70 +++ .../azure/client/models/documenturlchunk.py | 2 +- .../azure/client/models/filechunk.py | 2 +- .../mistralai/azure/client/models/function.py | 2 +- .../azure/client/models/guardrailconfig.py | 58 +++ .../client/models/imagegenerationtool.py | 65 +++ .../mistralai/azure/client/models/imageurl.py | 2 +- .../azure/client/models/imageurlchunk.py | 6 +- .../azure/client/models/jsonschema.py | 2 +- .../client/models/moderationllmaction.py | 10 + .../moderationllmv1categorythresholds.py | 93 ++++ .../client/models/moderationllmv1config.py | 75 +++ .../moderationllmv2categorythresholds.py | 103 ++++ .../client/models/moderationllmv2config.py | 75 +++ .../azure/client/models/oauth2tokenauth.py | 31 ++ .../azure/client/models/ocrconfidencescore.py | 29 ++ .../azure/client/models/ocrimageobject.py | 2 +- .../client/models/ocrpageconfidencescores.py | 62 +++ .../azure/client/models/ocrpageobject.py | 17 +- .../azure/client/models/ocrrequest.py | 35 +- .../azure/client/models/ocrresponse.py | 2 +- .../azure/client/models/ocrtableobject.py | 45 +- .../azure/client/models/ocrusageinfo.py | 2 +- .../azure/client/models/prediction.py | 2 +- .../azure/client/models/reasoningeffort.py | 10 + .../azure/client/models/referencechunk.py | 16 +- .../azure/client/models/responseformat.py | 2 +- .../azure/client/models/thinkchunk.py | 28 +- .../src/mistralai/azure/client/models/tool.py | 39 +- .../mistralai/azure/client/models/toolcall.py | 7 +- .../azure/client/models/toolchoice.py | 7 +- .../azure/client/models/toolconfiguration.py | 52 ++ .../azure/client/models/toolmessage.py | 2 +- .../azure/client/models/toolreferencechunk.py | 14 +- .../azure/client/models/tooltypes.py | 8 - .../azure/client/models/usageinfo.py | 4 +- .../azure/client/models/usermessage.py | 2 +- .../azure/client/models/validationerror.py | 2 +- .../client/models/websearchpremiumtool.py | 65 +++ .../azure/client/models/websearchtool.py | 62 +++ .../azure/src/mistralai/azure/client/ocr.py | 40 +- .../azure/client/utils/eventstreaming.py | 41 +- .../mistralai/azure/client/utils/metadata.py | 1 + .../mistralai/azure/client/utils/security.py | 32 +- .../azure/client/utils/serializers.py | 12 +- packages/azure/uv.lock | 6 +- tests/test_azure_v2_parity.py | 9 +- 116 files changed, 2665 insertions(+), 531 deletions(-) create mode 100644 packages/azure/docs/models/apikeyauth.md create mode 100644 packages/azure/docs/models/authorization.md create mode 100644 packages/azure/docs/models/chatcompletionrequesttool.md create mode 100644 packages/azure/docs/models/chatcompletionstreamrequesttool.md create mode 100644 packages/azure/docs/models/codeinterpretertool.md create mode 100644 packages/azure/docs/models/confidencescoresgranularity.md create mode 100644 packages/azure/docs/models/customconnector.md create mode 100644 packages/azure/docs/models/documentlibrarytool.md create mode 100644 packages/azure/docs/models/guardrailconfig.md create mode 100644 packages/azure/docs/models/imagegenerationtool.md create mode 100644 packages/azure/docs/models/moderationllmaction.md create mode 100644 packages/azure/docs/models/moderationllmv1categorythresholds.md create mode 100644 packages/azure/docs/models/moderationllmv1config.md create mode 100644 packages/azure/docs/models/moderationllmv2categorythresholds.md create mode 100644 packages/azure/docs/models/moderationllmv2config.md create mode 100644 packages/azure/docs/models/oauth2tokenauth.md create mode 100644 packages/azure/docs/models/ocrconfidencescore.md create mode 100644 packages/azure/docs/models/ocrpageconfidencescores.md create mode 100644 packages/azure/docs/models/pages.md create mode 100644 packages/azure/docs/models/reasoningeffort.md create mode 100644 packages/azure/docs/models/referenceid.md create mode 100644 packages/azure/docs/models/toolconfiguration.md rename packages/azure/docs/models/{toolunion.md => toolreferencechunktool.md} (87%) delete mode 100644 packages/azure/docs/models/tooltypes.md create mode 100644 packages/azure/docs/models/websearchpremiumtool.md create mode 100644 packages/azure/docs/models/websearchtool.md create mode 100644 packages/azure/src/mistralai/azure/client/models/apikeyauth.py create mode 100644 packages/azure/src/mistralai/azure/client/models/codeinterpretertool.py create mode 100644 packages/azure/src/mistralai/azure/client/models/customconnector.py create mode 100644 packages/azure/src/mistralai/azure/client/models/documentlibrarytool.py create mode 100644 packages/azure/src/mistralai/azure/client/models/guardrailconfig.py create mode 100644 packages/azure/src/mistralai/azure/client/models/imagegenerationtool.py create mode 100644 packages/azure/src/mistralai/azure/client/models/moderationllmaction.py create mode 100644 packages/azure/src/mistralai/azure/client/models/moderationllmv1categorythresholds.py create mode 100644 packages/azure/src/mistralai/azure/client/models/moderationllmv1config.py create mode 100644 packages/azure/src/mistralai/azure/client/models/moderationllmv2categorythresholds.py create mode 100644 packages/azure/src/mistralai/azure/client/models/moderationllmv2config.py create mode 100644 packages/azure/src/mistralai/azure/client/models/oauth2tokenauth.py create mode 100644 packages/azure/src/mistralai/azure/client/models/ocrconfidencescore.py create mode 100644 packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py create mode 100644 packages/azure/src/mistralai/azure/client/models/reasoningeffort.py create mode 100644 packages/azure/src/mistralai/azure/client/models/toolconfiguration.py delete mode 100644 packages/azure/src/mistralai/azure/client/models/tooltypes.py create mode 100644 packages/azure/src/mistralai/azure/client/models/websearchpremiumtool.py create mode 100644 packages/azure/src/mistralai/azure/client/models/websearchtool.py diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index baa46296..7d463029 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,11 +2,11 @@ speakeasyVersion: 1.763.6 sources: mistral-azure-source: sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:a6918148cb6fdd9108b7bef0ef41fe5c9e79b18c65c0b52fc4d2afecf6db2d4d - sourceBlobDigest: sha256:dded6b429a29c2889469b10d19aecd41be2db06cde1a8408510120c8abfd9553 + sourceRevisionDigest: sha256:faccd49c0a52252b8dfcc666a6a1ba3fa5c7eb36f93c58c9b49547c98a254918 + sourceBlobDigest: sha256:b6f756ef1d57d93defe29a9f6789c746bd0c3b09e3f9e5fa0344ddf9ca47e5d7 tags: - latest - - speakeasy-sdk-regen-1773084953 + - speakeasy-mistralai-azure-sdk-26292833044-1 mistral-google-cloud-source: sourceNamespace: mistral-openapi-google-cloud sourceRevisionDigest: sha256:34edde5edcaf43acc036c9635cf4c60ce4e86f49b3fa2bed8960b995454e8d7c @@ -24,10 +24,10 @@ targets: mistralai-azure-sdk: source: mistral-azure-source sourceNamespace: mistral-openapi-azure - sourceRevisionDigest: sha256:a6918148cb6fdd9108b7bef0ef41fe5c9e79b18c65c0b52fc4d2afecf6db2d4d - sourceBlobDigest: sha256:dded6b429a29c2889469b10d19aecd41be2db06cde1a8408510120c8abfd9553 + sourceRevisionDigest: sha256:faccd49c0a52252b8dfcc666a6a1ba3fa5c7eb36f93c58c9b49547c98a254918 + sourceBlobDigest: sha256:b6f756ef1d57d93defe29a9f6789c746bd0c3b09e3f9e5fa0344ddf9ca47e5d7 codeSamplesNamespace: mistral-openapi-azure-code-samples - codeSamplesRevisionDigest: sha256:b7620f11d5669423730c5790ef4a72bba3ab46dd453e6685edf420053abbcb30 + codeSamplesRevisionDigest: sha256:aecd1edc929a931b5f9ce9013142d15163e9f4b9f6e11d96e96123177edd0d62 mistralai-gcp-sdk: source: mistral-google-cloud-source sourceNamespace: mistral-openapi-google-cloud diff --git a/examples/azure/chat_no_streaming.py b/examples/azure/chat_no_streaming.py index 952b171d..cccfa2eb 100644 --- a/examples/azure/chat_no_streaming.py +++ b/examples/azure/chat_no_streaming.py @@ -19,4 +19,5 @@ UserMessage(content="What is the capital of France?"), ] res = client.chat.complete(model=AZURE_MODEL, messages=messages) -print(res.choices[0].message.content) +if res.choices and res.choices[0].message: + print(res.choices[0].message.content) diff --git a/packages/azure/.speakeasy/gen.lock b/packages/azure/.speakeasy/gen.lock index ec39708b..e96be0e1 100644 --- a/packages/azure/.speakeasy/gen.lock +++ b/packages/azure/.speakeasy/gen.lock @@ -1,48 +1,49 @@ lockVersion: 2.0.0 id: dc40fa48-2c4d-46ad-ac8b-270749770f34 management: - docChecksum: 564969ee9c3ae8a740e47605a64c0077 + docChecksum: e657bc210fa9d8169a75517584cfe478 docVersion: 1.0.0 - speakeasyVersion: 1.729.0 - generationVersion: 2.841.0 - releaseVersion: 2.0.0 - configChecksum: 62c02749475cfa5a77859c3b5fab5b8f + speakeasyVersion: 1.763.6 + generationVersion: 2.884.13 + releaseVersion: 2.1.0 + configChecksum: bc26627b24c855835f05b16e35a18296 repoURL: https://github.com/mistralai/client-python.git repoSubDirectory: packages/azure installationURL: https://github.com/mistralai/client-python.git#subdirectory=packages/azure published: true persistentEdits: - generation_id: b492a8a2-7f2d-419f-bbf4-8db30c210bb5 - pristine_commit_hash: 0d59853df8a614bb4710a34bfea9a6211af33fae - pristine_tree_hash: 9cc57b34f00c96452174bfa6fa5b7e02c099aeca + generation_id: f07aab1c-5923-4503-9d5d-a197e421c084 + pristine_commit_hash: b2c9916623e2899cd1ba4d37d480fd6f3661e4b7 + pristine_tree_hash: 01b0cdfce6e0e00a23f9debf094e22c0405a02d9 features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.12 + core: 6.0.22 defaultEnabledRetries: 0.2.0 - enumUnions: 0.1.0 - envVarSecurityUsage: 0.3.2 - examples: 3.0.2 + enumUnions: 0.1.1 + envVarSecurityUsage: 0.3.3 + examples: 3.0.4 flatRequests: 1.0.1 - globalSecurity: 3.0.5 + globalSecurity: 3.0.7 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.2.0 + globalServerURLs: 3.2.1 includes: 3.0.0 methodArguments: 1.0.2 nameOverrides: 3.0.3 nullables: 1.0.2 openEnums: 1.0.4 + operationTimeout: 0.3.1 responseFormat: 1.1.0 - retries: 3.0.4 + retries: 3.0.5 sdkHooks: 1.2.1 - serverEvents: 1.0.13 + serverEvents: 1.0.15 serverEventsSentinels: 0.1.0 serverIDs: 3.0.0 - unions: 3.1.4 + unions: 3.1.5 trackedFiles: .gitattributes: id: 24139dae6567 @@ -56,6 +57,10 @@ trackedFiles: id: 7fe2e5327e07 last_write_checksum: sha1:277a46811144643262651853dc6176d21b33573e pristine_git_object: 712a148c3e2305dca4c702851865f9f8c8e674cc + docs/models/apikeyauth.md: + id: 529789e1b079 + last_write_checksum: sha1:edb801076d411a5d6c1f7a3f4fdb4c3612b12ab1 + pristine_git_object: 1fbff10e21eb51df061790f0215cb4916318ebc1 docs/models/arguments.md: id: 7ea5e33709a7 last_write_checksum: sha1:09eea126210d7fd0353e60a76bf1dbed173f13ec @@ -68,22 +73,26 @@ trackedFiles: id: 9f1795bbe642 last_write_checksum: sha1:1ce4066623a8d62d969e5ed3a088d73a9ba26643 pristine_git_object: 047b7cf95f4db203bf2c501680b73ca0562a122d + docs/models/authorization.md: + id: dec4d9809e25 + last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e + pristine_git_object: 11ea5c6a700e7b92f5cbd29e88e41b834f8b8ef4 docs/models/builtinconnectors.md: id: 9d14e972f08a - last_write_checksum: sha1:1f32eb515e32c58685d0bdc15de09656194c508c - pristine_git_object: f96f50444aaa23ca291db2fd0dc69db0d9d149d9 + last_write_checksum: sha1:2e88e09c549c6101d8ee93978514e168f5d348e3 + pristine_git_object: 150f89b05ac988beb0bd8072ba6d9326fb0c9d3e docs/models/chatcompletionchoice.md: id: 0d15c59ab501 - last_write_checksum: sha1:a6274a39a4239e054816d08517bf8507cb5c4564 - pristine_git_object: deaa0ea073e1b6c21bd466c10db31db2464066f1 + last_write_checksum: sha1:f3c9fa3cc092674a36bf28552b6900d62871b789 + pristine_git_object: 79d24a335c7ca1acb1469213d60ced2ec4987461 docs/models/chatcompletionchoicefinishreason.md: id: 225764da91d3 - last_write_checksum: sha1:b894d3408cb801e072c3c302a5676ff939d59284 - pristine_git_object: b2f15ecbe88328de95b4961ddb3940fd8a6ee64b + last_write_checksum: sha1:fb429ef425a1b01bd6e1a6cb5770034683ebef72 + pristine_git_object: 1ca6a646a7b9ef2b4dd9b0ba8de9e6c8aa63db93 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:00453565d70739471a4e1872c93b5b7e66fe6cb6 - pristine_git_object: f8715cd0a335c6dc0fda4b60400f11c4aa8a0a06 + last_write_checksum: sha1:c88753689fc6e0ef5dbbb0c3c6ac69d05e290b85 + pristine_git_object: ba44a0661680b2e757d08e898bf399f4d5c2dc11 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c last_write_checksum: sha1:7921c5a508a9f88adc01caab34e26182b8035607 @@ -92,6 +101,10 @@ trackedFiles: id: fcaf5bbea451 last_write_checksum: sha1:71a25f84f0d88c7acf72e801ced6159546201851 pristine_git_object: 749296d420c0671d2a1d6d22483b51f577a86485 + docs/models/chatcompletionrequesttool.md: + id: 01554a1b158a + last_write_checksum: sha1:e7259e65ba3c614e5e70d0d55c88db03e90097d0 + pristine_git_object: 572d12ca006caead244387a5e91000ac33b0aa0e docs/models/chatcompletionrequesttoolchoice.md: id: b97041b2f15b last_write_checksum: sha1:7ad7eb133f70e07d0d6a9def36aadd08b35cf861 @@ -102,8 +115,8 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:7233a19b12f3204b8e2259a4a09d0d9726609e4e - pristine_git_object: cc82a8c707268084865f86d71be82de5ebf6f821 + last_write_checksum: sha1:52faa9fc8bebad9ebc6b8d9be01d2f7890a4a515 + pristine_git_object: c3d90e133c2b4c1714cbddaa653ae646daed82dc docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 last_write_checksum: sha1:8270692463fab1243d9de4bbef7162daa64e52c5 @@ -112,10 +125,18 @@ trackedFiles: id: d0e89a4dca78 last_write_checksum: sha1:a889e9580fa94bda7c848682d6ba501b7f5c0f41 pristine_git_object: a48460a92ac47fec1de2188ba46b238229736d32 + docs/models/chatcompletionstreamrequesttool.md: + id: cbfb16fb3b03 + last_write_checksum: sha1:163ad1e31d7ba4eaef7797b399d1323465e97110 + pristine_git_object: 48998fcbb16a8ce5f5a4fd8b2794125d97e935ac docs/models/chatcompletionstreamrequesttoolchoice.md: id: 210d5e5b1413 last_write_checksum: sha1:0543164caf3f4fb2bef3061dbd1a5e6b34b17ae9 pristine_git_object: 43f3ca3809bf1a2a040e2ad7c19a2b22db0b73f8 + docs/models/codeinterpretertool.md: + id: f009740c6e54 + last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad + pristine_git_object: 6302fc627d7c49442b6c9aec19c70fdceaf7c519 docs/models/completionchunk.md: id: 60cb30423c60 last_write_checksum: sha1:61b976fe2e71236cf7941ee1635decc31bd304b2 @@ -130,8 +151,12 @@ trackedFiles: pristine_git_object: 1532c25b8fc065d486f52d4610a7f757e5340875 docs/models/completionresponsestreamchoicefinishreason.md: id: 5f1fbfc90b8e - last_write_checksum: sha1:20824b4a223cbd3658b32440973a7d47dcd108b9 - pristine_git_object: 0fece473297227c75db4e7ded63417a2f117cac0 + last_write_checksum: sha1:4bb61177835571bc4a271f14e1e2ea1780556d85 + pristine_git_object: f1bd6ad8a352b557344644bc1f55446e4024d795 + docs/models/confidencescoresgranularity.md: + id: 76a175c65878 + last_write_checksum: sha1:049eeb8421d61023dd5652cea4df1c62d8152914 + pristine_git_object: 32161eeed231ad16e4dbb212cce624d58f3093ea docs/models/contentchunk.md: id: d2d3a32080cd last_write_checksum: sha1:5839a26cdc412b78caad7fb59df97bdcea57be6d @@ -140,10 +165,14 @@ trackedFiles: id: e8f2f9e54b8e last_write_checksum: sha1:4c14b386f9f89d98f4dd9487ab030f10478c0e63 pristine_git_object: 107f1bd428b1f39b36f75e5a10532bc462967ce5 + docs/models/customconnector.md: + id: 7bcc77607afa + last_write_checksum: sha1:ce9e8ffac3f83e08269fbed5d2dffbfeb9f8649a + pristine_git_object: 0a0b69217abb0fbcbe30fad32c239aea070d3740 docs/models/deltamessage.md: id: 6c5ed6b60968 - last_write_checksum: sha1:00052476b9b2474dbc149f18dd18c71c86d0fc74 - pristine_git_object: e0ee575f3fce7c312114ce8c5390efc5c4854952 + last_write_checksum: sha1:c49575abe1bb581db1ae497b7a3b1ff2820abfbc + pristine_git_object: c2395e1bb06f983a2f56ab5900f126ed99ae9c11 docs/models/deltamessagecontent.md: id: 7307bedc8733 last_write_checksum: sha1:a1211b8cb576ad1358e68983680ee326c3920a5e @@ -152,6 +181,10 @@ trackedFiles: id: cd1d2a444370 last_write_checksum: sha1:d00a2ac808a0ae83a7b97da87e647ecc8dca9c52 pristine_git_object: 509d43b733d68d462853d9eb52fc913c855dff40 + docs/models/documentlibrarytool.md: + id: 68083b0ef8f3 + last_write_checksum: sha1:76b9f47c399915a338abe929cb10c1b37282eadf + pristine_git_object: 95c3fa52ee3ff29e72bc0240a98c0afaa0cd5f62 docs/models/documenturlchunk.md: id: 48437d297408 last_write_checksum: sha1:5f9294355929d66834c52c67990ba36a7f81387d @@ -162,8 +195,8 @@ trackedFiles: pristine_git_object: 18217114060ac4e4b45fefabace4628684f27e5c docs/models/format_.md: id: a17c22228eda - last_write_checksum: sha1:dad6de59fec6378d50356007602e2a0254d8d2e4 - pristine_git_object: 97d286a4ed7cff0a4058bbfa06c4573428182876 + last_write_checksum: sha1:305fff64a63eaaef9d2d0ea1f5c439b657515095 + pristine_git_object: 3311b410893086b87a077fa09b822e56e7acddb1 docs/models/function.md: id: 416a80fba031 last_write_checksum: sha1:a9485076d430a7753558461ce87bf42d09e34511 @@ -176,18 +209,26 @@ trackedFiles: id: 4b3bd62c0f26 last_write_checksum: sha1:754fe32bdffe53c1057b302702f5516f4e551cfb pristine_git_object: 87d7b4852de629015166605b273deb9341202dc0 + docs/models/guardrailconfig.md: + id: f60bf2eefb45 + last_write_checksum: sha1:e8dd384d2fd18d731753ba8d45a2975379c97052 + pristine_git_object: 1276462cc43fbd940f12282b1dca05e6fc7a16f9 docs/models/imagedetail.md: id: f8217529b496 - last_write_checksum: sha1:fdf19ac9459f64616240955cb81a84ef03e775c8 - pristine_git_object: 1e5ba3fd405a14e5e2872cc85504584dca19b726 + last_write_checksum: sha1:7588bc9f9c09df1b040f4b97b678b56e09244743 + pristine_git_object: d13adbf683bd58d3948f0057bf86b8754a132721 + docs/models/imagegenerationtool.md: + id: d5deb6b06d28 + last_write_checksum: sha1:a1813ef99e4a0990fd073bb2311c475e88072029 + pristine_git_object: b476b6f2733a49767d7f7a4ad091fc321ab514f4 docs/models/imageurl.md: id: e75dd23cec1d last_write_checksum: sha1:a5cf621ce58a9cc7c96afa7de53367eac7b4cb0b pristine_git_object: 6358e0acb2dea4816203413842243704ca955783 docs/models/imageurlchunk.md: id: 4407097bfff3 - last_write_checksum: sha1:da7a792f7b649f311062338dfbf3d25ff55fe6c5 - pristine_git_object: db0c53d22e29fa25222edb86b264e5135879a029 + last_write_checksum: sha1:05e0c3053720c6ad6c663237a3f3621e0e9fed9f + pristine_git_object: 6d238e255d368c1b12ddc231dc5f8dc11279d47e docs/models/imageurlunion.md: id: 9d3c691a9db0 last_write_checksum: sha1:4e32bcd7d44746d2ddbfafbef96152bb2bdb2a15 @@ -202,52 +243,96 @@ trackedFiles: pristine_git_object: d6094ac2c6e0326c039dad2f6b89158694ef6aa7 docs/models/mistralpromptmode.md: id: d17d5db4d3b6 - last_write_checksum: sha1:abcb7205c5086169c7d9449d15ac142448a7d258 - pristine_git_object: c3409d03b9646e21a3793372d06dcae6fef95463 + last_write_checksum: sha1:200dff492c240b34321df5755933ba0344fdc9ca + pristine_git_object: 3a8f7841e73e56411185d6095aa96054b1bea6b0 + docs/models/moderationllmaction.md: + id: 26373b4ad9cd + last_write_checksum: sha1:443a682b1f1c5d5068316431aac6cdd65132b77e + pristine_git_object: 526b7a1311e66a2561cf1ac6277cd9412edf0a10 + docs/models/moderationllmv1categorythresholds.md: + id: b474ca28a6e7 + last_write_checksum: sha1:9080b6f5a7a6a00ed04c1cb32a43cb997cbeb5d5 + pristine_git_object: 90ae213feda5e63ad71fbd7bb0bfb07ee7b1e2c1 + docs/models/moderationllmv1config.md: + id: e39a45c3e458 + last_write_checksum: sha1:63b7677d0b488d44312417d9335abd595f9b6fa9 + pristine_git_object: bdb5812b87a69af904eb9cdc0fffff6e73d96cd3 + docs/models/moderationllmv2categorythresholds.md: + id: 401d3285071c + last_write_checksum: sha1:6fbfadaba4db8bed9fc7d38ad77cd47a089dd5f0 + pristine_git_object: e95b81b0315cf77724d027dbf8ff0f524ad1d068 + docs/models/moderationllmv2config.md: + id: 64c1e213e7cc + last_write_checksum: sha1:851923395e5a4097b82d184e070a85bf648a9e8c + pristine_git_object: e928506c8d210b865e8aee9739a35433ca136872 + docs/models/oauth2tokenauth.md: + id: f23959dcc4b0 + last_write_checksum: sha1:ca434f8479c3f5e868db1269e86efa5e0d9070e2 + pristine_git_object: 89f80436474e3c2293bb4fcafce11e626e2cdf79 + docs/models/ocrconfidencescore.md: + id: 44a3cb211acc + last_write_checksum: sha1:d88c21a3aa36f24e00c2b24c31bc54944d1fc73f + pristine_git_object: 73fdcb28b1044bb7122ba6609708979c17a46e5e docs/models/ocrimageobject.md: id: b72f3c5853b2 last_write_checksum: sha1:90c5158dec6a7b31c858677b6a8efa1e3cabd504 pristine_git_object: 3c0d5544a80499b011467f29ef83d49f53801af6 + docs/models/ocrpageconfidencescores.md: + id: 4bc78fe53e38 + last_write_checksum: sha1:26733f345c69b188d372290784688a972fe39dbf + pristine_git_object: bffb214868dd74e617c87ff19e3909419d9acc97 docs/models/ocrpagedimensions.md: id: b3429f9883f5 last_write_checksum: sha1:6435aa56e6153b0c90a546818ed780105ae1042a pristine_git_object: c93ca64d5e20319ec6ec1bcb82b28c6ce0940f29 docs/models/ocrpageobject.md: id: 88a9e101b11e - last_write_checksum: sha1:091077fedf1b699d5160a21fe352056c247ef988 - pristine_git_object: 02473d44f73485fd7b7f0031d51bfac835d4036e + last_write_checksum: sha1:84b903d90dadcac943000b90e8a8e8a81c8b92fa + pristine_git_object: 0fc55052cdf2360131c0adcec93a732e2b0f78c5 docs/models/ocrrequest.md: id: 6862a3fc2d0f - last_write_checksum: sha1:eefa8ad80773e00ac297f3cf806704ac6ac3557d - pristine_git_object: 2d26c19fd1cecb234d7fb761dd73cc0a59e622ad + last_write_checksum: sha1:d06488b0ac9343813db7fe9f58d3a8450d7fa663 + pristine_git_object: 2066b90339c5bfb795e94581edc47412fac75a2e docs/models/ocrresponse.md: id: 30042328fb78 last_write_checksum: sha1:8e4a4ae404ea752f3e9f1108c2a5f89ed6cfb143 pristine_git_object: 0a309317644eedc643009b6cec3a7dbb142b1a15 docs/models/ocrtableobject.md: id: c967796380e6 - last_write_checksum: sha1:3b78858cc130fc8792ec3d149c8f657fd3f7a4c3 - pristine_git_object: 4e27697c15983f86274648b2d7bacac557081630 + last_write_checksum: sha1:deb1715d618330b4f791b7237955e697d26c6bc2 + pristine_git_object: 2da8f6105dd83d7f4d067c74298316ab512c9c3f docs/models/ocrusageinfo.md: id: 419abbb8353a last_write_checksum: sha1:6e717a3f3de3c464e8b3237f06867cdfecec339e pristine_git_object: d9d79125cb02bc2b09d8dc543a5e2d4a6c55571c + docs/models/pages.md: + id: 9045c659bb29 + last_write_checksum: sha1:b4b9daaa3e2bd6efeb6f5efe07e8da58385b3ee3 + pristine_git_object: a3631692d4d8c230e71c7c9c6ccb12b96fd93279 docs/models/prediction.md: id: 3c70b2262201 last_write_checksum: sha1:ca8a77219e6113f2358a5363e935288d90df0725 pristine_git_object: fae3c1ca4ba2c2ddb3b7de401ecdc8d56dcc7740 + docs/models/reasoningeffort.md: + id: c8fd630d3f07 + last_write_checksum: sha1:e76b9260f9dd23ab2f0c6a700602f918c3792857 + pristine_git_object: f39e92ac9f7c6a19e24b5773252d179e1b3856a9 docs/models/referencechunk.md: id: 07895f9debfd - last_write_checksum: sha1:4384049375a2566c7567599f97ce1ec19e9f6276 - pristine_git_object: d847e24845a399c7ca93d54701832fb65e01b3ab + last_write_checksum: sha1:3d35227a4f7612301fd5f17a445c4c2b712f0bf1 + pristine_git_object: 0186d3c358e27d01617c982f61db0910039a049a + docs/models/referenceid.md: + id: 22fa492a467e + last_write_checksum: sha1:80161796acbc185876a3656ee8cbdde4df7e23d0 + pristine_git_object: 1d29397fd96b42b7dc33bd10184bef55de5ae066 docs/models/responseformat.md: id: 50a1e4140614 last_write_checksum: sha1:e877b2e81470ef5eec5675dfb91a47e74d5d3add pristine_git_object: 5cab22f2bf1c412699f6a7ed18ef801ecbc3ee4b docs/models/responseformats.md: id: cf1f250b82db - last_write_checksum: sha1:105e1f9181913104b554051838cbdd0f728aa2c4 - pristine_git_object: 2f5f1e5511b048323fee18a0ffdd506fe2b3d56f + last_write_checksum: sha1:97126f8e76a1893953f7c4b370dadc32ea0a1e24 + pristine_git_object: 73c02b7785e6e897fa04c3546aa12285b7e28e2e docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:ce2871b49c1632d50e22d0b1ebe4999021d52313 @@ -266,36 +351,40 @@ trackedFiles: pristine_git_object: 40030c170746d9953d25b979ab7e6f522018e230 docs/models/tableformat.md: id: d8cd08c55c3c - last_write_checksum: sha1:e0736ea9576466d71821aa1e67fc632cc5a85414 - pristine_git_object: 54f029b814fdcfa2e93e2b8b0594ef9e4eab792a + last_write_checksum: sha1:b1a0e125b25ed0fe71ea56bbce405e49cae46c9a + pristine_git_object: 14b06acbae039dbb46bd2872dbc16e5bdee4cffc docs/models/textchunk.md: id: 6cd12e0ef110 last_write_checksum: sha1:aa448d4937c0c1cd562621f0a9080aa0dc6e4bd1 pristine_git_object: b266619dcb57222ec343f373c43b2b5cef5b8b93 docs/models/thinkchunk.md: id: bca24d7153f6 - last_write_checksum: sha1:2b8ff7737fa7255673ca31da7cb2e6803fce9e02 - pristine_git_object: b07f598ebc5f0e9c041186c081dc98bc21104bdb + last_write_checksum: sha1:db29812dbc6f9be7a385322d25a5cd98bfb3ef1e + pristine_git_object: d825497ee09624b829965d2b5bea2ddc54a32608 docs/models/thinking.md: id: 07234f8dd364 last_write_checksum: sha1:90c0b34284137712678b0671e9f4bfb319548cbf pristine_git_object: d9e51d7dc93b24edd807b018393eab38143d46f4 docs/models/tool.md: id: 8966139dbeed - last_write_checksum: sha1:1725bf53fc9f1ca3f332322d91de24c9d58adc6a - pristine_git_object: fb661f72887271d5bb470e4edf025a32b00ade17 + last_write_checksum: sha1:2ab2016846da06ab38751176ba80fb6527c2818b + pristine_git_object: 85888d01cf439be601c8d1df4048c90161cf47df docs/models/toolcall.md: id: 80892ea1a051 - last_write_checksum: sha1:cb27b9d36cfe6227978c7a7a01b1349b6bac99d9 - pristine_git_object: 3819236b9f3eee2f6878818cfbbe2817e97f7de2 + last_write_checksum: sha1:621dc83981e13cbcbc21f2e16a34178c322c4566 + pristine_git_object: 9d236e8b289977d2aa7bded0d633b224c5ec9e57 docs/models/toolchoice.md: id: "097076343426" - last_write_checksum: sha1:25b33b34da02c3b46349dc8b6223f9ae18370d16 - pristine_git_object: 373046bbbc834169293b4f4ae8b2e238f952ddde + last_write_checksum: sha1:65a2794a1102fdcba6fa5a3f497630fbaf98f94b + pristine_git_object: a457f96f6e295d590a5ef75f83a5a6c4fdd41c47 docs/models/toolchoiceenum.md: id: 15410de51ffc - last_write_checksum: sha1:ca0cf9bf128bebc8faedd9333cc6a56b30f58130 - pristine_git_object: 0be3d6c54b13a8bf30773398a2c12e0d30d3ae58 + last_write_checksum: sha1:7cb97b478232ae43bae387483c7df310f5ebd9eb + pristine_git_object: 608091262e369e585ba2d9391671dedf1d1db539 + docs/models/toolconfiguration.md: + id: 06bfa2c4e662 + last_write_checksum: sha1:9b619977375f228c76f09d48d6e2833add6c07e2 + pristine_git_object: 89286a172124ce3473bcb081de6e4db8c95afefa docs/models/toolmessage.md: id: 0553747c37a1 last_write_checksum: sha1:ac61e644ba7c6da607cb479eafd1db78d8e8012e @@ -306,16 +395,12 @@ trackedFiles: pristine_git_object: 5c76091fbd2c8e0d768921fab19c7b761df73411 docs/models/toolreferencechunk.md: id: 10414b39b7b3 - last_write_checksum: sha1:a0e93881de5ecaf765300d45a18ab21dcffe54f9 - pristine_git_object: 9fc10399fe4ce9eb3b5e87a6bc609643d6a2cb3a - docs/models/tooltypes.md: - id: adb50fe63ea2 - last_write_checksum: sha1:f224c3d8732450b9c969b3e04027b7df7892694c - pristine_git_object: 84e49253c9b9bd1bd314e2a126106404cbb52f16 - docs/models/toolunion.md: - id: ad708b0ce4e0 - last_write_checksum: sha1:61909a56240c784e05f13dff8d9787272e1aa8bc - pristine_git_object: 2dcb3deec9f05d1e578c485a47a8ddd10b375f48 + last_write_checksum: sha1:ea3bdfc83177c6b7183ad51fddb2d15aee0f0729 + pristine_git_object: 49ea4ca7b05e5fcaaf914f781e3a28483199d82d + docs/models/toolreferencechunktool.md: + id: c2210d74792a + last_write_checksum: sha1:368add3ac6df876bc85bb4968de840ac578ae623 + pristine_git_object: 999f7c34885015a687c4213d067b144f1585c946 docs/models/usageinfo.md: id: ec6fe65028a9 last_write_checksum: sha1:cf71fb9676d870eba7c4d10a69636e1db4054adc @@ -336,6 +421,14 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a + docs/models/websearchpremiumtool.md: + id: 267988aa8c3f + last_write_checksum: sha1:38f80a43f73a13ddedc7730f853c092a48b665f9 + pristine_git_object: 78b736cd314617caa0d77f3c42015212e37ab539 + docs/models/websearchtool.md: + id: fc4df52fb9b5 + last_write_checksum: sha1:72636dc7ae74264bb5158d284ef6f83da5290b27 + pristine_git_object: 4ca7333c412ad819e3e02c61debe402e3f9b0af9 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -344,10 +437,6 @@ trackedFiles: id: 7ce8b9f946e6 last_write_checksum: sha1:8f871a5aac4b10bff724c9d91b8d7496eb1fbdde pristine_git_object: 0391ac11bdc5526b697b69d047d568a611ce87d0 - scripts/prepare_readme.py: - id: e0c5957a6035 - last_write_checksum: sha1:26b29aad3c23a98912fd881698c976aac55749fe - pristine_git_object: 2b2577ea83873f64aa9f91d9d762bc6e1f250977 scripts/publish.sh: id: fe273b08f514 last_write_checksum: sha1:b290b25b36dca3d5eb1a2e66a2e1bcf2e7326cf3 @@ -370,16 +459,16 @@ trackedFiles: pristine_git_object: 3e4e39555d60adebe84e596c8323ee5b80676fc9 src/mistralai/azure/client/_version.py: id: a77160e60e5d - last_write_checksum: sha1:991341c1aaa4a0fc2ef89aa7a69429b54764d309 - pristine_git_object: 8923c29dad7a842f2137ae6e466c8a7ddf13823d + last_write_checksum: sha1:78ea54afa03d5257fab907e6b9d8b352b6f83580 + pristine_git_object: 4641c83258e80ce3b79400e8cd2f4336d0f92012 src/mistralai/azure/client/basesdk.py: id: 5a585a95ec21 - last_write_checksum: sha1:0c2e686aa42d6aeeb103193aa058d6ddff7bcf74 - pristine_git_object: 0d4d9a440e6c7726b6bc7fc6525aa3dc009847eb + last_write_checksum: sha1:1ad34df596605b1ce2ada8d120223e5c13f7bd9a + pristine_git_object: e08ce351fbd7530d940fcd61c29f33285de91d58 src/mistralai/azure/client/chat.py: id: c18454e628d7 - last_write_checksum: sha1:884e22b0e313662c67cec7101765d8d7ef0bc48a - pristine_git_object: 1051f9527851894988f7e1689923575cf72a0896 + last_write_checksum: sha1:6f76826ff4e853b3ddd692f5f1b3d5a49cd9b257 + pristine_git_object: e3915c745af0bb1dac79b4fadea9d190b9472c62 src/mistralai/azure/client/errors/__init__.py: id: f377703514d9 last_write_checksum: sha1:36c516c11f8083c3380a72c1d0f0718a3345f24b @@ -410,64 +499,80 @@ trackedFiles: pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/mistralai/azure/client/models/__init__.py: id: "335011330e21" - last_write_checksum: sha1:6ae218231fc52b0ce36cf3ed2116c93e4782791f - pristine_git_object: 79c5df321d8d95cecd502e22a521165f70c5c635 + last_write_checksum: sha1:19ab292c86de25adc40cb0f8159cdfa382386e36 + pristine_git_object: d9c28adc636c9eb1e204eeee4775bb8ba53e5a25 + src/mistralai/azure/client/models/apikeyauth.py: + id: 90b0600cb391 + last_write_checksum: sha1:77e9e4546f94890349f82ed033b679bf495e7c48 + pristine_git_object: 7bce715c111562d0a32809f32dfdc4d337406c1e src/mistralai/azure/client/models/assistantmessage.py: id: 353ed9110f97 - last_write_checksum: sha1:973979ac03f86f26ee9a540aaaa8f70a7011daca - pristine_git_object: e9ae6e82c3c758561c8c9663f27b2fd7e38d2911 + last_write_checksum: sha1:9271319ff0ffc6190b2bb771dcd1a5378008c276 + pristine_git_object: f5e3316b0ff4818cb7b5d2d14d8fc6c4b4f951b9 src/mistralai/azure/client/models/builtinconnectors.py: id: d260ad466b17 last_write_checksum: sha1:4e94744e3854d4cdc9d1272e4f1d9371f9829a5f pristine_git_object: 6a3b2476d54096722eb3e7a271629d108028bd35 src/mistralai/azure/client/models/chatcompletionchoice.py: id: 6942c7db5891 - last_write_checksum: sha1:817bfda6120a98248322c308629e404081e01279 - pristine_git_object: 67b5ba694217f4f3b95589d7f84af6a9bea9802d + last_write_checksum: sha1:a99520160412adfa8b53d4d054c4d192d82920a1 + pristine_git_object: 7ab8832c80929a48412d03aae4e718a855229cfa src/mistralai/azure/client/models/chatcompletionrequest.py: id: 0c711c870184 - last_write_checksum: sha1:ffdd11a4945dd805c9a73328749c2f4d9b6f80e6 - pristine_git_object: edd0fdc74a1b81f458d6083e79dc393e488da36a + last_write_checksum: sha1:b290e59c11479f7c5d7e555a220fb99bb8c105e5 + pristine_git_object: 90dc0101c736b0dc10b3725fec32401c2300d559 src/mistralai/azure/client/models/chatcompletionresponse.py: id: bdfacf065e9e last_write_checksum: sha1:c72fb624e7475a551d37e0b291b64bcf772c402a pristine_git_object: d41f9c6fab670cf7c961f50b1302f9a88cf48162 src/mistralai/azure/client/models/chatcompletionstreamrequest.py: id: da00a7feb4ef - last_write_checksum: sha1:8bb36693fed73a50d59687ca8b30a2c443708610 - pristine_git_object: 2edfbed98462eab43f322b9c706721365e410bb9 + last_write_checksum: sha1:409ecde82694094b5acf730c6c87225649fb826e + pristine_git_object: 757d623150bc7b7e8ed9ebd514b3294f56d12f32 + src/mistralai/azure/client/models/codeinterpretertool.py: + id: b3a6fae1bf7c + last_write_checksum: sha1:25194d72cececa577ad4a010a910a346e25fb331 + pristine_git_object: 0f588be3278948fb4864c5193171f223d7372108 src/mistralai/azure/client/models/completionchunk.py: id: 28d620f25510 - last_write_checksum: sha1:84d1c55ef7bdb438e7f536a604a070799d054281 - pristine_git_object: 0e64bbc8aa0293c9d763db56287f296909260c38 + last_write_checksum: sha1:d980ae761d584f526417413c29d26a644adbbdd8 + pristine_git_object: f6168f17a21af0f45549bc345e29c7612afacddf src/mistralai/azure/client/models/completionevent.py: id: a6f00a747933 last_write_checksum: sha1:3d04bfbdaf11c52af5613ed0fd70c8dbc59f6d49 pristine_git_object: c4b272871d9b3ea8443f469d29b0825706c25c00 src/mistralai/azure/client/models/completionresponsestreamchoice.py: id: 3ba5d7ba8a13 - last_write_checksum: sha1:4de311509c71c8f582b2c767febea89f1acd341a - pristine_git_object: 20a271401ff98d69525947ab929078af83aab1f1 + last_write_checksum: sha1:215e9f0290c30472f322ca0baad251ddd363e90d + pristine_git_object: 36be83026bcd9431f87238971fca8e566a4c831c src/mistralai/azure/client/models/contentchunk.py: id: 1f65e4f8f731 last_write_checksum: sha1:cf11e1f061d3c8af040ebbdba0b25d4177e1cea4 pristine_git_object: 17efcc7d5825461576cf61257908688cffd23eb7 + src/mistralai/azure/client/models/customconnector.py: + id: 667abbf974f5 + last_write_checksum: sha1:3a9d4ea0fdb5c94d6849ae34b37786fc514d8084 + pristine_git_object: e7eac82ac40ccbe16e7f15b7130f34a5991f78e1 src/mistralai/azure/client/models/deltamessage.py: id: b7dab1d158de - last_write_checksum: sha1:190c2809d575244eda5efbb1e00a4ec5811aea29 - pristine_git_object: 567e772fc1b376efaec1a2dfd660bc74a916f8ee + last_write_checksum: sha1:1d9f3d87e728503470a62274bf4e14fbb334d0cf + pristine_git_object: 5bac18c228dd30a65d55c23ec4e9e4c845dd9de6 + src/mistralai/azure/client/models/documentlibrarytool.py: + id: 767763a86267 + last_write_checksum: sha1:5c56964279d1a4873ff5837b9353363917ba46ce + pristine_git_object: 6e2e31e795e8f0aaf05d1ad55f0f97c04437f15e src/mistralai/azure/client/models/documenturlchunk.py: id: e56fec6e977f - last_write_checksum: sha1:0313d94f343d46dac7cc3adc392feaf06fa2b2a4 - pristine_git_object: 2dea80056f6752bdaa5d00f391cb6f54371a9d2b + last_write_checksum: sha1:6ca5678c910d689b49b3aeb6d2ac3c88026d3315 + pristine_git_object: 03af581691982a7c92a920580ff977029c047a61 src/mistralai/azure/client/models/filechunk.py: id: 150d9f180110 - last_write_checksum: sha1:6d12d630a5bfd601836f9cb3d63b9eb2f15f880d - pristine_git_object: 6baa0cba81535e157c0f81ae2648362f7bd1adbd + last_write_checksum: sha1:abc825d41e5d50809612f6ccbdb13c6c275355dd + pristine_git_object: 772f67e6f68542d5d50925d1d0b257fc97449e27 src/mistralai/azure/client/models/function.py: id: 6d1e2011a14b - last_write_checksum: sha1:b064eca9256966603581d41b5b2c08cd2448224d - pristine_git_object: 055d3657fd98da63b80deb8cd2054e95a0e66a2b + last_write_checksum: sha1:a697a846786d49be782f6c4382034c161aa465fb + pristine_git_object: 3f135ed262430a705989607b9dee732b0270e71a src/mistralai/azure/client/models/functioncall.py: id: ced560a1bd57 last_write_checksum: sha1:490cb3a0305994de063e06fa4c77defa911271f3 @@ -476,66 +581,110 @@ trackedFiles: id: 6f09474ebc85 last_write_checksum: sha1:651ceed24416ce8192f70db03cc5cd0db685899f pristine_git_object: 839e0d557a902da6c819210962e38e1df9bda90f + src/mistralai/azure/client/models/guardrailconfig.py: + id: 58feab16c930 + last_write_checksum: sha1:73457a4444c46ca4ab9dce3b9e67c6940dfb8a18 + pristine_git_object: 4feffa67feecb2fa1e8b36128e95d2cb54fff4ca src/mistralai/azure/client/models/imagedetail.py: id: de211988043d last_write_checksum: sha1:812f2ec4fc0d8d13db643ed49192384d5a841aa4 pristine_git_object: 2d074cee614e1c49b69ee4073c3aaaa7a5a2c9e2 + src/mistralai/azure/client/models/imagegenerationtool.py: + id: 789c0facd38d + last_write_checksum: sha1:ffc9e94d9f1458001015182e195714a617cdc9fb + pristine_git_object: 5c51d688d9aebac94f628ebdbfbe4cd0cd142e3d src/mistralai/azure/client/models/imageurl.py: id: c8882341c798 - last_write_checksum: sha1:8c3c08cc5d33c66b12539270b7edbf157d936f86 - pristine_git_object: bcb4fe43d334752be501d694543250d7e632a9c7 + last_write_checksum: sha1:a65ea39bd95e932d2af43731c768c0a6fdbafbdd + pristine_git_object: c1704cd899da55f162245e748528f4b0162936ef src/mistralai/azure/client/models/imageurlchunk.py: id: b6f0abb574d7 - last_write_checksum: sha1:417618d9d2aba85386a100dfe818d13342830526 - pristine_git_object: 7213c49846a4107271d017dd695648d98c2efa94 + last_write_checksum: sha1:d4cac15f4dd55582aca63f97b2f054fb375ade6c + pristine_git_object: 8e8df9a624db97fd142c478ea298bf8e6cabb3cc src/mistralai/azure/client/models/jsonschema.py: id: bfd486f4bb18 - last_write_checksum: sha1:ccb2b53bd2351ec5119d9a7914a1a42c2746a096 - pristine_git_object: 99f2fb8903562465687edfd300d8efd373b92247 + last_write_checksum: sha1:d4c3bf57f61c8ec51552c24ea8353555733b4f37 + pristine_git_object: 2790728b9b2cabcd99f11695a36fd5c7e2c2da23 src/mistralai/azure/client/models/mistralpromptmode.py: id: d0028b1e4129 last_write_checksum: sha1:46fe1ab8ac2d5867877368a59a4aa5be2fabadeb pristine_git_object: 26e7adbdc4a981c92d51b72542c966b0ba0fb8f8 + src/mistralai/azure/client/models/moderationllmaction.py: + id: e2fba44eb74f + last_write_checksum: sha1:fbc27faa2fbaa51a66bee21935c4bce350291f5e + pristine_git_object: cff03d9aa6de26ce3daa9edbc065ec3f759b5ee6 + src/mistralai/azure/client/models/moderationllmv1categorythresholds.py: + id: f349ac02c9f0 + last_write_checksum: sha1:0e79c7b6296b2479929e5404626622c08752d2f1 + pristine_git_object: e3e9b22fb1ce89a4e9943fcb2a7a7aa665ed3ef4 + src/mistralai/azure/client/models/moderationllmv1config.py: + id: ac93fb39aadb + last_write_checksum: sha1:e24e34932dba1153a1ecf294d6cd78580b24e0cf + pristine_git_object: 8226887086a03b23627bd0b571efcff5ac92e27b + src/mistralai/azure/client/models/moderationllmv2categorythresholds.py: + id: ea8effbabe44 + last_write_checksum: sha1:12a4cd1a62d1c28b46c43fa062785f6217e40d3f + pristine_git_object: 57af08d82fd18e3a3a6c03d08e0c91c9c02433da + src/mistralai/azure/client/models/moderationllmv2config.py: + id: 35717297bfb3 + last_write_checksum: sha1:b66c2038d93cc8b5ba97a46a2cb724d65d6ef7ee + pristine_git_object: 57075e6051d669c7a531c13de6c6fa59c4fbd745 + src/mistralai/azure/client/models/oauth2tokenauth.py: + id: 11354c05bf86 + last_write_checksum: sha1:130bd53306d15d52f9dbc370bf1cfc129ba9ea30 + pristine_git_object: 3da345fce3ac1a56977ea6e216c7c03fbc751716 + src/mistralai/azure/client/models/ocrconfidencescore.py: + id: 523a4fdcb5b5 + last_write_checksum: sha1:fd008d51230ccdeaec923814c2d850f26ae0aab5 + pristine_git_object: 7ac59069009c5263d7c3ec016eb3dc5ccb12aea4 src/mistralai/azure/client/models/ocrimageobject.py: id: 9c9f987d94bb - last_write_checksum: sha1:423effee97a4120a26ba78c2abe7f6adeb5c733d - pristine_git_object: a23515b346a0f9517fec0b2381e1b0c04cb31816 + last_write_checksum: sha1:ddad5de6270b68f86ffd79322ce24dc8429b328a + pristine_git_object: 91d7ac0e16b3c9aafc055d1456de17abef14864f + src/mistralai/azure/client/models/ocrpageconfidencescores.py: + id: 697ff82a29a0 + last_write_checksum: sha1:7db4c357f8bfa78a6b448a5d80678b3c4e86c123 + pristine_git_object: 2d5d7a1ac3113eaa295ec98a739487beb03820a3 src/mistralai/azure/client/models/ocrpagedimensions.py: id: 7669a25f32b3 last_write_checksum: sha1:60642db6bb61f0e96204fb78d3aa0bd80dd0a7e5 pristine_git_object: 12858da92de99aa6da9d6e148df3ba7ee37496c7 src/mistralai/azure/client/models/ocrpageobject.py: id: eea193b05126 - last_write_checksum: sha1:b8370ac0611dc3eccf09dddf85d1c39d3a11224b - pristine_git_object: 434c8988f124f93180e6cefa15b3aee067937946 + last_write_checksum: sha1:b7a51aa640c4fc234618b9f362ab5972f39242ee + pristine_git_object: 08b5dbcb3734353dc44d235553ea98109be92795 src/mistralai/azure/client/models/ocrrequest.py: id: 365a5b4776a2 - last_write_checksum: sha1:e684da1b6db18cb9c5ce95b9cc58556e05a9ea9b - pristine_git_object: a2cd341593c9db3644076d39352abca6815efc56 + last_write_checksum: sha1:c59138d47c445ee26cdbeb290c56ad2f126a4b59 + pristine_git_object: 731c0cf82fd659a5a41917b7f2416cabbf322a85 src/mistralai/azure/client/models/ocrresponse.py: id: b8cde8c16a4c - last_write_checksum: sha1:55e81631f6fe57aaf58178460e1c5fc69fa19377 - pristine_git_object: 3dc09fd770a064e69e84519bd0f0c9127ebd8176 + last_write_checksum: sha1:d34db61dc06e7755e827e54c1b7e8c37b1ad5d12 + pristine_git_object: 6e27f574d2a4588f758c52be064744541265d5d7 src/mistralai/azure/client/models/ocrtableobject.py: id: c2cd51b8789e - last_write_checksum: sha1:86a8fd2241cf6a636e81e58484a90bdb7880085e - pristine_git_object: f1de5428a71f9d42cd9f9e764d0bbf88f3aad8cc + last_write_checksum: sha1:46a369822ea4311807e2103c22f42b19630fb2d9 + pristine_git_object: 07bc7c1309e5aef087b1b78f43be1041cd70460c src/mistralai/azure/client/models/ocrusageinfo.py: id: 5e9118cac468 - last_write_checksum: sha1:97887b58cfe6ebd9ebd5905c6c7485525d6dc788 - pristine_git_object: f63315d23a1659aee4333b45c4239861aa5220d7 + last_write_checksum: sha1:12f75c7d33a9f784eaafc97b24e94350fea2ae41 + pristine_git_object: b5c5f5c1189677bdc33d4d9a3f882f25dc5d4b4d src/mistralai/azure/client/models/prediction.py: id: bd6abfa93083 - last_write_checksum: sha1:07d06d5629af183f999e043744a67868ef779bcc - pristine_git_object: 1fa1d78248628ccdc102ce0631d344150addfd2d + last_write_checksum: sha1:8fde8f75071e011b7add558b3c61dfe2e04c2ea5 + pristine_git_object: 3d94feb5181b714b773ce4158af2bf786f382fa5 + src/mistralai/azure/client/models/reasoningeffort.py: + id: 16ce306129e5 + last_write_checksum: sha1:703d87ae8c89b9fa9284833c45daa77752c3a8e8 + pristine_git_object: 43ffa02b8407ab64d41f23c3a56c02fe275e38de src/mistralai/azure/client/models/referencechunk.py: id: c9612f854670 - last_write_checksum: sha1:e81e758e00db915e68f58ffa1e03b2c473f64477 - pristine_git_object: f7af9bf9a73e0d782e5e6c6a7866af6fbc3668d8 + last_write_checksum: sha1:20193f683118bf6491fbf54c103c9b7433d9c2de + pristine_git_object: debab3cece0fdbb7e8dbcdf31b773f4d2eb79fe4 src/mistralai/azure/client/models/responseformat.py: id: c124e7c316aa - last_write_checksum: sha1:d368a2d4320356b6daab1dd0c62c6c862e902ca0 - pristine_git_object: 20fd2b868506cff278d1d7dc719eddd56ea538b0 + last_write_checksum: sha1:8233b272403d9b96f194498d624703e936a7d4ad + pristine_git_object: 50f0b075404b540f8003e56dbe23f2f22b71f9d1 src/mistralai/azure/client/models/responseformats.py: id: fef416cefcd4 last_write_checksum: sha1:a212e85d286b5b49219f57d071a2232ff8b5263b @@ -558,52 +707,60 @@ trackedFiles: pristine_git_object: 9295148588a143278ff5f48f9142347e35cfdab2 src/mistralai/azure/client/models/thinkchunk.py: id: df6bbd55b3eb - last_write_checksum: sha1:b988cdf2755c3192aef30a9b2f945214fbc59785 - pristine_git_object: ec8e7f95be2ff0d742acb1fdea2867e23788cb06 + last_write_checksum: sha1:0be9b76a5278eb5ac537500cfc097d0a6605aa44 + pristine_git_object: 8e52ccc9dc36aad303a1aaf7f596f8d33071073b src/mistralai/azure/client/models/tool.py: id: 4075ef72c086 - last_write_checksum: sha1:4bef6d64b6426fdeff5031557c3c0e37f5c33b9a - pristine_git_object: 87329bdb73526120a3f63d48299114485a7fe038 + last_write_checksum: sha1:0d6610c91df755b3c9e037053e01acb3b2e7fe5f + pristine_git_object: ecfb5f34f0b09cedd026db218e99fdff5c994df8 src/mistralai/azure/client/models/toolcall.py: id: c65e6f79e539 - last_write_checksum: sha1:a3b36214b4533b79868630348762206a0e5ca26e - pristine_git_object: ada1ea65136fa58dce55f2857d895ea916bcd41f + last_write_checksum: sha1:c4892903cf784b2c9c419e0531dd50d73c7de117 + pristine_git_object: 87ccd030b41a93ad28a62accb84ec6bdbbb1d477 src/mistralai/azure/client/models/toolchoice.py: id: c25062b5de34 - last_write_checksum: sha1:6212c9366eb3b4f4062c86c00d4502dd03bf5ce1 - pristine_git_object: ddb9e1417c880c44a7f0505bfde839570fa3cd4a + last_write_checksum: sha1:8d33cc71f03e577f9ec3f98a23096d3eb75742cb + pristine_git_object: 15d1da1cebd1d8c36c33d60a4b57725e85c8f1e5 src/mistralai/azure/client/models/toolchoiceenum.py: id: cc06ba3a8d21 last_write_checksum: sha1:3dbba9a58c5569aafe115f3f7713a52b01ad8620 pristine_git_object: 01f6f677b379f9e3c99db9d1ad248cb0033a2804 + src/mistralai/azure/client/models/toolconfiguration.py: + id: b07091794add + last_write_checksum: sha1:7a31641d9497635de16a650d0a3e0c82bc4c36f3 + pristine_git_object: 6977679f36a90e5a86c6574fa8b3ef1fd2f24c19 src/mistralai/azure/client/models/toolmessage.py: id: 84ac736fa955 - last_write_checksum: sha1:e4ed14906985fe74fd76a9adb09125ebc1218a1f - pristine_git_object: 670210de0d05b52ee9dffbbb808a87e67c2d37a9 + last_write_checksum: sha1:aa9b117c29886ed3cf1a1269a9d4b180f40f6168 + pristine_git_object: e246d5a29af3d758a2e81413abe8d24b4a487872 src/mistralai/azure/client/models/toolreferencechunk.py: id: b96d2eda57fc - last_write_checksum: sha1:6640e3ce0e2a0478fb29e6ea28ff6c447d4aea44 - pristine_git_object: c9db878fd3234ca46b0f958994e9dda4d68b9171 - src/mistralai/azure/client/models/tooltypes.py: - id: fa881b046d34 - last_write_checksum: sha1:cd28ddc02fff9a5abbb59c82fe9e0dcbdb9b6d2a - pristine_git_object: 1cce7446f2772b998208ea1c78c7969e3881d5d0 + last_write_checksum: sha1:3f522c035643c96d12df6047a253c48735c29f38 + pristine_git_object: 0845fde3cbab8e46038e957367dbc1ea1581440f src/mistralai/azure/client/models/usageinfo.py: id: 3edc9c81b329 - last_write_checksum: sha1:0ac2350e4efa1ed3ffd7d33ac91c3ef564d1d773 - pristine_git_object: 0f04c87c97ff3148106408a46618c848b86c4b37 + last_write_checksum: sha1:98dce1963bb4a9cccc5634d79d210c2fb92d92de + pristine_git_object: 9200682a4344cfa6e67fb30d5dc7710fbb547940 src/mistralai/azure/client/models/usermessage.py: id: 3796508adc07 - last_write_checksum: sha1:8eb35fb07971d74cf2cb0858c037558f52df6aa9 - pristine_git_object: 549b01ca887651a95c5efc8aff3372d32dfdc277 + last_write_checksum: sha1:8e93e3edef3fc85c60a16d7e7b74a0fc357f4646 + pristine_git_object: 7dbca134f54afcb93e0cb2fd7faa09a3010c2172 src/mistralai/azure/client/models/validationerror.py: id: f2b84813e2ea - last_write_checksum: sha1:10b9637fc1c659518bc5bc9116058ad055869800 - pristine_git_object: f0169e18a5d0e3d1d87fd907697fcca22b11bc06 + last_write_checksum: sha1:ab5b5f28322856248c4288cce029c385100b80c4 + pristine_git_object: aaa72f21ce4ccbea4d7278539d898c5e9f799e44 + src/mistralai/azure/client/models/websearchpremiumtool.py: + id: 4b8bc6d9411d + last_write_checksum: sha1:7ae05870a61adb37cf8f2b7828f728b55fdd1440 + pristine_git_object: 252d8803e71d18b01e702ec2cbc6f57db0191e73 + src/mistralai/azure/client/models/websearchtool.py: + id: f0af7a3db559 + last_write_checksum: sha1:f5ed31a377eec433ebd35e6754a313590a5f83d3 + pristine_git_object: 363e033128fe7eb091280a58d53d0013b2020930 src/mistralai/azure/client/ocr.py: id: 5817c10c9297 - last_write_checksum: sha1:7666ca9f4596cee080952b2f4096bd4176051680 - pristine_git_object: b9270f6a52406d8a9bf02d90c24ae540da6dfb9d + last_write_checksum: sha1:935155cce07869bfed809449223528a892d2577a + pristine_git_object: c4f706a9b197f86183eece46dcc96c2786dfca5c src/mistralai/azure/client/py.typed: id: e88369f116d2 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 @@ -642,8 +799,8 @@ trackedFiles: pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/mistralai/azure/client/utils/eventstreaming.py: id: bdc37b70360c - last_write_checksum: sha1:ffa870a25a7e4e2015bfd7a467ccd3aa1de97f0e - pristine_git_object: f2052fc22d9fd6c663ba3dce019fe234ca37108b + last_write_checksum: sha1:620d78a8b4e3b854e08d136e02e40a01a786bd70 + pristine_git_object: 3bdcd6d3d4fc772cb7f5fca8685dcdc8c85e13e8 src/mistralai/azure/client/utils/forms.py: id: 51696122c557 last_write_checksum: sha1:0ca31459b99f761fcc6d0557a0a38daac4ad50f4 @@ -658,8 +815,8 @@ trackedFiles: pristine_git_object: b661aff65d38b77d035149699aea09b2785d2fc6 src/mistralai/azure/client/utils/metadata.py: id: 44f85bd3b2e2 - last_write_checksum: sha1:c6a560bd0c63ab158582f34dadb69433ea73b3d4 - pristine_git_object: 173b3e5ce658675c2f504222a56b3daaaa68107d + last_write_checksum: sha1:e703e5cbb5255144aacf86898d1420529afaaff8 + pristine_git_object: 5abddd588837ac297050ca3b543627faadb350a9 src/mistralai/azure/client/utils/queryparams.py: id: ec1c03114156 last_write_checksum: sha1:b94c3f314fd3da0d1d215afc2731f48748e2aa59 @@ -674,12 +831,12 @@ trackedFiles: pristine_git_object: af07d4e941007af4213c5ec9047ef8a2fca04e5e src/mistralai/azure/client/utils/security.py: id: 1d35741ce5f1 - last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 - pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed + last_write_checksum: sha1:c11eef495b6aaa249178c24c796940cc540b7a00 + pristine_git_object: 42d8d78e9981eed7507670014d99588e27ab325a src/mistralai/azure/client/utils/serializers.py: id: a1f26d73c3ad - last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 - pristine_git_object: 14321eb479de81d0d9580ec8291e0ff91bf29e57 + last_write_checksum: sha1:61009f2e4ef6613a1a5af813fe020373dae5a492 + pristine_git_object: d2149f8b909cb96628db140ac3cddb1b1e981367 src/mistralai/azure/client/utils/unions.py: id: 9abcc9913e3f last_write_checksum: sha1:6e38049f323e0b5fb4bd0e88ab51ec447197ccb0 @@ -730,7 +887,6 @@ examples: application/json: {"pages": [{"index": 1, "markdown": "# LEVERAGING UNLABELED DATA TO PREDICT OUT-OF-DISTRIBUTION PERFORMANCE\nSaurabh Garg*
Carnegie Mellon University
sgarg2@andrew.cmu.edu
Sivaraman Balakrishnan
Carnegie Mellon University
sbalakri@andrew.cmu.edu
Zachary C. Lipton
Carnegie Mellon University
zlipton@andrew.cmu.edu\n## Behnam Neyshabur\nGoogle Research, Blueshift team
neyshabur@google.com\nHanie Sedghi
Google Research, Brain team
hsedghi@google.com\n#### Abstract\nReal-world machine learning deployments are characterized by mismatches between the source (training) and target (test) distributions that may cause performance drops. In this work, we investigate methods for predicting the target domain accuracy using only labeled source data and unlabeled target data. We propose Average Thresholded Confidence (ATC), a practical method that learns a threshold on the model's confidence, predicting accuracy as the fraction of unlabeled examples for which model confidence exceeds that threshold. ATC outperforms previous methods across several model architectures, types of distribution shifts (e.g., due to synthetic corruptions, dataset reproduction, or novel subpopulations), and datasets (WILDS, ImageNet, BREEDS, CIFAR, and MNIST). In our experiments, ATC estimates target performance $2-4 \\times$ more accurately than prior methods. We also explore the theoretical foundations of the problem, proving that, in general, identifying the accuracy is just as hard as identifying the optimal predictor and thus, the efficacy of any method rests upon (perhaps unstated) assumptions on the nature of the shift. Finally, analyzing our method on some toy distributions, we provide insights concerning when it works ${ }^{1}$.\n## 1 INTRODUCTION\nMachine learning models deployed in the real world typically encounter examples from previously unseen distributions. While the IID assumption enables us to evaluate models using held-out data from the source distribution (from which training data is sampled), this estimate is no longer valid in presence of a distribution shift. Moreover, under such shifts, model accuracy tends to degrade (Szegedy et al., 2014; Recht et al., 2019; Koh et al., 2021). Commonly, the only data available to the practitioner are a labeled training set (source) and unlabeled deployment-time data which makes the problem more difficult. In this setting, detecting shifts in the distribution of covariates is known to be possible (but difficult) in theory (Ramdas et al., 2015), and in practice (Rabanser et al., 2018). However, producing an optimal predictor using only labeled source and unlabeled target data is well-known to be impossible absent further assumptions (Ben-David et al., 2010; Lipton et al., 2018).\nTwo vital questions that remain are: (i) the precise conditions under which we can estimate a classifier's target-domain accuracy; and (ii) which methods are most practically useful. To begin, the straightforward way to assess the performance of a model under distribution shift would be to collect labeled (target domain) examples and then to evaluate the model on that data. However, collecting fresh labeled data from the target distribution is prohibitively expensive and time-consuming, especially if the target distribution is non-stationary. Hence, instead of using labeled data, we aim to use unlabeled data from the target distribution, that is comparatively abundant, to predict model performance. Note that in this work, our focus is not to improve performance on the target but, rather, to estimate the accuracy on the target for a given classifier.\n[^0]: Work done in part while Saurabh Garg was interning at Google ${ }^{1}$ Code is available at [https://github.com/saurabhgarg1996/ATC_code](https://github.com/saurabhgarg1996/ATC_code).\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 2, "markdown": "![img-0.jpeg](img-0.jpeg)\nFigure 1: Illustration of our proposed method ATC. Left: using source domain validation data, we identify a threshold on a score (e.g. negative entropy) computed on model confidence such that fraction of examples above the threshold matches the validation set accuracy. ATC estimates accuracy on unlabeled target data as the fraction of examples with the score above the threshold. Interestingly, this threshold yields accurate estimates on a wide set of target distributions resulting from natural and synthetic shifts. Right: Efficacy of ATC over previously proposed approaches on our testbed with a post-hoc calibrated model. To obtain errors on the same scale, we rescale all errors with Average Confidence (AC) error. Lower estimation error is better. See Table 1 for exact numbers and comparison on various types of distribution shift. See Sec. 5 for details on our testbed.\nRecently, numerous methods have been proposed for this purpose (Deng & Zheng, 2021; Chen et al., 2021b; Jiang et al., 2021; Deng et al., 2021; Guillory et al., 2021). These methods either require calibration on the target domain to yield consistent estimates (Jiang et al., 2021; Guillory et al., 2021) or additional labeled data from several target domains to learn a linear regression function on a distributional distance that then predicts model performance (Deng et al., 2021; Deng & Zheng, 2021; Guillory et al., 2021). However, methods that require calibration on the target domain typically yield poor estimates since deep models trained and calibrated on source data are not, in general, calibrated on a (previously unseen) target domain (Ovadia et al., 2019). Besides, methods that leverage labeled data from target domains rely on the fact that unseen target domains exhibit strong linear correlation with seen target domains on the underlying distance measure and, hence, can be rendered ineffective when such target domains with labeled data are unavailable (in Sec. 5.1 we demonstrate such a failure on a real-world distribution shift problem). Therefore, throughout the paper, we assume access to labeled source data and only unlabeled data from target domain(s).\nIn this work, we first show that absent assumptions on the source classifier or the nature of the shift, no method of estimating accuracy will work generally (even in non-contrived settings). To estimate accuracy on target domain perfectly, we highlight that even given perfect knowledge of the labeled source distribution (i.e., $p_{s}(x, y)$ ) and unlabeled target distribution (i.e., $p_{t}(x)$ ), we need restrictions on the nature of the shift such that we can uniquely identify the target conditional $p_{t}(y \\mid x)$. Thus, in general, identifying the accuracy of the classifier is as hard as identifying the optimal predictor.\nSecond, motivated by the superiority of methods that use maximum softmax probability (or logit) of a model for Out-Of-Distribution (OOD) detection (Hendrycks & Gimpel, 2016; Hendrycks et al., 2019), we propose a simple method that leverages softmax probability to predict model performance. Our method, Average Thresholded Confidence (ATC), learns a threshold on a score (e.g., maximum confidence or negative entropy) of model confidence on validation source data and predicts target domain accuracy as the fraction of unlabeled target points that receive a score above that threshold. ATC selects a threshold on validation source data such that the fraction of source examples that receive the score above the threshold match the accuracy of those examples. Our primary contribution in ATC is the proposal of obtaining the threshold and observing its efficacy on (practical) accuracy estimation. Importantly, our work takes a step forward in positively answering the question raised in Deng & Zheng (2021); Deng et al. (2021) about a practical strategy to select a threshold that enables accuracy prediction with thresholded model confidence.\n", "images": [{"id": "img-0.jpeg", "top_left_x": 292, "top_left_y": 217, "bottom_right_x": 1405, "bottom_right_y": 649, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 3, "markdown": "", "images": [], "dimensions": {"dpi": 539192, "height": 944919, "width": 247256}}, {"index": 27, "markdown": "![img-8.jpeg](img-8.jpeg)\nFigure 9: Scatter plot of predicted accuracy versus (true) OOD accuracy for vision datasets except MNIST with a ResNet50 model. Results reported by aggregating MAE numbers over 4 different seeds.\n", "images": [{"id": "img-8.jpeg", "top_left_x": 290, "top_left_y": 226, "bottom_right_x": 1405, "bottom_right_y": 1834, "image_base64": ""}], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 28, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 6.60 | 5.74 | 9.88 | 6.89 | 7.25 | 6.07 | 4.77 | 3.21 | 3.02 | 2.99 | 2.85 | | | | (0.35) | (0.30) | (0.16) | (0.13) | (0.15) | (0.16) | (0.13) | (0.49) | (0.40) | (0.37) | (0.29) | | | Synthetic | 12.33 | 10.20 | 16.50 | 11.91 | 13.87 | 11.08 | 6.55 | 4.65 | 4.25 | 4.21 | 3.87 | | | | (0.51) | (0.48) | (0.26) | (0.17) | (0.18) | (0.17) | (0.35) | (0.55) | (0.55) | (0.55) | (0.75) | | CIFAR100 | Synthetic | 13.69 | 11.51 | 23.61 | 13.10 | 14.60 | 10.14 | 9.85 | 5.50 | 4.75 | 4.72 | 4.94 | | | | (0.55) | (0.41) | (1.16) | (0.80) | (0.77) | (0.64) | (0.57) | (0.70) | (0.73) | (0.74) | (0.74) | | ImageNet200 | Natural | 12.37 | 8.19 | 22.07 | 8.61 | 15.17 | 7.81 | 5.13 | 4.37 | 2.04 | 3.79 | 1.45 | | | | (0.25) | (0.33) | (0.08) | (0.25) | (0.11) | (0.29) | (0.08) | (0.39) | (0.24) | (0.30) | (0.27) | | | Synthetic | 19.86 | 12.94 | 32.44 | 13.35 | 25.02 | 12.38 | 5.41 | 5.93 | 3.09 | 5.00 | 2.68 | | | | (1.38) | (1.81) | (1.00) | (1.30) | (1.10) | (1.38) | (0.89) | (1.38) | (0.87) | (1.28) | (0.45) | | ImageNet | Natural | 7.77 | 6.50 | 18.13 | 6.02 | 8.13 | 5.76 | 6.23 | 3.88 | 2.17 | 2.06 | 0.80 | | | | (0.27) | (0.33) | (0.23) | (0.34) | (0.27) | (0.37) | (0.41) | (0.53) | (0.62) | (0.54) | (0.44) | | | Synthetic | 13.39 | 10.12 | 24.62 | 8.51 | 13.55 | 7.90 | 6.32 | 3.34 | 2.53 | 2.61 | 4.89 | | | | (0.53) | (0.63) | (0.64) | (0.71) | (0.61) | (0.72) | (0.33) | (0.53) | (0.36) | (0.33) | (0.83) | | FMoW-WILDS | Natural | 5.53 | 4.31 | 33.53 | 12.84 | 5.94 | 4.45 | 5.74 | 3.06 | 2.70 | 3.02 | 2.72 | | | | (0.33) | (0.63) | (0.13) | (12.06) | (0.36) | (0.77) | (0.55) | (0.36) | (0.54) | (0.35) | (0.44) | | RxRx1-WILDS | Natural | 5.80 | 5.72 | 7.90 | 4.84 | 5.98 | 5.98 | 6.03 | 4.66 | 4.56 | 4.41 | 4.47 | | | | (0.17) | (0.15) | (0.24) | (0.09) | (0.15) | (0.13) | (0.08) | (0.38) | (0.38) | (0.31) | (0.26) | | Amazon-WILDS | Natural | 2.40 | 2.29 | 8.01 | 2.38 | 2.40 | 2.28 | 17.87 | 1.65 | 1.62 | 1.60 | 1.59 | | | | (0.08) | (0.09) | (0.53) | (0.17) | (0.09) | (0.09) | (0.18) | (0.06) | (0.05) | (0.14) | (0.15) | | CivilCom.-WILDS | Natural | 12.64 | 10.80 | 16.76 | 11.03 | 13.31 | 10.99 | 16.65 | | 7.14 | | | | | | (0.52) | (0.48) | (0.53) | (0.49) | (0.52) | (0.49) | (0.25) | | (0.41) | | | | MNIST | Natural | 18.48 | 15.99 | 21.17 | 14.81 | 20.19 | 14.56 | 24.42 | 5.02 | 2.40 | 3.14 | 3.50 | | | | (0.45) | (1.53) | (0.24) | (3.89) | (0.23) | (3.47) | (0.41) | (0.44) | (1.83) | (0.49) | (0.17) | | ENTITY-13 | Same | 16.23 | 11.14 | 24.97 | 10.88 | 19.08 | 10.47 | 10.71 | 5.39 | 3.88 | 4.58 | 4.19 | | | | (0.77) | (0.65) | (0.70) | (0.77) | (0.65) | (0.72) | (0.74) | (0.92) | (0.61) | (0.85) | (0.16) | | | Novel | 28.53 | 22.02 | 38.33 | 21.64 | 32.43 | 21.22 | 20.61 | 13.58 | 10.28 | 12.25 | 6.63 | | | | (0.82) | (0.68) | (0.75) | (0.86) | (0.69) | (0.80) | (0.60) | (1.15) | (1.34) | (1.21) | (0.93) | | ENTITY-30 | Same | 18.59 | 14.46 | 28.82 | 14.30 | 21.63 | 13.46 | 12.92 | 9.12 | 7.75 | 8.15 | 7.64 | | | | (0.51) | (0.52) | (0.43) | (0.71) | (0.37) | (0.59) | (0.14) | (0.62) | (0.72) | (0.68) | (0.88) | | | Novel | 32.34 | 26.85 | 44.02 | 26.27 | 36.82 | 25.42 | 23.16 | 17.75 | 14.30 | 15.60 | 10.57 | | | | (0.60) | (0.58) | (0.56) | (0.79) | (0.47) | (0.68) | (0.12) | (0.76) | (0.85) | (0.86) | (0.86) | | NONLIVING-26 | Same | 18.66 | 17.17 | 26.39 | 16.14 | 19.86 | 15.58 | 16.63 | 10.87 | 10.24 | 10.07 | 10.26 | | | | (0.76) | (0.74) | (0.82) | (0.81) | (0.67) | (0.76) | (0.45) | (0.98) | (0.83) | (0.92) | (1.18) | | | Novel | 33.43 | 31.53 | 41.66 | 29.87 | 35.13 | 29.31 | 29.56 | 21.70 | 20.12 | 19.08 | 18.26 | | | | (0.67) | (0.65) | (0.67) | (0.71) | (0.54) | (0.64) | (0.21) | (0.86) | (0.75) | (0.82) | (1.12) | | LIVING-17 | Same | 12.63 | 11.05 | 18.32 | 10.46 | 14.43 | 10.14 | 9.87 | 4.57 | 3.95 | 3.81 | 4.21 | | | | (1.25) | (1.20) | (1.01) | (1.12) | (1.11) | (1.16) | (0.61) | (0.71) | (0.48) | (0.22) | (0.53) | | | Novel | 29.03 | 26.96 | 35.67 | 26.11 | 31.73 | 25.73 | 23.53 | 16.15 | 14.49 | 12.97 | 11.39 | | | | (1.44) | (1.38) | (1.09) | (1.27) | (1.19) | (1.35) | (0.52) | (1.36) | (1.46) | (1.52) | (1.72) |\nTable 3: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. For language datasets, we use DistilBERT-base-uncased, for vision dataset we report results with DenseNet model with the exception of MNIST where we use FCN. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}, {"index": 29, "markdown": "| Dataset | Shift | IM | | AC | | DOC | | GDE | ATC-MC (Ours) | | ATC-NE (Ours) | | | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | | | | Pre T | Post T | Pre T | Post T | Pre T | Post T | Post T | Pre T | Post T | Pre T | Post T | | CIFAR10 | Natural | 7.14 | 6.20 | 10.25 | 7.06 | 7.68 | 6.35 | 5.74 | 4.02 | 3.85 | 3.76 | 3.38 | | | | (0.14) | (0.11) | (0.31) | (0.33) | (0.28) | (0.27) | (0.25) | (0.38) | (0.30) | (0.33) | (0.32) | | | Synthetic | 12.62 | 10.75 | 16.50 | 11.91 | 13.93 | 11.20 | 7.97 | 5.66 | 5.03 | 4.87 | 3.63 | | | | (0.76) | (0.71) | (0.28) | (0.24) | (0.29) | (0.28) | (0.13) | (0.64) | (0.71) | (0.71) | (0.62) | | CIFAR100 | Synthetic | 12.77 | 12.34 | 16.89 | 12.73 | 11.18 | 9.63 | 12.00 | 5.61 | 5.55 | 5.65 | 5.76 | | | | (0.43) | (0.68) | (0.20) | (2.59) | (0.35) | (1.25) | (0.48) | (0.51) | (0.55) | (0.35) | (0.27) | | ImageNet200 | Natural | 12.63 | 7.99 | 23.08 | 7.22 | 15.40 | 6.33 | 5.00 | 4.60 | 1.80 | 4.06 | 1.38 | | | | (0.59) | (0.47) | (0.31) | (0.22) | (0.42) | (0.24) | (0.36) | (0.63) | (0.17) | (0.69) | (0.29) | | | Synthetic | 20.17 | 11.74 | 33.69 | 9.51 | 25.49 | 8.61 | 4.19 | 5.37 | 2.78 | 4.53 | 3.58 | | | | (0.74) | (0.80) | (0.73) | (0.51) | (0.66) | (0.50) | (0.14) | (0.88) | (0.23) | (0.79) | (0.33) | | ImageNet | Natural | 8.09 | 6.42 | 21.66 | 5.91 | 8.53 | 5.21 | 5.90 | 3.93 | 1.89 | 2.45 | 0.73 | | | | (0.25) | (0.28) | (0.38) | (0.22) | (0.26) | (0.25) | (0.44) | (0.26) | (0.21) | (0.16) | (0.10) | | | Synthetic | 13.93 | 9.90 | 28.05 | 7.56 | 13.82 | 6.19 | 6.70 | 3.33 | 2.55 | 2.12 | 5.06 | | | | (0.14) | (0.23) | (0.39) | (0.13) | (0.31) | (0.07) | (0.52) | (0.25) | (0.25) | (0.31) | (0.27) | | FMoW-WILDS | Natural | 5.15 | 3.55 | 34.64 | 5.03 | 5.58 | 3.46 | 5.08 | 2.59 | 2.33 | 2.52 | 2.22 | | | | (0.19) | (0.41) | (0.22) | (0.29) | (0.17) | (0.37) | (0.46) | (0.32) | (0.28) | (0.25) | (0.30) | | RxRx1-WILDS | Natural | 6.17 | 6.11 | 21.05 | 5.21 | 6.54 | 6.27 | 6.82 | 5.30 | 5.20 | 5.19 | 5.63 | | | | (0.20) | (0.24) | (0.31) | (0.18) | (0.21) | (0.20) | (0.31) | (0.30) | (0.44) | (0.43) | (0.55) | | Entity-13 | Same | 18.32 | 14.38 | 27.79 | 13.56 | 20.50 | 13.22 | 16.09 | 9.35 | 7.50 | 7.80 | 6.94 | | | | (0.29) | (0.53) | (1.18) | (0.58) | (0.47) | (0.58) | (0.84) | (0.79) | (0.65) | (0.62) | (0.71) | | | Novel | 28.82 | 24.03 | 38.97 | 22.96 | 31.66 | 22.61 | 25.26 | 17.11 | 13.96 | 14.75 | 9.94 | | | | (0.30) | (0.55) | (1.32) | (0.59) | (0.54) | (0.58) | (1.08) | (0.93) | (0.64) | (0.78) | | | Entity-30 | Same | 16.91 | 14.61 | 26.84 | 14.37 | 18.60 | 13.11 | 13.74 | 8.54 | 7.94 | 7.77 | 8.04 | | | | (1.33) | (1.11) | (2.15) | (1.34) | (1.69) | (1.30) | (1.07) | (1.47) | (1.38) | (1.44) | (1.51) | | | Novel | 28.66 | 25.83 | 39.21 | 25.03 | 30.95 | 23.73 | 23.15 | 15.57 | 13.24 | 12.44 | 11.05 | | | | (1.16) | (0.88) | (2.03) | (1.11) | (1.64) | (1.11) | (0.51) | (1.44) | (1.15) | (1.26) | (1.13) | | NonLIVING-26 | Same | 17.43 | 15.95 | 27.70 | 15.40 | 18.06 | 14.58 | 16.99 | 10.79 | 10.13 | 10.05 | 10.29 | | | | (0.90) | (0.86) | (0.90) | (0.69) | (1.00) | (0.78) | (1.25) | (0.62) | (0.32) | (0.46) | (0.79) | | | Novel | 29.51 | 27.75 | 40.02 | 26.77 | 30.36 | 25.93 | 27.70 | 19.64 | 17.75 | 16.90 | 15.69 | | | | (0.86) | (0.82) | (0.76) | (0.82) | (0.95) | (0.80) | (1.42) | (0.68) | (0.53) | (0.60) | (0.83) | | LIVING-17 | Same | 14.28 | 12.21 | 23.46 | 11.16 | 15.22 | 10.78 | 10.49 | 4.92 | 4.23 | 4.19 | 4.73 | | | | (0.96) | (0.93) | (1.16) | (0.90) | (0.96) | (0.99) | (0.97) | (0.57) | (0.42) | (0.35) | (0.24) | | | Novel | 28.91 | 26.35 | 38.62 | 24.91 | 30.32 | 24.52 | 22.49 | 15.42 | 13.02 | 12.29 | 10.34 | | | | (0.66) | (0.73) | (1.01) | (0.61) | (0.59) | (0.74) | (0.85) | (0.59) | (0.53) | (0.73) | (0.62) |\nTable 4: Mean Absolute estimation Error (MAE) results for different datasets in our setup grouped by the nature of shift for ResNet model. 'Same' refers to same subpopulation shifts and 'Novel' refers novel subpopulation shifts. We include details about the target sets considered in each shift in Table 2. Post T denotes use of TS calibration on source. Across all datasets, we observe that ATC achieves superior performance (lower MAE is better). For GDE post T and pre T estimates match since TS doesn't alter the argmax prediction. Results reported by aggregating MAE numbers over 4 different seeds. Values in parenthesis (i.e., $(\\cdot)$ ) denote standard deviation values.\n", "images": [], "dimensions": {"dpi": 200, "height": 2200, "width": 1700}}], "model": "mistral-ocr-2503-completion", "usage_info": {"pages_processed": 29, "doc_size_bytes": null}} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes:\n* `mistral_azure.chat.stream()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_azure.chat.complete()`: \n * `request.messages[].union(system).content.union(Array)[].union(thinking).thinking[].union(ToolReferenceChunk)` **Added**\n * `error.detail[]` **Changed**\n* `mistral_azure.ocr.process()`: `error.detail[]` **Changed**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/packages/azure/.speakeasy/gen.yaml b/packages/azure/.speakeasy/gen.yaml index 58016b88..f59f7edc 100644 --- a/packages/azure/.speakeasy/gen.yaml +++ b/packages/azure/.speakeasy/gen.yaml @@ -30,7 +30,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.0.0 + version: 2.1.0 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/packages/azure/RELEASES.md b/packages/azure/RELEASES.md index 6844bc64..c20bf38c 100644 --- a/packages/azure/RELEASES.md +++ b/packages/azure/RELEASES.md @@ -38,4 +38,14 @@ Based on: ### Generated - [python v2.0.0] packages/azure ### Releases -- [PyPI v2.0.0] https://pypi.org/project/mistralai-azure/2.0.0 - packages/azure \ No newline at end of file +- [PyPI v2.0.0] https://pypi.org/project/mistralai-azure/2.0.0 - packages/azure + +## 2026-05-22 14:13:06 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.6 (2.884.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.1.0] packages/azure +### Releases +- [PyPI v2.1.0] https://pypi.org/project/mistralai-azure/2.1.0 - packages/azure \ No newline at end of file diff --git a/packages/azure/docs/models/apikeyauth.md b/packages/azure/docs/models/apikeyauth.md new file mode 100644 index 00000000..1fbff10e --- /dev/null +++ b/packages/azure/docs/models/apikeyauth.md @@ -0,0 +1,9 @@ +# APIKeyAuth + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `type` | *Literal["api-key"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/authorization.md b/packages/azure/docs/models/authorization.md new file mode 100644 index 00000000..11ea5c6a --- /dev/null +++ b/packages/azure/docs/models/authorization.md @@ -0,0 +1,17 @@ +# Authorization + + +## Supported Types + +### `models.APIKeyAuth` + +```python +value: models.APIKeyAuth = /* values here */ +``` + +### `models.OAuth2TokenAuth` + +```python +value: models.OAuth2TokenAuth = /* values here */ +``` + diff --git a/packages/azure/docs/models/builtinconnectors.md b/packages/azure/docs/models/builtinconnectors.md index f96f5044..150f89b0 100644 --- a/packages/azure/docs/models/builtinconnectors.md +++ b/packages/azure/docs/models/builtinconnectors.md @@ -1,12 +1,17 @@ # BuiltInConnectors +## Example Usage + +```python +from mistralai.azure.client.models import BuiltInConnectors +value: BuiltInConnectors = "web_search" +``` + ## Values -| Name | Value | -| -------------------- | -------------------- | -| `WEB_SEARCH` | web_search | -| `WEB_SEARCH_PREMIUM` | web_search_premium | -| `CODE_INTERPRETER` | code_interpreter | -| `IMAGE_GENERATION` | image_generation | -| `DOCUMENT_LIBRARY` | document_library | \ No newline at end of file +- `"web_search"` +- `"web_search_premium"` +- `"code_interpreter"` +- `"image_generation"` +- `"document_library"` diff --git a/packages/azure/docs/models/chatcompletionchoice.md b/packages/azure/docs/models/chatcompletionchoice.md index deaa0ea0..79d24a33 100644 --- a/packages/azure/docs/models/chatcompletionchoice.md +++ b/packages/azure/docs/models/chatcompletionchoice.md @@ -6,5 +6,6 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `index` | *int* | :heavy_check_mark: | N/A | 0 | -| `message` | [models.AssistantMessage](../models/assistantmessage.md) | :heavy_check_mark: | N/A | | +| `message` | [Optional[models.AssistantMessage]](../models/assistantmessage.md) | :heavy_minus_sign: | N/A | | +| `messages` | List[[models.DeltaMessage](../models/deltamessage.md)] | :heavy_minus_sign: | N/A | | | `finish_reason` | [models.ChatCompletionChoiceFinishReason](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | N/A | stop | \ No newline at end of file diff --git a/packages/azure/docs/models/chatcompletionchoicefinishreason.md b/packages/azure/docs/models/chatcompletionchoicefinishreason.md index b2f15ecb..1ca6a646 100644 --- a/packages/azure/docs/models/chatcompletionchoicefinishreason.md +++ b/packages/azure/docs/models/chatcompletionchoicefinishreason.md @@ -1,12 +1,21 @@ # ChatCompletionChoiceFinishReason +## Example Usage + +```python +from mistralai.azure.client.models import ChatCompletionChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ChatCompletionChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| -------------- | -------------- | -| `STOP` | stop | -| `LENGTH` | length | -| `MODEL_LENGTH` | model_length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"model_length"` +- `"error"` +- `"tool_calls"` diff --git a/packages/azure/docs/models/chatcompletionrequest.md b/packages/azure/docs/models/chatcompletionrequest.md index f8715cd0..ba44a066 100644 --- a/packages/azure/docs/models/chatcompletionrequest.md +++ b/packages/azure/docs/models/chatcompletionrequest.md @@ -7,20 +7,22 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *Optional[str]* | :heavy_minus_sign: | The ID of the model to use for this request. | azureai | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. | | -| `stop` | [Optional[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionRequestStop]](../models/chatcompletionrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionRequestMessage](../models/chatcompletionrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionRequestTool](../models/chatcompletionrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionRequestToolChoice]](../models/chatcompletionrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/packages/azure/docs/models/chatcompletionrequesttool.md b/packages/azure/docs/models/chatcompletionrequesttool.md new file mode 100644 index 00000000..572d12ca --- /dev/null +++ b/packages/azure/docs/models/chatcompletionrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/packages/azure/docs/models/chatcompletionstreamrequest.md b/packages/azure/docs/models/chatcompletionstreamrequest.md index cc82a8c7..c3d90e13 100644 --- a/packages/azure/docs/models/chatcompletionstreamrequest.md +++ b/packages/azure/docs/models/chatcompletionstreamrequest.md @@ -7,20 +7,22 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *Optional[str]* | :heavy_minus_sign: | The ID of the model to use for this request. | azureai | | `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. | | -| `top_p` | *Optional[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | +| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | | `max_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. | | | `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `stop` | [Optional[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | +| `stop` | [OptionalNullable[models.ChatCompletionStreamRequestStop]](../models/chatcompletionstreamrequeststop.md) | :heavy_minus_sign: | Stop generation if this token is detected. Or if one of these tokens is detected when providing an array | | | `random_seed` | *OptionalNullable[int]* | :heavy_minus_sign: | The seed to use for random sampling. If set, different calls will generate deterministic results. | | | `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | | | `messages` | List[[models.ChatCompletionStreamRequestMessage](../models/chatcompletionstreamrequestmessage.md)] | :heavy_check_mark: | The prompt(s) to generate completions for, encoded as a list of dict with role and content. | [
{
"role": "user",
"content": "Who is the best French painter? Answer in one short sentence."
}
] | | `response_format` | [Optional[models.ResponseFormat]](../models/responseformat.md) | :heavy_minus_sign: | Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. | **Example 1:** {
"type": "text"
}
**Example 2:** {
"type": "json_object"
}
**Example 3:** {
"type": "json_schema",
"json_schema": {
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"authors": {
"items": {
"type": "string"
},
"title": "Authors",
"type": "array"
}
},
"required": [
"name",
"authors"
],
"title": "Book",
"type": "object",
"additionalProperties": false
},
"name": "book",
"strict": true
}
} | -| `tools` | List[[models.Tool](../models/tool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | +| `tools` | List[[models.ChatCompletionStreamRequestTool](../models/chatcompletionstreamrequesttool.md)] | :heavy_minus_sign: | A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. | | | `tool_choice` | [Optional[models.ChatCompletionStreamRequestToolChoice]](../models/chatcompletionstreamrequesttoolchoice.md) | :heavy_minus_sign: | Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. | | -| `presence_penalty` | *Optional[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | -| `frequency_penalty` | *Optional[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | +| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. | | +| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. | | | `n` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of completions to return for each request, input tokens are only billed once. | | | `prediction` | [Optional[models.Prediction]](../models/prediction.md) | :heavy_minus_sign: | Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. | | | `parallel_tool_calls` | *Optional[bool]* | :heavy_minus_sign: | Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. | | +| `reasoning_effort` | [OptionalNullable[models.ReasoningEffort]](../models/reasoningeffort.md) | :heavy_minus_sign: | N/A | | | `prompt_mode` | [OptionalNullable[models.MistralPromptMode]](../models/mistralpromptmode.md) | :heavy_minus_sign: | Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. | | +| `guardrails` | List[[models.GuardrailConfig](../models/guardrailconfig.md)] | :heavy_minus_sign: | N/A | | | `safe_prompt` | *Optional[bool]* | :heavy_minus_sign: | Whether to inject a safety prompt before all conversations. | | \ No newline at end of file diff --git a/packages/azure/docs/models/chatcompletionstreamrequesttool.md b/packages/azure/docs/models/chatcompletionstreamrequesttool.md new file mode 100644 index 00000000..48998fcb --- /dev/null +++ b/packages/azure/docs/models/chatcompletionstreamrequesttool.md @@ -0,0 +1,47 @@ +# ChatCompletionStreamRequestTool + + +## Supported Types + +### `models.Tool` + +```python +value: models.Tool = /* values here */ +``` + +### `models.WebSearchTool` + +```python +value: models.WebSearchTool = /* values here */ +``` + +### `models.WebSearchPremiumTool` + +```python +value: models.WebSearchPremiumTool = /* values here */ +``` + +### `models.CodeInterpreterTool` + +```python +value: models.CodeInterpreterTool = /* values here */ +``` + +### `models.ImageGenerationTool` + +```python +value: models.ImageGenerationTool = /* values here */ +``` + +### `models.DocumentLibraryTool` + +```python +value: models.DocumentLibraryTool = /* values here */ +``` + +### `models.CustomConnector` + +```python +value: models.CustomConnector = /* values here */ +``` + diff --git a/packages/azure/docs/models/codeinterpretertool.md b/packages/azure/docs/models/codeinterpretertool.md new file mode 100644 index 00000000..6302fc62 --- /dev/null +++ b/packages/azure/docs/models/codeinterpretertool.md @@ -0,0 +1,9 @@ +# CodeInterpreterTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["code_interpreter"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/completionresponsestreamchoicefinishreason.md b/packages/azure/docs/models/completionresponsestreamchoicefinishreason.md index 0fece473..f1bd6ad8 100644 --- a/packages/azure/docs/models/completionresponsestreamchoicefinishreason.md +++ b/packages/azure/docs/models/completionresponsestreamchoicefinishreason.md @@ -1,11 +1,20 @@ # CompletionResponseStreamChoiceFinishReason +## Example Usage + +```python +from mistralai.azure.client.models import CompletionResponseStreamChoiceFinishReason + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: CompletionResponseStreamChoiceFinishReason = "stop" +``` + ## Values -| Name | Value | -| ------------ | ------------ | -| `STOP` | stop | -| `LENGTH` | length | -| `ERROR` | error | -| `TOOL_CALLS` | tool_calls | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"stop"` +- `"length"` +- `"error"` +- `"tool_calls"` diff --git a/packages/azure/docs/models/confidencescoresgranularity.md b/packages/azure/docs/models/confidencescoresgranularity.md new file mode 100644 index 00000000..32161eee --- /dev/null +++ b/packages/azure/docs/models/confidencescoresgranularity.md @@ -0,0 +1,14 @@ +# ConfidenceScoresGranularity + +## Example Usage + +```python +from mistralai.azure.client.models import ConfidenceScoresGranularity +value: ConfidenceScoresGranularity = "word" +``` + + +## Values + +- `"word"` +- `"page"` diff --git a/packages/azure/docs/models/customconnector.md b/packages/azure/docs/models/customconnector.md new file mode 100644 index 00000000..0a0b6921 --- /dev/null +++ b/packages/azure/docs/models/customconnector.md @@ -0,0 +1,11 @@ +# CustomConnector + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | *Literal["connector"]* | :heavy_check_mark: | N/A | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `authorization` | [OptionalNullable[models.Authorization]](../models/authorization.md) | :heavy_minus_sign: | N/A | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/deltamessage.md b/packages/azure/docs/models/deltamessage.md index e0ee575f..c2395e1b 100644 --- a/packages/azure/docs/models/deltamessage.md +++ b/packages/azure/docs/models/deltamessage.md @@ -3,8 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `content` | [OptionalNullable[models.DeltaMessageContent]](../models/deltamessagecontent.md) | :heavy_minus_sign: | N/A | -| `tool_calls` | List[[models.ToolCall](../models/toolcall.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `role` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `content` | [OptionalNullable[models.DeltaMessageContent]](../models/deltamessagecontent.md) | :heavy_minus_sign: | N/A | +| `tool_calls` | List[[models.ToolCall](../models/toolcall.md)] | :heavy_minus_sign: | N/A | +| `tool_call_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `index` | *OptionalNullable[int]* | :heavy_minus_sign: | If the completion returns multiple messages, this is to specify which message this delta is for. | +| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/documentlibrarytool.md b/packages/azure/docs/models/documentlibrarytool.md new file mode 100644 index 00000000..95c3fa52 --- /dev/null +++ b/packages/azure/docs/models/documentlibrarytool.md @@ -0,0 +1,10 @@ +# DocumentLibraryTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["document_library"]* | :heavy_check_mark: | N/A | +| `library_ids` | List[*str*] | :heavy_check_mark: | Ids of the library in which to search. | \ No newline at end of file diff --git a/packages/azure/docs/models/format_.md b/packages/azure/docs/models/format_.md index 97d286a4..3311b410 100644 --- a/packages/azure/docs/models/format_.md +++ b/packages/azure/docs/models/format_.md @@ -2,10 +2,19 @@ Format of the table +## Example Usage + +```python +from mistralai.azure.client.models import Format + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: Format = "markdown" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `MARKDOWN` | markdown | -| `HTML` | html | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"markdown"` +- `"html"` diff --git a/packages/azure/docs/models/guardrailconfig.md b/packages/azure/docs/models/guardrailconfig.md new file mode 100644 index 00000000..1276462c --- /dev/null +++ b/packages/azure/docs/models/guardrailconfig.md @@ -0,0 +1,10 @@ +# GuardrailConfig + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `block_on_error` | *Optional[bool]* | :heavy_minus_sign: | If true, return HTTP 403 and block request in the event of a server-side error | +| `moderation_llm_v1` | [OptionalNullable[models.ModerationLlmv1Config]](../models/moderationllmv1config.md) | :heavy_minus_sign: | N/A | +| `moderation_llm_v2` | [OptionalNullable[models.ModerationLlmv2Config]](../models/moderationllmv2config.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/imagedetail.md b/packages/azure/docs/models/imagedetail.md index 1e5ba3fd..d13adbf6 100644 --- a/packages/azure/docs/models/imagedetail.md +++ b/packages/azure/docs/models/imagedetail.md @@ -1,10 +1,19 @@ # ImageDetail +## Example Usage + +```python +from mistralai.azure.client.models import ImageDetail + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ImageDetail = "low" +``` + ## Values -| Name | Value | -| ------ | ------ | -| `LOW` | low | -| `AUTO` | auto | -| `HIGH` | high | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"low"` +- `"auto"` +- `"high"` diff --git a/packages/azure/docs/models/imagegenerationtool.md b/packages/azure/docs/models/imagegenerationtool.md new file mode 100644 index 00000000..b476b6f2 --- /dev/null +++ b/packages/azure/docs/models/imagegenerationtool.md @@ -0,0 +1,9 @@ +# ImageGenerationTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["image_generation"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/imageurlchunk.md b/packages/azure/docs/models/imageurlchunk.md index db0c53d2..6d238e25 100644 --- a/packages/azure/docs/models/imageurlchunk.md +++ b/packages/azure/docs/models/imageurlchunk.md @@ -1,6 +1,6 @@ # ImageURLChunk -{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0 +{"type":"image_url","image_url":"data:image/png;base64,iVBORw0"} ## Fields diff --git a/packages/azure/docs/models/mistralpromptmode.md b/packages/azure/docs/models/mistralpromptmode.md index c3409d03..3a8f7841 100644 --- a/packages/azure/docs/models/mistralpromptmode.md +++ b/packages/azure/docs/models/mistralpromptmode.md @@ -4,9 +4,18 @@ Available options to the prompt_mode argument on the chat completion endpoint. Values represent high-level intent. Assignment to actual SPs is handled internally. System prompt may include knowledge cutoff date, model capabilities, tone to use, safety guidelines, etc. +## Example Usage + +```python +from mistralai.azure.client.models import MistralPromptMode + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MistralPromptMode = "reasoning" +``` + ## Values -| Name | Value | -| ----------- | ----------- | -| `REASONING` | reasoning | \ No newline at end of file +This is an open enum. Unrecognized values will not fail type checks. + +- `"reasoning"` diff --git a/packages/azure/docs/models/moderationllmaction.md b/packages/azure/docs/models/moderationllmaction.md new file mode 100644 index 00000000..526b7a13 --- /dev/null +++ b/packages/azure/docs/models/moderationllmaction.md @@ -0,0 +1,14 @@ +# ModerationLLMAction + +## Example Usage + +```python +from mistralai.azure.client.models import ModerationLLMAction +value: ModerationLLMAction = "none" +``` + + +## Values + +- `"none"` +- `"block"` diff --git a/packages/azure/docs/models/moderationllmv1categorythresholds.md b/packages/azure/docs/models/moderationllmv1categorythresholds.md new file mode 100644 index 00000000..90ae213f --- /dev/null +++ b/packages/azure/docs/models/moderationllmv1categorythresholds.md @@ -0,0 +1,16 @@ +# ModerationLlmv1CategoryThresholds + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `sexual` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `hate_and_discrimination` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `violence_and_threats` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `dangerous_and_criminal_content` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `selfharm` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `health` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `financial` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `law` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `pii` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/moderationllmv1config.md b/packages/azure/docs/models/moderationllmv1config.md new file mode 100644 index 00000000..bdb5812b --- /dev/null +++ b/packages/azure/docs/models/moderationllmv1config.md @@ -0,0 +1,11 @@ +# ModerationLlmv1Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv1CategoryThresholds]](../models/moderationllmv1categorythresholds.md) | :heavy_minus_sign: | N/A | +| `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/moderationllmv2categorythresholds.md b/packages/azure/docs/models/moderationllmv2categorythresholds.md new file mode 100644 index 00000000..e95b81b0 --- /dev/null +++ b/packages/azure/docs/models/moderationllmv2categorythresholds.md @@ -0,0 +1,18 @@ +# ModerationLlmv2CategoryThresholds + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `sexual` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `hate_and_discrimination` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `violence_and_threats` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `dangerous` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `criminal` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `selfharm` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `health` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `financial` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `law` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `pii` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | +| `jailbreaking` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/moderationllmv2config.md b/packages/azure/docs/models/moderationllmv2config.md new file mode 100644 index 00000000..e928506c --- /dev/null +++ b/packages/azure/docs/models/moderationllmv2config.md @@ -0,0 +1,11 @@ +# ModerationLlmv2Config + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `model_name` | *Optional[str]* | :heavy_minus_sign: | Override model name. Should be omitted in general. | +| `custom_category_thresholds` | [OptionalNullable[models.ModerationLlmv2CategoryThresholds]](../models/moderationllmv2categorythresholds.md) | :heavy_minus_sign: | N/A | +| `ignore_other_categories` | *Optional[bool]* | :heavy_minus_sign: | If true, only evaluate categories in custom_category_thresholds; others are ignored. | +| `action` | [Optional[models.ModerationLLMAction]](../models/moderationllmaction.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/oauth2tokenauth.md b/packages/azure/docs/models/oauth2tokenauth.md new file mode 100644 index 00000000..89f80436 --- /dev/null +++ b/packages/azure/docs/models/oauth2tokenauth.md @@ -0,0 +1,9 @@ +# OAuth2TokenAuth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------- | ------------------------- | ------------------------- | ------------------------- | +| `type` | *Literal["oauth2-token"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrconfidencescore.md b/packages/azure/docs/models/ocrconfidencescore.md new file mode 100644 index 00000000..73fdcb28 --- /dev/null +++ b/packages/azure/docs/models/ocrconfidencescore.md @@ -0,0 +1,12 @@ +# OCRConfidenceScore + +Confidence score for a token or word in OCR output. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `text` | *str* | :heavy_check_mark: | The word or text segment | +| `confidence` | *float* | :heavy_check_mark: | Confidence score (0-1) | +| `start_index` | *int* | :heavy_check_mark: | Start index of the text in the page markdown string | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrpageconfidencescores.md b/packages/azure/docs/models/ocrpageconfidencescores.md new file mode 100644 index 00000000..bffb2148 --- /dev/null +++ b/packages/azure/docs/models/ocrpageconfidencescores.md @@ -0,0 +1,18 @@ +# OCRPageConfidenceScores + +Confidence scores for an OCR page at various granularities. + +Note on page-level stats: +- For 'page' granularity: average/minimum are computed from per-token exp(logprob). +- For 'word' granularity: average/minimum are computed from per-word confidence, + where each word's confidence is exp(mean(token_logprobs)) — a geometric mean + over the word's subword tokens. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `word_confidence_scores` | List[[models.OCRConfidenceScore](../models/ocrconfidencescore.md)] | :heavy_minus_sign: | Word-level confidence scores (populated only for 'word' granularity) | +| `average_page_confidence_score` | *float* | :heavy_check_mark: | Average confidence score for the page | +| `minimum_page_confidence_score` | *float* | :heavy_check_mark: | Minimum confidence score for the page | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrpageobject.md b/packages/azure/docs/models/ocrpageobject.md index 02473d44..0fc55052 100644 --- a/packages/azure/docs/models/ocrpageobject.md +++ b/packages/azure/docs/models/ocrpageobject.md @@ -3,13 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `index` | *int* | :heavy_check_mark: | The page index in a pdf document starting from 0 | -| `markdown` | *str* | :heavy_check_mark: | The markdown string response of the page | -| `images` | List[[models.OCRImageObject](../models/ocrimageobject.md)] | :heavy_check_mark: | List of all extracted images in the page | -| `tables` | List[[models.OCRTableObject](../models/ocrtableobject.md)] | :heavy_minus_sign: | List of all extracted tables in the page | -| `hyperlinks` | List[*str*] | :heavy_minus_sign: | List of all hyperlinks in the page | -| `header` | *OptionalNullable[str]* | :heavy_minus_sign: | Header of the page | -| `footer` | *OptionalNullable[str]* | :heavy_minus_sign: | Footer of the page | -| `dimensions` | [Nullable[models.OCRPageDimensions]](../models/ocrpagedimensions.md) | :heavy_check_mark: | The dimensions of the PDF Page's screenshot image | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `index` | *int* | :heavy_check_mark: | The page index in a pdf document starting from 0 | +| `markdown` | *str* | :heavy_check_mark: | The markdown string response of the page | +| `images` | List[[models.OCRImageObject](../models/ocrimageobject.md)] | :heavy_check_mark: | List of all extracted images in the page | +| `tables` | List[[models.OCRTableObject](../models/ocrtableobject.md)] | :heavy_minus_sign: | List of all extracted tables in the page | +| `hyperlinks` | List[*str*] | :heavy_minus_sign: | List of all hyperlinks in the page | +| `header` | *OptionalNullable[str]* | :heavy_minus_sign: | Header of the page | +| `footer` | *OptionalNullable[str]* | :heavy_minus_sign: | Footer of the page | +| `dimensions` | [Nullable[models.OCRPageDimensions]](../models/ocrpagedimensions.md) | :heavy_check_mark: | The dimensions of the PDF Page's screenshot image | +| `confidence_scores` | [OptionalNullable[models.OCRPageConfidenceScores]](../models/ocrpageconfidencescores.md) | :heavy_minus_sign: | Confidence scores for the OCR page (populated when confidence_scores_granularity is set) | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrrequest.md b/packages/azure/docs/models/ocrrequest.md index 2d26c19f..2066b903 100644 --- a/packages/azure/docs/models/ocrrequest.md +++ b/packages/azure/docs/models/ocrrequest.md @@ -6,9 +6,8 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `model` | *Nullable[str]* | :heavy_check_mark: | N/A | | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | | | `document` | [models.Document](../models/document.md) | :heavy_check_mark: | Document to run OCR on | | -| `pages` | List[*int*] | :heavy_minus_sign: | Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 | | +| `pages` | [OptionalNullable[models.Pages]](../models/pages.md) | :heavy_minus_sign: | Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. | | | `include_image_base64` | *OptionalNullable[bool]* | :heavy_minus_sign: | Include image URLs in response | | | `image_limit` | *OptionalNullable[int]* | :heavy_minus_sign: | Max images to extract | | | `image_min_size` | *OptionalNullable[int]* | :heavy_minus_sign: | Minimum height and width of image to extract | | @@ -17,4 +16,5 @@ | `document_annotation_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional prompt to guide the model in extracting structured output from the entire document. A document_annotation_format must be provided. | | | `table_format` | [OptionalNullable[models.TableFormat]](../models/tableformat.md) | :heavy_minus_sign: | N/A | | | `extract_header` | *Optional[bool]* | :heavy_minus_sign: | N/A | | -| `extract_footer` | *Optional[bool]* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `extract_footer` | *Optional[bool]* | :heavy_minus_sign: | N/A | | +| `confidence_scores_granularity` | [OptionalNullable[models.ConfidenceScoresGranularity]](../models/confidencescoresgranularity.md) | :heavy_minus_sign: | Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. | | \ No newline at end of file diff --git a/packages/azure/docs/models/ocrtableobject.md b/packages/azure/docs/models/ocrtableobject.md index 4e27697c..2da8f610 100644 --- a/packages/azure/docs/models/ocrtableobject.md +++ b/packages/azure/docs/models/ocrtableobject.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Table ID for extracted table in a page | -| `content` | *str* | :heavy_check_mark: | Content of the table in the given format | -| `format_` | [models.Format](../models/format_.md) | :heavy_check_mark: | Format of the table | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | Table ID for extracted table in a page | +| `content` | *str* | :heavy_check_mark: | Content of the table in the given format | +| `format_` | [models.Format](../models/format_.md) | :heavy_check_mark: | Format of the table | +| `word_confidence_scores` | List[[models.OCRConfidenceScore](../models/ocrconfidencescore.md)] | :heavy_minus_sign: | Per-word confidence scores for the table content. Returned when confidence_scores_granularity is set to 'word'. | \ No newline at end of file diff --git a/packages/azure/docs/models/pages.md b/packages/azure/docs/models/pages.md new file mode 100644 index 00000000..a3631692 --- /dev/null +++ b/packages/azure/docs/models/pages.md @@ -0,0 +1,19 @@ +# Pages + +Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[int]` + +```python +value: List[int] = /* values here */ +``` + diff --git a/packages/azure/docs/models/reasoningeffort.md b/packages/azure/docs/models/reasoningeffort.md new file mode 100644 index 00000000..f39e92ac --- /dev/null +++ b/packages/azure/docs/models/reasoningeffort.md @@ -0,0 +1,14 @@ +# ReasoningEffort + +## Example Usage + +```python +from mistralai.azure.client.models import ReasoningEffort +value: ReasoningEffort = "none" +``` + + +## Values + +- `"none"` +- `"high"` diff --git a/packages/azure/docs/models/referencechunk.md b/packages/azure/docs/models/referencechunk.md index d847e248..0186d3c3 100644 --- a/packages/azure/docs/models/referencechunk.md +++ b/packages/azure/docs/models/referencechunk.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | -| `type` | *Optional[Literal["reference"]]* | :heavy_minus_sign: | N/A | -| `reference_ids` | List[*int*] | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | +| `type` | *Optional[Literal["reference"]]* | :heavy_minus_sign: | N/A | +| `reference_ids` | List[[models.ReferenceID](../models/referenceid.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/referenceid.md b/packages/azure/docs/models/referenceid.md new file mode 100644 index 00000000..1d29397f --- /dev/null +++ b/packages/azure/docs/models/referenceid.md @@ -0,0 +1,17 @@ +# ReferenceID + + +## Supported Types + +### `int` + +```python +value: int = /* values here */ +``` + +### `str` + +```python +value: str = /* values here */ +``` + diff --git a/packages/azure/docs/models/responseformats.md b/packages/azure/docs/models/responseformats.md index 2f5f1e55..73c02b77 100644 --- a/packages/azure/docs/models/responseformats.md +++ b/packages/azure/docs/models/responseformats.md @@ -1,10 +1,15 @@ # ResponseFormats +## Example Usage + +```python +from mistralai.azure.client.models import ResponseFormats +value: ResponseFormats = "text" +``` + ## Values -| Name | Value | -| ------------- | ------------- | -| `TEXT` | text | -| `JSON_OBJECT` | json_object | -| `JSON_SCHEMA` | json_schema | \ No newline at end of file +- `"text"` +- `"json_object"` +- `"json_schema"` diff --git a/packages/azure/docs/models/tableformat.md b/packages/azure/docs/models/tableformat.md index 54f029b8..14b06acb 100644 --- a/packages/azure/docs/models/tableformat.md +++ b/packages/azure/docs/models/tableformat.md @@ -1,9 +1,14 @@ # TableFormat +## Example Usage + +```python +from mistralai.azure.client.models import TableFormat +value: TableFormat = "markdown" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `MARKDOWN` | markdown | -| `HTML` | html | \ No newline at end of file +- `"markdown"` +- `"html"` diff --git a/packages/azure/docs/models/thinkchunk.md b/packages/azure/docs/models/thinkchunk.md index b07f598e..d825497e 100644 --- a/packages/azure/docs/models/thinkchunk.md +++ b/packages/azure/docs/models/thinkchunk.md @@ -7,4 +7,5 @@ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `type` | *Literal["thinking"]* | :heavy_check_mark: | N/A | | `thinking` | List[[models.Thinking](../models/thinking.md)] | :heavy_check_mark: | N/A | +| `signature` | *OptionalNullable[str]* | :heavy_minus_sign: | Signature to replay some reasoning blocks across turns. | | `closed` | *Optional[bool]* | :heavy_minus_sign: | Whether the thinking chunk is closed or not. Currently only used for prefixing. | \ No newline at end of file diff --git a/packages/azure/docs/models/tool.md b/packages/azure/docs/models/tool.md index fb661f72..85888d01 100644 --- a/packages/azure/docs/models/tool.md +++ b/packages/azure/docs/models/tool.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `type` | *Union[Literal["function"], UnrecognizedStr]* | :heavy_check_mark: | N/A | +| `function` | [models.Function](../models/function.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/toolcall.md b/packages/azure/docs/models/toolcall.md index 3819236b..9d236e8b 100644 --- a/packages/azure/docs/models/toolcall.md +++ b/packages/azure/docs/models/toolcall.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | -| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | -| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `function` | [models.FunctionCall](../models/functioncall.md) | :heavy_check_mark: | N/A | +| `index` | *Optional[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/toolchoice.md b/packages/azure/docs/models/toolchoice.md index 373046bb..a457f96f 100644 --- a/packages/azure/docs/models/toolchoice.md +++ b/packages/azure/docs/models/toolchoice.md @@ -7,5 +7,5 @@ ToolChoice is either a ToolChoiceEnum or a ToolChoice | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `type` | [Optional[models.ToolTypes]](../models/tooltypes.md) | :heavy_minus_sign: | N/A | +| `type` | *Optional[str]* | :heavy_minus_sign: | N/A | | `function` | [models.FunctionName](../models/functionname.md) | :heavy_check_mark: | this restriction of `Function` is used to select a specific function to call | \ No newline at end of file diff --git a/packages/azure/docs/models/toolchoiceenum.md b/packages/azure/docs/models/toolchoiceenum.md index 0be3d6c5..60809126 100644 --- a/packages/azure/docs/models/toolchoiceenum.md +++ b/packages/azure/docs/models/toolchoiceenum.md @@ -1,11 +1,16 @@ # ToolChoiceEnum +## Example Usage + +```python +from mistralai.azure.client.models import ToolChoiceEnum +value: ToolChoiceEnum = "auto" +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `AUTO` | auto | -| `NONE` | none | -| `ANY` | any | -| `REQUIRED` | required | \ No newline at end of file +- `"auto"` +- `"none"` +- `"any"` +- `"required"` diff --git a/packages/azure/docs/models/toolconfiguration.md b/packages/azure/docs/models/toolconfiguration.md new file mode 100644 index 00000000..89286a17 --- /dev/null +++ b/packages/azure/docs/models/toolconfiguration.md @@ -0,0 +1,10 @@ +# ToolConfiguration + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `requires_confirmation` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/toolreferencechunk.md b/packages/azure/docs/models/toolreferencechunk.md index 9fc10399..49ea4ca7 100644 --- a/packages/azure/docs/models/toolreferencechunk.md +++ b/packages/azure/docs/models/toolreferencechunk.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| `type` | *Optional[Literal["tool_reference"]]* | :heavy_minus_sign: | N/A | -| `tool` | [models.ToolUnion](../models/toolunion.md) | :heavy_check_mark: | N/A | -| `title` | *str* | :heavy_check_mark: | N/A | -| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `favicon` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Optional[Literal["tool_reference"]]* | :heavy_minus_sign: | N/A | +| `tool` | [models.ToolReferenceChunkTool](../models/toolreferencechunktool.md) | :heavy_check_mark: | N/A | +| `title` | *str* | :heavy_check_mark: | N/A | +| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `favicon` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/toolunion.md b/packages/azure/docs/models/toolreferencechunktool.md similarity index 87% rename from packages/azure/docs/models/toolunion.md rename to packages/azure/docs/models/toolreferencechunktool.md index 2dcb3dee..999f7c34 100644 --- a/packages/azure/docs/models/toolunion.md +++ b/packages/azure/docs/models/toolreferencechunktool.md @@ -1,4 +1,4 @@ -# ToolUnion +# ToolReferenceChunkTool ## Supported Types diff --git a/packages/azure/docs/models/tooltypes.md b/packages/azure/docs/models/tooltypes.md deleted file mode 100644 index 84e49253..00000000 --- a/packages/azure/docs/models/tooltypes.md +++ /dev/null @@ -1,8 +0,0 @@ -# ToolTypes - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `FUNCTION` | function | \ No newline at end of file diff --git a/packages/azure/docs/models/websearchpremiumtool.md b/packages/azure/docs/models/websearchpremiumtool.md new file mode 100644 index 00000000..78b736cd --- /dev/null +++ b/packages/azure/docs/models/websearchpremiumtool.md @@ -0,0 +1,9 @@ +# WebSearchPremiumTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["web_search_premium"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/docs/models/websearchtool.md b/packages/azure/docs/models/websearchtool.md new file mode 100644 index 00000000..4ca7333c --- /dev/null +++ b/packages/azure/docs/models/websearchtool.md @@ -0,0 +1,9 @@ +# WebSearchTool + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `tool_configuration` | [OptionalNullable[models.ToolConfiguration]](../models/toolconfiguration.md) | :heavy_minus_sign: | N/A | +| `type` | *Literal["web_search"]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/packages/azure/pyproject.toml b/packages/azure/pyproject.toml index 9b93e71a..1e2424fe 100644 --- a/packages/azure/pyproject.toml +++ b/packages/azure/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai-azure" -version = "2.0.0" +version = "2.1.0" description = "Python Client SDK for the Mistral AI API in Azure." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/packages/azure/src/mistralai/azure/client/_version.py b/packages/azure/src/mistralai/azure/client/_version.py index 8923c29d..4641c832 100644 --- a/packages/azure/src/mistralai/azure/client/_version.py +++ b/packages/azure/src/mistralai/azure/client/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "mistralai-azure" -__version__: str = "2.0.0" +__version__: str = "2.1.0" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.841.0" -__user_agent__: str = "speakeasy-sdk/python 2.0.0 2.841.0 1.0.0 mistralai-azure" +__gen_version__: str = "2.884.13" +__user_agent__: str = "speakeasy-sdk/python 2.1.0 2.884.13 1.0.0 mistralai-azure" try: if __package__ is not None: diff --git a/packages/azure/src/mistralai/azure/client/basesdk.py b/packages/azure/src/mistralai/azure/client/basesdk.py index 0d4d9a44..e08ce351 100644 --- a/packages/azure/src/mistralai/azure/client/basesdk.py +++ b/packages/azure/src/mistralai/azure/client/basesdk.py @@ -7,6 +7,7 @@ AfterErrorContext, AfterSuccessContext, BeforeRequestContext, + HookContext, ) from mistralai.azure.client.utils import ( RetryConfig, @@ -66,6 +67,7 @@ def _build_request_async( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.async_client return self._build_request_with_client( @@ -87,6 +89,7 @@ def _build_request_async( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request( @@ -110,6 +113,7 @@ def _build_request( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: client = self.sdk_configuration.client return self._build_request_with_client( @@ -131,6 +135,7 @@ def _build_request( url_override, http_headers, allow_empty_value, + allowed_fields, ) def _build_request_with_client( @@ -155,6 +160,7 @@ def _build_request_with_client( url_override: Optional[str] = None, http_headers: Optional[Mapping[str, str]] = None, allow_empty_value: Optional[List[str]] = None, + allowed_fields: Optional[List[str]] = None, ) -> httpx.Request: query_params = {} @@ -188,7 +194,9 @@ def _build_request_with_client( security = security() if security is not None: - security_headers, security_query_params = utils.get_security(security) + security_headers, security_query_params = utils.get_security( + security, allowed_fields + ) headers = {**headers, **security_headers} query_params = {**query_params, **security_query_params} @@ -225,15 +233,15 @@ def _build_request_with_client( data=serialized_request_body.data, files=serialized_request_body.files, headers=headers, - timeout=timeout, + timeout=timeout if timeout is not None else httpx.USE_CLIENT_DEFAULT, ) def do_request( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.client @@ -245,6 +253,8 @@ def do(): http_res = None try: req = hooks.before_request(BeforeRequestContext(hook_ctx), request) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -275,19 +285,6 @@ def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = hooks.after_error( - AfterErrorContext(hook_ctx), http_res, None - ) - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -295,17 +292,27 @@ def do(): else: http_res = do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = hooks.after_error(AfterErrorContext(hook_ctx), http_res, None) + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res async def do_request_async( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.async_client @@ -320,6 +327,8 @@ async def do(): hooks.before_request, BeforeRequestContext(hook_ctx), request ) + if "timeout" in request.extensions and "timeout" not in req.extensions: + req.extensions["timeout"] = request.extensions["timeout"] logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -353,20 +362,6 @@ async def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = await run_sync_in_thread( - hooks.after_error, AfterErrorContext(hook_ctx), http_res, None - ) - - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -376,7 +371,20 @@ async def do(): else: http_res = await do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None + ) + + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = await run_sync_in_thread( hooks.after_success, AfterSuccessContext(hook_ctx), http_res ) diff --git a/packages/azure/src/mistralai/azure/client/chat.py b/packages/azure/src/mistralai/azure/client/chat.py index 1051f952..e3915c74 100644 --- a/packages/azure/src/mistralai/azure/client/chat.py +++ b/packages/azure/src/mistralai/azure/client/chat.py @@ -21,22 +21,25 @@ def stream( ], model: Optional[str] = "azureai", temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionStreamRequestStop, models.ChatCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -44,14 +47,18 @@ def stream( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -79,7 +86,9 @@ def stream( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -91,6 +100,9 @@ def stream( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -111,7 +123,9 @@ def stream( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -122,13 +136,17 @@ def stream( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) req = self._build_request( method="POST", - path="/chat/completions#stream", + path="/models/chat/completions#stream", base_url=base_url, url_variables=url_variables, request=request, @@ -163,7 +181,7 @@ def stream( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -201,22 +219,25 @@ async def stream_async( ], model: Optional[str] = "azureai", temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = True, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionStreamRequestStop, models.ChatCompletionStreamRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionStreamRequestTool], + List[models.ChatCompletionStreamRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -224,14 +245,18 @@ async def stream_async( models.ChatCompletionStreamRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -259,7 +284,9 @@ async def stream_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -271,6 +298,9 @@ async def stream_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -291,7 +321,9 @@ async def stream_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionStreamRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionStreamRequestToolChoice] ), @@ -302,13 +334,17 @@ async def stream_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) req = self._build_request_async( method="POST", - path="/chat/completions#stream", + path="/models/chat/completions#stream", base_url=base_url, url_variables=url_variables, request=request, @@ -343,7 +379,7 @@ async def stream_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -381,22 +417,25 @@ def complete( ], model: Optional[str] = "azureai", temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionRequestStop, models.ChatCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -404,14 +443,18 @@ def complete( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -437,7 +480,9 @@ def complete( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -449,6 +494,9 @@ def complete( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -469,7 +517,9 @@ def complete( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -480,13 +530,17 @@ def complete( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) req = self._build_request( method="POST", - path="/chat/completions", + path="/models/chat/completions", base_url=base_url, url_variables=url_variables, request=request, @@ -521,7 +575,7 @@ def complete( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -551,22 +605,25 @@ async def complete_async( ], model: Optional[str] = "azureai", temperature: OptionalNullable[float] = UNSET, - top_p: Optional[float] = None, + top_p: OptionalNullable[float] = UNSET, max_tokens: OptionalNullable[int] = UNSET, stream: Optional[bool] = False, - stop: Optional[ + stop: OptionalNullable[ Union[ models.ChatCompletionRequestStop, models.ChatCompletionRequestStopTypedDict, ] - ] = None, + ] = UNSET, random_seed: OptionalNullable[int] = UNSET, metadata: OptionalNullable[Dict[str, Any]] = UNSET, response_format: Optional[ Union[models.ResponseFormat, models.ResponseFormatTypedDict] ] = None, tools: OptionalNullable[ - Union[List[models.Tool], List[models.ToolTypedDict]] + Union[ + List[models.ChatCompletionRequestTool], + List[models.ChatCompletionRequestToolTypedDict], + ] ] = UNSET, tool_choice: Optional[ Union[ @@ -574,14 +631,18 @@ async def complete_async( models.ChatCompletionRequestToolChoiceTypedDict, ] ] = None, - presence_penalty: Optional[float] = None, - frequency_penalty: Optional[float] = None, + presence_penalty: OptionalNullable[float] = UNSET, + frequency_penalty: OptionalNullable[float] = UNSET, n: OptionalNullable[int] = UNSET, prediction: Optional[ Union[models.Prediction, models.PredictionTypedDict] ] = None, parallel_tool_calls: Optional[bool] = None, + reasoning_effort: OptionalNullable[models.ReasoningEffort] = UNSET, prompt_mode: OptionalNullable[models.MistralPromptMode] = UNSET, + guardrails: OptionalNullable[ + Union[List[models.GuardrailConfig], List[models.GuardrailConfigTypedDict]] + ] = UNSET, safe_prompt: Optional[bool] = None, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, @@ -607,7 +668,9 @@ async def complete_async( :param n: Number of completions to return for each request, input tokens are only billed once. :param prediction: Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. :param parallel_tool_calls: Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + :param reasoning_effort: :param prompt_mode: Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + :param guardrails: :param safe_prompt: Whether to inject a safety prompt before all conversations. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -619,6 +682,9 @@ async def complete_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -639,7 +705,9 @@ async def complete_async( response_format=utils.get_pydantic_model( response_format, Optional[models.ResponseFormat] ), - tools=utils.get_pydantic_model(tools, OptionalNullable[List[models.Tool]]), + tools=utils.get_pydantic_model( + tools, OptionalNullable[List[models.ChatCompletionRequestTool]] + ), tool_choice=utils.get_pydantic_model( tool_choice, Optional[models.ChatCompletionRequestToolChoice] ), @@ -650,13 +718,17 @@ async def complete_async( prediction, Optional[models.Prediction] ), parallel_tool_calls=parallel_tool_calls, + reasoning_effort=reasoning_effort, prompt_mode=prompt_mode, + guardrails=utils.get_pydantic_model( + guardrails, OptionalNullable[List[models.GuardrailConfig]] + ), safe_prompt=safe_prompt, ) req = self._build_request_async( method="POST", - path="/chat/completions", + path="/models/chat/completions", base_url=base_url, url_variables=url_variables, request=request, @@ -691,7 +763,7 @@ async def complete_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/packages/azure/src/mistralai/azure/client/models/__init__.py b/packages/azure/src/mistralai/azure/client/models/__init__.py index 79c5df32..d9c28adc 100644 --- a/packages/azure/src/mistralai/azure/client/models/__init__.py +++ b/packages/azure/src/mistralai/azure/client/models/__init__.py @@ -5,6 +5,7 @@ from mistralai.azure.client.utils.dynamic_imports import lazy_getattr, lazy_dir if TYPE_CHECKING: + from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict from .assistantmessage import ( AssistantMessage, AssistantMessageContent, @@ -23,8 +24,10 @@ ChatCompletionRequestMessageTypedDict, ChatCompletionRequestStop, ChatCompletionRequestStopTypedDict, + ChatCompletionRequestTool, ChatCompletionRequestToolChoice, ChatCompletionRequestToolChoiceTypedDict, + ChatCompletionRequestToolTypedDict, ChatCompletionRequestTypedDict, ) from .chatcompletionresponse import ( @@ -37,10 +40,13 @@ ChatCompletionStreamRequestMessageTypedDict, ChatCompletionStreamRequestStop, ChatCompletionStreamRequestStopTypedDict, + ChatCompletionStreamRequestTool, ChatCompletionStreamRequestToolChoice, ChatCompletionStreamRequestToolChoiceTypedDict, + ChatCompletionStreamRequestToolTypedDict, ChatCompletionStreamRequestTypedDict, ) + from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionchunk import CompletionChunk, CompletionChunkTypedDict from .completionevent import CompletionEvent, CompletionEventTypedDict from .completionresponsestreamchoice import ( @@ -49,12 +55,19 @@ CompletionResponseStreamChoiceTypedDict, ) from .contentchunk import ContentChunk, ContentChunkTypedDict, UnknownContentChunk + from .customconnector import ( + Authorization, + AuthorizationTypedDict, + CustomConnector, + CustomConnectorTypedDict, + ) from .deltamessage import ( DeltaMessage, DeltaMessageContent, DeltaMessageContentTypedDict, DeltaMessageTypedDict, ) + from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict from .filechunk import FileChunk, FileChunkTypedDict from .function import Function, FunctionTypedDict @@ -65,7 +78,9 @@ FunctionCallTypedDict, ) from .functionname import FunctionName, FunctionNameTypedDict + from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict from .imagedetail import ImageDetail + from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .imageurl import ImageURL, ImageURLTypedDict from .imageurlchunk import ( ImageURLChunk, @@ -75,21 +90,53 @@ ) from .jsonschema import JSONSchema, JSONSchemaTypedDict from .mistralpromptmode import MistralPromptMode + from .moderationllmaction import ModerationLLMAction + from .moderationllmv1categorythresholds import ( + ModerationLlmv1CategoryThresholds, + ModerationLlmv1CategoryThresholdsTypedDict, + ) + from .moderationllmv1config import ( + ModerationLlmv1Config, + ModerationLlmv1ConfigTypedDict, + ) + from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, + ) + from .moderationllmv2config import ( + ModerationLlmv2Config, + ModerationLlmv2ConfigTypedDict, + ) + from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict + from .ocrconfidencescore import OCRConfidenceScore, OCRConfidenceScoreTypedDict from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict + from .ocrpageconfidencescores import ( + OCRPageConfidenceScores, + OCRPageConfidenceScoresTypedDict, + ) from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict from .ocrpageobject import OCRPageObject, OCRPageObjectTypedDict from .ocrrequest import ( + ConfidenceScoresGranularity, Document, DocumentTypedDict, OCRRequest, OCRRequestTypedDict, + Pages, + PagesTypedDict, TableFormat, ) from .ocrresponse import OCRResponse, OCRResponseTypedDict from .ocrtableobject import Format, OCRTableObject, OCRTableObjectTypedDict from .ocrusageinfo import OCRUsageInfo, OCRUsageInfoTypedDict from .prediction import Prediction, PredictionTypedDict - from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict + from .reasoningeffort import ReasoningEffort + from .referencechunk import ( + ReferenceChunk, + ReferenceChunkTypedDict, + ReferenceID, + ReferenceIDTypedDict, + ) from .responseformat import ResponseFormat, ResponseFormatTypedDict from .responseformats import ResponseFormats from .security import Security, SecurityTypedDict @@ -109,6 +156,7 @@ from .toolcall import ToolCall, ToolCallTypedDict from .toolchoice import ToolChoice, ToolChoiceTypedDict from .toolchoiceenum import ToolChoiceEnum + from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict from .toolmessage import ( ToolMessage, ToolMessageContent, @@ -117,11 +165,10 @@ ) from .toolreferencechunk import ( ToolReferenceChunk, + ToolReferenceChunkTool, + ToolReferenceChunkToolTypedDict, ToolReferenceChunkTypedDict, - ToolUnion, - ToolUnionTypedDict, ) - from .tooltypes import ToolTypes from .usageinfo import UsageInfo, UsageInfoTypedDict from .usermessage import ( UserMessage, @@ -137,14 +184,23 @@ ValidationError, ValidationErrorTypedDict, ) + from .websearchpremiumtool import ( + WebSearchPremiumTool, + WebSearchPremiumToolTypedDict, + ) + from .websearchtool import WebSearchTool, WebSearchToolTypedDict __all__ = [ + "APIKeyAuth", + "APIKeyAuthTypedDict", "Arguments", "ArgumentsTypedDict", "AssistantMessage", "AssistantMessageContent", "AssistantMessageContentTypedDict", "AssistantMessageTypedDict", + "Authorization", + "AuthorizationTypedDict", "BuiltInConnectors", "ChatCompletionChoice", "ChatCompletionChoiceFinishReason", @@ -154,8 +210,10 @@ "ChatCompletionRequestMessageTypedDict", "ChatCompletionRequestStop", "ChatCompletionRequestStopTypedDict", + "ChatCompletionRequestTool", "ChatCompletionRequestToolChoice", "ChatCompletionRequestToolChoiceTypedDict", + "ChatCompletionRequestToolTypedDict", "ChatCompletionRequestTypedDict", "ChatCompletionResponse", "ChatCompletionResponseTypedDict", @@ -164,9 +222,13 @@ "ChatCompletionStreamRequestMessageTypedDict", "ChatCompletionStreamRequestStop", "ChatCompletionStreamRequestStopTypedDict", + "ChatCompletionStreamRequestTool", "ChatCompletionStreamRequestToolChoice", "ChatCompletionStreamRequestToolChoiceTypedDict", + "ChatCompletionStreamRequestToolTypedDict", "ChatCompletionStreamRequestTypedDict", + "CodeInterpreterTool", + "CodeInterpreterToolTypedDict", "CompletionChunk", "CompletionChunkTypedDict", "CompletionEvent", @@ -174,15 +236,20 @@ "CompletionResponseStreamChoice", "CompletionResponseStreamChoiceFinishReason", "CompletionResponseStreamChoiceTypedDict", + "ConfidenceScoresGranularity", "ContentChunk", "ContentChunkTypedDict", "Context", "ContextTypedDict", + "CustomConnector", + "CustomConnectorTypedDict", "DeltaMessage", "DeltaMessageContent", "DeltaMessageContentTypedDict", "DeltaMessageTypedDict", "Document", + "DocumentLibraryTool", + "DocumentLibraryToolTypedDict", "DocumentTypedDict", "DocumentURLChunk", "DocumentURLChunkTypedDict", @@ -195,7 +262,11 @@ "FunctionName", "FunctionNameTypedDict", "FunctionTypedDict", + "GuardrailConfig", + "GuardrailConfigTypedDict", "ImageDetail", + "ImageGenerationTool", + "ImageGenerationToolTypedDict", "ImageURL", "ImageURLChunk", "ImageURLChunkTypedDict", @@ -207,8 +278,23 @@ "Loc", "LocTypedDict", "MistralPromptMode", + "ModerationLLMAction", + "ModerationLlmv1CategoryThresholds", + "ModerationLlmv1CategoryThresholdsTypedDict", + "ModerationLlmv1Config", + "ModerationLlmv1ConfigTypedDict", + "ModerationLlmv2CategoryThresholds", + "ModerationLlmv2CategoryThresholdsTypedDict", + "ModerationLlmv2Config", + "ModerationLlmv2ConfigTypedDict", + "OAuth2TokenAuth", + "OAuth2TokenAuthTypedDict", + "OCRConfidenceScore", + "OCRConfidenceScoreTypedDict", "OCRImageObject", "OCRImageObjectTypedDict", + "OCRPageConfidenceScores", + "OCRPageConfidenceScoresTypedDict", "OCRPageDimensions", "OCRPageDimensionsTypedDict", "OCRPageObject", @@ -221,10 +307,15 @@ "OCRTableObjectTypedDict", "OCRUsageInfo", "OCRUsageInfoTypedDict", + "Pages", + "PagesTypedDict", "Prediction", "PredictionTypedDict", + "ReasoningEffort", "ReferenceChunk", "ReferenceChunkTypedDict", + "ReferenceID", + "ReferenceIDTypedDict", "ResponseFormat", "ResponseFormatTypedDict", "ResponseFormats", @@ -249,16 +340,17 @@ "ToolChoice", "ToolChoiceEnum", "ToolChoiceTypedDict", + "ToolConfiguration", + "ToolConfigurationTypedDict", "ToolMessage", "ToolMessageContent", "ToolMessageContentTypedDict", "ToolMessageTypedDict", "ToolReferenceChunk", + "ToolReferenceChunkTool", + "ToolReferenceChunkToolTypedDict", "ToolReferenceChunkTypedDict", "ToolTypedDict", - "ToolTypes", - "ToolUnion", - "ToolUnionTypedDict", "UnknownContentChunk", "UsageInfo", "UsageInfoTypedDict", @@ -268,9 +360,15 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", + "WebSearchPremiumTool", + "WebSearchPremiumToolTypedDict", + "WebSearchTool", + "WebSearchToolTypedDict", ] _dynamic_imports: dict[str, str] = { + "APIKeyAuth": ".apikeyauth", + "APIKeyAuthTypedDict": ".apikeyauth", "AssistantMessage": ".assistantmessage", "AssistantMessageContent": ".assistantmessage", "AssistantMessageContentTypedDict": ".assistantmessage", @@ -284,8 +382,10 @@ "ChatCompletionRequestMessageTypedDict": ".chatcompletionrequest", "ChatCompletionRequestStop": ".chatcompletionrequest", "ChatCompletionRequestStopTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestTool": ".chatcompletionrequest", "ChatCompletionRequestToolChoice": ".chatcompletionrequest", "ChatCompletionRequestToolChoiceTypedDict": ".chatcompletionrequest", + "ChatCompletionRequestToolTypedDict": ".chatcompletionrequest", "ChatCompletionRequestTypedDict": ".chatcompletionrequest", "ChatCompletionResponse": ".chatcompletionresponse", "ChatCompletionResponseTypedDict": ".chatcompletionresponse", @@ -294,9 +394,13 @@ "ChatCompletionStreamRequestMessageTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStop": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestStopTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestTool": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoice": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestToolChoiceTypedDict": ".chatcompletionstreamrequest", + "ChatCompletionStreamRequestToolTypedDict": ".chatcompletionstreamrequest", "ChatCompletionStreamRequestTypedDict": ".chatcompletionstreamrequest", + "CodeInterpreterTool": ".codeinterpretertool", + "CodeInterpreterToolTypedDict": ".codeinterpretertool", "CompletionChunk": ".completionchunk", "CompletionChunkTypedDict": ".completionchunk", "CompletionEvent": ".completionevent", @@ -307,10 +411,16 @@ "ContentChunk": ".contentchunk", "ContentChunkTypedDict": ".contentchunk", "UnknownContentChunk": ".contentchunk", + "Authorization": ".customconnector", + "AuthorizationTypedDict": ".customconnector", + "CustomConnector": ".customconnector", + "CustomConnectorTypedDict": ".customconnector", "DeltaMessage": ".deltamessage", "DeltaMessageContent": ".deltamessage", "DeltaMessageContentTypedDict": ".deltamessage", "DeltaMessageTypedDict": ".deltamessage", + "DocumentLibraryTool": ".documentlibrarytool", + "DocumentLibraryToolTypedDict": ".documentlibrarytool", "DocumentURLChunk": ".documenturlchunk", "DocumentURLChunkTypedDict": ".documenturlchunk", "FileChunk": ".filechunk", @@ -323,7 +433,11 @@ "FunctionCallTypedDict": ".functioncall", "FunctionName": ".functionname", "FunctionNameTypedDict": ".functionname", + "GuardrailConfig": ".guardrailconfig", + "GuardrailConfigTypedDict": ".guardrailconfig", "ImageDetail": ".imagedetail", + "ImageGenerationTool": ".imagegenerationtool", + "ImageGenerationToolTypedDict": ".imagegenerationtool", "ImageURL": ".imageurl", "ImageURLTypedDict": ".imageurl", "ImageURLChunk": ".imageurlchunk", @@ -333,16 +447,34 @@ "JSONSchema": ".jsonschema", "JSONSchemaTypedDict": ".jsonschema", "MistralPromptMode": ".mistralpromptmode", + "ModerationLLMAction": ".moderationllmaction", + "ModerationLlmv1CategoryThresholds": ".moderationllmv1categorythresholds", + "ModerationLlmv1CategoryThresholdsTypedDict": ".moderationllmv1categorythresholds", + "ModerationLlmv1Config": ".moderationllmv1config", + "ModerationLlmv1ConfigTypedDict": ".moderationllmv1config", + "ModerationLlmv2CategoryThresholds": ".moderationllmv2categorythresholds", + "ModerationLlmv2CategoryThresholdsTypedDict": ".moderationllmv2categorythresholds", + "ModerationLlmv2Config": ".moderationllmv2config", + "ModerationLlmv2ConfigTypedDict": ".moderationllmv2config", + "OAuth2TokenAuth": ".oauth2tokenauth", + "OAuth2TokenAuthTypedDict": ".oauth2tokenauth", + "OCRConfidenceScore": ".ocrconfidencescore", + "OCRConfidenceScoreTypedDict": ".ocrconfidencescore", "OCRImageObject": ".ocrimageobject", "OCRImageObjectTypedDict": ".ocrimageobject", + "OCRPageConfidenceScores": ".ocrpageconfidencescores", + "OCRPageConfidenceScoresTypedDict": ".ocrpageconfidencescores", "OCRPageDimensions": ".ocrpagedimensions", "OCRPageDimensionsTypedDict": ".ocrpagedimensions", "OCRPageObject": ".ocrpageobject", "OCRPageObjectTypedDict": ".ocrpageobject", + "ConfidenceScoresGranularity": ".ocrrequest", "Document": ".ocrrequest", "DocumentTypedDict": ".ocrrequest", "OCRRequest": ".ocrrequest", "OCRRequestTypedDict": ".ocrrequest", + "Pages": ".ocrrequest", + "PagesTypedDict": ".ocrrequest", "TableFormat": ".ocrrequest", "OCRResponse": ".ocrresponse", "OCRResponseTypedDict": ".ocrresponse", @@ -353,8 +485,11 @@ "OCRUsageInfoTypedDict": ".ocrusageinfo", "Prediction": ".prediction", "PredictionTypedDict": ".prediction", + "ReasoningEffort": ".reasoningeffort", "ReferenceChunk": ".referencechunk", "ReferenceChunkTypedDict": ".referencechunk", + "ReferenceID": ".referencechunk", + "ReferenceIDTypedDict": ".referencechunk", "ResponseFormat": ".responseformat", "ResponseFormatTypedDict": ".responseformat", "ResponseFormats": ".responseformats", @@ -379,15 +514,16 @@ "ToolChoice": ".toolchoice", "ToolChoiceTypedDict": ".toolchoice", "ToolChoiceEnum": ".toolchoiceenum", + "ToolConfiguration": ".toolconfiguration", + "ToolConfigurationTypedDict": ".toolconfiguration", "ToolMessage": ".toolmessage", "ToolMessageContent": ".toolmessage", "ToolMessageContentTypedDict": ".toolmessage", "ToolMessageTypedDict": ".toolmessage", "ToolReferenceChunk": ".toolreferencechunk", + "ToolReferenceChunkTool": ".toolreferencechunk", + "ToolReferenceChunkToolTypedDict": ".toolreferencechunk", "ToolReferenceChunkTypedDict": ".toolreferencechunk", - "ToolUnion": ".toolreferencechunk", - "ToolUnionTypedDict": ".toolreferencechunk", - "ToolTypes": ".tooltypes", "UsageInfo": ".usageinfo", "UsageInfoTypedDict": ".usageinfo", "UserMessage": ".usermessage", @@ -400,6 +536,10 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", + "WebSearchPremiumTool": ".websearchpremiumtool", + "WebSearchPremiumToolTypedDict": ".websearchpremiumtool", + "WebSearchTool": ".websearchtool", + "WebSearchToolTypedDict": ".websearchtool", } diff --git a/packages/azure/src/mistralai/azure/client/models/apikeyauth.py b/packages/azure/src/mistralai/azure/client/models/apikeyauth.py new file mode 100644 index 00000000..7bce715c --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/apikeyauth.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import BaseModel +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class APIKeyAuthTypedDict(TypedDict): + value: str + type: Literal["api-key"] + + +class APIKeyAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[Literal["api-key"], AfterValidator(validate_const("api-key"))], + pydantic.Field(alias="type"), + ] = "api-key" + + +try: + APIKeyAuth.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/assistantmessage.py b/packages/azure/src/mistralai/azure/client/models/assistantmessage.py index e9ae6e82..f5e3316b 100644 --- a/packages/azure/src/mistralai/azure/client/models/assistantmessage.py +++ b/packages/azure/src/mistralai/azure/client/models/assistantmessage.py @@ -60,7 +60,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py index 67b5ba69..7ab8832c 100644 --- a/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionchoice.py @@ -2,9 +2,11 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict -from mistralai.azure.client.types import BaseModel, UnrecognizedStr -from typing import Literal, Union -from typing_extensions import TypedDict +from .deltamessage import DeltaMessage, DeltaMessageTypedDict +from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL, UnrecognizedStr +from pydantic import model_serializer +from typing import List, Literal, Optional, Union +from typing_extensions import NotRequired, TypedDict ChatCompletionChoiceFinishReason = Union[ @@ -21,13 +23,32 @@ class ChatCompletionChoiceTypedDict(TypedDict): index: int - message: AssistantMessageTypedDict finish_reason: ChatCompletionChoiceFinishReason + message: NotRequired[AssistantMessageTypedDict] + messages: NotRequired[List[DeltaMessageTypedDict]] class ChatCompletionChoice(BaseModel): index: int - message: AssistantMessage - finish_reason: ChatCompletionChoiceFinishReason + + message: Optional[AssistantMessage] = None + + messages: Optional[List[DeltaMessage]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message", "messages"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py index edd0fdc7..90dc0101 100644 --- a/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionrequest.py @@ -2,8 +2,14 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -11,6 +17,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -58,6 +66,31 @@ ] +ChatCompletionRequestToolTypedDict = TypeAliasType( + "ChatCompletionRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -78,26 +111,26 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""The ID of the model to use for this request.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: NotRequired[ChatCompletionRequestStopTypedDict] + stop: NotRequired[Nullable[ChatCompletionRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -105,8 +138,10 @@ class ChatCompletionRequestTypedDict(TypedDict): r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -121,7 +156,7 @@ class ChatCompletionRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = None + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -130,7 +165,7 @@ class ChatCompletionRequest(BaseModel): stream: Optional[bool] = False r"""Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON.""" - stop: Optional[ChatCompletionRequestStop] = None + stop: OptionalNullable[ChatCompletionRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -141,16 +176,16 @@ class ChatCompletionRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionRequestToolChoice] = None r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -162,9 +197,13 @@ class ChatCompletionRequest(BaseModel): parallel_tool_calls: Optional[bool] = None r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -188,19 +227,27 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", + "guardrails", "safe_prompt", ] ) nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", + "reasoning_effort", "prompt_mode", + "guardrails", ] ) serialized = handler(self) @@ -208,7 +255,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py b/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py index 2edfbed9..757d6231 100644 --- a/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py +++ b/packages/azure/src/mistralai/azure/client/models/chatcompletionstreamrequest.py @@ -2,8 +2,14 @@ from __future__ import annotations from .assistantmessage import AssistantMessage, AssistantMessageTypedDict +from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict +from .customconnector import CustomConnector, CustomConnectorTypedDict +from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict +from .guardrailconfig import GuardrailConfig, GuardrailConfigTypedDict +from .imagegenerationtool import ImageGenerationTool, ImageGenerationToolTypedDict from .mistralpromptmode import MistralPromptMode from .prediction import Prediction, PredictionTypedDict +from .reasoningeffort import ReasoningEffort from .responseformat import ResponseFormat, ResponseFormatTypedDict from .systemmessage import SystemMessage, SystemMessageTypedDict from .tool import Tool, ToolTypedDict @@ -11,6 +17,8 @@ from .toolchoiceenum import ToolChoiceEnum from .toolmessage import ToolMessage, ToolMessageTypedDict from .usermessage import UserMessage, UserMessageTypedDict +from .websearchpremiumtool import WebSearchPremiumTool, WebSearchPremiumToolTypedDict +from .websearchtool import WebSearchTool, WebSearchToolTypedDict from mistralai.azure.client.types import ( BaseModel, Nullable, @@ -58,6 +66,31 @@ ] +ChatCompletionStreamRequestToolTypedDict = TypeAliasType( + "ChatCompletionStreamRequestToolTypedDict", + Union[ + ToolTypedDict, + WebSearchToolTypedDict, + WebSearchPremiumToolTypedDict, + CodeInterpreterToolTypedDict, + ImageGenerationToolTypedDict, + DocumentLibraryToolTypedDict, + CustomConnectorTypedDict, + ], +) + + +ChatCompletionStreamRequestTool = Union[ + Tool, + WebSearchTool, + WebSearchPremiumTool, + CodeInterpreterTool, + ImageGenerationTool, + DocumentLibraryTool, + CustomConnector, +] + + ChatCompletionStreamRequestToolChoiceTypedDict = TypeAliasType( "ChatCompletionStreamRequestToolChoiceTypedDict", Union[ToolChoiceTypedDict, ToolChoiceEnum], @@ -78,25 +111,25 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""The ID of the model to use for this request.""" temperature: NotRequired[Nullable[float]] r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: NotRequired[float] + top_p: NotRequired[Nullable[float]] r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: NotRequired[Nullable[int]] r"""The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length.""" stream: NotRequired[bool] - stop: NotRequired[ChatCompletionStreamRequestStopTypedDict] + stop: NotRequired[Nullable[ChatCompletionStreamRequestStopTypedDict]] r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: NotRequired[Nullable[int]] r"""The seed to use for random sampling. If set, different calls will generate deterministic results.""" metadata: NotRequired[Nullable[Dict[str, Any]]] response_format: NotRequired[ResponseFormatTypedDict] r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: NotRequired[Nullable[List[ToolTypedDict]]] + tools: NotRequired[Nullable[List[ChatCompletionStreamRequestToolTypedDict]]] r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: NotRequired[ChatCompletionStreamRequestToolChoiceTypedDict] r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: NotRequired[float] + presence_penalty: NotRequired[Nullable[float]] r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: NotRequired[float] + frequency_penalty: NotRequired[Nullable[float]] r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: NotRequired[Nullable[int]] r"""Number of completions to return for each request, input tokens are only billed once.""" @@ -104,8 +137,10 @@ class ChatCompletionStreamRequestTypedDict(TypedDict): r"""Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content.""" parallel_tool_calls: NotRequired[bool] r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: NotRequired[Nullable[ReasoningEffort]] prompt_mode: NotRequired[Nullable[MistralPromptMode]] r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: NotRequired[Nullable[List[GuardrailConfigTypedDict]]] safe_prompt: NotRequired[bool] r"""Whether to inject a safety prompt before all conversations.""" @@ -120,7 +155,7 @@ class ChatCompletionStreamRequest(BaseModel): temperature: OptionalNullable[float] = UNSET r"""What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value.""" - top_p: Optional[float] = None + top_p: OptionalNullable[float] = UNSET r"""Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.""" max_tokens: OptionalNullable[int] = UNSET @@ -128,7 +163,7 @@ class ChatCompletionStreamRequest(BaseModel): stream: Optional[bool] = True - stop: Optional[ChatCompletionStreamRequestStop] = None + stop: OptionalNullable[ChatCompletionStreamRequestStop] = UNSET r"""Stop generation if this token is detected. Or if one of these tokens is detected when providing an array""" random_seed: OptionalNullable[int] = UNSET @@ -139,16 +174,16 @@ class ChatCompletionStreamRequest(BaseModel): response_format: Optional[ResponseFormat] = None r"""Specify the format that the model must output. By default it will use `{ \"type\": \"text\" }`. Setting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ \"type\": \"json_schema\" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide.""" - tools: OptionalNullable[List[Tool]] = UNSET + tools: OptionalNullable[List[ChatCompletionStreamRequestTool]] = UNSET r"""A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.""" tool_choice: Optional[ChatCompletionStreamRequestToolChoice] = None r"""Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.""" - presence_penalty: Optional[float] = None + presence_penalty: OptionalNullable[float] = UNSET r"""The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative.""" - frequency_penalty: Optional[float] = None + frequency_penalty: OptionalNullable[float] = UNSET r"""The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition.""" n: OptionalNullable[int] = UNSET @@ -160,9 +195,13 @@ class ChatCompletionStreamRequest(BaseModel): parallel_tool_calls: Optional[bool] = None r"""Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.""" + reasoning_effort: OptionalNullable[ReasoningEffort] = UNSET + prompt_mode: OptionalNullable[MistralPromptMode] = UNSET r"""Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.""" + guardrails: OptionalNullable[List[GuardrailConfig]] = UNSET + safe_prompt: Optional[bool] = None r"""Whether to inject a safety prompt before all conversations.""" @@ -186,19 +225,27 @@ def serialize_model(self, handler): "n", "prediction", "parallel_tool_calls", + "reasoning_effort", "prompt_mode", + "guardrails", "safe_prompt", ] ) nullable_fields = set( [ "temperature", + "top_p", "max_tokens", + "stop", "random_seed", "metadata", "tools", + "presence_penalty", + "frequency_penalty", "n", + "reasoning_effort", "prompt_mode", + "guardrails", ] ) serialized = handler(self) @@ -206,7 +253,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/codeinterpretertool.py b/packages/azure/src/mistralai/azure/client/models/codeinterpretertool.py new file mode 100644 index 00000000..0f588be3 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/codeinterpretertool.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CodeInterpreterToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["code_interpreter"] + + +class CodeInterpreterTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["code_interpreter"], + AfterValidator(validate_const("code_interpreter")), + ], + pydantic.Field(alias="type"), + ] = "code_interpreter" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CodeInterpreterTool.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/completionchunk.py b/packages/azure/src/mistralai/azure/client/models/completionchunk.py index 0e64bbc8..f6168f17 100644 --- a/packages/azure/src/mistralai/azure/client/models/completionchunk.py +++ b/packages/azure/src/mistralai/azure/client/models/completionchunk.py @@ -42,7 +42,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py b/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py index 20a27140..36be8302 100644 --- a/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py +++ b/packages/azure/src/mistralai/azure/client/models/completionresponsestreamchoice.py @@ -44,7 +44,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/packages/azure/src/mistralai/azure/client/models/customconnector.py b/packages/azure/src/mistralai/azure/client/models/customconnector.py new file mode 100644 index 00000000..e7eac82a --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/customconnector.py @@ -0,0 +1,80 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .apikeyauth import APIKeyAuth, APIKeyAuthTypedDict +from .oauth2tokenauth import OAuth2TokenAuth, OAuth2TokenAuthTypedDict +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import Field, model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +AuthorizationTypedDict = TypeAliasType( + "AuthorizationTypedDict", Union[OAuth2TokenAuthTypedDict, APIKeyAuthTypedDict] +) + + +Authorization = Annotated[ + Union[APIKeyAuth, OAuth2TokenAuth], Field(discriminator="type") +] + + +class CustomConnectorTypedDict(TypedDict): + connector_id: str + type: Literal["connector"] + authorization: NotRequired[Nullable[AuthorizationTypedDict]] + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + + +class CustomConnector(BaseModel): + connector_id: str + + type: Annotated[ + Annotated[Literal["connector"], AfterValidator(validate_const("connector"))], + pydantic.Field(alias="type"), + ] = "connector" + + authorization: OptionalNullable[Authorization] = UNSET + + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["authorization", "tool_configuration"]) + nullable_fields = set(["authorization", "tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + CustomConnector.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/deltamessage.py b/packages/azure/src/mistralai/azure/client/models/deltamessage.py index 567e772f..5bac18c2 100644 --- a/packages/azure/src/mistralai/azure/client/models/deltamessage.py +++ b/packages/azure/src/mistralai/azure/client/models/deltamessage.py @@ -11,7 +11,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer -from typing import List, Union +from typing import Any, Dict, List, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -29,6 +29,10 @@ class DeltaMessageTypedDict(TypedDict): role: NotRequired[Nullable[str]] content: NotRequired[Nullable[DeltaMessageContentTypedDict]] tool_calls: NotRequired[Nullable[List[ToolCallTypedDict]]] + tool_call_id: NotRequired[Nullable[str]] + index: NotRequired[Nullable[int]] + r"""If the completion returns multiple messages, this is to specify which message this delta is for.""" + metadata: NotRequired[Nullable[Dict[str, Any]]] class DeltaMessage(BaseModel): @@ -38,16 +42,27 @@ class DeltaMessage(BaseModel): tool_calls: OptionalNullable[List[ToolCall]] = UNSET + tool_call_id: OptionalNullable[str] = UNSET + + index: OptionalNullable[int] = UNSET + r"""If the completion returns multiple messages, this is to specify which message this delta is for.""" + + metadata: OptionalNullable[Dict[str, Any]] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["role", "content", "tool_calls"]) - nullable_fields = set(["role", "content", "tool_calls"]) + optional_fields = set( + ["role", "content", "tool_calls", "tool_call_id", "index", "metadata"] + ) + nullable_fields = set( + ["role", "content", "tool_calls", "tool_call_id", "index", "metadata"] + ) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/documentlibrarytool.py b/packages/azure/src/mistralai/azure/client/models/documentlibrarytool.py new file mode 100644 index 00000000..6e2e31e7 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/documentlibrarytool.py @@ -0,0 +1,70 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DocumentLibraryToolTypedDict(TypedDict): + library_ids: List[str] + r"""Ids of the library in which to search.""" + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["document_library"] + + +class DocumentLibraryTool(BaseModel): + library_ids: List[str] + r"""Ids of the library in which to search.""" + + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["document_library"], + AfterValidator(validate_const("document_library")), + ], + pydantic.Field(alias="type"), + ] = "document_library" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + DocumentLibraryTool.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/documenturlchunk.py b/packages/azure/src/mistralai/azure/client/models/documenturlchunk.py index 2dea8005..03af5816 100644 --- a/packages/azure/src/mistralai/azure/client/models/documenturlchunk.py +++ b/packages/azure/src/mistralai/azure/client/models/documenturlchunk.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/filechunk.py b/packages/azure/src/mistralai/azure/client/models/filechunk.py index 6baa0cba..772f67e6 100644 --- a/packages/azure/src/mistralai/azure/client/models/filechunk.py +++ b/packages/azure/src/mistralai/azure/client/models/filechunk.py @@ -31,7 +31,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/function.py b/packages/azure/src/mistralai/azure/client/models/function.py index 055d3657..3f135ed2 100644 --- a/packages/azure/src/mistralai/azure/client/models/function.py +++ b/packages/azure/src/mistralai/azure/client/models/function.py @@ -31,7 +31,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/guardrailconfig.py b/packages/azure/src/mistralai/azure/client/models/guardrailconfig.py new file mode 100644 index 00000000..4feffa67 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/guardrailconfig.py @@ -0,0 +1,58 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .moderationllmv1config import ModerationLlmv1Config, ModerationLlmv1ConfigTypedDict +from .moderationllmv2config import ModerationLlmv2Config, ModerationLlmv2ConfigTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GuardrailConfigTypedDict(TypedDict): + block_on_error: NotRequired[bool] + r"""If true, return HTTP 403 and block request in the event of a server-side error""" + moderation_llm_v1: NotRequired[Nullable[ModerationLlmv1ConfigTypedDict]] + moderation_llm_v2: NotRequired[Nullable[ModerationLlmv2ConfigTypedDict]] + + +class GuardrailConfig(BaseModel): + block_on_error: Optional[bool] = False + r"""If true, return HTTP 403 and block request in the event of a server-side error""" + + moderation_llm_v1: OptionalNullable[ModerationLlmv1Config] = UNSET + + moderation_llm_v2: OptionalNullable[ModerationLlmv2Config] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["block_on_error", "moderation_llm_v1", "moderation_llm_v2"] + ) + nullable_fields = set(["moderation_llm_v1", "moderation_llm_v2"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/imagegenerationtool.py b/packages/azure/src/mistralai/azure/client/models/imagegenerationtool.py new file mode 100644 index 00000000..5c51d688 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/imagegenerationtool.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ImageGenerationToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["image_generation"] + + +class ImageGenerationTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["image_generation"], + AfterValidator(validate_const("image_generation")), + ], + pydantic.Field(alias="type"), + ] = "image_generation" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + ImageGenerationTool.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/imageurl.py b/packages/azure/src/mistralai/azure/client/models/imageurl.py index bcb4fe43..c1704cd8 100644 --- a/packages/azure/src/mistralai/azure/client/models/imageurl.py +++ b/packages/azure/src/mistralai/azure/client/models/imageurl.py @@ -32,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/imageurlchunk.py b/packages/azure/src/mistralai/azure/client/models/imageurlchunk.py index 7213c498..8e8df9a6 100644 --- a/packages/azure/src/mistralai/azure/client/models/imageurlchunk.py +++ b/packages/azure/src/mistralai/azure/client/models/imageurlchunk.py @@ -20,14 +20,14 @@ class ImageURLChunkTypedDict(TypedDict): - r"""{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0""" + r"""{\"type\":\"image_url\",\"image_url\":\"data:image/png;base64,iVBORw0\"}""" image_url: ImageURLUnionTypedDict type: Literal["image_url"] class ImageURLChunk(BaseModel): - r"""{\"type\":\"image_url\",\"image_url\":{\"url\":\"data:image/png;base64,iVBORw0""" + r"""{\"type\":\"image_url\",\"image_url\":\"data:image/png;base64,iVBORw0\"}""" image_url: ImageURLUnion @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/jsonschema.py b/packages/azure/src/mistralai/azure/client/models/jsonschema.py index 99f2fb89..2790728b 100644 --- a/packages/azure/src/mistralai/azure/client/models/jsonschema.py +++ b/packages/azure/src/mistralai/azure/client/models/jsonschema.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/moderationllmaction.py b/packages/azure/src/mistralai/azure/client/models/moderationllmaction.py new file mode 100644 index 00000000..cff03d9a --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/moderationllmaction.py @@ -0,0 +1,10 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Literal + + +ModerationLLMAction = Literal[ + "none", + "block", +] diff --git a/packages/azure/src/mistralai/azure/client/models/moderationllmv1categorythresholds.py b/packages/azure/src/mistralai/azure/client/models/moderationllmv1categorythresholds.py new file mode 100644 index 00000000..e3e9b22f --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/moderationllmv1categorythresholds.py @@ -0,0 +1,93 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv1CategoryThresholdsTypedDict(TypedDict): + sexual: NotRequired[Nullable[float]] + hate_and_discrimination: NotRequired[Nullable[float]] + violence_and_threats: NotRequired[Nullable[float]] + dangerous_and_criminal_content: NotRequired[Nullable[float]] + selfharm: NotRequired[Nullable[float]] + health: NotRequired[Nullable[float]] + financial: NotRequired[Nullable[float]] + law: NotRequired[Nullable[float]] + pii: NotRequired[Nullable[float]] + + +class ModerationLlmv1CategoryThresholds(BaseModel): + sexual: OptionalNullable[float] = UNSET + + hate_and_discrimination: OptionalNullable[float] = UNSET + + violence_and_threats: OptionalNullable[float] = UNSET + + dangerous_and_criminal_content: OptionalNullable[float] = UNSET + + selfharm: OptionalNullable[float] = UNSET + + health: OptionalNullable[float] = UNSET + + financial: OptionalNullable[float] = UNSET + + law: OptionalNullable[float] = UNSET + + pii: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous_and_criminal_content", + "selfharm", + "health", + "financial", + "law", + "pii", + ] + ) + nullable_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous_and_criminal_content", + "selfharm", + "health", + "financial", + "law", + "pii", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/moderationllmv1config.py b/packages/azure/src/mistralai/azure/client/models/moderationllmv1config.py new file mode 100644 index 00000000..82268870 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/moderationllmv1config.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .moderationllmaction import ModerationLLMAction +from .moderationllmv1categorythresholds import ( + ModerationLlmv1CategoryThresholds, + ModerationLlmv1CategoryThresholdsTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv1ConfigTypedDict(TypedDict): + model_name: NotRequired[str] + r"""Override model name. Should be omitted in general.""" + custom_category_thresholds: NotRequired[ + Nullable[ModerationLlmv1CategoryThresholdsTypedDict] + ] + ignore_other_categories: NotRequired[bool] + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + action: NotRequired[ModerationLLMAction] + + +class ModerationLlmv1Config(BaseModel): + model_name: Optional[str] = "mistral-moderation-2411" + r"""Override model name. Should be omitted in general.""" + + custom_category_thresholds: OptionalNullable[ModerationLlmv1CategoryThresholds] = ( + UNSET + ) + + ignore_other_categories: Optional[bool] = False + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + + action: Optional[ModerationLLMAction] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "model_name", + "custom_category_thresholds", + "ignore_other_categories", + "action", + ] + ) + nullable_fields = set(["custom_category_thresholds"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/moderationllmv2categorythresholds.py b/packages/azure/src/mistralai/azure/client/models/moderationllmv2categorythresholds.py new file mode 100644 index 00000000..57af08d8 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/moderationllmv2categorythresholds.py @@ -0,0 +1,103 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv2CategoryThresholdsTypedDict(TypedDict): + sexual: NotRequired[Nullable[float]] + hate_and_discrimination: NotRequired[Nullable[float]] + violence_and_threats: NotRequired[Nullable[float]] + dangerous: NotRequired[Nullable[float]] + criminal: NotRequired[Nullable[float]] + selfharm: NotRequired[Nullable[float]] + health: NotRequired[Nullable[float]] + financial: NotRequired[Nullable[float]] + law: NotRequired[Nullable[float]] + pii: NotRequired[Nullable[float]] + jailbreaking: NotRequired[Nullable[float]] + + +class ModerationLlmv2CategoryThresholds(BaseModel): + sexual: OptionalNullable[float] = UNSET + + hate_and_discrimination: OptionalNullable[float] = UNSET + + violence_and_threats: OptionalNullable[float] = UNSET + + dangerous: OptionalNullable[float] = UNSET + + criminal: OptionalNullable[float] = UNSET + + selfharm: OptionalNullable[float] = UNSET + + health: OptionalNullable[float] = UNSET + + financial: OptionalNullable[float] = UNSET + + law: OptionalNullable[float] = UNSET + + pii: OptionalNullable[float] = UNSET + + jailbreaking: OptionalNullable[float] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + nullable_fields = set( + [ + "sexual", + "hate_and_discrimination", + "violence_and_threats", + "dangerous", + "criminal", + "selfharm", + "health", + "financial", + "law", + "pii", + "jailbreaking", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/moderationllmv2config.py b/packages/azure/src/mistralai/azure/client/models/moderationllmv2config.py new file mode 100644 index 00000000..57075e60 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/moderationllmv2config.py @@ -0,0 +1,75 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .moderationllmaction import ModerationLLMAction +from .moderationllmv2categorythresholds import ( + ModerationLlmv2CategoryThresholds, + ModerationLlmv2CategoryThresholdsTypedDict, +) +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class ModerationLlmv2ConfigTypedDict(TypedDict): + model_name: NotRequired[str] + r"""Override model name. Should be omitted in general.""" + custom_category_thresholds: NotRequired[ + Nullable[ModerationLlmv2CategoryThresholdsTypedDict] + ] + ignore_other_categories: NotRequired[bool] + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + action: NotRequired[ModerationLLMAction] + + +class ModerationLlmv2Config(BaseModel): + model_name: Optional[str] = "mistral-moderation-2603" + r"""Override model name. Should be omitted in general.""" + + custom_category_thresholds: OptionalNullable[ModerationLlmv2CategoryThresholds] = ( + UNSET + ) + + ignore_other_categories: Optional[bool] = False + r"""If true, only evaluate categories in custom_category_thresholds; others are ignored.""" + + action: Optional[ModerationLLMAction] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "model_name", + "custom_category_thresholds", + "ignore_other_categories", + "action", + ] + ) + nullable_fields = set(["custom_category_thresholds"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/oauth2tokenauth.py b/packages/azure/src/mistralai/azure/client/models/oauth2tokenauth.py new file mode 100644 index 00000000..3da345fc --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/oauth2tokenauth.py @@ -0,0 +1,31 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import BaseModel +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class OAuth2TokenAuthTypedDict(TypedDict): + value: str + type: Literal["oauth2-token"] + + +class OAuth2TokenAuth(BaseModel): + value: str + + type: Annotated[ + Annotated[ + Literal["oauth2-token"], AfterValidator(validate_const("oauth2-token")) + ], + pydantic.Field(alias="type"), + ] = "oauth2-token" + + +try: + OAuth2TokenAuth.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/ocrconfidencescore.py b/packages/azure/src/mistralai/azure/client/models/ocrconfidencescore.py new file mode 100644 index 00000000..7ac59069 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrconfidencescore.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import BaseModel +from typing_extensions import TypedDict + + +class OCRConfidenceScoreTypedDict(TypedDict): + r"""Confidence score for a token or word in OCR output.""" + + text: str + r"""The word or text segment""" + confidence: float + r"""Confidence score (0-1)""" + start_index: int + r"""Start index of the text in the page markdown string""" + + +class OCRConfidenceScore(BaseModel): + r"""Confidence score for a token or word in OCR output.""" + + text: str + r"""The word or text segment""" + + confidence: float + r"""Confidence score (0-1)""" + + start_index: int + r"""Start index of the text in the page markdown string""" diff --git a/packages/azure/src/mistralai/azure/client/models/ocrimageobject.py b/packages/azure/src/mistralai/azure/client/models/ocrimageobject.py index a23515b3..91d7ac0e 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrimageobject.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrimageobject.py @@ -69,7 +69,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py b/packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py new file mode 100644 index 00000000..2d5d7a1a --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/ocrpageconfidencescores.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .ocrconfidencescore import OCRConfidenceScore, OCRConfidenceScoreTypedDict +from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class OCRPageConfidenceScoresTypedDict(TypedDict): + r"""Confidence scores for an OCR page at various granularities. + + Note on page-level stats: + - For 'page' granularity: average/minimum are computed from per-token exp(logprob). + - For 'word' granularity: average/minimum are computed from per-word confidence, + where each word's confidence is exp(mean(token_logprobs)) — a geometric mean + over the word's subword tokens. + """ + + average_page_confidence_score: float + r"""Average confidence score for the page""" + minimum_page_confidence_score: float + r"""Minimum confidence score for the page""" + word_confidence_scores: NotRequired[List[OCRConfidenceScoreTypedDict]] + r"""Word-level confidence scores (populated only for 'word' granularity)""" + + +class OCRPageConfidenceScores(BaseModel): + r"""Confidence scores for an OCR page at various granularities. + + Note on page-level stats: + - For 'page' granularity: average/minimum are computed from per-token exp(logprob). + - For 'word' granularity: average/minimum are computed from per-word confidence, + where each word's confidence is exp(mean(token_logprobs)) — a geometric mean + over the word's subword tokens. + """ + + average_page_confidence_score: float + r"""Average confidence score for the page""" + + minimum_page_confidence_score: float + r"""Minimum confidence score for the page""" + + word_confidence_scores: Optional[List[OCRConfidenceScore]] = None + r"""Word-level confidence scores (populated only for 'word' granularity)""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["word_confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py b/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py index 434c8988..08b5dbcb 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrpageobject.py @@ -2,6 +2,10 @@ from __future__ import annotations from .ocrimageobject import OCRImageObject, OCRImageObjectTypedDict +from .ocrpageconfidencescores import ( + OCRPageConfidenceScores, + OCRPageConfidenceScoresTypedDict, +) from .ocrpagedimensions import OCRPageDimensions, OCRPageDimensionsTypedDict from .ocrtableobject import OCRTableObject, OCRTableObjectTypedDict from mistralai.azure.client.types import ( @@ -33,6 +37,8 @@ class OCRPageObjectTypedDict(TypedDict): r"""Header of the page""" footer: NotRequired[Nullable[str]] r"""Footer of the page""" + confidence_scores: NotRequired[Nullable[OCRPageConfidenceScoresTypedDict]] + r"""Confidence scores for the OCR page (populated when confidence_scores_granularity is set)""" class OCRPageObject(BaseModel): @@ -60,16 +66,21 @@ class OCRPageObject(BaseModel): footer: OptionalNullable[str] = UNSET r"""Footer of the page""" + confidence_scores: OptionalNullable[OCRPageConfidenceScores] = UNSET + r"""Confidence scores for the OCR page (populated when confidence_scores_granularity is set)""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["tables", "hyperlinks", "header", "footer"]) - nullable_fields = set(["header", "footer", "dimensions"]) + optional_fields = set( + ["tables", "hyperlinks", "header", "footer", "confidence_scores"] + ) + nullable_fields = set(["header", "footer", "dimensions", "confidence_scores"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/ocrrequest.py b/packages/azure/src/mistralai/azure/client/models/ocrrequest.py index a2cd3415..731c0cf8 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrrequest.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrrequest.py @@ -28,19 +28,32 @@ r"""Document to run OCR on""" +PagesTypedDict = TypeAliasType("PagesTypedDict", Union[str, List[int]]) +r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" + + +Pages = TypeAliasType("Pages", Union[str, List[int]]) +r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" + + TableFormat = Literal[ "markdown", "html", ] +ConfidenceScoresGranularity = Literal[ + "word", + "page", +] + + class OCRRequestTypedDict(TypedDict): model: Nullable[str] document: DocumentTypedDict r"""Document to run OCR on""" - id: NotRequired[str] - pages: NotRequired[Nullable[List[int]]] - r"""Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0""" + pages: NotRequired[Nullable[PagesTypedDict]] + r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" include_image_base64: NotRequired[Nullable[bool]] r"""Include image URLs in response""" image_limit: NotRequired[Nullable[int]] @@ -56,6 +69,8 @@ class OCRRequestTypedDict(TypedDict): table_format: NotRequired[Nullable[TableFormat]] extract_header: NotRequired[bool] extract_footer: NotRequired[bool] + confidence_scores_granularity: NotRequired[Nullable[ConfidenceScoresGranularity]] + r"""Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small.""" class OCRRequest(BaseModel): @@ -64,10 +79,8 @@ class OCRRequest(BaseModel): document: Document r"""Document to run OCR on""" - id: Optional[str] = None - - pages: OptionalNullable[List[int]] = UNSET - r"""Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0""" + pages: OptionalNullable[Pages] = UNSET + r"""Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0.""" include_image_base64: OptionalNullable[bool] = UNSET r"""Include image URLs in response""" @@ -93,11 +106,13 @@ class OCRRequest(BaseModel): extract_footer: Optional[bool] = None + confidence_scores_granularity: OptionalNullable[ConfidenceScoresGranularity] = UNSET + r"""Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( [ - "id", "pages", "include_image_base64", "image_limit", @@ -108,6 +123,7 @@ def serialize_model(self, handler): "table_format", "extract_header", "extract_footer", + "confidence_scores_granularity", ] ) nullable_fields = set( @@ -121,6 +137,7 @@ def serialize_model(self, handler): "document_annotation_format", "document_annotation_prompt", "table_format", + "confidence_scores_granularity", ] ) serialized = handler(self) @@ -128,7 +145,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/ocrresponse.py b/packages/azure/src/mistralai/azure/client/models/ocrresponse.py index 3dc09fd7..6e27f574 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrresponse.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrresponse.py @@ -46,7 +46,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/ocrtableobject.py b/packages/azure/src/mistralai/azure/client/models/ocrtableobject.py index f1de5428..07bc7c13 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrtableobject.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrtableobject.py @@ -1,10 +1,19 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from mistralai.azure.client.types import BaseModel, UnrecognizedStr +from .ocrconfidencescore import OCRConfidenceScore, OCRConfidenceScoreTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) import pydantic -from typing import Literal, Union -from typing_extensions import Annotated, TypedDict +from pydantic import model_serializer +from typing import List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict Format = Union[ @@ -24,6 +33,8 @@ class OCRTableObjectTypedDict(TypedDict): r"""Content of the table in the given format""" format_: Format r"""Format of the table""" + word_confidence_scores: NotRequired[Nullable[List[OCRConfidenceScoreTypedDict]]] + r"""Per-word confidence scores for the table content. Returned when confidence_scores_granularity is set to 'word'.""" class OCRTableObject(BaseModel): @@ -36,6 +47,34 @@ class OCRTableObject(BaseModel): format_: Annotated[Format, pydantic.Field(alias="format")] r"""Format of the table""" + word_confidence_scores: OptionalNullable[List[OCRConfidenceScore]] = UNSET + r"""Per-word confidence scores for the table content. Returned when confidence_scores_granularity is set to 'word'.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["word_confidence_scores"]) + nullable_fields = set(["word_confidence_scores"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + try: OCRTableObject.model_rebuild() diff --git a/packages/azure/src/mistralai/azure/client/models/ocrusageinfo.py b/packages/azure/src/mistralai/azure/client/models/ocrusageinfo.py index f63315d2..b5c5f5c1 100644 --- a/packages/azure/src/mistralai/azure/client/models/ocrusageinfo.py +++ b/packages/azure/src/mistralai/azure/client/models/ocrusageinfo.py @@ -35,7 +35,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/prediction.py b/packages/azure/src/mistralai/azure/client/models/prediction.py index 1fa1d782..3d94feb5 100644 --- a/packages/azure/src/mistralai/azure/client/models/prediction.py +++ b/packages/azure/src/mistralai/azure/client/models/prediction.py @@ -37,7 +37,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/reasoningeffort.py b/packages/azure/src/mistralai/azure/client/models/reasoningeffort.py new file mode 100644 index 00000000..43ffa02b --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/reasoningeffort.py @@ -0,0 +1,10 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from typing import Literal + + +ReasoningEffort = Literal[ + "none", + "high", +] diff --git a/packages/azure/src/mistralai/azure/client/models/referencechunk.py b/packages/azure/src/mistralai/azure/client/models/referencechunk.py index f7af9bf9..debab3ce 100644 --- a/packages/azure/src/mistralai/azure/client/models/referencechunk.py +++ b/packages/azure/src/mistralai/azure/client/models/referencechunk.py @@ -6,17 +6,23 @@ import pydantic from pydantic import model_serializer from pydantic.functional_validators import AfterValidator -from typing import List, Literal, Optional -from typing_extensions import Annotated, TypedDict +from typing import List, Literal, Optional, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +ReferenceIDTypedDict = TypeAliasType("ReferenceIDTypedDict", Union[int, str]) + + +ReferenceID = TypeAliasType("ReferenceID", Union[int, str]) class ReferenceChunkTypedDict(TypedDict): - reference_ids: List[int] + reference_ids: List[ReferenceIDTypedDict] type: Literal["reference"] class ReferenceChunk(BaseModel): - reference_ids: List[int] + reference_ids: List[ReferenceID] type: Annotated[ Annotated[ @@ -33,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/responseformat.py b/packages/azure/src/mistralai/azure/client/models/responseformat.py index 20fd2b86..50f0b075 100644 --- a/packages/azure/src/mistralai/azure/client/models/responseformat.py +++ b/packages/azure/src/mistralai/azure/client/models/responseformat.py @@ -38,7 +38,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/thinkchunk.py b/packages/azure/src/mistralai/azure/client/models/thinkchunk.py index ec8e7f95..8e52ccc9 100644 --- a/packages/azure/src/mistralai/azure/client/models/thinkchunk.py +++ b/packages/azure/src/mistralai/azure/client/models/thinkchunk.py @@ -4,7 +4,13 @@ from .referencechunk import ReferenceChunk, ReferenceChunkTypedDict from .textchunk import TextChunk, TextChunkTypedDict from .toolreferencechunk import ToolReferenceChunk, ToolReferenceChunkTypedDict -from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from mistralai.azure.client.utils import validate_const import pydantic from pydantic import model_serializer @@ -27,6 +33,8 @@ class ThinkChunkTypedDict(TypedDict): thinking: List[ThinkingTypedDict] type: Literal["thinking"] + signature: NotRequired[Nullable[str]] + r"""Signature to replay some reasoning blocks across turns.""" closed: NotRequired[bool] r"""Whether the thinking chunk is closed or not. Currently only used for prefixing.""" @@ -39,21 +47,33 @@ class ThinkChunk(BaseModel): pydantic.Field(alias="type"), ] = "thinking" + signature: OptionalNullable[str] = UNSET + r"""Signature to replay some reasoning blocks across turns.""" + closed: Optional[bool] = None r"""Whether the thinking chunk is closed or not. Currently only used for prefixing.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["closed"]) + optional_fields = set(["signature", "closed"]) + nullable_fields = set(["signature"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/packages/azure/src/mistralai/azure/client/models/tool.py b/packages/azure/src/mistralai/azure/client/models/tool.py index 87329bdb..ecfb5f34 100644 --- a/packages/azure/src/mistralai/azure/client/models/tool.py +++ b/packages/azure/src/mistralai/azure/client/models/tool.py @@ -2,35 +2,32 @@ from __future__ import annotations from .function import Function, FunctionTypedDict -from .tooltypes import ToolTypes -from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL -from pydantic import model_serializer -from typing import Optional -from typing_extensions import NotRequired, TypedDict +from mistralai.azure.client.types import BaseModel, UnrecognizedStr +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal, Union +from typing_extensions import Annotated, TypedDict class ToolTypedDict(TypedDict): function: FunctionTypedDict - type: NotRequired[ToolTypes] + type: Union[Literal["function"], UnrecognizedStr] class Tool(BaseModel): function: Function - type: Optional[ToolTypes] = None + type: Annotated[ + Annotated[ + Union[Literal["function"], UnrecognizedStr], + AfterValidator(validate_const("function")), + ], + pydantic.Field(alias="type"), + ] = "function" - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set(["type"]) - serialized = handler(self) - m = {} - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k) - - if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: - m[k] = val - - return m +try: + Tool.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/toolcall.py b/packages/azure/src/mistralai/azure/client/models/toolcall.py index ada1ea65..87ccd030 100644 --- a/packages/azure/src/mistralai/azure/client/models/toolcall.py +++ b/packages/azure/src/mistralai/azure/client/models/toolcall.py @@ -2,7 +2,6 @@ from __future__ import annotations from .functioncall import FunctionCall, FunctionCallTypedDict -from .tooltypes import ToolTypes from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -12,7 +11,7 @@ class ToolCallTypedDict(TypedDict): function: FunctionCallTypedDict id: NotRequired[str] - type: NotRequired[ToolTypes] + type: NotRequired[str] index: NotRequired[int] @@ -21,7 +20,7 @@ class ToolCall(BaseModel): id: Optional[str] = "null" - type: Optional[ToolTypes] = None + type: Optional[str] = None index: Optional[int] = 0 @@ -33,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/toolchoice.py b/packages/azure/src/mistralai/azure/client/models/toolchoice.py index ddb9e141..15d1da1c 100644 --- a/packages/azure/src/mistralai/azure/client/models/toolchoice.py +++ b/packages/azure/src/mistralai/azure/client/models/toolchoice.py @@ -2,7 +2,6 @@ from __future__ import annotations from .functionname import FunctionName, FunctionNameTypedDict -from .tooltypes import ToolTypes from mistralai.azure.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer from typing import Optional @@ -14,7 +13,7 @@ class ToolChoiceTypedDict(TypedDict): function: FunctionNameTypedDict r"""this restriction of `Function` is used to select a specific function to call""" - type: NotRequired[ToolTypes] + type: NotRequired[str] class ToolChoice(BaseModel): @@ -23,7 +22,7 @@ class ToolChoice(BaseModel): function: FunctionName r"""this restriction of `Function` is used to select a specific function to call""" - type: Optional[ToolTypes] = None + type: Optional[str] = None @model_serializer(mode="wrap") def serialize_model(self, handler): @@ -33,7 +32,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/toolconfiguration.py b/packages/azure/src/mistralai/azure/client/models/toolconfiguration.py new file mode 100644 index 00000000..6977679f --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/toolconfiguration.py @@ -0,0 +1,52 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ToolConfigurationTypedDict(TypedDict): + exclude: NotRequired[Nullable[List[str]]] + include: NotRequired[Nullable[List[str]]] + requires_confirmation: NotRequired[Nullable[List[str]]] + + +class ToolConfiguration(BaseModel): + exclude: OptionalNullable[List[str]] = UNSET + + include: OptionalNullable[List[str]] = UNSET + + requires_confirmation: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["exclude", "include", "requires_confirmation"]) + nullable_fields = set(["exclude", "include", "requires_confirmation"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/packages/azure/src/mistralai/azure/client/models/toolmessage.py b/packages/azure/src/mistralai/azure/client/models/toolmessage.py index 670210de..e246d5a2 100644 --- a/packages/azure/src/mistralai/azure/client/models/toolmessage.py +++ b/packages/azure/src/mistralai/azure/client/models/toolmessage.py @@ -53,7 +53,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py b/packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py index c9db878f..0845fde3 100644 --- a/packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py +++ b/packages/azure/src/mistralai/azure/client/models/toolreferencechunk.py @@ -17,14 +17,18 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -ToolUnionTypedDict = TypeAliasType("ToolUnionTypedDict", Union[BuiltInConnectors, str]) +ToolReferenceChunkToolTypedDict = TypeAliasType( + "ToolReferenceChunkToolTypedDict", Union[BuiltInConnectors, str] +) -ToolUnion = TypeAliasType("ToolUnion", Union[BuiltInConnectors, str]) +ToolReferenceChunkTool = TypeAliasType( + "ToolReferenceChunkTool", Union[BuiltInConnectors, str] +) class ToolReferenceChunkTypedDict(TypedDict): - tool: ToolUnionTypedDict + tool: ToolReferenceChunkToolTypedDict title: str type: Literal["tool_reference"] url: NotRequired[Nullable[str]] @@ -33,7 +37,7 @@ class ToolReferenceChunkTypedDict(TypedDict): class ToolReferenceChunk(BaseModel): - tool: ToolUnion + tool: ToolReferenceChunkTool title: str @@ -60,7 +64,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/tooltypes.py b/packages/azure/src/mistralai/azure/client/models/tooltypes.py deleted file mode 100644 index 1cce7446..00000000 --- a/packages/azure/src/mistralai/azure/client/models/tooltypes.py +++ /dev/null @@ -1,8 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from mistralai.azure.client.types import UnrecognizedStr -from typing import Literal, Union - - -ToolTypes = Union[Literal["function",], UnrecognizedStr] diff --git a/packages/azure/src/mistralai/azure/client/models/usageinfo.py b/packages/azure/src/mistralai/azure/client/models/usageinfo.py index 0f04c87c..9200682a 100644 --- a/packages/azure/src/mistralai/azure/client/models/usageinfo.py +++ b/packages/azure/src/mistralai/azure/client/models/usageinfo.py @@ -59,8 +59,8 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) - serialized.pop(k, None) + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) is_nullable_and_explicitly_set = ( k in nullable_fields and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member diff --git a/packages/azure/src/mistralai/azure/client/models/usermessage.py b/packages/azure/src/mistralai/azure/client/models/usermessage.py index 549b01ca..7dbca134 100644 --- a/packages/azure/src/mistralai/azure/client/models/usermessage.py +++ b/packages/azure/src/mistralai/azure/client/models/usermessage.py @@ -39,7 +39,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: m[k] = val diff --git a/packages/azure/src/mistralai/azure/client/models/validationerror.py b/packages/azure/src/mistralai/azure/client/models/validationerror.py index f0169e18..aaa72f21 100644 --- a/packages/azure/src/mistralai/azure/client/models/validationerror.py +++ b/packages/azure/src/mistralai/azure/client/models/validationerror.py @@ -48,7 +48,7 @@ def serialize_model(self, handler): for n, f in type(self).model_fields.items(): k = f.alias or n - val = serialized.get(k) + val = serialized.get(k, serialized.get(n)) if val != UNSET_SENTINEL: if val is not None or k not in optional_fields: diff --git a/packages/azure/src/mistralai/azure/client/models/websearchpremiumtool.py b/packages/azure/src/mistralai/azure/client/models/websearchpremiumtool.py new file mode 100644 index 00000000..252d8803 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/websearchpremiumtool.py @@ -0,0 +1,65 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WebSearchPremiumToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["web_search_premium"] + + +class WebSearchPremiumTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[ + Literal["web_search_premium"], + AfterValidator(validate_const("web_search_premium")), + ], + pydantic.Field(alias="type"), + ] = "web_search_premium" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WebSearchPremiumTool.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/models/websearchtool.py b/packages/azure/src/mistralai/azure/client/models/websearchtool.py new file mode 100644 index 00000000..363e0331 --- /dev/null +++ b/packages/azure/src/mistralai/azure/client/models/websearchtool.py @@ -0,0 +1,62 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict +from mistralai.azure.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.azure.client.utils import validate_const +import pydantic +from pydantic import model_serializer +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, NotRequired, TypedDict + + +class WebSearchToolTypedDict(TypedDict): + tool_configuration: NotRequired[Nullable[ToolConfigurationTypedDict]] + type: Literal["web_search"] + + +class WebSearchTool(BaseModel): + tool_configuration: OptionalNullable[ToolConfiguration] = UNSET + + type: Annotated[ + Annotated[Literal["web_search"], AfterValidator(validate_const("web_search"))], + pydantic.Field(alias="type"), + ] = "web_search" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tool_configuration"]) + nullable_fields = set(["tool_configuration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + WebSearchTool.model_rebuild() +except NameError: + pass diff --git a/packages/azure/src/mistralai/azure/client/ocr.py b/packages/azure/src/mistralai/azure/client/ocr.py index b9270f6a..c4f706a9 100644 --- a/packages/azure/src/mistralai/azure/client/ocr.py +++ b/packages/azure/src/mistralai/azure/client/ocr.py @@ -5,7 +5,7 @@ from mistralai.azure.client._hooks import HookContext from mistralai.azure.client.types import Nullable, OptionalNullable, UNSET from mistralai.azure.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional, Union +from typing import Any, Mapping, Optional, Union class Ocr(BaseSDK): @@ -14,8 +14,7 @@ def process( *, model: Nullable[str], document: Union[models.Document, models.DocumentTypedDict], - id: Optional[str] = None, - pages: OptionalNullable[List[int]] = UNSET, + pages: OptionalNullable[Union[models.Pages, models.PagesTypedDict]] = UNSET, include_image_base64: OptionalNullable[bool] = UNSET, image_limit: OptionalNullable[int] = UNSET, image_min_size: OptionalNullable[int] = UNSET, @@ -29,6 +28,9 @@ def process( table_format: OptionalNullable[models.TableFormat] = UNSET, extract_header: Optional[bool] = None, extract_footer: Optional[bool] = None, + confidence_scores_granularity: OptionalNullable[ + models.ConfidenceScoresGranularity + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -38,8 +40,7 @@ def process( :param model: :param document: Document to run OCR on - :param id: - :param pages: Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 + :param pages: Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. :param include_image_base64: Include image URLs in response :param image_limit: Max images to extract :param image_min_size: Minimum height and width of image to extract @@ -49,6 +50,7 @@ def process( :param table_format: :param extract_header: :param extract_footer: + :param confidence_scores_granularity: Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -59,6 +61,9 @@ def process( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -66,7 +71,6 @@ def process( request = models.OCRRequest( model=model, - id=id, document=utils.get_pydantic_model(document, models.Document), pages=pages, include_image_base64=include_image_base64, @@ -82,11 +86,12 @@ def process( table_format=table_format, extract_header=extract_header, extract_footer=extract_footer, + confidence_scores_granularity=confidence_scores_granularity, ) req = self._build_request( method="POST", - path="/ocr", + path="/providers/mistral/azure/ocr", base_url=base_url, url_variables=url_variables, request=request, @@ -121,7 +126,7 @@ def process( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -147,8 +152,7 @@ async def process_async( *, model: Nullable[str], document: Union[models.Document, models.DocumentTypedDict], - id: Optional[str] = None, - pages: OptionalNullable[List[int]] = UNSET, + pages: OptionalNullable[Union[models.Pages, models.PagesTypedDict]] = UNSET, include_image_base64: OptionalNullable[bool] = UNSET, image_limit: OptionalNullable[int] = UNSET, image_min_size: OptionalNullable[int] = UNSET, @@ -162,6 +166,9 @@ async def process_async( table_format: OptionalNullable[models.TableFormat] = UNSET, extract_header: Optional[bool] = None, extract_footer: Optional[bool] = None, + confidence_scores_granularity: OptionalNullable[ + models.ConfidenceScoresGranularity + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -171,8 +178,7 @@ async def process_async( :param model: :param document: Document to run OCR on - :param id: - :param pages: Specific pages user wants to process in various formats: single number, range, or list of both. Starts from 0 + :param pages: Specific pages to process. Accepts a list of integers or a string of comma-separated numbers and ranges (e.g. '0,1,2' or '0-5' or '0,2-4'). Page numbers start from 0. :param include_image_base64: Include image URLs in response :param image_limit: Max images to extract :param image_min_size: Minimum height and width of image to extract @@ -182,6 +188,7 @@ async def process_async( :param table_format: :param extract_header: :param extract_footer: + :param confidence_scores_granularity: Granularity for confidence scores: 'word' (per-word scores) or 'page' (aggregate only). Defaults to None (no confidence scores) to keep response payload small. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -192,6 +199,9 @@ async def process_async( if timeout_ms is None: timeout_ms = self.sdk_configuration.timeout_ms + if timeout_ms is None: + timeout_ms = 60000 + if server_url is not None: base_url = server_url else: @@ -199,7 +209,6 @@ async def process_async( request = models.OCRRequest( model=model, - id=id, document=utils.get_pydantic_model(document, models.Document), pages=pages, include_image_base64=include_image_base64, @@ -215,11 +224,12 @@ async def process_async( table_format=table_format, extract_header=extract_header, extract_footer=extract_footer, + confidence_scores_granularity=confidence_scores_granularity, ) req = self._build_request_async( method="POST", - path="/ocr", + path="/providers/mistral/azure/ocr", base_url=base_url, url_variables=url_variables, request=request, @@ -254,7 +264,7 @@ async def process_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/packages/azure/src/mistralai/azure/client/utils/eventstreaming.py b/packages/azure/src/mistralai/azure/client/utils/eventstreaming.py index f2052fc2..3bdcd6d3 100644 --- a/packages/azure/src/mistralai/azure/client/utils/eventstreaming.py +++ b/packages/azure/src/mistralai/azure/client/utils/eventstreaming.py @@ -32,9 +32,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events(response, decoder, sentinel) + self.generator = stream_events( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -68,9 +71,12 @@ def __init__( decoder: Callable[[str], T], sentinel: Optional[str] = None, client_ref: Optional[object] = None, + data_required: bool = True, ): self.response = response - self.generator = stream_events_async(response, decoder, sentinel) + self.generator = stream_events_async( + response, decoder, sentinel, data_required=data_required + ) self.client_ref = client_ref self._closed = False @@ -116,6 +122,7 @@ async def stream_events_async( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 @@ -138,7 +145,11 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -151,7 +162,11 @@ async def stream_events_async( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -161,6 +176,7 @@ def stream_events( response: httpx.Response, decoder: Callable[[str], T], sentinel: Optional[str] = None, + data_required: bool = True, ) -> Generator[T, None, None]: buffer = bytearray() position = 0 @@ -183,7 +199,11 @@ def stream_events( block = buffer[position:i] position = i + len(seq) event, discard, event_id = _parse_event( - raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=block, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -196,7 +216,11 @@ def stream_events( position = 0 event, discard, _ = _parse_event( - raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + raw=buffer, + decoder=decoder, + sentinel=sentinel, + event_id=event_id, + data_required=data_required, ) if event is not None: yield event @@ -208,6 +232,7 @@ def _parse_event( decoder: Callable[[str], T], sentinel: Optional[str] = None, event_id: Optional[str] = None, + data_required: bool = True, ) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) @@ -250,6 +275,10 @@ def _parse_event( if sentinel and data == f"{sentinel}\n": return None, True, event_id + # Skip data-less events when data is required + if not data and publish and data_required: + return None, False, event_id + if data: data = data[:-1] try: diff --git a/packages/azure/src/mistralai/azure/client/utils/metadata.py b/packages/azure/src/mistralai/azure/client/utils/metadata.py index 173b3e5c..5abddd58 100644 --- a/packages/azure/src/mistralai/azure/client/utils/metadata.py +++ b/packages/azure/src/mistralai/azure/client/utils/metadata.py @@ -15,6 +15,7 @@ class SecurityMetadata: scheme_type: Optional[str] = None sub_type: Optional[str] = None field_name: Optional[str] = None + composite: bool = False def get_field_name(self, default: str) -> str: return self.field_name or default diff --git a/packages/azure/src/mistralai/azure/client/utils/security.py b/packages/azure/src/mistralai/azure/client/utils/security.py index 17996bd5..42d8d78e 100644 --- a/packages/azure/src/mistralai/azure/client/utils/security.py +++ b/packages/azure/src/mistralai/azure/client/utils/security.py @@ -5,6 +5,7 @@ Any, Dict, List, + Optional, Tuple, ) from pydantic import BaseModel @@ -16,7 +17,9 @@ ) -def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: +def get_security( + security: Any, allowed_fields: Optional[List[str]] = None +) -> Tuple[Dict[str, str], Dict[str, List[str]]]: headers: Dict[str, str] = {} query_params: Dict[str, List[str]] = {} @@ -27,7 +30,14 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: raise TypeError("security must be a pydantic model") sec_fields: Dict[str, FieldInfo] = security.__class__.model_fields - for name in sec_fields: + sec_field_names = ( + list(sec_fields.keys()) if allowed_fields is None else allowed_fields + ) + + for name in sec_field_names: + if name not in sec_fields: + continue + sec_field = sec_fields[name] value = getattr(security, name) @@ -49,6 +59,9 @@ def get_security(security: Any) -> Tuple[Dict[str, str], Dict[str, List[str]]]: else: _parse_security_scheme(headers, query_params, metadata, name, value) + if not metadata.composite: + return headers, query_params + return headers, query_params @@ -59,15 +72,24 @@ def _parse_security_option( raise TypeError("security option must be a pydantic model") opt_fields: Dict[str, FieldInfo] = option.__class__.model_fields + for name in opt_fields: opt_field = opt_fields[name] metadata = find_field_metadata(opt_field, SecurityMetadata) if metadata is None or not metadata.scheme: continue - _parse_security_scheme( - headers, query_params, metadata, name, getattr(option, name) - ) + + value = getattr(option, name) + if ( + metadata.scheme_type == "http" + and metadata.sub_type == "basic" + and not isinstance(value, BaseModel) + ): + _parse_basic_auth_scheme(headers, option) + return + + _parse_security_scheme(headers, query_params, metadata, name, value) def _parse_security_scheme( diff --git a/packages/azure/src/mistralai/azure/client/utils/serializers.py b/packages/azure/src/mistralai/azure/client/utils/serializers.py index 14321eb4..d2149f8b 100644 --- a/packages/azure/src/mistralai/azure/client/utils/serializers.py +++ b/packages/azure/src/mistralai/azure/client/utils/serializers.py @@ -17,8 +17,7 @@ def serialize_decimal(as_str: bool): def serialize(d): - # Optional[T] is a Union[T, None] - if is_union(type(d)) and type(None) in get_args(type(d)) and d is None: + if d is None: return None if isinstance(d, Unset): return d @@ -46,8 +45,7 @@ def validate_decimal(d): def serialize_float(as_str: bool): def serialize(f): - # Optional[T] is a Union[T, None] - if is_union(type(f)) and type(None) in get_args(type(f)) and f is None: + if f is None: return None if isinstance(f, Unset): return f @@ -75,8 +73,7 @@ def validate_float(f): def serialize_int(as_str: bool): def serialize(i): - # Optional[T] is a Union[T, None] - if is_union(type(i)) and type(None) in get_args(type(i)) and i is None: + if i is None: return None if isinstance(i, Unset): return i @@ -104,8 +101,7 @@ def validate_int(b): def validate_const(v): def validate(c): - # Optional[T] is a Union[T, None] - if is_union(type(c)) and type(None) in get_args(type(c)) and c is None: + if c is None: return None if v != c: diff --git a/packages/azure/uv.lock b/packages/azure/uv.lock index ac8a5de9..4fd77081 100644 --- a/packages/azure/uv.lock +++ b/packages/azure/uv.lock @@ -7,6 +7,10 @@ resolution-markers = [ "python_full_version < '3.11'", ] +[options] +exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values. +exclude-newer-span = "P7D" + [[package]] name = "annotated-types" version = "0.7.0" @@ -154,7 +158,7 @@ wheels = [ [[package]] name = "mistralai-azure" -version = "2.0.0" +version = "2.1.0" source = { editable = "." } dependencies = [ { name = "httpcore" }, diff --git a/tests/test_azure_v2_parity.py b/tests/test_azure_v2_parity.py index 8cd89bf4..1c2c6ab1 100644 --- a/tests/test_azure_v2_parity.py +++ b/tests/test_azure_v2_parity.py @@ -50,17 +50,17 @@ def mark_tested(resource: str, method: str) -> None: ("messages", _EMPTY), ("model", "azureai"), ("temperature", UNSET), - ("top_p", None), + ("top_p", UNSET), ("max_tokens", UNSET), ("stream", False), - ("stop", None), + ("stop", UNSET), ("random_seed", UNSET), ("metadata", UNSET), ("response_format", None), ("tools", UNSET), ("tool_choice", None), - ("presence_penalty", None), - ("frequency_penalty", None), + ("presence_penalty", UNSET), + ("frequency_penalty", UNSET), ("n", UNSET), ("prediction", None), ("parallel_tool_calls", None), @@ -80,7 +80,6 @@ def mark_tested(resource: str, method: str) -> None: OCR_PROCESS_PARAMS = [ ("model", _EMPTY), ("document", _EMPTY), - ("id", None), ("pages", UNSET), ("include_image_base64", UNSET), ("image_limit", UNSET), From 091c57f8fcaec722b227cbabb75b43f93245c8d9 Mon Sep 17 00:00:00 2001 From: maiengineering Date: Fri, 22 May 2026 18:11:27 +0200 Subject: [PATCH 82/82] =?UTF-8?q?chore:=20=F0=9F=90=9D=20Update=20SDK=20-?= =?UTF-8?q?=20Generate=20MISTRALAI=20MISTRALAI-SDK=20[speakeasy/mistralai-?= =?UTF-8?q?sdk-26292816554-1]=202.4.7=20(#550)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.763.6 * chore: align pyproject.toml and uv.lock to version 2.4.7 * fix: use is_error_status_code callable in workflow helper The regenerated SDK changed BaseSDK.do_request_async signature from error_status_codes (List[str]) to is_error_status_code (Callable[[int], bool]). Update the workflow helper to use the new callable form. --------- Co-authored-by: speakeasybot --- .speakeasy/gen.lock | 1184 ++++++++++---- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 11 +- README.md | 21 +- RELEASES.md | 12 +- docs/models/authenticationconfiguration.md | 1 + docs/models/clientcapabilities.md | 15 + docs/models/clienttaskscapability.md | 13 + docs/models/clienttasksrequestscapability.md | 12 + docs/models/connectionconfigtype.md | 19 + ...inetoolmeta.md => connectionpreference.md} | 10 +- docs/models/connector.md | 37 +- ...nnectoractivatefororganizationv1request.md | 9 + .../connectoractivateforuserv1request.md | 9 + .../connectoractivateforworkspacev1request.md | 9 + ...ectordeactivatefororganizationv1request.md | 8 + .../connectordeactivateforuserv1request.md | 8 + ...onnectordeactivateforworkspacev1request.md | 8 + docs/models/connectorgetv1request.md | 2 +- docs/models/connectorlocale.md | 10 + .../{tooltype.md => connectorprotocol.md} | 13 +- docs/models/connectorsqueryfilters.md | 3 +- docs/models/consumertype.md | 20 + docs/models/createconnectorrequest.md | 1 + docs/models/createlibraryrequest.md | 2 +- docs/models/createsearchindexinforequest.md | 11 + .../createsearchindexinforequestindex.md | 11 + .../createsearchindexinforequeststatus.md | 14 + docs/models/createvespaschemarequest.md | 9 + .../createvespasearchindexinforequest.md | 12 + docs/models/document.md | 45 +- docs/models/elicitationcapability.md | 14 + docs/models/encryptedpatchvalue.md | 16 + docs/models/expression.md | 23 + ...schedulesv1workflowsschedulesgetrequest.md | 12 + ...chedulesv1workflowsschedulesgetresponse.md | 8 + ...tschedulesv1workflowsschedulesgetstatus.md | 16 + ...1workflowsschedulesscheduleidgetrequest.md | 8 + docs/models/jsonpatchappend.md | 2 +- docs/models/jsonpatchappendvalue.md | 19 + .../models/librariesdocumentslistv1request.md | 18 +- .../librariesdocumentspatchv1request.md | 10 + docs/models/librarieslistv1request.md | 12 +- docs/models/librariespatchv1request.md | 9 + docs/models/library.md | 36 +- docs/models/logicalexpression.md | 9 + ...visibility.md => logicalexpressiontype.md} | 10 +- docs/models/mcpprompt.md | 14 + docs/models/mcpresource.md | 17 + .../mcpserverauthenticationrequirement.md | 11 + docs/models/mcpservercard.md | 23 + docs/models/mcpservercardmeta.md | 13 + docs/models/mcpserverremote.md | 14 + docs/models/mcpserverremoteheader.md | 15 + docs/models/mcpserverremotetype.md | 20 + docs/models/mcpserverrepository.md | 12 + docs/models/mcptoolmeta.md | 15 +- docs/models/mcpuitoolmeta.md | 12 - docs/models/partialscheduledefinition.md | 23 + docs/models/processingstatus.md | 10 +- docs/models/promptargument.md | 13 + docs/models/prompts.md | 17 + docs/models/promptscapability.md | 11 + docs/models/publicconnectionconfig.md | 11 + docs/models/requiresconfirmation.md | 23 + docs/models/resources.md | 17 + docs/models/resourcescapability.md | 12 + docs/models/resourcetype.md | 20 + docs/models/rootscapability.md | 11 + docs/models/samplingcapability.md | 12 + docs/models/scheduledefinition.md | 4 +- docs/models/searchindexresponse.md | 15 + docs/models/searchindexresponseindex.md | 11 + docs/models/searchindexresponsestatus.md | 18 + docs/models/servercapabilities.md | 17 + .../{turbinetoollocale.md => serverlocale.md} | 2 +- docs/models/servertaskscapability.md | 13 + docs/models/servertasksrequestscapability.md | 11 + docs/models/sharing.md | 16 +- docs/models/sharingdelete.md | 10 +- docs/models/sharingrequest.md | 12 +- docs/models/skipconfirmation.md | 23 + docs/models/taskselicitationcapability.md | 11 + docs/models/taskssamplingcapability.md | 11 + docs/models/taskstoolscapability.md | 11 + docs/models/toolexecutionconfiguration.md | 11 + docs/models/toolproperties.md | 8 + docs/models/tools.md | 17 + docs/models/toolscapability.md | 11 + docs/models/turbinemeta.md | 9 + docs/models/updateconnectorrequest.md | 25 +- docs/models/updatedocumentrequest.md | 9 +- ...orkflowsschedulesscheduleidpatchrequest.md | 9 + docs/models/vespaschemaresponse.md | 9 + docs/models/vespasearchindexinforesponse.md | 12 + docs/models/voiceappearance.md | 11 + docs/models/voicecreaterequest.md | 26 +- docs/models/voiceresponse.md | 28 +- docs/models/voiceupdaterequest.md | 16 +- docs/models/workflowbulkarchiverequest.md | 8 + docs/models/workflowbulkarchiveresponse.md | 9 + docs/models/workflowbulkerror.md | 10 + docs/models/workflowbulkunarchiverequest.md | 8 + docs/models/workflowbulkunarchiveresponse.md | 9 + docs/models/workflowschedulelistresponse.md | 3 +- docs/models/workflowscheduleupdaterequest.md | 8 + docs/sdks/accesses/README.md | 30 +- docs/sdks/connectors/README.md | 297 +++- docs/sdks/documents/README.md | 85 +- docs/sdks/libraries/README.md | 66 +- docs/sdks/schedules/README.md | 111 +- docs/sdks/searchindexes/README.md | 97 ++ docs/sdks/voices/README.md | 48 +- docs/sdks/workflows/README.md | 84 + pyproject.toml | 2 +- src/mistralai/client/_version.py | 6 +- src/mistralai/client/accesses.py | 16 +- src/mistralai/client/agents.py | 8 +- src/mistralai/client/basesdk.py | 71 +- src/mistralai/client/batch_jobs.py | 20 +- src/mistralai/client/beta_agents.py | 44 +- src/mistralai/client/campaigns.py | 24 +- src/mistralai/client/chat.py | 8 +- .../client/chat_completion_events.py | 20 +- src/mistralai/client/classifiers.py | 16 +- src/mistralai/client/connectors.py | 1380 ++++++++++++++++- src/mistralai/client/conversations.py | 44 +- src/mistralai/client/datasets.py | 60 +- src/mistralai/client/deployments.py | 8 +- src/mistralai/client/documents.py | 292 +++- src/mistralai/client/embeddings.py | 4 +- src/mistralai/client/events.py | 8 +- src/mistralai/client/executions.py | 56 +- src/mistralai/client/fields.py | 12 +- src/mistralai/client/files.py | 24 +- src/mistralai/client/fim.py | 8 +- src/mistralai/client/fine_tuning_jobs.py | 20 +- .../ingestion_pipeline_configurations.py | 12 +- src/mistralai/client/judges.py | 24 +- src/mistralai/client/libraries.py | 253 ++- src/mistralai/client/metrics.py | 4 +- src/mistralai/client/models/__init__.py | 515 +++++- .../models/authenticationconfiguration.py | 4 + .../client/models/clientcapabilities.py | 88 ++ .../client/models/clienttaskscapability.py | 78 + .../models/clienttasksrequestscapability.py | 79 + .../client/models/connectionconfigtype.py | 16 + ...inetoolmeta.py => connectionpreference.py} | 33 +- src/mistralai/client/models/connector.py | 121 +- ...onnector_activate_for_organization_v1op.py | 61 + .../connector_activate_for_user_v1op.py | 61 + .../connector_activate_for_workspace_v1op.py | 61 + ...nector_deactivate_for_organization_v1op.py | 17 + .../connector_deactivate_for_user_v1op.py | 17 + ...connector_deactivate_for_workspace_v1op.py | 17 + .../client/models/connector_get_v1op.py | 14 +- .../client/models/connectorlocale.py | 21 + .../{tooltype.py => connectorprotocol.py} | 11 +- .../client/models/connectorsqueryfilters.py | 10 +- src/mistralai/client/models/consumertype.py | 17 + .../client/models/createconnectorrequest.py | 29 +- .../client/models/createlibraryrequest.py | 10 +- .../models/createsearchindexinforequest.py | 72 + .../client/models/createvespaschemarequest.py | 49 + .../createvespasearchindexinforequest.py | 43 + src/mistralai/client/models/document.py | 38 +- .../client/models/elicitationcapability.py | 77 + .../client/models/encryptedpatchvalue.py | 48 + src/mistralai/client/models/filtergroup.py | 16 +- ...1_workflows_schedules_schedule_id_getop.py | 17 + ..._schedules_v1_workflows_schedules_getop.py | 113 ++ .../client/models/jsonpatchappend.py | 25 +- .../models/libraries_documents_list_v1op.py | 6 + .../models/libraries_documents_patch_v1op.py | 29 + .../client/models/libraries_list_v1op.py | 8 +- .../client/models/libraries_patch_v1op.py | 24 + src/mistralai/client/models/library.py | 42 +- .../client/models/logicalexpression.py | 39 + src/mistralai/client/models/mcpprompt.py | 89 ++ src/mistralai/client/models/mcpresource.py | 120 ++ .../mcpserverauthenticationrequirement.py | 43 + src/mistralai/client/models/mcpservercard.py | 188 +++ ...{mcpuitoolmeta.py => mcpservercardmeta.py} | 40 +- .../client/models/mcpserverremote.py | 96 ++ .../client/models/mcpserverremoteheader.py | 81 + .../client/models/mcpserverrepository.py | 60 + src/mistralai/client/models/mcptoolmeta.py | 74 +- .../models/partialscheduledefinition.py | 139 ++ .../client/models/processingstatus.py | 10 +- src/mistralai/client/models/promptargument.py | 74 + .../client/models/promptscapability.py | 76 + .../client/models/publicconnectionconfig.py | 57 + .../client/models/resourcescapability.py | 79 + src/mistralai/client/models/resourcetype.py | 17 + .../client/models/rootscapability.py | 76 + .../client/models/samplingcapability.py | 71 + .../client/models/scheduledefinition.py | 14 +- .../client/models/searchindexresponse.py | 72 + .../client/models/servercapabilities.py | 110 ++ .../{turbinetoollocale.py => serverlocale.py} | 6 +- .../client/models/servertaskscapability.py | 78 + .../models/servertasksrequestscapability.py | 69 + src/mistralai/client/models/sharing.py | 17 +- src/mistralai/client/models/sharingdelete.py | 10 +- src/mistralai/client/models/sharingrequest.py | 10 +- .../models/taskselicitationcapability.py | 68 + .../client/models/taskssamplingcapability.py | 76 + .../client/models/taskstoolscapability.py | 68 + .../models/toolexecutionconfiguration.py | 84 + src/mistralai/client/models/toolproperties.py | 29 + .../client/models/toolscapability.py | 76 + src/mistralai/client/models/turbinemeta.py | 50 + ...workflows_schedules_schedule_id_patchop.py | 27 + .../client/models/updateconnectorrequest.py | 8 + .../client/models/updatedocumentrequest.py | 9 +- .../client/models/vespaschemaresponse.py | 32 + .../models/vespasearchindexinforesponse.py | 40 + .../client/models/voiceappearance.py | 59 + .../client/models/voicecreaterequest.py | 20 +- src/mistralai/client/models/voiceresponse.py | 32 +- .../client/models/voiceupdaterequest.py | 15 +- .../models/workflowbulkarchiverequest.py | 17 + .../models/workflowbulkarchiveresponse.py | 41 + .../client/models/workflowbulkerror.py | 59 + .../models/workflowbulkunarchiverequest.py | 17 + .../models/workflowbulkunarchiveresponse.py | 41 + .../models/workflowschedulelistresponse.py | 41 +- .../models/workflowscheduleupdaterequest.py | 28 + src/mistralai/client/models_.py | 24 +- src/mistralai/client/ocr.py | 4 +- src/mistralai/client/rag.py | 5 + src/mistralai/client/records.py | 24 +- src/mistralai/client/runs.py | 20 +- src/mistralai/client/schedules.py | 566 ++++++- src/mistralai/client/sdk.py | 4 +- src/mistralai/client/search_indexes.py | 384 +++++ src/mistralai/client/speech.py | 4 +- src/mistralai/client/transcriptions.py | 8 +- src/mistralai/client/voices.py | 66 +- src/mistralai/client/workflows.py | 424 ++++- src/mistralai/client/workflows_events.py | 8 +- src/mistralai/extra/workflows/helpers.py | 2 +- uv.lock | 6 +- 243 files changed, 10850 insertions(+), 1150 deletions(-) create mode 100644 docs/models/clientcapabilities.md create mode 100644 docs/models/clienttaskscapability.md create mode 100644 docs/models/clienttasksrequestscapability.md create mode 100644 docs/models/connectionconfigtype.md rename docs/models/{turbinetoolmeta.md => connectionpreference.md} (65%) create mode 100644 docs/models/connectoractivatefororganizationv1request.md create mode 100644 docs/models/connectoractivateforuserv1request.md create mode 100644 docs/models/connectoractivateforworkspacev1request.md create mode 100644 docs/models/connectordeactivatefororganizationv1request.md create mode 100644 docs/models/connectordeactivateforuserv1request.md create mode 100644 docs/models/connectordeactivateforworkspacev1request.md create mode 100644 docs/models/connectorlocale.md rename docs/models/{tooltype.md => connectorprotocol.md} (56%) create mode 100644 docs/models/consumertype.md create mode 100644 docs/models/createsearchindexinforequest.md create mode 100644 docs/models/createsearchindexinforequestindex.md create mode 100644 docs/models/createsearchindexinforequeststatus.md create mode 100644 docs/models/createvespaschemarequest.md create mode 100644 docs/models/createvespasearchindexinforequest.md create mode 100644 docs/models/elicitationcapability.md create mode 100644 docs/models/encryptedpatchvalue.md create mode 100644 docs/models/expression.md create mode 100644 docs/models/getschedulesv1workflowsschedulesgetrequest.md create mode 100644 docs/models/getschedulesv1workflowsschedulesgetresponse.md create mode 100644 docs/models/getschedulesv1workflowsschedulesgetstatus.md create mode 100644 docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md create mode 100644 docs/models/jsonpatchappendvalue.md create mode 100644 docs/models/librariesdocumentspatchv1request.md create mode 100644 docs/models/librariespatchv1request.md create mode 100644 docs/models/logicalexpression.md rename docs/models/{visibility.md => logicalexpressiontype.md} (56%) create mode 100644 docs/models/mcpprompt.md create mode 100644 docs/models/mcpresource.md create mode 100644 docs/models/mcpserverauthenticationrequirement.md create mode 100644 docs/models/mcpservercard.md create mode 100644 docs/models/mcpservercardmeta.md create mode 100644 docs/models/mcpserverremote.md create mode 100644 docs/models/mcpserverremoteheader.md create mode 100644 docs/models/mcpserverremotetype.md create mode 100644 docs/models/mcpserverrepository.md delete mode 100644 docs/models/mcpuitoolmeta.md create mode 100644 docs/models/partialscheduledefinition.md create mode 100644 docs/models/promptargument.md create mode 100644 docs/models/prompts.md create mode 100644 docs/models/promptscapability.md create mode 100644 docs/models/publicconnectionconfig.md create mode 100644 docs/models/requiresconfirmation.md create mode 100644 docs/models/resources.md create mode 100644 docs/models/resourcescapability.md create mode 100644 docs/models/resourcetype.md create mode 100644 docs/models/rootscapability.md create mode 100644 docs/models/samplingcapability.md create mode 100644 docs/models/searchindexresponse.md create mode 100644 docs/models/searchindexresponseindex.md create mode 100644 docs/models/searchindexresponsestatus.md create mode 100644 docs/models/servercapabilities.md rename docs/models/{turbinetoollocale.md => serverlocale.md} (97%) create mode 100644 docs/models/servertaskscapability.md create mode 100644 docs/models/servertasksrequestscapability.md create mode 100644 docs/models/skipconfirmation.md create mode 100644 docs/models/taskselicitationcapability.md create mode 100644 docs/models/taskssamplingcapability.md create mode 100644 docs/models/taskstoolscapability.md create mode 100644 docs/models/toolexecutionconfiguration.md create mode 100644 docs/models/toolproperties.md create mode 100644 docs/models/tools.md create mode 100644 docs/models/toolscapability.md create mode 100644 docs/models/turbinemeta.md create mode 100644 docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md create mode 100644 docs/models/vespaschemaresponse.md create mode 100644 docs/models/vespasearchindexinforesponse.md create mode 100644 docs/models/voiceappearance.md create mode 100644 docs/models/workflowbulkarchiverequest.md create mode 100644 docs/models/workflowbulkarchiveresponse.md create mode 100644 docs/models/workflowbulkerror.md create mode 100644 docs/models/workflowbulkunarchiverequest.md create mode 100644 docs/models/workflowbulkunarchiveresponse.md create mode 100644 docs/models/workflowscheduleupdaterequest.md create mode 100644 docs/sdks/searchindexes/README.md create mode 100644 src/mistralai/client/models/clientcapabilities.py create mode 100644 src/mistralai/client/models/clienttaskscapability.py create mode 100644 src/mistralai/client/models/clienttasksrequestscapability.py create mode 100644 src/mistralai/client/models/connectionconfigtype.py rename src/mistralai/client/models/{turbinetoolmeta.py => connectionpreference.py} (56%) create mode 100644 src/mistralai/client/models/connector_activate_for_organization_v1op.py create mode 100644 src/mistralai/client/models/connector_activate_for_user_v1op.py create mode 100644 src/mistralai/client/models/connector_activate_for_workspace_v1op.py create mode 100644 src/mistralai/client/models/connector_deactivate_for_organization_v1op.py create mode 100644 src/mistralai/client/models/connector_deactivate_for_user_v1op.py create mode 100644 src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py create mode 100644 src/mistralai/client/models/connectorlocale.py rename src/mistralai/client/models/{tooltype.py => connectorprotocol.py} (67%) create mode 100644 src/mistralai/client/models/consumertype.py create mode 100644 src/mistralai/client/models/createsearchindexinforequest.py create mode 100644 src/mistralai/client/models/createvespaschemarequest.py create mode 100644 src/mistralai/client/models/createvespasearchindexinforequest.py create mode 100644 src/mistralai/client/models/elicitationcapability.py create mode 100644 src/mistralai/client/models/encryptedpatchvalue.py create mode 100644 src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py create mode 100644 src/mistralai/client/models/get_schedules_v1_workflows_schedules_getop.py create mode 100644 src/mistralai/client/models/libraries_documents_patch_v1op.py create mode 100644 src/mistralai/client/models/libraries_patch_v1op.py create mode 100644 src/mistralai/client/models/logicalexpression.py create mode 100644 src/mistralai/client/models/mcpprompt.py create mode 100644 src/mistralai/client/models/mcpresource.py create mode 100644 src/mistralai/client/models/mcpserverauthenticationrequirement.py create mode 100644 src/mistralai/client/models/mcpservercard.py rename src/mistralai/client/models/{mcpuitoolmeta.py => mcpservercardmeta.py} (67%) create mode 100644 src/mistralai/client/models/mcpserverremote.py create mode 100644 src/mistralai/client/models/mcpserverremoteheader.py create mode 100644 src/mistralai/client/models/mcpserverrepository.py create mode 100644 src/mistralai/client/models/partialscheduledefinition.py create mode 100644 src/mistralai/client/models/promptargument.py create mode 100644 src/mistralai/client/models/promptscapability.py create mode 100644 src/mistralai/client/models/publicconnectionconfig.py create mode 100644 src/mistralai/client/models/resourcescapability.py create mode 100644 src/mistralai/client/models/resourcetype.py create mode 100644 src/mistralai/client/models/rootscapability.py create mode 100644 src/mistralai/client/models/samplingcapability.py create mode 100644 src/mistralai/client/models/searchindexresponse.py create mode 100644 src/mistralai/client/models/servercapabilities.py rename src/mistralai/client/models/{turbinetoollocale.py => serverlocale.py} (95%) create mode 100644 src/mistralai/client/models/servertaskscapability.py create mode 100644 src/mistralai/client/models/servertasksrequestscapability.py create mode 100644 src/mistralai/client/models/taskselicitationcapability.py create mode 100644 src/mistralai/client/models/taskssamplingcapability.py create mode 100644 src/mistralai/client/models/taskstoolscapability.py create mode 100644 src/mistralai/client/models/toolexecutionconfiguration.py create mode 100644 src/mistralai/client/models/toolproperties.py create mode 100644 src/mistralai/client/models/toolscapability.py create mode 100644 src/mistralai/client/models/turbinemeta.py create mode 100644 src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py create mode 100644 src/mistralai/client/models/vespaschemaresponse.py create mode 100644 src/mistralai/client/models/vespasearchindexinforesponse.py create mode 100644 src/mistralai/client/models/voiceappearance.py create mode 100644 src/mistralai/client/models/workflowbulkarchiverequest.py create mode 100644 src/mistralai/client/models/workflowbulkarchiveresponse.py create mode 100644 src/mistralai/client/models/workflowbulkerror.py create mode 100644 src/mistralai/client/models/workflowbulkunarchiverequest.py create mode 100644 src/mistralai/client/models/workflowbulkunarchiveresponse.py create mode 100644 src/mistralai/client/models/workflowscheduleupdaterequest.py create mode 100644 src/mistralai/client/search_indexes.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5587955b..2b90cdb5 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: a0fa9ebdce4c9ca7549f9dce826a2169 + docChecksum: 96c7f58782c479be9d01e672f4e1896e docVersion: 1.0.0 - speakeasyVersion: 1.761.1 - generationVersion: 2.879.6 - releaseVersion: 2.4.5 - configChecksum: f6852fb59e3bcc9a7750210521f2c2d4 + speakeasyVersion: 1.763.6 + generationVersion: 2.884.13 + releaseVersion: 2.4.7 + configChecksum: c43f0f203b291067c934034351c7f55b repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: bcab0c88-1877-4209-a77d-49b4681f030e - pristine_commit_hash: 56d30233849b5a3cb3d207e646ee849c77835f70 - pristine_tree_hash: 3feb3429dfead0d0228262509f23a6c5e9c9c7a2 + generation_id: 20a111e0-4460-4e9f-a244-c024f0db9cd1 + pristine_commit_hash: 8b079c23ee4d603974156f6cf7568878c39a4cb9 + pristine_tree_hash: c20b64fba0f8471688502f9d39a78f2b6c60eeb8 features: python: acceptHeaders: 3.0.0 @@ -21,15 +21,15 @@ features: additionalProperties: 1.0.1 configurableModuleName: 0.2.0 constsAndDefaults: 1.0.7 - core: 6.0.21 - customCodeRegions: 0.1.1 + core: 6.0.22 + customCodeRegions: 0.1.2 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 downloadStreams: 1.0.1 enumUnions: 0.1.1 - envVarSecurityUsage: 0.3.2 - errors: 3.3.5 - examples: 3.0.3 + envVarSecurityUsage: 0.3.3 + errors: 3.3.6 + examples: 3.0.4 flatRequests: 1.0.1 flattening: 3.1.1 globalSecurity: 3.0.7 @@ -43,14 +43,14 @@ features: nullables: 1.0.2 openEnums: 1.0.4 operationTimeout: 0.3.1 - pagination: 3.0.9 + pagination: 3.0.10 responseFormat: 1.1.0 - retries: 3.0.4 + retries: 3.0.5 sdkHooks: 1.2.1 serverEvents: 1.0.15 serverEventsSentinels: 0.1.0 serverIDs: 3.0.0 - unions: 3.1.4 + unions: 3.1.5 uploadStreams: 1.0.0 trackedFiles: .gitattributes: @@ -64,7 +64,7 @@ trackedFiles: deleted: true USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:d172deb3ee1630f16b279de22aec1f8f68d7565f + last_write_checksum: sha1:a301895a264e69dc11007de5f8c7c2e675cbdf5b pristine_git_object: 9d32240a60c8885479c95388bb81c8024b5604ff docs/errors/httpvalidationerror.md: id: 7fe2e5327e07 @@ -340,8 +340,8 @@ trackedFiles: pristine_git_object: d0784e66112b8f79036d1acff2a7fc242058e4a0 docs/models/authenticationconfiguration.md: id: b470496ac0ad - last_write_checksum: sha1:650e1e889d037f79a87c8ab0a679e245c2ddbb4b - pristine_git_object: 6644875efdc48b462a98193b391dc23e1f31b2c3 + last_write_checksum: sha1:0ea76a9e5fb98d46a27be52d95a0195fa9ee2df0 + pristine_git_object: cdd1e55fed41e8bc8914e90f912d9cc4a04920f1 docs/models/authorization.md: id: dec4d9809e25 last_write_checksum: sha1:6bf766a7b49ca2b706bb4eb88ba2d56406e06e1e @@ -440,7 +440,7 @@ trackedFiles: pristine_git_object: 5bcec6a085b8fe921efb44ab5f040faf99cff7a3 docs/models/chatcompletionrequest.md: id: adffe90369d0 - last_write_checksum: sha1:3e240059856e4445d9b76934806b172021174889 + last_write_checksum: sha1:09207e72df2645b7923b375778ddc7273e44af07 pristine_git_object: ad1b3d3912f04750172ebb0c5776215b716b96f9 docs/models/chatcompletionrequestmessage.md: id: 3f5e170d418c @@ -464,7 +464,7 @@ trackedFiles: pristine_git_object: a0465ffbfc5558628953e03fbc53b80bbdc8649b docs/models/chatcompletionstreamrequest.md: id: cf8f29558a68 - last_write_checksum: sha1:0d243eb67aa8e905e88463d9b745bda2030d415c + last_write_checksum: sha1:c93c7401cedf4030f38002cef2c89515a6441d64 pristine_git_object: 7288c818d03f0c672d99a2c61ea19cce4fd39654 docs/models/chatcompletionstreamrequestmessage.md: id: 053a98476cd2 @@ -562,6 +562,18 @@ trackedFiles: id: 9370e1ccd3d5 last_write_checksum: sha1:31a490471292a397e7e7526f2f724fcb743e65d1 pristine_git_object: 6c6da1bd74aa8c67cc40307a88ffac1db1957f3a + docs/models/clientcapabilities.md: + id: e1f291b21fc8 + last_write_checksum: sha1:4647f66510f48e7c2199a8c3c50f7e664fbbb485 + pristine_git_object: 236bb0c43de9d7de80cc85e48b1f1fe9b13daaec + docs/models/clienttaskscapability.md: + id: addb004fe61a + last_write_checksum: sha1:0e28bfef73308db54d12e8ce6e6f4a82a8513990 + pristine_git_object: 9008ba6146d9d870f151453b4fa8dc007177b1b4 + docs/models/clienttasksrequestscapability.md: + id: ee000ce4eb5e + last_write_checksum: sha1:1bf8b73e26543deb358fd8b3395858d902312953 + pristine_git_object: 8dac48a4c3041a3c7c84fe0edecde794a81ebbb6 docs/models/codeinterpretertool.md: id: f009740c6e54 last_write_checksum: sha1:a2114d61a98a48b4365a77c0c75c06ca834367ad @@ -638,14 +650,34 @@ trackedFiles: id: 19b9e48a3c2e last_write_checksum: sha1:6e199c756ce35e2bff3b67df5d97b4520518b271 pristine_git_object: c87093846ca27940a08318fb090c60ce56a00651 + docs/models/connectionconfigtype.md: + id: 3b346ef828ff + last_write_checksum: sha1:e3077c8da9145cce4b4b92688308c97aa9a05a19 + pristine_git_object: 8db3ea6401a0ff1ee19824726704ec21c3953b85 docs/models/connectioncredentials.md: id: 1aa13b29ae25 last_write_checksum: sha1:1fbc7ca6daa21f093853cda8385fd63b031bb653 pristine_git_object: 7e89239996c86952aa3ddf7520c0a73858b31725 + docs/models/connectionpreference.md: + id: be469697273b + last_write_checksum: sha1:f59d85167c69837a67f05e190a8efdd2feaa723f + pristine_git_object: e069233ff9f42a6b13e356985e3bc3819128b970 docs/models/connector.md: id: cbf7c2c53983 - last_write_checksum: sha1:933fcdfbded00c65d36e46d6b2e18e56540802fe - pristine_git_object: 29f8ad0771bf8da6999345b78322001c3821a6ca + last_write_checksum: sha1:7694fec24017b429b23d5b42f29a2d66d6f8aa50 + pristine_git_object: 45aafa1e2d539276d23688d6b36c503650ecb454 + docs/models/connectoractivatefororganizationv1request.md: + id: 3a15b69f7e51 + last_write_checksum: sha1:ae29bb24fdf11ccf8c08e2a1a2909d55d4cbaf6c + pristine_git_object: 40469996995ac4e446584780ac77981a0a5c67bc + docs/models/connectoractivateforuserv1request.md: + id: a4645ace44a1 + last_write_checksum: sha1:c4302c00ee924529d626c75ecb9374b416bcb028 + pristine_git_object: bdf73b8aca4293b69ef96f3c72f0acbf5d7546b7 + docs/models/connectoractivateforworkspacev1request.md: + id: da9da37e67ba + last_write_checksum: sha1:c7b677341c095afaac4adaeacd9e7337307e3174 + pristine_git_object: e4dbaf1dbf5632919eb3cc8fac7aa67ceee01e1c docs/models/connectorauthenticationheader.md: id: bb5e842caa63 last_write_checksum: sha1:7c721f916ed1ce2d4155734bb8190e11de6bf4ac @@ -670,6 +702,18 @@ trackedFiles: id: 10c159720bae last_write_checksum: sha1:e86b1952360e4f41550603b9dc16fddeff6127e7 pristine_git_object: 310cdcde0039e9fdb4faa53644265a6a614d9b20 + docs/models/connectordeactivatefororganizationv1request.md: + id: c4310041f3ab + last_write_checksum: sha1:a1ae31f8e5b836d9300ff4e64ecc2a11c9db7a7f + pristine_git_object: 1fd64004b3bd61e1ff3f789566bc3e587f2e2cf8 + docs/models/connectordeactivateforuserv1request.md: + id: 72bcb9fcabe5 + last_write_checksum: sha1:02be33e6a0ed87d60d7e8130c80e85426b2f1db7 + pristine_git_object: 992603b0f86d60714acded1498c661d170b0e40a + docs/models/connectordeactivateforworkspacev1request.md: + id: 42c92923f1ae + last_write_checksum: sha1:f4f8dbfde3ca68ae68028ddce150dc9761bf3a24 + pristine_git_object: 15033f293dcbb35daef48119419bedd779d8f06a docs/models/connectordeleteorganizationcredentialsv1request.md: id: 922f5267f2c0 last_write_checksum: sha1:23af2d809a20c093ece79bcd1e6ebc551be4b368 @@ -696,8 +740,8 @@ trackedFiles: pristine_git_object: 7d6b94ff09be0d4bf2f062fa039551ab0735fc13 docs/models/connectorgetv1request.md: id: 844c1f489684 - last_write_checksum: sha1:e36ac8ff28ee258340868f8aa4f3172ed3b82ef3 - pristine_git_object: c45148b97aad128744e0e6ccebb00bf22d400eff + last_write_checksum: sha1:446e9132766caec5d1ab49c2654696c571deef53 + pristine_git_object: 35a6f39334ffa87c7ada3ce89e7fe7b9ee612d3d docs/models/connectorlistorganizationcredentialsv1request.md: id: cc1870566c72 last_write_checksum: sha1:633bb13df6fa25f746a9aa905da3f3beb75ff91a @@ -718,10 +762,18 @@ trackedFiles: id: c7f5827917c6 last_write_checksum: sha1:dfe772567d14a0552eec2e53ebf9c1ed6c39ab3e pristine_git_object: 573869b2483b15da829b25e1863652680deb6a36 + docs/models/connectorlocale.md: + id: fe553a89ff06 + last_write_checksum: sha1:3bddb7128d7cf99124a07054d3a6e8c90d22755b + pristine_git_object: c2e7cf5b57f2c7d764e46633eeeebb73a9329422 + docs/models/connectorprotocol.md: + id: a140d41a5740 + last_write_checksum: sha1:e856a50288aefdb1adc2c803a3a6d280b31892ed + pristine_git_object: 77d2845854756c3025aabef138c2a160758e0816 docs/models/connectorsqueryfilters.md: id: d6fb981cad1e - last_write_checksum: sha1:3a33088e1e9332318aff437fba7d01239d417d84 - pristine_git_object: aea47e14f02b61dbbd726bc11f6197b6854bb358 + last_write_checksum: sha1:01782d52446d8e7e53c72094b2ff86b6fe600ee4 + pristine_git_object: 37c19e7a9d2c4bb41a77a8c13936024c9d218d08 docs/models/connectortool.md: id: 1c640bab9aeb last_write_checksum: sha1:ab4ad137330bda6699043da2337aea477c33241e @@ -750,6 +802,10 @@ trackedFiles: id: fdbeb5fee83e last_write_checksum: sha1:9082d8f0cfe9f950d129971b152d37f936f7aaea pristine_git_object: db9cc9b4c4379865ad15292c5385dce864b5935b + docs/models/consumertype.md: + id: d7e5c7974261 + last_write_checksum: sha1:4012cffe5553431d50539a9e4663a935b5cb00cb + pristine_git_object: 9ac4df3f4993e81c99ddfcb91c0b32b04730da7f docs/models/contentchunk.md: id: d2d3a32080cd last_write_checksum: sha1:b253e4b802adb5b66d896bfc6245ac4d21a0c67c @@ -888,8 +944,8 @@ trackedFiles: pristine_git_object: 2e81d26d19950ef6c1bc7186b8497e1f739e8f0b docs/models/createconnectorrequest.md: id: 7a0ef9d82658 - last_write_checksum: sha1:f28eb17d562ab9b881f4c0c640f0b16163ada6dc - pristine_git_object: 111c460a711c1d971a300afda6afe4da608e6d21 + last_write_checksum: sha1:fbc8c1928dfbd1a63792caa0e790685b99643b21 + pristine_git_object: eb14f58529e50cb58388f0d8b8b0f438640d7145 docs/models/createdatasetrecordrequest.md: id: e2c8a858a8e6 last_write_checksum: sha1:6848c7398d763f7a046dbb41cda8bc33cbb98230 @@ -936,8 +992,28 @@ trackedFiles: pristine_git_object: a72676719b90a7b840a2b21d043c61bdf83ce294 docs/models/createlibraryrequest.md: id: 8935b2ed9d13 - last_write_checksum: sha1:14480a2eb03a9e5076a866a21bff0dfd80bb585d - pristine_git_object: 07ff97d0cbaf4f3e260cce4b80fcbd637cc6b488 + last_write_checksum: sha1:1bc8b8f3827425b63bf25b6662d959274f266679 + pristine_git_object: fd94c1caf6dbe31da9b0494879027cba9dbbb6c3 + docs/models/createsearchindexinforequest.md: + id: 886f7c48f467 + last_write_checksum: sha1:b36cd8692b7b93f54560de1bc1cb323e466365b1 + pristine_git_object: 64b22aa43173f98dd98cafb7e26c6b63b12a117c + docs/models/createsearchindexinforequestindex.md: + id: 846e92f3d7f2 + last_write_checksum: sha1:abb7ce51a4a6f86ab5b5e7e6cf484b4061fa7022 + pristine_git_object: 42d99fcb5ef07be40f6d7f34dd08dd56165a69ca + docs/models/createsearchindexinforequeststatus.md: + id: 79a895401c56 + last_write_checksum: sha1:8388b45338b7744a8da74f019c0552eb1172cdaa + pristine_git_object: 1e477acc2610b127f09ced4748e72d5886812b3e + docs/models/createvespaschemarequest.md: + id: 5d582f9abac3 + last_write_checksum: sha1:f760192840beb2436d5505ea2d095501956a08be + pristine_git_object: 3098a2b9dc2ca9c592fce287daae7e5b6a6ed974 + docs/models/createvespasearchindexinforequest.md: + id: a34bf5ca3f0b + last_write_checksum: sha1:562b8ae886bafa4ae587b724007ff3a6205dd20b + pristine_git_object: 0bd47c383aa7df413c1a63dfaeec09582b7bd8d6 docs/models/credentialscreateorupdate.md: id: b2a0e87b0a91 last_write_checksum: sha1:6b778120a84c08601b4f2fbba368d3454204d939 @@ -1084,8 +1160,8 @@ trackedFiles: pristine_git_object: afdcca834da74cc33711b1aa229f5ccf66eceefd docs/models/document.md: id: cd1d2a444370 - last_write_checksum: sha1:c10641b02547bedcc982b8997097083dfc562598 - pristine_git_object: 42c639a6a9b235ab4c754286486fa7e8872a0e7e + last_write_checksum: sha1:7aeb84c1a0efa2b3bf15808714405fe29b930296 + pristine_git_object: ff0238ea7afcba3ef690a303574f74744ba31ecd docs/models/documentlibrarytool.md: id: 68083b0ef8f3 last_write_checksum: sha1:76b9f47c399915a338abe929cb10c1b37282eadf @@ -1106,6 +1182,10 @@ trackedFiles: id: 48437d297408 last_write_checksum: sha1:5f9294355929d66834c52c67990ba36a7f81387d pristine_git_object: 9dbfbe5074de81b9fcf6f5bae8a0423fb2c82f71 + docs/models/elicitationcapability.md: + id: bc87da9c6248 + last_write_checksum: sha1:8654e0b4df9d2fb9cbf283b3dc519317337fe5b2 + pristine_git_object: c2f8fab6ac866c2e1f9cd4f51c1255b95a0e24b3 docs/models/embeddedresource.md: id: f7ea3888f520 last_write_checksum: sha1:8f0869b4403767c45c464cdd7b6c640994c65ab9 @@ -1138,6 +1218,10 @@ trackedFiles: id: 066e154e4d43 last_write_checksum: sha1:cc98abdb803d374146f58a6811c9e3f2b58ff5f3 pristine_git_object: 8bc9e8c6bd3fdc8bd5a28edb381c662e74c86e72 + docs/models/encryptedpatchvalue.md: + id: 8fdf9deac4d8 + last_write_checksum: sha1:e13686983658d34b32ecd1111e8c974cd1ed0944 + pristine_git_object: 1d5988b426d619813a1b34e19b2654b6a1593492 docs/models/entitytype.md: id: 130a2f7038b0 last_write_checksum: sha1:506be1dd51ec1f429246390757cbc0676677bd82 @@ -1182,6 +1266,10 @@ trackedFiles: id: 16660f92d7d1 last_write_checksum: sha1:fa22e53a929291e6b057283482ca7871fb6d2062 pristine_git_object: efe4bbb058c168ad531be27cc135f09464d0da13 + docs/models/expression.md: + id: 84d49a7056b1 + last_write_checksum: sha1:8f871b9f64754b138edaabbd8f64895376694881 + pristine_git_object: d7de83a9d4fad318d2e30f7718bf9b529a367158 docs/models/failure.md: id: 3f79c7d64eac last_write_checksum: sha1:344f1cea9b786a399a0dd974d4df010714031b2a @@ -1434,6 +1522,22 @@ trackedFiles: id: ac9de7c67a5f last_write_checksum: sha1:40fa492321f18e77792d49cb9142b0293be7ffe3 pristine_git_object: 6b03369064e2bb2fedffa606d8bff20d9fceae00 + docs/models/getschedulesv1workflowsschedulesgetrequest.md: + id: ee97a7eb1a05 + last_write_checksum: sha1:07207cb74124d3e2085d26c5c609f0bef3b6ad54 + pristine_git_object: d510c27db9c7b0b495a578c0caee3428a3794e1a + docs/models/getschedulesv1workflowsschedulesgetresponse.md: + id: b6b4b4eebe6e + last_write_checksum: sha1:07a546ef6090188411e55380341fa6fc6377c752 + pristine_git_object: 20adb3c0077a2a281efa4f44701eb6572f61760a + docs/models/getschedulesv1workflowsschedulesgetstatus.md: + id: a6a5de21aca0 + last_write_checksum: sha1:62ce31cbd6d3ad06ee26ad32def445ed6b2dad89 + pristine_git_object: 312db2cd5d8796e2b899a9fd5dac38841e1b0383 + docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md: + id: 52b58a6705e8 + last_write_checksum: sha1:d4af59b2276baf70a151680d2276c71a6944fe43 + pristine_git_object: e681e674a011fcd31373c4885c862717a04a6b6f docs/models/getsignedurlresponse.md: id: 5539e5d7c3d4 last_write_checksum: sha1:7198474f48bfba6d47326cd436e4a00a8ba70ce3 @@ -1664,8 +1768,12 @@ trackedFiles: pristine_git_object: 2a091c8ac8bfb57bfada1ce173c75543c9431fd0 docs/models/jsonpatchappend.md: id: 5d68c9614b70 - last_write_checksum: sha1:c1d5ac89195b6712b8a4b61450450a4f9b0e910e - pristine_git_object: 684cc896b4ba80ba1bbc278e119fc9fc1dbbf924 + last_write_checksum: sha1:e6e0a45d6be613281a10b369fc686e8e0d56ff9f + pristine_git_object: 903d6c71854e89340b7508c735fe2251720cd364 + docs/models/jsonpatchappendvalue.md: + id: a822d0b58ec8 + last_write_checksum: sha1:832c839f2cb2e065c731efddf86112bb7efdb6e5 + pristine_git_object: 551cafe15bd959b9d4db9a809b9c7393ae134c65 docs/models/jsonpatchpayloadresponse.md: id: fb6daf532ebb last_write_checksum: sha1:b896fa130e63bfc0831bb8067669df89a8342314 @@ -1776,8 +1884,12 @@ trackedFiles: pristine_git_object: 6febc058425bb38857c391ee4c40d600858e6058 docs/models/librariesdocumentslistv1request.md: id: 7b5756e50d64 - last_write_checksum: sha1:2605b7972a3d7b4f73ab8052be4bf740f44f6f6f - pristine_git_object: 44f6300115853053214639982516a60b3268e778 + last_write_checksum: sha1:b01fbfcbdb622ba35e52cfd0884d75d7ef5a192b + pristine_git_object: 6149336fc296c6ff3c61e4f61f36fe4c33c8c465 + docs/models/librariesdocumentspatchv1request.md: + id: 2815453b5023 + last_write_checksum: sha1:0ded124e8b094e78b404d1a1cdc1e7b5cffef555 + pristine_git_object: 511aee46a2ed2db98101c10d69288732807b0132 docs/models/librariesdocumentsreprocessv1request.md: id: 1b8bf57b3f0a last_write_checksum: sha1:8528785c1b4ae18d6ec6f261d29d5daac0d420a3 @@ -1796,8 +1908,12 @@ trackedFiles: pristine_git_object: 6e1e04c39c15a85d96710f8d3a8ed11a22412816 docs/models/librarieslistv1request.md: id: eb6047c126d3 - last_write_checksum: sha1:7bd4a00dfe54162bd3c315ca0ab2990133969390 - pristine_git_object: 37352ee1277aa9576da968ce44b0ffda772715f7 + last_write_checksum: sha1:dd42520f540d9e5c1820d517be4e4a894475ece1 + pristine_git_object: 5efdb897a19d6ad920a031472ba88098c4f80630 + docs/models/librariespatchv1request.md: + id: a5c8a22e9d7c + last_write_checksum: sha1:fc18a3c812d877f8bd47f6a34bbc3d29e5420519 + pristine_git_object: 4764808653f0d841f87e58ca71ec9549f2c1af1f docs/models/librariessharecreatev1request.md: id: 99e7bb8f7fed last_write_checksum: sha1:f37578c7882eab83cca3cb2aaf1ac17b9a21934c @@ -1816,8 +1932,8 @@ trackedFiles: pristine_git_object: c5c142db7aaa49990135c21eabde43b8c0fdf756 docs/models/library.md: id: e8ec114dd107 - last_write_checksum: sha1:5434149d101255cb5135f8726acdcfb29c4381bd - pristine_git_object: a07d3afac18faccb504c51f1a54cf5addc3faab3 + last_write_checksum: sha1:9331e004d3587e261e9f7496525dc698db37db3f + pristine_git_object: 5b9aa658712ffad94a9c2b7f1595d1c232868870 docs/models/listbatchjobsresponse.md: id: e03025d58630 last_write_checksum: sha1:de42c9396546fc8487d0bd6ed15b4076599fa83f @@ -1918,22 +2034,62 @@ trackedFiles: id: e25e2392c4c9 last_write_checksum: sha1:647413204680efd677ce7746101b74e2ad7d59d5 pristine_git_object: 6daecdd1eb31ad2d80400b4eb9032f635f0bc889 + docs/models/logicalexpression.md: + id: f222e869e12b + last_write_checksum: sha1:cec26b10026b2245d92356fbe81cece3645de577 + pristine_git_object: 675368e79b0723713a27064cc56814c951d91616 + docs/models/logicalexpressiontype.md: + id: 61eee1af8d4c + last_write_checksum: sha1:7e78778f1a304d226f752ebb6d023654ced7866b + pristine_git_object: 0d3c1f78c1c8cc90a466d876b2d54f156d8ba7d9 + docs/models/mcpprompt.md: + id: c6eeb6a6a719 + last_write_checksum: sha1:321ce6a140536a8582632d937f498b2fd8006a7b + pristine_git_object: b68d0046a0c236a5471f03e5edb892c8dde2c2a0 + docs/models/mcpresource.md: + id: 643d9dfa9a7b + last_write_checksum: sha1:44be038071e200307677b355dfe5b54d574a6ece + pristine_git_object: ac3d92a8fbdeb583d38d7da18ed839235452219a + docs/models/mcpserverauthenticationrequirement.md: + id: 7540ae50c0bb + last_write_checksum: sha1:37c7585e48212e64bc1794f6f853b1ce5071c09e + pristine_git_object: a3824be670aba370256208b6f4f0faf95af40ece + docs/models/mcpservercard.md: + id: ff9347d08f2f + last_write_checksum: sha1:36600ab72bc9050bccc4c5999ce4add9df67526d + pristine_git_object: ebc72b07a50aef53b94c6df9e643d673368db54d + docs/models/mcpservercardmeta.md: + id: c2f4503daa2f + last_write_checksum: sha1:4ec024c2276b28ce39e7345a414726bdcddd72b4 + pristine_git_object: 52345bcfc5cdff0d1c81609a0ade92f34c27526a docs/models/mcpservericon.md: id: 0b20f03adab8 last_write_checksum: sha1:d66113a4b0486f144b1f73f423559360ec751631 pristine_git_object: b0ae7da069119f7477ffa5ad756f353f56f213f1 + docs/models/mcpserverremote.md: + id: 56a47d36028f + last_write_checksum: sha1:36df87e25d5f271cf3602e91a8b5279ddfeda66d + pristine_git_object: 1c7c4de3ccfbe7f5b1f576ae1090362bab2f1e8a + docs/models/mcpserverremoteheader.md: + id: 23d6af542948 + last_write_checksum: sha1:640a69c9758c7d3b5fbe1a1563fa80a0fe978982 + pristine_git_object: a3966a54fe6f51dff8cf85bf501ecd6c4ef47c69 + docs/models/mcpserverremotetype.md: + id: 1347827838d3 + last_write_checksum: sha1:2d1f8c2455bf84877adbcd6807ec3e06e6bb1f99 + pristine_git_object: ea4585b6aa78fb82a8abbce90caec84cee2a08d9 + docs/models/mcpserverrepository.md: + id: 5440c78d09c6 + last_write_checksum: sha1:e5979de6f7ebdeb6f3b539ea952f6c415cb9a1b5 + pristine_git_object: 16fbdd189465350a09846ab3e84699d181faffed docs/models/mcptool.md: id: f809e227a108 last_write_checksum: sha1:90833e29c750ca8452cec010f91e451ead93049c pristine_git_object: 006802b47caa662f9087357bf7fea45141b76788 docs/models/mcptoolmeta.md: id: 271159bcac6f - last_write_checksum: sha1:f88fc0a6c65c02b9fd6945a9db0b5704eed79c9e - pristine_git_object: 23e8b64c9584f1ef5f2ad56b70d5b57732159608 - docs/models/mcpuitoolmeta.md: - id: 95390caf0719 - last_write_checksum: sha1:e40fd3d493e32bb28fdb0ffc8fa7acb79acc1d30 - pristine_git_object: c09b29ad40fd96b944f7f9bf320b3a67bd587d5b + last_write_checksum: sha1:6734ae688b3c505c94d7b78753085ff18b7aab22 + pristine_git_object: 723f40b1d16eefd324872a0837aa805e1a7dc930 docs/models/messageentries.md: id: 9af3a27b862b last_write_checksum: sha1:a3eb6e37b780644313738f84e6c5ac653b4686bc @@ -2166,6 +2322,10 @@ trackedFiles: id: 592cf80526b8 last_write_checksum: sha1:e72a2238fe984cc4fa0d2522b462aa9ad247af78 pristine_git_object: 7ed17a697771f10febe2b893f092865b09dc04c7 + docs/models/partialscheduledefinition.md: + id: f5bb5dc0cf18 + last_write_checksum: sha1:a0a8d6c43c0231c0e2061de78f5b6e9e233e7c23 + pristine_git_object: e66ee671440d90abcd15860144e6826f5835110b docs/models/pauseschedulev1workflowsschedulesscheduleidpausepostrequest.md: id: 56f6ceab8262 last_write_checksum: sha1:3b5c8e341c685a7f4b2789a9d051eef54ff8cfda @@ -2200,12 +2360,24 @@ trackedFiles: pristine_git_object: fae3c1ca4ba2c2ddb3b7de401ecdc8d56dcc7740 docs/models/processingstatus.md: id: 06047222d2ff - last_write_checksum: sha1:fd2f5d605c6e5f8aa86461e8442c50db3fbea07d - pristine_git_object: 514caa50e524ae5afab802b8394cb27189b2bfbe + last_write_checksum: sha1:81a11724ad214bab81874167854e6cbcb55a6cc0 + pristine_git_object: 1d472b881d684f47ac76edff663ab5fc84581e10 docs/models/processstatus.md: id: "336054835357" last_write_checksum: sha1:43253d2ef4badf3a5e8e5981becfb558c934359a pristine_git_object: 68313743c4d926b2cb29037d0e59a2f9d8d25f1c + docs/models/promptargument.md: + id: 5e744dafa422 + last_write_checksum: sha1:4b7a10005ef27e91c191ab71e76c8ba0eff789aa + pristine_git_object: a8dfdb05a8c424e1e8eee8f44c088de33e8e733c + docs/models/prompts.md: + id: 012697edbda4 + last_write_checksum: sha1:23f02f4461cdaf64ef729ef7dc0395d40f9f5020 + pristine_git_object: 9fe855977ada9474260e8d81d3258faf17393f4b + docs/models/promptscapability.md: + id: a100a874f118 + last_write_checksum: sha1:0f3a7d98fff0ae0b7ddfaedeaa5116cad73c0115 + pristine_git_object: 50ffae2b2ae976f4b21c67eefef9ea1bb1d8fcd9 docs/models/prompttokensdetails.md: id: 1391892fce0a last_write_checksum: sha1:4a82fc483f090e4fc09d19a3f2c0f2a2e022cf3f @@ -2214,6 +2386,10 @@ trackedFiles: id: abfb51fdf794 last_write_checksum: sha1:9be30607f8c895958f33b5be25fc1b8b4cb3d328 pristine_git_object: 59de7076ce05ff71ba4bd5f22112459f4500bf4d + docs/models/publicconnectionconfig.md: + id: e05a024f162c + last_write_checksum: sha1:ab9dd73817a606e22c4d526910771158070e0e4e + pristine_git_object: 56c9ee8ea7ec86a54854cb4f3513646f182b58d0 docs/models/querydefinition.md: id: 4831b7e558f9 last_write_checksum: sha1:f4983c0963906b3eda13c69e2852b08d662dd744 @@ -2294,6 +2470,10 @@ trackedFiles: id: 8857ab6025c4 last_write_checksum: sha1:5634447d01c483713dad3d6d39df182007e6181b pristine_git_object: b710cc1f394e04ecc93c9fc6daddddec366254ad + docs/models/requiresconfirmation.md: + id: 68573b1b41ed + last_write_checksum: sha1:2d0a6d67c74253551cccf3015d599b9557ba5ad1 + pristine_git_object: e7f1e4a653cd7dc5d7f9d9ee4a8661867bea3368 docs/models/resetinvocationbody.md: id: 4063ca65ac51 last_write_checksum: sha1:94c7cd498cba13d4da784c4be76ddbb5b1b64cd9 @@ -2310,6 +2490,18 @@ trackedFiles: id: 1086204e8a19 last_write_checksum: sha1:f1a1c228a16e8e99cd5ff04622455e080418dd6d pristine_git_object: 074c573e64e98cbaf177fde279364f26df04a2bf + docs/models/resources.md: + id: 322aa690f06f + last_write_checksum: sha1:2e0ea1407b59e79451a8521a39ccc06bd5414ce4 + pristine_git_object: cf19612e7e17a683f426678b095b18767e292034 + docs/models/resourcescapability.md: + id: 1efecd9117de + last_write_checksum: sha1:a12afb871ba44408288f3f2ce67428747236286e + pristine_git_object: bbd256d08f16e9a966c107f8eccd762eae70e3b9 + docs/models/resourcetype.md: + id: 4607729e43a1 + last_write_checksum: sha1:241a059f01662088222612170681caed2c01d812 + pristine_git_object: 047f96bb17bfabb811b0315c71c03f373fcc2bfa docs/models/resourcevisibility.md: id: 891d464e9c47 last_write_checksum: sha1:cb0eaebe4e984ab4d999745a142868d2359ab8e4 @@ -2374,10 +2566,18 @@ trackedFiles: id: 2af79e204ed6 last_write_checksum: sha1:10354a9bcbe03a498848de9874b3163cde0fcc05 pristine_git_object: d722e7654427a013da70deb45f1bdb65b55add30 + docs/models/rootscapability.md: + id: 7cc1a16f90b4 + last_write_checksum: sha1:65f29860fb46023e6feb61ed5775d4fef4774a92 + pristine_git_object: f025431df291c6ab11241b2adfd33e5b915488c5 docs/models/sampletype.md: id: 0e09775cd9d3 last_write_checksum: sha1:b77964a7b39ec1b74f70925a39c30b23fad6ac43 pristine_git_object: 31f26c3c2869a453306fff5b062b40e95aa5f19a + docs/models/samplingcapability.md: + id: 79e8183fdc88 + last_write_checksum: sha1:47d5699c46cf60ba3bee396002f1cedfd6f6a9b3 + pristine_git_object: b05fb678df66c767211f42e2d2afeaee72396ac6 docs/models/scalarmetric.md: id: e23b9b990914 last_write_checksum: sha1:272bcac17d958e6d045be0e78ad80aa710d35bb7 @@ -2392,8 +2592,8 @@ trackedFiles: pristine_git_object: 4166bef5ded04c323f5644b80305ed5bb4159fb4 docs/models/scheduledefinition.md: id: 5a795fa1c041 - last_write_checksum: sha1:cbe6e2f2ebaf6bb52be56ffbca6b9d966fdbc2e3 - pristine_git_object: 7d0509f6263ae04d3eb99b65cef0b85adf71aeae + last_write_checksum: sha1:75666aa609a516ed239cfc0f76d8e87df9ebcb5b + pristine_git_object: 93c587409c628018888caa634db7117d86f56c37 docs/models/scheduledefinitionoutput.md: id: e5f8d9d43716 last_write_checksum: sha1:a41e2d99be8b57984e9db632fb17af0212b51e60 @@ -2442,26 +2642,54 @@ trackedFiles: id: e7cb0de862bc last_write_checksum: sha1:d8e860c666fe6b152d3944e9182e90be539c3ce2 pristine_git_object: 9474c1109d62fc5f7ff0bae32d386d54951d7fa2 + docs/models/searchindexresponse.md: + id: 37a2b2687f02 + last_write_checksum: sha1:909f3b19d495ee5e42aa6d7863058496bc58d589 + pristine_git_object: ce6087ec22b4569314dd2d2b596d08c3a183bfd9 + docs/models/searchindexresponseindex.md: + id: 328fcf6e4d24 + last_write_checksum: sha1:2665208de61f9db51eff5018a2a987d2dcc23b9b + pristine_git_object: 3093f4d48f8e527a37a7875bf91356ebaa6cc0b3 + docs/models/searchindexresponsestatus.md: + id: 78dbf9d2a629 + last_write_checksum: sha1:794e6f89be8778c11490fa69bdca3925819e4862 + pristine_git_object: c2200101050e96907f3b4b0d4ea8128ba36328d1 docs/models/security.md: id: 452e4d4eb67a last_write_checksum: sha1:45b7b8881a6560a468153662d61b99605a492edf pristine_git_object: 2e0839d06f821dd97780dc22f202dedf23e4efe1 + docs/models/servercapabilities.md: + id: b798bbcef1a4 + last_write_checksum: sha1:47016476abe0ff79522675df70d5983e354d0b0f + pristine_git_object: 4faca72ea83255c4a31423588a83aa8a183f2b39 + docs/models/serverlocale.md: + id: ea9d0dfa3104 + last_write_checksum: sha1:dd9c7f8896f6085cfbdc127e8fea40d592d748cd + pristine_git_object: a26fcf11b8de7e49375108d2cd775a2b8524440f + docs/models/servertaskscapability.md: + id: 6868e7f8ea87 + last_write_checksum: sha1:817dea2b0064c094f794d1b5ae0d64bbea8c02e9 + pristine_git_object: 9554996dc3f83f1ad3602c12812c4d451e798645 + docs/models/servertasksrequestscapability.md: + id: e4a1bc46b776 + last_write_checksum: sha1:4b65e7809ee82055dc1fedb6885eff2469cd0092 + pristine_git_object: 65c8593c38a0bf6a435223d352e848ea0f88e83a docs/models/shareenum.md: id: 53a713500576 last_write_checksum: sha1:de5c59ca89596a3b28134a9f7318fed3b3e6af02 pristine_git_object: d471b7c3c6700146dc02e20d3aa6205a5025d134 docs/models/sharing.md: id: 9f1e88417a87 - last_write_checksum: sha1:876fd514d08a6987646bf0fec636bf3fef89155b - pristine_git_object: fc718632594e04c682c6d6a3931a94d8b1fd4059 + last_write_checksum: sha1:723c9e8222979149c54d86e1f5bb2c07b5d2963a + pristine_git_object: 922506d31484d7ff3dbd24a696191452222054df docs/models/sharingdelete.md: id: 165cac179416 - last_write_checksum: sha1:1a0b3c95f4b56173510e234d7a76df85c593f360 - pristine_git_object: 1dcec0950c7fcd264ea9369c24244b54ba2bcfbf + last_write_checksum: sha1:ea12c9bfd1f065b9afd882d067d6b50f673c34ae + pristine_git_object: e6e0732bbb1b31e53ea7c4ccd4dad3aa80ccbc19 docs/models/sharingrequest.md: id: cd53ce3913a5 - last_write_checksum: sha1:380d0621a0a8ec9cd4be2b53a6e326b8c9c3d201 - pristine_git_object: 21b8ec1f74c1f903aa087cd3b4d13918c0ea9dad + last_write_checksum: sha1:90a59e17eba146ddc5ccceedc76b65df8235ee31 + pristine_git_object: e92318f812f8fbe66f9a258b68daa38cd1819bbf docs/models/signaldefinition.md: id: 4627d2840cb7 last_write_checksum: sha1:3606a41b67a27350c22aa2bf234d8a8696b23404 @@ -2486,6 +2714,10 @@ trackedFiles: id: 38c985ca6ede last_write_checksum: sha1:f82ac07d517e89bfa8044eebff6f9f7aa56f6c77 pristine_git_object: f65d7924388b842863deddb0e52d4376f2e28925 + docs/models/skipconfirmation.md: + id: 1bf623cd7bb3 + last_write_checksum: sha1:e514f325543c209b0d86b9a445f2c8696f171cfd + pristine_git_object: 48eade7acba08e0189f7405636d67dd0284b8ab6 docs/models/source.md: id: 6541ef7b41e7 last_write_checksum: sha1:00d43797d0155945ec39d4aff068a3ac7bad5ad5 @@ -2570,6 +2802,18 @@ trackedFiles: id: d8cd08c55c3c last_write_checksum: sha1:3ef23d504527602f2d0789d2cfb1a6629115f41a pristine_git_object: 8321a3090910115b586be900bcf23da5baf4c245 + docs/models/taskselicitationcapability.md: + id: e17695a516ab + last_write_checksum: sha1:fc3c19832d82da18d181fbd3a4a519bf4d49e003 + pristine_git_object: f2f3ef81a6731774e867a760c8e9993363c49e57 + docs/models/taskssamplingcapability.md: + id: 93ab84d49981 + last_write_checksum: sha1:cf477e6505da76a158f5c618c7a11fd29439f493 + pristine_git_object: 805d857462acba218480633e4092373f692ae1c2 + docs/models/taskstoolscapability.md: + id: f22fb61bcf93 + last_write_checksum: sha1:7ce2f2029c59001775b44be264b09866e2019569 + pristine_git_object: cd60fe49ca0eaa9e68ff6f75af94953f454a1da1 docs/models/tasksupport.md: id: 58be1f1aef25 last_write_checksum: sha1:2005c0e15f36bd315c17688daa4dd9a8c260b009 @@ -2710,6 +2954,10 @@ trackedFiles: id: 0c47c08eaa46 last_write_checksum: sha1:1af09b39f042e21e47ac09f73301ca9bbb521029 pristine_git_object: 8d385132baca782d1a7ec0d586136a29751f6ec8 + docs/models/toolexecutionconfiguration.md: + id: 24c733cfd29b + last_write_checksum: sha1:41b2d1a96b02852ee366092e9d78194370ed0881 + pristine_git_object: 04981b892381cddd436a5392569a22e2f089b1bf docs/models/toolexecutiondeltaevent.md: id: f2fc876ef7c6 last_write_checksum: sha1:ae1462a9b5cb56002b41f477ce262cb64ccf2f4e @@ -2758,6 +3006,10 @@ trackedFiles: id: f0522d2d3c93 last_write_checksum: sha1:783769c0200baa1b6751327aa3e009fa83da72ee pristine_git_object: 5c76091fbd2c8e0d768921fab19c7b761df73411 + docs/models/toolproperties.md: + id: 02fc3247a741 + last_write_checksum: sha1:9e9d42579412eecb812839ce507788c80ce17533 + pristine_git_object: d85fd8214553575469384250e546e766c9c9aa9c docs/models/toolreferencechunk.md: id: 10414b39b7b3 last_write_checksum: sha1:ea3bdfc83177c6b7183ad51fddb2d15aee0f0729 @@ -2766,10 +3018,14 @@ trackedFiles: id: c2210d74792a last_write_checksum: sha1:368add3ac6df876bc85bb4968de840ac578ae623 pristine_git_object: 999f7c34885015a687c4213d067b144f1585c946 - docs/models/tooltype.md: - id: 5e2ddf7b3863 - last_write_checksum: sha1:3aa9c92e9872fe75032e53e311bf050dbab51e98 - pristine_git_object: 2a64e130e526f8d99e623e7cbc0c7add82d8fab0 + docs/models/tools.md: + id: b78ed2931856 + last_write_checksum: sha1:93076309072b74f5653721c2d66a6acaab093c47 + pristine_git_object: 2f9decd63f1b3ffb8aeb13afe92858ca1a9931ec + docs/models/toolscapability.md: + id: 959506df839b + last_write_checksum: sha1:dd4e8ecca8e44f2f57a12c74a8ecdeb1de34081e + pristine_git_object: 7bde4735f551fb52bf8a6321dc070417cbb9a96a docs/models/trainingfile.md: id: 4039958e8930 last_write_checksum: sha1:d02543c2d1446e56501f2ac358a09669b0077648 @@ -2810,14 +3066,10 @@ trackedFiles: id: 69a13554b554 last_write_checksum: sha1:d969f462034ed356f2c8713b601ee7d873d4ce07 pristine_git_object: 77bd0ddcf8a1d95707fa9e041de3a47bb9e7f56d - docs/models/turbinetoollocale.md: - id: 57197dc9a955 - last_write_checksum: sha1:8ec2a585bfc0f5dca7bbad5fe143d21b9e5f6cb8 - pristine_git_object: 283dd339629448669557acf2d6eda10dea735421 - docs/models/turbinetoolmeta.md: - id: f99b41288e88 - last_write_checksum: sha1:092cd9ae293706419a86fd69c490cbc6587965d3 - pristine_git_object: 2f61a2c4d8be1634ccbb1ef0adacde0c6722a9bd + docs/models/turbinemeta.md: + id: 1f7f944fef63 + last_write_checksum: sha1:38dd2a9a68f8b938dbf6c3c43470e5986204bf08 + pristine_git_object: d5e48e38eaa3c247c6e09b25c9d4a15790937715 docs/models/unarchivemodelresponse.md: id: a690f43df567 last_write_checksum: sha1:5c9d4b78c92d30bb4835cb724d1ea22a19bf5327 @@ -2840,8 +3092,8 @@ trackedFiles: pristine_git_object: cf590a2fc7f58707855eb0bda2d4b8460bfea800 docs/models/updateconnectorrequest.md: id: 40e38d9c7c2a - last_write_checksum: sha1:03a8cd1c8d6415b26cdf592534ba09c022a5414e - pristine_git_object: 335588eac79ddbd851ead9950f3681f7dda90ee3 + last_write_checksum: sha1:5c78fcc8ea7aff991588911d5f9bd7e568d77495 + pristine_git_object: 7a267df3d91de7d9cd97c3d53b6fae75509cf8c8 docs/models/updatedatasetrecordpayloadrequest.md: id: ada11a6c544f last_write_checksum: sha1:220ce1184c9f6b6c6d1e5cdf2dc18197778f7af2 @@ -2872,8 +3124,8 @@ trackedFiles: pristine_git_object: 8cf62617303949d2633773af0268447befb04af2 docs/models/updatedocumentrequest.md: id: ee4e094a6aa7 - last_write_checksum: sha1:09171d42fdac0060276af58c5f036cb5714709d3 - pristine_git_object: dd06dd4b43b72ee73faf0bb2d39edf22889c0780 + last_write_checksum: sha1:33a21ce8b03db36d05ec02f7f3fdc5d5ab95f344 + pristine_git_object: 5a3c93afc4a894134e45c2b333b23d6c3a30207b docs/models/updateinvocationbody.md: id: d8b3b9cca5ae last_write_checksum: sha1:0fed6d77626ec76d3584e8d38b97ee228218a390 @@ -2910,6 +3162,10 @@ trackedFiles: id: fef8641b24c8 last_write_checksum: sha1:4c9532d96f40fc0b406e3c8e34b40d2b457963bf pristine_git_object: c675adeffe4da132426b8002b45d4c290bdd97bc + docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md: + id: 0146d71cfe07 + last_write_checksum: sha1:944b765fd6ed75e9939cf93cc3947d130cd55f91 + pristine_git_object: 68ffe15a622ad79f1581a52624efffb33fc0d5ba docs/models/updatevoicev1audiovoicesvoiceidpatchrequest.md: id: 0b7dfc68573f last_write_checksum: sha1:53d5d07d53d184d68b57185d251c8d68ff3cf4d4 @@ -2950,26 +3206,34 @@ trackedFiles: id: 304bdf06ef8b last_write_checksum: sha1:1f297f34069668f6107f2c0389606efe413ff5a8 pristine_git_object: 5bcea5b5d12e72222720af2c014d64ec4bdfee4a - docs/models/visibility.md: - id: 69ecc096de1e - last_write_checksum: sha1:30226db515dbfeef9316552cf871cf6882f597d2 - pristine_git_object: 924f2bdd9bcaa0bc59ba7a28733ce53fa968f822 + docs/models/vespaschemaresponse.md: + id: 989810d8633d + last_write_checksum: sha1:96ff3c52987ca630d03822936dfa792f928473c4 + pristine_git_object: 1cb7277be00681b0f1fbe6bc2e83317242d56152 + docs/models/vespasearchindexinforesponse.md: + id: 4e902564cfe0 + last_write_checksum: sha1:8744908c4282bb2be98b8eb3ac92a86d10587f7c + pristine_git_object: 16272fce2395ef0834eabb12fdb661fb72ca7d2e + docs/models/voiceappearance.md: + id: e481147d8fb2 + last_write_checksum: sha1:f8c3f4bcd91547d767c4b22fb85099c2fe97ac6f + pristine_git_object: b77de4c82ba355cb414c7f7f2e0ed641ddd74035 docs/models/voicecreaterequest.md: id: 1014a6e8d549 - last_write_checksum: sha1:2eba4e618f2767df9ca52b8b352e3060e9d0f04e - pristine_git_object: e9a3b3a14963b63e3b5555912bfe2c2f5ad6c67b + last_write_checksum: sha1:7592cabbf9ad8e0a8bbe1d69b4537dc82a7f7e37 + pristine_git_object: 775da22b80af35b840c127f1843790b135887a8e docs/models/voicelistresponse.md: id: 8226f91596b3 last_write_checksum: sha1:5d4dc06036e1c8267fe736ae23c53104853850dd pristine_git_object: d2d40dffd0bcda10a2266c95ac951e8242209f6e docs/models/voiceresponse.md: id: f6523df1521d - last_write_checksum: sha1:92c959e003170588fa6fa7d9d0bd33207fbaf49e - pristine_git_object: 3ec6d5407d0e7bde20488c2831dc3fe962696eee + last_write_checksum: sha1:becedca881e793f4d0b0768ef6d4f22a99628f61 + pristine_git_object: a907372e03797206112f04c3faac9b586effd4a6 docs/models/voiceupdaterequest.md: id: 7fbbdd315066 - last_write_checksum: sha1:8a1883407eff51f9e81fa3024af0d9fab016b2ca - pristine_git_object: 924b5f477dd97f8fe417de63b5d7b744616b2fc4 + last_write_checksum: sha1:19026b7852f3382a6dc9ed22ad7411e6ed53624a + pristine_git_object: ec2913dd40628817196c911acaa5558b3efd0314 docs/models/wandbintegration.md: id: ba1f7fe1b1a3 last_write_checksum: sha1:ef35648cec304e58ccd804eafaebe9547d78ddcf @@ -2998,6 +3262,26 @@ trackedFiles: id: a88b03086ce2 last_write_checksum: sha1:7046dd6a11770b56c36e22af07552e28c6cf36f0 pristine_git_object: a534ad34da32c4d8eb93f055e1bbf128c5df7e8a + docs/models/workflowbulkarchiverequest.md: + id: 149f8cc52a93 + last_write_checksum: sha1:429200327e31c36c2524bb9952577548d8cbe4b3 + pristine_git_object: 2c9b934189dc8f4fd1748c6a8e4c0dc4bcc1e8fa + docs/models/workflowbulkarchiveresponse.md: + id: 5d83f540f3bf + last_write_checksum: sha1:d967e75915950b95cc0cc7938ebb79f9d9bfeb61 + pristine_git_object: ce1999f3d2fb7f0ef7cdf5b6d9e326ae7deb71fc + docs/models/workflowbulkerror.md: + id: 616c78c4a5ba + last_write_checksum: sha1:c55cf5e9350a7aee18c06707f2ce0b332b8c5397 + pristine_git_object: d8e34f4e593067e4b9cb7b8b22ba1be589d667dd + docs/models/workflowbulkunarchiverequest.md: + id: 976175ec8e9a + last_write_checksum: sha1:bc1aa33c225ff70f46b0ac86251ca5a983eebdd1 + pristine_git_object: 0e5342cf3d28ae5804931aa242e3b8c9335f29d4 + docs/models/workflowbulkunarchiveresponse.md: + id: bb49d41e85a0 + last_write_checksum: sha1:d773d6bdc784ac4a1b61775ae64cea77d3c86aa1 + pristine_git_object: 8b139b752d94dc52594e12465e15797244cbb4df docs/models/workflowcodedefinition.md: id: 16ce7d540f36 last_write_checksum: sha1:96703471ed4249c118cd0d2563182f9300e3bfc9 @@ -3136,8 +3420,8 @@ trackedFiles: pristine_git_object: f85563cedae6cb209614fc97ecf6dd94ef810172 docs/models/workflowschedulelistresponse.md: id: 4c425808aa60 - last_write_checksum: sha1:d8e8aad7a91d7f8e398f7716109d436df6c4fc86 - pristine_git_object: 7142185b8081d076cb3b8fcd592234d49e3e0e5a + last_write_checksum: sha1:76a8376715ccad83ebe039f64b757617229d65c0 + pristine_git_object: b642854646f5ac2e7a0f680de8387f504a9374ab docs/models/workflowschedulepauserequest.md: id: 3a6d7adc379a last_write_checksum: sha1:97b3dc2321f62497cea5f13b54c5b1d049d855d1 @@ -3150,6 +3434,10 @@ trackedFiles: id: ef0b813976ad last_write_checksum: sha1:2da7d2a8519fe915554fdcebc25915ad11fbb203 pristine_git_object: 96d7ced717099cc1bbff4ac38d60e7552e9c6204 + docs/models/workflowscheduleupdaterequest.md: + id: 0eed547c9a4b + last_write_checksum: sha1:d71e300642a6ef23687318f53c8fe32b38320a0f + pristine_git_object: 24357f65c73cc9ace2a51eb549434c40333dea9c docs/models/workflowtaskfailedattributes.md: id: 7f329c44d7fb last_write_checksum: sha1:432c70ec990e81e2de79c14efbbb6161b60e1b3e @@ -3188,11 +3476,11 @@ trackedFiles: pristine_git_object: daa637fafd39b03b9d6c0b627047be1142f060cc docs/sdks/accesses/README.md: id: 2ea167c2eff2 - last_write_checksum: sha1:663516c8c94ca324b938a5d5bd1196663cb1de88 - pristine_git_object: 51051e2f8def9bfd6032617530ba9bead989404f + last_write_checksum: sha1:c9daf160ffc706a9be9e2e86855d97227fc25373 + pristine_git_object: 3acf0566daa202fbc8c3c182ff9405d9812a38bd docs/sdks/agents/README.md: id: 5965d8232fd8 - last_write_checksum: sha1:962df50ddc8aa1f501ad596313ee590ba704ff8a + last_write_checksum: sha1:2081b3728e940846431a2cc28b6090d87a786e87 pristine_git_object: f02ea6cd7f7405763edb09dcece22e65028e8fbb docs/sdks/batchjobs/README.md: id: a3b8043c6336 @@ -3200,7 +3488,7 @@ trackedFiles: pristine_git_object: b9655075680d5046d4b10d10de77d6b7b2ccea23 docs/sdks/betaagents/README.md: id: 5df79b1612d8 - last_write_checksum: sha1:6d14ffeace9a068f45ed9c62ee6663dc3768239f + last_write_checksum: sha1:40233bb8dbec401f8ce02c054b60640cabd400f7 pristine_git_object: b936538c54d38e52a67ffdb8c65ec35999197a3a docs/sdks/campaigns/README.md: id: 18dcc3c717ca @@ -3208,7 +3496,7 @@ trackedFiles: pristine_git_object: d5d7e4d4681811419874f58c294cb59688e595aa docs/sdks/chat/README.md: id: 393193527c2c - last_write_checksum: sha1:839bc022bed585cd691c403333f68ed8b68d1a8c + last_write_checksum: sha1:428f1bd7d271cd6b7edd6251295a5f240e648c5b pristine_git_object: 54b9f02913409dd73b0a0f36f7eab4f7fbcf5791 docs/sdks/chatcompletionevents/README.md: id: 6965539e0525 @@ -3220,11 +3508,11 @@ trackedFiles: pristine_git_object: dc0f4984380b5b137266421e87a1505af5260e89 docs/sdks/connectors/README.md: id: 7633a87d946d - last_write_checksum: sha1:f4c8a2ee577cae1b8b1e9551bb873bf34fe0f403 - pristine_git_object: 753c1cf3974ff3be77dc3b401d27ec5c0ef8bced + last_write_checksum: sha1:6eeacf2ed1c525cf329bb03ad4d3de1404de7398 + pristine_git_object: 4a0d8a935163a762071352b0d731ed0272018ddc docs/sdks/conversations/README.md: id: e22a9d2c5424 - last_write_checksum: sha1:d0a4e55b1f1c9acc6e9b7cf5925faf930a911d26 + last_write_checksum: sha1:68ede193fd35a89ab226aa92a92edaecf1eebb1a pristine_git_object: 63cd80a4a655a5c139be79239b0787c3f90cdea9 docs/sdks/datasets/README.md: id: deb5d90f4faf @@ -3236,8 +3524,8 @@ trackedFiles: pristine_git_object: 941b5538a57b3b693914d6b0d2acad2e8bb47611 docs/sdks/documents/README.md: id: 9758e88a0a9d - last_write_checksum: sha1:c3ee7c987ddaa856fa0a2f1040a2592edb0b82f1 - pristine_git_object: 2efbc3488ec4b4b6bc5d30d9ae1b5a344a0fe79b + last_write_checksum: sha1:7f1540110547b0ddb1350dc24422bb94bdf3bdd8 + pristine_git_object: 2a4787d0bb340be626208900ab7d72c2232792eb docs/sdks/embeddings/README.md: id: 15b5b04486c1 last_write_checksum: sha1:4a279bf9bcd84a9878ef979c78b8b75af3d52f02 @@ -3256,11 +3544,11 @@ trackedFiles: pristine_git_object: 3c8424419bae5c7e6e47b4cb23e35064531a8345 docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:45265e774720742cde1c76c8be294983bf4fc77a + last_write_checksum: sha1:ca90e32b21837a12b2e0f248b2e6160864e01d21 pristine_git_object: 246707073e9dee115d30b20a01bf728dcb43efd7 docs/sdks/fim/README.md: id: 499b227bf6ca - last_write_checksum: sha1:be2db0822c83cec2cfe2b5424d4b08db06d1c63c + last_write_checksum: sha1:b4aa3bc3243a20f339c9f9aab0365ed0456d7808 pristine_git_object: 7bf8908378c764c58cca2eddc6a4a97574c3709f docs/sdks/finetuningjobs/README.md: id: 03d609f6ebdd @@ -3276,8 +3564,8 @@ trackedFiles: pristine_git_object: 34d167398ac81ce78d50c1498c01f4c74917ce7f docs/sdks/libraries/README.md: id: df9a982905a3 - last_write_checksum: sha1:3cd3aef0294fb5b421a2b64baa7a53cfc1ad4f31 - pristine_git_object: 08606189680228ca4f4d30b6fc626c2d0c4b9287 + last_write_checksum: sha1:99d5c4e9c4c2689385bedf9da1930df89649c995 + pristine_git_object: 863cb9f410ff082cd09bb04bc52b0e2628804289 docs/sdks/metrics/README.md: id: a8545d964e21 last_write_checksum: sha1:0c559bd570e162c994c6125058f3712e24bc576b @@ -3300,24 +3588,28 @@ trackedFiles: pristine_git_object: 7ed914205115222f7ade5a656541af0dba64ff28 docs/sdks/schedules/README.md: id: 2f28c809a225 - last_write_checksum: sha1:cb4f7d988d25d87b8c18443c6cf64b5cb31146df - pristine_git_object: 7bf59931141869fc2797586fb6cdcb8adb9f0b7b + last_write_checksum: sha1:310601597370d883f38db8901ffbf99fd0875caa + pristine_git_object: 6b0e5f0e31f7de2eb5ac105c6406abb5d59e1cb6 + docs/sdks/searchindexes/README.md: + id: b58e7a6ab4f1 + last_write_checksum: sha1:129ef4c1ef14a615ee58a2d8c313b02cc0f0993e + pristine_git_object: 471bba59a2e12f24b8bad96850b25b566cba29da docs/sdks/speech/README.md: id: d5924688d48c last_write_checksum: sha1:7128863f5b445f343d4fde121c78de3a8ee4cc11 pristine_git_object: 7cd76ff4dc2354a55ae8b7bf08fbe46cf20ab081 docs/sdks/transcriptions/README.md: id: 089cf94ecf47 - last_write_checksum: sha1:15d118796f147bc5b0bf4146ba39bfa9edfbc996 + last_write_checksum: sha1:548786cb29e8500574afaaa771a5184c81fe2ebc pristine_git_object: 97703c9b4dc942385ee04ae96cbd100c3f632a17 docs/sdks/voices/README.md: id: 4f1a657c8f68 - last_write_checksum: sha1:88be1b4df915b0c4f50f2a54f2c7e93ffd5a5263 - pristine_git_object: 49b8533f85e2c6bf70ff1ea296136f4d18cb8348 + last_write_checksum: sha1:4f1b6512c334d5d43b30cba4438550508290c780 + pristine_git_object: da59de379ecf8390439ebd64ab7b2d6dfa1f25df docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:807551c827dd5936819393e88ff2160839bd01fc - pristine_git_object: 4575977672501a047dcd701dc471e2694d13d294 + last_write_checksum: sha1:f6f15706b9b4ac1b4f88fba3cac7396d69151691 + pristine_git_object: 0fcb9b8b8a15f262abc31e031a16f8da09ad95f2 docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3348,80 +3640,80 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:6b2772cd63b60cddf4ea95d94cfc44f81a878a73 - pristine_git_object: 9f9ae8c6224af17b3e22410b33f5a5ad37389e33 + last_write_checksum: sha1:f490e14fedec9dd2bab194b7f29af94a779d9b08 + pristine_git_object: 1a977e80189b69ec4cd5fc17f2bf384da665fba2 src/mistralai/client/accesses.py: id: 76fc53bfcf59 - last_write_checksum: sha1:de197fbbfea8bc95f44b4e7ee1b39e68fdde8bc7 - pristine_git_object: 5d859a399cb62144f5e47ae879407907427d56fc + last_write_checksum: sha1:5f1fbb7eb973dd8bcbe33bf0b303d4df3bf2ad36 + pristine_git_object: 90aef2e7e73f5880ec4f55fa054cf6b5d3cc082b src/mistralai/client/agents.py: id: e946546e3eaa - last_write_checksum: sha1:02f7e2c669dba9f1d29f41bc6427357e9d04be5c - pristine_git_object: 1bcd8c54f685630c8248243b7dbf0ad5a8aa6082 + last_write_checksum: sha1:9f2793ced88646b66736d46e98f004cbd4c57224 + pristine_git_object: 86c31b3ec549caadbf9c1576e09a0205f6374934 src/mistralai/client/audio.py: id: 7a8ed2e90d61 last_write_checksum: sha1:b9dc19b4b6070baf7d8937907b8665e9f0e36afd pristine_git_object: 597954e4facba105cee62d92ea6b8c68555f63dd src/mistralai/client/basesdk.py: id: 7518c67b81ea - last_write_checksum: sha1:321a95c38231ed5126753702e6368a85a1af1667 - pristine_git_object: 4a27eb2ff362dd6189abfde2c8f739b70deab192 + last_write_checksum: sha1:0544004f28ec429df8ab994c361f384b6159740d + pristine_git_object: b305e63e3a40f1b9ba5833f0d7d692c090f9eea2 src/mistralai/client/batch.py: id: cffe114c7ac7 last_write_checksum: sha1:b452983f67b33f26e1faa60fdbbb171cb1877224 pristine_git_object: 7e36fd0d73ebeb873f74f4109896a6cf3bb7d2ba src/mistralai/client/batch_jobs.py: id: 3423fec25840 - last_write_checksum: sha1:89deea7e036f775d7d0551ef7edd550a7903ccfb - pristine_git_object: 2bf50fd3dc54ca084c026c97cac055f75d4a885a + last_write_checksum: sha1:ea2bb05997e8dd9e7bf487afa563da93ac813c29 + pristine_git_object: 456e285bb0c318c8d1023cc7c5d2f4d3d296c25a src/mistralai/client/beta.py: id: 981417f45147 last_write_checksum: sha1:1f6972862310651111b52027dd8b4c5519adadfd pristine_git_object: f9bbb5aed59e7f9505e4bba2ee9c0190d51cf626 src/mistralai/client/beta_agents.py: id: b64ad29b7174 - last_write_checksum: sha1:307dd8e2fd0e8bda707894118ce9b89d329e7964 - pristine_git_object: 64baf53b7d7757a35324c0b3b86544167f331b16 + last_write_checksum: sha1:152f183dc93b2069b570ce75bba970a9771a7c0b + pristine_git_object: 3c0661b6e85979ebf8f2ae7c399f13877eb4732d src/mistralai/client/campaigns.py: id: 9e64fcf4e60e - last_write_checksum: sha1:8d4471059539934a69b9fa1f98b4cf35f1db61ab - pristine_git_object: c9f28794e32130e6ef92127316815772c6a04c71 + last_write_checksum: sha1:f75467fa874163b43ee118b29202c6e00c683d9a + pristine_git_object: 460b0b5a958748cc3e3662783e9cb8d64542aee0 src/mistralai/client/chat.py: id: 7eba0f088d47 - last_write_checksum: sha1:e8b8b2e745117b6d78402148121c9f5229694066 - pristine_git_object: 9deff9a0d2091c706146eb903834a354c5432ec8 + last_write_checksum: sha1:1a257686a6a246b8d39fba8cf44650a9ebb36567 + pristine_git_object: 74a9221a6f16ff66282bc59ff3b2349b384bc1de src/mistralai/client/chat_completion_events.py: id: 1813f339625b - last_write_checksum: sha1:785474540b9ddc3d3e9c7ec5011e2f25519bc8c2 - pristine_git_object: af4124f0c3e71e3f335f4c0b54d36a0b2dddcbb6 + last_write_checksum: sha1:4ecfd5b487a648345908ffffe746cc21447bc0ab + pristine_git_object: ef737912cebee0cc9d39ea3f18f4a28dadfb3bfb src/mistralai/client/classifiers.py: id: 26e773725732 - last_write_checksum: sha1:d057b735d057147e1341953dd696fbc7110611ec - pristine_git_object: ddb2d0b1abaff5f267320779bf9ae64d5ae0adf3 + last_write_checksum: sha1:d635ba5307bb64ade27134a1ae979e610a6d2f80 + pristine_git_object: 36329ea6180905b8ea4607d5a5aa83e297a7bdee src/mistralai/client/connectors.py: id: 39da03126050 - last_write_checksum: sha1:16a6fe8ffbf14828b1b930d7dda7a001d4780ea4 - pristine_git_object: 793c9f8ae726f86fc82de044e8a09b6931bb2592 + last_write_checksum: sha1:44bf2225202d7e5b7d95b62fa1d4f072ed9e2efb + pristine_git_object: dc8df3e853ded5dc3f4c51daefb00a8a6723344f src/mistralai/client/conversations.py: id: 40692a878064 - last_write_checksum: sha1:501da7474cc0bc6fd627150f15870dd3acf70235 - pristine_git_object: a30f8b05f9735464ac53b612cdfe139e5469b8b4 + last_write_checksum: sha1:c6f4ab6903aa74f88d267552c01d79b4ca08534d + pristine_git_object: 8f61fbfad9d79ea0ea4dafc4187c2212adacf154 src/mistralai/client/datasets.py: id: e5a6ae2a2d85 - last_write_checksum: sha1:fdd59e77aa9d19e64ab31cb949ea3565392c3113 - pristine_git_object: 437b42fdc5354378e822b38172bb5ee769355425 + last_write_checksum: sha1:7c4c9dfda1e50a003f9fb857fd96904d0e49a778 + pristine_git_object: 078bb18baa9ace9066204d5c554d647ecd4ce420 src/mistralai/client/deployments.py: id: a874b267fcb9 - last_write_checksum: sha1:5b62dd6436ce4914de7fbf0abc0819734eb08136 - pristine_git_object: 26e9c5658068de85878942b444538e0e58f706f5 + last_write_checksum: sha1:0291107482b2d9c2a3bf0a7e0933d1fc43b1f3fe + pristine_git_object: 086e95a2162256db07d919c98a8dc5029627a17c src/mistralai/client/documents.py: id: bcc17286c31c - last_write_checksum: sha1:27beb1104b009c5237d37f11e11b589fadf3838b - pristine_git_object: 2a555d3e3d34afe673de231bd1fcadb8fc36b59b + last_write_checksum: sha1:a436f5d0055f4ab5b29f4b8c2e8222f9e697c63e + pristine_git_object: a3c8b07bd32689a8cf5d092d0964f3839937f8ac src/mistralai/client/embeddings.py: id: f9c17258207e - last_write_checksum: sha1:737e09a794867ea7242fb7c9e09cdff5f837fbf4 - pristine_git_object: 64337b4f3f56f084ed47a3f1f17a999a868db2c3 + last_write_checksum: sha1:8dcf1cbbc7233bd6e0c3fd10decb2d88ccaa046b + pristine_git_object: 17eb9a57bb170bee55f26f11c54b8c9a4255ede2 src/mistralai/client/errors/__init__.py: id: 0b2db51246df last_write_checksum: sha1:0032f4eb3501c71fafb8f68113a8c80e677311a4 @@ -3452,56 +3744,56 @@ trackedFiles: pristine_git_object: 25b87255a51021079f8ba5cc60b43509e12f9a4d src/mistralai/client/events.py: id: ac9b961cc70d - last_write_checksum: sha1:b250b6454555bb436cbc194e732c72982af23d94 - pristine_git_object: 3a4c47224be925a5701c88f9cf363e61bc1afd7f + last_write_checksum: sha1:ec68974ad398b02201aa10ca5e10443196aa33ca + pristine_git_object: 4ebb6505f0c8aa342f6daad6eaf73c92cff300fe src/mistralai/client/executions.py: id: 974004d347a2 - last_write_checksum: sha1:bc0b48a037c85cc0411dc16f59da9481510c0469 - pristine_git_object: e4b9f90b0d985710715421cf68320a8dd0585a19 + last_write_checksum: sha1:b9558bb68c97db073706f9a2c53afbbc8049990c + pristine_git_object: aa22f09ebdc95526314bf5ba0c86cb9e48ed9f42 src/mistralai/client/fields.py: id: 862335210b20 - last_write_checksum: sha1:c200568ed4ad334849643bd85f19edc258877ff2 - pristine_git_object: 17441ca699fd8fb22701a0e59411d3ebd292f049 + last_write_checksum: sha1:1af13d8200df61b54b0e1f0a679feb76484c6bd0 + pristine_git_object: 5e701da99d523c222454a291e64f47ada989f0e0 src/mistralai/client/files.py: id: f12df4b2ce43 - last_write_checksum: sha1:076c1f6435398d29491e1dcdaecab760e9f4a0a1 - pristine_git_object: e4549c75f5b5c21e8025383cce66737e0b1a96f6 + last_write_checksum: sha1:bcb7a967ddb7bb16896e8b0ef0af56c39f1d3ff9 + pristine_git_object: 5f8396f5d8c37b638bcd8a7be1c97b85bc1b2f95 src/mistralai/client/fim.py: id: 217bea5d701d - last_write_checksum: sha1:4fdaa4ccd058e700e510c63a5397e5c28fa4e923 - pristine_git_object: d25f79b193237ef5d3b55921837882c8dd9dd30f + last_write_checksum: sha1:b4c816932351b1b0bafbc453dd838192b2d7a515 + pristine_git_object: d868bcff5dc5b90f0468dd097f60b1bb90e9a95c src/mistralai/client/fine_tuning.py: id: 5d5079bbd54e last_write_checksum: sha1:fe1f774df4436cc9c2e54ed01a48db573eb813cd pristine_git_object: df6bc5643a13294ddfbeecc6ae84d00cd7199bed src/mistralai/client/fine_tuning_jobs.py: id: fa1ea246e0b2 - last_write_checksum: sha1:18c53b380f2524d2dcca63ad014b1adb2dd682a0 - pristine_git_object: a6bf93a320939857513d85a8f5ecb1b5a47d8533 + last_write_checksum: sha1:b42ebedc6f7461b0a74393aa907f6d9a94ca91e1 + pristine_git_object: 708cc5371593055fc8410fabd933249f309acdfe src/mistralai/client/httpclient.py: id: 3e46bde74327 last_write_checksum: sha1:0f4ecc805be1dc3d6e0ca090f0feb7d988f6eb9d pristine_git_object: 544af7f87d6b7097935290bebd08e30e5f485672 src/mistralai/client/ingestion_pipeline_configurations.py: id: f5a994272058 - last_write_checksum: sha1:b34f23cf74285c410c1258be40b37c2c3b652a73 - pristine_git_object: adef39f9953d4c6e59c1288c7e6deb2cdd75ad60 + last_write_checksum: sha1:5eff8e1b8dbfd396ff87e48c2af4b2c7a79d9814 + pristine_git_object: dfd139bab111a55b24b508feaf64ee67a564204b src/mistralai/client/judges.py: id: b6024a41ecb4 - last_write_checksum: sha1:a5c33a8bc46f6f3d435827a2a701016a428cc83c - pristine_git_object: 52c8899eb8c8ec092be454aca929012a62fec337 + last_write_checksum: sha1:a4f3d12d778a58e8d10a41753c4a992c20bdd86b + pristine_git_object: 187eed0d36bc641177fa077aa529c4ec51422e78 src/mistralai/client/libraries.py: id: d43a5f78045f - last_write_checksum: sha1:db5cab2f824979cfe953e31f465c30fa322a4cff - pristine_git_object: 928c1ea8a79f1f838a6ea4c7a23826f5bdb82445 + last_write_checksum: sha1:555755528cb5283aa561c7eee818102b4ef75dbe + pristine_git_object: 3076d09c7582f18d197208178a88520e4bc9220e src/mistralai/client/metrics.py: id: 937cb03f8130 - last_write_checksum: sha1:491be33059fb0bbccff73b2a3bb0a66fb7a5ba9b - pristine_git_object: 60597c40f00705b4758827fb7d119f33ae2ad1b9 + last_write_checksum: sha1:0a529a333e416df4907837b24006bca6f462de9c + pristine_git_object: d3814d6b3d2fd548b9ae7f97a1f4d27592ca97bf src/mistralai/client/models/__init__.py: id: e0e8dad92725 - last_write_checksum: sha1:c072eedd54264d94cc39317fd40433adf40f6fa9 - pristine_git_object: ab36240c66a1da2d58318b7155af6a803e2e1e13 + last_write_checksum: sha1:faadf02f5775b34350ab65f02e0b5ae349caecc8 + pristine_git_object: 6121091ffd2225c3180502e373308c810e465ba5 src/mistralai/client/models/activitytaskcompletedattributesresponse.py: id: 8174941767cc last_write_checksum: sha1:b5246e203765ba0532a6a65d391bdd237ab2c891 @@ -3696,8 +3988,8 @@ trackedFiles: pristine_git_object: fb8b79723f3f0f4485c0c6bb1c52b0a5db2fa1fe src/mistralai/client/models/authenticationconfiguration.py: id: 97b5056c29fb - last_write_checksum: sha1:95b12ce07e5656f40d1fcf4566af5336f5279cf3 - pristine_git_object: 84f665915ad716ce97cd9219f59ffa9cefc68bbd + last_write_checksum: sha1:e8465381456454f427238fc42a60305b3e5f55d9 + pristine_git_object: 79c6964176ebff18657b02abd16985737e6eef35 src/mistralai/client/models/authurlresponse.py: id: a2b468c87a8a last_write_checksum: sha1:8ffc0c770c51d7b0cb49770e6829486d0cb82741 @@ -3834,6 +4126,18 @@ trackedFiles: id: 4000b05e3b8d last_write_checksum: sha1:1d639da446bf3e2df7576f4320b0d0e2dbdfff8d pristine_git_object: 5d1d1f8f3adad438f83619f61e3e396aa3b65d15 + src/mistralai/client/models/clientcapabilities.py: + id: b2ad660c5c9b + last_write_checksum: sha1:9e9ab4cfed5487f3ba336de7465efcbe7891fdcb + pristine_git_object: 772711601752ec07d571befea5b51a30abed1650 + src/mistralai/client/models/clienttaskscapability.py: + id: 83aeca444b21 + last_write_checksum: sha1:1aac7c99f18f0449acbe46ab38e0012f7a4b1862 + pristine_git_object: 5256c3d502a7de1b6509031ee8c0ceea2df53479 + src/mistralai/client/models/clienttasksrequestscapability.py: + id: 26148da505a0 + last_write_checksum: sha1:ecdb0a3954e6cd3ddd4dd49ba1d3844cf2ff54e2 + pristine_git_object: 38b9d6b12e9cc278fa882c95b25bd1de848c7fae src/mistralai/client/models/codeinterpretertool.py: id: 950cd8f4ad49 last_write_checksum: sha1:248d6e6c1906303f03eb4f29429227a7d39679a2 @@ -3874,14 +4178,34 @@ trackedFiles: id: be202ea0d5a6 last_write_checksum: sha1:fe9420a42d598d1a6ae15ff0d35bbfad4f56e7b8 pristine_git_object: 3b99a69322ac18cfda3df0d4726d218063092ae0 + src/mistralai/client/models/connectionconfigtype.py: + id: 52923bfd57d3 + last_write_checksum: sha1:c515a281111d65a4acf890c2683a891d352a652c + pristine_git_object: 9ad1bee185be3830d587d428b83f2bdd626ac341 src/mistralai/client/models/connectioncredentials.py: id: 2f4a79b452fb last_write_checksum: sha1:2183abeb08ce54a985d531baac5f67b84f42417d pristine_git_object: de461057f967b4dbd746cc82321fbed4afbdf145 + src/mistralai/client/models/connectionpreference.py: + id: 6b9389ac91e6 + last_write_checksum: sha1:94c03c3e8ac45245baec8db480cfa162794b0dd8 + pristine_git_object: 953ef17cbecfa6983a722b151b966c72f74cf476 src/mistralai/client/models/connector.py: id: 1a4facac922d - last_write_checksum: sha1:dc5989fda6b4a5f49e2e5febae8ebf8ddfc5b33a - pristine_git_object: 9d8b600032db4f260a96140433bce3f7e4c21f3a + last_write_checksum: sha1:5b8d7f5c6f97a2f8478ddfdd093a74b60d53da34 + pristine_git_object: ce9e083744d2682451378528aafd90c439748bfd + src/mistralai/client/models/connector_activate_for_organization_v1op.py: + id: 9b35397dd5cc + last_write_checksum: sha1:310d5c74ef6b89e604e94bec61efa51f853e7c88 + pristine_git_object: 1b0ec3b0bda16c406d70a8a8e97cbb92ee427f51 + src/mistralai/client/models/connector_activate_for_user_v1op.py: + id: 6bf45c78cfea + last_write_checksum: sha1:a821db048f3e675f4593d0355c1e361c49311e42 + pristine_git_object: e30126d48d593fc5c240fd58b98fbf6aba314caf + src/mistralai/client/models/connector_activate_for_workspace_v1op.py: + id: b6392712ddaf + last_write_checksum: sha1:b361b01a898a446d2ed9a953c8cfc95812341a9e + pristine_git_object: 00fe6699d18db79d9943dc55775eb337b3ad2846 src/mistralai/client/models/connector_call_tool_v1op.py: id: 7948899b3068 last_write_checksum: sha1:c4388ac1594641c36f97daaedcf42b0e94753be7 @@ -3898,6 +4222,18 @@ trackedFiles: id: 7795b085704b last_write_checksum: sha1:70bffd65c359d4c295b0f4a419d5a783d50e03ea pristine_git_object: 43b3c1dc6576d9d9260a220097f52b51029e205a + src/mistralai/client/models/connector_deactivate_for_organization_v1op.py: + id: 850bece829b0 + last_write_checksum: sha1:b9dc305c9bc09d5979d650b5734d86eb416e23fd + pristine_git_object: 4c5c5458e79a3fcabf1b608895364e5aee21a536 + src/mistralai/client/models/connector_deactivate_for_user_v1op.py: + id: 1df4227a54f7 + last_write_checksum: sha1:8d2b440ae4983f8b43b9dd7fed5c97a5cd9c17a5 + pristine_git_object: 5d998877241cc05f2e67e6b28b8a349f18d866ef + src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py: + id: d82c1a5321cc + last_write_checksum: sha1:5edfc695ffd5acfc57f2a08af655b609ffbdb05d + pristine_git_object: 9f02d887f7be47f64fdbb0d00f7e2d3be2f23517 src/mistralai/client/models/connector_delete_organization_credentials_v1op.py: id: aab3a70dbbc5 last_write_checksum: sha1:a53123b18f8dd5a33e777741ab44aac0d5ed64ee @@ -3924,8 +4260,8 @@ trackedFiles: pristine_git_object: e0c4146d4621eec51f6961f85de95088e7480c08 src/mistralai/client/models/connector_get_v1op.py: id: 73ca3a446dcc - last_write_checksum: sha1:74ce85c377be5d7f86506d8a8d97249708c246b8 - pristine_git_object: 780afac9281bf78c4263c7bd32faa04a718695d2 + last_write_checksum: sha1:7afd047c7e74eb418365d79a25c79ec566e72992 + pristine_git_object: beb27872de7204b10e5a28789f817b2cdb629a77 src/mistralai/client/models/connector_list_organization_credentials_v1op.py: id: a52ee058feab last_write_checksum: sha1:2abf099d7a6ea68134d38c3a95dfec08d37e9ed9 @@ -3958,10 +4294,18 @@ trackedFiles: id: 7dc7ec295301 last_write_checksum: sha1:8af4bd44caa8ad09180139e7e8a68052c16dce11 pristine_git_object: 85366bb6acaa0724a907803c689a2caeb431bf7b + src/mistralai/client/models/connectorlocale.py: + id: f987f5207d2e + last_write_checksum: sha1:650dd62ffecf5940c5b9c43e561059244ae1e09d + pristine_git_object: 373e9e848b4df211f646c289b864b3a3d66b4954 + src/mistralai/client/models/connectorprotocol.py: + id: c35853b1b79f + last_write_checksum: sha1:96327799b7a691122ca8f742afb5bb85574ff580 + pristine_git_object: 042f23524ba8f38cf01956945611158deeb8937a src/mistralai/client/models/connectorsqueryfilters.py: id: 3b9fc81aa726 - last_write_checksum: sha1:399567eb362a40f1225f7d8adb820aabc6b9df99 - pristine_git_object: f10d689771d50077bc35193a39a94672a9f09ac2 + last_write_checksum: sha1:ab7df6cf281f7bea870663783924d113309348fa + pristine_git_object: 860caf43e0a61363933058d72819e03f4be86477 src/mistralai/client/models/connectortool.py: id: 41ca596b44f8 last_write_checksum: sha1:0306b9a607d59afe042aac018df6e2bc0cff0d8a @@ -3982,6 +4326,10 @@ trackedFiles: id: 86730e16aa67 last_write_checksum: sha1:fae6e84b040a1c8bcb25b94041f990525529472a pristine_git_object: 8c92f2f8d4c25eac7f3c95e0ae425942829390d0 + src/mistralai/client/models/consumertype.py: + id: d18230da2fdd + last_write_checksum: sha1:4fc648452051b1dc9ef496b54e75d18396807158 + pristine_git_object: ac091e5e905d0985ce7286389f46c308c53ebb82 src/mistralai/client/models/contentchunk.py: id: c007f5ee0325 last_write_checksum: sha1:b921b03b4c1e300b0e3f51ea9eadd4d7c4b7a0ea @@ -4060,8 +4408,8 @@ trackedFiles: pristine_git_object: b3957df9ef369ecc1746ee3efd1b463bc10b4be7 src/mistralai/client/models/createconnectorrequest.py: id: 3da192d6491a - last_write_checksum: sha1:21ab6824e52ffb3bd2f97a97b4521188d6725f02 - pristine_git_object: 18060ca33206509d6443e306b8e505c9698ea9c6 + last_write_checksum: sha1:dcee72a62388e53c2f924f50f90bad947a757591 + pristine_git_object: ac732104d885e1658bd729d1732a2ca12b027cd7 src/mistralai/client/models/createdatasetrecordrequest.py: id: 9455e38a8c31 last_write_checksum: sha1:df3e8d7425500f23101c25267738e617eeb2d467 @@ -4092,8 +4440,20 @@ trackedFiles: pristine_git_object: 7c30aa5ffde4e23ce9ebcb0d67a0e1a3c875c698 src/mistralai/client/models/createlibraryrequest.py: id: 1c489bec2f53 - last_write_checksum: sha1:0d98f058dc61560790d2bde49026dd631845218b - pristine_git_object: e0357e9252a4911292e5dce370c808350b6da0ec + last_write_checksum: sha1:ebee21e3ac561b490513d6ebcb79efea070e1597 + pristine_git_object: 2bbb1e18c3ee495db44df95e47046b6f1285e54e + src/mistralai/client/models/createsearchindexinforequest.py: + id: 3f424a7063b0 + last_write_checksum: sha1:84c436749a4f6268ac8cbb4d52879e33f4052859 + pristine_git_object: f527f72dfeaa0e4374f64e9aad1ed4a786c68f63 + src/mistralai/client/models/createvespaschemarequest.py: + id: d44c0c466535 + last_write_checksum: sha1:048cbca6e8aad11561e9a42a5a8b0a31f50a0ca6 + pristine_git_object: cac99bc3735d8be742a5aa12a65cf40a7ba974d3 + src/mistralai/client/models/createvespasearchindexinforequest.py: + id: "866143560866" + last_write_checksum: sha1:553b15776ecaf0d3a58f0c99459429f60a51215e + pristine_git_object: 50006d38bb822c1cb5eb90ed8e8f577184dc2cc2 src/mistralai/client/models/credentialscreateorupdate.py: id: 9927546f2487 last_write_checksum: sha1:e31d3c7fc19e2a7fb49d07cb6f85c5ea73aabb98 @@ -4236,8 +4596,8 @@ trackedFiles: pristine_git_object: 2955dc485bbf1017a728cb0562baf948083e1b13 src/mistralai/client/models/document.py: id: fbbf7428328c - last_write_checksum: sha1:bc290f10562aaf9c24bd14ab3d2a31e62f535042 - pristine_git_object: 8d1aea883e579ff1677949573f43dddc362bd35d + last_write_checksum: sha1:3cdd40229b126132d3eb60505cd1d635325a8372 + pristine_git_object: c04512c130ee295c80548a2215b0f6bb428667bc src/mistralai/client/models/documentlibrarytool.py: id: 3eb3c218f457 last_write_checksum: sha1:a84295aba7b9e7f70b68f279934d1a5ca0817f77 @@ -4250,6 +4610,10 @@ trackedFiles: id: 4309807f6048 last_write_checksum: sha1:f45ecef78fb4412dc76ce54478fe536df0259048 pristine_git_object: f7a99ff81ee01d256052920405ca4788d3a47f75 + src/mistralai/client/models/elicitationcapability.py: + id: 63a9b5cfa2f2 + last_write_checksum: sha1:dc5d41705df6540b421fe0bacb10a11696d6a526 + pristine_git_object: 128084365172f50fc5b4f3f2f6453a1b216d9731 src/mistralai/client/models/embeddedresource.py: id: 94a23f656f72 last_write_checksum: sha1:50375363269d68edd3ea1c0a31ba08c8bf9bd160 @@ -4278,6 +4642,10 @@ trackedFiles: id: b51ec296cc92 last_write_checksum: sha1:ea907f86b00323d99df37f7ff45d582aace798e7 pristine_git_object: 4a39d0295f9069ae9f749cf21dab450eaf145d19 + src/mistralai/client/models/encryptedpatchvalue.py: + id: 311803d1f28e + last_write_checksum: sha1:bd3ab363a2924b69a7f1efd03a10d0d0f6b4f31b + pristine_git_object: 970bd59b8458d0f30fb2826cf3ee027a1e4237dd src/mistralai/client/models/entitytype.py: id: 62d6a6a13288 last_write_checksum: sha1:015e2db9e8e5a3e4ce58442ccedaf86c66239dde @@ -4400,8 +4768,8 @@ trackedFiles: pristine_git_object: fe62d6ddc1187e1177ac834a85bd4e1b6a86ee52 src/mistralai/client/models/filtergroup.py: id: dbc0c34fbc2f - last_write_checksum: sha1:f900312cfcea2b2a341d83e95ca2fce3e467fa03 - pristine_git_object: 4e9815b7387904b071645a9a4682a4ffbf23d488 + last_write_checksum: sha1:73aaf6de90f9be6913af8379535bc5ad999ab878 + pristine_git_object: 3439df66779c46b66a48f4c3792c51af16f958c7 src/mistralai/client/models/filterpayload.py: id: 56757b849f7a last_write_checksum: sha1:1d9a513f9c5a33c5ae249fb4926dd70eeb5e02e5 @@ -4542,6 +4910,14 @@ trackedFiles: id: 60463c59ff01 last_write_checksum: sha1:a851312a3e0c91273ad444c6e2cc81c8c541c9cd pristine_git_object: d9b6758f1622c76ad41092f4dbb9c6cf392b299c + src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py: + id: cb775bc63ffd + last_write_checksum: sha1:29edc18fcca86b478702fa9ab632c93e63868a11 + pristine_git_object: d22d0515070d71858367cacdca0e2b83ee2a4cc0 + src/mistralai/client/models/get_schedules_v1_workflows_schedules_getop.py: + id: b5f0210eca23 + last_write_checksum: sha1:cf881ab5d08e4f97c4482522949059251406d4a8 + pristine_git_object: 62f8ece293aa947f86bc09938bbcd1ff6429edb9 ? src/mistralai/client/models/get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop.py : id: d651bdc06c1b last_write_checksum: sha1:25331ac322d230cb7d9fc2a6aff2d7db561fdf2f @@ -4736,8 +5112,8 @@ trackedFiles: pristine_git_object: d4242f11b063f795b8d677abdd8c19ab0419a0b7 src/mistralai/client/models/jsonpatchappend.py: id: 61801f21f4b0 - last_write_checksum: sha1:f0400cf42fa6c776042487285cf18c1970e17ad6 - pristine_git_object: 7181ddac1956f1c29b815231f30c3405d4f50754 + last_write_checksum: sha1:6418ac32a97e99eea86df63204f560a0926f17e7 + pristine_git_object: 185f7bb72350361dbf9817a9480824720f5ee339 src/mistralai/client/models/jsonpatchpayloadresponse.py: id: 1b39f46f529f last_write_checksum: sha1:1d2a8b1039cef824f0e030804a72a0325c413a10 @@ -4844,8 +5220,12 @@ trackedFiles: pristine_git_object: 857dfbe60c57af8b0fa6655a049ed336d70fb941 src/mistralai/client/models/libraries_documents_list_v1op.py: id: 756f26de3cbe - last_write_checksum: sha1:565872ef17a53cc9751fa2c8fc1267dac2d01e76 - pristine_git_object: afc474cbe6c571ac36fe0800d4c1e5ffd07eb207 + last_write_checksum: sha1:3c0fc8976932ac7c537a7a0183e87a6505a84336 + pristine_git_object: 57e2736b9994d071455b95bfe349c3bef60eac87 + src/mistralai/client/models/libraries_documents_patch_v1op.py: + id: 31b2201bbfe2 + last_write_checksum: sha1:625739e50a05c7164436063994869e725ab48972 + pristine_git_object: 0ae4efaf7cc7a05f1150a266b8d10d52341ef32a src/mistralai/client/models/libraries_documents_reprocess_v1op.py: id: dbbeb02fc336 last_write_checksum: sha1:bd5013cb1581dd13642ce7edf1e701f5b0c967c4 @@ -4864,8 +5244,12 @@ trackedFiles: pristine_git_object: 7a51d6053aa2cf2e6524a80487fe9549eec3dfa1 src/mistralai/client/models/libraries_list_v1op.py: id: 2d9b1b4deeb0 - last_write_checksum: sha1:1c99dd9165c57ca19d94daf81f31c378125d280b - pristine_git_object: cac06dadbb33c7bf28b276b4c51f569a885ac44e + last_write_checksum: sha1:0c0958ecc928ba180cc265c4b0558eb62db3edb3 + pristine_git_object: 328ac72c2e09158a7e31a445370a4dc2ccc46aef + src/mistralai/client/models/libraries_patch_v1op.py: + id: 2b189be3c57a + last_write_checksum: sha1:6df3bb4ff0c163061963bbf1db9a8c239bfbaa68 + pristine_git_object: 2fbaea6755cad1b0106320a9a058fb02c48edcc6 src/mistralai/client/models/libraries_share_create_v1op.py: id: feaacfd46dd3 last_write_checksum: sha1:cdb7e60f1aceb2c7aa54fe2b9ba5dafc2bb70995 @@ -4884,8 +5268,8 @@ trackedFiles: pristine_git_object: 54b0ab708c665ccb841b1c8d0f2748c390850506 src/mistralai/client/models/library.py: id: 028a34b08f9c - last_write_checksum: sha1:82eb895302f95f3f1a1adf85070027e22ab22350 - pristine_git_object: 0e09cfaa14040397a37ac72810521fb14fe6562f + last_write_checksum: sha1:b15f423354d9f938b6f39cc8ab19095f3203d74f + pristine_git_object: 4ec8604c50da4154796b4267bb639cc4d377f6e6 src/mistralai/client/models/list_deployments_v1_workflows_deployments_getop.py: id: 0c6586ffcab0 last_write_checksum: sha1:c7d7be66560be5bb813316f958a3fecdf7813156 @@ -4962,22 +5346,54 @@ trackedFiles: id: 72a73946b20e last_write_checksum: sha1:18a2d1aeb07ed9d84a1854bb7186e5d32783cb58 pristine_git_object: 4e2ff2f6869517202f4f0c435ce4a6435c5cc571 + src/mistralai/client/models/logicalexpression.py: + id: 48d46c10b453 + last_write_checksum: sha1:4be5e5411b84d61ed53b72140e2914b94902995f + pristine_git_object: 1b87693c0db77be8767af91cc72e80d58a342dab + src/mistralai/client/models/mcpprompt.py: + id: eac4133413b2 + last_write_checksum: sha1:003b0a3bf0f7af4db962697e1604510710709983 + pristine_git_object: fd5fb0d87df899d59d59aa60b2d8becd8a76610b + src/mistralai/client/models/mcpresource.py: + id: 4922063d1d29 + last_write_checksum: sha1:0544a1c3fd247ea67bbc7924700ce9255252dffe + pristine_git_object: 77df58571236b984cc69580f930ac646af44f8dd + src/mistralai/client/models/mcpserverauthenticationrequirement.py: + id: 688772457c1d + last_write_checksum: sha1:befc1fa9206fa19cd320977a89eba6d96ef7bf54 + pristine_git_object: 280315a719d6f5a8183db03b7235871437b467f9 + src/mistralai/client/models/mcpservercard.py: + id: 3d8e787f97f3 + last_write_checksum: sha1:1a947e8f9af8d234f3fae2be377b71b19a819f81 + pristine_git_object: 3e66b9540418cfd6987e4da70f1252b90d1c5382 + src/mistralai/client/models/mcpservercardmeta.py: + id: 0f095765c6aa + last_write_checksum: sha1:34c452143cdda5cfc07b165f6c00bc055c308eb6 + pristine_git_object: daf592f9dc9bece6cefc5a5d3cb2ca5b82bbecae src/mistralai/client/models/mcpservericon.py: id: a5b508a322d7 last_write_checksum: sha1:0dd9bac0684864bf6264ddded7f27c8c88b804f5 pristine_git_object: 293ab37505a1098241631dd83435a0e91d073551 + src/mistralai/client/models/mcpserverremote.py: + id: b20e4512dbe2 + last_write_checksum: sha1:93a620a8c955a788e554453a19bbbcdbfcc7f7d0 + pristine_git_object: 9099207c8e71c1b643641599e2a135a21ba4017a + src/mistralai/client/models/mcpserverremoteheader.py: + id: adaf8d89cbcb + last_write_checksum: sha1:5bf69acdb3aedc19f151d898579d951129c252ca + pristine_git_object: efd1c1fd6c8e896c617ef73d06379a5cafd9aca9 + src/mistralai/client/models/mcpserverrepository.py: + id: 431ce897e113 + last_write_checksum: sha1:670c22c827a6ade10a46f69a21efa01b96cf1b25 + pristine_git_object: eb564992db641642325f55c68cce7355c393d58d src/mistralai/client/models/mcptool.py: id: 5a696c8478cb last_write_checksum: sha1:c4b180a023664313dea583377b79bf53f0f93262 pristine_git_object: 908ff8ce20773a4ca1fd80e47a588acc9ba401af src/mistralai/client/models/mcptoolmeta.py: id: 07cf1c0762c9 - last_write_checksum: sha1:01af35e36f16d4ab4318633b6d773550c8403108 - pristine_git_object: edbf39a9b4c066ea495471cf6ff21b08d8a390a6 - src/mistralai/client/models/mcpuitoolmeta.py: - id: 7c54fb6157a9 - last_write_checksum: sha1:a115ada5e6c22925919160a88a8358c16129bce2 - pristine_git_object: 287192a67a4fe1c22a209996db9b9e8df1a93359 + last_write_checksum: sha1:f47fde183bd997563b1e522125220b31317aba7a + pristine_git_object: ddd7771b2cea71e052b47fec85644f67ce3ce16c src/mistralai/client/models/messageentries.py: id: e13f9009902b last_write_checksum: sha1:43aebdc9eaecc8341298dc6b281d0d57edf4e9e6 @@ -5158,6 +5574,10 @@ trackedFiles: id: d64678967bf0 last_write_checksum: sha1:693e9b575e0da721b15363db1e381d19f8766efb pristine_git_object: a60640aae96b54f7f8e7561029fda45a165007c4 + src/mistralai/client/models/partialscheduledefinition.py: + id: ce1ded792ff5 + last_write_checksum: sha1:e4f50d9cb285dade8dc732547f03908e0b1a9834 + pristine_git_object: 1120dd141a1f7ddadcf0cbe578078496c9287236 src/mistralai/client/models/pause_schedule_v1_workflows_schedules_schedule_id_pause_postop.py: id: "53799174e259" last_write_checksum: sha1:0d12062b4884937e8100490414a29842da524c5f @@ -5188,12 +5608,20 @@ trackedFiles: pristine_git_object: 614f481174e58eb7ba28cae5238b532d1d66ef9c src/mistralai/client/models/processingstatus.py: id: 28146eaecfcf - last_write_checksum: sha1:a3e3ebeae169441cf430c302c9fe278de79ce215 - pristine_git_object: 7e93308f4cf6af8f968e93f20765c41694b8fad9 + last_write_checksum: sha1:4c053b54f4e154e016b1592dfe1de70bfd3699c3 + pristine_git_object: 73308b4658b84ad4a064b3ce18fd96eaeccdd918 src/mistralai/client/models/processstatus.py: id: "0205512146e6" last_write_checksum: sha1:22ad3d5fc80fbf3f83db61512e7bc79295c5fc91 pristine_git_object: 15bdce2056f2f642096fbbdb2ac32ce1e5b8c9cf + src/mistralai/client/models/promptargument.py: + id: 52e5c885f761 + last_write_checksum: sha1:a71c2398080cb96acf20772e3c9436910c5a5b22 + pristine_git_object: 1f73b59f3e5cd74b8b87f70017c3b6704adaa1a2 + src/mistralai/client/models/promptscapability.py: + id: 15c552f53adf + last_write_checksum: sha1:c10ebeb4958239272315cb603e6039182875419a + pristine_git_object: f4ddf63ed454b2c10120b958bda8e859e8909a83 src/mistralai/client/models/prompttokensdetails.py: id: e6be33f2cd2d last_write_checksum: sha1:aa71bf6de6316b8754fb18f897b30051a2d4c70e @@ -5202,6 +5630,10 @@ trackedFiles: id: 545ab7f24523 last_write_checksum: sha1:5256ee8833f1e44717f19b6d2ee3aeff6dbe2dc4 pristine_git_object: 42e943a6f63dcfcfcfc3e994080e318c21a5e619 + src/mistralai/client/models/publicconnectionconfig.py: + id: 03c2460e04ac + last_write_checksum: sha1:faea37686e78fd3cc8a74371a3004d59ca57f4e9 + pristine_git_object: 94fd670836c95c432fd71f1f7dfc16323b50ee24 src/mistralai/client/models/query_workflow_execution_v1_workflows_executions_execution_id_queries_postop.py: id: 73826dbd3f5b last_write_checksum: sha1:5105618697e031bae45cf9f6d7c5227d9c08f155 @@ -5282,6 +5714,14 @@ trackedFiles: id: 4251cc3c7797 last_write_checksum: sha1:fad9dd6a100450397ee358842a31804c3552ca06 pristine_git_object: 890c5be1de611379c12d1525d596bc284e0e197d + src/mistralai/client/models/resourcescapability.py: + id: d109cd5fe17d + last_write_checksum: sha1:b7ebd5ed1b64ee944b0d8534ce1e1bffb3b545fd + pristine_git_object: 39bd1a0b7b48462199d1a7e3cc5351679a78295a + src/mistralai/client/models/resourcetype.py: + id: 58cbbc423f90 + last_write_checksum: sha1:05bedc14374e61522f42d1e655017ecffd6bc9ad + pristine_git_object: 435c917c25e30c6c329dc41a6ee8d7c731fa06f2 src/mistralai/client/models/resourcevisibility.py: id: b5819dd5f981 last_write_checksum: sha1:3c7e91baa8c8a0bb2ba55a6b7c14db04350278d7 @@ -5318,10 +5758,18 @@ trackedFiles: id: e41c04cf7422 last_write_checksum: sha1:e953cc08f43a7a4b8f143830e5308eb26d44f8ac pristine_git_object: ff36ebd72389228752297c1c9ec80deb7557430d + src/mistralai/client/models/rootscapability.py: + id: f1514b6dd416 + last_write_checksum: sha1:55eaee162031944b1a3d334cd2084ca39261de9f + pristine_git_object: 37b25d65f2bff9c8018bce9f82f9e918fd6bca76 src/mistralai/client/models/sampletype.py: id: a9309422fed7 last_write_checksum: sha1:86a61340a647696f6c35a82d945509b1c85aa6f7 pristine_git_object: dfec7cce1e22ab607b6a9e947fa940284426086d + src/mistralai/client/models/samplingcapability.py: + id: 0a7af0cc3968 + last_write_checksum: sha1:dc1c3d442c31adb176fd0d12a5963c850594eb15 + pristine_git_object: 46aa3be5192d2e9ea8cd81c5f078fc90f0d522a6 src/mistralai/client/models/scalarmetric.py: id: ae8eb1017da6 last_write_checksum: sha1:c85c3825e8f60eac8776e912425ed4f43b387ad6 @@ -5332,8 +5780,8 @@ trackedFiles: pristine_git_object: 2cb179eb22e9ac10e820ed276187cd863fc7a440 src/mistralai/client/models/scheduledefinition.py: id: 6ea58a356f77 - last_write_checksum: sha1:a394dee8c49c4a6c6ede7e27ca256a3c376e137b - pristine_git_object: 5810229349e4b84c88458fa729b4b1bce4d761cc + last_write_checksum: sha1:4102a73a034dc19c4ea209104a5531ab4bba9b11 + pristine_git_object: 3c018552dc5b883cc92ced39d4646fc6f13a1da2 src/mistralai/client/models/scheduledefinitionoutput.py: id: 69dc15b9a0d6 last_write_checksum: sha1:4dd8612486768de992731c044cb13b4c52f4622a @@ -5378,26 +5826,46 @@ trackedFiles: id: f96acbcd45f7 last_write_checksum: sha1:539caf622ef9e7579fdc82e7986dcc3a2aedae53 pristine_git_object: 8b9b10b51fe76de43895168df11e5bbcdfc29a62 + src/mistralai/client/models/searchindexresponse.py: + id: 054688d20a3b + last_write_checksum: sha1:6da75c25bd5104344915f4a3ab62ec1eb80e2a5e + pristine_git_object: 0e62aa32470e5f4d4b7fe892a8017a0d6a573e7c src/mistralai/client/models/security.py: id: c2ca0e2a36b7 last_write_checksum: sha1:28496d4ff921e8c2186072aad170c65836a4b8f8 pristine_git_object: 36b129533187283e4fdf53a67019b379b1e251fa + src/mistralai/client/models/servercapabilities.py: + id: 9e5832ea005a + last_write_checksum: sha1:88d632a3dc3e8fd328633278be15d0338f275559 + pristine_git_object: ccfbf932fc59fbd6289b78135114386a476e12e2 + src/mistralai/client/models/serverlocale.py: + id: 5b70fcb88050 + last_write_checksum: sha1:0e6898c0280308f4f17845826dbc110ff7e83f10 + pristine_git_object: 1b73a7494ee64f538c4374998a4e9de0825664e2 + src/mistralai/client/models/servertaskscapability.py: + id: fff9567cb403 + last_write_checksum: sha1:48c88c31c5b7928c7be018155863c0576db1b4c5 + pristine_git_object: 7d2c2927401f5c3c2fdca2980c00c174c1e94741 + src/mistralai/client/models/servertasksrequestscapability.py: + id: 23cc8415f619 + last_write_checksum: sha1:a57769f03d442fc70e5f448ee65876d1a2fff093 + pristine_git_object: 2568507f11f1450dd4419e5dca7d38c9a6ebfcd9 src/mistralai/client/models/shareenum.py: id: a0e2a7a16bf8 last_write_checksum: sha1:15a84d57ceeb74cfb37275f714954e42d8e9b3ba pristine_git_object: 08ffeb7e46fbbc28b7c93ef2aa4a49aff7c0d35e src/mistralai/client/models/sharing.py: id: 324f5ac27249 - last_write_checksum: sha1:b67aa68e320269e0f6da9da23ed35cd1c41f2879 - pristine_git_object: efa16203021055e1f704b2fd3683eeee0a49ba07 + last_write_checksum: sha1:287adc1c670f242ce722c20bd182f6313fa2b372 + pristine_git_object: 4260f1751826195f574a6b84bfdbd4d55b0a617f src/mistralai/client/models/sharingdelete.py: id: f5ecce372e06 - last_write_checksum: sha1:f993f4cc819a14985a70a31af7896115ee80af8a - pristine_git_object: 3472a50637d4582fa8945ec70b57ed12de88b99d + last_write_checksum: sha1:87b3c6e270147260b011eb3d705f84b0fbac1938 + pristine_git_object: 67399831d1f1ff7d7173ea5bf120b114caba6a06 src/mistralai/client/models/sharingrequest.py: id: 2439b732dfae - last_write_checksum: sha1:05e36cba36203bcc579a3b02538aed570cf22352 - pristine_git_object: 7c2d435c363bcd98aba97e120954ec1357524e34 + last_write_checksum: sha1:7439e7d30b6cb676f1edfa86148e4b5e3a8065a6 + pristine_git_object: 94de31c1d2072adfc838e0684cb3573d93df6f8a src/mistralai/client/models/signal_workflow_execution_v1_workflows_executions_execution_id_signals_postop.py: id: 16c54f54e60f last_write_checksum: sha1:57437b8a9d284f7e77459c319908ad0b8db33720 @@ -5466,6 +5934,18 @@ trackedFiles: id: 297e8905d5af last_write_checksum: sha1:e5695ca0ebdb0f02f3a0c527015df154a0c52b7f pristine_git_object: d480a219e935aaea91adc320de0003b562c0bbb5 + src/mistralai/client/models/taskselicitationcapability.py: + id: 19504f19f5f3 + last_write_checksum: sha1:2905488ab1c27912fda77ae08f649956ad8d442e + pristine_git_object: 768f36f1ac7497218c45f823de2662af399cd3db + src/mistralai/client/models/taskssamplingcapability.py: + id: fe3e6aaee007 + last_write_checksum: sha1:e6450ffcec733c2969b3de8873515fe74673576a + pristine_git_object: e051fd75ee3e87be6da8f51a30d0eee12b3b5814 + src/mistralai/client/models/taskstoolscapability.py: + id: ac9448f661ce + last_write_checksum: sha1:e7dd4fcefdd9f89bc7d093d2ded222f0b9e45c99 + pristine_git_object: 88d799c114d3e64e8628c8be43d68934a1b68754 src/mistralai/client/models/tempogettraceresponse.py: id: 8bb3c013aa76 last_write_checksum: sha1:ff35ba718f008554d79defc41dc02af5115c7ab0 @@ -5586,6 +6066,10 @@ trackedFiles: id: 69fcb691327a last_write_checksum: sha1:85bcd4a5d30aab54425bccec9c2374137fad6736 pristine_git_object: 9c55e7bb9db0be106d30b9bf37153aaf8d7b61ff + src/mistralai/client/models/toolexecutionconfiguration.py: + id: 1c9369616b21 + last_write_checksum: sha1:b802788ceb7246914638b2b26f5b053d33913306 + pristine_git_object: ce65ad31408abe1b8bbaa042b176b8555dbf8480 src/mistralai/client/models/toolexecutiondeltaevent.py: id: df8f17cf3e07 last_write_checksum: sha1:77da4c0bca920d4ea77a64faa039fb3c07df46ed @@ -5610,14 +6094,18 @@ trackedFiles: id: 15f1af161031 last_write_checksum: sha1:9557c9f6b7be4b6ac94d3316eb605e42aa8dc03c pristine_git_object: 0dc9e92f5dd27ff93d6de62a6879699ace4300a8 + src/mistralai/client/models/toolproperties.py: + id: 3a33561f76fc + last_write_checksum: sha1:b2059b8c5d6a619f4e637b2395a54a281178282b + pristine_git_object: d3bf9789b77b305a669833ba873fb70231c4c690 src/mistralai/client/models/toolreferencechunk.py: id: 822e9f3e70de last_write_checksum: sha1:2e489c4b2360741a3e4a20710361511a0d9158ea pristine_git_object: 391724edbb7eea3d3acd1a4b3302045970cb5e31 - src/mistralai/client/models/tooltype.py: - id: cbe8c44aee50 - last_write_checksum: sha1:53949106f192944a13a8fcbeb37b3d08478b7bbc - pristine_git_object: 1a7781fc2c1001002785d512ed7909ce91a9129f + src/mistralai/client/models/toolscapability.py: + id: 2feda23ea584 + last_write_checksum: sha1:56c273d54611752761b1e70f209001a6f9559347 + pristine_git_object: 94e5ddc80669d5c06c713c6e422d59a01009dd2f src/mistralai/client/models/trainingfile.py: id: 2edf9bce227d last_write_checksum: sha1:f72468d666e903a966c12273be5a64048dcd59a0 @@ -5654,14 +6142,10 @@ trackedFiles: id: 6086dc081147 last_write_checksum: sha1:968b4bc32731be6c63be3fd90eb26f4357f891a3 pristine_git_object: 42f0ffb7f16bee4f68f9db9807aa4ec3d9ae5176 - src/mistralai/client/models/turbinetoollocale.py: - id: 2699936a7546 - last_write_checksum: sha1:9fa6910a64b464068a660b3d5bf5e09109da283b - pristine_git_object: 42682ee15e542672c190e1b82e713539a6c9b22e - src/mistralai/client/models/turbinetoolmeta.py: - id: cdb07c3837f7 - last_write_checksum: sha1:c2339efbf6dac10bf5e3f42491fa971982d4a998 - pristine_git_object: bcd4d5f2da000bcc4af9c41bf7e92efdaf99b039 + src/mistralai/client/models/turbinemeta.py: + id: 084d588caa1e + last_write_checksum: sha1:4a0ffc6cecc9ad674ab4eab0b3bb017682beddc2 + pristine_git_object: 5084c05f7090f46e35bb63e6fd70c495df3c2044 src/mistralai/client/models/unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop.py: id: 9df426343c2c last_write_checksum: sha1:12d529f6703695653004ac5692f13daab13bf060 @@ -5694,6 +6178,10 @@ trackedFiles: id: 2a14ebf4ef57 last_write_checksum: sha1:dc63747af5ef650f6d5f5a99e447bebc41450e46 pristine_git_object: 6b7d24d465d34289f97aeb83dc036501883c9c7e + src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py: + id: 6aaa918af7f4 + last_write_checksum: sha1:7bb83c6f98e4314061724c7793e979a47b3f5af7 + pristine_git_object: 5e3a1be42867c2ca00f4c5103ac318dcd5909e44 src/mistralai/client/models/update_voice_v1_audio_voices_voice_id_patchop.py: id: 399da05bd75e last_write_checksum: sha1:aca7b6539571a8111e8f1abb7f90dde1e461d4bc @@ -5712,8 +6200,8 @@ trackedFiles: pristine_git_object: 7bb9686b9b542c47ac25fb6780017b5739829b1e src/mistralai/client/models/updateconnectorrequest.py: id: a761cd154109 - last_write_checksum: sha1:1a943da5e32a0eec70de5a15b56de278082bbc25 - pristine_git_object: 145091d4ce119383e611d845f52dbb4489b78ddf + last_write_checksum: sha1:cff0bc420926e5798c7d9a4dbc6055cf99db32c8 + pristine_git_object: 81f09ea9a124d773de786310c25aa1415fe09da1 src/mistralai/client/models/updatedatasetrecordpayloadrequest.py: id: bd45f357a538 last_write_checksum: sha1:774ba70d9f417e84b546b9f4c5c85eb2876dd56d @@ -5732,8 +6220,8 @@ trackedFiles: pristine_git_object: e878c8764774e4420a85145196cfb93c32d108fa src/mistralai/client/models/updatedocumentrequest.py: id: a8cfda07d337 - last_write_checksum: sha1:612b16cee373b0e395f51eb03b3dff70d7988148 - pristine_git_object: 5f67ea697ac8d4449c76863a8e4f42e0bd197908 + last_write_checksum: sha1:f282948c29e5ef5bdb598e02923a44c0c4215e7a + pristine_git_object: 07c6f5e36119b84fab821967d0b054572fd9d45c src/mistralai/client/models/updateinvocationbody.py: id: b8558eff0be0 last_write_checksum: sha1:ea486ca10c1165b9f3dd40c005cc98bc6b0e937f @@ -5774,22 +6262,34 @@ trackedFiles: id: 15df3c7368ab last_write_checksum: sha1:4acbbd9e47cf9b351336d552488d617270d37758 pristine_git_object: 5fe796db923badd9fb85dc4080a30496ed2b419b + src/mistralai/client/models/vespaschemaresponse.py: + id: fbab188e672e + last_write_checksum: sha1:ad669056fa9c61f0ef7f33430a643fd09a41a788 + pristine_git_object: 440967d1aa77338d7526df06a7322d07fcfaf45d + src/mistralai/client/models/vespasearchindexinforesponse.py: + id: ee7484f75a7c + last_write_checksum: sha1:08714193f3bca9099c051dc3799e04fef2a03b52 + pristine_git_object: a3cce35408346525219693f6b19ae706b20fd743 + src/mistralai/client/models/voiceappearance.py: + id: 945a81bc2582 + last_write_checksum: sha1:c2370a4dfc294932987817b7e4093c7526a53d27 + pristine_git_object: a9d4f2a820ed8b309988cc2221e3f63295094225 src/mistralai/client/models/voicecreaterequest.py: id: 9a1752117dec - last_write_checksum: sha1:6ddd5af32737a8b0597f3fff476f151dbd039e50 - pristine_git_object: 99df178d594f4c5b029dd9dc027e5e1afc3f8dec + last_write_checksum: sha1:f361c10ac84b2696eae0c3d13e3789fa53ee8b20 + pristine_git_object: ec94523f54d9dd0083b685cc0531e27bc251757e src/mistralai/client/models/voicelistresponse.py: id: df4b1182d193 last_write_checksum: sha1:c451d4d0534f4d857f16efde78a7027ae6ca84eb pristine_git_object: eda768f53f2b6273ccae254ba25adf1c157d068a src/mistralai/client/models/voiceresponse.py: id: 24138e419fae - last_write_checksum: sha1:b3f4ef73cc34c3dafa3fa5bf6b4fb02774be04da - pristine_git_object: 6fa3987b8f3361baee9ca3605af0d187ddcb4858 + last_write_checksum: sha1:695a243563d99456c7b660cc16001d19ec6e672f + pristine_git_object: 818bd2578aa49060e889eaa815de1f851dcb2088 src/mistralai/client/models/voiceupdaterequest.py: id: 798f8ff225de - last_write_checksum: sha1:1e4345add08618310635c7b79a8bf3991df98d99 - pristine_git_object: 717316b0033706f1f5fc8fccf3f0159bbc82e8a0 + last_write_checksum: sha1:d4165da1079fe5cfb9cacd8fb1a6837c2ec23119 + pristine_git_object: 4239d01699c4147d752c8c3448a3619ff6a8ff3a src/mistralai/client/models/wandbintegration.py: id: 4823c1e80942 last_write_checksum: sha1:b836b2c829f16a00221354c44f55b672eefc3aa0 @@ -5818,6 +6318,26 @@ trackedFiles: id: 34623036478d last_write_checksum: sha1:0516152c52c443b8b94c830f81f591798f08ac92 pristine_git_object: d2f3db1fb851353d21ce5bbec5e8d2d4b9afabfa + src/mistralai/client/models/workflowbulkarchiverequest.py: + id: 0e0bf7feeede + last_write_checksum: sha1:4d1c8a767f73778f6f2efb1e4d7992df62f872f5 + pristine_git_object: fb2089192ca567a095b48f56f429df288ac750dd + src/mistralai/client/models/workflowbulkarchiveresponse.py: + id: 132f69064b86 + last_write_checksum: sha1:bdb96ed85fd2579c0a41407f9a4795f38e63dedc + pristine_git_object: 506724b3fec8383ef7b7cd8dc7b16e01380e0b78 + src/mistralai/client/models/workflowbulkerror.py: + id: 61b9b62c7fd6 + last_write_checksum: sha1:dd0bed42db7b7ba32c06c3609163681073ee3bb9 + pristine_git_object: 076c938a5223fa19e4929afbb4e2784f3a678745 + src/mistralai/client/models/workflowbulkunarchiverequest.py: + id: b04414883bed + last_write_checksum: sha1:3219afc9903f4f9b7c4eb7e426a74a24ff990c0d + pristine_git_object: 6ffecd91dd3271d311370a6fb07f3539f55eb267 + src/mistralai/client/models/workflowbulkunarchiveresponse.py: + id: 34554c6df2e3 + last_write_checksum: sha1:dc1d73453a4e59deef573a211ccb7e69c5e55cb8 + pristine_git_object: f2ab37272302e036bfdc4e11bd4d76096b4f2c90 src/mistralai/client/models/workflowcodedefinition.py: id: 36fd5b898ddd last_write_checksum: sha1:bd77f4a5e5b32892f806278bcd6dc2d951f10629 @@ -5952,8 +6472,8 @@ trackedFiles: pristine_git_object: 62c379d91f6f8e0b2842b11208513635160a0c02 src/mistralai/client/models/workflowschedulelistresponse.py: id: e5247c5183bb - last_write_checksum: sha1:37cea2f0f3220331105f9454169f1ea49ed1b51a - pristine_git_object: 3c9eb3d7f445a0ec010340aeae788cf47e034628 + last_write_checksum: sha1:10d416a4157ccfd9f60479ea0cd8e4daaaa49cc3 + pristine_git_object: 21341ecad5cb574436d8d2e8beab695f3e637eb0 src/mistralai/client/models/workflowschedulepauserequest.py: id: da7b9a522bcb last_write_checksum: sha1:079663a44a62694c48dd839ef1d3b4cd6fb7429b @@ -5966,6 +6486,10 @@ trackedFiles: id: c77172c4a9f6 last_write_checksum: sha1:dd347319557279367f8ccde9158dec6c4586f528 pristine_git_object: d74ba1dae81bccffa812df2a64babad0a61af787 + src/mistralai/client/models/workflowscheduleupdaterequest.py: + id: 72ca0f5e6c08 + last_write_checksum: sha1:ad25f903339edb6d9d018ba280a39789b81ffb28 + pristine_git_object: b43dc96f32704b4821936189a3f6a8bdcbd77799 src/mistralai/client/models/workflowtaskfailedattributes.py: id: c4c09c4d5ea7 last_write_checksum: sha1:b1faee3ed43b88829ca68f5cd642f24d8f1fe9f5 @@ -6004,52 +6528,56 @@ trackedFiles: pristine_git_object: 81030e21fe08c8ac1401ac6fb0a105f985985cf0 src/mistralai/client/models_.py: id: 1d277958a843 - last_write_checksum: sha1:a5e45504b21a4126a41b59c52be2050cd8215cff - pristine_git_object: 2a00325f9205bec7b5ca6ff8df2915593d12bd0e + last_write_checksum: sha1:13c8bd4907bf201957c2a9da00616618ca13e0db + pristine_git_object: 6263ead9a2934b431111fe1a80d1ba2eccc48f42 src/mistralai/client/observability.py: id: 453a1d06d130 last_write_checksum: sha1:62d4d03a08807271b404a8684b1153a739d70b05 pristine_git_object: 4057909ebc43fc419396582fd69e62ca5135ecb3 src/mistralai/client/ocr.py: id: 2f804a12fc62 - last_write_checksum: sha1:f9fe8ca3be4450aff01d1a159d905b66054cf665 - pristine_git_object: c290b1bb53f62a966f724216b29f9dc3a949197d + last_write_checksum: sha1:8d503853c2571bde3cc8bc205b86fe519788a331 + pristine_git_object: e0bc4e0efc94f3ae143b5a1baf1c2968b3e2967b src/mistralai/client/py.typed: id: d95cd1565e33 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 src/mistralai/client/rag.py: id: 2c2b641de1b6 - last_write_checksum: sha1:d27e705578c277540b90b6a84a4669580170c64e - pristine_git_object: 091b02705ce1bd11ea3dc3602a1ebf8e29815495 + last_write_checksum: sha1:77d6bd45daba9879a753768896dac249eb645996 + pristine_git_object: 934b2374571b475a573d38e59c8fdf40aa5ba3b8 src/mistralai/client/records.py: id: 10f90c990bd8 - last_write_checksum: sha1:3b54fb25751ef4d12a8263bc6f29999a42ac4f61 - pristine_git_object: 2ac04c2fcc4277af7abd42a2a0cacdbba741dd4d + last_write_checksum: sha1:6401ec613de8f53368ca49cbed9a59b9204f8b5b + pristine_git_object: 5a4c3c8463a8245dc5de73c2cf93ba85f870ff5e src/mistralai/client/runs.py: id: 4297d58aeb21 - last_write_checksum: sha1:65b82f507ef945cd17f5f4fc2767d6dab3e6909b - pristine_git_object: d1a242fb2bd517b27656e2f60eef07421418cb6e + last_write_checksum: sha1:70aa67885af67c0a01c91028dad0a7beb4151f44 + pristine_git_object: 01507e33e8b1fb37fbd778fcad8abf3a5f1e8d7e src/mistralai/client/schedules.py: id: d3b4fe452390 - last_write_checksum: sha1:946fac6872a9994efbea349a91c0fd14485859b0 - pristine_git_object: 9b013acdc092797cd78e9be3f50666f4a8203fd9 + last_write_checksum: sha1:573ca09239d46817b60637a6348e02bebb5ca617 + pristine_git_object: c56e497365a765be6d3bc794aab67d63fa9f7cd2 src/mistralai/client/sdk.py: id: 48edbcb38d7e - last_write_checksum: sha1:a606046063cd946633918efa1662846c987c9b7e - pristine_git_object: 03338f46bd3d32f1770ed9b6e4d30f9d707867df + last_write_checksum: sha1:6194b5d4e8259276a5a4a581ef478e35948a59df + pristine_git_object: 86de8dd9f4f2dbd54bc84aec74ae3e44cb1d81b7 src/mistralai/client/sdkconfiguration.py: id: b7dd68a0235e last_write_checksum: sha1:c6944f12c6fdc992d43db943b24c8c90854cde5e pristine_git_object: 712e92e05c7fd3016431ec62ecb7b7789c8b7071 + src/mistralai/client/search_indexes.py: + id: c5a0a7df993a + last_write_checksum: sha1:6e0fcf67162312f3ccba44d1e1f2983bd5635ae8 + pristine_git_object: 522ae338029948d81686f2481287d4745f9737ce src/mistralai/client/speech.py: id: 5c1f1109aa5e - last_write_checksum: sha1:3cbd55d0df062a0de6e93c32816dd6e805018150 - pristine_git_object: 4893684b70781a097845f48c4b0a09b4fcb38dd5 + last_write_checksum: sha1:22ce4e2c43162a21f01dd43e66c3d92945560e72 + pristine_git_object: 42cb1bbb47ac7daf68103b9934d8067f1fda6292 src/mistralai/client/transcriptions.py: id: 75b45780c978 - last_write_checksum: sha1:c72a2c07abd80bc78554669e549ded4ec2b027e7 - pristine_git_object: d84b59f8efbe0adaff62dd4a95a9c7d9bb117d10 + last_write_checksum: sha1:897eee298c4d342650ef73a7c7bcfd640752bba6 + pristine_git_object: b63fd5d0d4c528f9df71c7772ed8e0af08e8ae74 src/mistralai/client/types/__init__.py: id: 000b943f821c last_write_checksum: sha1:12a4ace69cbc63f1125eeddf901afed7cdf378b0 @@ -6136,16 +6664,16 @@ trackedFiles: pristine_git_object: 2469a9f310a37a7170b54853715274f13d38901c src/mistralai/client/voices.py: id: ab76b1377d79 - last_write_checksum: sha1:a8009497c11da1e145fcc462ca5d6e7dcfd6e0f1 - pristine_git_object: e19d5d5a184d08110592147ba04c570cbb2b291a + last_write_checksum: sha1:d106cddf60390d93ae4d2f410a5f1f0e4ce0d0de + pristine_git_object: 2810b922fbc967bba982127ce5bc5f086640e7fd src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:b0644f87b63f179114350f2d90a2ec646cd72931 - pristine_git_object: 2693b05b7716298daafffbc76c7358feb49923c6 + last_write_checksum: sha1:4389be2822f4bd5f439cd752a2b91a7744c72b10 + pristine_git_object: a601594656c0cd542a51a996c189b641a28c4965 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef - last_write_checksum: sha1:a6362c45808a5fac5bc0a8f58c29b4d9291b9a7d - pristine_git_object: 71e44ac74c571debabf7a8b811f8c244f2b7c30a + last_write_checksum: sha1:7ea1bf2efb7a2113a672a4655c97210d29b6ed29 + pristine_git_object: fbf5bc114974bdca07d59dd0c0a1c4f8a8e5e570 examples: list_models_v1_models_get: speakeasy-default-list-models-v1-models-get: @@ -7997,10 +8525,10 @@ examples: connector_create_v1: speakeasy-default-connector-create-v1: requestBody: - application/json: {"name": "", "description": "unibody usually despite slushy wherever reward stingy from", "server": "https://royal-majority.net/"} + application/json: {"protocol": "mcp", "name": "", "description": "unibody usually despite slushy wherever reward stingy from", "server": "https://royal-majority.net/"} responses: "201": - application/json: {"id": "3633ef72-f5c6-4354-b510-7167244672aa", "name": "", "description": "why yahoo zany potentially", "created_at": "2024-05-03T05:17:01.129Z", "modified_at": "2025-09-26T20:42:01.861Z"} + application/json: {"id": "3633ef72-f5c6-4354-b510-7167244672aa", "name": "", "description": "why yahoo zany potentially", "created_at": "2024-05-03T05:17:01.129Z", "modified_at": "2025-09-26T20:42:01.861Z", "owner_type": 3, "visibility": "private", "private_tool_execution": true, "mistral": false} "422": application/json: {} connector_list_v1: @@ -8034,9 +8562,10 @@ examples: query: fetch_customer_data: false fetch_connection_secrets: false + fetch_user_data: false responses: "200": - application/json: {"id": "f6d4a827-9530-4a4c-af7f-ac5d6264abbf", "name": "", "description": "diversity nudge pulverize offensively", "created_at": "2024-12-11T18:18:39.930Z", "modified_at": "2026-11-21T21:28:01.899Z"} + application/json: {"id": "f6d4a827-9530-4a4c-af7f-ac5d6264abbf", "name": "", "description": "diversity nudge pulverize offensively", "created_at": "2024-12-11T18:18:39.930Z", "modified_at": "2026-11-21T21:28:01.899Z", "owner_type": 4, "visibility": "shared_org", "private_tool_execution": false, "mistral": false} "422": application/json: {} connector_update_v1: @@ -8048,7 +8577,7 @@ examples: application/json: {} responses: "200": - application/json: {"id": "987e4f32-6930-41a7-8adf-6e893eddc3d9", "name": "", "description": "especially usually collaborate likewise svelte tightly very", "created_at": "2026-09-13T13:33:05.718Z", "modified_at": "2026-06-23T06:11:22.023Z"} + application/json: {"id": "987e4f32-6930-41a7-8adf-6e893eddc3d9", "name": "", "description": "especially usually collaborate likewise svelte tightly very", "created_at": "2026-09-13T13:33:05.718Z", "modified_at": "2026-06-23T06:11:22.023Z", "owner_type": 3, "visibility": "shared_global", "private_tool_execution": false, "mistral": false} "422": application/json: {} connector_delete_v1: @@ -8473,6 +9002,8 @@ examples: responses: "200": application/json: {"schedules": []} + "422": + application/json: {} schedule_workflow_v1_workflows_schedules_post: speakeasy-default-schedule-workflow-v1-workflows-schedules-post: requestBody: @@ -8576,7 +9107,7 @@ examples: fetch_default: false responses: "200": - application/json: {"credentials": [{"name": "", "authentication_type": "oauth2", "is_default": false}]} + application/json: {"credentials": [{"name": "", "authentication_type": "oauth2", "scope": "workspace", "is_default": false}]} "422": application/json: {} connector_create_or_update_organization_credentials_v1: @@ -8714,16 +9245,147 @@ examples: responses: "422": application/json: {} + libraries_patch_v1: + speakeasy-default-libraries-patch-v1: + parameters: + path: + library_id: "74a30b7a-ba52-49f7-a8a3-7157e1adf565" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "29be96b0-9e62-49f2-ad68-ea214dda839a", "name": "", "created_at": "2025-01-03T19:54:12.078Z", "updated_at": "2025-08-14T09:50:03.685Z", "owner_id": "5d60a792-57b9-45a8-9099-d3a656c15c5e", "owner_type": "", "total_size": 102530, "nb_documents": 298019, "chunk_size": 87858} + "422": + application/json: {} + libraries_documents_patch_v1: + speakeasy-default-libraries-documents-patch-v1: + parameters: + path: + library_id: "2a41249e-52ca-4436-b755-25ce3a9bfb53" + document_id: "bc26fa54-e5d9-4269-bedf-86bed5471c7d" + requestBody: + application/json: {} + responses: + "200": + application/json: {"id": "765f96ad-ca4d-443c-8614-0787ad1baedc", "library_id": "3ef9de21-c727-4a66-8495-9174b23092a7", "hash": "", "mime_type": "", "extension": null, "size": 756040, "name": "", "created_at": "2026-06-24T13:02:34.703Z", "process_status": "noop", "uploaded_by_id": "7048d94f-55be-4b1f-ab73-3f0f5a005ed9", "uploaded_by_type": "", "processing_status": "", "tokens_processing_total": 943369} + "422": + application/json: {} + connector_activate_for_organization_v1: + speakeasy-default-connector-activate-for-organization-v1: + parameters: + path: + connector_id: "a91bb4ec-caab-4cf2-be03-84b8343f4643" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_deactivate_for_organization_v1: + speakeasy-default-connector-deactivate-for-organization-v1: + parameters: + path: + connector_id: "8f4c1089-2a37-44b3-a3c4-830ca7a0e439" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_activate_for_workspace_v1: + speakeasy-default-connector-activate-for-workspace-v1: + parameters: + path: + connector_id: "2adfa8af-3618-41a9-8980-e5ea1486e58e" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_deactivate_for_workspace_v1: + speakeasy-default-connector-deactivate-for-workspace-v1: + parameters: + path: + connector_id: "15b00e98-a9e7-4582-b0fc-87d28c3dac04" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_activate_for_user_v1: + speakeasy-default-connector-activate-for-user-v1: + parameters: + path: + connector_id: "cd4fb4d2-de68-451f-8f2a-57fe39b33d96" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + connector_deactivate_for_user_v1: + speakeasy-default-connector-deactivate-for-user-v1: + parameters: + path: + connector_id: "99c6ed86-e6bb-40ed-b6ee-d22ba791a68f" + responses: + "200": + application/json: {"message": ""} + "422": + application/json: {} + get_search_indexes_v1_rag_search_index_get: + speakeasy-default-get-search-indexes-v1-rag-search-index-get: + responses: + "200": + application/json: [{"id": "07d38908-4a10-4d0f-96d0-001229ae40a6", "name": "", "creator_id": "", "document_count": 47250, "status": "online", "created_at": "2025-05-05T18:06:12.781Z", "modified_at": "2024-11-11T19:44:30.545Z", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "schemas": []}}] + register_search_index_v1_rag_search_index_put: + speakeasy-default-register-search-index-v1-rag-search-index-put: + requestBody: + application/json: {"name": "", "status": "offline", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "schemas": []}} + responses: + "200": + application/json: {"id": "aeab57c4-7bc2-4d90-b739-da6d58fffa60", "name": "", "creator_id": "", "document_count": 577632, "status": "offline", "created_at": "2024-12-18T16:38:29.006Z", "modified_at": "2025-12-02T12:13:54.773Z", "index": {"type": "vespa", "k8s_cluster": "", "k8s_namespace": "", "vespa_instance_name": "", "schemas": [{"name": "", "document_count": 745815}]}} + "422": + application/json: {} + bulk_archive_workflows_v1_workflows_archive_put: + speakeasy-default-bulk-archive-workflows-v1-workflows-archive-put: + requestBody: + application/json: {"workflow_ids": []} + responses: + "200": + application/json: {"archived": [{"id": "7d8a39b0-ac85-4a75-bc3c-a21d9d086958", "name": "", "display_name": "Dominic_Wisozk95", "type": "code", "customer_id": "85b3fb51-c815-4b9e-b51b-8d81a405b5e3", "workspace_id": "7dd61975-6390-409d-b7f3-839b110cbb97", "available_in_chat_assistant": false, "is_technical": false, "on_behalf_of": false, "archived": false}]} + "422": + application/json: {} + bulk_unarchive_workflows_v1_workflows_unarchive_put: + speakeasy-default-bulk-unarchive-workflows-v1-workflows-unarchive-put: + requestBody: + application/json: {"workflow_ids": []} + responses: + "200": + application/json: {"unarchived": []} + "422": + application/json: {} + get_schedule_v1_workflows_schedules__schedule_id__get: + speakeasy-default-get-schedule-v1-workflows-schedules-schedule-id-get: + parameters: + path: + schedule_id: "" + responses: + "200": + application/json: {"input": "", "schedule_id": "", "workflow_name": "", "paused": false} + "422": + application/json: {} + update_schedule_v1_workflows_schedules__schedule_id__patch: + speakeasy-default-update-schedule-v1-workflows-schedules-schedule-id-patch: + parameters: + path: + schedule_id: "" + requestBody: + application/json: {"schedule": {}} + responses: + "200": + application/json: {"schedule_id": ""} + "422": + application/json: {} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: | - ## Python SDK Changes: - * `mistral.workflows.executions.stream()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) - * `mistral.workflows.events.get_stream_events()`: `response.[].data.data` **Changed** (Breaking ⚠️) - * `mistral.workflows.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) - * `mistral.events.get_stream_events()`: `response.[].data.data.union(CustomTaskInProgressResponse).attributes.payload` **Changed** (Breaking ⚠️) - * `mistral.events.get_workflow_events()`: `response.events[]` **Changed** (Breaking ⚠️) - * `mistral.beta.connectors.get_authentication_methods()`: `response.[].has_default_credentials` **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a246d5a7..86507823 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.4.5 + version: 2.4.7 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7d463029..f5b175a6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,10 +16,11 @@ sources: - speakeasy-mistralai-gcp-sdk-26292830187-1 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6b325264f8e8a60caa875776438b07d4eb5b56283da0796b283e9c5597810e22 - sourceBlobDigest: sha256:11d21b003c903f5539d5d7a79cf8fe17d1d284b48e47da0009eac3866ad58899 + sourceRevisionDigest: sha256:0e18f147a374ca3cc89ea5d05181e8e333f2724201da419e1cccf59192285a9e + sourceBlobDigest: sha256:e2a240443dcc2f25c798e66ba4ba17caec1e7fd80ccca52112e058d08e293e4d tags: - latest + - speakeasy-mistralai-sdk-26292816554-1 targets: mistralai-azure-sdk: source: mistral-azure-source @@ -38,10 +39,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:6b325264f8e8a60caa875776438b07d4eb5b56283da0796b283e9c5597810e22 - sourceBlobDigest: sha256:11d21b003c903f5539d5d7a79cf8fe17d1d284b48e47da0009eac3866ad58899 + sourceRevisionDigest: sha256:0e18f147a374ca3cc89ea5d05181e8e333f2724201da419e1cccf59192285a9e + sourceBlobDigest: sha256:e2a240443dcc2f25c798e66ba4ba17caec1e7fd80ccca52112e058d08e293e4d codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:95c443855a95966259bd108beec0cbdb8238f6f753dc4b021bf833d398e86c0c + codeSamplesRevisionDigest: sha256:33fc2a349a4e8dfc5211c638cc2c36585d844ba4bd7ebfb2fa17cbe5477a9d34 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.763.6 diff --git a/README.md b/README.md index 2a3bedff..31e0eeb0 100644 --- a/README.md +++ b/README.md @@ -513,6 +513,12 @@ print(res.choices[0].message.content) * [create](docs/sdks/connectors/README.md#create) - Create a new connector. * [list](docs/sdks/connectors/README.md#list) - List all connectors. * [get_auth_url](docs/sdks/connectors/README.md#get_auth_url) - Get the auth URL for a connector. +* [activate_for_organization](docs/sdks/connectors/README.md#activate_for_organization) - Activate a connector for an organization. +* [deactivate_for_organization](docs/sdks/connectors/README.md#deactivate_for_organization) - Deactivate a connector for an organization. +* [activate_for_workspace](docs/sdks/connectors/README.md#activate_for_workspace) - Activate a connector for a workspace. +* [deactivate_for_workspace](docs/sdks/connectors/README.md#deactivate_for_workspace) - Deactivate a connector for a workspace. +* [activate_for_user](docs/sdks/connectors/README.md#activate_for_user) - Activate a connector for the current user. +* [deactivate_for_user](docs/sdks/connectors/README.md#deactivate_for_user) - Deactivate a connector for the current user. * [call_tool](docs/sdks/connectors/README.md#call_tool) - Call Connector Tool * [list_tools](docs/sdks/connectors/README.md#list_tools) - List tools for a connector. * [get_authentication_methods](docs/sdks/connectors/README.md#get_authentication_methods) - Get authentication methods for a connector. @@ -550,6 +556,7 @@ print(res.choices[0].message.content) * [get](docs/sdks/libraries/README.md#get) - Detailed information about a specific Library. * [delete](docs/sdks/libraries/README.md#delete) - Delete a library and all of it's document. * [update](docs/sdks/libraries/README.md#update) - Update a library. +* [~~libraries_update_v1~~](docs/sdks/libraries/README.md#libraries_update_v1) - Update a library. :warning: **Deprecated** #### [Beta.Libraries.Accesses](docs/sdks/accesses/README.md) @@ -563,6 +570,7 @@ print(res.choices[0].message.content) * [upload](docs/sdks/documents/README.md#upload) - Upload a new document. * [get](docs/sdks/documents/README.md#get) - Retrieve the metadata of a specific document. * [update](docs/sdks/documents/README.md#update) - Update the metadata of a specific document. +* [~~libraries_documents_update_v1~~](docs/sdks/documents/README.md#libraries_documents_update_v1) - Update the metadata of a specific document. :warning: **Deprecated** * [delete](docs/sdks/documents/README.md#delete) - Delete a document. * [text_content](docs/sdks/documents/README.md#text_content) - Retrieve the text content of a specific document. * [status](docs/sdks/documents/README.md#status) - Retrieve the processing status of a specific document. @@ -635,6 +643,11 @@ print(res.choices[0].message.content) * [register](docs/sdks/ingestionpipelineconfigurations/README.md#register) - Register Config * [update_run_info](docs/sdks/ingestionpipelineconfigurations/README.md#update_run_info) - Update Run Info +### [Beta.Rag.SearchIndexes](docs/sdks/searchindexes/README.md) + +* [list](docs/sdks/searchindexes/README.md#list) - Get Search Indexes +* [register](docs/sdks/searchindexes/README.md#register) - Register Search Index + ### [Chat](docs/sdks/chat/README.md) * [complete](docs/sdks/chat/README.md#complete) - Chat Completion @@ -700,6 +713,8 @@ print(res.choices[0].message.content) * [get_workflow](docs/sdks/workflows/README.md#get_workflow) - Get Workflow * [update_workflow](docs/sdks/workflows/README.md#update_workflow) - Update Workflow * [get_workflow_registration](docs/sdks/workflows/README.md#get_workflow_registration) - Get Workflow Registration +* [bulk_archive_workflows](docs/sdks/workflows/README.md#bulk_archive_workflows) - Bulk Archive Workflows +* [bulk_unarchive_workflows](docs/sdks/workflows/README.md#bulk_unarchive_workflows) - Bulk Unarchive Workflows * [archive_workflow](docs/sdks/workflows/README.md#archive_workflow) - Archive Workflow * [unarchive_workflow](docs/sdks/workflows/README.md#unarchive_workflow) - Unarchive Workflow @@ -744,7 +759,9 @@ print(res.choices[0].message.content) * [get_schedules](docs/sdks/schedules/README.md#get_schedules) - Get Schedules * [schedule_workflow](docs/sdks/schedules/README.md#schedule_workflow) - Schedule Workflow +* [get_schedule](docs/sdks/schedules/README.md#get_schedule) - Get Schedule * [unschedule_workflow](docs/sdks/schedules/README.md#unschedule_workflow) - Unschedule Workflow +* [update_schedule](docs/sdks/schedules/README.md#update_schedule) - Update Schedule * [pause_schedule](docs/sdks/schedules/README.md#pause_schedule) - Pause Schedule * [resume_schedule](docs/sdks/schedules/README.md#resume_schedule) - Resume Schedule @@ -958,8 +975,8 @@ with Mistral( **Inherit from [`MistralError`](./src/mistralai/client/errors/mistralerror.py)**: -* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 116 of 183 methods.* -* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 183 methods.* +* [`HTTPValidationError`](./src/mistralai/client/errors/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 130 of 197 methods.* +* [`ObservabilityError`](./src/mistralai/client/errors/observabilityerror.py): Bad Request - Invalid request parameters or data. Applicable to 41 of 197 methods.* * [`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. diff --git a/RELEASES.md b/RELEASES.md index 2f69eacf..f21a0dc2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -638,4 +638,14 @@ Based on: ### Generated - [python v2.4.5] . ### Releases -- [PyPI v2.4.5] https://pypi.org/project/mistralai/2.4.5 - . \ No newline at end of file +- [PyPI v2.4.5] https://pypi.org/project/mistralai/2.4.5 - . + +## 2026-05-22 14:12:57 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.6 (2.884.13) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.4.7] . +### Releases +- [PyPI v2.4.7] https://pypi.org/project/mistralai/2.4.7 - . \ No newline at end of file diff --git a/docs/models/authenticationconfiguration.md b/docs/models/authenticationconfiguration.md index 6644875e..cdd1e55f 100644 --- a/docs/models/authenticationconfiguration.md +++ b/docs/models/authenticationconfiguration.md @@ -7,4 +7,5 @@ | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `authentication_type` | [models.OutboundAuthenticationType](../models/outboundauthenticationtype.md) | :heavy_check_mark: | N/A | +| `scope` | [models.ConsumerType](../models/consumertype.md) | :heavy_check_mark: | N/A | | `is_default` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/clientcapabilities.md b/docs/models/clientcapabilities.md new file mode 100644 index 00000000..236bb0c4 --- /dev/null +++ b/docs/models/clientcapabilities.md @@ -0,0 +1,15 @@ +# ClientCapabilities + +Capabilities a client may support. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `experimental` | Dict[str, Dict[str, *Any*]] | :heavy_minus_sign: | N/A | +| `sampling` | [OptionalNullable[models.SamplingCapability]](../models/samplingcapability.md) | :heavy_minus_sign: | N/A | +| `elicitation` | [OptionalNullable[models.ElicitationCapability]](../models/elicitationcapability.md) | :heavy_minus_sign: | N/A | +| `roots` | [OptionalNullable[models.RootsCapability]](../models/rootscapability.md) | :heavy_minus_sign: | N/A | +| `tasks` | [OptionalNullable[models.ClientTasksCapability]](../models/clienttaskscapability.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/clienttaskscapability.md b/docs/models/clienttaskscapability.md new file mode 100644 index 00000000..9008ba61 --- /dev/null +++ b/docs/models/clienttaskscapability.md @@ -0,0 +1,13 @@ +# ClientTasksCapability + +Capability for client tasks operations. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `list` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `cancel` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `requests` | [OptionalNullable[models.ClientTasksRequestsCapability]](../models/clienttasksrequestscapability.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/clienttasksrequestscapability.md b/docs/models/clienttasksrequestscapability.md new file mode 100644 index 00000000..8dac48a4 --- /dev/null +++ b/docs/models/clienttasksrequestscapability.md @@ -0,0 +1,12 @@ +# ClientTasksRequestsCapability + +Capability for tasks requests operations. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `sampling` | [OptionalNullable[models.TasksSamplingCapability]](../models/taskssamplingcapability.md) | :heavy_minus_sign: | N/A | +| `elicitation` | [OptionalNullable[models.TasksElicitationCapability]](../models/taskselicitationcapability.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectionconfigtype.md b/docs/models/connectionconfigtype.md new file mode 100644 index 00000000..8db3ea64 --- /dev/null +++ b/docs/models/connectionconfigtype.md @@ -0,0 +1,19 @@ +# ConnectionConfigType + +## Example Usage + +```python +from mistralai.client.models import ConnectionConfigType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ConnectionConfigType = "mcp" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"mcp"` +- `"turbine"` +- `"eolienne"` diff --git a/docs/models/turbinetoolmeta.md b/docs/models/connectionpreference.md similarity index 65% rename from docs/models/turbinetoolmeta.md rename to docs/models/connectionpreference.md index 2f61a2c4..e069233f 100644 --- a/docs/models/turbinetoolmeta.md +++ b/docs/models/connectionpreference.md @@ -1,11 +1,11 @@ -# TurbineToolMeta +# ConnectionPreference ## Fields | Field | Type | Required | Description | | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `locale` | [OptionalNullable[models.TurbineToolLocale]](../models/turbinetoollocale.md) | :heavy_minus_sign: | N/A | -| `tool_type` | [OptionalNullable[models.ToolType]](../models/tooltype.md) | :heavy_minus_sign: | N/A | -| `timeout` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | -| `private_execution` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `name` | *str* | :heavy_check_mark: | N/A | +| `tool_configuration` | [models.ToolExecutionConfiguration](../models/toolexecutionconfiguration.md) | :heavy_check_mark: | N/A | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `consumer_type` | [OptionalNullable[models.ConsumerType]](../models/consumertype.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connector.md b/docs/models/connector.md index 29f8ad07..45aafa1e 100644 --- a/docs/models/connector.md +++ b/docs/models/connector.md @@ -3,13 +3,30 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *str* | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `auth_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `protocol` | [Optional[models.ConnectorProtocol]](../models/connectorprotocol.md) | :heavy_minus_sign: | N/A | +| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `server_card` | [OptionalNullable[models.MCPServerCard]](../models/mcpservercard.md) | :heavy_minus_sign: | N/A | +| `owner_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `owner_type` | [models.ResourceType](../models/resourcetype.md) | :heavy_check_mark: | N/A | +| `visibility` | [models.ResourceVisibility](../models/resourcevisibility.md) | :heavy_check_mark: | N/A | +| `locale` | [OptionalNullable[models.ConnectorLocale]](../models/connectorlocale.md) | :heavy_minus_sign: | N/A | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `supported_auth_methods` | List[[models.PublicAuthenticationMethod](../models/publicauthenticationmethod.md)] | :heavy_minus_sign: | N/A | +| `connection_preferences` | List[[models.ConnectionPreference](../models/connectionpreference.md)] | :heavy_minus_sign: | N/A | +| `connection_credentials` | List[[models.AuthenticationConfiguration](../models/authenticationconfiguration.md)] | :heavy_minus_sign: | N/A | +| `active` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `private_tool_execution` | *bool* | :heavy_check_mark: | N/A | +| `mistral` | *Optional[bool]* | :heavy_minus_sign: | N/A | +| `is_authenticated` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `tools` | List[[models.ConnectorTool](../models/connectortool.md)] | :heavy_minus_sign: | N/A | +| `system_prompt_route` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `connection_config` | [OptionalNullable[models.PublicConnectionConfig]](../models/publicconnectionconfig.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectoractivatefororganizationv1request.md b/docs/models/connectoractivatefororganizationv1request.md new file mode 100644 index 00000000..40469996 --- /dev/null +++ b/docs/models/connectoractivatefororganizationv1request.md @@ -0,0 +1,9 @@ +# ConnectorActivateForOrganizationV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `tool_execution_configuration` | [OptionalNullable[models.ToolExecutionConfiguration]](../models/toolexecutionconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectoractivateforuserv1request.md b/docs/models/connectoractivateforuserv1request.md new file mode 100644 index 00000000..bdf73b8a --- /dev/null +++ b/docs/models/connectoractivateforuserv1request.md @@ -0,0 +1,9 @@ +# ConnectorActivateForUserV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `tool_execution_configuration` | [OptionalNullable[models.ToolExecutionConfiguration]](../models/toolexecutionconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectoractivateforworkspacev1request.md b/docs/models/connectoractivateforworkspacev1request.md new file mode 100644 index 00000000..e4dbaf1d --- /dev/null +++ b/docs/models/connectoractivateforworkspacev1request.md @@ -0,0 +1,9 @@ +# ConnectorActivateForWorkspaceV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `tool_execution_configuration` | [OptionalNullable[models.ToolExecutionConfiguration]](../models/toolexecutionconfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeactivatefororganizationv1request.md b/docs/models/connectordeactivatefororganizationv1request.md new file mode 100644 index 00000000..1fd64004 --- /dev/null +++ b/docs/models/connectordeactivatefororganizationv1request.md @@ -0,0 +1,8 @@ +# ConnectorDeactivateForOrganizationV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connector_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeactivateforuserv1request.md b/docs/models/connectordeactivateforuserv1request.md new file mode 100644 index 00000000..992603b0 --- /dev/null +++ b/docs/models/connectordeactivateforuserv1request.md @@ -0,0 +1,8 @@ +# ConnectorDeactivateForUserV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connector_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectordeactivateforworkspacev1request.md b/docs/models/connectordeactivateforworkspacev1request.md new file mode 100644 index 00000000..15033f29 --- /dev/null +++ b/docs/models/connectordeactivateforworkspacev1request.md @@ -0,0 +1,8 @@ +# ConnectorDeactivateForWorkspaceV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connector_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorgetv1request.md b/docs/models/connectorgetv1request.md index c45148b9..35a6f393 100644 --- a/docs/models/connectorgetv1request.md +++ b/docs/models/connectorgetv1request.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `fetch_user_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the user-level data associated with the connector (e.g. connection credentials). | | `fetch_customer_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the customer data associated with the connector (e.g. customer secrets / config). | -| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch the general connection secrets associated with the connector. | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/connectorlocale.md b/docs/models/connectorlocale.md new file mode 100644 index 00000000..c2e7cf5b --- /dev/null +++ b/docs/models/connectorlocale.md @@ -0,0 +1,10 @@ +# ConnectorLocale + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `description` | Dict[str, *str*] | :heavy_check_mark: | N/A | +| `usage_sentence` | Dict[str, *str*] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/tooltype.md b/docs/models/connectorprotocol.md similarity index 56% rename from docs/models/tooltype.md rename to docs/models/connectorprotocol.md index 2a64e130..77d28458 100644 --- a/docs/models/tooltype.md +++ b/docs/models/connectorprotocol.md @@ -1,12 +1,12 @@ -# ToolType +# ConnectorProtocol ## Example Usage ```python -from mistralai.client.models import ToolType +from mistralai.client.models import ConnectorProtocol # Open enum: unrecognized values are captured as UnrecognizedStr -value: ToolType = "rag" +value: ConnectorProtocol = "mcp" ``` @@ -14,7 +14,6 @@ value: ToolType = "rag" This is an open enum. Unrecognized values will not fail type checks. -- `"rag"` -- `"image"` -- `"code"` -- `"event"` +- `"mcp"` +- `"http"` +- `"turbine"` diff --git a/docs/models/connectorsqueryfilters.md b/docs/models/connectorsqueryfilters.md index aea47e14..37c19e7a 100644 --- a/docs/models/connectorsqueryfilters.md +++ b/docs/models/connectorsqueryfilters.md @@ -5,5 +5,4 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `active` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter for active connectors for a given user, workspace and organization. | -| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch connection secrets. | \ No newline at end of file +| `active` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter for active connectors for a given user, workspace and organization. | \ No newline at end of file diff --git a/docs/models/consumertype.md b/docs/models/consumertype.md new file mode 100644 index 00000000..9ac4df3f --- /dev/null +++ b/docs/models/consumertype.md @@ -0,0 +1,20 @@ +# ConsumerType + +## Example Usage + +```python +from mistralai.client.models import ConsumerType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: ConsumerType = "user" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"user"` +- `"org"` +- `"workspace"` +- `"system"` diff --git a/docs/models/createconnectorrequest.md b/docs/models/createconnectorrequest.md index 111c460a..eb14f585 100644 --- a/docs/models/createconnectorrequest.md +++ b/docs/models/createconnectorrequest.md @@ -5,6 +5,7 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `protocol` | *Optional[Literal["mcp"]]* | :heavy_minus_sign: | N/A | | `name` | *str* | :heavy_check_mark: | The name of the connector. Should be 64 char length maximum, alphanumeric, only underscores/dashes. | | `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | | `description` | *str* | :heavy_check_mark: | The description of the connector. | diff --git a/docs/models/createlibraryrequest.md b/docs/models/createlibraryrequest.md index 07ff97d0..fd94c1ca 100644 --- a/docs/models/createlibraryrequest.md +++ b/docs/models/createlibraryrequest.md @@ -7,5 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | +| ~~`chunk_size`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | | `owner_type` | [OptionalNullable[models.OwnerType]](../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | \ No newline at end of file diff --git a/docs/models/createsearchindexinforequest.md b/docs/models/createsearchindexinforequest.md new file mode 100644 index 00000000..64b22aa4 --- /dev/null +++ b/docs/models/createsearchindexinforequest.md @@ -0,0 +1,11 @@ +# CreateSearchIndexInfoRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[models.CreateSearchIndexInfoRequestStatus]](../models/createsearchindexinforequeststatus.md) | :heavy_minus_sign: | N/A | +| `index` | [models.CreateSearchIndexInfoRequestIndex](../models/createsearchindexinforequestindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/createsearchindexinforequestindex.md b/docs/models/createsearchindexinforequestindex.md new file mode 100644 index 00000000..42d99fcb --- /dev/null +++ b/docs/models/createsearchindexinforequestindex.md @@ -0,0 +1,11 @@ +# CreateSearchIndexInfoRequestIndex + + +## Supported Types + +### `models.CreateVespaSearchIndexInfoRequest` + +```python +value: models.CreateVespaSearchIndexInfoRequest = /* values here */ +``` + diff --git a/docs/models/createsearchindexinforequeststatus.md b/docs/models/createsearchindexinforequeststatus.md new file mode 100644 index 00000000..1e477acc --- /dev/null +++ b/docs/models/createsearchindexinforequeststatus.md @@ -0,0 +1,14 @@ +# CreateSearchIndexInfoRequestStatus + +## Example Usage + +```python +from mistralai.client.models import CreateSearchIndexInfoRequestStatus +value: CreateSearchIndexInfoRequestStatus = "online" +``` + + +## Values + +- `"online"` +- `"offline"` diff --git a/docs/models/createvespaschemarequest.md b/docs/models/createvespaschemarequest.md new file mode 100644 index 00000000..3098a2b9 --- /dev/null +++ b/docs/models/createvespaschemarequest.md @@ -0,0 +1,9 @@ +# CreateVespaSchemaRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/createvespasearchindexinforequest.md b/docs/models/createvespasearchindexinforequest.md new file mode 100644 index 00000000..0bd47c38 --- /dev/null +++ b/docs/models/createvespasearchindexinforequest.md @@ -0,0 +1,12 @@ +# CreateVespaSearchIndexInfoRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | +| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | +| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | +| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | +| `schemas` | List[[models.CreateVespaSchemaRequest](../models/createvespaschemarequest.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/document.md b/docs/models/document.md index 42c639a6..ff0238ea 100644 --- a/docs/models/document.md +++ b/docs/models/document.md @@ -3,25 +3,26 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `hash` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `mime_type` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `extension` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `size` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `summary` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `last_processed_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | -| `number_of_pages` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | -| `uploaded_by_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `uploaded_by_type` | *str* | :heavy_check_mark: | N/A | -| `tokens_processing_main_content` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tokens_processing_summary` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `attributes` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | -| `processing_status` | *str* | :heavy_check_mark: | N/A | -| `tokens_processing_total` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| ~~`hash`~~ | *Nullable[str]* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `mime_type` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `extension` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `size` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `summary` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `last_processed_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A | +| `number_of_pages` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | +| `uploaded_by_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `uploaded_by_type` | *str* | :heavy_check_mark: | N/A | +| ~~`tokens_processing_main_content`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`tokens_processing_summary`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | +| ~~`processing_status`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `tokens_processing_total` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/elicitationcapability.md b/docs/models/elicitationcapability.md new file mode 100644 index 00000000..c2f8fab6 --- /dev/null +++ b/docs/models/elicitationcapability.md @@ -0,0 +1,14 @@ +# ElicitationCapability + +Capability for elicitation operations. + +Clients must support at least one mode (form or url). + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `form` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `url` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/encryptedpatchvalue.md b/docs/models/encryptedpatchvalue.md new file mode 100644 index 00000000..1d5988b4 --- /dev/null +++ b/docs/models/encryptedpatchvalue.md @@ -0,0 +1,16 @@ +# EncryptedPatchValue + +Wrapper for encrypted patch values in selective json_patch encryption. + +When partial encryption mode is enabled and a patch targets an EncryptedStrField, +the patch value is encrypted and wrapped in this structure. + +The type field acts as a discriminator to distinguish this from user data. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `type` | *Literal["__encrypted__"]* | :heavy_check_mark: | N/A | +| `value` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/expression.md b/docs/models/expression.md new file mode 100644 index 00000000..d7de83a9 --- /dev/null +++ b/docs/models/expression.md @@ -0,0 +1,23 @@ +# Expression + + +## Supported Types + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + +### `models.LogicalExpression` + +```python +value: models.LogicalExpression = /* values here */ +``` + +### `models.ToolProperties` + +```python +value: models.ToolProperties = /* values here */ +``` + diff --git a/docs/models/getschedulesv1workflowsschedulesgetrequest.md b/docs/models/getschedulesv1workflowsschedulesgetrequest.md new file mode 100644 index 00000000..d510c27d --- /dev/null +++ b/docs/models/getschedulesv1workflowsschedulesgetrequest.md @@ -0,0 +1,12 @@ +# GetSchedulesV1WorkflowsSchedulesGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `workflow_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user ID. Pass 'current' to resolve to the authenticated user's ID. | +| `status` | [OptionalNullable[models.GetSchedulesV1WorkflowsSchedulesGetStatus]](../models/getschedulesv1workflowsschedulesgetstatus.md) | :heavy_minus_sign: | Filter by schedule status: 'active' or 'paused' | +| `page_size` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of items per page. Omitting this parameter fetches all results at once (deprecated — pass page_size to use pagination). | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | \ No newline at end of file diff --git a/docs/models/getschedulesv1workflowsschedulesgetresponse.md b/docs/models/getschedulesv1workflowsschedulesgetresponse.md new file mode 100644 index 00000000..20adb3c0 --- /dev/null +++ b/docs/models/getschedulesv1workflowsschedulesgetresponse.md @@ -0,0 +1,8 @@ +# GetSchedulesV1WorkflowsSchedulesGetResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `result` | [models.WorkflowScheduleListResponse](../models/workflowschedulelistresponse.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/getschedulesv1workflowsschedulesgetstatus.md b/docs/models/getschedulesv1workflowsschedulesgetstatus.md new file mode 100644 index 00000000..312db2cd --- /dev/null +++ b/docs/models/getschedulesv1workflowsschedulesgetstatus.md @@ -0,0 +1,16 @@ +# GetSchedulesV1WorkflowsSchedulesGetStatus + +Filter by schedule status: 'active' or 'paused' + +## Example Usage + +```python +from mistralai.client.models import GetSchedulesV1WorkflowsSchedulesGetStatus +value: GetSchedulesV1WorkflowsSchedulesGetStatus = "active" +``` + + +## Values + +- `"active"` +- `"paused"` diff --git a/docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md b/docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md new file mode 100644 index 00000000..e681e674 --- /dev/null +++ b/docs/models/getschedulev1workflowsschedulesscheduleidgetrequest.md @@ -0,0 +1,8 @@ +# GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/jsonpatchappend.md b/docs/models/jsonpatchappend.md index 684cc896..903d6c71 100644 --- a/docs/models/jsonpatchappend.md +++ b/docs/models/jsonpatchappend.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `path` | *str* | :heavy_check_mark: | A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations. | -| `value` | *str* | :heavy_check_mark: | The value to use for the operation. A string to append to the existing value | +| `value` | [models.JSONPatchAppendValue](../models/jsonpatchappendvalue.md) | :heavy_check_mark: | The value to use for the operation. A string to append to the existing value, or an EncryptedPatchValue wrapper when encryption is applied. | | `op` | *Literal["append"]* | :heavy_check_mark: | 'append' is an extension for efficient string concatenation in streaming scenarios. | \ No newline at end of file diff --git a/docs/models/jsonpatchappendvalue.md b/docs/models/jsonpatchappendvalue.md new file mode 100644 index 00000000..551cafe1 --- /dev/null +++ b/docs/models/jsonpatchappendvalue.md @@ -0,0 +1,19 @@ +# JSONPatchAppendValue + +The value to use for the operation. A string to append to the existing value, or an EncryptedPatchValue wrapper when encryption is applied. + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `models.EncryptedPatchValue` + +```python +value: models.EncryptedPatchValue = /* values here */ +``` + diff --git a/docs/models/librariesdocumentslistv1request.md b/docs/models/librariesdocumentslistv1request.md index 44f63001..6149336f 100644 --- a/docs/models/librariesdocumentslistv1request.md +++ b/docs/models/librariesdocumentslistv1request.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `filters_attributes` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| ~~`filters_attributes`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/librariesdocumentspatchv1request.md b/docs/models/librariesdocumentspatchv1request.md new file mode 100644 index 00000000..511aee46 --- /dev/null +++ b/docs/models/librariesdocumentspatchv1request.md @@ -0,0 +1,10 @@ +# LibrariesDocumentsPatchV1Request + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `update_document_request` | [models.UpdateDocumentRequest](../models/updatedocumentrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/librarieslistv1request.md b/docs/models/librarieslistv1request.md index 37352ee1..5efdb897 100644 --- a/docs/models/librarieslistv1request.md +++ b/docs/models/librarieslistv1request.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | -| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | +| ~~`filter_owned_by_me`~~ | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | \ No newline at end of file diff --git a/docs/models/librariespatchv1request.md b/docs/models/librariespatchv1request.md new file mode 100644 index 00000000..47648086 --- /dev/null +++ b/docs/models/librariespatchv1request.md @@ -0,0 +1,9 @@ +# LibrariesPatchV1Request + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `update_library_request` | [models.UpdateLibraryRequest](../models/updatelibraryrequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/library.md b/docs/models/library.md index a07d3afa..5b9aa658 100644 --- a/docs/models/library.md +++ b/docs/models/library.md @@ -3,21 +3,21 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `name` | *str* | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `owner_type` | *str* | :heavy_check_mark: | N/A | -| `total_size` | *int* | :heavy_check_mark: | N/A | -| `nb_documents` | *int* | :heavy_check_mark: | N/A | -| `chunk_size` | *Nullable[int]* | :heavy_check_mark: | N/A | -| `emoji` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `generated_description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `explicit_user_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `explicit_workspace_members_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| ~~`org_sharing_role`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | -| `generated_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Generated Name | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `owner_id` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `owner_type` | *str* | :heavy_check_mark: | N/A | +| `total_size` | *int* | :heavy_check_mark: | N/A | +| `nb_documents` | *int* | :heavy_check_mark: | N/A | +| ~~`chunk_size`~~ | *Nullable[int]* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`emoji`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| ~~`generated_description`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`explicit_user_members_count`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`explicit_workspace_members_count`~~ | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`org_sharing_role`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`generated_name`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Generated Name | \ No newline at end of file diff --git a/docs/models/logicalexpression.md b/docs/models/logicalexpression.md new file mode 100644 index 00000000..675368e7 --- /dev/null +++ b/docs/models/logicalexpression.md @@ -0,0 +1,9 @@ +# LogicalExpression + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `type` | [models.LogicalExpressionType](../models/logicalexpressiontype.md) | :heavy_check_mark: | N/A | +| `expressions` | List[[models.Expression](../models/expression.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/visibility.md b/docs/models/logicalexpressiontype.md similarity index 56% rename from docs/models/visibility.md rename to docs/models/logicalexpressiontype.md index 924f2bdd..0d3c1f78 100644 --- a/docs/models/visibility.md +++ b/docs/models/logicalexpressiontype.md @@ -1,12 +1,12 @@ -# Visibility +# LogicalExpressionType ## Example Usage ```python -from mistralai.client.models import Visibility +from mistralai.client.models import LogicalExpressionType # Open enum: unrecognized values are captured as UnrecognizedStr -value: Visibility = "model" +value: LogicalExpressionType = "and" ``` @@ -14,5 +14,5 @@ value: Visibility = "model" This is an open enum. Unrecognized values will not fail type checks. -- `"model"` -- `"app"` +- `"and"` +- `"or"` diff --git a/docs/models/mcpprompt.md b/docs/models/mcpprompt.md new file mode 100644 index 00000000..b68d0046 --- /dev/null +++ b/docs/models/mcpprompt.md @@ -0,0 +1,14 @@ +# MCPPrompt + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `arguments` | List[[models.PromptArgument](../models/promptargument.md)] | :heavy_minus_sign: | N/A | +| `icons` | List[[models.MCPServerIcon](../models/mcpservericon.md)] | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpresource.md b/docs/models/mcpresource.md new file mode 100644 index 00000000..ac3d92a8 --- /dev/null +++ b/docs/models/mcpresource.md @@ -0,0 +1,17 @@ +# MCPResource + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `uri` | *str* | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `mime_type` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `size` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `icons` | List[[models.MCPServerIcon](../models/mcpservericon.md)] | :heavy_minus_sign: | N/A | +| `annotations` | [OptionalNullable[models.Annotations]](../models/annotations.md) | :heavy_minus_sign: | N/A | +| `meta` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpserverauthenticationrequirement.md b/docs/models/mcpserverauthenticationrequirement.md new file mode 100644 index 00000000..a3824be6 --- /dev/null +++ b/docs/models/mcpserverauthenticationrequirement.md @@ -0,0 +1,11 @@ +# MCPServerAuthenticationRequirement + +Authentication requirements for a remote transport (SEP-2127). + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `required` | *bool* | :heavy_check_mark: | Whether authentication is mandatory | +| `schemes` | List[*str*] | :heavy_minus_sign: | Supported schemes (e.g. ['bearer', 'oauth2']) | \ No newline at end of file diff --git a/docs/models/mcpservercard.md b/docs/models/mcpservercard.md new file mode 100644 index 00000000..ebc72b07 --- /dev/null +++ b/docs/models/mcpservercard.md @@ -0,0 +1,23 @@ +# MCPServerCard + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `dollar_schema` | *OptionalNullable[str]* | :heavy_minus_sign: | URL to the JSON schema definition | +| `name` | *str* | :heavy_check_mark: | Server identifier in reverse-DNS format with exactly one / | +| `version` | *str* | :heavy_check_mark: | Server version (semantic versioning preferred) | +| `capabilities` | [Optional[models.ServerCapabilities]](../models/servercapabilities.md) | :heavy_minus_sign: | Capabilities that a server may support. | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `website_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `repository` | [OptionalNullable[models.MCPServerRepository]](../models/mcpserverrepository.md) | :heavy_minus_sign: | N/A | +| `icons` | List[[models.MCPServerIcon](../models/mcpservericon.md)] | :heavy_minus_sign: | N/A | +| `remotes` | List[[models.MCPServerRemote](../models/mcpserverremote.md)] | :heavy_minus_sign: | N/A | +| `requires` | [OptionalNullable[models.ClientCapabilities]](../models/clientcapabilities.md) | :heavy_minus_sign: | N/A | +| `resources` | [OptionalNullable[models.Resources]](../models/resources.md) | :heavy_minus_sign: | N/A | +| `tools` | [OptionalNullable[models.Tools]](../models/tools.md) | :heavy_minus_sign: | N/A | +| `prompts` | [OptionalNullable[models.Prompts]](../models/prompts.md) | :heavy_minus_sign: | N/A | +| `meta` | [OptionalNullable[models.MCPServerCardMeta]](../models/mcpservercardmeta.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpservercardmeta.md b/docs/models/mcpservercardmeta.md new file mode 100644 index 00000000..52345bcf --- /dev/null +++ b/docs/models/mcpservercardmeta.md @@ -0,0 +1,13 @@ +# MCPServerCardMeta + +Typed _meta for MCP server cards. + +Only the 'turbine' field is typed. Other fields are allowed via extra="allow". + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `ai_mistral_turbine` | [OptionalNullable[models.TurbineMeta]](../models/turbinemeta.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpserverremote.md b/docs/models/mcpserverremote.md new file mode 100644 index 00000000..1c7c4de3 --- /dev/null +++ b/docs/models/mcpserverremote.md @@ -0,0 +1,14 @@ +# MCPServerRemote + +Remote transport endpoint (SEP-2127). + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `type` | [models.MCPServerRemoteType](../models/mcpserverremotetype.md) | :heavy_check_mark: | Transport type | +| `url` | *str* | :heavy_check_mark: | Transport endpoint URL | +| `supported_protocol_versions` | List[*str*] | :heavy_minus_sign: | N/A | +| `headers` | List[[models.MCPServerRemoteHeader](../models/mcpserverremoteheader.md)] | :heavy_minus_sign: | N/A | +| `authentication` | [OptionalNullable[models.MCPServerAuthenticationRequirement]](../models/mcpserverauthenticationrequirement.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpserverremoteheader.md b/docs/models/mcpserverremoteheader.md new file mode 100644 index 00000000..a3966a54 --- /dev/null +++ b/docs/models/mcpserverremoteheader.md @@ -0,0 +1,15 @@ +# MCPServerRemoteHeader + +Header definition for a remote transport (SEP-2127). + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `name` | *str* | :heavy_check_mark: | Header name | +| `description` | *str* | :heavy_check_mark: | Human-readable description of the header | +| `is_required` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `is_secret` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `default` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `choices` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpserverremotetype.md b/docs/models/mcpserverremotetype.md new file mode 100644 index 00000000..ea4585b6 --- /dev/null +++ b/docs/models/mcpserverremotetype.md @@ -0,0 +1,20 @@ +# MCPServerRemoteType + +Transport type + +## Example Usage + +```python +from mistralai.client.models import MCPServerRemoteType + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: MCPServerRemoteType = "streamable-http" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"streamable-http"` +- `"sse"` diff --git a/docs/models/mcpserverrepository.md b/docs/models/mcpserverrepository.md new file mode 100644 index 00000000..16fbdd18 --- /dev/null +++ b/docs/models/mcpserverrepository.md @@ -0,0 +1,12 @@ +# MCPServerRepository + +Source repository information (SEP-2127). + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `url` | *str* | :heavy_check_mark: | Repository URL | +| `source` | *str* | :heavy_check_mark: | Source identifier (e.g. 'github') | +| `subfolder` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcptoolmeta.md b/docs/models/mcptoolmeta.md index 23e8b64c..723f40b1 100644 --- a/docs/models/mcptoolmeta.md +++ b/docs/models/mcptoolmeta.md @@ -1,14 +1,17 @@ # MCPToolMeta -Typed _meta for MCP tools. - -Only the 'ui' field is typed. Other fields are allowed via extra="allow". - ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `ui` | [OptionalNullable[models.MCPUIToolMeta]](../models/mcpuitoolmeta.md) | :heavy_minus_sign: | N/A | -| `ai_mistral_turbine` | [OptionalNullable[models.TurbineToolMeta]](../models/turbinetoolmeta.md) | :heavy_minus_sign: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `input_schema` | Dict[str, *Any*] | :heavy_check_mark: | N/A | +| `output_schema` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `icons` | List[[models.MCPServerIcon](../models/mcpservericon.md)] | :heavy_minus_sign: | N/A | +| `annotations` | [OptionalNullable[models.ToolAnnotations]](../models/toolannotations.md) | :heavy_minus_sign: | N/A | +| `meta` | [OptionalNullable[models.MCPToolMeta]](../models/mcptoolmeta.md) | :heavy_minus_sign: | N/A | +| `execution` | [OptionalNullable[models.ToolExecution]](../models/toolexecution.md) | :heavy_minus_sign: | N/A | | `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/mcpuitoolmeta.md b/docs/models/mcpuitoolmeta.md deleted file mode 100644 index c09b29ad..00000000 --- a/docs/models/mcpuitoolmeta.md +++ /dev/null @@ -1,12 +0,0 @@ -# MCPUIToolMeta - -UI metadata for tools that reference UI resources. - - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `resource_uri` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `visibility` | List[[models.Visibility](../models/visibility.md)] | :heavy_minus_sign: | N/A | -| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/partialscheduledefinition.md b/docs/models/partialscheduledefinition.md new file mode 100644 index 00000000..e66ee671 --- /dev/null +++ b/docs/models/partialscheduledefinition.md @@ -0,0 +1,23 @@ +# PartialScheduleDefinition + +Schedule definition for partial updates. + +All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set +fields are applied during an update; unset fields preserve the existing schedule values. + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `input` | *Optional[Any]* | :heavy_minus_sign: | Input to provide to the workflow when starting it. | +| `calendars` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Calendar-based specification of times. | +| `intervals` | List[[models.ScheduleInterval](../models/scheduleinterval.md)] | :heavy_minus_sign: | Interval-based specification of times. | +| `cron_expressions` | List[*str*] | :heavy_minus_sign: | Cron-based specification of times. | +| `skip` | List[[models.ScheduleCalendar](../models/schedulecalendar.md)] | :heavy_minus_sign: | Set of calendar times to skip. | +| `start_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which the first action may be run. | +| `end_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Time after which no more actions will be run. | +| `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| +| `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | +| `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | +| `max_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited. | \ No newline at end of file diff --git a/docs/models/processingstatus.md b/docs/models/processingstatus.md index 514caa50..1d472b88 100644 --- a/docs/models/processingstatus.md +++ b/docs/models/processingstatus.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| `document_id` | *str* | :heavy_check_mark: | N/A | -| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | -| `processing_status` | *str* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `process_status` | [models.ProcessStatus](../models/processstatus.md) | :heavy_check_mark: | N/A | +| ~~`processing_status`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | \ No newline at end of file diff --git a/docs/models/promptargument.md b/docs/models/promptargument.md new file mode 100644 index 00000000..a8dfdb05 --- /dev/null +++ b/docs/models/promptargument.md @@ -0,0 +1,13 @@ +# PromptArgument + +An argument for a prompt template. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `required` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/prompts.md b/docs/models/prompts.md new file mode 100644 index 00000000..9fe85597 --- /dev/null +++ b/docs/models/prompts.md @@ -0,0 +1,17 @@ +# Prompts + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[models.MCPPrompt]` + +```python +value: List[models.MCPPrompt] = /* values here */ +``` + diff --git a/docs/models/promptscapability.md b/docs/models/promptscapability.md new file mode 100644 index 00000000..50ffae2b --- /dev/null +++ b/docs/models/promptscapability.md @@ -0,0 +1,11 @@ +# PromptsCapability + +Capability for prompts operations. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `list_changed` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/publicconnectionconfig.md b/docs/models/publicconnectionconfig.md new file mode 100644 index 00000000..56c9ee8e --- /dev/null +++ b/docs/models/publicconnectionconfig.md @@ -0,0 +1,11 @@ +# PublicConnectionConfig + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `type` | [Optional[models.ConnectionConfigType]](../models/connectionconfigtype.md) | :heavy_minus_sign: | N/A | +| `base_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `headers` | Dict[str, *str*] | :heavy_minus_sign: | N/A | +| `signed` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/requiresconfirmation.md b/docs/models/requiresconfirmation.md new file mode 100644 index 00000000..e7f1e4a6 --- /dev/null +++ b/docs/models/requiresconfirmation.md @@ -0,0 +1,23 @@ +# RequiresConfirmation + + +## Supported Types + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + +### `models.LogicalExpression` + +```python +value: models.LogicalExpression = /* values here */ +``` + +### `models.ToolProperties` + +```python +value: models.ToolProperties = /* values here */ +``` + diff --git a/docs/models/resources.md b/docs/models/resources.md new file mode 100644 index 00000000..cf19612e --- /dev/null +++ b/docs/models/resources.md @@ -0,0 +1,17 @@ +# Resources + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[models.MCPResource]` + +```python +value: List[models.MCPResource] = /* values here */ +``` + diff --git a/docs/models/resourcescapability.md b/docs/models/resourcescapability.md new file mode 100644 index 00000000..bbd256d0 --- /dev/null +++ b/docs/models/resourcescapability.md @@ -0,0 +1,12 @@ +# ResourcesCapability + +Capability for resources operations. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `subscribe` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `list_changed` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/resourcetype.md b/docs/models/resourcetype.md new file mode 100644 index 00000000..047f96bb --- /dev/null +++ b/docs/models/resourcetype.md @@ -0,0 +1,20 @@ +# ResourceType + +## Example Usage + +```python +from mistralai.client.models import ResourceType + +# Open enum: unrecognized values are captured as UnrecognizedInt +value: ResourceType = 1 +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `1` +- `2` +- `3` +- `4` diff --git a/docs/models/rootscapability.md b/docs/models/rootscapability.md new file mode 100644 index 00000000..f025431d --- /dev/null +++ b/docs/models/rootscapability.md @@ -0,0 +1,11 @@ +# RootsCapability + +Capability for root operations. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `list_changed` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/samplingcapability.md b/docs/models/samplingcapability.md new file mode 100644 index 00000000..b05fb678 --- /dev/null +++ b/docs/models/samplingcapability.md @@ -0,0 +1,12 @@ +# SamplingCapability + +Sampling capability structure, allowing fine-grained capability advertisement. + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `context` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `tools` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/scheduledefinition.md b/docs/models/scheduledefinition.md index 7d0509f6..93c58740 100644 --- a/docs/models/scheduledefinition.md +++ b/docs/models/scheduledefinition.md @@ -22,5 +22,5 @@ Used for input where schedule_id is optional (can be provided or auto-generated) | `jitter` | *OptionalNullable[str]* | :heavy_minus_sign: | Jitter to apply each action.

An action's scheduled time will be incremented by a random value between 0
and this value if present (but not past the next schedule).
| | `time_zone_name` | *OptionalNullable[str]* | :heavy_minus_sign: | IANA time zone name, for example ``US/Central``. | | `policy` | [Optional[models.SchedulePolicy]](../models/schedulepolicy.md) | :heavy_minus_sign: | N/A | -| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the schedule. | -| `max_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited. | \ No newline at end of file +| `max_executions` | *OptionalNullable[int]* | :heavy_minus_sign: | Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited. | +| `schedule_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Unique identifier for the schedule. | \ No newline at end of file diff --git a/docs/models/searchindexresponse.md b/docs/models/searchindexresponse.md new file mode 100644 index 00000000..ce6087ec --- /dev/null +++ b/docs/models/searchindexresponse.md @@ -0,0 +1,15 @@ +# SearchIndexResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `creator_id` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *int* | :heavy_check_mark: | N/A | +| `status` | [models.SearchIndexResponseStatus](../models/searchindexresponsestatus.md) | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `modified_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `index` | [models.SearchIndexResponseIndex](../models/searchindexresponseindex.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/searchindexresponseindex.md b/docs/models/searchindexresponseindex.md new file mode 100644 index 00000000..3093f4d4 --- /dev/null +++ b/docs/models/searchindexresponseindex.md @@ -0,0 +1,11 @@ +# SearchIndexResponseIndex + + +## Supported Types + +### `models.VespaSearchIndexInfoResponse` + +```python +value: models.VespaSearchIndexInfoResponse = /* values here */ +``` + diff --git a/docs/models/searchindexresponsestatus.md b/docs/models/searchindexresponsestatus.md new file mode 100644 index 00000000..c2200101 --- /dev/null +++ b/docs/models/searchindexresponsestatus.md @@ -0,0 +1,18 @@ +# SearchIndexResponseStatus + +## Example Usage + +```python +from mistralai.client.models import SearchIndexResponseStatus + +# Open enum: unrecognized values are captured as UnrecognizedStr +value: SearchIndexResponseStatus = "online" +``` + + +## Values + +This is an open enum. Unrecognized values will not fail type checks. + +- `"online"` +- `"offline"` diff --git a/docs/models/servercapabilities.md b/docs/models/servercapabilities.md new file mode 100644 index 00000000..4faca72e --- /dev/null +++ b/docs/models/servercapabilities.md @@ -0,0 +1,17 @@ +# ServerCapabilities + +Capabilities that a server may support. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `experimental` | Dict[str, Dict[str, *Any*]] | :heavy_minus_sign: | N/A | +| `logging` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `prompts` | [OptionalNullable[models.PromptsCapability]](../models/promptscapability.md) | :heavy_minus_sign: | N/A | +| `resources` | [OptionalNullable[models.ResourcesCapability]](../models/resourcescapability.md) | :heavy_minus_sign: | N/A | +| `tools` | [OptionalNullable[models.ToolsCapability]](../models/toolscapability.md) | :heavy_minus_sign: | N/A | +| `completions` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `tasks` | [OptionalNullable[models.ServerTasksCapability]](../models/servertaskscapability.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/turbinetoollocale.md b/docs/models/serverlocale.md similarity index 97% rename from docs/models/turbinetoollocale.md rename to docs/models/serverlocale.md index 283dd339..a26fcf11 100644 --- a/docs/models/turbinetoollocale.md +++ b/docs/models/serverlocale.md @@ -1,4 +1,4 @@ -# TurbineToolLocale +# ServerLocale ## Fields diff --git a/docs/models/servertaskscapability.md b/docs/models/servertaskscapability.md new file mode 100644 index 00000000..9554996d --- /dev/null +++ b/docs/models/servertaskscapability.md @@ -0,0 +1,13 @@ +# ServerTasksCapability + +Capability for server tasks operations. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `list` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `cancel` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `requests` | [OptionalNullable[models.ServerTasksRequestsCapability]](../models/servertasksrequestscapability.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/servertasksrequestscapability.md b/docs/models/servertasksrequestscapability.md new file mode 100644 index 00000000..65c8593c --- /dev/null +++ b/docs/models/servertasksrequestscapability.md @@ -0,0 +1,11 @@ +# ServerTasksRequestsCapability + +Capability for tasks requests operations. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `tools` | [OptionalNullable[models.TasksToolsCapability]](../models/taskstoolscapability.md) | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/sharing.md b/docs/models/sharing.md index fc718632..922506d3 100644 --- a/docs/models/sharing.md +++ b/docs/models/sharing.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `org_id` | *str* | :heavy_check_mark: | N/A | -| `role` | *str* | :heavy_check_mark: | N/A | -| `share_with_type` | *str* | :heavy_check_mark: | N/A | -| `share_with_uuid` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| ~~`user_id`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| ~~`org_id`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `role` | *str* | :heavy_check_mark: | N/A | +| `share_with_type` | *str* | :heavy_check_mark: | N/A | +| `share_with_uuid` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/sharingdelete.md b/docs/models/sharingdelete.md index 1dcec095..e6e0732b 100644 --- a/docs/models/sharingdelete.md +++ b/docs/models/sharingdelete.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| ~~`org_id`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file diff --git a/docs/models/sharingrequest.md b/docs/models/sharingrequest.md index 21b8ec1f..e92318f8 100644 --- a/docs/models/sharingrequest.md +++ b/docs/models/sharingrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `level` | [models.ShareEnum](../models/shareenum.md) | :heavy_check_mark: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| ~~`org_id`~~ | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `level` | [models.ShareEnum](../models/shareenum.md) | :heavy_check_mark: | N/A | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | \ No newline at end of file diff --git a/docs/models/skipconfirmation.md b/docs/models/skipconfirmation.md new file mode 100644 index 00000000..48eade7a --- /dev/null +++ b/docs/models/skipconfirmation.md @@ -0,0 +1,23 @@ +# SkipConfirmation + + +## Supported Types + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + +### `models.LogicalExpression` + +```python +value: models.LogicalExpression = /* values here */ +``` + +### `models.ToolProperties` + +```python +value: models.ToolProperties = /* values here */ +``` + diff --git a/docs/models/taskselicitationcapability.md b/docs/models/taskselicitationcapability.md new file mode 100644 index 00000000..f2f3ef81 --- /dev/null +++ b/docs/models/taskselicitationcapability.md @@ -0,0 +1,11 @@ +# TasksElicitationCapability + +Capability for tasks elicitation operations. + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `create` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/taskssamplingcapability.md b/docs/models/taskssamplingcapability.md new file mode 100644 index 00000000..805d8574 --- /dev/null +++ b/docs/models/taskssamplingcapability.md @@ -0,0 +1,11 @@ +# TasksSamplingCapability + +Capability for tasks sampling operations. + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `create_message` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/taskstoolscapability.md b/docs/models/taskstoolscapability.md new file mode 100644 index 00000000..cd60fe49 --- /dev/null +++ b/docs/models/taskstoolscapability.md @@ -0,0 +1,11 @@ +# TasksToolsCapability + +Capability for tasks tools operations. + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `call` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/toolexecutionconfiguration.md b/docs/models/toolexecutionconfiguration.md new file mode 100644 index 00000000..04981b89 --- /dev/null +++ b/docs/models/toolexecutionconfiguration.md @@ -0,0 +1,11 @@ +# ToolExecutionConfiguration + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/toolproperties.md b/docs/models/toolproperties.md new file mode 100644 index 00000000..d85fd821 --- /dev/null +++ b/docs/models/toolproperties.md @@ -0,0 +1,8 @@ +# ToolProperties + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `read_only` | *Nullable[bool]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/tools.md b/docs/models/tools.md new file mode 100644 index 00000000..2f9decd6 --- /dev/null +++ b/docs/models/tools.md @@ -0,0 +1,17 @@ +# Tools + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[models.MCPToolMeta]` + +```python +value: List[models.MCPToolMeta] = /* values here */ +``` + diff --git a/docs/models/toolscapability.md b/docs/models/toolscapability.md new file mode 100644 index 00000000..7bde4735 --- /dev/null +++ b/docs/models/toolscapability.md @@ -0,0 +1,11 @@ +# ToolsCapability + +Capability for tools operations. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `list_changed` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | +| `__pydantic_extra__` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/turbinemeta.md b/docs/models/turbinemeta.md new file mode 100644 index 00000000..d5e48e38 --- /dev/null +++ b/docs/models/turbinemeta.md @@ -0,0 +1,9 @@ +# TurbineMeta + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `system_prompt_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `locale` | [OptionalNullable[models.ServerLocale]](../models/serverlocale.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/updateconnectorrequest.md b/docs/models/updateconnectorrequest.md index 335588ea..7a267df3 100644 --- a/docs/models/updateconnectorrequest.md +++ b/docs/models/updateconnectorrequest.md @@ -3,15 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | -| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | -| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | -| `connection_config` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection config. | -| `connection_secrets` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection secrets | -| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | New server url for your mcp connector. | -| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | New headers for your mcp connector. | -| `auth_data` | [OptionalNullable[models.AuthData]](../models/authdata.md) | :heavy_minus_sign: | New authentication data for your mcp connector. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | +| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | +| `protocol` | [OptionalNullable[models.ConnectorProtocol]](../models/connectorprotocol.md) | :heavy_minus_sign: | Protocol of the connector. | +| `connection_config` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection config. | +| `connection_secrets` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection secrets | +| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | New server url for your mcp connector. | +| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | New headers for your mcp connector. | +| `auth_data` | [OptionalNullable[models.AuthData]](../models/authdata.md) | :heavy_minus_sign: | New authentication data for your mcp connector. | \ No newline at end of file diff --git a/docs/models/updatedocumentrequest.md b/docs/models/updatedocumentrequest.md index dd06dd4b..5a3c93af 100644 --- a/docs/models/updatedocumentrequest.md +++ b/docs/models/updatedocumentrequest.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `attributes` | Dict[str, [models.Attributes](../models/attributes.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, [models.Attributes](../models/attributes.md)] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | \ No newline at end of file diff --git a/docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md b/docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md new file mode 100644 index 00000000..68ffe15a --- /dev/null +++ b/docs/models/updateschedulev1workflowsschedulesscheduleidpatchrequest.md @@ -0,0 +1,9 @@ +# UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `workflow_schedule_update_request` | [models.WorkflowScheduleUpdateRequest](../models/workflowscheduleupdaterequest.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespaschemaresponse.md b/docs/models/vespaschemaresponse.md new file mode 100644 index 00000000..1cb7277b --- /dev/null +++ b/docs/models/vespaschemaresponse.md @@ -0,0 +1,9 @@ +# VespaSchemaResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `document_count` | *Nullable[int]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/vespasearchindexinforesponse.md b/docs/models/vespasearchindexinforesponse.md new file mode 100644 index 00000000..16272fce --- /dev/null +++ b/docs/models/vespasearchindexinforesponse.md @@ -0,0 +1,12 @@ +# VespaSearchIndexInfoResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `type` | *Literal["vespa"]* | :heavy_check_mark: | N/A | +| `k8s_cluster` | *str* | :heavy_check_mark: | N/A | +| `k8s_namespace` | *str* | :heavy_check_mark: | N/A | +| `vespa_instance_name` | *str* | :heavy_check_mark: | N/A | +| `schemas` | List[[models.VespaSchemaResponse](../models/vespaschemaresponse.md)] | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/voiceappearance.md b/docs/models/voiceappearance.md new file mode 100644 index 00000000..b77de4c8 --- /dev/null +++ b/docs/models/voiceappearance.md @@ -0,0 +1,11 @@ +# VoiceAppearance + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `skin_color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `hair_color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `background_color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `avatar_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/voicecreaterequest.md b/docs/models/voicecreaterequest.md index e9a3b3a1..775da22b 100644 --- a/docs/models/voicecreaterequest.md +++ b/docs/models/voicecreaterequest.md @@ -5,15 +5,17 @@ Request model for creating a new voice with base64 audio. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | -| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `sample_audio` | *str* | :heavy_check_mark: | Base64-encoded audio file | -| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `appearance` | [OptionalNullable[models.VoiceAppearance]](../models/voiceappearance.md) | :heavy_minus_sign: | N/A | +| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sample_audio` | *str* | :heavy_check_mark: | Base64-encoded audio file | +| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | \ No newline at end of file diff --git a/docs/models/voiceresponse.md b/docs/models/voiceresponse.md index 3ec6d540..a907372e 100644 --- a/docs/models/voiceresponse.md +++ b/docs/models/voiceresponse.md @@ -5,16 +5,18 @@ Schema for voice response ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | -| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `id` | *str* | :heavy_check_mark: | N/A | -| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | -| `user_id` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `appearance` | [OptionalNullable[models.VoiceAppearance]](../models/voiceappearance.md) | :heavy_minus_sign: | N/A | +| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `id` | *str* | :heavy_check_mark: | N/A | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A | +| `user_id` | *Nullable[str]* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/voiceupdaterequest.md b/docs/models/voiceupdaterequest.md index 924b5f47..ec2913dd 100644 --- a/docs/models/voiceupdaterequest.md +++ b/docs/models/voiceupdaterequest.md @@ -5,10 +5,12 @@ Request model for partially updating voice metadata. ## Fields -| Field | Type | Required | Description | -| ----------------------- | ----------------------- | ----------------------- | ----------------------- | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `appearance` | [OptionalNullable[models.VoiceAppearance]](../models/voiceappearance.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/workflowbulkarchiverequest.md b/docs/models/workflowbulkarchiverequest.md new file mode 100644 index 00000000..2c9b9341 --- /dev/null +++ b/docs/models/workflowbulkarchiverequest.md @@ -0,0 +1,8 @@ +# WorkflowBulkArchiveRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `workflow_ids` | List[*str*] | :heavy_check_mark: | List of workflow IDs to archive | \ No newline at end of file diff --git a/docs/models/workflowbulkarchiveresponse.md b/docs/models/workflowbulkarchiveresponse.md new file mode 100644 index 00000000..ce1999f3 --- /dev/null +++ b/docs/models/workflowbulkarchiveresponse.md @@ -0,0 +1,9 @@ +# WorkflowBulkArchiveResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `archived` | List[[models.Workflow](../models/workflow.md)] | :heavy_check_mark: | Workflows that were successfully archived or were already archived | +| `errored` | List[[models.WorkflowBulkError](../models/workflowbulkerror.md)] | :heavy_minus_sign: | Workflows that could not be archived and the corresponding error messages | \ No newline at end of file diff --git a/docs/models/workflowbulkerror.md b/docs/models/workflowbulkerror.md new file mode 100644 index 00000000..d8e34f4e --- /dev/null +++ b/docs/models/workflowbulkerror.md @@ -0,0 +1,10 @@ +# WorkflowBulkError + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `workflow_id` | *str* | :heavy_check_mark: | The requested workflow ID | +| `workflow` | [OptionalNullable[models.Workflow]](../models/workflow.md) | :heavy_minus_sign: | The workflow, if found | +| `message` | *str* | :heavy_check_mark: | Error message describing why the operation failed | \ No newline at end of file diff --git a/docs/models/workflowbulkunarchiverequest.md b/docs/models/workflowbulkunarchiverequest.md new file mode 100644 index 00000000..0e5342cf --- /dev/null +++ b/docs/models/workflowbulkunarchiverequest.md @@ -0,0 +1,8 @@ +# WorkflowBulkUnarchiveRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `workflow_ids` | List[*str*] | :heavy_check_mark: | List of workflow IDs to unarchive | \ No newline at end of file diff --git a/docs/models/workflowbulkunarchiveresponse.md b/docs/models/workflowbulkunarchiveresponse.md new file mode 100644 index 00000000..8b139b75 --- /dev/null +++ b/docs/models/workflowbulkunarchiveresponse.md @@ -0,0 +1,9 @@ +# WorkflowBulkUnarchiveResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `unarchived` | List[[models.Workflow](../models/workflow.md)] | :heavy_check_mark: | Workflows that were successfully unarchived or were already unarchived | +| `errored` | List[[models.WorkflowBulkError](../models/workflowbulkerror.md)] | :heavy_minus_sign: | Workflows that could not be unarchived and the corresponding error messages | \ No newline at end of file diff --git a/docs/models/workflowschedulelistresponse.md b/docs/models/workflowschedulelistresponse.md index 7142185b..b6428546 100644 --- a/docs/models/workflowschedulelistresponse.md +++ b/docs/models/workflowschedulelistresponse.md @@ -5,4 +5,5 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `schedules` | List[[models.ScheduleDefinitionOutput](../models/scheduledefinitionoutput.md)] | :heavy_check_mark: | A list of workflow schedules | \ No newline at end of file +| `schedules` | List[[models.ScheduleDefinitionOutput](../models/scheduledefinitionoutput.md)] | :heavy_check_mark: | A list of workflow schedules | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | \ No newline at end of file diff --git a/docs/models/workflowscheduleupdaterequest.md b/docs/models/workflowscheduleupdaterequest.md new file mode 100644 index 00000000..24357f65 --- /dev/null +++ b/docs/models/workflowscheduleupdaterequest.md @@ -0,0 +1,8 @@ +# WorkflowScheduleUpdateRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `schedule` | [models.PartialScheduleDefinition](../models/partialscheduledefinition.md) | :heavy_check_mark: | Schedule definition for partial updates.

All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set
fields are applied during an update; unset fields preserve the existing schedule values. | \ No newline at end of file diff --git a/docs/sdks/accesses/README.md b/docs/sdks/accesses/README.md index 51a63779..3acf0566 100644 --- a/docs/sdks/accesses/README.md +++ b/docs/sdks/accesses/README.md @@ -76,14 +76,14 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `level` | [models.ShareEnum](../../models/shareenum.md) | :heavy_check_mark: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `level` | [models.ShareEnum](../../models/shareenum.md) | :heavy_check_mark: | N/A | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | +| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -121,13 +121,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | -| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | -| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `share_with_uuid` | *str* | :heavy_check_mark: | The id of the entity (user, workspace or organization) to share with | +| `share_with_type` | [models.EntityType](../../models/entitytype.md) | :heavy_check_mark: | The type of entity, used to share a library. | +| `org_id` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/connectors/README.md b/docs/sdks/connectors/README.md index 753c1cf3..4a0d8a93 100644 --- a/docs/sdks/connectors/README.md +++ b/docs/sdks/connectors/README.md @@ -9,6 +9,12 @@ * [create](#create) - Create a new connector. * [list](#list) - List all connectors. * [get_auth_url](#get_auth_url) - Get the auth URL for a connector. +* [activate_for_organization](#activate_for_organization) - Activate a connector for an organization. +* [deactivate_for_organization](#deactivate_for_organization) - Deactivate a connector for an organization. +* [activate_for_workspace](#activate_for_workspace) - Activate a connector for a workspace. +* [deactivate_for_workspace](#deactivate_for_workspace) - Deactivate a connector for a workspace. +* [activate_for_user](#activate_for_user) - Activate a connector for the current user. +* [deactivate_for_user](#deactivate_for_user) - Deactivate a connector for the current user. * [call_tool](#call_tool) - Call Connector Tool * [list_tools](#list_tools) - List tools for a connector. * [get_authentication_methods](#get_authentication_methods) - Get authentication methods for a connector. @@ -160,6 +166,264 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## activate_for_organization + +Enable a connector at the organization level so all members can use it. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.activate_for_organization(connector_id="a91bb4ec-caab-4cf2-be03-84b8343f4643") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deactivate_for_organization + +Disable a connector at the organization level. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.deactivate_for_organization(connector_id="8f4c1089-2a37-44b3-a3c4-830ca7a0e439") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## activate_for_workspace + +Enable a connector at the workspace level so all members of the workspace can use it. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.activate_for_workspace(connector_id="2adfa8af-3618-41a9-8980-e5ea1486e58e") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deactivate_for_workspace + +Disable a connector at the workspace level. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.deactivate_for_workspace(connector_id="15b00e98-a9e7-4582-b0fc-87d28c3dac04") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## activate_for_user + +Enable a connector for the calling user only. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.activate_for_user(connector_id="cd4fb4d2-de68-451f-8f2a-57fe39b33d96") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `requires_confirmation` | [OptionalNullable[models.RequiresConfirmation]](../../models/requiresconfirmation.md) | :heavy_minus_sign: | N/A | +| `skip_confirmation` | [OptionalNullable[models.SkipConfirmation]](../../models/skipconfirmation.md) | :heavy_minus_sign: | N/A | +| `include` | List[*str*] | :heavy_minus_sign: | N/A | +| `exclude` | List[*str*] | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## deactivate_for_user + +Disable a connector for the calling user only. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.connectors.deactivate_for_user(connector_id="99c6ed86-e6bb-40ed-b6ee-d22ba791a68f") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MessageResponse](../../models/messageresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## call_tool Call a tool on an MCP connector. @@ -693,7 +957,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.connectors.get(connector_id_or_name="", fetch_customer_data=False, fetch_connection_secrets=False) + res = mistral.beta.connectors.get(connector_id_or_name="", fetch_user_data=False, fetch_customer_data=False) # Handle response print(res) @@ -705,8 +969,8 @@ with Mistral( | Parameter | Type | Required | Description | | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | | `connector_id_or_name` | *str* | :heavy_check_mark: | N/A | +| `fetch_user_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the user-level data associated with the connector (e.g. connection credentials). | | `fetch_customer_data` | *Optional[bool]* | :heavy_minus_sign: | Fetch the customer data associated with the connector (e.g. customer secrets / config). | -| `fetch_connection_secrets` | *Optional[bool]* | :heavy_minus_sign: | Fetch the general connection secrets associated with the connector. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -745,20 +1009,21 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `connector_id` | *str* | :heavy_check_mark: | N/A | -| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | -| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | -| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | -| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | -| `connection_config` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection config. | -| `connection_secrets` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection secrets | -| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | New server url for your mcp connector. | -| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | New headers for your mcp connector. | -| `auth_data` | [OptionalNullable[models.AuthData]](../../models/authdata.md) | :heavy_minus_sign: | New authentication data for your mcp connector. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `connector_id` | *str* | :heavy_check_mark: | N/A | +| `title` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional human-readable title for the connector. | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the connector. | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | The description of the connector. | +| `icon_url` | *OptionalNullable[str]* | :heavy_minus_sign: | The optional url of the icon you want to associate to the connector. | +| `system_prompt` | *OptionalNullable[str]* | :heavy_minus_sign: | Optional system prompt for the connector. | +| `protocol` | [OptionalNullable[models.ConnectorProtocol]](../../models/connectorprotocol.md) | :heavy_minus_sign: | Protocol of the connector. | +| `connection_config` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection config. | +| `connection_secrets` | Dict[str, *Any*] | :heavy_minus_sign: | Optional new connection secrets | +| `server` | *OptionalNullable[str]* | :heavy_minus_sign: | New server url for your mcp connector. | +| `headers` | Dict[str, *Any*] | :heavy_minus_sign: | New headers for your mcp connector. | +| `auth_data` | [OptionalNullable[models.AuthData]](../../models/authdata.md) | :heavy_minus_sign: | New authentication data for your mcp connector. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/documents/README.md b/docs/sdks/documents/README.md index eabe9976..e7c70307 100644 --- a/docs/sdks/documents/README.md +++ b/docs/sdks/documents/README.md @@ -10,6 +10,7 @@ * [upload](#upload) - Upload a new document. * [get](#get) - Retrieve the metadata of a specific document. * [update](#update) - Update the metadata of a specific document. +* [~~libraries_documents_update_v1~~](#libraries_documents_update_v1) - Update the metadata of a specific document. :warning: **Deprecated** * [delete](#delete) - Delete a document. * [text_content](#text_content) - Retrieve the text content of a specific document. * [status](#status) - Retrieve the processing status of a specific document. @@ -42,16 +43,16 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `filters_attributes` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `filters_attributes` | *OptionalNullable[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | +| `sort_by` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `sort_order` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -153,8 +154,55 @@ with Mistral( ## update +Given a library and a document in that library, update the name and/or attributes of that document. + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.libraries.documents.update(library_id="2a41249e-52ca-4436-b755-25ce3a9bfb53", document_id="bc26fa54-e5d9-4269-bedf-86bed5471c7d") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, [models.Attributes](../../models/attributes.md)] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Document](../../models/document.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~libraries_documents_update_v1~~ + Given a library and a document in that library, update the name of that document. +> :warning: **DEPRECATED**: Use the PATCH method instead. This PUT endpoint will be removed in a future version.. + ### Example Usage @@ -167,7 +215,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.libraries.documents.update(library_id="3ddd8d93-dca5-4a6d-980d-173226c35742", document_id="2a25e44c-b160-40ca-b5c2-b65fb2fcae34") + res = mistral.beta.libraries.documents.libraries_documents_update_v1(library_id="3ddd8d93-dca5-4a6d-980d-173226c35742", document_id="2a25e44c-b160-40ca-b5c2-b65fb2fcae34") # Handle response print(res) @@ -176,13 +224,14 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `library_id` | *str* | :heavy_check_mark: | N/A | -| `document_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | -| `attributes` | Dict[str, [models.Attributes](../../models/attributes.md)] | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `document_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `attributes` | Dict[str, [models.Attributes](../../models/attributes.md)] | :heavy_minus_sign: | N/A | +| `expires_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | If set, the document will be automatically deleted after this date. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/libraries/README.md b/docs/sdks/libraries/README.md index d282f541..42c3323e 100644 --- a/docs/sdks/libraries/README.md +++ b/docs/sdks/libraries/README.md @@ -11,6 +11,7 @@ * [get](#get) - Detailed information about a specific Library. * [delete](#delete) - Delete a library and all of its documents. * [update](#update) - Update a library. +* [~~libraries_update_v1~~](#libraries_update_v1) - Update a library. :warning: **Deprecated** ## list @@ -37,13 +38,13 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | -| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page_size` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `page` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `search` | *OptionalNullable[str]* | :heavy_minus_sign: | Case-insensitive search on the library name. | +| `filter_owned_by_me` | *OptionalNullable[bool]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Deprecated: this parameter will be removed in a future version. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -85,7 +86,7 @@ with Mistral( | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | *str* | :heavy_check_mark: | N/A | | `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | +| `chunk_size` | *OptionalNullable[int]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The size of the chunks (in characters) to split document text into. Must be between 256 and 32768. | | `owner_type` | [OptionalNullable[models.OwnerType]](../../models/ownertype.md) | :heavy_minus_sign: | Determines who owns the created library. 'User' creates a private library accessible only to its owner. 'Workspace' creates a library shared with the workspace. Defaults to 'Workspace' for API key sessions. Only API keys with the 'Private and shared connectors' connector access scope can create private, user-owned libraries. | | `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | @@ -143,7 +144,7 @@ with Mistral( ## delete -Given a library id, deletes it together with all documents that have been uploaded to that library. +Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. ### Example Usage @@ -188,6 +189,51 @@ Given a library id, you can update the name and description. ### Example Usage + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.libraries.update(library_id="74a30b7a-ba52-49f7-a8a3-7157e1adf565") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `library_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.Library](../../models/library.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## ~~libraries_update_v1~~ + +Given a library id, you can update the name and description. + +> :warning: **DEPRECATED**: Use the PATCH method instead. This PUT endpoint will be removed in a future version.. + +### Example Usage + ```python from mistralai.client import Mistral @@ -198,7 +244,7 @@ with Mistral( api_key=os.getenv("MISTRAL_API_KEY", ""), ) as mistral: - res = mistral.beta.libraries.update(library_id="e01880c3-d0b5-4a29-8b1b-abdb8ce917e4") + res = mistral.beta.libraries.libraries_update_v1(library_id="e01880c3-d0b5-4a29-8b1b-abdb8ce917e4") # Handle response print(res) diff --git a/docs/sdks/schedules/README.md b/docs/sdks/schedules/README.md index 7bf59931..6b0e5f0e 100644 --- a/docs/sdks/schedules/README.md +++ b/docs/sdks/schedules/README.md @@ -6,7 +6,9 @@ * [get_schedules](#get_schedules) - Get Schedules * [schedule_workflow](#schedule_workflow) - Schedule Workflow +* [get_schedule](#get_schedule) - Get Schedule * [unschedule_workflow](#unschedule_workflow) - Unschedule Workflow +* [update_schedule](#update_schedule) - Update Schedule * [pause_schedule](#pause_schedule) - Pause Schedule * [resume_schedule](#resume_schedule) - Resume Schedule @@ -28,26 +30,34 @@ with Mistral( res = mistral.workflows.schedules.get_schedules() - # Handle response - print(res) + while res is not None: + # Handle items + + res = res.next() ``` ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `workflow_name` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by workflow name | +| `user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Filter by user ID. Pass 'current' to resolve to the authenticated user's ID. | +| `status` | [OptionalNullable[models.GetSchedulesV1WorkflowsSchedulesGetStatus]](../../models/getschedulesv1workflowsschedulesgetstatus.md) | :heavy_minus_sign: | Filter by schedule status: 'active' or 'paused' | +| `page_size` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of items per page. Omitting this parameter fetches all results at once (deprecated — pass page_size to use pagination). | +| `next_page_token` | *OptionalNullable[str]* | :heavy_minus_sign: | Token for the next page of results | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response -**[models.WorkflowScheduleListResponse](../../models/workflowschedulelistresponse.md)** +**[models.GetSchedulesV1WorkflowsSchedulesGetResponse](../../models/getschedulesv1workflowsschedulesgetresponse.md)** ### Errors -| Error Type | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## schedule_workflow @@ -98,6 +108,47 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## get_schedule + +Get Schedule + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.schedules.get_schedule(schedule_id="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.ScheduleDefinitionOutput](../../models/scheduledefinitionoutput.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## unschedule_workflow Unschedule Workflow @@ -134,6 +185,48 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## update_schedule + +Update Schedule + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.schedules.update_schedule(schedule_id="", schedule={}) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `schedule_id` | *str* | :heavy_check_mark: | N/A | +| `schedule` | [models.PartialScheduleDefinition](../../models/partialscheduledefinition.md) | :heavy_check_mark: | Schedule definition for partial updates.

All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set
fields are applied during an update; unset fields preserve the existing schedule values. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowScheduleResponse](../../models/workflowscheduleresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## pause_schedule Pause Schedule diff --git a/docs/sdks/searchindexes/README.md b/docs/sdks/searchindexes/README.md new file mode 100644 index 00000000..471bba59 --- /dev/null +++ b/docs/sdks/searchindexes/README.md @@ -0,0 +1,97 @@ +# Beta.Rag.SearchIndexes + +## Overview + +### Available Operations + +* [list](#list) - Get Search Indexes +* [register](#register) - Register Search Index + +## list + +Get Search Indexes + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.list() + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[List[models.SearchIndexResponse]](../../models/.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## register + +Register Search Index + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.beta.rag.search_indexes.register(name="", index={ + "type": "vespa", + "k8s_cluster": "", + "k8s_namespace": "", + "vespa_instance_name": "", + "schemas": [], + }, status="offline") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `index` | [models.CreateSearchIndexInfoRequestIndex](../../models/createsearchindexinforequestindex.md) | :heavy_check_mark: | N/A | +| `document_count` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `status` | [Optional[models.CreateSearchIndexInfoRequestStatus]](../../models/createsearchindexinforequeststatus.md) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.SearchIndexResponse](../../models/searchindexresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/voices/README.md b/docs/sdks/voices/README.md index 49b8533f..da59de37 100644 --- a/docs/sdks/voices/README.md +++ b/docs/sdks/voices/README.md @@ -79,19 +79,21 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `name` | *str* | :heavy_check_mark: | N/A | -| `sample_audio` | *str* | :heavy_check_mark: | Base64-encoded audio file | -| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | -| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | -| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `name` | *str* | :heavy_check_mark: | N/A | +| `sample_audio` | *str* | :heavy_check_mark: | Base64-encoded audio file | +| `slug` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `color` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `appearance` | [OptionalNullable[models.VoiceAppearance]](../../models/voiceappearance.md) | :heavy_minus_sign: | N/A | +| `retention_notice` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `sample_filename` | *OptionalNullable[str]* | :heavy_minus_sign: | Original filename for extension detection | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response @@ -170,15 +172,17 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `voice_id` | *str* | :heavy_check_mark: | N/A | -| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `languages` | List[*str*] | :heavy_minus_sign: | N/A | -| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | -| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | -| `tags` | List[*str*] | :heavy_minus_sign: | N/A | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `voice_id` | *str* | :heavy_check_mark: | N/A | +| `name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `languages` | List[*str*] | :heavy_minus_sign: | N/A | +| `gender` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `age` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `tags` | List[*str*] | :heavy_minus_sign: | N/A | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `appearance` | [OptionalNullable[models.VoiceAppearance]](../../models/voiceappearance.md) | :heavy_minus_sign: | N/A | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index 45759776..0fcb9b8b 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -11,6 +11,8 @@ * [get_workflow](#get_workflow) - Get Workflow * [update_workflow](#update_workflow) - Update Workflow * [get_workflow_registration](#get_workflow_registration) - Get Workflow Registration +* [bulk_archive_workflows](#bulk_archive_workflows) - Bulk Archive Workflows +* [bulk_unarchive_workflows](#bulk_unarchive_workflows) - Bulk Unarchive Workflows * [archive_workflow](#archive_workflow) - Archive Workflow * [unarchive_workflow](#unarchive_workflow) - Unarchive Workflow @@ -340,6 +342,88 @@ with Mistral( | errors.HTTPValidationError | 422 | application/json | | errors.SDKError | 4XX, 5XX | \*/\* | +## bulk_archive_workflows + +Bulk Archive Workflows + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.bulk_archive_workflows(workflow_ids=[]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_ids` | List[*str*] | :heavy_check_mark: | List of workflow IDs to archive | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowBulkArchiveResponse](../../models/workflowbulkarchiveresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## bulk_unarchive_workflows + +Bulk Unarchive Workflows + +### Example Usage + + +```python +from mistralai.client import Mistral +import os + + +with Mistral( + api_key=os.getenv("MISTRAL_API_KEY", ""), +) as mistral: + + res = mistral.workflows.bulk_unarchive_workflows(workflow_ids=[]) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `workflow_ids` | List[*str*] | :heavy_check_mark: | List of workflow IDs to unarchive | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.WorkflowBulkUnarchiveResponse](../../models/workflowbulkunarchiveresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.HTTPValidationError | 422 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + ## archive_workflow Archive Workflow diff --git a/pyproject.toml b/pyproject.toml index 09efd36c..be262286 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.4.5" +version = "2.4.7" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 9f9ae8c6..1a977e80 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.4.5" +__version__: str = "2.4.7" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.879.6" -__user_agent__: str = "speakeasy-sdk/python 2.4.5 2.879.6 1.0.0 mistralai" +__gen_version__: str = "2.884.13" +__user_agent__: str = "speakeasy-sdk/python 2.4.7 2.884.13 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/accesses.py b/src/mistralai/client/accesses.py index 5d859a39..90aef2e7 100644 --- a/src/mistralai/client/accesses.py +++ b/src/mistralai/client/accesses.py @@ -85,7 +85,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -178,7 +178,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -288,7 +288,7 @@ def update_or_create( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -398,7 +398,7 @@ async def update_or_create_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -433,7 +433,7 @@ def delete( ) -> models.Sharing: r"""Delete an access level. - Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. + Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. :param library_id: :param share_with_uuid: The id of the entity (user, workspace or organization) to share with @@ -505,7 +505,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -540,7 +540,7 @@ async def delete_async( ) -> models.Sharing: r"""Delete an access level. - Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours. + Given a library id, you can delete the access level of an entity. An owner cannot delete their own access. You have to be the owner of the library to delete an access other than yours. Warning: the response will change from 200 (returning the deleted sharing) to 204 No Content in a future version. :param library_id: :param share_with_uuid: The id of the entity (user, workspace or organization) to share with @@ -612,7 +612,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/agents.py b/src/mistralai/client/agents.py index 1bcd8c54..86c31b3e 100644 --- a/src/mistralai/client/agents.py +++ b/src/mistralai/client/agents.py @@ -176,7 +176,7 @@ def complete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -360,7 +360,7 @@ async def complete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -546,7 +546,7 @@ def stream( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -740,7 +740,7 @@ async def stream_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/basesdk.py b/src/mistralai/client/basesdk.py index 4a27eb2f..b305e63e 100644 --- a/src/mistralai/client/basesdk.py +++ b/src/mistralai/client/basesdk.py @@ -8,6 +8,7 @@ AfterErrorContext, AfterSuccessContext, BeforeRequestContext, + HookContext, ) from mistralai.client.utils import ( RetryConfig, @@ -238,10 +239,10 @@ def _build_request_with_client( def do_request( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.client @@ -285,19 +286,6 @@ def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = hooks.after_error( - AfterErrorContext(hook_ctx), http_res, None - ) - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -305,17 +293,27 @@ def do(): else: http_res = do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = hooks.after_error(AfterErrorContext(hook_ctx), http_res, None) + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) return http_res async def do_request_async( self, - hook_ctx, - request, - error_status_codes, - stream=False, + hook_ctx: HookContext, + request: httpx.Request, + is_error_status_code: Callable[[int], bool], + stream: bool = False, retry_config: Optional[Tuple[RetryConfig, List[str]]] = None, ) -> httpx.Response: client = self.sdk_configuration.async_client @@ -365,20 +363,6 @@ async def do(): "" if stream else http_res.text, ) - if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = await run_sync_in_thread( - hooks.after_error, AfterErrorContext(hook_ctx), http_res, None - ) - - if err is not None: - logger.debug("Request Exception", exc_info=True) - raise err - if result is not None: - http_res = result - else: - logger.debug("Raising unexpected SDK error") - raise errors.SDKError("Unexpected error occurred", http_res) - return http_res if retry_config is not None: @@ -388,7 +372,20 @@ async def do(): else: http_res = await do() - if not utils.match_status_codes(error_status_codes, http_res.status_code): + if is_error_status_code(http_res.status_code): + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None + ) + + if err is not None: + logger.debug("Request Exception", exc_info=True) + raise err + if result is not None: + http_res = result + else: + logger.debug("Raising unexpected SDK error") + raise errors.SDKError("Unexpected error occurred", http_res) + else: http_res = await run_sync_in_thread( hooks.after_success, AfterSuccessContext(hook_ctx), http_res ) diff --git a/src/mistralai/client/batch_jobs.py b/src/mistralai/client/batch_jobs.py index 2bf50fd3..456e285b 100644 --- a/src/mistralai/client/batch_jobs.py +++ b/src/mistralai/client/batch_jobs.py @@ -108,7 +108,7 @@ def list( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -219,7 +219,7 @@ async def list_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -336,7 +336,7 @@ def create( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -453,7 +453,7 @@ async def create_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -546,7 +546,7 @@ def get( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -639,7 +639,7 @@ async def get_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -726,7 +726,7 @@ def delete( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -813,7 +813,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -900,7 +900,7 @@ def cancel( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -987,7 +987,7 @@ async def cancel_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/beta_agents.py b/src/mistralai/client/beta_agents.py index 64baf53b..3c0661b6 100644 --- a/src/mistralai/client/beta_agents.py +++ b/src/mistralai/client/beta_agents.py @@ -130,7 +130,7 @@ def create( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -268,7 +268,7 @@ async def create_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -382,7 +382,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -496,7 +496,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -597,7 +597,7 @@ def get( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -698,7 +698,7 @@ async def get_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -848,7 +848,7 @@ def update( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -998,7 +998,7 @@ async def update_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1089,7 +1089,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1180,7 +1180,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1276,7 +1276,7 @@ def update_version( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1372,7 +1372,7 @@ async def update_version_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1471,7 +1471,7 @@ def list_versions( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1570,7 +1570,7 @@ async def list_versions_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1666,7 +1666,7 @@ def get_version( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1762,7 +1762,7 @@ async def get_version_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1861,7 +1861,7 @@ def create_version_alias( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1960,7 +1960,7 @@ async def create_version_alias_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2053,7 +2053,7 @@ def list_version_aliases( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2146,7 +2146,7 @@ async def list_version_aliases_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2242,7 +2242,7 @@ def delete_version_alias( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2338,7 +2338,7 @@ async def delete_version_alias_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/campaigns.py b/src/mistralai/client/campaigns.py index c9f28794..460b0b5a 100644 --- a/src/mistralai/client/campaigns.py +++ b/src/mistralai/client/campaigns.py @@ -96,7 +96,7 @@ def create( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -204,7 +204,7 @@ async def create_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -303,7 +303,7 @@ def list( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -402,7 +402,7 @@ async def list_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -495,7 +495,7 @@ def fetch( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -588,7 +588,7 @@ async def fetch_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -681,7 +681,7 @@ def delete( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -774,7 +774,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -867,7 +867,7 @@ def fetch_status( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -960,7 +960,7 @@ async def fetch_status_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1059,7 +1059,7 @@ def list_events( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1160,7 +1160,7 @@ async def list_events_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/chat.py b/src/mistralai/client/chat.py index 9deff9a0..74a9221a 100644 --- a/src/mistralai/client/chat.py +++ b/src/mistralai/client/chat.py @@ -270,7 +270,7 @@ def complete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -463,7 +463,7 @@ async def complete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -658,7 +658,7 @@ def stream( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -861,7 +861,7 @@ async def stream_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/chat_completion_events.py b/src/mistralai/client/chat_completion_events.py index af4124f0..ef737912 100644 --- a/src/mistralai/client/chat_completion_events.py +++ b/src/mistralai/client/chat_completion_events.py @@ -115,7 +115,7 @@ def search( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -230,7 +230,7 @@ async def search_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -335,7 +335,7 @@ def search_ids( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -440,7 +440,7 @@ async def search_ids_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -535,7 +535,7 @@ def fetch( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -628,7 +628,7 @@ async def fetch_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -721,7 +721,7 @@ def fetch_similar_events( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -816,7 +816,7 @@ async def fetch_similar_events_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -927,7 +927,7 @@ def judge( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1036,7 +1036,7 @@ async def judge_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/classifiers.py b/src/mistralai/client/classifiers.py index ddb2d0b1..36329ea6 100644 --- a/src/mistralai/client/classifiers.py +++ b/src/mistralai/client/classifiers.py @@ -95,7 +95,7 @@ def moderate( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -198,7 +198,7 @@ async def moderate_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -300,7 +300,7 @@ def moderate_chat( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -402,7 +402,7 @@ async def moderate_chat_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -505,7 +505,7 @@ def classify( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -608,7 +608,7 @@ async def classify_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -705,7 +705,7 @@ def classify_chat( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -802,7 +802,7 @@ async def classify_chat_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/connectors.py b/src/mistralai/client/connectors.py index 793c9f8a..dc8df3e8 100644 --- a/src/mistralai/client/connectors.py +++ b/src/mistralai/client/connectors.py @@ -116,7 +116,7 @@ def create( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -240,7 +240,7 @@ async def create_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -343,7 +343,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -446,7 +446,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -545,7 +545,7 @@ def get_auth_url( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -644,7 +644,7 @@ async def get_auth_url_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -665,6 +665,1296 @@ async def get_auth_url_async( raise errors.SDKError("Unexpected response received", http_res) + def activate_for_organization( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for an organization. + + Enable a connector at the organization level so all members can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForOrganizationV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/organization/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def activate_for_organization_async( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for an organization. + + Enable a connector at the organization level so all members can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForOrganizationV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/organization/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def deactivate_for_organization( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for an organization. + + Disable a connector at the organization level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForOrganizationV1Request( + connector_id=connector_id, + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/organization/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def deactivate_for_organization_async( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for an organization. + + Disable a connector at the organization level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForOrganizationV1Request( + connector_id=connector_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/organization/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_organization_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def activate_for_workspace( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for a workspace. + + Enable a connector at the workspace level so all members of the workspace can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForWorkspaceV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/workspace/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def activate_for_workspace_async( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for a workspace. + + Enable a connector at the workspace level so all members of the workspace can use it. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForWorkspaceV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/workspace/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def deactivate_for_workspace( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for a workspace. + + Disable a connector at the workspace level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForWorkspaceV1Request( + connector_id=connector_id, + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/workspace/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def deactivate_for_workspace_async( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for a workspace. + + Disable a connector at the workspace level. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForWorkspaceV1Request( + connector_id=connector_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/workspace/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_workspace_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def activate_for_user( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for the current user. + + Enable a connector for the calling user only. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForUserV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/user/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def activate_for_user_async( + self, + *, + connector_id: str, + requires_confirmation: OptionalNullable[ + Union[models.RequiresConfirmation, models.RequiresConfirmationTypedDict] + ] = UNSET, + skip_confirmation: OptionalNullable[ + Union[models.SkipConfirmation, models.SkipConfirmationTypedDict] + ] = UNSET, + include: OptionalNullable[List[str]] = UNSET, + exclude: OptionalNullable[List[str]] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Activate a connector for the current user. + + Enable a connector for the calling user only. + + :param connector_id: + :param requires_confirmation: + :param skip_confirmation: + :param include: + :param exclude: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorActivateForUserV1Request( + connector_id=connector_id, + tool_execution_configuration=models.ToolExecutionConfiguration( + requires_confirmation=utils.get_pydantic_model( + requires_confirmation, OptionalNullable[models.RequiresConfirmation] + ), + skip_confirmation=utils.get_pydantic_model( + skip_confirmation, OptionalNullable[models.SkipConfirmation] + ), + include=include, + exclude=exclude, + ), + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/user/activate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.tool_execution_configuration if request is not None else None, + True, + True, + "json", + OptionalNullable[models.ToolExecutionConfiguration], + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_activate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def deactivate_for_user( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for the current user. + + Disable a connector for the calling user only. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForUserV1Request( + connector_id=connector_id, + ) + + req = self._build_request( + method="POST", + path="/v1/connectors/{connector_id}/user/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def deactivate_for_user_async( + self, + *, + connector_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MessageResponse: + r"""Deactivate a connector for the current user. + + Disable a connector for the calling user only. + + :param connector_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.ConnectorDeactivateForUserV1Request( + connector_id=connector_id, + ) + + req = self._build_request_async( + method="POST", + path="/v1/connectors/{connector_id}/user/deactivate", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="connector_deactivate_for_user_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MessageResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def call_tool( self, *, @@ -755,7 +2045,7 @@ def call_tool( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -866,7 +2156,7 @@ async def call_tool_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -974,7 +2264,7 @@ def list_tools( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1084,7 +2374,7 @@ async def list_tools_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1179,7 +2469,7 @@ def get_authentication_methods( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1268,7 +2558,7 @@ async def get_authentication_methods_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1363,7 +2653,7 @@ def list_organization_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1462,7 +2752,7 @@ async def list_organization_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1577,7 +2867,7 @@ def create_or_update_organization_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1692,7 +2982,7 @@ async def create_or_update_organization_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1791,7 +3081,7 @@ def list_workspace_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1890,7 +3180,7 @@ async def list_workspace_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2005,7 +3295,7 @@ def create_or_update_workspace_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2120,7 +3410,7 @@ async def create_or_update_workspace_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2219,7 +3509,7 @@ def list_user_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2318,7 +3608,7 @@ async def list_user_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2433,7 +3723,7 @@ def create_or_update_user_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2548,7 +3838,7 @@ async def create_or_update_user_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2644,7 +3934,7 @@ def delete_organization_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2740,7 +4030,7 @@ async def delete_organization_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2836,7 +4126,7 @@ def delete_workspace_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2932,7 +4222,7 @@ async def delete_workspace_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3028,7 +4318,7 @@ def delete_user_credentials( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3124,7 +4414,7 @@ async def delete_user_credentials_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3149,8 +4439,8 @@ def get( self, *, connector_id_or_name: str, + fetch_user_data: Optional[bool] = False, fetch_customer_data: Optional[bool] = False, - fetch_connection_secrets: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -3161,8 +4451,8 @@ def get( Get a connector by its ID or name. :param connector_id_or_name: + :param fetch_user_data: Fetch the user-level data associated with the connector (e.g. connection credentials). :param fetch_customer_data: Fetch the customer data associated with the connector (e.g. customer secrets / config). - :param fetch_connection_secrets: Fetch the general connection secrets associated with the connector. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3182,8 +4472,8 @@ def get( base_url = self._get_url(base_url, url_variables) request = models.ConnectorGetV1Request( + fetch_user_data=fetch_user_data, fetch_customer_data=fetch_customer_data, - fetch_connection_secrets=fetch_connection_secrets, connector_id_or_name=connector_id_or_name, ) @@ -3223,7 +4513,7 @@ def get( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3248,8 +4538,8 @@ async def get_async( self, *, connector_id_or_name: str, + fetch_user_data: Optional[bool] = False, fetch_customer_data: Optional[bool] = False, - fetch_connection_secrets: Optional[bool] = False, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -3260,8 +4550,8 @@ async def get_async( Get a connector by its ID or name. :param connector_id_or_name: + :param fetch_user_data: Fetch the user-level data associated with the connector (e.g. connection credentials). :param fetch_customer_data: Fetch the customer data associated with the connector (e.g. customer secrets / config). - :param fetch_connection_secrets: Fetch the general connection secrets associated with the connector. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -3281,8 +4571,8 @@ async def get_async( base_url = self._get_url(base_url, url_variables) request = models.ConnectorGetV1Request( + fetch_user_data=fetch_user_data, fetch_customer_data=fetch_customer_data, - fetch_connection_secrets=fetch_connection_secrets, connector_id_or_name=connector_id_or_name, ) @@ -3322,7 +4612,7 @@ async def get_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3352,6 +4642,7 @@ def update( description: OptionalNullable[str] = UNSET, icon_url: OptionalNullable[str] = UNSET, system_prompt: OptionalNullable[str] = UNSET, + protocol: OptionalNullable[models.ConnectorProtocol] = UNSET, connection_config: OptionalNullable[Dict[str, Any]] = UNSET, connection_secrets: OptionalNullable[Dict[str, Any]] = UNSET, server: OptionalNullable[str] = UNSET, @@ -3374,6 +4665,7 @@ def update( :param description: The description of the connector. :param icon_url: The optional url of the icon you want to associate to the connector. :param system_prompt: Optional system prompt for the connector. + :param protocol: Protocol of the connector. :param connection_config: Optional new connection config. :param connection_secrets: Optional new connection secrets :param server: New server url for your mcp connector. @@ -3405,6 +4697,7 @@ def update( description=description, icon_url=icon_url, system_prompt=system_prompt, + protocol=protocol, connection_config=connection_config, connection_secrets=connection_secrets, server=server, @@ -3458,7 +4751,7 @@ def update( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3488,6 +4781,7 @@ async def update_async( description: OptionalNullable[str] = UNSET, icon_url: OptionalNullable[str] = UNSET, system_prompt: OptionalNullable[str] = UNSET, + protocol: OptionalNullable[models.ConnectorProtocol] = UNSET, connection_config: OptionalNullable[Dict[str, Any]] = UNSET, connection_secrets: OptionalNullable[Dict[str, Any]] = UNSET, server: OptionalNullable[str] = UNSET, @@ -3510,6 +4804,7 @@ async def update_async( :param description: The description of the connector. :param icon_url: The optional url of the icon you want to associate to the connector. :param system_prompt: Optional system prompt for the connector. + :param protocol: Protocol of the connector. :param connection_config: Optional new connection config. :param connection_secrets: Optional new connection secrets :param server: New server url for your mcp connector. @@ -3541,6 +4836,7 @@ async def update_async( description=description, icon_url=icon_url, system_prompt=system_prompt, + protocol=protocol, connection_config=connection_config, connection_secrets=connection_secrets, server=server, @@ -3594,7 +4890,7 @@ async def update_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3687,7 +4983,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3780,7 +5076,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/conversations.py b/src/mistralai/client/conversations.py index 0e0bca0d..33b9e0cf 100644 --- a/src/mistralai/client/conversations.py +++ b/src/mistralai/client/conversations.py @@ -505,7 +505,7 @@ def start( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -659,7 +659,7 @@ async def start_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -758,7 +758,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -859,7 +859,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -954,7 +954,7 @@ def get( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1047,7 +1047,7 @@ async def get_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1140,7 +1140,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1233,7 +1233,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1368,7 +1368,7 @@ def append( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1503,7 +1503,7 @@ async def append_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1596,7 +1596,7 @@ def get_history( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1689,7 +1689,7 @@ async def get_history_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1782,7 +1782,7 @@ def get_messages( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1875,7 +1875,7 @@ async def get_messages_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2020,7 +2020,7 @@ def restart( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2165,7 +2165,7 @@ async def restart_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2319,7 +2319,7 @@ def start_stream( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -2480,7 +2480,7 @@ async def start_stream_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -2622,7 +2622,7 @@ def append_stream( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -2764,7 +2764,7 @@ async def append_stream_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -2916,7 +2916,7 @@ def restart_stream( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -3068,7 +3068,7 @@ async def restart_stream_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/datasets.py b/src/mistralai/client/datasets.py index 437b42fd..078bb18b 100644 --- a/src/mistralai/client/datasets.py +++ b/src/mistralai/client/datasets.py @@ -101,7 +101,7 @@ def create( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -200,7 +200,7 @@ async def create_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -299,7 +299,7 @@ def list( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -398,7 +398,7 @@ async def list_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -491,7 +491,7 @@ def fetch( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -584,7 +584,7 @@ async def fetch_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -677,7 +677,7 @@ def delete( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -770,7 +770,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -878,7 +878,7 @@ def update( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -986,7 +986,7 @@ async def update_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1087,7 +1087,7 @@ def list_records( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1188,7 +1188,7 @@ async def list_records_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1296,7 +1296,7 @@ def create_record( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1404,7 +1404,7 @@ async def create_record_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1509,7 +1509,7 @@ def import_from_campaign( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1614,7 +1614,7 @@ async def import_from_campaign_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1719,7 +1719,7 @@ def import_from_explorer( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1824,7 +1824,7 @@ async def import_from_explorer_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1929,7 +1929,7 @@ def import_from_file( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2034,7 +2034,7 @@ async def import_from_file_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2139,7 +2139,7 @@ def import_from_playground( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2244,7 +2244,7 @@ async def import_from_playground_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2349,7 +2349,7 @@ def import_from_dataset_records( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2454,7 +2454,7 @@ async def import_from_dataset_records_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2547,7 +2547,7 @@ def export_to_jsonl( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2640,7 +2640,7 @@ async def export_to_jsonl_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2736,7 +2736,7 @@ def fetch_task( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2832,7 +2832,7 @@ async def fetch_task_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2933,7 +2933,7 @@ def list_tasks( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -3036,7 +3036,7 @@ async def list_tasks_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/deployments.py b/src/mistralai/client/deployments.py index 26e9c565..086e95a2 100644 --- a/src/mistralai/client/deployments.py +++ b/src/mistralai/client/deployments.py @@ -84,7 +84,7 @@ def list_deployments( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -178,7 +178,7 @@ async def list_deployments_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -269,7 +269,7 @@ def get_deployment( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -360,7 +360,7 @@ async def get_deployment_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/documents.py b/src/mistralai/client/documents.py index 2a555d3e..a3c8b07b 100644 --- a/src/mistralai/client/documents.py +++ b/src/mistralai/client/documents.py @@ -2,12 +2,14 @@ # @generated-id: bcc17286c31c from .basesdk import BaseSDK +from datetime import datetime from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Dict, Mapping, Optional, Union +from typing_extensions import deprecated class Documents(BaseSDK): @@ -36,7 +38,7 @@ def list( :param search: :param page_size: :param page: - :param filters_attributes: + :param filters_attributes: Deprecated: this parameter will be removed in a future version. :param sort_by: :param sort_order: :param retries: Override the default retry configuration for this method @@ -103,7 +105,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -147,7 +149,7 @@ async def list_async( :param search: :param page_size: :param page: - :param filters_attributes: + :param filters_attributes: Deprecated: this parameter will be removed in a future version. :param sort_by: :param sort_order: :param retries: Override the default retry configuration for this method @@ -214,7 +216,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -323,7 +325,7 @@ def upload( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -432,7 +434,7 @@ async def upload_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -528,7 +530,7 @@ def get( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -624,7 +626,7 @@ async def get_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -654,6 +656,242 @@ def update( attributes: OptionalNullable[ Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Document: + r"""Update the metadata of a specific document. + + Given a library and a document in that library, update the name and/or attributes of that document. + + :param library_id: + :param document_id: + :param name: + :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesDocumentsPatchV1Request( + library_id=library_id, + document_id=document_id, + update_document_request=models.UpdateDocumentRequest( + name=name, + attributes=attributes, + expires_at=expires_at, + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/libraries/{library_id}/documents/{document_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_document_request, + False, + False, + "json", + models.UpdateDocumentRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_documents_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Document, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + library_id: str, + document_id: str, + name: Optional[str] = None, + attributes: OptionalNullable[ + Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] + ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Document: + r"""Update the metadata of a specific document. + + Given a library and a document in that library, update the name and/or attributes of that document. + + :param library_id: + :param document_id: + :param name: + :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesDocumentsPatchV1Request( + library_id=library_id, + document_id=document_id, + update_document_request=models.UpdateDocumentRequest( + name=name, + attributes=attributes, + expires_at=expires_at, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/libraries/{library_id}/documents/{document_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_document_request, + False, + False, + "json", + models.UpdateDocumentRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_documents_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Document, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + def libraries_documents_update_v1( + self, + *, + library_id: str, + document_id: str, + name: Optional[str] = None, + attributes: OptionalNullable[ + Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] + ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -667,6 +905,7 @@ def update( :param document_id: :param name: :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -691,6 +930,7 @@ def update( update_document_request=models.UpdateDocumentRequest( name=name, attributes=attributes, + expires_at=expires_at, ), ) @@ -737,7 +977,7 @@ def update( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -758,7 +998,10 @@ def update( raise errors.SDKError("Unexpected response received", http_res) - async def update_async( + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + async def libraries_documents_update_v1_async( self, *, library_id: str, @@ -767,6 +1010,7 @@ async def update_async( attributes: OptionalNullable[ Union[Dict[str, models.Attributes], Dict[str, models.AttributesTypedDict]] ] = UNSET, + expires_at: OptionalNullable[datetime] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -780,6 +1024,7 @@ async def update_async( :param document_id: :param name: :param attributes: + :param expires_at: If set, the document will be automatically deleted after this date. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -804,6 +1049,7 @@ async def update_async( update_document_request=models.UpdateDocumentRequest( name=name, attributes=attributes, + expires_at=expires_at, ), ) @@ -850,7 +1096,7 @@ async def update_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -946,7 +1192,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1042,7 +1288,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1144,7 +1390,7 @@ def text_content( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1246,7 +1492,7 @@ async def text_content_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1342,7 +1588,7 @@ def status( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1438,7 +1684,7 @@ async def status_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1534,7 +1780,7 @@ def get_signed_url( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1630,7 +1876,7 @@ async def get_signed_url_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1726,7 +1972,7 @@ def extracted_text_signed_url( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1822,7 +2068,7 @@ async def extracted_text_signed_url_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1918,7 +2164,7 @@ def reprocess( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2014,7 +2260,7 @@ async def reprocess_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/embeddings.py b/src/mistralai/client/embeddings.py index 64337b4f..17eb9a57 100644 --- a/src/mistralai/client/embeddings.py +++ b/src/mistralai/client/embeddings.py @@ -105,7 +105,7 @@ def create( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -218,7 +218,7 @@ async def create_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/events.py b/src/mistralai/client/events.py index 3a4c4722..4ebb6505 100644 --- a/src/mistralai/client/events.py +++ b/src/mistralai/client/events.py @@ -116,7 +116,7 @@ def get_stream_events( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -252,7 +252,7 @@ async def get_stream_events_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -365,7 +365,7 @@ def get_workflow_events( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -468,7 +468,7 @@ async def get_workflow_events_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/executions.py b/src/mistralai/client/executions.py index e4b9f90b..aa22f09e 100644 --- a/src/mistralai/client/executions.py +++ b/src/mistralai/client/executions.py @@ -81,7 +81,7 @@ def get_workflow_execution( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -172,7 +172,7 @@ async def get_workflow_execution_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -266,7 +266,7 @@ def get_workflow_execution_history( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -360,7 +360,7 @@ async def get_workflow_execution_history_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -473,7 +473,7 @@ def signal_workflow_execution( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -586,7 +586,7 @@ async def signal_workflow_execution_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -699,7 +699,7 @@ def query_workflow_execution( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -812,7 +812,7 @@ async def query_workflow_execution_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -903,7 +903,7 @@ def terminate_workflow_execution( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -994,7 +994,7 @@ async def terminate_workflow_execution_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1088,7 +1088,7 @@ def batch_terminate_workflow_executions( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1182,7 +1182,7 @@ async def batch_terminate_workflow_executions_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1273,7 +1273,7 @@ def cancel_workflow_execution( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1364,7 +1364,7 @@ async def cancel_workflow_execution_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1458,7 +1458,7 @@ def batch_cancel_workflow_executions( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1552,7 +1552,7 @@ async def batch_cancel_workflow_executions_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1664,7 +1664,7 @@ def reset_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1776,7 +1776,7 @@ async def reset_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1889,7 +1889,7 @@ def update_workflow_execution( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2002,7 +2002,7 @@ async def update_workflow_execution_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2093,7 +2093,7 @@ def get_workflow_execution_trace_otel( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2186,7 +2186,7 @@ async def get_workflow_execution_trace_otel_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2279,7 +2279,7 @@ def get_workflow_execution_trace_summary( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2372,7 +2372,7 @@ async def get_workflow_execution_trace_summary_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2471,7 +2471,7 @@ def get_workflow_execution_trace_events( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2570,7 +2570,7 @@ async def get_workflow_execution_trace_events_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2671,7 +2671,7 @@ def stream( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -2781,7 +2781,7 @@ async def stream_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/fields.py b/src/mistralai/client/fields.py index 17441ca6..5e701da9 100644 --- a/src/mistralai/client/fields.py +++ b/src/mistralai/client/fields.py @@ -74,7 +74,7 @@ def list( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -162,7 +162,7 @@ async def list_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -260,7 +260,7 @@ def fetch_options( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -358,7 +358,7 @@ async def fetch_options_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -469,7 +469,7 @@ def fetch_option_counts( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -580,7 +580,7 @@ async def fetch_option_counts_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/files.py b/src/mistralai/client/files.py index e4549c75..5f8396f5 100644 --- a/src/mistralai/client/files.py +++ b/src/mistralai/client/files.py @@ -112,7 +112,7 @@ def upload( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -225,7 +225,7 @@ async def upload_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -333,7 +333,7 @@ def list( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -441,7 +441,7 @@ async def list_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -528,7 +528,7 @@ def retrieve( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -615,7 +615,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -702,7 +702,7 @@ def delete( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -789,7 +789,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -876,7 +876,7 @@ def download( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -965,7 +965,7 @@ async def download_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -1055,7 +1055,7 @@ def get_signed_url( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1143,7 +1143,7 @@ async def get_signed_url_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/fim.py b/src/mistralai/client/fim.py index d25f79b1..d868bcff 100644 --- a/src/mistralai/client/fim.py +++ b/src/mistralai/client/fim.py @@ -126,7 +126,7 @@ def complete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -260,7 +260,7 @@ async def complete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -394,7 +394,7 @@ def stream( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -536,7 +536,7 @@ async def stream_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/fine_tuning_jobs.py b/src/mistralai/client/fine_tuning_jobs.py index a6bf93a3..708cc537 100644 --- a/src/mistralai/client/fine_tuning_jobs.py +++ b/src/mistralai/client/fine_tuning_jobs.py @@ -113,7 +113,7 @@ def list( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -229,7 +229,7 @@ async def list_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -375,7 +375,7 @@ def create( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -523,7 +523,7 @@ async def create_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -612,7 +612,7 @@ def get( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -701,7 +701,7 @@ async def get_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -790,7 +790,7 @@ def cancel( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -879,7 +879,7 @@ async def cancel_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -968,7 +968,7 @@ def start( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1057,7 +1057,7 @@ async def start_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/ingestion_pipeline_configurations.py b/src/mistralai/client/ingestion_pipeline_configurations.py index adef39f9..dfd139ba 100644 --- a/src/mistralai/client/ingestion_pipeline_configurations.py +++ b/src/mistralai/client/ingestion_pipeline_configurations.py @@ -77,7 +77,7 @@ def list( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -159,7 +159,7 @@ async def list_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -258,7 +258,7 @@ def register( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -363,7 +363,7 @@ async def register_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -469,7 +469,7 @@ def update_run_info( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -575,7 +575,7 @@ async def update_run_info_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/judges.py b/src/mistralai/client/judges.py index 52c8899e..187eed0d 100644 --- a/src/mistralai/client/judges.py +++ b/src/mistralai/client/judges.py @@ -101,7 +101,7 @@ def create( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -214,7 +214,7 @@ async def create_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -319,7 +319,7 @@ def list( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -424,7 +424,7 @@ async def list_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -517,7 +517,7 @@ def fetch( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -610,7 +610,7 @@ async def fetch_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -703,7 +703,7 @@ def delete( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -796,7 +796,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -920,7 +920,7 @@ def update( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1044,7 +1044,7 @@ async def update_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1154,7 +1154,7 @@ def judge_conversation( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1264,7 +1264,7 @@ async def judge_conversation_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/libraries.py b/src/mistralai/client/libraries.py index 928c1ea8..3076d09c 100644 --- a/src/mistralai/client/libraries.py +++ b/src/mistralai/client/libraries.py @@ -11,6 +11,7 @@ from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response from typing import Any, Mapping, Optional +from typing_extensions import deprecated class Libraries(BaseSDK): @@ -51,7 +52,7 @@ def list( :param page_size: :param page: :param search: Case-insensitive search on the library name. - :param filter_owned_by_me: Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. + :param filter_owned_by_me: Deprecated: this parameter will be removed in a future version. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -113,7 +114,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -153,7 +154,7 @@ async def list_async( :param page_size: :param page: :param search: Case-insensitive search on the library name. - :param filter_owned_by_me: Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter. + :param filter_owned_by_me: Deprecated: this parameter will be removed in a future version. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -215,7 +216,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -320,7 +321,7 @@ def create( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -425,7 +426,7 @@ async def create_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -518,7 +519,7 @@ def get( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -611,7 +612,7 @@ async def get_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -643,7 +644,7 @@ def delete( ) -> models.Library: r"""Delete a library and all of it's document. - Given a library id, deletes it together with all documents that have been uploaded to that library. + Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. :param library_id: :param retries: Override the default retry configuration for this method @@ -704,7 +705,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -736,7 +737,7 @@ async def delete_async( ) -> models.Library: r"""Delete a library and all of it's document. - Given a library id, deletes it together with all documents that have been uploaded to that library. + Given a library id, deletes it together with all documents that have been uploaded to that library. Warning: the response will change from 200 (returning the deleted library) to 204 No Content in a future version. :param library_id: :param retries: Override the default retry configuration for this method @@ -797,7 +798,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -833,6 +834,225 @@ def update( Given a library id, you can update the name and description. + :param library_id: + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesPatchV1Request( + library_id=library_id, + update_library_request=models.UpdateLibraryRequest( + name=name, + description=description, + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/libraries/{library_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_library_request, + False, + False, + "json", + models.UpdateLibraryRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Library, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_async( + self, + *, + library_id: str, + name: Optional[str] = None, + description: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Library: + r"""Update a library. + + Given a library id, you can update the name and description. + + :param library_id: + :param name: + :param description: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.LibrariesPatchV1Request( + library_id=library_id, + update_library_request=models.UpdateLibraryRequest( + name=name, + description=description, + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/libraries/{library_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.update_library_request, + False, + False, + "json", + models.UpdateLibraryRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="libraries_patch_v1", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.Library, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + def libraries_update_v1( + self, + *, + library_id: str, + name: Optional[str] = None, + description: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.Library: + r"""Update a library. + + Given a library id, you can update the name and description. + :param library_id: :param name: :param description: @@ -905,7 +1125,7 @@ def update( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -926,7 +1146,10 @@ def update( raise errors.SDKError("Unexpected response received", http_res) - async def update_async( + @deprecated( + "warning: ** DEPRECATED ** - Use the PATCH method instead. This PUT endpoint will be removed in a future version.." + ) + async def libraries_update_v1_async( self, *, library_id: str, @@ -1013,7 +1236,7 @@ async def update_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/metrics.py b/src/mistralai/client/metrics.py index 60597c40..d3814d6b 100644 --- a/src/mistralai/client/metrics.py +++ b/src/mistralai/client/metrics.py @@ -109,7 +109,7 @@ def get_workflow_metrics( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -227,7 +227,7 @@ async def get_workflow_metrics_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/models/__init__.py b/src/mistralai/client/models/__init__.py index ab36240c..6121091f 100644 --- a/src/mistralai/client/models/__init__.py +++ b/src/mistralai/client/models/__init__.py @@ -9,6 +9,13 @@ Or, OrTypedDict, ) +from .logicalexpression import ( + Expression, + ExpressionTypedDict, + LogicalExpression, + LogicalExpressionType, + LogicalExpressionTypedDict, +) from typing import Any, TYPE_CHECKING from mistralai.client.utils.dynamic_imports import lazy_getattr, lazy_dir @@ -348,6 +355,15 @@ ClassifierTrainingParameters, ClassifierTrainingParametersTypedDict, ) + from .clientcapabilities import ClientCapabilities, ClientCapabilitiesTypedDict + from .clienttaskscapability import ( + ClientTasksCapability, + ClientTasksCapabilityTypedDict, + ) + from .clienttasksrequestscapability import ( + ClientTasksRequestsCapability, + ClientTasksRequestsCapabilityTypedDict, + ) from .codeinterpretertool import CodeInterpreterTool, CodeInterpreterToolTypedDict from .completionargs import CompletionArgs, CompletionArgsTypedDict from .completionargsstop import CompletionArgsStop, CompletionArgsStopTypedDict @@ -388,11 +404,28 @@ CompletionTrainingParameters, CompletionTrainingParametersTypedDict, ) + from .connectionconfigtype import ConnectionConfigType from .connectioncredentials import ( ConnectionCredentials, ConnectionCredentialsTypedDict, ) + from .connectionpreference import ( + ConnectionPreference, + ConnectionPreferenceTypedDict, + ) from .connector import Connector, ConnectorTypedDict + from .connector_activate_for_organization_v1op import ( + ConnectorActivateForOrganizationV1Request, + ConnectorActivateForOrganizationV1RequestTypedDict, + ) + from .connector_activate_for_user_v1op import ( + ConnectorActivateForUserV1Request, + ConnectorActivateForUserV1RequestTypedDict, + ) + from .connector_activate_for_workspace_v1op import ( + ConnectorActivateForWorkspaceV1Request, + ConnectorActivateForWorkspaceV1RequestTypedDict, + ) from .connector_call_tool_v1op import ( ConnectorCallToolV1Request, ConnectorCallToolV1RequestTypedDict, @@ -409,6 +442,18 @@ ConnectorCreateOrUpdateWorkspaceCredentialsV1Request, ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict, ) + from .connector_deactivate_for_organization_v1op import ( + ConnectorDeactivateForOrganizationV1Request, + ConnectorDeactivateForOrganizationV1RequestTypedDict, + ) + from .connector_deactivate_for_user_v1op import ( + ConnectorDeactivateForUserV1Request, + ConnectorDeactivateForUserV1RequestTypedDict, + ) + from .connector_deactivate_for_workspace_v1op import ( + ConnectorDeactivateForWorkspaceV1Request, + ConnectorDeactivateForWorkspaceV1RequestTypedDict, + ) from .connector_delete_organization_credentials_v1op import ( ConnectorDeleteOrganizationCredentialsV1Request, ConnectorDeleteOrganizationCredentialsV1RequestTypedDict, @@ -471,6 +516,8 @@ ConnectorCallToolRequest, ConnectorCallToolRequestTypedDict, ) + from .connectorlocale import ConnectorLocale, ConnectorLocaleTypedDict + from .connectorprotocol import ConnectorProtocol from .connectorsqueryfilters import ( ConnectorsQueryFilters, ConnectorsQueryFiltersTypedDict, @@ -492,6 +539,7 @@ ConnectorToolResultMetadata, ConnectorToolResultMetadataTypedDict, ) + from .consumertype import ConsumerType from .contentchunk import ContentChunk, ContentChunkTypedDict, UnknownContentChunk from .conversationappendrequest import ( ConversationAppendRequest, @@ -625,6 +673,21 @@ CreateLibraryRequestTypedDict, OwnerType, ) + from .createsearchindexinforequest import ( + CreateSearchIndexInfoRequest, + CreateSearchIndexInfoRequestIndex, + CreateSearchIndexInfoRequestIndexTypedDict, + CreateSearchIndexInfoRequestStatus, + CreateSearchIndexInfoRequestTypedDict, + ) + from .createvespaschemarequest import ( + CreateVespaSchemaRequest, + CreateVespaSchemaRequestTypedDict, + ) + from .createvespasearchindexinforequest import ( + CreateVespaSearchIndexInfoRequest, + CreateVespaSearchIndexInfoRequestTypedDict, + ) from .credentialscreateorupdate import ( CredentialsCreateOrUpdate, CredentialsCreateOrUpdateTypedDict, @@ -750,6 +813,10 @@ from .documentlibrarytool import DocumentLibraryTool, DocumentLibraryToolTypedDict from .documenttextcontent import DocumentTextContent, DocumentTextContentTypedDict from .documenturlchunk import DocumentURLChunk, DocumentURLChunkTypedDict + from .elicitationcapability import ( + ElicitationCapability, + ElicitationCapabilityTypedDict, + ) from .embeddedresource import ( EmbeddedResource, EmbeddedResourceTypedDict, @@ -770,6 +837,7 @@ ) from .encodedpayloadoptions import EncodedPayloadOptions from .encodingformat import EncodingFormat + from .encryptedpatchvalue import EncryptedPatchValue, EncryptedPatchValueTypedDict from .entitytype import EntityType from .event import Event, EventTypedDict from .eventprogressstatus import EventProgressStatus @@ -985,6 +1053,17 @@ GetRunV1WorkflowsRunsRunIDGetRequest, GetRunV1WorkflowsRunsRunIDGetRequestTypedDict, ) + from .get_schedule_v1_workflows_schedules_schedule_id_getop import ( + GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest, + GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict, + ) + from .get_schedules_v1_workflows_schedules_getop import ( + GetSchedulesV1WorkflowsSchedulesGetRequest, + GetSchedulesV1WorkflowsSchedulesGetRequestTypedDict, + GetSchedulesV1WorkflowsSchedulesGetResponse, + GetSchedulesV1WorkflowsSchedulesGetResponseTypedDict, + GetSchedulesV1WorkflowsSchedulesGetStatus, + ) from .get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop import ( GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest, GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict, @@ -1167,7 +1246,12 @@ ) from .jsonpatch import JSONPatch, JSONPatchTypedDict, UnknownJSONPatch from .jsonpatchadd import JSONPatchAdd, JSONPatchAddTypedDict - from .jsonpatchappend import JSONPatchAppend, JSONPatchAppendTypedDict + from .jsonpatchappend import ( + JSONPatchAppend, + JSONPatchAppendTypedDict, + JSONPatchAppendValue, + JSONPatchAppendValueTypedDict, + ) from .jsonpatchpayloadresponse import ( JSONPatchPayloadResponse, JSONPatchPayloadResponseTypedDict, @@ -1258,6 +1342,10 @@ LibrariesDocumentsListV1Request, LibrariesDocumentsListV1RequestTypedDict, ) + from .libraries_documents_patch_v1op import ( + LibrariesDocumentsPatchV1Request, + LibrariesDocumentsPatchV1RequestTypedDict, + ) from .libraries_documents_reprocess_v1op import ( LibrariesDocumentsReprocessV1Request, LibrariesDocumentsReprocessV1RequestTypedDict, @@ -1280,6 +1368,10 @@ LibrariesListV1Request, LibrariesListV1RequestTypedDict, ) + from .libraries_patch_v1op import ( + LibrariesPatchV1Request, + LibrariesPatchV1RequestTypedDict, + ) from .libraries_share_create_v1op import ( LibrariesShareCreateV1Request, LibrariesShareCreateV1RequestTypedDict, @@ -1371,10 +1463,36 @@ ListWorkflowEventResponseTypedDict, ) from .locationtype import LocationType + from .mcpprompt import MCPPrompt, MCPPromptTypedDict + from .mcpresource import MCPResource, MCPResourceTypedDict + from .mcpserverauthenticationrequirement import ( + MCPServerAuthenticationRequirement, + MCPServerAuthenticationRequirementTypedDict, + ) + from .mcpservercard import ( + MCPServerCard, + MCPServerCardTypedDict, + Prompts, + PromptsTypedDict, + Resources, + ResourcesTypedDict, + Tools, + ToolsTypedDict, + ) + from .mcpservercardmeta import MCPServerCardMeta, MCPServerCardMetaTypedDict from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict + from .mcpserverremote import ( + MCPServerRemote, + MCPServerRemoteType, + MCPServerRemoteTypedDict, + ) + from .mcpserverremoteheader import ( + MCPServerRemoteHeader, + MCPServerRemoteHeaderTypedDict, + ) + from .mcpserverrepository import MCPServerRepository, MCPServerRepositoryTypedDict from .mcptool import MCPTool, MCPToolTypedDict from .mcptoolmeta import MCPToolMeta, MCPToolMetaTypedDict - from .mcpuitoolmeta import MCPUIToolMeta, MCPUIToolMetaTypedDict, Visibility from .messageentries import MessageEntries, MessageEntriesTypedDict from .messageinputcontentchunks import ( MessageInputContentChunks, @@ -1499,6 +1617,10 @@ ) from .paginationinfo import PaginationInfo, PaginationInfoTypedDict from .paginationresponse import PaginationResponse, PaginationResponseTypedDict + from .partialscheduledefinition import ( + PartialScheduleDefinition, + PartialScheduleDefinitionTypedDict, + ) from .pause_schedule_v1_workflows_schedules_schedule_id_pause_postop import ( PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest, PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict, @@ -1526,11 +1648,17 @@ from .prediction import Prediction, PredictionTypedDict from .processingstatus import ProcessingStatus, ProcessingStatusTypedDict from .processstatus import ProcessStatus + from .promptargument import PromptArgument, PromptArgumentTypedDict + from .promptscapability import PromptsCapability, PromptsCapabilityTypedDict from .prompttokensdetails import PromptTokensDetails, PromptTokensDetailsTypedDict from .publicauthenticationmethod import ( PublicAuthenticationMethod, PublicAuthenticationMethodTypedDict, ) + from .publicconnectionconfig import ( + PublicConnectionConfig, + PublicConnectionConfigTypedDict, + ) from .query_workflow_execution_v1_workflows_executions_execution_id_queries_postop import ( QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest, QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict, @@ -1602,6 +1730,8 @@ ) from .resetinvocationbody import ResetInvocationBody, ResetInvocationBodyTypedDict from .resourcelink import ResourceLink, ResourceLinkTypedDict + from .resourcescapability import ResourcesCapability, ResourcesCapabilityTypedDict + from .resourcetype import ResourceType from .resourcevisibility import ResourceVisibility from .responsedoneevent import ResponseDoneEvent, ResponseDoneEventTypedDict from .responseerrorevent import ResponseErrorEvent, ResponseErrorEventTypedDict @@ -1623,7 +1753,9 @@ UnknownResponseRetrieveModelV1ModelsModelIDGet, ) from .roles import Roles + from .rootscapability import RootsCapability, RootsCapabilityTypedDict from .sampletype import SampleType + from .samplingcapability import SamplingCapability, SamplingCapabilityTypedDict from .scalarmetric import ( ScalarMetric, ScalarMetricTypedDict, @@ -1664,7 +1796,25 @@ SearchChatCompletionEventsResponse, SearchChatCompletionEventsResponseTypedDict, ) + from .searchindexresponse import ( + SearchIndexResponse, + SearchIndexResponseIndex, + SearchIndexResponseIndexTypedDict, + SearchIndexResponseStatus, + SearchIndexResponseTypedDict, + UnknownSearchIndexResponseIndex, + ) from .security import Security, SecurityTypedDict + from .servercapabilities import ServerCapabilities, ServerCapabilitiesTypedDict + from .serverlocale import ServerLocale, ServerLocaleTypedDict + from .servertaskscapability import ( + ServerTasksCapability, + ServerTasksCapabilityTypedDict, + ) + from .servertasksrequestscapability import ( + ServerTasksRequestsCapability, + ServerTasksRequestsCapabilityTypedDict, + ) from .shareenum import ShareEnum from .sharing import Sharing, SharingTypedDict from .sharingdelete import SharingDelete, SharingDeleteTypedDict @@ -1733,6 +1883,18 @@ SystemMessageContentChunks, SystemMessageContentChunksTypedDict, ) + from .taskselicitationcapability import ( + TasksElicitationCapability, + TasksElicitationCapabilityTypedDict, + ) + from .taskssamplingcapability import ( + TasksSamplingCapability, + TasksSamplingCapabilityTypedDict, + ) + from .taskstoolscapability import ( + TasksToolsCapability, + TasksToolsCapabilityTypedDict, + ) from .tempogettraceresponse import ( TempoGetTraceResponse, TempoGetTraceResponseTypedDict, @@ -1806,6 +1968,14 @@ from .toolchoiceenum import ToolChoiceEnum from .toolconfiguration import ToolConfiguration, ToolConfigurationTypedDict from .toolexecution import TaskSupport, ToolExecution, ToolExecutionTypedDict + from .toolexecutionconfiguration import ( + RequiresConfirmation, + RequiresConfirmationTypedDict, + SkipConfirmation, + SkipConfirmationTypedDict, + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, + ) from .toolexecutiondeltaevent import ( ToolExecutionDeltaEvent, ToolExecutionDeltaEventName, @@ -1842,13 +2012,14 @@ ToolMessageContentTypedDict, ToolMessageTypedDict, ) + from .toolproperties import ToolProperties, ToolPropertiesTypedDict from .toolreferencechunk import ( ToolReferenceChunk, ToolReferenceChunkTool, ToolReferenceChunkToolTypedDict, ToolReferenceChunkTypedDict, ) - from .tooltype import ToolType + from .toolscapability import ToolsCapability, ToolsCapabilityTypedDict from .trainingfile import TrainingFile, TrainingFileTypedDict from .transcriptionresponse import ( TranscriptionResponse, @@ -1882,8 +2053,7 @@ TranscriptionStreamTextDelta, TranscriptionStreamTextDeltaTypedDict, ) - from .turbinetoollocale import TurbineToolLocale, TurbineToolLocaleTypedDict - from .turbinetoolmeta import TurbineToolMeta, TurbineToolMetaTypedDict + from .turbinemeta import TurbineMeta, TurbineMetaTypedDict from .unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop import ( UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest, UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequestTypedDict, @@ -1916,6 +2086,10 @@ UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest, UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict, ) + from .update_schedule_v1_workflows_schedules_schedule_id_patchop import ( + UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest, + UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict, + ) from .update_voice_v1_audio_voices_voice_id_patchop import ( UpdateVoiceV1AudioVoicesVoiceIDPatchRequest, UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict, @@ -1995,6 +2169,12 @@ ValidationError, ValidationErrorTypedDict, ) + from .vespaschemaresponse import VespaSchemaResponse, VespaSchemaResponseTypedDict + from .vespasearchindexinforesponse import ( + VespaSearchIndexInfoResponse, + VespaSearchIndexInfoResponseTypedDict, + ) + from .voiceappearance import VoiceAppearance, VoiceAppearanceTypedDict from .voicecreaterequest import VoiceCreateRequest, VoiceCreateRequestTypedDict from .voicelistresponse import VoiceListResponse, VoiceListResponseTypedDict from .voiceresponse import VoiceResponse, VoiceResponseTypedDict @@ -2018,6 +2198,23 @@ WorkflowBasicDefinition, WorkflowBasicDefinitionTypedDict, ) + from .workflowbulkarchiverequest import ( + WorkflowBulkArchiveRequest, + WorkflowBulkArchiveRequestTypedDict, + ) + from .workflowbulkarchiveresponse import ( + WorkflowBulkArchiveResponse, + WorkflowBulkArchiveResponseTypedDict, + ) + from .workflowbulkerror import WorkflowBulkError, WorkflowBulkErrorTypedDict + from .workflowbulkunarchiverequest import ( + WorkflowBulkUnarchiveRequest, + WorkflowBulkUnarchiveRequestTypedDict, + ) + from .workflowbulkunarchiveresponse import ( + WorkflowBulkUnarchiveResponse, + WorkflowBulkUnarchiveResponseTypedDict, + ) from .workflowcodedefinition import ( WorkflowCodeDefinition, WorkflowCodeDefinitionTypedDict, @@ -2153,6 +2350,10 @@ WorkflowScheduleResponse, WorkflowScheduleResponseTypedDict, ) + from .workflowscheduleupdaterequest import ( + WorkflowScheduleUpdateRequest, + WorkflowScheduleUpdateRequestTypedDict, + ) from .workflowtaskfailedattributes import ( WorkflowTaskFailedAttributes, WorkflowTaskFailedAttributesTypedDict, @@ -2187,6 +2388,7 @@ WorkflowWithWorkerStatusTypedDict, ) # Pydantic models with forward references FilterGroup.model_rebuild() +LogicalExpression.model_rebuild() __all__ = [ @@ -2424,6 +2626,12 @@ "ClassifierTargetTypedDict", "ClassifierTrainingParameters", "ClassifierTrainingParametersTypedDict", + "ClientCapabilities", + "ClientCapabilitiesTypedDict", + "ClientTasksCapability", + "ClientTasksCapabilityTypedDict", + "ClientTasksRequestsCapability", + "ClientTasksRequestsCapabilityTypedDict", "CodeInterpreterTool", "CodeInterpreterToolTypedDict", "CompletionArgs", @@ -2457,9 +2665,18 @@ "CompletionTrainingParametersTypedDict", "ConfidenceScoresGranularity", "Confirmation", + "ConnectionConfigType", "ConnectionCredentials", "ConnectionCredentialsTypedDict", + "ConnectionPreference", + "ConnectionPreferenceTypedDict", "Connector", + "ConnectorActivateForOrganizationV1Request", + "ConnectorActivateForOrganizationV1RequestTypedDict", + "ConnectorActivateForUserV1Request", + "ConnectorActivateForUserV1RequestTypedDict", + "ConnectorActivateForWorkspaceV1Request", + "ConnectorActivateForWorkspaceV1RequestTypedDict", "ConnectorAuthenticationHeader", "ConnectorAuthenticationHeaderTypedDict", "ConnectorCallToolRequest", @@ -2472,6 +2689,12 @@ "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict", "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request", "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict", + "ConnectorDeactivateForOrganizationV1Request", + "ConnectorDeactivateForOrganizationV1RequestTypedDict", + "ConnectorDeactivateForUserV1Request", + "ConnectorDeactivateForUserV1RequestTypedDict", + "ConnectorDeactivateForWorkspaceV1Request", + "ConnectorDeactivateForWorkspaceV1RequestTypedDict", "ConnectorDeleteOrganizationCredentialsV1Request", "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict", "ConnectorDeleteUserCredentialsV1Request", @@ -2496,6 +2719,9 @@ "ConnectorListV1RequestTypedDict", "ConnectorListWorkspaceCredentialsV1Request", "ConnectorListWorkspaceCredentialsV1RequestTypedDict", + "ConnectorLocale", + "ConnectorLocaleTypedDict", + "ConnectorProtocol", "ConnectorTool", "ConnectorToolCallMetadata", "ConnectorToolCallMetadataTypedDict", @@ -2513,6 +2739,7 @@ "ConnectorUpdateV1RequestTypedDict", "ConnectorsQueryFilters", "ConnectorsQueryFiltersTypedDict", + "ConsumerType", "ContentChunk", "ContentChunkTypedDict", "Context", @@ -2600,6 +2827,15 @@ "CreateJudgeRequestTypedDict", "CreateLibraryRequest", "CreateLibraryRequestTypedDict", + "CreateSearchIndexInfoRequest", + "CreateSearchIndexInfoRequestIndex", + "CreateSearchIndexInfoRequestIndexTypedDict", + "CreateSearchIndexInfoRequestStatus", + "CreateSearchIndexInfoRequestTypedDict", + "CreateVespaSchemaRequest", + "CreateVespaSchemaRequestTypedDict", + "CreateVespaSearchIndexInfoRequest", + "CreateVespaSearchIndexInfoRequestTypedDict", "CredentialsCreateOrUpdate", "CredentialsCreateOrUpdateTypedDict", "CredentialsResponse", @@ -2684,6 +2920,8 @@ "DocumentUnionTypedDict", "DocumentUpload", "DocumentUploadTypedDict", + "ElicitationCapability", + "ElicitationCapabilityTypedDict", "EmbeddedResource", "EmbeddedResourceTypedDict", "EmbeddingDtype", @@ -2697,6 +2935,8 @@ "EmbeddingResponseTypedDict", "EncodedPayloadOptions", "EncodingFormat", + "EncryptedPatchValue", + "EncryptedPatchValueTypedDict", "EntityType", "Entry", "EntryTypedDict", @@ -2715,6 +2955,8 @@ "ExportDatasetResponseTypedDict", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequest", "ExportDatasetToJsonlV1ObservabilityDatasetsDatasetIDExportsToJsonlGetRequestTypedDict", + "Expression", + "ExpressionTypedDict", "FIMCompletionRequest", "FIMCompletionRequestStop", "FIMCompletionRequestStopTypedDict", @@ -2833,6 +3075,13 @@ "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict", "GetRunV1WorkflowsRunsRunIDGetRequest", "GetRunV1WorkflowsRunsRunIDGetRequestTypedDict", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict", + "GetSchedulesV1WorkflowsSchedulesGetRequest", + "GetSchedulesV1WorkflowsSchedulesGetRequestTypedDict", + "GetSchedulesV1WorkflowsSchedulesGetResponse", + "GetSchedulesV1WorkflowsSchedulesGetResponseTypedDict", + "GetSchedulesV1WorkflowsSchedulesGetStatus", "GetSignedURLResponse", "GetSignedURLResponseTypedDict", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest", @@ -2911,6 +3160,8 @@ "JSONPatchAddTypedDict", "JSONPatchAppend", "JSONPatchAppendTypedDict", + "JSONPatchAppendValue", + "JSONPatchAppendValueTypedDict", "JSONPatchPayloadResponse", "JSONPatchPayloadResponseTypedDict", "JSONPatchPayloadValueResponse", @@ -3002,6 +3253,8 @@ "LibrariesDocumentsGetV1RequestTypedDict", "LibrariesDocumentsListV1Request", "LibrariesDocumentsListV1RequestTypedDict", + "LibrariesDocumentsPatchV1Request", + "LibrariesDocumentsPatchV1RequestTypedDict", "LibrariesDocumentsReprocessV1Request", "LibrariesDocumentsReprocessV1RequestTypedDict", "LibrariesDocumentsUpdateV1Request", @@ -3012,6 +3265,8 @@ "LibrariesGetV1RequestTypedDict", "LibrariesListV1Request", "LibrariesListV1RequestTypedDict", + "LibrariesPatchV1Request", + "LibrariesPatchV1RequestTypedDict", "LibrariesShareCreateV1Request", "LibrariesShareCreateV1RequestTypedDict", "LibrariesShareDeleteV1Request", @@ -3070,14 +3325,32 @@ "Loc", "LocTypedDict", "LocationType", + "LogicalExpression", + "LogicalExpressionType", + "LogicalExpressionTypedDict", + "MCPPrompt", + "MCPPromptTypedDict", + "MCPResource", + "MCPResourceTypedDict", + "MCPServerAuthenticationRequirement", + "MCPServerAuthenticationRequirementTypedDict", + "MCPServerCard", + "MCPServerCardMeta", + "MCPServerCardMetaTypedDict", + "MCPServerCardTypedDict", "MCPServerIcon", "MCPServerIconTypedDict", + "MCPServerRemote", + "MCPServerRemoteHeader", + "MCPServerRemoteHeaderTypedDict", + "MCPServerRemoteType", + "MCPServerRemoteTypedDict", + "MCPServerRepository", + "MCPServerRepositoryTypedDict", "MCPTool", "MCPToolMeta", "MCPToolMetaTypedDict", "MCPToolTypedDict", - "MCPUIToolMeta", - "MCPUIToolMetaTypedDict", "MessageEntries", "MessageEntriesTypedDict", "MessageInputContentChunks", @@ -3186,6 +3459,8 @@ "PaginationInfoTypedDict", "PaginationResponse", "PaginationResponseTypedDict", + "PartialScheduleDefinition", + "PartialScheduleDefinitionTypedDict", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict", "Payload", @@ -3205,10 +3480,18 @@ "ProcessStatus", "ProcessingStatus", "ProcessingStatusTypedDict", + "PromptArgument", + "PromptArgumentTypedDict", "PromptTokensDetails", "PromptTokensDetailsTypedDict", + "Prompts", + "PromptsCapability", + "PromptsCapabilityTypedDict", + "PromptsTypedDict", "PublicAuthenticationMethod", "PublicAuthenticationMethodTypedDict", + "PublicConnectionConfig", + "PublicConnectionConfigTypedDict", "QueryDefinition", "QueryDefinitionTypedDict", "QueryInvocationBody", @@ -3247,6 +3530,8 @@ "ReferenceID", "ReferenceIDTypedDict", "RequestSource", + "RequiresConfirmation", + "RequiresConfirmationTypedDict", "ResetInvocationBody", "ResetInvocationBodyTypedDict", "ResetWorkflowV1WorkflowsExecutionsExecutionIDResetPostRequest", @@ -3254,8 +3539,13 @@ "Resource", "ResourceLink", "ResourceLinkTypedDict", + "ResourceType", "ResourceTypedDict", "ResourceVisibility", + "Resources", + "ResourcesCapability", + "ResourcesCapabilityTypedDict", + "ResourcesTypedDict", "Response", "ResponseConnectorListToolsV1", "ResponseConnectorListToolsV1TypedDict", @@ -3283,8 +3573,12 @@ "RetrieveModelV1ModelsModelIDGetRequestTypedDict", "Role", "Roles", + "RootsCapability", + "RootsCapabilityTypedDict", "SSETypes", "SampleType", + "SamplingCapability", + "SamplingCapabilityTypedDict", "ScalarMetric", "ScalarMetricTypedDict", "ScalarMetricValue", @@ -3315,8 +3609,21 @@ "SearchChatCompletionEventsRequestTypedDict", "SearchChatCompletionEventsResponse", "SearchChatCompletionEventsResponseTypedDict", + "SearchIndexResponse", + "SearchIndexResponseIndex", + "SearchIndexResponseIndexTypedDict", + "SearchIndexResponseStatus", + "SearchIndexResponseTypedDict", "Security", "SecurityTypedDict", + "ServerCapabilities", + "ServerCapabilitiesTypedDict", + "ServerLocale", + "ServerLocaleTypedDict", + "ServerTasksCapability", + "ServerTasksCapabilityTypedDict", + "ServerTasksRequestsCapability", + "ServerTasksRequestsCapabilityTypedDict", "ShareEnum", "Sharing", "SharingDelete", @@ -3336,6 +3643,8 @@ "SignalWorkflowExecutionV1WorkflowsExecutionsExecutionIDSignalsPostRequestTypedDict", "SignalWorkflowResponse", "SignalWorkflowResponseTypedDict", + "SkipConfirmation", + "SkipConfirmationTypedDict", "Source", "SpeechOutputFormat", "SpeechRequest", @@ -3372,6 +3681,12 @@ "SystemMessageTypedDict", "TableFormat", "TaskSupport", + "TasksElicitationCapability", + "TasksElicitationCapabilityTypedDict", + "TasksSamplingCapability", + "TasksSamplingCapabilityTypedDict", + "TasksToolsCapability", + "TasksToolsCapabilityTypedDict", "TempoGetTraceResponse", "TempoGetTraceResponseTypedDict", "TempoTraceAttribute", @@ -3435,6 +3750,8 @@ "ToolConfiguration", "ToolConfigurationTypedDict", "ToolExecution", + "ToolExecutionConfiguration", + "ToolExecutionConfigurationTypedDict", "ToolExecutionDeltaEvent", "ToolExecutionDeltaEventName", "ToolExecutionDeltaEventNameTypedDict", @@ -3460,12 +3777,17 @@ "ToolMessageContent", "ToolMessageContentTypedDict", "ToolMessageTypedDict", + "ToolProperties", + "ToolPropertiesTypedDict", "ToolReferenceChunk", "ToolReferenceChunkTool", "ToolReferenceChunkToolTypedDict", "ToolReferenceChunkTypedDict", - "ToolType", "ToolTypedDict", + "Tools", + "ToolsCapability", + "ToolsCapabilityTypedDict", + "ToolsTypedDict", "TrainingFile", "TrainingFileTypedDict", "TranscriptionResponse", @@ -3485,10 +3807,8 @@ "TranscriptionStreamSegmentDeltaTypedDict", "TranscriptionStreamTextDelta", "TranscriptionStreamTextDeltaTypedDict", - "TurbineToolLocale", - "TurbineToolLocaleTypedDict", - "TurbineToolMeta", - "TurbineToolMetaTypedDict", + "TurbineMeta", + "TurbineMetaTypedDict", "UnarchiveModelResponse", "UnarchiveModelResponseTypedDict", "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest", @@ -3516,6 +3836,7 @@ "UnknownPayload", "UnknownResponse", "UnknownResponseRetrieveModelV1ModelsModelIDGet", + "UnknownSearchIndexResponseIndex", "UnknownSpeechV1AudioSpeechPostData", "UnknownTranscriptionStreamEventsData", "UnscheduleWorkflowV1WorkflowsSchedulesScheduleIDDeleteRequest", @@ -3560,6 +3881,8 @@ "UpdateRunInfoTypedDict", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict", "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest", @@ -3578,7 +3901,12 @@ "UserMessageTypedDict", "ValidationError", "ValidationErrorTypedDict", - "Visibility", + "VespaSchemaResponse", + "VespaSchemaResponseTypedDict", + "VespaSearchIndexInfoResponse", + "VespaSearchIndexInfoResponseTypedDict", + "VoiceAppearance", + "VoiceAppearanceTypedDict", "VoiceCreateRequest", "VoiceCreateRequestTypedDict", "VoiceListResponse", @@ -3600,6 +3928,16 @@ "WorkflowArchiveResponseTypedDict", "WorkflowBasicDefinition", "WorkflowBasicDefinitionTypedDict", + "WorkflowBulkArchiveRequest", + "WorkflowBulkArchiveRequestTypedDict", + "WorkflowBulkArchiveResponse", + "WorkflowBulkArchiveResponseTypedDict", + "WorkflowBulkError", + "WorkflowBulkErrorTypedDict", + "WorkflowBulkUnarchiveRequest", + "WorkflowBulkUnarchiveRequestTypedDict", + "WorkflowBulkUnarchiveResponse", + "WorkflowBulkUnarchiveResponseTypedDict", "WorkflowCodeDefinition", "WorkflowCodeDefinitionTypedDict", "WorkflowEventType", @@ -3674,6 +4012,8 @@ "WorkflowScheduleRequestTypedDict", "WorkflowScheduleResponse", "WorkflowScheduleResponseTypedDict", + "WorkflowScheduleUpdateRequest", + "WorkflowScheduleUpdateRequestTypedDict", "WorkflowTaskFailedAttributes", "WorkflowTaskFailedAttributesTypedDict", "WorkflowTaskFailedResponse", @@ -3925,6 +4265,12 @@ "ClassifierTargetResultTypedDict": ".classifiertargetresult", "ClassifierTrainingParameters": ".classifiertrainingparameters", "ClassifierTrainingParametersTypedDict": ".classifiertrainingparameters", + "ClientCapabilities": ".clientcapabilities", + "ClientCapabilitiesTypedDict": ".clientcapabilities", + "ClientTasksCapability": ".clienttaskscapability", + "ClientTasksCapabilityTypedDict": ".clienttaskscapability", + "ClientTasksRequestsCapability": ".clienttasksrequestscapability", + "ClientTasksRequestsCapabilityTypedDict": ".clienttasksrequestscapability", "CodeInterpreterTool": ".codeinterpretertool", "CodeInterpreterToolTypedDict": ".codeinterpretertool", "CompletionArgs": ".completionargs", @@ -3960,10 +4306,19 @@ "CompletionResponseStreamChoiceTypedDict": ".completionresponsestreamchoice", "CompletionTrainingParameters": ".completiontrainingparameters", "CompletionTrainingParametersTypedDict": ".completiontrainingparameters", + "ConnectionConfigType": ".connectionconfigtype", "ConnectionCredentials": ".connectioncredentials", "ConnectionCredentialsTypedDict": ".connectioncredentials", + "ConnectionPreference": ".connectionpreference", + "ConnectionPreferenceTypedDict": ".connectionpreference", "Connector": ".connector", "ConnectorTypedDict": ".connector", + "ConnectorActivateForOrganizationV1Request": ".connector_activate_for_organization_v1op", + "ConnectorActivateForOrganizationV1RequestTypedDict": ".connector_activate_for_organization_v1op", + "ConnectorActivateForUserV1Request": ".connector_activate_for_user_v1op", + "ConnectorActivateForUserV1RequestTypedDict": ".connector_activate_for_user_v1op", + "ConnectorActivateForWorkspaceV1Request": ".connector_activate_for_workspace_v1op", + "ConnectorActivateForWorkspaceV1RequestTypedDict": ".connector_activate_for_workspace_v1op", "ConnectorCallToolV1Request": ".connector_call_tool_v1op", "ConnectorCallToolV1RequestTypedDict": ".connector_call_tool_v1op", "ConnectorCreateOrUpdateOrganizationCredentialsV1Request": ".connector_create_or_update_organization_credentials_v1op", @@ -3972,6 +4327,12 @@ "ConnectorCreateOrUpdateUserCredentialsV1RequestTypedDict": ".connector_create_or_update_user_credentials_v1op", "ConnectorCreateOrUpdateWorkspaceCredentialsV1Request": ".connector_create_or_update_workspace_credentials_v1op", "ConnectorCreateOrUpdateWorkspaceCredentialsV1RequestTypedDict": ".connector_create_or_update_workspace_credentials_v1op", + "ConnectorDeactivateForOrganizationV1Request": ".connector_deactivate_for_organization_v1op", + "ConnectorDeactivateForOrganizationV1RequestTypedDict": ".connector_deactivate_for_organization_v1op", + "ConnectorDeactivateForUserV1Request": ".connector_deactivate_for_user_v1op", + "ConnectorDeactivateForUserV1RequestTypedDict": ".connector_deactivate_for_user_v1op", + "ConnectorDeactivateForWorkspaceV1Request": ".connector_deactivate_for_workspace_v1op", + "ConnectorDeactivateForWorkspaceV1RequestTypedDict": ".connector_deactivate_for_workspace_v1op", "ConnectorDeleteOrganizationCredentialsV1Request": ".connector_delete_organization_credentials_v1op", "ConnectorDeleteOrganizationCredentialsV1RequestTypedDict": ".connector_delete_organization_credentials_v1op", "ConnectorDeleteUserCredentialsV1Request": ".connector_delete_user_credentials_v1op", @@ -4004,6 +4365,9 @@ "ConnectorAuthenticationHeaderTypedDict": ".connectorauthenticationheader", "ConnectorCallToolRequest": ".connectorcalltoolrequest", "ConnectorCallToolRequestTypedDict": ".connectorcalltoolrequest", + "ConnectorLocale": ".connectorlocale", + "ConnectorLocaleTypedDict": ".connectorlocale", + "ConnectorProtocol": ".connectorprotocol", "ConnectorsQueryFilters": ".connectorsqueryfilters", "ConnectorsQueryFiltersTypedDict": ".connectorsqueryfilters", "ConnectorTool": ".connectortool", @@ -4019,6 +4383,7 @@ "ConnectorToolLocaleTypedDict": ".connectortoollocale", "ConnectorToolResultMetadata": ".connectortoolresultmetadata", "ConnectorToolResultMetadataTypedDict": ".connectortoolresultmetadata", + "ConsumerType": ".consumertype", "ContentChunk": ".contentchunk", "ContentChunkTypedDict": ".contentchunk", "UnknownContentChunk": ".contentchunk", @@ -4111,6 +4476,15 @@ "CreateLibraryRequest": ".createlibraryrequest", "CreateLibraryRequestTypedDict": ".createlibraryrequest", "OwnerType": ".createlibraryrequest", + "CreateSearchIndexInfoRequest": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestIndex": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestIndexTypedDict": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestStatus": ".createsearchindexinforequest", + "CreateSearchIndexInfoRequestTypedDict": ".createsearchindexinforequest", + "CreateVespaSchemaRequest": ".createvespaschemarequest", + "CreateVespaSchemaRequestTypedDict": ".createvespaschemarequest", + "CreateVespaSearchIndexInfoRequest": ".createvespasearchindexinforequest", + "CreateVespaSearchIndexInfoRequestTypedDict": ".createvespasearchindexinforequest", "CredentialsCreateOrUpdate": ".credentialscreateorupdate", "CredentialsCreateOrUpdateTypedDict": ".credentialscreateorupdate", "CredentialsResponse": ".credentialsresponse", @@ -4197,6 +4571,8 @@ "DocumentTextContentTypedDict": ".documenttextcontent", "DocumentURLChunk": ".documenturlchunk", "DocumentURLChunkTypedDict": ".documenturlchunk", + "ElicitationCapability": ".elicitationcapability", + "ElicitationCapabilityTypedDict": ".elicitationcapability", "EmbeddedResource": ".embeddedresource", "EmbeddedResourceTypedDict": ".embeddedresource", "Resource": ".embeddedresource", @@ -4212,6 +4588,8 @@ "EmbeddingResponseDataTypedDict": ".embeddingresponsedata", "EncodedPayloadOptions": ".encodedpayloadoptions", "EncodingFormat": ".encodingformat", + "EncryptedPatchValue": ".encryptedpatchvalue", + "EncryptedPatchValueTypedDict": ".encryptedpatchvalue", "EntityType": ".entitytype", "Event": ".event", "EventTypedDict": ".event", @@ -4353,6 +4731,13 @@ "GetRunHistoryV1WorkflowsRunsRunIDHistoryGetRequestTypedDict": ".get_run_history_v1_workflows_runs_run_id_history_getop", "GetRunV1WorkflowsRunsRunIDGetRequest": ".get_run_v1_workflows_runs_run_id_getop", "GetRunV1WorkflowsRunsRunIDGetRequestTypedDict": ".get_run_v1_workflows_runs_run_id_getop", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest": ".get_schedule_v1_workflows_schedules_schedule_id_getop", + "GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict": ".get_schedule_v1_workflows_schedules_schedule_id_getop", + "GetSchedulesV1WorkflowsSchedulesGetRequest": ".get_schedules_v1_workflows_schedules_getop", + "GetSchedulesV1WorkflowsSchedulesGetRequestTypedDict": ".get_schedules_v1_workflows_schedules_getop", + "GetSchedulesV1WorkflowsSchedulesGetResponse": ".get_schedules_v1_workflows_schedules_getop", + "GetSchedulesV1WorkflowsSchedulesGetResponseTypedDict": ".get_schedules_v1_workflows_schedules_getop", + "GetSchedulesV1WorkflowsSchedulesGetStatus": ".get_schedules_v1_workflows_schedules_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequest": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetSimilarChatCompletionEventsV1ObservabilityChatCompletionEventsEventIDSimilarEventsGetRequestTypedDict": ".get_similar_chat_completion_events_v1_observability_chat_completion_events_event_id_similar_events_getop", "GetStreamEventsV1WorkflowsEventsStreamGetRequest": ".get_stream_events_v1_workflows_events_stream_getop", @@ -4477,6 +4862,8 @@ "JSONPatchAddTypedDict": ".jsonpatchadd", "JSONPatchAppend": ".jsonpatchappend", "JSONPatchAppendTypedDict": ".jsonpatchappend", + "JSONPatchAppendValue": ".jsonpatchappend", + "JSONPatchAppendValueTypedDict": ".jsonpatchappend", "JSONPatchPayloadResponse": ".jsonpatchpayloadresponse", "JSONPatchPayloadResponseTypedDict": ".jsonpatchpayloadresponse", "JSONPatchPayloadValueResponse": ".jsonpatchpayloadvalueresponse", @@ -4535,6 +4922,8 @@ "LibrariesDocumentsGetV1RequestTypedDict": ".libraries_documents_get_v1op", "LibrariesDocumentsListV1Request": ".libraries_documents_list_v1op", "LibrariesDocumentsListV1RequestTypedDict": ".libraries_documents_list_v1op", + "LibrariesDocumentsPatchV1Request": ".libraries_documents_patch_v1op", + "LibrariesDocumentsPatchV1RequestTypedDict": ".libraries_documents_patch_v1op", "LibrariesDocumentsReprocessV1Request": ".libraries_documents_reprocess_v1op", "LibrariesDocumentsReprocessV1RequestTypedDict": ".libraries_documents_reprocess_v1op", "LibrariesDocumentsUpdateV1Request": ".libraries_documents_update_v1op", @@ -4547,6 +4936,8 @@ "LibrariesGetV1RequestTypedDict": ".libraries_get_v1op", "LibrariesListV1Request": ".libraries_list_v1op", "LibrariesListV1RequestTypedDict": ".libraries_list_v1op", + "LibrariesPatchV1Request": ".libraries_patch_v1op", + "LibrariesPatchV1RequestTypedDict": ".libraries_patch_v1op", "LibrariesShareCreateV1Request": ".libraries_share_create_v1op", "LibrariesShareCreateV1RequestTypedDict": ".libraries_share_create_v1op", "LibrariesShareDeleteV1Request": ".libraries_share_delete_v1op", @@ -4604,15 +4995,35 @@ "ListWorkflowEventResponseEventTypedDict": ".listworkfloweventresponse", "ListWorkflowEventResponseTypedDict": ".listworkfloweventresponse", "LocationType": ".locationtype", + "MCPPrompt": ".mcpprompt", + "MCPPromptTypedDict": ".mcpprompt", + "MCPResource": ".mcpresource", + "MCPResourceTypedDict": ".mcpresource", + "MCPServerAuthenticationRequirement": ".mcpserverauthenticationrequirement", + "MCPServerAuthenticationRequirementTypedDict": ".mcpserverauthenticationrequirement", + "MCPServerCard": ".mcpservercard", + "MCPServerCardTypedDict": ".mcpservercard", + "Prompts": ".mcpservercard", + "PromptsTypedDict": ".mcpservercard", + "Resources": ".mcpservercard", + "ResourcesTypedDict": ".mcpservercard", + "Tools": ".mcpservercard", + "ToolsTypedDict": ".mcpservercard", + "MCPServerCardMeta": ".mcpservercardmeta", + "MCPServerCardMetaTypedDict": ".mcpservercardmeta", "MCPServerIcon": ".mcpservericon", "MCPServerIconTypedDict": ".mcpservericon", + "MCPServerRemote": ".mcpserverremote", + "MCPServerRemoteType": ".mcpserverremote", + "MCPServerRemoteTypedDict": ".mcpserverremote", + "MCPServerRemoteHeader": ".mcpserverremoteheader", + "MCPServerRemoteHeaderTypedDict": ".mcpserverremoteheader", + "MCPServerRepository": ".mcpserverrepository", + "MCPServerRepositoryTypedDict": ".mcpserverrepository", "MCPTool": ".mcptool", "MCPToolTypedDict": ".mcptool", "MCPToolMeta": ".mcptoolmeta", "MCPToolMetaTypedDict": ".mcptoolmeta", - "MCPUIToolMeta": ".mcpuitoolmeta", - "MCPUIToolMetaTypedDict": ".mcpuitoolmeta", - "Visibility": ".mcpuitoolmeta", "MessageEntries": ".messageentries", "MessageEntriesTypedDict": ".messageentries", "MessageInputContentChunks": ".messageinputcontentchunks", @@ -4719,6 +5130,8 @@ "PaginationInfoTypedDict": ".paginationinfo", "PaginationResponse": ".paginationresponse", "PaginationResponseTypedDict": ".paginationresponse", + "PartialScheduleDefinition": ".partialscheduledefinition", + "PartialScheduleDefinitionTypedDict": ".partialscheduledefinition", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequest": ".pause_schedule_v1_workflows_schedules_schedule_id_pause_postop", "PauseScheduleV1WorkflowsSchedulesScheduleIDPausePostRequestTypedDict": ".pause_schedule_v1_workflows_schedules_schedule_id_pause_postop", "PostDatasetRecordsFromCampaignV1ObservabilityDatasetsDatasetIDImportsFromCampaignPostRequest": ".post_dataset_records_from_campaign_v1_observability_datasets_dataset_id_imports_from_campaign_postop", @@ -4736,10 +5149,16 @@ "ProcessingStatus": ".processingstatus", "ProcessingStatusTypedDict": ".processingstatus", "ProcessStatus": ".processstatus", + "PromptArgument": ".promptargument", + "PromptArgumentTypedDict": ".promptargument", + "PromptsCapability": ".promptscapability", + "PromptsCapabilityTypedDict": ".promptscapability", "PromptTokensDetails": ".prompttokensdetails", "PromptTokensDetailsTypedDict": ".prompttokensdetails", "PublicAuthenticationMethod": ".publicauthenticationmethod", "PublicAuthenticationMethodTypedDict": ".publicauthenticationmethod", + "PublicConnectionConfig": ".publicconnectionconfig", + "PublicConnectionConfigTypedDict": ".publicconnectionconfig", "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequest": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", "QueryWorkflowExecutionV1WorkflowsExecutionsExecutionIDQueriesPostRequestTypedDict": ".query_workflow_execution_v1_workflows_executions_execution_id_queries_postop", "QueryDefinition": ".querydefinition", @@ -4784,6 +5203,9 @@ "ResetInvocationBodyTypedDict": ".resetinvocationbody", "ResourceLink": ".resourcelink", "ResourceLinkTypedDict": ".resourcelink", + "ResourcesCapability": ".resourcescapability", + "ResourcesCapabilityTypedDict": ".resourcescapability", + "ResourceType": ".resourcetype", "ResourceVisibility": ".resourcevisibility", "ResponseDoneEvent": ".responsedoneevent", "ResponseDoneEventTypedDict": ".responsedoneevent", @@ -4802,7 +5224,11 @@ "RetrieveModelV1ModelsModelIDGetRequestTypedDict": ".retrieve_model_v1_models_model_id_getop", "UnknownResponseRetrieveModelV1ModelsModelIDGet": ".retrieve_model_v1_models_model_id_getop", "Roles": ".roles", + "RootsCapability": ".rootscapability", + "RootsCapabilityTypedDict": ".rootscapability", "SampleType": ".sampletype", + "SamplingCapability": ".samplingcapability", + "SamplingCapabilityTypedDict": ".samplingcapability", "ScalarMetric": ".scalarmetric", "ScalarMetricTypedDict": ".scalarmetric", "ScalarMetricValue": ".scalarmetric", @@ -4832,8 +5258,22 @@ "SearchChatCompletionEventsRequestTypedDict": ".searchchatcompletioneventsrequest", "SearchChatCompletionEventsResponse": ".searchchatcompletioneventsresponse", "SearchChatCompletionEventsResponseTypedDict": ".searchchatcompletioneventsresponse", + "SearchIndexResponse": ".searchindexresponse", + "SearchIndexResponseIndex": ".searchindexresponse", + "SearchIndexResponseIndexTypedDict": ".searchindexresponse", + "SearchIndexResponseStatus": ".searchindexresponse", + "SearchIndexResponseTypedDict": ".searchindexresponse", + "UnknownSearchIndexResponseIndex": ".searchindexresponse", "Security": ".security", "SecurityTypedDict": ".security", + "ServerCapabilities": ".servercapabilities", + "ServerCapabilitiesTypedDict": ".servercapabilities", + "ServerLocale": ".serverlocale", + "ServerLocaleTypedDict": ".serverlocale", + "ServerTasksCapability": ".servertaskscapability", + "ServerTasksCapabilityTypedDict": ".servertaskscapability", + "ServerTasksRequestsCapability": ".servertasksrequestscapability", + "ServerTasksRequestsCapabilityTypedDict": ".servertasksrequestscapability", "ShareEnum": ".shareenum", "Sharing": ".sharing", "SharingTypedDict": ".sharing", @@ -4888,6 +5328,12 @@ "SystemMessageTypedDict": ".systemmessage", "SystemMessageContentChunks": ".systemmessagecontentchunks", "SystemMessageContentChunksTypedDict": ".systemmessagecontentchunks", + "TasksElicitationCapability": ".taskselicitationcapability", + "TasksElicitationCapabilityTypedDict": ".taskselicitationcapability", + "TasksSamplingCapability": ".taskssamplingcapability", + "TasksSamplingCapabilityTypedDict": ".taskssamplingcapability", + "TasksToolsCapability": ".taskstoolscapability", + "TasksToolsCapabilityTypedDict": ".taskstoolscapability", "TempoGetTraceResponse": ".tempogettraceresponse", "TempoGetTraceResponseTypedDict": ".tempogettraceresponse", "TempoTraceAttribute": ".tempotraceattribute", @@ -4955,6 +5401,12 @@ "TaskSupport": ".toolexecution", "ToolExecution": ".toolexecution", "ToolExecutionTypedDict": ".toolexecution", + "RequiresConfirmation": ".toolexecutionconfiguration", + "RequiresConfirmationTypedDict": ".toolexecutionconfiguration", + "SkipConfirmation": ".toolexecutionconfiguration", + "SkipConfirmationTypedDict": ".toolexecutionconfiguration", + "ToolExecutionConfiguration": ".toolexecutionconfiguration", + "ToolExecutionConfigurationTypedDict": ".toolexecutionconfiguration", "ToolExecutionDeltaEvent": ".toolexecutiondeltaevent", "ToolExecutionDeltaEventName": ".toolexecutiondeltaevent", "ToolExecutionDeltaEventNameTypedDict": ".toolexecutiondeltaevent", @@ -4979,11 +5431,14 @@ "ToolMessageContent": ".toolmessage", "ToolMessageContentTypedDict": ".toolmessage", "ToolMessageTypedDict": ".toolmessage", + "ToolProperties": ".toolproperties", + "ToolPropertiesTypedDict": ".toolproperties", "ToolReferenceChunk": ".toolreferencechunk", "ToolReferenceChunkTool": ".toolreferencechunk", "ToolReferenceChunkToolTypedDict": ".toolreferencechunk", "ToolReferenceChunkTypedDict": ".toolreferencechunk", - "ToolType": ".tooltype", + "ToolsCapability": ".toolscapability", + "ToolsCapabilityTypedDict": ".toolscapability", "TrainingFile": ".trainingfile", "TrainingFileTypedDict": ".trainingfile", "TranscriptionResponse": ".transcriptionresponse", @@ -5004,10 +5459,8 @@ "TranscriptionStreamSegmentDeltaTypedDict": ".transcriptionstreamsegmentdelta", "TranscriptionStreamTextDelta": ".transcriptionstreamtextdelta", "TranscriptionStreamTextDeltaTypedDict": ".transcriptionstreamtextdelta", - "TurbineToolLocale": ".turbinetoollocale", - "TurbineToolLocaleTypedDict": ".turbinetoollocale", - "TurbineToolMeta": ".turbinetoolmeta", - "TurbineToolMetaTypedDict": ".turbinetoolmeta", + "TurbineMeta": ".turbinemeta", + "TurbineMetaTypedDict": ".turbinemeta", "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequest": ".unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop", "UnarchiveWorkflowV1WorkflowsWorkflowIdentifierUnarchivePutRequestTypedDict": ".unarchive_workflow_v1_workflows_workflow_identifier_unarchive_putop", "UnarchiveModelResponse": ".unarchivemodelresponse", @@ -5024,6 +5477,8 @@ "UpdateJudgeV1ObservabilityJudgesJudgeIDPutRequestTypedDict": ".update_judge_v1_observability_judges_judge_id_putop", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequest": ".update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop", "UpdateRunInfoV1RagIngestionPipelineConfigurationsIDRunInfoPutRequestTypedDict": ".update_run_info_v1_rag_ingestion_pipeline_configurations_id_run_info_putop", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest": ".update_schedule_v1_workflows_schedules_schedule_id_patchop", + "UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict": ".update_schedule_v1_workflows_schedules_schedule_id_patchop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequest": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateVoiceV1AudioVoicesVoiceIDPatchRequestTypedDict": ".update_voice_v1_audio_voices_voice_id_patchop", "UpdateWorkflowExecutionV1WorkflowsExecutionsExecutionIDUpdatesPostRequest": ".update_workflow_execution_v1_workflows_executions_execution_id_updates_postop", @@ -5078,6 +5533,12 @@ "LocTypedDict": ".validationerror", "ValidationError": ".validationerror", "ValidationErrorTypedDict": ".validationerror", + "VespaSchemaResponse": ".vespaschemaresponse", + "VespaSchemaResponseTypedDict": ".vespaschemaresponse", + "VespaSearchIndexInfoResponse": ".vespasearchindexinforesponse", + "VespaSearchIndexInfoResponseTypedDict": ".vespasearchindexinforesponse", + "VoiceAppearance": ".voiceappearance", + "VoiceAppearanceTypedDict": ".voiceappearance", "VoiceCreateRequest": ".voicecreaterequest", "VoiceCreateRequestTypedDict": ".voicecreaterequest", "VoiceListResponse": ".voicelistresponse", @@ -5100,6 +5561,16 @@ "WorkflowArchiveResponseTypedDict": ".workflowarchiveresponse", "WorkflowBasicDefinition": ".workflowbasicdefinition", "WorkflowBasicDefinitionTypedDict": ".workflowbasicdefinition", + "WorkflowBulkArchiveRequest": ".workflowbulkarchiverequest", + "WorkflowBulkArchiveRequestTypedDict": ".workflowbulkarchiverequest", + "WorkflowBulkArchiveResponse": ".workflowbulkarchiveresponse", + "WorkflowBulkArchiveResponseTypedDict": ".workflowbulkarchiveresponse", + "WorkflowBulkError": ".workflowbulkerror", + "WorkflowBulkErrorTypedDict": ".workflowbulkerror", + "WorkflowBulkUnarchiveRequest": ".workflowbulkunarchiverequest", + "WorkflowBulkUnarchiveRequestTypedDict": ".workflowbulkunarchiverequest", + "WorkflowBulkUnarchiveResponse": ".workflowbulkunarchiveresponse", + "WorkflowBulkUnarchiveResponseTypedDict": ".workflowbulkunarchiveresponse", "WorkflowCodeDefinition": ".workflowcodedefinition", "WorkflowCodeDefinitionTypedDict": ".workflowcodedefinition", "WorkflowEventType": ".workfloweventtype", @@ -5174,6 +5645,8 @@ "WorkflowScheduleRequestTypedDict": ".workflowschedulerequest", "WorkflowScheduleResponse": ".workflowscheduleresponse", "WorkflowScheduleResponseTypedDict": ".workflowscheduleresponse", + "WorkflowScheduleUpdateRequest": ".workflowscheduleupdaterequest", + "WorkflowScheduleUpdateRequestTypedDict": ".workflowscheduleupdaterequest", "WorkflowTaskFailedAttributes": ".workflowtaskfailedattributes", "WorkflowTaskFailedAttributesTypedDict": ".workflowtaskfailedattributes", "WorkflowTaskFailedResponse": ".workflowtaskfailedresponse", diff --git a/src/mistralai/client/models/authenticationconfiguration.py b/src/mistralai/client/models/authenticationconfiguration.py index 84f66591..79c69641 100644 --- a/src/mistralai/client/models/authenticationconfiguration.py +++ b/src/mistralai/client/models/authenticationconfiguration.py @@ -2,6 +2,7 @@ # @generated-id: 97b5056c29fb from __future__ import annotations +from .consumertype import ConsumerType from .outboundauthenticationtype import OutboundAuthenticationType from mistralai.client.types import BaseModel, UNSET_SENTINEL from pydantic import model_serializer @@ -12,6 +13,7 @@ class AuthenticationConfigurationTypedDict(TypedDict): name: str authentication_type: OutboundAuthenticationType + scope: ConsumerType is_default: NotRequired[bool] @@ -20,6 +22,8 @@ class AuthenticationConfiguration(BaseModel): authentication_type: OutboundAuthenticationType + scope: ConsumerType + is_default: Optional[bool] = False @model_serializer(mode="wrap") diff --git a/src/mistralai/client/models/clientcapabilities.py b/src/mistralai/client/models/clientcapabilities.py new file mode 100644 index 00000000..77271160 --- /dev/null +++ b/src/mistralai/client/models/clientcapabilities.py @@ -0,0 +1,88 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b2ad660c5c9b + +from __future__ import annotations +from .clienttaskscapability import ClientTasksCapability, ClientTasksCapabilityTypedDict +from .elicitationcapability import ElicitationCapability, ElicitationCapabilityTypedDict +from .rootscapability import RootsCapability, RootsCapabilityTypedDict +from .samplingcapability import SamplingCapability, SamplingCapabilityTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ClientCapabilitiesTypedDict(TypedDict): + r"""Capabilities a client may support.""" + + experimental: NotRequired[Nullable[Dict[str, Dict[str, Any]]]] + sampling: NotRequired[Nullable[SamplingCapabilityTypedDict]] + elicitation: NotRequired[Nullable[ElicitationCapabilityTypedDict]] + roots: NotRequired[Nullable[RootsCapabilityTypedDict]] + tasks: NotRequired[Nullable[ClientTasksCapabilityTypedDict]] + + +class ClientCapabilities(BaseModel): + r"""Capabilities a client may support.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + experimental: OptionalNullable[Dict[str, Dict[str, Any]]] = UNSET + + sampling: OptionalNullable[SamplingCapability] = UNSET + + elicitation: OptionalNullable[ElicitationCapability] = UNSET + + roots: OptionalNullable[RootsCapability] = UNSET + + tasks: OptionalNullable[ClientTasksCapability] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["experimental", "sampling", "elicitation", "roots", "tasks"] + ) + nullable_fields = set( + ["experimental", "sampling", "elicitation", "roots", "tasks"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/clienttaskscapability.py b/src/mistralai/client/models/clienttaskscapability.py new file mode 100644 index 00000000..5256c3d5 --- /dev/null +++ b/src/mistralai/client/models/clienttaskscapability.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 83aeca444b21 + +from __future__ import annotations +from .clienttasksrequestscapability import ( + ClientTasksRequestsCapability, + ClientTasksRequestsCapabilityTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ClientTasksCapabilityTypedDict(TypedDict): + r"""Capability for client tasks operations.""" + + list: NotRequired[Nullable[Dict[str, Any]]] + cancel: NotRequired[Nullable[Dict[str, Any]]] + requests: NotRequired[Nullable[ClientTasksRequestsCapabilityTypedDict]] + + +class ClientTasksCapability(BaseModel): + r"""Capability for client tasks operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + list: OptionalNullable[Dict[str, Any]] = UNSET + + cancel: OptionalNullable[Dict[str, Any]] = UNSET + + requests: OptionalNullable[ClientTasksRequestsCapability] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["list", "cancel", "requests"]) + nullable_fields = set(["list", "cancel", "requests"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/clienttasksrequestscapability.py b/src/mistralai/client/models/clienttasksrequestscapability.py new file mode 100644 index 00000000..38b9d6b1 --- /dev/null +++ b/src/mistralai/client/models/clienttasksrequestscapability.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 26148da505a0 + +from __future__ import annotations +from .taskselicitationcapability import ( + TasksElicitationCapability, + TasksElicitationCapabilityTypedDict, +) +from .taskssamplingcapability import ( + TasksSamplingCapability, + TasksSamplingCapabilityTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ClientTasksRequestsCapabilityTypedDict(TypedDict): + r"""Capability for tasks requests operations.""" + + sampling: NotRequired[Nullable[TasksSamplingCapabilityTypedDict]] + elicitation: NotRequired[Nullable[TasksElicitationCapabilityTypedDict]] + + +class ClientTasksRequestsCapability(BaseModel): + r"""Capability for tasks requests operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + sampling: OptionalNullable[TasksSamplingCapability] = UNSET + + elicitation: OptionalNullable[TasksElicitationCapability] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["sampling", "elicitation"]) + nullable_fields = set(["sampling", "elicitation"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/connectionconfigtype.py b/src/mistralai/client/models/connectionconfigtype.py new file mode 100644 index 00000000..9ad1bee1 --- /dev/null +++ b/src/mistralai/client/models/connectionconfigtype.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 52923bfd57d3 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ConnectionConfigType = Union[ + Literal[ + "mcp", + "turbine", + "eolienne", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/turbinetoolmeta.py b/src/mistralai/client/models/connectionpreference.py similarity index 56% rename from src/mistralai/client/models/turbinetoolmeta.py rename to src/mistralai/client/models/connectionpreference.py index bcd4d5f2..953ef17c 100644 --- a/src/mistralai/client/models/turbinetoolmeta.py +++ b/src/mistralai/client/models/connectionpreference.py @@ -1,9 +1,12 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: cdb07c3837f7 +# @generated-id: 6b9389ac91e6 from __future__ import annotations -from .tooltype import ToolType -from .turbinetoollocale import TurbineToolLocale, TurbineToolLocaleTypedDict +from .consumertype import ConsumerType +from .toolexecutionconfiguration import ( + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, +) from mistralai.client.types import ( BaseModel, Nullable, @@ -15,26 +18,26 @@ from typing_extensions import NotRequired, TypedDict -class TurbineToolMetaTypedDict(TypedDict): - locale: NotRequired[Nullable[TurbineToolLocaleTypedDict]] - tool_type: NotRequired[Nullable[ToolType]] - timeout: NotRequired[Nullable[float]] - private_execution: NotRequired[Nullable[bool]] +class ConnectionPreferenceTypedDict(TypedDict): + name: str + tool_configuration: ToolExecutionConfigurationTypedDict + is_default: NotRequired[Nullable[bool]] + consumer_type: NotRequired[Nullable[ConsumerType]] -class TurbineToolMeta(BaseModel): - locale: OptionalNullable[TurbineToolLocale] = UNSET +class ConnectionPreference(BaseModel): + name: str - tool_type: OptionalNullable[ToolType] = UNSET + tool_configuration: ToolExecutionConfiguration - timeout: OptionalNullable[float] = UNSET + is_default: OptionalNullable[bool] = UNSET - private_execution: OptionalNullable[bool] = UNSET + consumer_type: OptionalNullable[ConsumerType] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["locale", "tool_type", "timeout", "private_execution"]) - nullable_fields = set(["locale", "tool_type", "timeout", "private_execution"]) + optional_fields = set(["is_default", "consumer_type"]) + nullable_fields = set(["is_default", "consumer_type"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector.py b/src/mistralai/client/models/connector.py index 9d8b6000..ce9e0837 100644 --- a/src/mistralai/client/models/connector.py +++ b/src/mistralai/client/models/connector.py @@ -2,6 +2,25 @@ # @generated-id: 1a4facac922d from __future__ import annotations +from .authenticationconfiguration import ( + AuthenticationConfiguration, + AuthenticationConfigurationTypedDict, +) +from .connectionpreference import ConnectionPreference, ConnectionPreferenceTypedDict +from .connectorlocale import ConnectorLocale, ConnectorLocaleTypedDict +from .connectorprotocol import ConnectorProtocol +from .connectortool import ConnectorTool, ConnectorToolTypedDict +from .mcpservercard import MCPServerCard, MCPServerCardTypedDict +from .publicauthenticationmethod import ( + PublicAuthenticationMethod, + PublicAuthenticationMethodTypedDict, +) +from .publicconnectionconfig import ( + PublicConnectionConfig, + PublicConnectionConfigTypedDict, +) +from .resourcetype import ResourceType +from .resourcevisibility import ResourceVisibility from datetime import datetime from mistralai.client.types import ( BaseModel, @@ -11,6 +30,7 @@ UNSET_SENTINEL, ) from pydantic import model_serializer +from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -20,9 +40,30 @@ class ConnectorTypedDict(TypedDict): description: str created_at: datetime modified_at: datetime + owner_type: ResourceType + visibility: ResourceVisibility + private_tool_execution: bool title: NotRequired[Nullable[str]] server: NotRequired[Nullable[str]] - auth_type: NotRequired[Nullable[str]] + protocol: NotRequired[ConnectorProtocol] + icon_url: NotRequired[Nullable[str]] + server_card: NotRequired[Nullable[MCPServerCardTypedDict]] + owner_id: NotRequired[Nullable[str]] + locale: NotRequired[Nullable[ConnectorLocaleTypedDict]] + system_prompt: NotRequired[Nullable[str]] + supported_auth_methods: NotRequired[ + Nullable[List[PublicAuthenticationMethodTypedDict]] + ] + connection_preferences: NotRequired[Nullable[List[ConnectionPreferenceTypedDict]]] + connection_credentials: NotRequired[ + Nullable[List[AuthenticationConfigurationTypedDict]] + ] + active: NotRequired[Nullable[bool]] + mistral: NotRequired[bool] + is_authenticated: NotRequired[Nullable[bool]] + tools: NotRequired[Nullable[List[ConnectorToolTypedDict]]] + system_prompt_route: NotRequired[Nullable[str]] + connection_config: NotRequired[Nullable[PublicConnectionConfigTypedDict]] class Connector(BaseModel): @@ -36,16 +77,88 @@ class Connector(BaseModel): modified_at: datetime + owner_type: ResourceType + + visibility: ResourceVisibility + + private_tool_execution: bool + title: OptionalNullable[str] = UNSET server: OptionalNullable[str] = UNSET - auth_type: OptionalNullable[str] = UNSET + protocol: Optional[ConnectorProtocol] = None + + icon_url: OptionalNullable[str] = UNSET + + server_card: OptionalNullable[MCPServerCard] = UNSET + + owner_id: OptionalNullable[str] = UNSET + + locale: OptionalNullable[ConnectorLocale] = UNSET + + system_prompt: OptionalNullable[str] = UNSET + + supported_auth_methods: OptionalNullable[List[PublicAuthenticationMethod]] = UNSET + + connection_preferences: OptionalNullable[List[ConnectionPreference]] = UNSET + + connection_credentials: OptionalNullable[List[AuthenticationConfiguration]] = UNSET + + active: OptionalNullable[bool] = UNSET + + mistral: Optional[bool] = False + + is_authenticated: OptionalNullable[bool] = UNSET + + tools: OptionalNullable[List[ConnectorTool]] = UNSET + + system_prompt_route: OptionalNullable[str] = UNSET + + connection_config: OptionalNullable[PublicConnectionConfig] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["title", "server", "auth_type"]) - nullable_fields = set(["title", "server", "auth_type"]) + optional_fields = set( + [ + "title", + "server", + "protocol", + "icon_url", + "server_card", + "owner_id", + "locale", + "system_prompt", + "supported_auth_methods", + "connection_preferences", + "connection_credentials", + "active", + "mistral", + "is_authenticated", + "tools", + "system_prompt_route", + "connection_config", + ] + ) + nullable_fields = set( + [ + "title", + "server", + "icon_url", + "server_card", + "owner_id", + "locale", + "system_prompt", + "supported_auth_methods", + "connection_preferences", + "connection_credentials", + "active", + "is_authenticated", + "tools", + "system_prompt_route", + "connection_config", + ] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connector_activate_for_organization_v1op.py b/src/mistralai/client/models/connector_activate_for_organization_v1op.py new file mode 100644 index 00000000..1b0ec3b0 --- /dev/null +++ b/src/mistralai/client/models/connector_activate_for_organization_v1op.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9b35397dd5cc + +from __future__ import annotations +from .toolexecutionconfiguration import ( + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorActivateForOrganizationV1RequestTypedDict(TypedDict): + connector_id: str + tool_execution_configuration: NotRequired[ + Nullable[ToolExecutionConfigurationTypedDict] + ] + + +class ConnectorActivateForOrganizationV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + tool_execution_configuration: Annotated[ + OptionalNullable[ToolExecutionConfiguration], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ToolExecutionConfiguration"]) + nullable_fields = set(["ToolExecutionConfiguration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_activate_for_user_v1op.py b/src/mistralai/client/models/connector_activate_for_user_v1op.py new file mode 100644 index 00000000..e30126d4 --- /dev/null +++ b/src/mistralai/client/models/connector_activate_for_user_v1op.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6bf45c78cfea + +from __future__ import annotations +from .toolexecutionconfiguration import ( + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorActivateForUserV1RequestTypedDict(TypedDict): + connector_id: str + tool_execution_configuration: NotRequired[ + Nullable[ToolExecutionConfigurationTypedDict] + ] + + +class ConnectorActivateForUserV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + tool_execution_configuration: Annotated[ + OptionalNullable[ToolExecutionConfiguration], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ToolExecutionConfiguration"]) + nullable_fields = set(["ToolExecutionConfiguration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_activate_for_workspace_v1op.py b/src/mistralai/client/models/connector_activate_for_workspace_v1op.py new file mode 100644 index 00000000..00fe6699 --- /dev/null +++ b/src/mistralai/client/models/connector_activate_for_workspace_v1op.py @@ -0,0 +1,61 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b6392712ddaf + +from __future__ import annotations +from .toolexecutionconfiguration import ( + ToolExecutionConfiguration, + ToolExecutionConfigurationTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from pydantic import model_serializer +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ConnectorActivateForWorkspaceV1RequestTypedDict(TypedDict): + connector_id: str + tool_execution_configuration: NotRequired[ + Nullable[ToolExecutionConfigurationTypedDict] + ] + + +class ConnectorActivateForWorkspaceV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + tool_execution_configuration: Annotated[ + OptionalNullable[ToolExecutionConfiguration], + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["ToolExecutionConfiguration"]) + nullable_fields = set(["ToolExecutionConfiguration"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/connector_deactivate_for_organization_v1op.py b/src/mistralai/client/models/connector_deactivate_for_organization_v1op.py new file mode 100644 index 00000000..4c5c5458 --- /dev/null +++ b/src/mistralai/client/models/connector_deactivate_for_organization_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 850bece829b0 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeactivateForOrganizationV1RequestTypedDict(TypedDict): + connector_id: str + + +class ConnectorDeactivateForOrganizationV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_deactivate_for_user_v1op.py b/src/mistralai/client/models/connector_deactivate_for_user_v1op.py new file mode 100644 index 00000000..5d998877 --- /dev/null +++ b/src/mistralai/client/models/connector_deactivate_for_user_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1df4227a54f7 + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeactivateForUserV1RequestTypedDict(TypedDict): + connector_id: str + + +class ConnectorDeactivateForUserV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py b/src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py new file mode 100644 index 00000000..9f02d887 --- /dev/null +++ b/src/mistralai/client/models/connector_deactivate_for_workspace_v1op.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d82c1a5321cc + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class ConnectorDeactivateForWorkspaceV1RequestTypedDict(TypedDict): + connector_id: str + + +class ConnectorDeactivateForWorkspaceV1Request(BaseModel): + connector_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/connector_get_v1op.py b/src/mistralai/client/models/connector_get_v1op.py index 780afac9..beb27872 100644 --- a/src/mistralai/client/models/connector_get_v1op.py +++ b/src/mistralai/client/models/connector_get_v1op.py @@ -11,10 +11,10 @@ class ConnectorGetV1RequestTypedDict(TypedDict): connector_id_or_name: str + fetch_user_data: NotRequired[bool] + r"""Fetch the user-level data associated with the connector (e.g. connection credentials).""" fetch_customer_data: NotRequired[bool] r"""Fetch the customer data associated with the connector (e.g. customer secrets / config).""" - fetch_connection_secrets: NotRequired[bool] - r"""Fetch the general connection secrets associated with the connector.""" class ConnectorGetV1Request(BaseModel): @@ -22,21 +22,21 @@ class ConnectorGetV1Request(BaseModel): str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) ] - fetch_customer_data: Annotated[ + fetch_user_data: Annotated[ Optional[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = False - r"""Fetch the customer data associated with the connector (e.g. customer secrets / config).""" + r"""Fetch the user-level data associated with the connector (e.g. connection credentials).""" - fetch_connection_secrets: Annotated[ + fetch_customer_data: Annotated[ Optional[bool], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = False - r"""Fetch the general connection secrets associated with the connector.""" + r"""Fetch the customer data associated with the connector (e.g. customer secrets / config).""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["fetch_customer_data", "fetch_connection_secrets"]) + optional_fields = set(["fetch_user_data", "fetch_customer_data"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/connectorlocale.py b/src/mistralai/client/models/connectorlocale.py new file mode 100644 index 00000000..373e9e84 --- /dev/null +++ b/src/mistralai/client/models/connectorlocale.py @@ -0,0 +1,21 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f987f5207d2e + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import Dict +from typing_extensions import TypedDict + + +class ConnectorLocaleTypedDict(TypedDict): + name: Dict[str, str] + description: Dict[str, str] + usage_sentence: Dict[str, str] + + +class ConnectorLocale(BaseModel): + name: Dict[str, str] + + description: Dict[str, str] + + usage_sentence: Dict[str, str] diff --git a/src/mistralai/client/models/tooltype.py b/src/mistralai/client/models/connectorprotocol.py similarity index 67% rename from src/mistralai/client/models/tooltype.py rename to src/mistralai/client/models/connectorprotocol.py index 1a7781fc..042f2352 100644 --- a/src/mistralai/client/models/tooltype.py +++ b/src/mistralai/client/models/connectorprotocol.py @@ -1,17 +1,16 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: cbe8c44aee50 +# @generated-id: c35853b1b79f from __future__ import annotations from mistralai.client.types import UnrecognizedStr from typing import Literal, Union -ToolType = Union[ +ConnectorProtocol = Union[ Literal[ - "rag", - "image", - "code", - "event", + "mcp", + "http", + "turbine", ], UnrecognizedStr, ] diff --git a/src/mistralai/client/models/connectorsqueryfilters.py b/src/mistralai/client/models/connectorsqueryfilters.py index f10d6897..860caf43 100644 --- a/src/mistralai/client/models/connectorsqueryfilters.py +++ b/src/mistralai/client/models/connectorsqueryfilters.py @@ -11,29 +11,21 @@ ) from mistralai.client.utils import FieldMetadata from pydantic import model_serializer -from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict class ConnectorsQueryFiltersTypedDict(TypedDict): active: NotRequired[Nullable[bool]] r"""Filter for active connectors for a given user, workspace and organization.""" - fetch_connection_secrets: NotRequired[bool] - r"""Fetch connection secrets.""" class ConnectorsQueryFilters(BaseModel): active: Annotated[OptionalNullable[bool], FieldMetadata(query=True)] = UNSET r"""Filter for active connectors for a given user, workspace and organization.""" - fetch_connection_secrets: Annotated[Optional[bool], FieldMetadata(query=True)] = ( - False - ) - r"""Fetch connection secrets.""" - @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["active", "fetch_connection_secrets"]) + optional_fields = set(["active"]) nullable_fields = set(["active"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/consumertype.py b/src/mistralai/client/models/consumertype.py new file mode 100644 index 00000000..ac091e5e --- /dev/null +++ b/src/mistralai/client/models/consumertype.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d18230da2fdd + +from __future__ import annotations +from mistralai.client.types import UnrecognizedStr +from typing import Literal, Union + + +ConsumerType = Union[ + Literal[ + "user", + "org", + "workspace", + "system", + ], + UnrecognizedStr, +] diff --git a/src/mistralai/client/models/createconnectorrequest.py b/src/mistralai/client/models/createconnectorrequest.py index 18060ca3..ac732104 100644 --- a/src/mistralai/client/models/createconnectorrequest.py +++ b/src/mistralai/client/models/createconnectorrequest.py @@ -11,9 +11,12 @@ UNSET, UNSET_SENTINEL, ) +from mistralai.client.utils import validate_const +import pydantic from pydantic import model_serializer -from typing import Any, Dict, Optional -from typing_extensions import NotRequired, TypedDict +from pydantic.functional_validators import AfterValidator +from typing import Any, Dict, Literal, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateConnectorRequestTypedDict(TypedDict): @@ -23,6 +26,7 @@ class CreateConnectorRequestTypedDict(TypedDict): r"""The description of the connector.""" server: str r"""The url of the MCP server.""" + protocol: Literal["mcp"] title: NotRequired[Nullable[str]] r"""Optional human-readable title for the connector.""" icon_url: NotRequired[Nullable[str]] @@ -46,6 +50,11 @@ class CreateConnectorRequest(BaseModel): server: str r"""The url of the MCP server.""" + protocol: Annotated[ + Annotated[Optional[Literal["mcp"]], AfterValidator(validate_const("mcp"))], + pydantic.Field(alias="protocol"), + ] = "mcp" + title: OptionalNullable[str] = UNSET r"""Optional human-readable title for the connector.""" @@ -66,7 +75,15 @@ class CreateConnectorRequest(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["title", "icon_url", "visibility", "headers", "auth_data", "system_prompt"] + [ + "protocol", + "title", + "icon_url", + "visibility", + "headers", + "auth_data", + "system_prompt", + ] ) nullable_fields = set( ["title", "icon_url", "headers", "auth_data", "system_prompt"] @@ -91,3 +108,9 @@ def serialize_model(self, handler): m[k] = val return m + + +try: + CreateConnectorRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/createlibraryrequest.py b/src/mistralai/client/models/createlibraryrequest.py index e0357e92..2bbb1e18 100644 --- a/src/mistralai/client/models/createlibraryrequest.py +++ b/src/mistralai/client/models/createlibraryrequest.py @@ -9,9 +9,10 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Literal -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict OwnerType = Literal[ @@ -34,7 +35,12 @@ class CreateLibraryRequest(BaseModel): description: OptionalNullable[str] = UNSET - chunk_size: OptionalNullable[int] = UNSET + chunk_size: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""The size of the chunks (in characters) to split document text into. Must be between 256 and 32768.""" owner_type: OptionalNullable[OwnerType] = UNSET diff --git a/src/mistralai/client/models/createsearchindexinforequest.py b/src/mistralai/client/models/createsearchindexinforequest.py new file mode 100644 index 00000000..f527f72d --- /dev/null +++ b/src/mistralai/client/models/createsearchindexinforequest.py @@ -0,0 +1,72 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3f424a7063b0 + +from __future__ import annotations +from .createvespasearchindexinforequest import ( + CreateVespaSearchIndexInfoRequest, + CreateVespaSearchIndexInfoRequestTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Literal, Optional +from typing_extensions import NotRequired, TypedDict + + +CreateSearchIndexInfoRequestStatus = Literal[ + "online", + "offline", +] + + +CreateSearchIndexInfoRequestIndexTypedDict = CreateVespaSearchIndexInfoRequestTypedDict + + +CreateSearchIndexInfoRequestIndex = CreateVespaSearchIndexInfoRequest + + +class CreateSearchIndexInfoRequestTypedDict(TypedDict): + name: str + index: CreateSearchIndexInfoRequestIndexTypedDict + document_count: NotRequired[Nullable[int]] + status: NotRequired[CreateSearchIndexInfoRequestStatus] + + +class CreateSearchIndexInfoRequest(BaseModel): + name: str + + index: CreateSearchIndexInfoRequestIndex + + document_count: OptionalNullable[int] = UNSET + + status: Optional[CreateSearchIndexInfoRequestStatus] = "offline" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["document_count", "status"]) + nullable_fields = set(["document_count"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/createvespaschemarequest.py b/src/mistralai/client/models/createvespaschemarequest.py new file mode 100644 index 00000000..cac99bc3 --- /dev/null +++ b/src/mistralai/client/models/createvespaschemarequest.py @@ -0,0 +1,49 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d44c0c466535 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class CreateVespaSchemaRequestTypedDict(TypedDict): + name: str + document_count: NotRequired[Nullable[int]] + + +class CreateVespaSchemaRequest(BaseModel): + name: str + + document_count: OptionalNullable[int] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["document_count"]) + nullable_fields = set(["document_count"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/createvespasearchindexinforequest.py b/src/mistralai/client/models/createvespasearchindexinforequest.py new file mode 100644 index 00000000..50006d38 --- /dev/null +++ b/src/mistralai/client/models/createvespasearchindexinforequest.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 866143560866 + +from __future__ import annotations +from .createvespaschemarequest import ( + CreateVespaSchemaRequest, + CreateVespaSchemaRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, TypedDict + + +class CreateVespaSearchIndexInfoRequestTypedDict(TypedDict): + k8s_cluster: str + k8s_namespace: str + vespa_instance_name: str + schemas: List[CreateVespaSchemaRequestTypedDict] + type: Literal["vespa"] + + +class CreateVespaSearchIndexInfoRequest(BaseModel): + k8s_cluster: str + + k8s_namespace: str + + vespa_instance_name: str + + schemas: List[CreateVespaSchemaRequest] + + type: Annotated[ + Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], + pydantic.Field(alias="type"), + ] = "vespa" + + +try: + CreateVespaSearchIndexInfoRequest.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/document.py b/src/mistralai/client/models/document.py index 8d1aea88..c04512c1 100644 --- a/src/mistralai/client/models/document.py +++ b/src/mistralai/client/models/document.py @@ -11,9 +11,10 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer from typing import Any, Dict -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class DocumentTypedDict(TypedDict): @@ -37,6 +38,8 @@ class DocumentTypedDict(TypedDict): tokens_processing_summary: NotRequired[Nullable[int]] url: NotRequired[Nullable[str]] attributes: NotRequired[Nullable[Dict[str, Any]]] + expires_at: NotRequired[Nullable[datetime]] + r"""If set, the document will be automatically deleted after this date.""" class Document(BaseModel): @@ -44,7 +47,12 @@ class Document(BaseModel): library_id: str - hash: Nullable[str] + hash: Annotated[ + Nullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] mime_type: Nullable[str] @@ -62,7 +70,12 @@ class Document(BaseModel): uploaded_by_type: str - processing_status: str + processing_status: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] tokens_processing_total: int @@ -72,14 +85,27 @@ class Document(BaseModel): number_of_pages: OptionalNullable[int] = UNSET - tokens_processing_main_content: OptionalNullable[int] = UNSET + tokens_processing_main_content: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET - tokens_processing_summary: OptionalNullable[int] = UNSET + tokens_processing_summary: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET url: OptionalNullable[str] = UNSET attributes: OptionalNullable[Dict[str, Any]] = UNSET + expires_at: OptionalNullable[datetime] = UNSET + r"""If set, the document will be automatically deleted after this date.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -91,6 +117,7 @@ def serialize_model(self, handler): "tokens_processing_summary", "url", "attributes", + "expires_at", ] ) nullable_fields = set( @@ -107,6 +134,7 @@ def serialize_model(self, handler): "tokens_processing_summary", "url", "attributes", + "expires_at", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/elicitationcapability.py b/src/mistralai/client/models/elicitationcapability.py new file mode 100644 index 00000000..12808436 --- /dev/null +++ b/src/mistralai/client/models/elicitationcapability.py @@ -0,0 +1,77 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 63a9b5cfa2f2 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ElicitationCapabilityTypedDict(TypedDict): + r"""Capability for elicitation operations. + + Clients must support at least one mode (form or url). + """ + + form: NotRequired[Nullable[Dict[str, Any]]] + url: NotRequired[Nullable[Dict[str, Any]]] + + +class ElicitationCapability(BaseModel): + r"""Capability for elicitation operations. + + Clients must support at least one mode (form or url). + """ + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + form: OptionalNullable[Dict[str, Any]] = UNSET + + url: OptionalNullable[Dict[str, Any]] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["form", "url"]) + nullable_fields = set(["form", "url"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/encryptedpatchvalue.py b/src/mistralai/client/models/encryptedpatchvalue.py new file mode 100644 index 00000000..970bd59b --- /dev/null +++ b/src/mistralai/client/models/encryptedpatchvalue.py @@ -0,0 +1,48 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 311803d1f28e + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class EncryptedPatchValueTypedDict(TypedDict): + r"""Wrapper for encrypted patch values in selective json_patch encryption. + + When partial encryption mode is enabled and a patch targets an EncryptedStrField, + the patch value is encrypted and wrapped in this structure. + + The type field acts as a discriminator to distinguish this from user data. + """ + + value: str + type: Literal["__encrypted__"] + + +class EncryptedPatchValue(BaseModel): + r"""Wrapper for encrypted patch values in selective json_patch encryption. + + When partial encryption mode is enabled and a patch targets an EncryptedStrField, + the patch value is encrypted and wrapped in this structure. + + The type field acts as a discriminator to distinguish this from user data. + """ + + value: str + + type: Annotated[ + Annotated[ + Literal["__encrypted__"], AfterValidator(validate_const("__encrypted__")) + ], + pydantic.Field(alias="type"), + ] = "__encrypted__" + + +try: + EncryptedPatchValue.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/filtergroup.py b/src/mistralai/client/models/filtergroup.py index 4e9815b7..3439df66 100644 --- a/src/mistralai/client/models/filtergroup.py +++ b/src/mistralai/client/models/filtergroup.py @@ -16,6 +16,14 @@ from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict +OrTypedDict = TypeAliasType( + "OrTypedDict", Union["FilterGroupTypedDict", FilterConditionTypedDict] +) + + +Or = TypeAliasType("Or", Union["FilterGroup", FilterCondition]) + + class FilterGroupTypedDict(TypedDict): and_: NotRequired[Nullable[List[AndTypedDict]]] or_: NotRequired[Nullable[List[OrTypedDict]]] @@ -52,14 +60,6 @@ def serialize_model(self, handler): return m -OrTypedDict = TypeAliasType( - "OrTypedDict", Union["FilterGroupTypedDict", FilterConditionTypedDict] -) - - -Or = TypeAliasType("Or", Union["FilterGroup", FilterCondition]) - - AndTypedDict = TypeAliasType( "AndTypedDict", Union["FilterGroupTypedDict", FilterConditionTypedDict] ) diff --git a/src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py b/src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py new file mode 100644 index 00000000..d22d0515 --- /dev/null +++ b/src/mistralai/client/models/get_schedule_v1_workflows_schedules_schedule_id_getop.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: cb775bc63ffd + +from __future__ import annotations +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata +from typing_extensions import Annotated, TypedDict + + +class GetScheduleV1WorkflowsSchedulesScheduleIDGetRequestTypedDict(TypedDict): + schedule_id: str + + +class GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] diff --git a/src/mistralai/client/models/get_schedules_v1_workflows_schedules_getop.py b/src/mistralai/client/models/get_schedules_v1_workflows_schedules_getop.py new file mode 100644 index 00000000..62f8ece2 --- /dev/null +++ b/src/mistralai/client/models/get_schedules_v1_workflows_schedules_getop.py @@ -0,0 +1,113 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b5f0210eca23 + +from __future__ import annotations +from .workflowschedulelistresponse import ( + WorkflowScheduleListResponse, + WorkflowScheduleListResponseTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from mistralai.client.utils import FieldMetadata, QueryParamMetadata +from pydantic import model_serializer +from typing import Awaitable, Callable, Literal, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +GetSchedulesV1WorkflowsSchedulesGetStatus = Literal[ + "active", + "paused", +] +r"""Filter by schedule status: 'active' or 'paused'""" + + +class GetSchedulesV1WorkflowsSchedulesGetRequestTypedDict(TypedDict): + workflow_name: NotRequired[Nullable[str]] + r"""Filter by workflow name""" + user_id: NotRequired[Nullable[str]] + r"""Filter by user ID. Pass 'current' to resolve to the authenticated user's ID.""" + status: NotRequired[Nullable[GetSchedulesV1WorkflowsSchedulesGetStatus]] + r"""Filter by schedule status: 'active' or 'paused'""" + page_size: NotRequired[Nullable[int]] + r"""Number of items per page. Omitting this parameter fetches all results at once (deprecated — pass page_size to use pagination).""" + next_page_token: NotRequired[Nullable[str]] + r"""Token for the next page of results""" + + +class GetSchedulesV1WorkflowsSchedulesGetRequest(BaseModel): + workflow_name: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by workflow name""" + + user_id: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by user ID. Pass 'current' to resolve to the authenticated user's ID.""" + + status: Annotated[ + OptionalNullable[GetSchedulesV1WorkflowsSchedulesGetStatus], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Filter by schedule status: 'active' or 'paused'""" + + page_size: Annotated[ + OptionalNullable[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Number of items per page. Omitting this parameter fetches all results at once (deprecated — pass page_size to use pagination).""" + + next_page_token: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Token for the next page of results""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["workflow_name", "user_id", "status", "page_size", "next_page_token"] + ) + nullable_fields = set( + ["workflow_name", "user_id", "status", "page_size", "next_page_token"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class GetSchedulesV1WorkflowsSchedulesGetResponseTypedDict(TypedDict): + result: WorkflowScheduleListResponseTypedDict + + +class GetSchedulesV1WorkflowsSchedulesGetResponse(BaseModel): + next: Union[ + Callable[[], Optional[GetSchedulesV1WorkflowsSchedulesGetResponse]], + Callable[[], Awaitable[Optional[GetSchedulesV1WorkflowsSchedulesGetResponse]]], + ] + + result: WorkflowScheduleListResponse diff --git a/src/mistralai/client/models/jsonpatchappend.py b/src/mistralai/client/models/jsonpatchappend.py index 7181ddac..185f7bb7 100644 --- a/src/mistralai/client/models/jsonpatchappend.py +++ b/src/mistralai/client/models/jsonpatchappend.py @@ -2,19 +2,32 @@ # @generated-id: 61801f21f4b0 from __future__ import annotations +from .encryptedpatchvalue import EncryptedPatchValue, EncryptedPatchValueTypedDict from mistralai.client.types import BaseModel from mistralai.client.utils import validate_const import pydantic from pydantic.functional_validators import AfterValidator -from typing import Literal -from typing_extensions import Annotated, TypedDict +from typing import Literal, Union +from typing_extensions import Annotated, TypeAliasType, TypedDict + + +JSONPatchAppendValueTypedDict = TypeAliasType( + "JSONPatchAppendValueTypedDict", Union[EncryptedPatchValueTypedDict, str] +) +r"""The value to use for the operation. A string to append to the existing value, or an EncryptedPatchValue wrapper when encryption is applied.""" + + +JSONPatchAppendValue = TypeAliasType( + "JSONPatchAppendValue", Union[EncryptedPatchValue, str] +) +r"""The value to use for the operation. A string to append to the existing value, or an EncryptedPatchValue wrapper when encryption is applied.""" class JSONPatchAppendTypedDict(TypedDict): path: str r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" - value: str - r"""The value to use for the operation. A string to append to the existing value""" + value: JSONPatchAppendValueTypedDict + r"""The value to use for the operation. A string to append to the existing value, or an EncryptedPatchValue wrapper when encryption is applied.""" op: Literal["append"] r"""'append' is an extension for efficient string concatenation in streaming scenarios.""" @@ -23,8 +36,8 @@ class JSONPatchAppend(BaseModel): path: str r"""A JSON Pointer (RFC 6901) identifying the target location within the document. Can be a string path (e.g., '/foo/bar'), '/', '', or an empty list [] for root-level operations.""" - value: str - r"""The value to use for the operation. A string to append to the existing value""" + value: JSONPatchAppendValue + r"""The value to use for the operation. A string to append to the existing value, or an EncryptedPatchValue wrapper when encryption is applied.""" op: Annotated[ Annotated[Literal["append"], AfterValidator(validate_const("append"))], diff --git a/src/mistralai/client/models/libraries_documents_list_v1op.py b/src/mistralai/client/models/libraries_documents_list_v1op.py index afc474cb..57e2736b 100644 --- a/src/mistralai/client/models/libraries_documents_list_v1op.py +++ b/src/mistralai/client/models/libraries_documents_list_v1op.py @@ -10,6 +10,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +import pydantic from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,7 @@ class LibrariesDocumentsListV1RequestTypedDict(TypedDict): page_size: NotRequired[int] page: NotRequired[int] filters_attributes: NotRequired[Nullable[str]] + r"""Deprecated: this parameter will be removed in a future version.""" sort_by: NotRequired[str] sort_order: NotRequired[str] @@ -47,8 +49,12 @@ class LibrariesDocumentsListV1Request(BaseModel): filters_attributes: Annotated[ OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET + r"""Deprecated: this parameter will be removed in a future version.""" sort_by: Annotated[ Optional[str], diff --git a/src/mistralai/client/models/libraries_documents_patch_v1op.py b/src/mistralai/client/models/libraries_documents_patch_v1op.py new file mode 100644 index 00000000..0ae4efaf --- /dev/null +++ b/src/mistralai/client/models/libraries_documents_patch_v1op.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 31b2201bbfe2 + +from __future__ import annotations +from .updatedocumentrequest import UpdateDocumentRequest, UpdateDocumentRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class LibrariesDocumentsPatchV1RequestTypedDict(TypedDict): + library_id: str + document_id: str + update_document_request: UpdateDocumentRequestTypedDict + + +class LibrariesDocumentsPatchV1Request(BaseModel): + library_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + document_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_document_request: Annotated[ + UpdateDocumentRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/libraries_list_v1op.py b/src/mistralai/client/models/libraries_list_v1op.py index cac06dad..328ac72c 100644 --- a/src/mistralai/client/models/libraries_list_v1op.py +++ b/src/mistralai/client/models/libraries_list_v1op.py @@ -10,6 +10,7 @@ UNSET_SENTINEL, ) from mistralai.client.utils import FieldMetadata, QueryParamMetadata +import pydantic from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,7 +22,7 @@ class LibrariesListV1RequestTypedDict(TypedDict): search: NotRequired[Nullable[str]] r"""Case-insensitive search on the library name.""" filter_owned_by_me: NotRequired[Nullable[bool]] - r"""Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter.""" + r"""Deprecated: this parameter will be removed in a future version.""" class LibrariesListV1Request(BaseModel): @@ -43,9 +44,12 @@ class LibrariesListV1Request(BaseModel): filter_owned_by_me: Annotated[ OptionalNullable[bool], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = UNSET - r"""Filter libraries by whether they were created by the current authenticated identity. Set to true for created by me, false for only libraries shared with me, or None to disable this filter.""" + r"""Deprecated: this parameter will be removed in a future version.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/libraries_patch_v1op.py b/src/mistralai/client/models/libraries_patch_v1op.py new file mode 100644 index 00000000..2fbaea67 --- /dev/null +++ b/src/mistralai/client/models/libraries_patch_v1op.py @@ -0,0 +1,24 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2b189be3c57a + +from __future__ import annotations +from .updatelibraryrequest import UpdateLibraryRequest, UpdateLibraryRequestTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class LibrariesPatchV1RequestTypedDict(TypedDict): + library_id: str + update_library_request: UpdateLibraryRequestTypedDict + + +class LibrariesPatchV1Request(BaseModel): + library_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + update_library_request: Annotated[ + UpdateLibraryRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/library.py b/src/mistralai/client/models/library.py index 0e09cfaa..4ec8604c 100644 --- a/src/mistralai/client/models/library.py +++ b/src/mistralai/client/models/library.py @@ -52,17 +52,42 @@ class Library(BaseModel): nb_documents: int - chunk_size: Nullable[int] + chunk_size: Annotated[ + Nullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] - emoji: OptionalNullable[str] = UNSET + emoji: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET description: OptionalNullable[str] = UNSET - generated_description: OptionalNullable[str] = UNSET + generated_description: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET - explicit_user_members_count: OptionalNullable[int] = UNSET + explicit_user_members_count: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET - explicit_workspace_members_count: OptionalNullable[int] = UNSET + explicit_workspace_members_count: Annotated[ + OptionalNullable[int], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET org_sharing_role: Annotated[ OptionalNullable[str], @@ -71,7 +96,12 @@ class Library(BaseModel): ), ] = UNSET - generated_name: OptionalNullable[str] = UNSET + generated_name: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET r"""Generated Name""" @model_serializer(mode="wrap") diff --git a/src/mistralai/client/models/logicalexpression.py b/src/mistralai/client/models/logicalexpression.py new file mode 100644 index 00000000..1b87693c --- /dev/null +++ b/src/mistralai/client/models/logicalexpression.py @@ -0,0 +1,39 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 48d46c10b453 + +from __future__ import annotations +from .toolproperties import ToolProperties, ToolPropertiesTypedDict +from mistralai.client.types import BaseModel, UnrecognizedStr +from typing import List, Literal, Union +from typing_extensions import TypeAliasType, TypedDict + + +LogicalExpressionType = Union[ + Literal[ + "and", + "or", + ], + UnrecognizedStr, +] + + +class LogicalExpressionTypedDict(TypedDict): + type: LogicalExpressionType + expressions: List[ExpressionTypedDict] + + +class LogicalExpression(BaseModel): + type: LogicalExpressionType + + expressions: List[Expression] + + +ExpressionTypedDict = TypeAliasType( + "ExpressionTypedDict", + Union[ToolPropertiesTypedDict, "LogicalExpressionTypedDict", List[str]], +) + + +Expression = TypeAliasType( + "Expression", Union[ToolProperties, "LogicalExpression", List[str]] +) diff --git a/src/mistralai/client/models/mcpprompt.py b/src/mistralai/client/models/mcpprompt.py new file mode 100644 index 00000000..fd5fb0d8 --- /dev/null +++ b/src/mistralai/client/models/mcpprompt.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: eac4133413b2 + +from __future__ import annotations +from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict +from .promptargument import PromptArgument, PromptArgumentTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List +from typing_extensions import Annotated, NotRequired, TypedDict + + +class MCPPromptTypedDict(TypedDict): + name: str + title: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + arguments: NotRequired[Nullable[List[PromptArgumentTypedDict]]] + icons: NotRequired[Nullable[List[MCPServerIconTypedDict]]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class MCPPrompt(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + name: str + + title: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + arguments: OptionalNullable[List[PromptArgument]] = UNSET + + icons: OptionalNullable[List[MCPServerIcon]] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["title", "description", "arguments", "icons", "_meta"]) + nullable_fields = set(["title", "description", "arguments", "icons", "_meta"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + MCPPrompt.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mcpresource.py b/src/mistralai/client/models/mcpresource.py new file mode 100644 index 00000000..77df5857 --- /dev/null +++ b/src/mistralai/client/models/mcpresource.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 4922063d1d29 + +from __future__ import annotations +from .annotations import Annotations, AnnotationsTypedDict +from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List +from typing_extensions import Annotated, NotRequired, TypedDict + + +class MCPResourceTypedDict(TypedDict): + name: str + uri: str + title: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + mime_type: NotRequired[Nullable[str]] + size: NotRequired[Nullable[int]] + icons: NotRequired[Nullable[List[MCPServerIconTypedDict]]] + annotations: NotRequired[Nullable[AnnotationsTypedDict]] + meta: NotRequired[Nullable[Dict[str, Any]]] + + +class MCPResource(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + name: str + + uri: str + + title: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + mime_type: Annotated[OptionalNullable[str], pydantic.Field(alias="mimeType")] = ( + UNSET + ) + + size: OptionalNullable[int] = UNSET + + icons: OptionalNullable[List[MCPServerIcon]] = UNSET + + annotations: OptionalNullable[Annotations] = UNSET + + meta: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "title", + "description", + "mimeType", + "size", + "icons", + "annotations", + "_meta", + ] + ) + nullable_fields = set( + [ + "title", + "description", + "mimeType", + "size", + "icons", + "annotations", + "_meta", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + MCPResource.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mcpserverauthenticationrequirement.py b/src/mistralai/client/models/mcpserverauthenticationrequirement.py new file mode 100644 index 00000000..280315a7 --- /dev/null +++ b/src/mistralai/client/models/mcpserverauthenticationrequirement.py @@ -0,0 +1,43 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 688772457c1d + +from __future__ import annotations +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class MCPServerAuthenticationRequirementTypedDict(TypedDict): + r"""Authentication requirements for a remote transport (SEP-2127).""" + + required: bool + r"""Whether authentication is mandatory""" + schemes: NotRequired[List[str]] + r"""Supported schemes (e.g. ['bearer', 'oauth2'])""" + + +class MCPServerAuthenticationRequirement(BaseModel): + r"""Authentication requirements for a remote transport (SEP-2127).""" + + required: bool + r"""Whether authentication is mandatory""" + + schemes: Optional[List[str]] = None + r"""Supported schemes (e.g. ['bearer', 'oauth2'])""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["schemes"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/mcpservercard.py b/src/mistralai/client/models/mcpservercard.py new file mode 100644 index 00000000..3e66b954 --- /dev/null +++ b/src/mistralai/client/models/mcpservercard.py @@ -0,0 +1,188 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3d8e787f97f3 + +from __future__ import annotations +from .clientcapabilities import ClientCapabilities, ClientCapabilitiesTypedDict +from .mcpprompt import MCPPrompt, MCPPromptTypedDict +from .mcpresource import MCPResource, MCPResourceTypedDict +from .mcpservercardmeta import MCPServerCardMeta, MCPServerCardMetaTypedDict +from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict +from .mcpserverremote import MCPServerRemote, MCPServerRemoteTypedDict +from .mcpserverrepository import MCPServerRepository, MCPServerRepositoryTypedDict +from .mcptoolmeta import MCPToolMeta, MCPToolMetaTypedDict +from .servercapabilities import ServerCapabilities, ServerCapabilitiesTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +ResourcesTypedDict = TypeAliasType( + "ResourcesTypedDict", Union[str, List[MCPResourceTypedDict]] +) + + +Resources = TypeAliasType("Resources", Union[str, List[MCPResource]]) + + +ToolsTypedDict = TypeAliasType("ToolsTypedDict", Union[str, List[MCPToolMetaTypedDict]]) + + +Tools = TypeAliasType("Tools", Union[str, List[MCPToolMeta]]) + + +PromptsTypedDict = TypeAliasType( + "PromptsTypedDict", Union[str, List[MCPPromptTypedDict]] +) + + +Prompts = TypeAliasType("Prompts", Union[str, List[MCPPrompt]]) + + +class MCPServerCardTypedDict(TypedDict): + name: str + r"""Server identifier in reverse-DNS format with exactly one /""" + version: str + r"""Server version (semantic versioning preferred)""" + dollar_schema: NotRequired[Nullable[str]] + r"""URL to the JSON schema definition""" + capabilities: NotRequired[ServerCapabilitiesTypedDict] + r"""Capabilities that a server may support.""" + title: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + website_url: NotRequired[Nullable[str]] + repository: NotRequired[Nullable[MCPServerRepositoryTypedDict]] + icons: NotRequired[Nullable[List[MCPServerIconTypedDict]]] + remotes: NotRequired[Nullable[List[MCPServerRemoteTypedDict]]] + requires: NotRequired[Nullable[ClientCapabilitiesTypedDict]] + resources: NotRequired[Nullable[ResourcesTypedDict]] + tools: NotRequired[Nullable[ToolsTypedDict]] + prompts: NotRequired[Nullable[PromptsTypedDict]] + meta: NotRequired[Nullable[MCPServerCardMetaTypedDict]] + + +class MCPServerCard(BaseModel): + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + name: str + r"""Server identifier in reverse-DNS format with exactly one /""" + + version: str + r"""Server version (semantic versioning preferred)""" + + dollar_schema: Annotated[OptionalNullable[str], pydantic.Field(alias="$schema")] = ( + UNSET + ) + r"""URL to the JSON schema definition""" + + capabilities: Optional[ServerCapabilities] = None + r"""Capabilities that a server may support.""" + + title: OptionalNullable[str] = UNSET + + description: OptionalNullable[str] = UNSET + + website_url: Annotated[ + OptionalNullable[str], pydantic.Field(alias="websiteUrl") + ] = UNSET + + repository: OptionalNullable[MCPServerRepository] = UNSET + + icons: OptionalNullable[List[MCPServerIcon]] = UNSET + + remotes: OptionalNullable[List[MCPServerRemote]] = UNSET + + requires: OptionalNullable[ClientCapabilities] = UNSET + + resources: OptionalNullable[Resources] = UNSET + + tools: OptionalNullable[Tools] = UNSET + + prompts: OptionalNullable[Prompts] = UNSET + + meta: Annotated[ + OptionalNullable[MCPServerCardMeta], pydantic.Field(alias="_meta") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "$schema", + "capabilities", + "title", + "description", + "websiteUrl", + "repository", + "icons", + "remotes", + "requires", + "resources", + "tools", + "prompts", + "_meta", + ] + ) + nullable_fields = set( + [ + "$schema", + "title", + "description", + "websiteUrl", + "repository", + "icons", + "remotes", + "requires", + "resources", + "tools", + "prompts", + "_meta", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + MCPServerCard.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mcpuitoolmeta.py b/src/mistralai/client/models/mcpservercardmeta.py similarity index 67% rename from src/mistralai/client/models/mcpuitoolmeta.py rename to src/mistralai/client/models/mcpservercardmeta.py index 287192a6..daf592f9 100644 --- a/src/mistralai/client/models/mcpuitoolmeta.py +++ b/src/mistralai/client/models/mcpservercardmeta.py @@ -1,51 +1,45 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 7c54fb6157a9 +# @generated-id: 0f095765c6aa from __future__ import annotations +from .turbinemeta import TurbineMeta, TurbineMetaTypedDict from mistralai.client.types import ( BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL, - UnrecognizedStr, ) import pydantic from pydantic import ConfigDict, model_serializer -from typing import Any, Dict, List, Literal, Union +from typing import Any, Dict from typing_extensions import Annotated, NotRequired, TypedDict -Visibility = Union[ - Literal[ - "model", - "app", - ], - UnrecognizedStr, -] +class MCPServerCardMetaTypedDict(TypedDict): + r"""Typed _meta for MCP server cards. + Only the 'turbine' field is typed. Other fields are allowed via extra=\"allow\". + """ -class MCPUIToolMetaTypedDict(TypedDict): - r"""UI metadata for tools that reference UI resources.""" + ai_mistral_turbine: NotRequired[Nullable[TurbineMetaTypedDict]] - resource_uri: NotRequired[Nullable[str]] - visibility: NotRequired[Nullable[List[Visibility]]] +class MCPServerCardMeta(BaseModel): + r"""Typed _meta for MCP server cards. -class MCPUIToolMeta(BaseModel): - r"""UI metadata for tools that reference UI resources.""" + Only the 'turbine' field is typed. Other fields are allowed via extra=\"allow\". + """ model_config = ConfigDict( populate_by_name=True, arbitrary_types_allowed=True, extra="allow" ) __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - resource_uri: Annotated[ - OptionalNullable[str], pydantic.Field(alias="resourceUri") + ai_mistral_turbine: Annotated[ + OptionalNullable[TurbineMeta], pydantic.Field(alias="ai.mistral/turbine") ] = UNSET - visibility: OptionalNullable[List[Visibility]] = UNSET - @property def additional_properties(self): return self.__pydantic_extra__ @@ -56,8 +50,8 @@ def additional_properties(self, value): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["resourceUri", "visibility"]) - nullable_fields = set(["resourceUri", "visibility"]) + optional_fields = set(["ai.mistral/turbine"]) + nullable_fields = set(["ai.mistral/turbine"]) serialized = handler(self) m = {} @@ -84,6 +78,6 @@ def serialize_model(self, handler): try: - MCPUIToolMeta.model_rebuild() + MCPServerCardMeta.model_rebuild() except NameError: pass diff --git a/src/mistralai/client/models/mcpserverremote.py b/src/mistralai/client/models/mcpserverremote.py new file mode 100644 index 00000000..9099207c --- /dev/null +++ b/src/mistralai/client/models/mcpserverremote.py @@ -0,0 +1,96 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b20e4512dbe2 + +from __future__ import annotations +from .mcpserverauthenticationrequirement import ( + MCPServerAuthenticationRequirement, + MCPServerAuthenticationRequirementTypedDict, +) +from .mcpserverremoteheader import MCPServerRemoteHeader, MCPServerRemoteHeaderTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, + UnrecognizedStr, +) +import pydantic +from pydantic import model_serializer +from typing import List, Literal, Union +from typing_extensions import Annotated, NotRequired, TypedDict + + +MCPServerRemoteType = Union[ + Literal[ + "streamable-http", + "sse", + ], + UnrecognizedStr, +] +r"""Transport type""" + + +class MCPServerRemoteTypedDict(TypedDict): + r"""Remote transport endpoint (SEP-2127).""" + + type: MCPServerRemoteType + r"""Transport type""" + url: str + r"""Transport endpoint URL""" + supported_protocol_versions: NotRequired[Nullable[List[str]]] + headers: NotRequired[Nullable[List[MCPServerRemoteHeaderTypedDict]]] + authentication: NotRequired[Nullable[MCPServerAuthenticationRequirementTypedDict]] + + +class MCPServerRemote(BaseModel): + r"""Remote transport endpoint (SEP-2127).""" + + type: MCPServerRemoteType + r"""Transport type""" + + url: str + r"""Transport endpoint URL""" + + supported_protocol_versions: Annotated[ + OptionalNullable[List[str]], pydantic.Field(alias="supportedProtocolVersions") + ] = UNSET + + headers: OptionalNullable[List[MCPServerRemoteHeader]] = UNSET + + authentication: OptionalNullable[MCPServerAuthenticationRequirement] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["supportedProtocolVersions", "headers", "authentication"] + ) + nullable_fields = set( + ["supportedProtocolVersions", "headers", "authentication"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + MCPServerRemote.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mcpserverremoteheader.py b/src/mistralai/client/models/mcpserverremoteheader.py new file mode 100644 index 00000000..efd1c1fd --- /dev/null +++ b/src/mistralai/client/models/mcpserverremoteheader.py @@ -0,0 +1,81 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: adaf8d89cbcb + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import List +from typing_extensions import Annotated, NotRequired, TypedDict + + +class MCPServerRemoteHeaderTypedDict(TypedDict): + r"""Header definition for a remote transport (SEP-2127).""" + + name: str + r"""Header name""" + description: str + r"""Human-readable description of the header""" + is_required: NotRequired[Nullable[bool]] + is_secret: NotRequired[Nullable[bool]] + default: NotRequired[Nullable[str]] + choices: NotRequired[Nullable[List[str]]] + + +class MCPServerRemoteHeader(BaseModel): + r"""Header definition for a remote transport (SEP-2127).""" + + name: str + r"""Header name""" + + description: str + r"""Human-readable description of the header""" + + is_required: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="isRequired") + ] = UNSET + + is_secret: Annotated[OptionalNullable[bool], pydantic.Field(alias="isSecret")] = ( + UNSET + ) + + default: OptionalNullable[str] = UNSET + + choices: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["isRequired", "isSecret", "default", "choices"]) + nullable_fields = set(["isRequired", "isSecret", "default", "choices"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +try: + MCPServerRemoteHeader.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/mcpserverrepository.py b/src/mistralai/client/models/mcpserverrepository.py new file mode 100644 index 00000000..eb564992 --- /dev/null +++ b/src/mistralai/client/models/mcpserverrepository.py @@ -0,0 +1,60 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 431ce897e113 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class MCPServerRepositoryTypedDict(TypedDict): + r"""Source repository information (SEP-2127).""" + + url: str + r"""Repository URL""" + source: str + r"""Source identifier (e.g. 'github')""" + subfolder: NotRequired[Nullable[str]] + + +class MCPServerRepository(BaseModel): + r"""Source repository information (SEP-2127).""" + + url: str + r"""Repository URL""" + + source: str + r"""Source identifier (e.g. 'github')""" + + subfolder: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["subfolder"]) + nullable_fields = set(["subfolder"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/mcptoolmeta.py b/src/mistralai/client/models/mcptoolmeta.py index edbf39a9..ddd7771b 100644 --- a/src/mistralai/client/models/mcptoolmeta.py +++ b/src/mistralai/client/models/mcptoolmeta.py @@ -2,8 +2,9 @@ # @generated-id: 07cf1c0762c9 from __future__ import annotations -from .mcpuitoolmeta import MCPUIToolMeta, MCPUIToolMetaTypedDict -from .turbinetoolmeta import TurbineToolMeta, TurbineToolMetaTypedDict +from .mcpservericon import MCPServerIcon, MCPServerIconTypedDict +from .toolannotations import ToolAnnotations, ToolAnnotationsTypedDict +from .toolexecution import ToolExecution, ToolExecutionTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -13,37 +14,50 @@ ) import pydantic from pydantic import ConfigDict, model_serializer -from typing import Any, Dict +from typing import Any, Dict, List from typing_extensions import Annotated, NotRequired, TypedDict class MCPToolMetaTypedDict(TypedDict): - r"""Typed _meta for MCP tools. - - Only the 'ui' field is typed. Other fields are allowed via extra=\"allow\". - """ - - ui: NotRequired[Nullable[MCPUIToolMetaTypedDict]] - ai_mistral_turbine: NotRequired[Nullable[TurbineToolMetaTypedDict]] + name: str + input_schema: Dict[str, Any] + title: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + output_schema: NotRequired[Nullable[Dict[str, Any]]] + icons: NotRequired[Nullable[List[MCPServerIconTypedDict]]] + annotations: NotRequired[Nullable[ToolAnnotationsTypedDict]] + meta: NotRequired[Nullable[MCPToolMetaTypedDict]] + execution: NotRequired[Nullable[ToolExecutionTypedDict]] class MCPToolMeta(BaseModel): - r"""Typed _meta for MCP tools. - - Only the 'ui' field is typed. Other fields are allowed via extra=\"allow\". - """ - model_config = ConfigDict( populate_by_name=True, arbitrary_types_allowed=True, extra="allow" ) __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) - ui: OptionalNullable[MCPUIToolMeta] = UNSET + name: str + + input_schema: Annotated[Dict[str, Any], pydantic.Field(alias="inputSchema")] + + title: OptionalNullable[str] = UNSET - ai_mistral_turbine: Annotated[ - OptionalNullable[TurbineToolMeta], pydantic.Field(alias="ai.mistral/turbine") + description: OptionalNullable[str] = UNSET + + output_schema: Annotated[ + OptionalNullable[Dict[str, Any]], pydantic.Field(alias="outputSchema") ] = UNSET + icons: OptionalNullable[List[MCPServerIcon]] = UNSET + + annotations: OptionalNullable[ToolAnnotations] = UNSET + + meta: Annotated[OptionalNullable[MCPToolMeta], pydantic.Field(alias="_meta")] = ( + UNSET + ) + + execution: OptionalNullable[ToolExecution] = UNSET + @property def additional_properties(self): return self.__pydantic_extra__ @@ -54,8 +68,28 @@ def additional_properties(self, value): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["ui", "ai.mistral/turbine"]) - nullable_fields = set(["ui", "ai.mistral/turbine"]) + optional_fields = set( + [ + "title", + "description", + "outputSchema", + "icons", + "annotations", + "_meta", + "execution", + ] + ) + nullable_fields = set( + [ + "title", + "description", + "outputSchema", + "icons", + "annotations", + "_meta", + "execution", + ] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/partialscheduledefinition.py b/src/mistralai/client/models/partialscheduledefinition.py new file mode 100644 index 00000000..1120dd14 --- /dev/null +++ b/src/mistralai/client/models/partialscheduledefinition.py @@ -0,0 +1,139 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ce1ded792ff5 + +from __future__ import annotations +from .schedulecalendar import ScheduleCalendar, ScheduleCalendarTypedDict +from .scheduleinterval import ScheduleInterval, ScheduleIntervalTypedDict +from .schedulepolicy import SchedulePolicy, SchedulePolicyTypedDict +from datetime import datetime +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class PartialScheduleDefinitionTypedDict(TypedDict): + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ + + input: NotRequired[Any] + r"""Input to provide to the workflow when starting it.""" + calendars: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Calendar-based specification of times.""" + intervals: NotRequired[List[ScheduleIntervalTypedDict]] + r"""Interval-based specification of times.""" + cron_expressions: NotRequired[List[str]] + r"""Cron-based specification of times.""" + skip: NotRequired[List[ScheduleCalendarTypedDict]] + r"""Set of calendar times to skip.""" + start_at: NotRequired[Nullable[datetime]] + r"""Time after which the first action may be run.""" + end_at: NotRequired[Nullable[datetime]] + r"""Time after which no more actions will be run.""" + jitter: NotRequired[Nullable[str]] + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + time_zone_name: NotRequired[Nullable[str]] + r"""IANA time zone name, for example ``US/Central``.""" + policy: NotRequired[SchedulePolicyTypedDict] + max_executions: NotRequired[Nullable[int]] + r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + + +class PartialScheduleDefinition(BaseModel): + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ + + input: Optional[Any] = None + r"""Input to provide to the workflow when starting it.""" + + calendars: Optional[List[ScheduleCalendar]] = None + r"""Calendar-based specification of times.""" + + intervals: Optional[List[ScheduleInterval]] = None + r"""Interval-based specification of times.""" + + cron_expressions: Optional[List[str]] = None + r"""Cron-based specification of times.""" + + skip: Optional[List[ScheduleCalendar]] = None + r"""Set of calendar times to skip.""" + + start_at: OptionalNullable[datetime] = UNSET + r"""Time after which the first action may be run.""" + + end_at: OptionalNullable[datetime] = UNSET + r"""Time after which no more actions will be run.""" + + jitter: OptionalNullable[str] = UNSET + r"""Jitter to apply each action. + + An action's scheduled time will be incremented by a random value between 0 + and this value if present (but not past the next schedule). + + """ + + time_zone_name: OptionalNullable[str] = UNSET + r"""IANA time zone name, for example ``US/Central``.""" + + policy: Optional[SchedulePolicy] = None + + max_executions: OptionalNullable[int] = UNSET + r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "input", + "calendars", + "intervals", + "cron_expressions", + "skip", + "start_at", + "end_at", + "jitter", + "time_zone_name", + "policy", + "max_executions", + ] + ) + nullable_fields = set( + ["start_at", "end_at", "jitter", "time_zone_name", "max_executions"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/processingstatus.py b/src/mistralai/client/models/processingstatus.py index 7e93308f..73308b46 100644 --- a/src/mistralai/client/models/processingstatus.py +++ b/src/mistralai/client/models/processingstatus.py @@ -4,7 +4,8 @@ from __future__ import annotations from .processstatus import ProcessStatus from mistralai.client.types import BaseModel -from typing_extensions import TypedDict +import pydantic +from typing_extensions import Annotated, TypedDict class ProcessingStatusTypedDict(TypedDict): @@ -18,4 +19,9 @@ class ProcessingStatus(BaseModel): process_status: ProcessStatus - processing_status: str + processing_status: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] diff --git a/src/mistralai/client/models/promptargument.py b/src/mistralai/client/models/promptargument.py new file mode 100644 index 00000000..1f73b59f --- /dev/null +++ b/src/mistralai/client/models/promptargument.py @@ -0,0 +1,74 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 52e5c885f761 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class PromptArgumentTypedDict(TypedDict): + r"""An argument for a prompt template.""" + + name: str + description: NotRequired[Nullable[str]] + required: NotRequired[Nullable[bool]] + + +class PromptArgument(BaseModel): + r"""An argument for a prompt template.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + name: str + + description: OptionalNullable[str] = UNSET + + required: OptionalNullable[bool] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["description", "required"]) + nullable_fields = set(["description", "required"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/promptscapability.py b/src/mistralai/client/models/promptscapability.py new file mode 100644 index 00000000..f4ddf63e --- /dev/null +++ b/src/mistralai/client/models/promptscapability.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 15c552f53adf + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class PromptsCapabilityTypedDict(TypedDict): + r"""Capability for prompts operations.""" + + list_changed: NotRequired[Nullable[bool]] + + +class PromptsCapability(BaseModel): + r"""Capability for prompts operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + list_changed: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="listChanged") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["listChanged"]) + nullable_fields = set(["listChanged"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + PromptsCapability.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/publicconnectionconfig.py b/src/mistralai/client/models/publicconnectionconfig.py new file mode 100644 index 00000000..94fd6708 --- /dev/null +++ b/src/mistralai/client/models/publicconnectionconfig.py @@ -0,0 +1,57 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 03c2460e04ac + +from __future__ import annotations +from .connectionconfigtype import ConnectionConfigType +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PublicConnectionConfigTypedDict(TypedDict): + type: NotRequired[ConnectionConfigType] + base_url: NotRequired[Nullable[str]] + headers: NotRequired[Nullable[Dict[str, str]]] + signed: NotRequired[Nullable[bool]] + + +class PublicConnectionConfig(BaseModel): + type: Optional[ConnectionConfigType] = None + + base_url: OptionalNullable[str] = UNSET + + headers: OptionalNullable[Dict[str, str]] = UNSET + + signed: OptionalNullable[bool] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type", "base_url", "headers", "signed"]) + nullable_fields = set(["base_url", "headers", "signed"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/resourcescapability.py b/src/mistralai/client/models/resourcescapability.py new file mode 100644 index 00000000..39bd1a0b --- /dev/null +++ b/src/mistralai/client/models/resourcescapability.py @@ -0,0 +1,79 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: d109cd5fe17d + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ResourcesCapabilityTypedDict(TypedDict): + r"""Capability for resources operations.""" + + subscribe: NotRequired[Nullable[bool]] + list_changed: NotRequired[Nullable[bool]] + + +class ResourcesCapability(BaseModel): + r"""Capability for resources operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + subscribe: OptionalNullable[bool] = UNSET + + list_changed: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="listChanged") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["subscribe", "listChanged"]) + nullable_fields = set(["subscribe", "listChanged"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + ResourcesCapability.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/resourcetype.py b/src/mistralai/client/models/resourcetype.py new file mode 100644 index 00000000..435c917c --- /dev/null +++ b/src/mistralai/client/models/resourcetype.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 58cbbc423f90 + +from __future__ import annotations +from mistralai.client.types import UnrecognizedInt +from typing import Literal, Union + + +ResourceType = Union[ + Literal[ + 1, + 2, + 3, + 4, + ], + UnrecognizedInt, +] diff --git a/src/mistralai/client/models/rootscapability.py b/src/mistralai/client/models/rootscapability.py new file mode 100644 index 00000000..37b25d65 --- /dev/null +++ b/src/mistralai/client/models/rootscapability.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: f1514b6dd416 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class RootsCapabilityTypedDict(TypedDict): + r"""Capability for root operations.""" + + list_changed: NotRequired[Nullable[bool]] + + +class RootsCapability(BaseModel): + r"""Capability for root operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + list_changed: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="listChanged") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["listChanged"]) + nullable_fields = set(["listChanged"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + RootsCapability.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/samplingcapability.py b/src/mistralai/client/models/samplingcapability.py new file mode 100644 index 00000000..46aa3be5 --- /dev/null +++ b/src/mistralai/client/models/samplingcapability.py @@ -0,0 +1,71 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0a7af0cc3968 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class SamplingCapabilityTypedDict(TypedDict): + r"""Sampling capability structure, allowing fine-grained capability advertisement.""" + + context: NotRequired[Nullable[Dict[str, Any]]] + tools: NotRequired[Nullable[Dict[str, Any]]] + + +class SamplingCapability(BaseModel): + r"""Sampling capability structure, allowing fine-grained capability advertisement.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + context: OptionalNullable[Dict[str, Any]] = UNSET + + tools: OptionalNullable[Dict[str, Any]] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["context", "tools"]) + nullable_fields = set(["context", "tools"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/scheduledefinition.py b/src/mistralai/client/models/scheduledefinition.py index 58102293..3c018552 100644 --- a/src/mistralai/client/models/scheduledefinition.py +++ b/src/mistralai/client/models/scheduledefinition.py @@ -51,10 +51,10 @@ class ScheduleDefinitionTypedDict(TypedDict): time_zone_name: NotRequired[Nullable[str]] r"""IANA time zone name, for example ``US/Central``.""" policy: NotRequired[SchedulePolicyTypedDict] - schedule_id: NotRequired[Nullable[str]] - r"""Unique identifier for the schedule.""" max_executions: NotRequired[Nullable[int]] r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + schedule_id: NotRequired[Nullable[str]] + r"""Unique identifier for the schedule.""" class ScheduleDefinition(BaseModel): @@ -100,12 +100,12 @@ class ScheduleDefinition(BaseModel): policy: Optional[SchedulePolicy] = None - schedule_id: OptionalNullable[str] = UNSET - r"""Unique identifier for the schedule.""" - max_executions: OptionalNullable[int] = UNSET r"""Maximum number of times this schedule will trigger a workflow execution. Once this limit is reached, no further executions are triggered automatically. null means unlimited.""" + schedule_id: OptionalNullable[str] = UNSET + r"""Unique identifier for the schedule.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -119,8 +119,8 @@ def serialize_model(self, handler): "jitter", "time_zone_name", "policy", - "schedule_id", "max_executions", + "schedule_id", ] ) nullable_fields = set( @@ -129,8 +129,8 @@ def serialize_model(self, handler): "end_at", "jitter", "time_zone_name", - "schedule_id", "max_executions", + "schedule_id", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/searchindexresponse.py b/src/mistralai/client/models/searchindexresponse.py new file mode 100644 index 00000000..0e62aa32 --- /dev/null +++ b/src/mistralai/client/models/searchindexresponse.py @@ -0,0 +1,72 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 054688d20a3b + +from __future__ import annotations +from .vespasearchindexinforesponse import ( + VespaSearchIndexInfoResponse, + VespaSearchIndexInfoResponseTypedDict, +) +from datetime import datetime +from mistralai.client.types import BaseModel, UnrecognizedStr +from pydantic import ConfigDict +from typing import Any, Literal, Union +from typing_extensions import TypedDict + + +SearchIndexResponseStatus = Union[ + Literal[ + "online", + "offline", + ], + UnrecognizedStr, +] + + +SearchIndexResponseIndexTypedDict = VespaSearchIndexInfoResponseTypedDict + + +class UnknownSearchIndexResponseIndex(BaseModel): + r"""A SearchIndexResponseIndex variant the SDK doesn't recognize. Preserves the raw payload.""" + + type: Literal["UNKNOWN"] = "UNKNOWN" + raw: Any + is_unknown: Literal[True] = True + + model_config = ConfigDict(frozen=True) + + +_SEARCH_INDEX_RESPONSE_INDEX_VARIANTS: dict[str, Any] = { + "vespa": VespaSearchIndexInfoResponse, +} + + +SearchIndexResponseIndex = VespaSearchIndexInfoResponse + + +class SearchIndexResponseTypedDict(TypedDict): + id: str + name: str + creator_id: str + document_count: int + status: SearchIndexResponseStatus + created_at: datetime + modified_at: datetime + index: SearchIndexResponseIndexTypedDict + + +class SearchIndexResponse(BaseModel): + id: str + + name: str + + creator_id: str + + document_count: int + + status: SearchIndexResponseStatus + + created_at: datetime + + modified_at: datetime + + index: SearchIndexResponseIndex diff --git a/src/mistralai/client/models/servercapabilities.py b/src/mistralai/client/models/servercapabilities.py new file mode 100644 index 00000000..ccfbf932 --- /dev/null +++ b/src/mistralai/client/models/servercapabilities.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 9e5832ea005a + +from __future__ import annotations +from .promptscapability import PromptsCapability, PromptsCapabilityTypedDict +from .resourcescapability import ResourcesCapability, ResourcesCapabilityTypedDict +from .servertaskscapability import ServerTasksCapability, ServerTasksCapabilityTypedDict +from .toolscapability import ToolsCapability, ToolsCapabilityTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ServerCapabilitiesTypedDict(TypedDict): + r"""Capabilities that a server may support.""" + + experimental: NotRequired[Nullable[Dict[str, Dict[str, Any]]]] + logging: NotRequired[Nullable[Dict[str, Any]]] + prompts: NotRequired[Nullable[PromptsCapabilityTypedDict]] + resources: NotRequired[Nullable[ResourcesCapabilityTypedDict]] + tools: NotRequired[Nullable[ToolsCapabilityTypedDict]] + completions: NotRequired[Nullable[Dict[str, Any]]] + tasks: NotRequired[Nullable[ServerTasksCapabilityTypedDict]] + + +class ServerCapabilities(BaseModel): + r"""Capabilities that a server may support.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + experimental: OptionalNullable[Dict[str, Dict[str, Any]]] = UNSET + + logging: OptionalNullable[Dict[str, Any]] = UNSET + + prompts: OptionalNullable[PromptsCapability] = UNSET + + resources: OptionalNullable[ResourcesCapability] = UNSET + + tools: OptionalNullable[ToolsCapability] = UNSET + + completions: OptionalNullable[Dict[str, Any]] = UNSET + + tasks: OptionalNullable[ServerTasksCapability] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "experimental", + "logging", + "prompts", + "resources", + "tools", + "completions", + "tasks", + ] + ) + nullable_fields = set( + [ + "experimental", + "logging", + "prompts", + "resources", + "tools", + "completions", + "tasks", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/turbinetoollocale.py b/src/mistralai/client/models/serverlocale.py similarity index 95% rename from src/mistralai/client/models/turbinetoollocale.py rename to src/mistralai/client/models/serverlocale.py index 42682ee1..1b73a749 100644 --- a/src/mistralai/client/models/turbinetoollocale.py +++ b/src/mistralai/client/models/serverlocale.py @@ -1,5 +1,5 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -# @generated-id: 2699936a7546 +# @generated-id: 5b70fcb88050 from __future__ import annotations from mistralai.client.types import ( @@ -14,7 +14,7 @@ from typing_extensions import NotRequired, TypedDict -class TurbineToolLocaleTypedDict(TypedDict): +class ServerLocaleTypedDict(TypedDict): name: NotRequired[Nullable[Dict[str, str]]] description: NotRequired[Nullable[Dict[str, str]]] usage_sentence: NotRequired[Nullable[Dict[str, str]]] @@ -22,7 +22,7 @@ class TurbineToolLocaleTypedDict(TypedDict): done_description: NotRequired[Nullable[Dict[str, str]]] -class TurbineToolLocale(BaseModel): +class ServerLocale(BaseModel): name: OptionalNullable[Dict[str, str]] = UNSET description: OptionalNullable[Dict[str, str]] = UNSET diff --git a/src/mistralai/client/models/servertaskscapability.py b/src/mistralai/client/models/servertaskscapability.py new file mode 100644 index 00000000..7d2c2927 --- /dev/null +++ b/src/mistralai/client/models/servertaskscapability.py @@ -0,0 +1,78 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fff9567cb403 + +from __future__ import annotations +from .servertasksrequestscapability import ( + ServerTasksRequestsCapability, + ServerTasksRequestsCapabilityTypedDict, +) +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ServerTasksCapabilityTypedDict(TypedDict): + r"""Capability for server tasks operations.""" + + list: NotRequired[Nullable[Dict[str, Any]]] + cancel: NotRequired[Nullable[Dict[str, Any]]] + requests: NotRequired[Nullable[ServerTasksRequestsCapabilityTypedDict]] + + +class ServerTasksCapability(BaseModel): + r"""Capability for server tasks operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + list: OptionalNullable[Dict[str, Any]] = UNSET + + cancel: OptionalNullable[Dict[str, Any]] = UNSET + + requests: OptionalNullable[ServerTasksRequestsCapability] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["list", "cancel", "requests"]) + nullable_fields = set(["list", "cancel", "requests"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/servertasksrequestscapability.py b/src/mistralai/client/models/servertasksrequestscapability.py new file mode 100644 index 00000000..2568507f --- /dev/null +++ b/src/mistralai/client/models/servertasksrequestscapability.py @@ -0,0 +1,69 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 23cc8415f619 + +from __future__ import annotations +from .taskstoolscapability import TasksToolsCapability, TasksToolsCapabilityTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class ServerTasksRequestsCapabilityTypedDict(TypedDict): + r"""Capability for tasks requests operations.""" + + tools: NotRequired[Nullable[TasksToolsCapabilityTypedDict]] + + +class ServerTasksRequestsCapability(BaseModel): + r"""Capability for tasks requests operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + tools: OptionalNullable[TasksToolsCapability] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["tools"]) + nullable_fields = set(["tools"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/sharing.py b/src/mistralai/client/models/sharing.py index efa16203..4260f175 100644 --- a/src/mistralai/client/models/sharing.py +++ b/src/mistralai/client/models/sharing.py @@ -9,8 +9,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class SharingTypedDict(TypedDict): @@ -25,7 +26,12 @@ class SharingTypedDict(TypedDict): class Sharing(BaseModel): library_id: str - org_id: str + org_id: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] role: str @@ -33,7 +39,12 @@ class Sharing(BaseModel): share_with_uuid: Nullable[str] - user_id: OptionalNullable[str] = UNSET + user_id: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/sharingdelete.py b/src/mistralai/client/models/sharingdelete.py index 3472a506..67399831 100644 --- a/src/mistralai/client/models/sharingdelete.py +++ b/src/mistralai/client/models/sharingdelete.py @@ -10,8 +10,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class SharingDeleteTypedDict(TypedDict): @@ -29,7 +30,12 @@ class SharingDelete(BaseModel): share_with_type: EntityType r"""The type of entity, used to share a library.""" - org_id: OptionalNullable[str] = UNSET + org_id: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/sharingrequest.py b/src/mistralai/client/models/sharingrequest.py index 7c2d435c..94de31c1 100644 --- a/src/mistralai/client/models/sharingrequest.py +++ b/src/mistralai/client/models/sharingrequest.py @@ -11,8 +11,9 @@ UNSET, UNSET_SENTINEL, ) +import pydantic from pydantic import model_serializer -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class SharingRequestTypedDict(TypedDict): @@ -33,7 +34,12 @@ class SharingRequest(BaseModel): share_with_type: EntityType r"""The type of entity, used to share a library.""" - org_id: OptionalNullable[str] = UNSET + org_id: Annotated[ + OptionalNullable[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = UNSET @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/taskselicitationcapability.py b/src/mistralai/client/models/taskselicitationcapability.py new file mode 100644 index 00000000..768f36f1 --- /dev/null +++ b/src/mistralai/client/models/taskselicitationcapability.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 19504f19f5f3 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class TasksElicitationCapabilityTypedDict(TypedDict): + r"""Capability for tasks elicitation operations.""" + + create: NotRequired[Nullable[Dict[str, Any]]] + + +class TasksElicitationCapability(BaseModel): + r"""Capability for tasks elicitation operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + create: OptionalNullable[Dict[str, Any]] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["create"]) + nullable_fields = set(["create"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/taskssamplingcapability.py b/src/mistralai/client/models/taskssamplingcapability.py new file mode 100644 index 00000000..e051fd75 --- /dev/null +++ b/src/mistralai/client/models/taskssamplingcapability.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fe3e6aaee007 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class TasksSamplingCapabilityTypedDict(TypedDict): + r"""Capability for tasks sampling operations.""" + + create_message: NotRequired[Nullable[Dict[str, Any]]] + + +class TasksSamplingCapability(BaseModel): + r"""Capability for tasks sampling operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + create_message: Annotated[ + OptionalNullable[Dict[str, Any]], pydantic.Field(alias="createMessage") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["createMessage"]) + nullable_fields = set(["createMessage"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + TasksSamplingCapability.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/taskstoolscapability.py b/src/mistralai/client/models/taskstoolscapability.py new file mode 100644 index 00000000..88d799c1 --- /dev/null +++ b/src/mistralai/client/models/taskstoolscapability.py @@ -0,0 +1,68 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ac9448f661ce + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import NotRequired, TypedDict + + +class TasksToolsCapabilityTypedDict(TypedDict): + r"""Capability for tasks tools operations.""" + + call: NotRequired[Nullable[Dict[str, Any]]] + + +class TasksToolsCapability(BaseModel): + r"""Capability for tasks tools operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + call: OptionalNullable[Dict[str, Any]] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["call"]) + nullable_fields = set(["call"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m diff --git a/src/mistralai/client/models/toolexecutionconfiguration.py b/src/mistralai/client/models/toolexecutionconfiguration.py new file mode 100644 index 00000000..ce65ad31 --- /dev/null +++ b/src/mistralai/client/models/toolexecutionconfiguration.py @@ -0,0 +1,84 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 1c9369616b21 + +from __future__ import annotations +from .logicalexpression import LogicalExpression, LogicalExpressionTypedDict +from .toolproperties import ToolProperties, ToolPropertiesTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import List, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict + + +RequiresConfirmationTypedDict = TypeAliasType( + "RequiresConfirmationTypedDict", + Union[ToolPropertiesTypedDict, LogicalExpressionTypedDict, List[str]], +) + + +RequiresConfirmation = TypeAliasType( + "RequiresConfirmation", Union[ToolProperties, LogicalExpression, List[str]] +) + + +SkipConfirmationTypedDict = TypeAliasType( + "SkipConfirmationTypedDict", + Union[ToolPropertiesTypedDict, LogicalExpressionTypedDict, List[str]], +) + + +SkipConfirmation = TypeAliasType( + "SkipConfirmation", Union[ToolProperties, LogicalExpression, List[str]] +) + + +class ToolExecutionConfigurationTypedDict(TypedDict): + requires_confirmation: NotRequired[Nullable[RequiresConfirmationTypedDict]] + skip_confirmation: NotRequired[Nullable[SkipConfirmationTypedDict]] + include: NotRequired[Nullable[List[str]]] + exclude: NotRequired[Nullable[List[str]]] + + +class ToolExecutionConfiguration(BaseModel): + requires_confirmation: OptionalNullable[RequiresConfirmation] = UNSET + + skip_confirmation: OptionalNullable[SkipConfirmation] = UNSET + + include: OptionalNullable[List[str]] = UNSET + + exclude: OptionalNullable[List[str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["requires_confirmation", "skip_confirmation", "include", "exclude"] + ) + nullable_fields = set( + ["requires_confirmation", "skip_confirmation", "include", "exclude"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/toolproperties.py b/src/mistralai/client/models/toolproperties.py new file mode 100644 index 00000000..d3bf9789 --- /dev/null +++ b/src/mistralai/client/models/toolproperties.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 3a33561f76fc + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class ToolPropertiesTypedDict(TypedDict): + read_only: Nullable[bool] + + +class ToolProperties(BaseModel): + read_only: Nullable[bool] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/toolscapability.py b/src/mistralai/client/models/toolscapability.py new file mode 100644 index 00000000..94e5ddc8 --- /dev/null +++ b/src/mistralai/client/models/toolscapability.py @@ -0,0 +1,76 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 2feda23ea584 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import ConfigDict, model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class ToolsCapabilityTypedDict(TypedDict): + r"""Capability for tools operations.""" + + list_changed: NotRequired[Nullable[bool]] + + +class ToolsCapability(BaseModel): + r"""Capability for tools operations.""" + + model_config = ConfigDict( + populate_by_name=True, arbitrary_types_allowed=True, extra="allow" + ) + __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False) + + list_changed: Annotated[ + OptionalNullable[bool], pydantic.Field(alias="listChanged") + ] = UNSET + + @property + def additional_properties(self): + return self.__pydantic_extra__ + + @additional_properties.setter + def additional_properties(self, value): + self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["listChanged"]) + nullable_fields = set(["listChanged"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + serialized.pop(k, serialized.pop(n, None)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + for k, v in serialized.items(): + m[k] = v + + return m + + +try: + ToolsCapability.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/turbinemeta.py b/src/mistralai/client/models/turbinemeta.py new file mode 100644 index 00000000..5084c05f --- /dev/null +++ b/src/mistralai/client/models/turbinemeta.py @@ -0,0 +1,50 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 084d588caa1e + +from __future__ import annotations +from .serverlocale import ServerLocale, ServerLocaleTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class TurbineMetaTypedDict(TypedDict): + system_prompt_name: NotRequired[Nullable[str]] + locale: NotRequired[Nullable[ServerLocaleTypedDict]] + + +class TurbineMeta(BaseModel): + system_prompt_name: OptionalNullable[str] = UNSET + + locale: OptionalNullable[ServerLocale] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["system_prompt_name", "locale"]) + nullable_fields = set(["system_prompt_name", "locale"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py b/src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py new file mode 100644 index 00000000..5e3a1be4 --- /dev/null +++ b/src/mistralai/client/models/update_schedule_v1_workflows_schedules_schedule_id_patchop.py @@ -0,0 +1,27 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 6aaa918af7f4 + +from __future__ import annotations +from .workflowscheduleupdaterequest import ( + WorkflowScheduleUpdateRequest, + WorkflowScheduleUpdateRequestTypedDict, +) +from mistralai.client.types import BaseModel +from mistralai.client.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequestTypedDict(TypedDict): + schedule_id: str + workflow_schedule_update_request: WorkflowScheduleUpdateRequestTypedDict + + +class UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest(BaseModel): + schedule_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + + workflow_schedule_update_request: Annotated[ + WorkflowScheduleUpdateRequest, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] diff --git a/src/mistralai/client/models/updateconnectorrequest.py b/src/mistralai/client/models/updateconnectorrequest.py index 145091d4..81f09ea9 100644 --- a/src/mistralai/client/models/updateconnectorrequest.py +++ b/src/mistralai/client/models/updateconnectorrequest.py @@ -3,6 +3,7 @@ from __future__ import annotations from .authdata import AuthData, AuthDataTypedDict +from .connectorprotocol import ConnectorProtocol from mistralai.client.types import ( BaseModel, Nullable, @@ -26,6 +27,8 @@ class UpdateConnectorRequestTypedDict(TypedDict): r"""The optional url of the icon you want to associate to the connector.""" system_prompt: NotRequired[Nullable[str]] r"""Optional system prompt for the connector.""" + protocol: NotRequired[Nullable[ConnectorProtocol]] + r"""Protocol of the connector.""" connection_config: NotRequired[Nullable[Dict[str, Any]]] r"""Optional new connection config.""" connection_secrets: NotRequired[Nullable[Dict[str, Any]]] @@ -54,6 +57,9 @@ class UpdateConnectorRequest(BaseModel): system_prompt: OptionalNullable[str] = UNSET r"""Optional system prompt for the connector.""" + protocol: OptionalNullable[ConnectorProtocol] = UNSET + r"""Protocol of the connector.""" + connection_config: OptionalNullable[Dict[str, Any]] = UNSET r"""Optional new connection config.""" @@ -78,6 +84,7 @@ def serialize_model(self, handler): "description", "icon_url", "system_prompt", + "protocol", "connection_config", "connection_secrets", "server", @@ -92,6 +99,7 @@ def serialize_model(self, handler): "description", "icon_url", "system_prompt", + "protocol", "connection_config", "connection_secrets", "server", diff --git a/src/mistralai/client/models/updatedocumentrequest.py b/src/mistralai/client/models/updatedocumentrequest.py index 5f67ea69..07c6f5e3 100644 --- a/src/mistralai/client/models/updatedocumentrequest.py +++ b/src/mistralai/client/models/updatedocumentrequest.py @@ -34,6 +34,8 @@ class UpdateDocumentRequestTypedDict(TypedDict): name: NotRequired[str] attributes: NotRequired[Nullable[Dict[str, AttributesTypedDict]]] + expires_at: NotRequired[Nullable[datetime]] + r"""If set, the document will be automatically deleted after this date.""" class UpdateDocumentRequest(BaseModel): @@ -41,10 +43,13 @@ class UpdateDocumentRequest(BaseModel): attributes: OptionalNullable[Dict[str, Attributes]] = UNSET + expires_at: OptionalNullable[datetime] = UNSET + r"""If set, the document will be automatically deleted after this date.""" + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["name", "attributes"]) - nullable_fields = set(["attributes"]) + optional_fields = set(["name", "attributes", "expires_at"]) + nullable_fields = set(["attributes", "expires_at"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/vespaschemaresponse.py b/src/mistralai/client/models/vespaschemaresponse.py new file mode 100644 index 00000000..440967d1 --- /dev/null +++ b/src/mistralai/client/models/vespaschemaresponse.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: fbab188e672e + +from __future__ import annotations +from mistralai.client.types import BaseModel, Nullable, UNSET_SENTINEL +from pydantic import model_serializer +from typing_extensions import TypedDict + + +class VespaSchemaResponseTypedDict(TypedDict): + name: str + document_count: Nullable[int] + + +class VespaSchemaResponse(BaseModel): + name: str + + document_count: Nullable[int] + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + m[k] = val + + return m diff --git a/src/mistralai/client/models/vespasearchindexinforesponse.py b/src/mistralai/client/models/vespasearchindexinforesponse.py new file mode 100644 index 00000000..a3cce354 --- /dev/null +++ b/src/mistralai/client/models/vespasearchindexinforesponse.py @@ -0,0 +1,40 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: ee7484f75a7c + +from __future__ import annotations +from .vespaschemaresponse import VespaSchemaResponse, VespaSchemaResponseTypedDict +from mistralai.client.types import BaseModel +from mistralai.client.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import List, Literal +from typing_extensions import Annotated, TypedDict + + +class VespaSearchIndexInfoResponseTypedDict(TypedDict): + k8s_cluster: str + k8s_namespace: str + vespa_instance_name: str + schemas: List[VespaSchemaResponseTypedDict] + type: Literal["vespa"] + + +class VespaSearchIndexInfoResponse(BaseModel): + k8s_cluster: str + + k8s_namespace: str + + vespa_instance_name: str + + schemas: List[VespaSchemaResponse] + + type: Annotated[ + Annotated[Literal["vespa"], AfterValidator(validate_const("vespa"))], + pydantic.Field(alias="type"), + ] = "vespa" + + +try: + VespaSearchIndexInfoResponse.model_rebuild() +except NameError: + pass diff --git a/src/mistralai/client/models/voiceappearance.py b/src/mistralai/client/models/voiceappearance.py new file mode 100644 index 00000000..a9d4f2a8 --- /dev/null +++ b/src/mistralai/client/models/voiceappearance.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 945a81bc2582 + +from __future__ import annotations +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class VoiceAppearanceTypedDict(TypedDict): + skin_color: NotRequired[Nullable[str]] + hair_color: NotRequired[Nullable[str]] + background_color: NotRequired[Nullable[str]] + avatar_id: NotRequired[Nullable[str]] + + +class VoiceAppearance(BaseModel): + skin_color: OptionalNullable[str] = UNSET + + hair_color: OptionalNullable[str] = UNSET + + background_color: OptionalNullable[str] = UNSET + + avatar_id: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["skin_color", "hair_color", "background_color", "avatar_id"] + ) + nullable_fields = set( + ["skin_color", "hair_color", "background_color", "avatar_id"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/voicecreaterequest.py b/src/mistralai/client/models/voicecreaterequest.py index 99df178d..ec94523f 100644 --- a/src/mistralai/client/models/voicecreaterequest.py +++ b/src/mistralai/client/models/voicecreaterequest.py @@ -2,6 +2,7 @@ # @generated-id: 9a1752117dec from __future__ import annotations +from .voiceappearance import VoiceAppearance, VoiceAppearanceTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -26,6 +27,8 @@ class VoiceCreateRequestTypedDict(TypedDict): age: NotRequired[Nullable[int]] tags: NotRequired[Nullable[List[str]]] color: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + appearance: NotRequired[Nullable[VoiceAppearanceTypedDict]] retention_notice: NotRequired[int] sample_filename: NotRequired[Nullable[str]] r"""Original filename for extension detection""" @@ -51,6 +54,10 @@ class VoiceCreateRequest(BaseModel): color: OptionalNullable[str] = UNSET + description: OptionalNullable[str] = UNSET + + appearance: OptionalNullable[VoiceAppearance] = UNSET + retention_notice: Optional[int] = 30 sample_filename: OptionalNullable[str] = UNSET @@ -66,12 +73,23 @@ def serialize_model(self, handler): "age", "tags", "color", + "description", + "appearance", "retention_notice", "sample_filename", ] ) nullable_fields = set( - ["slug", "gender", "age", "tags", "color", "sample_filename"] + [ + "slug", + "gender", + "age", + "tags", + "color", + "description", + "appearance", + "sample_filename", + ] ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/voiceresponse.py b/src/mistralai/client/models/voiceresponse.py index 6fa3987b..818bd257 100644 --- a/src/mistralai/client/models/voiceresponse.py +++ b/src/mistralai/client/models/voiceresponse.py @@ -2,6 +2,7 @@ # @generated-id: 24138e419fae from __future__ import annotations +from .voiceappearance import VoiceAppearance, VoiceAppearanceTypedDict from datetime import datetime from mistralai.client.types import ( BaseModel, @@ -28,6 +29,8 @@ class VoiceResponseTypedDict(TypedDict): age: NotRequired[Nullable[int]] tags: NotRequired[Nullable[List[str]]] color: NotRequired[Nullable[str]] + description: NotRequired[Nullable[str]] + appearance: NotRequired[Nullable[VoiceAppearanceTypedDict]] retention_notice: NotRequired[int] @@ -54,14 +57,39 @@ class VoiceResponse(BaseModel): color: OptionalNullable[str] = UNSET + description: OptionalNullable[str] = UNSET + + appearance: OptionalNullable[VoiceAppearance] = UNSET + retention_notice: Optional[int] = 30 @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( - ["slug", "languages", "gender", "age", "tags", "color", "retention_notice"] + [ + "slug", + "languages", + "gender", + "age", + "tags", + "color", + "description", + "appearance", + "retention_notice", + ] + ) + nullable_fields = set( + [ + "slug", + "gender", + "age", + "tags", + "color", + "description", + "appearance", + "user_id", + ] ) - nullable_fields = set(["slug", "gender", "age", "tags", "color", "user_id"]) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/voiceupdaterequest.py b/src/mistralai/client/models/voiceupdaterequest.py index 717316b0..4239d016 100644 --- a/src/mistralai/client/models/voiceupdaterequest.py +++ b/src/mistralai/client/models/voiceupdaterequest.py @@ -2,6 +2,7 @@ # @generated-id: 798f8ff225de from __future__ import annotations +from .voiceappearance import VoiceAppearance, VoiceAppearanceTypedDict from mistralai.client.types import ( BaseModel, Nullable, @@ -22,6 +23,8 @@ class VoiceUpdateRequestTypedDict(TypedDict): gender: NotRequired[Nullable[str]] age: NotRequired[Nullable[int]] tags: NotRequired[Nullable[List[str]]] + description: NotRequired[Nullable[str]] + appearance: NotRequired[Nullable[VoiceAppearanceTypedDict]] class VoiceUpdateRequest(BaseModel): @@ -37,10 +40,18 @@ class VoiceUpdateRequest(BaseModel): tags: OptionalNullable[List[str]] = UNSET + description: OptionalNullable[str] = UNSET + + appearance: OptionalNullable[VoiceAppearance] = UNSET + @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = set(["name", "languages", "gender", "age", "tags"]) - nullable_fields = set(["name", "languages", "gender", "age", "tags"]) + optional_fields = set( + ["name", "languages", "gender", "age", "tags", "description", "appearance"] + ) + nullable_fields = set( + ["name", "languages", "gender", "age", "tags", "description", "appearance"] + ) serialized = handler(self) m = {} diff --git a/src/mistralai/client/models/workflowbulkarchiverequest.py b/src/mistralai/client/models/workflowbulkarchiverequest.py new file mode 100644 index 00000000..fb208919 --- /dev/null +++ b/src/mistralai/client/models/workflowbulkarchiverequest.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 0e0bf7feeede + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class WorkflowBulkArchiveRequestTypedDict(TypedDict): + workflow_ids: List[str] + r"""List of workflow IDs to archive""" + + +class WorkflowBulkArchiveRequest(BaseModel): + workflow_ids: List[str] + r"""List of workflow IDs to archive""" diff --git a/src/mistralai/client/models/workflowbulkarchiveresponse.py b/src/mistralai/client/models/workflowbulkarchiveresponse.py new file mode 100644 index 00000000..506724b3 --- /dev/null +++ b/src/mistralai/client/models/workflowbulkarchiveresponse.py @@ -0,0 +1,41 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 132f69064b86 + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from .workflowbulkerror import WorkflowBulkError, WorkflowBulkErrorTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowBulkArchiveResponseTypedDict(TypedDict): + archived: List[WorkflowTypedDict] + r"""Workflows that were successfully archived or were already archived""" + errored: NotRequired[List[WorkflowBulkErrorTypedDict]] + r"""Workflows that could not be archived and the corresponding error messages""" + + +class WorkflowBulkArchiveResponse(BaseModel): + archived: List[Workflow] + r"""Workflows that were successfully archived or were already archived""" + + errored: Optional[List[WorkflowBulkError]] = None + r"""Workflows that could not be archived and the corresponding error messages""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["errored"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowbulkerror.py b/src/mistralai/client/models/workflowbulkerror.py new file mode 100644 index 00000000..076c938a --- /dev/null +++ b/src/mistralai/client/models/workflowbulkerror.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 61b9b62c7fd6 + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing_extensions import NotRequired, TypedDict + + +class WorkflowBulkErrorTypedDict(TypedDict): + workflow_id: str + r"""The requested workflow ID""" + message: str + r"""Error message describing why the operation failed""" + workflow: NotRequired[Nullable[WorkflowTypedDict]] + r"""The workflow, if found""" + + +class WorkflowBulkError(BaseModel): + workflow_id: str + r"""The requested workflow ID""" + + message: str + r"""Error message describing why the operation failed""" + + workflow: OptionalNullable[Workflow] = UNSET + r"""The workflow, if found""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["workflow"]) + nullable_fields = set(["workflow"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowbulkunarchiverequest.py b/src/mistralai/client/models/workflowbulkunarchiverequest.py new file mode 100644 index 00000000..6ffecd91 --- /dev/null +++ b/src/mistralai/client/models/workflowbulkunarchiverequest.py @@ -0,0 +1,17 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: b04414883bed + +from __future__ import annotations +from mistralai.client.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class WorkflowBulkUnarchiveRequestTypedDict(TypedDict): + workflow_ids: List[str] + r"""List of workflow IDs to unarchive""" + + +class WorkflowBulkUnarchiveRequest(BaseModel): + workflow_ids: List[str] + r"""List of workflow IDs to unarchive""" diff --git a/src/mistralai/client/models/workflowbulkunarchiveresponse.py b/src/mistralai/client/models/workflowbulkunarchiveresponse.py new file mode 100644 index 00000000..f2ab3727 --- /dev/null +++ b/src/mistralai/client/models/workflowbulkunarchiveresponse.py @@ -0,0 +1,41 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 34554c6df2e3 + +from __future__ import annotations +from .workflow import Workflow, WorkflowTypedDict +from .workflowbulkerror import WorkflowBulkError, WorkflowBulkErrorTypedDict +from mistralai.client.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class WorkflowBulkUnarchiveResponseTypedDict(TypedDict): + unarchived: List[WorkflowTypedDict] + r"""Workflows that were successfully unarchived or were already unarchived""" + errored: NotRequired[List[WorkflowBulkErrorTypedDict]] + r"""Workflows that could not be unarchived and the corresponding error messages""" + + +class WorkflowBulkUnarchiveResponse(BaseModel): + unarchived: List[Workflow] + r"""Workflows that were successfully unarchived or were already unarchived""" + + errored: Optional[List[WorkflowBulkError]] = None + r"""Workflows that could not be unarchived and the corresponding error messages""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["errored"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowschedulelistresponse.py b/src/mistralai/client/models/workflowschedulelistresponse.py index 3c9eb3d7..21341eca 100644 --- a/src/mistralai/client/models/workflowschedulelistresponse.py +++ b/src/mistralai/client/models/workflowschedulelistresponse.py @@ -6,16 +6,53 @@ ScheduleDefinitionOutput, ScheduleDefinitionOutputTypedDict, ) -from mistralai.client.types import BaseModel +from mistralai.client.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer from typing import List -from typing_extensions import TypedDict +from typing_extensions import NotRequired, TypedDict class WorkflowScheduleListResponseTypedDict(TypedDict): schedules: List[ScheduleDefinitionOutputTypedDict] r"""A list of workflow schedules""" + next_page_token: NotRequired[Nullable[str]] + r"""Token for the next page of results""" class WorkflowScheduleListResponse(BaseModel): schedules: List[ScheduleDefinitionOutput] r"""A list of workflow schedules""" + + next_page_token: OptionalNullable[str] = UNSET + r"""Token for the next page of results""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["next_page_token"]) + nullable_fields = set(["next_page_token"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/src/mistralai/client/models/workflowscheduleupdaterequest.py b/src/mistralai/client/models/workflowscheduleupdaterequest.py new file mode 100644 index 00000000..b43dc96f --- /dev/null +++ b/src/mistralai/client/models/workflowscheduleupdaterequest.py @@ -0,0 +1,28 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: 72ca0f5e6c08 + +from __future__ import annotations +from .partialscheduledefinition import ( + PartialScheduleDefinition, + PartialScheduleDefinitionTypedDict, +) +from mistralai.client.types import BaseModel +from typing_extensions import TypedDict + + +class WorkflowScheduleUpdateRequestTypedDict(TypedDict): + schedule: PartialScheduleDefinitionTypedDict + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ + + +class WorkflowScheduleUpdateRequest(BaseModel): + schedule: PartialScheduleDefinition + r"""Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + """ diff --git a/src/mistralai/client/models_.py b/src/mistralai/client/models_.py index 2a00325f..6263ead9 100644 --- a/src/mistralai/client/models_.py +++ b/src/mistralai/client/models_.py @@ -88,7 +88,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -184,7 +184,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -277,7 +277,7 @@ def retrieve( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -372,7 +372,7 @@ async def retrieve_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -467,7 +467,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -560,7 +560,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -668,7 +668,7 @@ def update( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -772,7 +772,7 @@ async def update_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -861,7 +861,7 @@ def archive( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -948,7 +948,7 @@ async def archive_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1035,7 +1035,7 @@ def unarchive( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1122,7 +1122,7 @@ async def unarchive_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/ocr.py b/src/mistralai/client/ocr.py index c290b1bb..e0bc4e0e 100644 --- a/src/mistralai/client/ocr.py +++ b/src/mistralai/client/ocr.py @@ -132,7 +132,7 @@ def process( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -272,7 +272,7 @@ async def process_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/rag.py b/src/mistralai/client/rag.py index 091b0270..934b2374 100644 --- a/src/mistralai/client/rag.py +++ b/src/mistralai/client/rag.py @@ -6,11 +6,13 @@ from mistralai.client.ingestion_pipeline_configurations import ( IngestionPipelineConfigurations, ) +from mistralai.client.search_indexes import SearchIndexes from typing import Optional class Rag(BaseSDK): ingestion_pipeline_configurations: IngestionPipelineConfigurations + search_indexes: SearchIndexes def __init__( self, sdk_config: SDKConfiguration, parent_ref: Optional[object] = None @@ -23,3 +25,6 @@ def _init_sdks(self): self.ingestion_pipeline_configurations = IngestionPipelineConfigurations( self.sdk_configuration, parent_ref=self.parent_ref ) + self.search_indexes = SearchIndexes( + self.sdk_configuration, parent_ref=self.parent_ref + ) diff --git a/src/mistralai/client/records.py b/src/mistralai/client/records.py index 2ac04c2f..5a4c3c84 100644 --- a/src/mistralai/client/records.py +++ b/src/mistralai/client/records.py @@ -81,7 +81,7 @@ def fetch( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -174,7 +174,7 @@ async def fetch_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -267,7 +267,7 @@ def delete( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -360,7 +360,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -456,7 +456,7 @@ def bulk_delete( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -552,7 +552,7 @@ async def bulk_delete_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -661,7 +661,7 @@ def judge( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -770,7 +770,7 @@ async def judge_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -875,7 +875,7 @@ def update_payload( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -980,7 +980,7 @@ async def update_payload_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1085,7 +1085,7 @@ def update_properties( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1190,7 +1190,7 @@ async def update_properties_async( ), ), request=req, - error_status_codes=["400", "404", "408", "409", "422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/runs.py b/src/mistralai/client/runs.py index d1a242fb..01507e33 100644 --- a/src/mistralai/client/runs.py +++ b/src/mistralai/client/runs.py @@ -102,7 +102,7 @@ def list_runs( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -120,8 +120,8 @@ def next_func() -> Optional[models.ListRunsV1WorkflowsRunsGetResponse]: results = JSONPath("$.executions").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.page_size if isinstance(request.page_size, int) else 50 - if len(results[0]) < limit: + limit_ = request.page_size if isinstance(request.page_size, int) else 50 + if len(results[0]) < limit_: return None return self.list_runs( @@ -249,7 +249,7 @@ async def list_runs_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -272,8 +272,8 @@ async def empty_result(): results = JSONPath("$.executions").parse(body) if len(results) == 0 or len(results[0]) == 0: return empty_result() - limit = request.page_size if isinstance(request.page_size, int) else 50 - if len(results[0]) < limit: + limit_ = request.page_size if isinstance(request.page_size, int) else 50 + if len(results[0]) < limit_: return empty_result() return self.list_runs_async( @@ -381,7 +381,7 @@ def get_run( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -472,7 +472,7 @@ async def get_run_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -566,7 +566,7 @@ def get_run_history( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -660,7 +660,7 @@ async def get_run_history_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/schedules.py b/src/mistralai/client/schedules.py index 9b013acd..c56e4973 100644 --- a/src/mistralai/client/schedules.py +++ b/src/mistralai/client/schedules.py @@ -2,25 +2,38 @@ # @generated-id: d3b4fe452390 from .basesdk import BaseSDK +from jsonpath import JSONPath from mistralai.client import errors, models, utils from mistralai.client._hooks import HookContext from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Mapping, Optional, Union +from typing import Any, Awaitable, Dict, List, Mapping, Optional, Union class Schedules(BaseSDK): def get_schedules( self, *, + workflow_name: OptionalNullable[str] = UNSET, + user_id: OptionalNullable[str] = UNSET, + status: OptionalNullable[ + models.GetSchedulesV1WorkflowsSchedulesGetStatus + ] = UNSET, + page_size: OptionalNullable[int] = UNSET, + next_page_token: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowScheduleListResponse: + ) -> Optional[models.GetSchedulesV1WorkflowsSchedulesGetResponse]: r"""Get Schedules + :param workflow_name: Filter by workflow name + :param user_id: Filter by user ID. Pass 'current' to resolve to the authenticated user's ID. + :param status: Filter by schedule status: 'active' or 'paused' + :param page_size: Number of items per page. Omitting this parameter fetches all results at once (deprecated — pass page_size to use pagination). + :param next_page_token: Token for the next page of results :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -38,12 +51,21 @@ def get_schedules( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.GetSchedulesV1WorkflowsSchedulesGetRequest( + workflow_name=workflow_name, + user_id=user_id, + status=status, + page_size=page_size, + next_page_token=next_page_token, + ) + req = self._build_request( method="GET", path="/v1/workflows/schedules", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, request_has_path_params=False, request_has_query_params=True, @@ -74,14 +96,53 @@ def get_schedules( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) + def next_func() -> Optional[models.GetSchedulesV1WorkflowsSchedulesGetResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + next_cursor = JSONPath("$.next_page_token").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return None + results = JSONPath("$.schedules").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return None + limit_ = request.page_size if isinstance(request.page_size, int) else 0 + if len(results[0]) < limit_: + return None + + return self.get_schedules( + workflow_name=workflow_name, + user_id=user_id, + status=status, + page_size=page_size, + next_page_token=next_cursor, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, + ) + + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.WorkflowScheduleListResponse, http_res + return models.GetSchedulesV1WorkflowsSchedulesGetResponse( + result=unmarshal_json_response( + models.WorkflowScheduleListResponse, http_res + ), + next=next_func, + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res ) + raise errors.HTTPValidationError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -94,13 +155,25 @@ def get_schedules( async def get_schedules_async( self, *, + workflow_name: OptionalNullable[str] = UNSET, + user_id: OptionalNullable[str] = UNSET, + status: OptionalNullable[ + models.GetSchedulesV1WorkflowsSchedulesGetStatus + ] = UNSET, + page_size: OptionalNullable[int] = UNSET, + next_page_token: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> models.WorkflowScheduleListResponse: + ) -> Optional[models.GetSchedulesV1WorkflowsSchedulesGetResponse]: r"""Get Schedules + :param workflow_name: Filter by workflow name + :param user_id: Filter by user ID. Pass 'current' to resolve to the authenticated user's ID. + :param status: Filter by schedule status: 'active' or 'paused' + :param page_size: Number of items per page. Omitting this parameter fetches all results at once (deprecated — pass page_size to use pagination). + :param next_page_token: Token for the next page of results :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -118,12 +191,21 @@ async def get_schedules_async( base_url = server_url else: base_url = self._get_url(base_url, url_variables) + + request = models.GetSchedulesV1WorkflowsSchedulesGetRequest( + workflow_name=workflow_name, + user_id=user_id, + status=status, + page_size=page_size, + next_page_token=next_page_token, + ) + req = self._build_request_async( method="GET", path="/v1/workflows/schedules", base_url=base_url, url_variables=url_variables, - request=None, + request=request, request_body_required=False, request_has_path_params=False, request_has_query_params=True, @@ -154,14 +236,58 @@ async def get_schedules_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) + def next_func() -> ( + Awaitable[Optional[models.GetSchedulesV1WorkflowsSchedulesGetResponse]] + ): + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + + async def empty_result(): + return None + + next_cursor = JSONPath("$.next_page_token").parse(body) + + if len(next_cursor) == 0: + return empty_result() + + next_cursor = next_cursor[0] + if next_cursor is None or str(next_cursor).strip() == "": + return empty_result() + results = JSONPath("$.schedules").parse(body) + if len(results) == 0 or len(results[0]) == 0: + return empty_result() + limit_ = request.page_size if isinstance(request.page_size, int) else 0 + if len(results[0]) < limit_: + return empty_result() + + return self.get_schedules_async( + workflow_name=workflow_name, + user_id=user_id, + status=status, + page_size=page_size, + next_page_token=next_cursor, + retries=retries, + server_url=server_url, + timeout_ms=timeout_ms, + http_headers=http_headers, + ) + + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - models.WorkflowScheduleListResponse, http_res + return models.GetSchedulesV1WorkflowsSchedulesGetResponse( + result=unmarshal_json_response( + models.WorkflowScheduleListResponse, http_res + ), + next=next_func, ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError("API error occurred", http_res, http_res_text) @@ -267,7 +393,7 @@ def schedule_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -384,7 +510,7 @@ async def schedule_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -405,6 +531,188 @@ async def schedule_workflow_async( raise errors.SDKError("Unexpected response received", http_res) + def get_schedule( + self, + *, + schedule_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ScheduleDefinitionOutput: + r"""Get Schedule + + :param schedule_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest( + schedule_id=schedule_id, + ) + + req = self._build_request( + method="GET", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_schedule_v1_workflows_schedules__schedule_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ScheduleDefinitionOutput, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def get_schedule_async( + self, + *, + schedule_id: str, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.ScheduleDefinitionOutput: + r"""Get Schedule + + :param schedule_id: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetScheduleV1WorkflowsSchedulesScheduleIDGetRequest( + schedule_id=schedule_id, + ) + + req = self._build_request_async( + method="GET", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_schedule_v1_workflows_schedules__schedule_id__get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.ScheduleDefinitionOutput, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def unschedule_workflow( self, *, @@ -475,7 +783,7 @@ def unschedule_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -566,7 +874,7 @@ async def unschedule_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -587,6 +895,226 @@ async def unschedule_workflow_async( raise errors.SDKError("Unexpected response received", http_res) + def update_schedule( + self, + *, + schedule_id: str, + schedule: Union[ + models.PartialScheduleDefinition, models.PartialScheduleDefinitionTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleResponse: + r"""Update Schedule + + :param schedule_id: + :param schedule: Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest( + schedule_id=schedule_id, + workflow_schedule_update_request=models.WorkflowScheduleUpdateRequest( + schedule=utils.get_pydantic_model( + schedule, models.PartialScheduleDefinition + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_update_request, + False, + False, + "json", + models.WorkflowScheduleUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_schedule_v1_workflows_schedules__schedule_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowScheduleResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def update_schedule_async( + self, + *, + schedule_id: str, + schedule: Union[ + models.PartialScheduleDefinition, models.PartialScheduleDefinitionTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowScheduleResponse: + r"""Update Schedule + + :param schedule_id: + :param schedule: Schedule definition for partial updates. + + All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set + fields are applied during an update; unset fields preserve the existing schedule values. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.UpdateScheduleV1WorkflowsSchedulesScheduleIDPatchRequest( + schedule_id=schedule_id, + workflow_schedule_update_request=models.WorkflowScheduleUpdateRequest( + schedule=utils.get_pydantic_model( + schedule, models.PartialScheduleDefinition + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/v1/workflows/schedules/{schedule_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.workflow_schedule_update_request, + False, + False, + "json", + models.WorkflowScheduleUpdateRequest, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="update_schedule_v1_workflows_schedules__schedule_id__patch", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowScheduleResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def pause_schedule( self, *, @@ -671,7 +1199,7 @@ def pause_schedule( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -776,7 +1304,7 @@ async def pause_schedule_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -881,7 +1409,7 @@ def resume_schedule( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -986,7 +1514,7 @@ async def resume_schedule_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/sdk.py b/src/mistralai/client/sdk.py index 03338f46..86de8dd9 100644 --- a/src/mistralai/client/sdk.py +++ b/src/mistralai/client/sdk.py @@ -119,7 +119,9 @@ def __init__( ), "The provided async_client must implement the AsyncHttpClient protocol." security: Any = None - if callable(api_key): + if api_key is None: + security = None + elif callable(api_key): # pylint: disable=unnecessary-lambda-assignment security = lambda: models_.Security(api_key=api_key()) else: diff --git a/src/mistralai/client/search_indexes.py b/src/mistralai/client/search_indexes.py new file mode 100644 index 00000000..522ae338 --- /dev/null +++ b/src/mistralai/client/search_indexes.py @@ -0,0 +1,384 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +# @generated-id: c5a0a7df993a + +from .basesdk import BaseSDK +from mistralai.client import errors, models, utils +from mistralai.client._hooks import HookContext +from mistralai.client.types import OptionalNullable, UNSET +from mistralai.client.utils import get_security_from_env +from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, List, Mapping, Optional, Union + + +class SearchIndexes(BaseSDK): + def list( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.SearchIndexResponse]: + r"""Get Search Indexes + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request( + method="GET", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_search_indexes_v1_rag_search_index_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.SearchIndexResponse], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def list_async( + self, + *, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> List[models.SearchIndexResponse]: + r"""Get Search Indexes + + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + req = self._build_request_async( + method="GET", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=None, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="get_search_indexes_v1_rag_search_index_get", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(List[models.SearchIndexResponse], http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def register( + self, + *, + name: str, + index: Union[ + models.CreateSearchIndexInfoRequestIndex, + models.CreateSearchIndexInfoRequestIndexTypedDict, + ], + document_count: OptionalNullable[int] = UNSET, + status: Optional[models.CreateSearchIndexInfoRequestStatus] = "offline", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchIndexResponse: + r"""Register Search Index + + :param name: + :param index: + :param document_count: + :param status: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateSearchIndexInfoRequest( + name=name, + document_count=document_count, + status=status, + index=utils.get_pydantic_model( + index, models.CreateSearchIndexInfoRequestIndex + ), + ) + + req = self._build_request( + method="PUT", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateSearchIndexInfoRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_search_index_v1_rag_search_index_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SearchIndexResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def register_async( + self, + *, + name: str, + index: Union[ + models.CreateSearchIndexInfoRequestIndex, + models.CreateSearchIndexInfoRequestIndexTypedDict, + ], + document_count: OptionalNullable[int] = UNSET, + status: Optional[models.CreateSearchIndexInfoRequestStatus] = "offline", + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.SearchIndexResponse: + r"""Register Search Index + + :param name: + :param index: + :param document_count: + :param status: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CreateSearchIndexInfoRequest( + name=name, + document_count=document_count, + status=status, + index=utils.get_pydantic_model( + index, models.CreateSearchIndexInfoRequestIndex + ), + ) + + req = self._build_request_async( + method="PUT", + path="/v1/rag/search_index", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.CreateSearchIndexInfoRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="register_search_index_v1_rag_search_index_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.SearchIndexResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) diff --git a/src/mistralai/client/speech.py b/src/mistralai/client/speech.py index 4893684b..42cb1bbb 100644 --- a/src/mistralai/client/speech.py +++ b/src/mistralai/client/speech.py @@ -180,7 +180,7 @@ def complete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -376,7 +376,7 @@ async def complete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/transcriptions.py b/src/mistralai/client/transcriptions.py index d84b59f8..b63fd5d0 100644 --- a/src/mistralai/client/transcriptions.py +++ b/src/mistralai/client/transcriptions.py @@ -110,7 +110,7 @@ def complete( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -222,7 +222,7 @@ async def complete_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -338,7 +338,7 @@ def stream( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -460,7 +460,7 @@ async def stream_async( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/voices.py b/src/mistralai/client/voices.py index e19d5d5a..2810b922 100644 --- a/src/mistralai/client/voices.py +++ b/src/mistralai/client/voices.py @@ -8,7 +8,7 @@ from mistralai.client.types import OptionalNullable, UNSET from mistralai.client.utils import get_security_from_env from mistralai.client.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, List, Mapping, Optional +from typing import Any, List, Mapping, Optional, Union class Voices(BaseSDK): @@ -90,7 +90,7 @@ def list( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -189,7 +189,7 @@ async def list_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -221,6 +221,10 @@ def create( age: OptionalNullable[int] = UNSET, tags: OptionalNullable[List[str]] = UNSET, color: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + appearance: OptionalNullable[ + Union[models.VoiceAppearance, models.VoiceAppearanceTypedDict] + ] = UNSET, retention_notice: Optional[int] = 30, sample_filename: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -240,6 +244,8 @@ def create( :param age: :param tags: :param color: + :param description: + :param appearance: :param retention_notice: :param sample_filename: Original filename for extension detection :param retries: Override the default retry configuration for this method @@ -268,6 +274,10 @@ def create( age=age, tags=tags, color=color, + description=description, + appearance=utils.get_pydantic_model( + appearance, OptionalNullable[models.VoiceAppearance] + ), retention_notice=retention_notice, sample_audio=sample_audio, sample_filename=sample_filename, @@ -312,7 +322,7 @@ def create( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -344,6 +354,10 @@ async def create_async( age: OptionalNullable[int] = UNSET, tags: OptionalNullable[List[str]] = UNSET, color: OptionalNullable[str] = UNSET, + description: OptionalNullable[str] = UNSET, + appearance: OptionalNullable[ + Union[models.VoiceAppearance, models.VoiceAppearanceTypedDict] + ] = UNSET, retention_notice: Optional[int] = 30, sample_filename: OptionalNullable[str] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, @@ -363,6 +377,8 @@ async def create_async( :param age: :param tags: :param color: + :param description: + :param appearance: :param retention_notice: :param sample_filename: Original filename for extension detection :param retries: Override the default retry configuration for this method @@ -391,6 +407,10 @@ async def create_async( age=age, tags=tags, color=color, + description=description, + appearance=utils.get_pydantic_model( + appearance, OptionalNullable[models.VoiceAppearance] + ), retention_notice=retention_notice, sample_audio=sample_audio, sample_filename=sample_filename, @@ -435,7 +455,7 @@ async def create_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -528,7 +548,7 @@ def delete( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -621,7 +641,7 @@ async def delete_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -651,6 +671,10 @@ def update( gender: OptionalNullable[str] = UNSET, age: OptionalNullable[int] = UNSET, tags: OptionalNullable[List[str]] = UNSET, + description: OptionalNullable[str] = UNSET, + appearance: OptionalNullable[ + Union[models.VoiceAppearance, models.VoiceAppearanceTypedDict] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -666,6 +690,8 @@ def update( :param gender: :param age: :param tags: + :param description: + :param appearance: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -692,6 +718,10 @@ def update( gender=gender, age=age, tags=tags, + description=description, + appearance=utils.get_pydantic_model( + appearance, OptionalNullable[models.VoiceAppearance] + ), ), ) @@ -738,7 +768,7 @@ def update( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -768,6 +798,10 @@ async def update_async( gender: OptionalNullable[str] = UNSET, age: OptionalNullable[int] = UNSET, tags: OptionalNullable[List[str]] = UNSET, + description: OptionalNullable[str] = UNSET, + appearance: OptionalNullable[ + Union[models.VoiceAppearance, models.VoiceAppearanceTypedDict] + ] = UNSET, retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, @@ -783,6 +817,8 @@ async def update_async( :param gender: :param age: :param tags: + :param description: + :param appearance: :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -809,6 +845,10 @@ async def update_async( gender=gender, age=age, tags=tags, + description=description, + appearance=utils.get_pydantic_model( + appearance, OptionalNullable[models.VoiceAppearance] + ), ), ) @@ -855,7 +895,7 @@ async def update_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -948,7 +988,7 @@ def get( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1041,7 +1081,7 @@ async def get_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1134,7 +1174,7 @@ def get_sample_audio( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -1230,7 +1270,7 @@ async def get_sample_audio_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index 2693b05b..a6015946 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -377,7 +377,7 @@ def get_workflows( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -395,8 +395,8 @@ def next_func() -> Optional[models.GetWorkflowsV1WorkflowsGetResponse]: results = JSONPath("$.workflows").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if isinstance(request.limit, int) else 50 - if len(results[0]) < limit: + limit_ = request.limit if isinstance(request.limit, int) else 50 + if len(results[0]) < limit_: return None return self.get_workflows( @@ -517,7 +517,7 @@ async def get_workflows_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -540,8 +540,8 @@ async def empty_result(): results = JSONPath("$.workflows").parse(body) if len(results) == 0 or len(results[0]) == 0: return empty_result() - limit = request.limit if isinstance(request.limit, int) else 50 - if len(results[0]) < limit: + limit_ = request.limit if isinstance(request.limit, int) else 50 + if len(results[0]) < limit_: return empty_result() return self.get_workflows_async( @@ -674,7 +674,7 @@ def get_workflow_registrations( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -794,7 +794,7 @@ async def get_workflow_registrations_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -920,7 +920,7 @@ def execute_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1047,7 +1047,7 @@ async def execute_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1177,7 +1177,7 @@ def execute_workflow_registration( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1307,7 +1307,7 @@ async def execute_workflow_registration_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1401,7 +1401,7 @@ def get_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1492,7 +1492,7 @@ async def get_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1601,7 +1601,7 @@ def update_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1710,7 +1710,7 @@ async def update_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1807,7 +1807,7 @@ def get_workflow_registration( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1906,7 +1906,7 @@ async def get_workflow_registration_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -1929,6 +1929,386 @@ async def get_workflow_registration_async( raise errors.SDKError("Unexpected response received", http_res) + def bulk_archive_workflows( + self, + *, + workflow_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowBulkArchiveResponse: + r"""Bulk Archive Workflows + + :param workflow_ids: List of workflow IDs to archive + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowBulkArchiveRequest( + workflow_ids=workflow_ids, + ) + + req = self._build_request( + method="PUT", + path="/v1/workflows/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowBulkArchiveRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulk_archive_workflows_v1_workflows_archive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowBulkArchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def bulk_archive_workflows_async( + self, + *, + workflow_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowBulkArchiveResponse: + r"""Bulk Archive Workflows + + :param workflow_ids: List of workflow IDs to archive + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowBulkArchiveRequest( + workflow_ids=workflow_ids, + ) + + req = self._build_request_async( + method="PUT", + path="/v1/workflows/archive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowBulkArchiveRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulk_archive_workflows_v1_workflows_archive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.WorkflowBulkArchiveResponse, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + def bulk_unarchive_workflows( + self, + *, + workflow_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowBulkUnarchiveResponse: + r"""Bulk Unarchive Workflows + + :param workflow_ids: List of workflow IDs to unarchive + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowBulkUnarchiveRequest( + workflow_ids=workflow_ids, + ) + + req = self._build_request( + method="PUT", + path="/v1/workflows/unarchive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowBulkUnarchiveRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulk_unarchive_workflows_v1_workflows_unarchive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowBulkUnarchiveResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + + async def bulk_unarchive_workflows_async( + self, + *, + workflow_ids: List[str], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.WorkflowBulkUnarchiveResponse: + r"""Bulk Unarchive Workflows + + :param workflow_ids: List of workflow IDs to unarchive + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if timeout_ms is None: + timeout_ms = 60000 + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.WorkflowBulkUnarchiveRequest( + workflow_ids=workflow_ids, + ) + + req = self._build_request_async( + method="PUT", + path="/v1/workflows/unarchive", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "json", models.WorkflowBulkUnarchiveRequest + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="bulk_unarchive_workflows_v1_workflows_unarchive_put", + oauth2_scopes=None, + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.WorkflowBulkUnarchiveResponse, http_res + ) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + errors.HTTPValidationErrorData, http_res + ) + raise errors.HTTPValidationError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError("API error occurred", http_res, http_res_text) + + raise errors.SDKError("Unexpected response received", http_res) + def archive_workflow( self, *, @@ -1999,7 +2379,7 @@ def archive_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2090,7 +2470,7 @@ async def archive_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2183,7 +2563,7 @@ def unarchive_workflow( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -2276,7 +2656,7 @@ async def unarchive_workflow_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/client/workflows_events.py b/src/mistralai/client/workflows_events.py index 71e44ac7..fbf5bc11 100644 --- a/src/mistralai/client/workflows_events.py +++ b/src/mistralai/client/workflows_events.py @@ -116,7 +116,7 @@ def get_stream_events( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -252,7 +252,7 @@ async def get_stream_events_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), stream=True, retry_config=retry_config, ) @@ -365,7 +365,7 @@ def get_workflow_events( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) @@ -468,7 +468,7 @@ async def get_workflow_events_async( ), ), request=req, - error_status_codes=["422", "4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/src/mistralai/extra/workflows/helpers.py b/src/mistralai/extra/workflows/helpers.py index 508c4b97..901fae45 100644 --- a/src/mistralai/extra/workflows/helpers.py +++ b/src/mistralai/extra/workflows/helpers.py @@ -70,7 +70,7 @@ async def get_scheduler_namespace( ), ), request=req, - error_status_codes=["4XX", "5XX"], + is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c), retry_config=retry_config, ) diff --git a/uv.lock b/uv.lock index 8cc60189..d1b64c13 100644 --- a/uv.lock +++ b/uv.lock @@ -7,6 +7,10 @@ resolution-markers = [ "python_full_version < '3.11'", ] +[options] +exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values. +exclude-newer-span = "P7D" + [[package]] name = "aioboto3" version = "12.4.0" @@ -1031,7 +1035,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.4.5" +version = "2.4.7" source = { editable = "." } dependencies = [ { name = "eval-type-backport" },